http://www.jwz.org/xscreensaver/xscreensaver-5.13.tar.gz
[xscreensaver] / configure
1 #! /bin/sh
2 # Guess values for system-dependent variables and create Makefiles.
3 # Generated by GNU Autoconf 2.63.
4 #
5 # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001,
6 # 2002, 2003, 2004, 2005, 2006, 2007, 2008 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   # Pre-4.2 versions of Zsh do 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 as_nl='
41 '
42 export as_nl
43 # Printing a long string crashes Solaris 7 /usr/bin/printf.
44 as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
45 as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
46 as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
47 if (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
48   as_echo='printf %s\n'
49   as_echo_n='printf %s'
50 else
51   if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
52     as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
53     as_echo_n='/usr/ucb/echo -n'
54   else
55     as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
56     as_echo_n_body='eval
57       arg=$1;
58       case $arg in
59       *"$as_nl"*)
60         expr "X$arg" : "X\\(.*\\)$as_nl";
61         arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
62       esac;
63       expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
64     '
65     export as_echo_n_body
66     as_echo_n='sh -c $as_echo_n_body as_echo'
67   fi
68   export as_echo_body
69   as_echo='sh -c $as_echo_body as_echo'
70 fi
71
72 # The user is always right.
73 if test "${PATH_SEPARATOR+set}" != set; then
74   PATH_SEPARATOR=:
75   (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
76     (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
77       PATH_SEPARATOR=';'
78   }
79 fi
80
81 # Support unset when possible.
82 if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then
83   as_unset=unset
84 else
85   as_unset=false
86 fi
87
88
89 # IFS
90 # We need space, tab and new line, in precisely that order.  Quoting is
91 # there to prevent editors from complaining about space-tab.
92 # (If _AS_PATH_WALK were called with IFS unset, it would disable word
93 # splitting by setting IFS to empty value.)
94 IFS=" ""        $as_nl"
95
96 # Find who we are.  Look in the path if we contain no directory separator.
97 case $0 in
98   *[\\/]* ) as_myself=$0 ;;
99   *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
100 for as_dir in $PATH
101 do
102   IFS=$as_save_IFS
103   test -z "$as_dir" && as_dir=.
104   test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
105 done
106 IFS=$as_save_IFS
107
108      ;;
109 esac
110 # We did not find ourselves, most probably we were run as `sh COMMAND'
111 # in which case we are not to be found in the path.
112 if test "x$as_myself" = x; then
113   as_myself=$0
114 fi
115 if test ! -f "$as_myself"; then
116   $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
117   { (exit 1); exit 1; }
118 fi
119
120 # Work around bugs in pre-3.0 UWIN ksh.
121 for as_var in ENV MAIL MAILPATH
122 do ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var
123 done
124 PS1='$ '
125 PS2='> '
126 PS4='+ '
127
128 # NLS nuisances.
129 LC_ALL=C
130 export LC_ALL
131 LANGUAGE=C
132 export LANGUAGE
133
134 # Required to use basename.
135 if expr a : '\(a\)' >/dev/null 2>&1 &&
136    test "X`expr 00001 : '.*\(...\)'`" = X001; then
137   as_expr=expr
138 else
139   as_expr=false
140 fi
141
142 if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
143   as_basename=basename
144 else
145   as_basename=false
146 fi
147
148
149 # Name of the executable.
150 as_me=`$as_basename -- "$0" ||
151 $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
152          X"$0" : 'X\(//\)$' \| \
153          X"$0" : 'X\(/\)' \| . 2>/dev/null ||
154 $as_echo X/"$0" |
155     sed '/^.*\/\([^/][^/]*\)\/*$/{
156             s//\1/
157             q
158           }
159           /^X\/\(\/\/\)$/{
160             s//\1/
161             q
162           }
163           /^X\/\(\/\).*/{
164             s//\1/
165             q
166           }
167           s/.*/./; q'`
168
169 # CDPATH.
170 $as_unset CDPATH
171
172
173 if test "x$CONFIG_SHELL" = x; then
174   if (eval ":") 2>/dev/null; then
175   as_have_required=yes
176 else
177   as_have_required=no
178 fi
179
180   if test $as_have_required = yes &&     (eval ":
181 (as_func_return () {
182   (exit \$1)
183 }
184 as_func_success () {
185   as_func_return 0
186 }
187 as_func_failure () {
188   as_func_return 1
189 }
190 as_func_ret_success () {
191   return 0
192 }
193 as_func_ret_failure () {
194   return 1
195 }
196
197 exitcode=0
198 if as_func_success; then
199   :
200 else
201   exitcode=1
202   echo as_func_success failed.
203 fi
204
205 if as_func_failure; then
206   exitcode=1
207   echo as_func_failure succeeded.
208 fi
209
210 if as_func_ret_success; then
211   :
212 else
213   exitcode=1
214   echo as_func_ret_success failed.
215 fi
216
217 if as_func_ret_failure; then
218   exitcode=1
219   echo as_func_ret_failure succeeded.
220 fi
221
222 if ( set x; as_func_ret_success y && test x = \"\$1\" ); then
223   :
224 else
225   exitcode=1
226   echo positional parameters were not saved.
227 fi
228
229 test \$exitcode = 0) || { (exit 1); exit 1; }
230
231 (
232   as_lineno_1=\$LINENO
233   as_lineno_2=\$LINENO
234   test \"x\$as_lineno_1\" != \"x\$as_lineno_2\" &&
235   test \"x\`expr \$as_lineno_1 + 1\`\" = \"x\$as_lineno_2\") || { (exit 1); exit 1; }
236 ") 2> /dev/null; then
237   :
238 else
239   as_candidate_shells=
240     as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
241 for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH
242 do
243   IFS=$as_save_IFS
244   test -z "$as_dir" && as_dir=.
245   case $as_dir in
246          /*)
247            for as_base in sh bash ksh sh5; do
248              as_candidate_shells="$as_candidate_shells $as_dir/$as_base"
249            done;;
250        esac
251 done
252 IFS=$as_save_IFS
253
254
255       for as_shell in $as_candidate_shells $SHELL; do
256          # Try only shells that exist, to save several forks.
257          if { test -f "$as_shell" || test -f "$as_shell.exe"; } &&
258                 { ("$as_shell") 2> /dev/null <<\_ASEOF
259 if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
260   emulate sh
261   NULLCMD=:
262   # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
263   # is contrary to our usage.  Disable this feature.
264   alias -g '${1+"$@"}'='"$@"'
265   setopt NO_GLOB_SUBST
266 else
267   case `(set -o) 2>/dev/null` in
268   *posix*) set -o posix ;;
269 esac
270
271 fi
272
273
274 :
275 _ASEOF
276 }; then
277   CONFIG_SHELL=$as_shell
278                as_have_required=yes
279                if { "$as_shell" 2> /dev/null <<\_ASEOF
280 if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
281   emulate sh
282   NULLCMD=:
283   # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
284   # is contrary to our usage.  Disable this feature.
285   alias -g '${1+"$@"}'='"$@"'
286   setopt NO_GLOB_SUBST
287 else
288   case `(set -o) 2>/dev/null` in
289   *posix*) set -o posix ;;
290 esac
291
292 fi
293
294
295 :
296 (as_func_return () {
297   (exit $1)
298 }
299 as_func_success () {
300   as_func_return 0
301 }
302 as_func_failure () {
303   as_func_return 1
304 }
305 as_func_ret_success () {
306   return 0
307 }
308 as_func_ret_failure () {
309   return 1
310 }
311
312 exitcode=0
313 if as_func_success; then
314   :
315 else
316   exitcode=1
317   echo as_func_success failed.
318 fi
319
320 if as_func_failure; then
321   exitcode=1
322   echo as_func_failure succeeded.
323 fi
324
325 if as_func_ret_success; then
326   :
327 else
328   exitcode=1
329   echo as_func_ret_success failed.
330 fi
331
332 if as_func_ret_failure; then
333   exitcode=1
334   echo as_func_ret_failure succeeded.
335 fi
336
337 if ( set x; as_func_ret_success y && test x = "$1" ); then
338   :
339 else
340   exitcode=1
341   echo positional parameters were not saved.
342 fi
343
344 test $exitcode = 0) || { (exit 1); exit 1; }
345
346 (
347   as_lineno_1=$LINENO
348   as_lineno_2=$LINENO
349   test "x$as_lineno_1" != "x$as_lineno_2" &&
350   test "x`expr $as_lineno_1 + 1`" = "x$as_lineno_2") || { (exit 1); exit 1; }
351
352 _ASEOF
353 }; then
354   break
355 fi
356
357 fi
358
359       done
360
361       if test "x$CONFIG_SHELL" != x; then
362   for as_var in BASH_ENV ENV
363         do ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var
364         done
365         export CONFIG_SHELL
366         exec "$CONFIG_SHELL" "$as_myself" ${1+"$@"}
367 fi
368
369
370     if test $as_have_required = no; then
371   echo This script requires a shell more modern than all the
372       echo shells that I found on your system.  Please install a
373       echo modern shell, or manually run the script under such a
374       echo shell if you do have one.
375       { (exit 1); exit 1; }
376 fi
377
378
379 fi
380
381 fi
382
383
384
385 (eval "as_func_return () {
386   (exit \$1)
387 }
388 as_func_success () {
389   as_func_return 0
390 }
391 as_func_failure () {
392   as_func_return 1
393 }
394 as_func_ret_success () {
395   return 0
396 }
397 as_func_ret_failure () {
398   return 1
399 }
400
401 exitcode=0
402 if as_func_success; then
403   :
404 else
405   exitcode=1
406   echo as_func_success failed.
407 fi
408
409 if as_func_failure; then
410   exitcode=1
411   echo as_func_failure succeeded.
412 fi
413
414 if as_func_ret_success; then
415   :
416 else
417   exitcode=1
418   echo as_func_ret_success failed.
419 fi
420
421 if as_func_ret_failure; then
422   exitcode=1
423   echo as_func_ret_failure succeeded.
424 fi
425
426 if ( set x; as_func_ret_success y && test x = \"\$1\" ); then
427   :
428 else
429   exitcode=1
430   echo positional parameters were not saved.
431 fi
432
433 test \$exitcode = 0") || {
434   echo No shell found that supports shell functions.
435   echo Please tell bug-autoconf@gnu.org about your system,
436   echo including any error possibly output before this message.
437   echo This can help us improve future autoconf versions.
438   echo Configuration will now proceed without shell functions.
439 }
440
441
442
443   as_lineno_1=$LINENO
444   as_lineno_2=$LINENO
445   test "x$as_lineno_1" != "x$as_lineno_2" &&
446   test "x`expr $as_lineno_1 + 1`" = "x$as_lineno_2" || {
447
448   # Create $as_me.lineno as a copy of $as_myself, but with $LINENO
449   # uniformly replaced by the line number.  The first 'sed' inserts a
450   # line-number line after each line using $LINENO; the second 'sed'
451   # does the real work.  The second script uses 'N' to pair each
452   # line-number line with the line containing $LINENO, and appends
453   # trailing '-' during substitution so that $LINENO is not a special
454   # case at line end.
455   # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the
456   # scripts with optimization help from Paolo Bonzini.  Blame Lee
457   # E. McMahon (1931-1989) for sed's syntax.  :-)
458   sed -n '
459     p
460     /[$]LINENO/=
461   ' <$as_myself |
462     sed '
463       s/[$]LINENO.*/&-/
464       t lineno
465       b
466       :lineno
467       N
468       :loop
469       s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/
470       t loop
471       s/-\n.*//
472     ' >$as_me.lineno &&
473   chmod +x "$as_me.lineno" ||
474     { $as_echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2
475    { (exit 1); exit 1; }; }
476
477   # Don't try to exec as it changes $[0], causing all sort of problems
478   # (the dirname of $[0] is not the place where we might find the
479   # original and so on.  Autoconf is especially sensitive to this).
480   . "./$as_me.lineno"
481   # Exit status is that of the last command.
482   exit
483 }
484
485
486 if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
487   as_dirname=dirname
488 else
489   as_dirname=false
490 fi
491
492 ECHO_C= ECHO_N= ECHO_T=
493 case `echo -n x` in
494 -n*)
495   case `echo 'x\c'` in
496   *c*) ECHO_T=' ';;     # ECHO_T is single tab character.
497   *)   ECHO_C='\c';;
498   esac;;
499 *)
500   ECHO_N='-n';;
501 esac
502 if expr a : '\(a\)' >/dev/null 2>&1 &&
503    test "X`expr 00001 : '.*\(...\)'`" = X001; then
504   as_expr=expr
505 else
506   as_expr=false
507 fi
508
509 rm -f conf$$ conf$$.exe conf$$.file
510 if test -d conf$$.dir; then
511   rm -f conf$$.dir/conf$$.file
512 else
513   rm -f conf$$.dir
514   mkdir conf$$.dir 2>/dev/null
515 fi
516 if (echo >conf$$.file) 2>/dev/null; then
517   if ln -s conf$$.file conf$$ 2>/dev/null; then
518     as_ln_s='ln -s'
519     # ... but there are two gotchas:
520     # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
521     # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
522     # In both cases, we have to default to `cp -p'.
523     ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
524       as_ln_s='cp -p'
525   elif ln conf$$.file conf$$ 2>/dev/null; then
526     as_ln_s=ln
527   else
528     as_ln_s='cp -p'
529   fi
530 else
531   as_ln_s='cp -p'
532 fi
533 rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
534 rmdir conf$$.dir 2>/dev/null
535
536 if mkdir -p . 2>/dev/null; then
537   as_mkdir_p=:
538 else
539   test -d ./-p && rmdir ./-p
540   as_mkdir_p=false
541 fi
542
543 if test -x / >/dev/null 2>&1; then
544   as_test_x='test -x'
545 else
546   if ls -dL / >/dev/null 2>&1; then
547     as_ls_L_option=L
548   else
549     as_ls_L_option=
550   fi
551   as_test_x='
552     eval sh -c '\''
553       if test -d "$1"; then
554         test -d "$1/.";
555       else
556         case $1 in
557         -*)set "./$1";;
558         esac;
559         case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in
560         ???[sx]*):;;*)false;;esac;fi
561     '\'' sh
562   '
563 fi
564 as_executable_p=$as_test_x
565
566 # Sed expression to map a string onto a valid CPP name.
567 as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
568
569 # Sed expression to map a string onto a valid variable name.
570 as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
571
572
573
574 exec 7<&0 </dev/null 6>&1
575
576 # Name of the host.
577 # hostname on some systems (SVR3.2, Linux) returns a bogus exit status,
578 # so uname gets run too.
579 ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q`
580
581 #
582 # Initializations.
583 #
584 ac_default_prefix=/usr/local
585 ac_clean_files=
586 ac_config_libobj_dir=.
587 LIBOBJS=
588 cross_compiling=no
589 subdirs=
590 MFLAGS=
591 MAKEFLAGS=
592 SHELL=${CONFIG_SHELL-/bin/sh}
593
594 # Identity of this package.
595 PACKAGE_NAME=
596 PACKAGE_TARNAME=
597 PACKAGE_VERSION=
598 PACKAGE_STRING=
599 PACKAGE_BUGREPORT=
600
601 ac_unique_file="driver/subprocs.c"
602 # Factoring default headers for most tests.
603 ac_includes_default="\
604 #include <stdio.h>
605 #ifdef HAVE_SYS_TYPES_H
606 # include <sys/types.h>
607 #endif
608 #ifdef HAVE_SYS_STAT_H
609 # include <sys/stat.h>
610 #endif
611 #ifdef STDC_HEADERS
612 # include <stdlib.h>
613 # include <stddef.h>
614 #else
615 # ifdef HAVE_STDLIB_H
616 #  include <stdlib.h>
617 # endif
618 #endif
619 #ifdef HAVE_STRING_H
620 # if !defined STDC_HEADERS && defined HAVE_MEMORY_H
621 #  include <memory.h>
622 # endif
623 # include <string.h>
624 #endif
625 #ifdef HAVE_STRINGS_H
626 # include <strings.h>
627 #endif
628 #ifdef HAVE_INTTYPES_H
629 # include <inttypes.h>
630 #endif
631 #ifdef HAVE_STDINT_H
632 # include <stdint.h>
633 #endif
634 #ifdef HAVE_UNISTD_H
635 # include <unistd.h>
636 #endif"
637
638 ac_subst_vars='LTLIBOBJS
639 LIBOBJS
640 DEPEND_DEFINES
641 DEPEND_FLAGS
642 DEPEND
643 APPDEFAULTS
644 GTK_EXTRA_OBJS
645 HACK_CONF_DIR
646 PO_DATADIR
647 GTK_DATADIR
648 HACKDIR_FULL
649 HACKDIR
650 NOGNOME
651 GNOME22
652 GNOME24
653 GLE_KLUDGE
654 GLE_EXES
655 GL_KLUDGE
656 GL_MEN
657 GL_UTIL_EXES
658 SUID_EXES
659 RETIRED_GL_EXES
660 GL_EXES
661 JPEG_EXES
662 LOCK_OBJS
663 LOCK_SRCS
664 SAVER_GL_LIBS
665 SAVER_GL_OBJS
666 SAVER_GL_SRCS
667 XMU_LIBS
668 XMU_OBJS
669 XMU_SRCS
670 PASSWD_OBJS
671 PASSWD_SRCS
672 MEN_OSX
673 SCRIPTS_OSX
674 EXES_OSX
675 OBJCC
676 WITH_BROWSER
677 DEFAULT_TEXT_FILE
678 DEFAULT_IMAGE_DIRECTORY
679 DEFAULT_IMAGES_P
680 NEW_LOGIN_COMMAND_P
681 NEW_LOGIN_COMMAND
682 HAVE_PAM_FAIL_DELAY
683 INSTALL_PAM
684 NEED_SETUID
685 INSTALL_DIRS
686 SETUID_HACKS
687 INSTALL_SETUID
688 PASSWD_LIBS
689 XINERAMA_LIBS
690 XDPMS_LIBS
691 GLE_LIBS
692 GL_LIBS
693 PTY_LIBS
694 XPM_LIBS
695 HACK_LIBS
696 JPEG_LIBS
697 XML_LIBS
698 GTK_LIBS
699 MOTIF_LIBS
700 SAVER_LIBS
701 ALL_DEMO_PROGRAMS
702 PREFERRED_DEMO_PROGRAM
703 INCLUDES
704 gnome_url_show_program
705 gnome_open_program
706 pkg_config
707 login_manager_tmp
708 MKINSTALLDIRS
709 POSUB
710 POFILES
711 INTLOBJS
712 INTLLIBS
713 INTLDEPS
714 INSTOBJEXT
715 GMOFILES
716 DATADIRNAME
717 CATOBJEXT
718 CATALOGS
719 XGETTEXT
720 GMSGFMT
721 MSGFMT
722 USE_NLS
723 ALLOCA
724 RANLIB
725 GETTEXT_PACKAGE
726 INTLTOOL_PERL
727 INTLTOOL_UPDATE
728 INTLTOOL_MERGE
729 INTLTOOL_EXTRACT
730 INTLTOOL_CAVES_RULE
731 INTLTOOL_XML_RULE
732 INTLTOOL_UI_RULE
733 INTLTOOL_SOUNDLIST_RULE
734 INTLTOOL_SHEET_RULE
735 INTLTOOL_SERVER_RULE
736 INTLTOOL_PONG_RULE
737 INTLTOOL_OAF_RULE
738 INTLTOOL_KEYS_RULE
739 INTLTOOL_DIRECTORY_RULE
740 INTLTOOL_DESKTOP_RULE
741 X_EXTRA_LIBS
742 X_LIBS
743 X_PRE_LIBS
744 X_CFLAGS
745 XMKMF
746 PERL
747 EGREP
748 GREP
749 SET_MAKE
750 INSTALL_DATA
751 INSTALL_SCRIPT
752 INSTALL_PROGRAM
753 CPP
754 OBJEXT
755 EXEEXT
756 ac_ct_CC
757 CPPFLAGS
758 LDFLAGS
759 CFLAGS
760 CC
761 host_os
762 host_vendor
763 host_cpu
764 host
765 build_os
766 build_vendor
767 build_cpu
768 build
769 target_alias
770 host_alias
771 build_alias
772 LIBS
773 ECHO_T
774 ECHO_N
775 ECHO_C
776 DEFS
777 mandir
778 localedir
779 libdir
780 psdir
781 pdfdir
782 dvidir
783 htmldir
784 infodir
785 docdir
786 oldincludedir
787 includedir
788 localstatedir
789 sharedstatedir
790 sysconfdir
791 datadir
792 datarootdir
793 libexecdir
794 sbindir
795 bindir
796 program_transform_name
797 prefix
798 exec_prefix
799 PACKAGE_BUGREPORT
800 PACKAGE_STRING
801 PACKAGE_VERSION
802 PACKAGE_TARNAME
803 PACKAGE_NAME
804 PATH_SEPARATOR
805 SHELL'
806 ac_subst_files=''
807 ac_user_opts='
808 enable_option_checking
809 with_x_app_defaults
810 with_x
811 with_hackdir
812 enable_subdir
813 with_configdir
814 with_dpms_ext
815 with_xinerama_ext
816 with_xinput_ext
817 with_xf86vmode_ext
818 with_xf86gamma_ext
819 with_randr_ext
820 with_proc_interrupts
821 enable_locking
822 enable_root_passwd
823 with_pam
824 with_pam_service_name
825 with_kerberos
826 with_shadow
827 with_passwd_helper
828 with_login_manager
829 with_gtk
830 with_motif
831 with_gl
832 with_gle
833 with_pixbuf
834 with_xpm
835 with_jpeg
836 with_xshm_ext
837 with_xdbe_ext
838 with_readdisplay
839 with_image_directory
840 with_text_file
841 with_browser
842 with_setuid_hacks
843 '
844       ac_precious_vars='build_alias
845 host_alias
846 target_alias
847 CC
848 CFLAGS
849 LDFLAGS
850 LIBS
851 CPPFLAGS
852 CPP
853 CPPFLAGS
854 XMKMF'
855
856
857 # Initialize some variables set by options.
858 ac_init_help=
859 ac_init_version=false
860 ac_unrecognized_opts=
861 ac_unrecognized_sep=
862 # The variables have the same names as the options, with
863 # dashes changed to underlines.
864 cache_file=/dev/null
865 exec_prefix=NONE
866 no_create=
867 no_recursion=
868 prefix=NONE
869 program_prefix=NONE
870 program_suffix=NONE
871 program_transform_name=s,x,x,
872 silent=
873 site=
874 srcdir=
875 verbose=
876 x_includes=NONE
877 x_libraries=NONE
878
879 # Installation directory options.
880 # These are left unexpanded so users can "make install exec_prefix=/foo"
881 # and all the variables that are supposed to be based on exec_prefix
882 # by default will actually change.
883 # Use braces instead of parens because sh, perl, etc. also accept them.
884 # (The list follows the same order as the GNU Coding Standards.)
885 bindir='${exec_prefix}/bin'
886 sbindir='${exec_prefix}/sbin'
887 libexecdir='${exec_prefix}/libexec'
888 datarootdir='${prefix}/share'
889 datadir='${datarootdir}'
890 sysconfdir='${prefix}/etc'
891 sharedstatedir='${prefix}/com'
892 localstatedir='${prefix}/var'
893 includedir='${prefix}/include'
894 oldincludedir='/usr/include'
895 docdir='${datarootdir}/doc/${PACKAGE}'
896 infodir='${datarootdir}/info'
897 htmldir='${docdir}'
898 dvidir='${docdir}'
899 pdfdir='${docdir}'
900 psdir='${docdir}'
901 libdir='${exec_prefix}/lib'
902 localedir='${datarootdir}/locale'
903 mandir='${datarootdir}/man'
904
905 ac_prev=
906 ac_dashdash=
907 for ac_option
908 do
909   # If the previous option needs an argument, assign it.
910   if test -n "$ac_prev"; then
911     eval $ac_prev=\$ac_option
912     ac_prev=
913     continue
914   fi
915
916   case $ac_option in
917   *=*)  ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
918   *)    ac_optarg=yes ;;
919   esac
920
921   # Accept the important Cygnus configure options, so we can diagnose typos.
922
923   case $ac_dashdash$ac_option in
924   --)
925     ac_dashdash=yes ;;
926
927   -bindir | --bindir | --bindi | --bind | --bin | --bi)
928     ac_prev=bindir ;;
929   -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
930     bindir=$ac_optarg ;;
931
932   -build | --build | --buil | --bui | --bu)
933     ac_prev=build_alias ;;
934   -build=* | --build=* | --buil=* | --bui=* | --bu=*)
935     build_alias=$ac_optarg ;;
936
937   -cache-file | --cache-file | --cache-fil | --cache-fi \
938   | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
939     ac_prev=cache_file ;;
940   -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
941   | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
942     cache_file=$ac_optarg ;;
943
944   --config-cache | -C)
945     cache_file=config.cache ;;
946
947   -datadir | --datadir | --datadi | --datad)
948     ac_prev=datadir ;;
949   -datadir=* | --datadir=* | --datadi=* | --datad=*)
950     datadir=$ac_optarg ;;
951
952   -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
953   | --dataroo | --dataro | --datar)
954     ac_prev=datarootdir ;;
955   -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
956   | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
957     datarootdir=$ac_optarg ;;
958
959   -disable-* | --disable-*)
960     ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
961     # Reject names that are not valid shell variable names.
962     expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
963       { $as_echo "$as_me: error: invalid feature name: $ac_useropt" >&2
964    { (exit 1); exit 1; }; }
965     ac_useropt_orig=$ac_useropt
966     ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
967     case $ac_user_opts in
968       *"
969 "enable_$ac_useropt"
970 "*) ;;
971       *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig"
972          ac_unrecognized_sep=', ';;
973     esac
974     eval enable_$ac_useropt=no ;;
975
976   -docdir | --docdir | --docdi | --doc | --do)
977     ac_prev=docdir ;;
978   -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*)
979     docdir=$ac_optarg ;;
980
981   -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv)
982     ac_prev=dvidir ;;
983   -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*)
984     dvidir=$ac_optarg ;;
985
986   -enable-* | --enable-*)
987     ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
988     # Reject names that are not valid shell variable names.
989     expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
990       { $as_echo "$as_me: error: invalid feature name: $ac_useropt" >&2
991    { (exit 1); exit 1; }; }
992     ac_useropt_orig=$ac_useropt
993     ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
994     case $ac_user_opts in
995       *"
996 "enable_$ac_useropt"
997 "*) ;;
998       *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig"
999          ac_unrecognized_sep=', ';;
1000     esac
1001     eval enable_$ac_useropt=\$ac_optarg ;;
1002
1003   -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
1004   | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
1005   | --exec | --exe | --ex)
1006     ac_prev=exec_prefix ;;
1007   -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
1008   | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
1009   | --exec=* | --exe=* | --ex=*)
1010     exec_prefix=$ac_optarg ;;
1011
1012   -gas | --gas | --ga | --g)
1013     # Obsolete; use --with-gas.
1014     with_gas=yes ;;
1015
1016   -help | --help | --hel | --he | -h)
1017     ac_init_help=long ;;
1018   -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
1019     ac_init_help=recursive ;;
1020   -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
1021     ac_init_help=short ;;
1022
1023   -host | --host | --hos | --ho)
1024     ac_prev=host_alias ;;
1025   -host=* | --host=* | --hos=* | --ho=*)
1026     host_alias=$ac_optarg ;;
1027
1028   -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht)
1029     ac_prev=htmldir ;;
1030   -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \
1031   | --ht=*)
1032     htmldir=$ac_optarg ;;
1033
1034   -includedir | --includedir | --includedi | --included | --include \
1035   | --includ | --inclu | --incl | --inc)
1036     ac_prev=includedir ;;
1037   -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
1038   | --includ=* | --inclu=* | --incl=* | --inc=*)
1039     includedir=$ac_optarg ;;
1040
1041   -infodir | --infodir | --infodi | --infod | --info | --inf)
1042     ac_prev=infodir ;;
1043   -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
1044     infodir=$ac_optarg ;;
1045
1046   -libdir | --libdir | --libdi | --libd)
1047     ac_prev=libdir ;;
1048   -libdir=* | --libdir=* | --libdi=* | --libd=*)
1049     libdir=$ac_optarg ;;
1050
1051   -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
1052   | --libexe | --libex | --libe)
1053     ac_prev=libexecdir ;;
1054   -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
1055   | --libexe=* | --libex=* | --libe=*)
1056     libexecdir=$ac_optarg ;;
1057
1058   -localedir | --localedir | --localedi | --localed | --locale)
1059     ac_prev=localedir ;;
1060   -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*)
1061     localedir=$ac_optarg ;;
1062
1063   -localstatedir | --localstatedir | --localstatedi | --localstated \
1064   | --localstate | --localstat | --localsta | --localst | --locals)
1065     ac_prev=localstatedir ;;
1066   -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
1067   | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*)
1068     localstatedir=$ac_optarg ;;
1069
1070   -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
1071     ac_prev=mandir ;;
1072   -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
1073     mandir=$ac_optarg ;;
1074
1075   -nfp | --nfp | --nf)
1076     # Obsolete; use --without-fp.
1077     with_fp=no ;;
1078
1079   -no-create | --no-create | --no-creat | --no-crea | --no-cre \
1080   | --no-cr | --no-c | -n)
1081     no_create=yes ;;
1082
1083   -no-recursion | --no-recursion | --no-recursio | --no-recursi \
1084   | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
1085     no_recursion=yes ;;
1086
1087   -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
1088   | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
1089   | --oldin | --oldi | --old | --ol | --o)
1090     ac_prev=oldincludedir ;;
1091   -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
1092   | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
1093   | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
1094     oldincludedir=$ac_optarg ;;
1095
1096   -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
1097     ac_prev=prefix ;;
1098   -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
1099     prefix=$ac_optarg ;;
1100
1101   -program-prefix | --program-prefix | --program-prefi | --program-pref \
1102   | --program-pre | --program-pr | --program-p)
1103     ac_prev=program_prefix ;;
1104   -program-prefix=* | --program-prefix=* | --program-prefi=* \
1105   | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
1106     program_prefix=$ac_optarg ;;
1107
1108   -program-suffix | --program-suffix | --program-suffi | --program-suff \
1109   | --program-suf | --program-su | --program-s)
1110     ac_prev=program_suffix ;;
1111   -program-suffix=* | --program-suffix=* | --program-suffi=* \
1112   | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
1113     program_suffix=$ac_optarg ;;
1114
1115   -program-transform-name | --program-transform-name \
1116   | --program-transform-nam | --program-transform-na \
1117   | --program-transform-n | --program-transform- \
1118   | --program-transform | --program-transfor \
1119   | --program-transfo | --program-transf \
1120   | --program-trans | --program-tran \
1121   | --progr-tra | --program-tr | --program-t)
1122     ac_prev=program_transform_name ;;
1123   -program-transform-name=* | --program-transform-name=* \
1124   | --program-transform-nam=* | --program-transform-na=* \
1125   | --program-transform-n=* | --program-transform-=* \
1126   | --program-transform=* | --program-transfor=* \
1127   | --program-transfo=* | --program-transf=* \
1128   | --program-trans=* | --program-tran=* \
1129   | --progr-tra=* | --program-tr=* | --program-t=*)
1130     program_transform_name=$ac_optarg ;;
1131
1132   -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd)
1133     ac_prev=pdfdir ;;
1134   -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*)
1135     pdfdir=$ac_optarg ;;
1136
1137   -psdir | --psdir | --psdi | --psd | --ps)
1138     ac_prev=psdir ;;
1139   -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*)
1140     psdir=$ac_optarg ;;
1141
1142   -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1143   | -silent | --silent | --silen | --sile | --sil)
1144     silent=yes ;;
1145
1146   -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
1147     ac_prev=sbindir ;;
1148   -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
1149   | --sbi=* | --sb=*)
1150     sbindir=$ac_optarg ;;
1151
1152   -sharedstatedir | --sharedstatedir | --sharedstatedi \
1153   | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
1154   | --sharedst | --shareds | --shared | --share | --shar \
1155   | --sha | --sh)
1156     ac_prev=sharedstatedir ;;
1157   -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
1158   | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
1159   | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
1160   | --sha=* | --sh=*)
1161     sharedstatedir=$ac_optarg ;;
1162
1163   -site | --site | --sit)
1164     ac_prev=site ;;
1165   -site=* | --site=* | --sit=*)
1166     site=$ac_optarg ;;
1167
1168   -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
1169     ac_prev=srcdir ;;
1170   -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
1171     srcdir=$ac_optarg ;;
1172
1173   -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
1174   | --syscon | --sysco | --sysc | --sys | --sy)
1175     ac_prev=sysconfdir ;;
1176   -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
1177   | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
1178     sysconfdir=$ac_optarg ;;
1179
1180   -target | --target | --targe | --targ | --tar | --ta | --t)
1181     ac_prev=target_alias ;;
1182   -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
1183     target_alias=$ac_optarg ;;
1184
1185   -v | -verbose | --verbose | --verbos | --verbo | --verb)
1186     verbose=yes ;;
1187
1188   -version | --version | --versio | --versi | --vers | -V)
1189     ac_init_version=: ;;
1190
1191   -with-* | --with-*)
1192     ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
1193     # Reject names that are not valid shell variable names.
1194     expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1195       { $as_echo "$as_me: error: invalid package name: $ac_useropt" >&2
1196    { (exit 1); exit 1; }; }
1197     ac_useropt_orig=$ac_useropt
1198     ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1199     case $ac_user_opts in
1200       *"
1201 "with_$ac_useropt"
1202 "*) ;;
1203       *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig"
1204          ac_unrecognized_sep=', ';;
1205     esac
1206     eval with_$ac_useropt=\$ac_optarg ;;
1207
1208   -without-* | --without-*)
1209     ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'`
1210     # Reject names that are not valid shell variable names.
1211     expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1212       { $as_echo "$as_me: error: invalid package name: $ac_useropt" >&2
1213    { (exit 1); exit 1; }; }
1214     ac_useropt_orig=$ac_useropt
1215     ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1216     case $ac_user_opts in
1217       *"
1218 "with_$ac_useropt"
1219 "*) ;;
1220       *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig"
1221          ac_unrecognized_sep=', ';;
1222     esac
1223     eval with_$ac_useropt=no ;;
1224
1225   --x)
1226     # Obsolete; use --with-x.
1227     with_x=yes ;;
1228
1229   -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
1230   | --x-incl | --x-inc | --x-in | --x-i)
1231     ac_prev=x_includes ;;
1232   -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
1233   | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
1234     x_includes=$ac_optarg ;;
1235
1236   -x-libraries | --x-libraries | --x-librarie | --x-librari \
1237   | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
1238     ac_prev=x_libraries ;;
1239   -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
1240   | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
1241     x_libraries=$ac_optarg ;;
1242
1243   -*) { $as_echo "$as_me: error: unrecognized option: $ac_option
1244 Try \`$0 --help' for more information." >&2
1245    { (exit 1); exit 1; }; }
1246     ;;
1247
1248   *=*)
1249     ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
1250     # Reject names that are not valid shell variable names.
1251     expr "x$ac_envvar" : ".*[^_$as_cr_alnum]" >/dev/null &&
1252       { $as_echo "$as_me: error: invalid variable name: $ac_envvar" >&2
1253    { (exit 1); exit 1; }; }
1254     eval $ac_envvar=\$ac_optarg
1255     export $ac_envvar ;;
1256
1257   *)
1258     # FIXME: should be removed in autoconf 3.0.
1259     $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2
1260     expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
1261       $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2
1262     : ${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}
1263     ;;
1264
1265   esac
1266 done
1267
1268 if test -n "$ac_prev"; then
1269   ac_option=--`echo $ac_prev | sed 's/_/-/g'`
1270   { $as_echo "$as_me: error: missing argument to $ac_option" >&2
1271    { (exit 1); exit 1; }; }
1272 fi
1273
1274 if test -n "$ac_unrecognized_opts"; then
1275   case $enable_option_checking in
1276     no) ;;
1277     fatal) { $as_echo "$as_me: error: unrecognized options: $ac_unrecognized_opts" >&2
1278    { (exit 1); exit 1; }; } ;;
1279     *)     $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;;
1280   esac
1281 fi
1282
1283 # Check all directory arguments for consistency.
1284 for ac_var in   exec_prefix prefix bindir sbindir libexecdir datarootdir \
1285                 datadir sysconfdir sharedstatedir localstatedir includedir \
1286                 oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
1287                 libdir localedir mandir
1288 do
1289   eval ac_val=\$$ac_var
1290   # Remove trailing slashes.
1291   case $ac_val in
1292     */ )
1293       ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'`
1294       eval $ac_var=\$ac_val;;
1295   esac
1296   # Be sure to have absolute directory names.
1297   case $ac_val in
1298     [\\/$]* | ?:[\\/]* )  continue;;
1299     NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
1300   esac
1301   { $as_echo "$as_me: error: expected an absolute directory name for --$ac_var: $ac_val" >&2
1302    { (exit 1); exit 1; }; }
1303 done
1304
1305 # There might be people who depend on the old broken behavior: `$host'
1306 # used to hold the argument of --host etc.
1307 # FIXME: To remove some day.
1308 build=$build_alias
1309 host=$host_alias
1310 target=$target_alias
1311
1312 # FIXME: To remove some day.
1313 if test "x$host_alias" != x; then
1314   if test "x$build_alias" = x; then
1315     cross_compiling=maybe
1316     $as_echo "$as_me: WARNING: If you wanted to set the --build type, don't use --host.
1317     If a cross compiler is detected then cross compile mode will be used." >&2
1318   elif test "x$build_alias" != "x$host_alias"; then
1319     cross_compiling=yes
1320   fi
1321 fi
1322
1323 ac_tool_prefix=
1324 test -n "$host_alias" && ac_tool_prefix=$host_alias-
1325
1326 test "$silent" = yes && exec 6>/dev/null
1327
1328
1329 ac_pwd=`pwd` && test -n "$ac_pwd" &&
1330 ac_ls_di=`ls -di .` &&
1331 ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` ||
1332   { $as_echo "$as_me: error: working directory cannot be determined" >&2
1333    { (exit 1); exit 1; }; }
1334 test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
1335   { $as_echo "$as_me: error: pwd does not report name of working directory" >&2
1336    { (exit 1); exit 1; }; }
1337
1338
1339 # Find the source files, if location was not specified.
1340 if test -z "$srcdir"; then
1341   ac_srcdir_defaulted=yes
1342   # Try the directory containing this script, then the parent directory.
1343   ac_confdir=`$as_dirname -- "$as_myself" ||
1344 $as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
1345          X"$as_myself" : 'X\(//\)[^/]' \| \
1346          X"$as_myself" : 'X\(//\)$' \| \
1347          X"$as_myself" : 'X\(/\)' \| . 2>/dev/null ||
1348 $as_echo X"$as_myself" |
1349     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
1350             s//\1/
1351             q
1352           }
1353           /^X\(\/\/\)[^/].*/{
1354             s//\1/
1355             q
1356           }
1357           /^X\(\/\/\)$/{
1358             s//\1/
1359             q
1360           }
1361           /^X\(\/\).*/{
1362             s//\1/
1363             q
1364           }
1365           s/.*/./; q'`
1366   srcdir=$ac_confdir
1367   if test ! -r "$srcdir/$ac_unique_file"; then
1368     srcdir=..
1369   fi
1370 else
1371   ac_srcdir_defaulted=no
1372 fi
1373 if test ! -r "$srcdir/$ac_unique_file"; then
1374   test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
1375   { $as_echo "$as_me: error: cannot find sources ($ac_unique_file) in $srcdir" >&2
1376    { (exit 1); exit 1; }; }
1377 fi
1378 ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work"
1379 ac_abs_confdir=`(
1380         cd "$srcdir" && test -r "./$ac_unique_file" || { $as_echo "$as_me: error: $ac_msg" >&2
1381    { (exit 1); exit 1; }; }
1382         pwd)`
1383 # When building in place, set srcdir=.
1384 if test "$ac_abs_confdir" = "$ac_pwd"; then
1385   srcdir=.
1386 fi
1387 # Remove unnecessary trailing slashes from srcdir.
1388 # Double slashes in file names in object file debugging info
1389 # mess up M-x gdb in Emacs.
1390 case $srcdir in
1391 */) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;;
1392 esac
1393 for ac_var in $ac_precious_vars; do
1394   eval ac_env_${ac_var}_set=\${${ac_var}+set}
1395   eval ac_env_${ac_var}_value=\$${ac_var}
1396   eval ac_cv_env_${ac_var}_set=\${${ac_var}+set}
1397   eval ac_cv_env_${ac_var}_value=\$${ac_var}
1398 done
1399
1400 #
1401 # Report the --help message.
1402 #
1403 if test "$ac_init_help" = "long"; then
1404   # Omit some internal or obsolete options to make the list less imposing.
1405   # This message is too long to be a string in the A/UX 3.1 sh.
1406   cat <<_ACEOF
1407 \`configure' configures this package to adapt to many kinds of systems.
1408
1409 Usage: $0 [OPTION]... [VAR=VALUE]...
1410
1411 To assign environment variables (e.g., CC, CFLAGS...), specify them as
1412 VAR=VALUE.  See below for descriptions of some of the useful variables.
1413
1414 Defaults for the options are specified in brackets.
1415
1416
1417 Configuration:
1418
1419   -h, --help              display this help and exit
1420       --help=short        display options specific to this package
1421       --help=recursive    display the short help of all the included packages
1422   -V, --version           display version information and exit
1423   -q, --quiet, --silent   do not print \`checking...' messages
1424       --cache-file=FILE   cache test results in FILE [disabled]
1425   -C, --config-cache      alias for \`--cache-file=config.cache'
1426   -n, --no-create         do not create output files
1427       --srcdir=DIR        find the sources in DIR [configure dir or \`..']
1428
1429 Installation directories:
1430   --prefix=PREFIX         install architecture-independent files in PREFIX
1431                           [$ac_default_prefix]
1432   --exec-prefix=EPREFIX   install architecture-dependent files in EPREFIX
1433                           [PREFIX]
1434
1435 By default, \`make install' will install all the files in
1436 \`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc.  You can specify
1437 an installation prefix other than \`$ac_default_prefix' using \`--prefix',
1438 for instance \`--prefix=\$HOME'.
1439
1440 For better control, use the options below.
1441
1442 Fine tuning of the installation directories:
1443   --bindir=DIR            user executables [EPREFIX/bin]
1444   --libexecdir=DIR        program executables [EPREFIX/libexec]
1445   --libdir=DIR            object code libraries [EPREFIX/lib]
1446   --includedir=DIR        C header files [PREFIX/include]
1447   --x-includes=DIR        X include files are in DIR
1448   --x-libraries=DIR       X library files are in DIR
1449   --datarootdir=DIR       read-only arch.-independent data root [PREFIX/share]
1450   --datadir=DIR           read-only architecture-independent data [DATAROOTDIR]
1451   --localedir=DIR         locale-dependent data [DATAROOTDIR/locale]
1452   --mandir=DIR            man documentation [DATAROOTDIR/man]
1453   --docdir=DIR            documentation root [DATAROOTDIR/doc/PACKAGE]
1454   --htmldir=DIR           html documentation [DOCDIR]
1455   --dvidir=DIR            dvi documentation [DOCDIR]
1456   --pdfdir=DIR            pdf documentation [DOCDIR]
1457   --psdir=DIR             ps documentation [DOCDIR]
1458 _ACEOF
1459
1460   cat <<\_ACEOF
1461
1462 X features:
1463   --x-includes=DIR    X include files are in DIR
1464   --x-libraries=DIR   X library files are in DIR
1465
1466 System types:
1467   --build=BUILD     configure for building on BUILD [guessed]
1468   --host=HOST       cross-compile to build programs to run on HOST [BUILD]
1469 _ACEOF
1470 fi
1471
1472 if test -n "$ac_init_help"; then
1473
1474   cat <<\_ACEOF
1475
1476 Optional Features:
1477   --disable-option-checking  ignore unrecognized --enable/--with options
1478   --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)
1479   --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
1480
1481 Screen locking options:
1482   --enable-locking        Compile in support for locking the display.
1483   --disable-locking       Do not allow locking at all.
1484
1485   --enable-root-passwd        Allow root passwd to unlock screen.
1486   --disable-root-passwd       Do not allow that.
1487
1488 Optional Packages:
1489   --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
1490   --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
1491
1492
1493 Installation options:
1494   --with-hackdir=DIR      Where to install the hundreds of demo executables.
1495                           Default: `PREFIX/libexec/xscreensaver/'
1496   --with-configdir=DIR    Where to install the data files that describe each
1497                           of the display modes to the GUI.
1498                           Default: `PREFIX/share/xscreensaver/config/'
1499   --with-x-app-defaults=DIR
1500                            Where to install xscreensaver configuration file.
1501
1502   --with-dpms-ext         Include support for the DPMS extension.
1503   --with-xinerama-ext     Include support for the XINERAMA extension.
1504   --with-xinput-ext       Include support for the XInput extension.
1505   --with-xf86vmode-ext    Include support for XFree86 virtual screens.
1506   --with-xf86gamma-ext    Include support for XFree86 gamma fading.
1507   --with-randr-ext        Include support for the X Resize+Rotate extension.
1508   --with-proc-interrupts  Include support for consulting the /proc/interrupts
1509                           file to notice keyboard activity.
1510   --with-pam              Include support for PAM (Pluggable Auth Modules.)
1511   --with-pam-service-name NAME arg is the name of the PAM service that
1512                           xscreensaver will authenticate as.
1513   --with-kerberos         Include support for Kerberos authentication.
1514   --with-shadow           Include support for shadow password authentication.
1515   --with-passwd-helper    Include support for an external password
1516                           verification helper program.
1517   --with-login-manager    Put a "New Login" button on the unlock dialog that
1518                           runs a login manager like gdmflexiserver or kdmctl.
1519
1520 User interface options:
1521
1522   --with-gtk              Use the Gtk toolkit for the user interface.
1523   --with-motif            Use the Motif toolkit for the user interface
1524                           (no longer supported.)
1525
1526 Graphics options:
1527
1528   --with-gl               Build those demos which depend on OpenGL.
1529   --with-gle              Build those demos which depend on GLE
1530                           (the OpenGL "extrusion" library.)
1531   --with-pixbuf           Include support for the GDK-Pixbuf library in some
1532                           demos, which will make it possible for them to read
1533                           GIF, JPEG, and PNG files as well.
1534   --with-xpm              Include support for XPM files in some demos.
1535                           (Not needed if Pixbuf is used.)
1536   --with-jpeg             Include support for the JPEG library.
1537   --with-xshm-ext         Include support for the Shared Memory extension.
1538   --with-xdbe-ext         Include support for the DOUBLE-BUFFER extension.
1539   --with-readdisplay      Include support for the XReadDisplay extension.
1540   --with-image-directory  Arg is the default directory from which some demos
1541                           will choose random images to display.
1542   --with-text-file=FILE   By default, some demos may display this file.
1543   --with-browser=BROWSER  Specify the web browser used to show the help URL.
1544   --with-setuid-hacks     Allow some demos to be installed `setuid root'
1545                           (which is needed in order to ping other hosts.)
1546
1547
1548 Some influential environment variables:
1549   CC          C compiler command
1550   CFLAGS      C compiler flags
1551   LDFLAGS     linker flags, e.g. -L<lib dir> if you have libraries in a
1552               nonstandard directory <lib dir>
1553   LIBS        libraries to pass to the linker, e.g. -l<library>
1554   CPPFLAGS    C/C++/Objective C preprocessor flags, e.g. -I<include dir> if
1555               you have headers in a nonstandard directory <include dir>
1556   CPP         C preprocessor
1557   XMKMF       Path to xmkmf, Makefile generator for X Window System
1558
1559 Use these variables to override the choices made by `configure' or to help
1560 it to find libraries and programs with nonstandard names/locations.
1561
1562 _ACEOF
1563 ac_status=$?
1564 fi
1565
1566 if test "$ac_init_help" = "recursive"; then
1567   # If there are subdirs, report their specific --help.
1568   for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
1569     test -d "$ac_dir" ||
1570       { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } ||
1571       continue
1572     ac_builddir=.
1573
1574 case "$ac_dir" in
1575 .) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
1576 *)
1577   ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
1578   # A ".." for each directory in $ac_dir_suffix.
1579   ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
1580   case $ac_top_builddir_sub in
1581   "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
1582   *)  ac_top_build_prefix=$ac_top_builddir_sub/ ;;
1583   esac ;;
1584 esac
1585 ac_abs_top_builddir=$ac_pwd
1586 ac_abs_builddir=$ac_pwd$ac_dir_suffix
1587 # for backward compatibility:
1588 ac_top_builddir=$ac_top_build_prefix
1589
1590 case $srcdir in
1591   .)  # We are building in place.
1592     ac_srcdir=.
1593     ac_top_srcdir=$ac_top_builddir_sub
1594     ac_abs_top_srcdir=$ac_pwd ;;
1595   [\\/]* | ?:[\\/]* )  # Absolute name.
1596     ac_srcdir=$srcdir$ac_dir_suffix;
1597     ac_top_srcdir=$srcdir
1598     ac_abs_top_srcdir=$srcdir ;;
1599   *) # Relative name.
1600     ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
1601     ac_top_srcdir=$ac_top_build_prefix$srcdir
1602     ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
1603 esac
1604 ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
1605
1606     cd "$ac_dir" || { ac_status=$?; continue; }
1607     # Check for guested configure.
1608     if test -f "$ac_srcdir/configure.gnu"; then
1609       echo &&
1610       $SHELL "$ac_srcdir/configure.gnu" --help=recursive
1611     elif test -f "$ac_srcdir/configure"; then
1612       echo &&
1613       $SHELL "$ac_srcdir/configure" --help=recursive
1614     else
1615       $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
1616     fi || ac_status=$?
1617     cd "$ac_pwd" || { ac_status=$?; break; }
1618   done
1619 fi
1620
1621 test -n "$ac_init_help" && exit $ac_status
1622 if $ac_init_version; then
1623   cat <<\_ACEOF
1624 configure
1625 generated by GNU Autoconf 2.63
1626
1627 Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001,
1628 2002, 2003, 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc.
1629 This configure script is free software; the Free Software Foundation
1630 gives unlimited permission to copy, distribute and modify it.
1631 _ACEOF
1632   exit
1633 fi
1634 cat >config.log <<_ACEOF
1635 This file contains any messages produced by compilers while
1636 running configure, to aid debugging if configure makes a mistake.
1637
1638 It was created by $as_me, which was
1639 generated by GNU Autoconf 2.63.  Invocation command line was
1640
1641   $ $0 $@
1642
1643 _ACEOF
1644 exec 5>>config.log
1645 {
1646 cat <<_ASUNAME
1647 ## --------- ##
1648 ## Platform. ##
1649 ## --------- ##
1650
1651 hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
1652 uname -m = `(uname -m) 2>/dev/null || echo unknown`
1653 uname -r = `(uname -r) 2>/dev/null || echo unknown`
1654 uname -s = `(uname -s) 2>/dev/null || echo unknown`
1655 uname -v = `(uname -v) 2>/dev/null || echo unknown`
1656
1657 /usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
1658 /bin/uname -X     = `(/bin/uname -X) 2>/dev/null     || echo unknown`
1659
1660 /bin/arch              = `(/bin/arch) 2>/dev/null              || echo unknown`
1661 /usr/bin/arch -k       = `(/usr/bin/arch -k) 2>/dev/null       || echo unknown`
1662 /usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
1663 /usr/bin/hostinfo      = `(/usr/bin/hostinfo) 2>/dev/null      || echo unknown`
1664 /bin/machine           = `(/bin/machine) 2>/dev/null           || echo unknown`
1665 /usr/bin/oslevel       = `(/usr/bin/oslevel) 2>/dev/null       || echo unknown`
1666 /bin/universe          = `(/bin/universe) 2>/dev/null          || echo unknown`
1667
1668 _ASUNAME
1669
1670 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1671 for as_dir in $PATH
1672 do
1673   IFS=$as_save_IFS
1674   test -z "$as_dir" && as_dir=.
1675   $as_echo "PATH: $as_dir"
1676 done
1677 IFS=$as_save_IFS
1678
1679 } >&5
1680
1681 cat >&5 <<_ACEOF
1682
1683
1684 ## ----------- ##
1685 ## Core tests. ##
1686 ## ----------- ##
1687
1688 _ACEOF
1689
1690
1691 # Keep a trace of the command line.
1692 # Strip out --no-create and --no-recursion so they do not pile up.
1693 # Strip out --silent because we don't want to record it for future runs.
1694 # Also quote any args containing shell meta-characters.
1695 # Make two passes to allow for proper duplicate-argument suppression.
1696 ac_configure_args=
1697 ac_configure_args0=
1698 ac_configure_args1=
1699 ac_must_keep_next=false
1700 for ac_pass in 1 2
1701 do
1702   for ac_arg
1703   do
1704     case $ac_arg in
1705     -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
1706     -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1707     | -silent | --silent | --silen | --sile | --sil)
1708       continue ;;
1709     *\'*)
1710       ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
1711     esac
1712     case $ac_pass in
1713     1) ac_configure_args0="$ac_configure_args0 '$ac_arg'" ;;
1714     2)
1715       ac_configure_args1="$ac_configure_args1 '$ac_arg'"
1716       if test $ac_must_keep_next = true; then
1717         ac_must_keep_next=false # Got value, back to normal.
1718       else
1719         case $ac_arg in
1720           *=* | --config-cache | -C | -disable-* | --disable-* \
1721           | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
1722           | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
1723           | -with-* | --with-* | -without-* | --without-* | --x)
1724             case "$ac_configure_args0 " in
1725               "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
1726             esac
1727             ;;
1728           -* ) ac_must_keep_next=true ;;
1729         esac
1730       fi
1731       ac_configure_args="$ac_configure_args '$ac_arg'"
1732       ;;
1733     esac
1734   done
1735 done
1736 $as_unset ac_configure_args0 || test "${ac_configure_args0+set}" != set || { ac_configure_args0=; export ac_configure_args0; }
1737 $as_unset ac_configure_args1 || test "${ac_configure_args1+set}" != set || { ac_configure_args1=; export ac_configure_args1; }
1738
1739 # When interrupted or exit'd, cleanup temporary files, and complete
1740 # config.log.  We remove comments because anyway the quotes in there
1741 # would cause problems or look ugly.
1742 # WARNING: Use '\'' to represent an apostrophe within the trap.
1743 # WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug.
1744 trap 'exit_status=$?
1745   # Save into config.log some information that might help in debugging.
1746   {
1747     echo
1748
1749     cat <<\_ASBOX
1750 ## ---------------- ##
1751 ## Cache variables. ##
1752 ## ---------------- ##
1753 _ASBOX
1754     echo
1755     # The following way of writing the cache mishandles newlines in values,
1756 (
1757   for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do
1758     eval ac_val=\$$ac_var
1759     case $ac_val in #(
1760     *${as_nl}*)
1761       case $ac_var in #(
1762       *_cv_*) { $as_echo "$as_me:$LINENO: WARNING: cache variable $ac_var contains a newline" >&5
1763 $as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
1764       esac
1765       case $ac_var in #(
1766       _ | IFS | as_nl) ;; #(
1767       BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
1768       *) $as_unset $ac_var ;;
1769       esac ;;
1770     esac
1771   done
1772   (set) 2>&1 |
1773     case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #(
1774     *${as_nl}ac_space=\ *)
1775       sed -n \
1776         "s/'\''/'\''\\\\'\'''\''/g;
1777           s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p"
1778       ;; #(
1779     *)
1780       sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
1781       ;;
1782     esac |
1783     sort
1784 )
1785     echo
1786
1787     cat <<\_ASBOX
1788 ## ----------------- ##
1789 ## Output variables. ##
1790 ## ----------------- ##
1791 _ASBOX
1792     echo
1793     for ac_var in $ac_subst_vars
1794     do
1795       eval ac_val=\$$ac_var
1796       case $ac_val in
1797       *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
1798       esac
1799       $as_echo "$ac_var='\''$ac_val'\''"
1800     done | sort
1801     echo
1802
1803     if test -n "$ac_subst_files"; then
1804       cat <<\_ASBOX
1805 ## ------------------- ##
1806 ## File substitutions. ##
1807 ## ------------------- ##
1808 _ASBOX
1809       echo
1810       for ac_var in $ac_subst_files
1811       do
1812         eval ac_val=\$$ac_var
1813         case $ac_val in
1814         *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
1815         esac
1816         $as_echo "$ac_var='\''$ac_val'\''"
1817       done | sort
1818       echo
1819     fi
1820
1821     if test -s confdefs.h; then
1822       cat <<\_ASBOX
1823 ## ----------- ##
1824 ## confdefs.h. ##
1825 ## ----------- ##
1826 _ASBOX
1827       echo
1828       cat confdefs.h
1829       echo
1830     fi
1831     test "$ac_signal" != 0 &&
1832       $as_echo "$as_me: caught signal $ac_signal"
1833     $as_echo "$as_me: exit $exit_status"
1834   } >&5
1835   rm -f core *.core core.conftest.* &&
1836     rm -f -r conftest* confdefs* conf$$* $ac_clean_files &&
1837     exit $exit_status
1838 ' 0
1839 for ac_signal in 1 2 13 15; do
1840   trap 'ac_signal='$ac_signal'; { (exit 1); exit 1; }' $ac_signal
1841 done
1842 ac_signal=0
1843
1844 # confdefs.h avoids OS command line length limits that DEFS can exceed.
1845 rm -f -r conftest* confdefs.h
1846
1847 # Predefined preprocessor variables.
1848
1849 cat >>confdefs.h <<_ACEOF
1850 #define PACKAGE_NAME "$PACKAGE_NAME"
1851 _ACEOF
1852
1853
1854 cat >>confdefs.h <<_ACEOF
1855 #define PACKAGE_TARNAME "$PACKAGE_TARNAME"
1856 _ACEOF
1857
1858
1859 cat >>confdefs.h <<_ACEOF
1860 #define PACKAGE_VERSION "$PACKAGE_VERSION"
1861 _ACEOF
1862
1863
1864 cat >>confdefs.h <<_ACEOF
1865 #define PACKAGE_STRING "$PACKAGE_STRING"
1866 _ACEOF
1867
1868
1869 cat >>confdefs.h <<_ACEOF
1870 #define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
1871 _ACEOF
1872
1873
1874 # Let the site file select an alternate cache file if it wants to.
1875 # Prefer an explicitly selected file to automatically selected ones.
1876 ac_site_file1=NONE
1877 ac_site_file2=NONE
1878 if test -n "$CONFIG_SITE"; then
1879   ac_site_file1=$CONFIG_SITE
1880 elif test "x$prefix" != xNONE; then
1881   ac_site_file1=$prefix/share/config.site
1882   ac_site_file2=$prefix/etc/config.site
1883 else
1884   ac_site_file1=$ac_default_prefix/share/config.site
1885   ac_site_file2=$ac_default_prefix/etc/config.site
1886 fi
1887 for ac_site_file in "$ac_site_file1" "$ac_site_file2"
1888 do
1889   test "x$ac_site_file" = xNONE && continue
1890   if test -r "$ac_site_file"; then
1891     { $as_echo "$as_me:$LINENO: loading site script $ac_site_file" >&5
1892 $as_echo "$as_me: loading site script $ac_site_file" >&6;}
1893     sed 's/^/| /' "$ac_site_file" >&5
1894     . "$ac_site_file"
1895   fi
1896 done
1897
1898 if test -r "$cache_file"; then
1899   # Some versions of bash will fail to source /dev/null (special
1900   # files actually), so we avoid doing that.
1901   if test -f "$cache_file"; then
1902     { $as_echo "$as_me:$LINENO: loading cache $cache_file" >&5
1903 $as_echo "$as_me: loading cache $cache_file" >&6;}
1904     case $cache_file in
1905       [\\/]* | ?:[\\/]* ) . "$cache_file";;
1906       *)                      . "./$cache_file";;
1907     esac
1908   fi
1909 else
1910   { $as_echo "$as_me:$LINENO: creating cache $cache_file" >&5
1911 $as_echo "$as_me: creating cache $cache_file" >&6;}
1912   >$cache_file
1913 fi
1914
1915 # Check that the precious variables saved in the cache have kept the same
1916 # value.
1917 ac_cache_corrupted=false
1918 for ac_var in $ac_precious_vars; do
1919   eval ac_old_set=\$ac_cv_env_${ac_var}_set
1920   eval ac_new_set=\$ac_env_${ac_var}_set
1921   eval ac_old_val=\$ac_cv_env_${ac_var}_value
1922   eval ac_new_val=\$ac_env_${ac_var}_value
1923   case $ac_old_set,$ac_new_set in
1924     set,)
1925       { $as_echo "$as_me:$LINENO: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
1926 $as_echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
1927       ac_cache_corrupted=: ;;
1928     ,set)
1929       { $as_echo "$as_me:$LINENO: error: \`$ac_var' was not set in the previous run" >&5
1930 $as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
1931       ac_cache_corrupted=: ;;
1932     ,);;
1933     *)
1934       if test "x$ac_old_val" != "x$ac_new_val"; then
1935         # differences in whitespace do not lead to failure.
1936         ac_old_val_w=`echo x $ac_old_val`
1937         ac_new_val_w=`echo x $ac_new_val`
1938         if test "$ac_old_val_w" != "$ac_new_val_w"; then
1939           { $as_echo "$as_me:$LINENO: error: \`$ac_var' has changed since the previous run:" >&5
1940 $as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
1941           ac_cache_corrupted=:
1942         else
1943           { $as_echo "$as_me:$LINENO: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5
1944 $as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;}
1945           eval $ac_var=\$ac_old_val
1946         fi
1947         { $as_echo "$as_me:$LINENO:   former value:  \`$ac_old_val'" >&5
1948 $as_echo "$as_me:   former value:  \`$ac_old_val'" >&2;}
1949         { $as_echo "$as_me:$LINENO:   current value: \`$ac_new_val'" >&5
1950 $as_echo "$as_me:   current value: \`$ac_new_val'" >&2;}
1951       fi;;
1952   esac
1953   # Pass precious variables to config.status.
1954   if test "$ac_new_set" = set; then
1955     case $ac_new_val in
1956     *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
1957     *) ac_arg=$ac_var=$ac_new_val ;;
1958     esac
1959     case " $ac_configure_args " in
1960       *" '$ac_arg' "*) ;; # Avoid dups.  Use of quotes ensures accuracy.
1961       *) ac_configure_args="$ac_configure_args '$ac_arg'" ;;
1962     esac
1963   fi
1964 done
1965 if $ac_cache_corrupted; then
1966   { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5
1967 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
1968   { $as_echo "$as_me:$LINENO: error: changes in the environment can compromise the build" >&5
1969 $as_echo "$as_me: error: changes in the environment can compromise the build" >&2;}
1970   { { $as_echo "$as_me:$LINENO: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&5
1971 $as_echo "$as_me: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&2;}
1972    { (exit 1); exit 1; }; }
1973 fi
1974
1975
1976
1977
1978
1979
1980
1981
1982
1983
1984
1985
1986
1987
1988
1989
1990
1991 ac_ext=c
1992 ac_cpp='$CPP $CPPFLAGS'
1993 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
1994 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
1995 ac_compiler_gnu=$ac_cv_c_compiler_gnu
1996
1997
1998 ac_config_headers="$ac_config_headers config.h"
1999
2000
2001 echo "current directory: `pwd`"
2002 echo "command line was: $0 $@"
2003
2004 ###############################################################################
2005 #
2006 #       Autoheader stuff
2007 #
2008 ###############################################################################
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019 # This only ever existed in X11R4 and X11R5.
2020 #AH_TEMPLATE([HAVE_XIDLE_EXTENSION],
2021 #           [Define this if you have the XIDLE extension installed. If you
2022 #           have the XIDLE extension, this is recommended.  (You have this
2023 #           extension if the file /usr/include/X11/extensions/xidle.h
2024 #           exists.) Turning on this flag lets XScreenSaver work better with
2025 #           servers which support this extension; but it will still work
2026 #           with servers which do not suport it, so it's a good idea to
2027 #           compile in support for it if you can.])
2028
2029 # Using this extension will crash your X server and make fading not work.
2030 #AH_TEMPLATE([HAVE_MIT_SAVER_EXTENSION],
2031 #           [Define this if you have the MIT-SCREEN-SAVER extension
2032 #            installed.  See the caveats about this extension, above.
2033 #            (It's available if /usr/include/X11/extensions/scrnsaver.h
2034 #            exists.)])
2035
2036 # This only ever existed on SGI hardware.
2037 #AH_TEMPLATE([HAVE_SGI_SAVER_EXTENSION],
2038 #           [Define this if you have the SGI SCREEN_SAVER extension.  This is
2039 #           standard on Irix systems, and not available elsewhere.])
2040
2041 # This only ever existed on SGI hardware.
2042 #AH_TEMPLATE([HAVE_SGI_VC_EXTENSION],
2043 #           [Define this if you have the SGI-VIDEO-CONTROL extension.  This
2044 #           is standard on Irix systems, and not available elsewhere.])
2045
2046
2047
2048
2049
2050
2051
2052
2053
2054
2055
2056
2057
2058
2059
2060
2061
2062
2063
2064
2065
2066
2067
2068
2069
2070
2071
2072
2073
2074
2075
2076
2077
2078
2079
2080
2081
2082
2083
2084
2085
2086
2087
2088
2089
2090
2091
2092
2093
2094
2095
2096
2097
2098
2099
2100
2101
2102
2103
2104
2105
2106
2107
2108
2109
2110
2111
2112
2113
2114
2115
2116
2117
2118
2119
2120
2121
2122
2123
2124
2125
2126
2127
2128
2129
2130
2131
2132
2133
2134
2135
2136
2137
2138
2139
2140
2141
2142
2143
2144
2145
2146
2147
2148
2149
2150
2151
2152
2153
2154
2155
2156
2157
2158
2159
2160
2161
2162
2163
2164
2165
2166
2167
2168
2169
2170
2171
2172
2173
2174
2175
2176
2177
2178
2179
2180
2181
2182
2183
2184
2185
2186
2187
2188
2189
2190
2191
2192
2193
2194
2195
2196
2197
2198
2199
2200
2201 # After checking to see that --srcdir is correct (which AC_INIT does)
2202 # check for some random other files that come later in the tar file,
2203 # to make sure everything is here.
2204 #
2205 for d in driver utils hacks hacks/glx ; do
2206   f=$srcdir/$d/Makefile.in
2207   if test \! -r $f ; then
2208     echo ""
2209     echo "ERROR: The package is incomplete: $f does not exist."
2210     echo "       This probably means that your download was truncated."
2211     echo ""
2212     exit 1
2213   fi
2214 done
2215
2216 ###############################################################################
2217 #
2218 #       Function to figure out how to run the compiler.
2219 #
2220 ###############################################################################
2221
2222
2223
2224
2225 ###############################################################################
2226 #
2227 #       Check for availability of various gcc command-line options.
2228 #
2229 ###############################################################################
2230
2231
2232
2233
2234
2235
2236
2237 # Need to disable Objective C extensions in ANSI C on MacOS X to work
2238 # around an Apple-specific gcc bug.
2239 #
2240
2241
2242 ###############################################################################
2243 #
2244 #       Function to figure out how to disable // comments in ANSI C code.
2245 #
2246 #       (With recent gcc, this is done with "-std=c89".  With older gcc, this
2247 #       is done by passing "-lang-c89" to cpp, by passing "-Wp,-lang-c89" to
2248 #       gcc.  Old gcc doesn't support -std, and new gcc doesn't support -lang.
2249 #       so much for compatibility!)
2250 #
2251 #       UPDATE: apparently there is NO WAY to tell gcc 3.2.2 to require that
2252 #       declarations preceed statements, without resorting to "-pedantic".
2253 #       This means that there is no way to get gcc3 to issue warnings that
2254 #       ensure that your code complies with the ANSI/ISO C89 standard, without
2255 #       also drowning in totally useless warnings.  Thank you master may I
2256 #       have another.
2257 #
2258 #       So, I give up, let's just use -pedantic.
2259 #
2260 ###############################################################################
2261
2262
2263
2264
2265
2266
2267 ###############################################################################
2268 #
2269 #       Function to figure out how to create directory trees.
2270 #
2271 ###############################################################################
2272
2273
2274
2275
2276 ###############################################################################
2277 #
2278 #       Function to check whether gettimeofday() exists, and how to call it.
2279 #       This may define HAVE_GETTIMEOFDAY and GETTIMEOFDAY_TWO_ARGS.
2280 #
2281 ###############################################################################
2282
2283
2284
2285
2286 ###############################################################################
2287 #
2288 #       Function to find perl5 (defines PERL and PERL_VERSION.)
2289 #
2290 ###############################################################################
2291
2292 # M4 sucks!!  perl sucks too!!
2293
2294 perl_version_cmd='print $]'
2295
2296
2297
2298
2299
2300 ###############################################################################
2301 #
2302 #       Function to demand "bc".  Losers.
2303 #
2304 ###############################################################################
2305
2306
2307
2308 ###############################################################################
2309 #
2310 #       Functions to check how to do ICMP PING requests.
2311 #
2312 ###############################################################################
2313
2314
2315
2316
2317
2318
2319 ###############################################################################
2320 #
2321 #       Functions to check for various X11 crap.
2322 #
2323 ###############################################################################
2324
2325 # Try and find the app-defaults directory.
2326 # It sucks that autoconf doesn't do this already...
2327 #
2328
2329
2330 ###############################################################################
2331 #
2332 #       Handle the --with-x-app-defaults option HERE
2333 #
2334 ###############################################################################
2335
2336
2337 # Check whether --with-x-app-defaults was given.
2338 if test "${with_x_app_defaults+set}" = set; then
2339   withval=$with_x_app_defaults; ac_cv_x_app_defaults="$withval"
2340 else
2341   eval ac_x_app_defaults="$withval"
2342 fi
2343
2344
2345
2346
2347
2348
2349
2350
2351
2352
2353
2354 # Random special-cases for X on certain pathological OSes.
2355 # You know who you are.
2356 #
2357
2358
2359
2360
2361 ###############################################################################
2362 #
2363 #       Some utility functions to make checking for X things easier.
2364 #
2365 ###############################################################################
2366
2367 # Like AC_CHECK_HEADER, but it uses the already-computed -I directories.
2368 #
2369
2370
2371 # Like AC_EGREP_HEADER, but it uses the already-computed -I directories.
2372 #
2373
2374
2375 # Like AC_TRY_COMPILE, but it uses the already-computed -I directories.
2376 #
2377
2378
2379
2380 # Like AC_CHECK_LIB, but it uses the already-computed -I and -L directories.
2381 # Use this sparingly; it probably doesn't work very well on X programs.
2382 #
2383
2384
2385 # Like AC_TRY_RUN, but it uses the already-computed -I directories.
2386 # (But not the -L directories!)
2387 #
2388
2389
2390
2391
2392 # Usage: HANDLE_X_PATH_ARG([variable_name],
2393 #                          [--command-line-option],
2394 #                          [descriptive string])
2395 #
2396 # All of the --with options take three forms:
2397 #
2398 #   --with-foo (or --with-foo=yes)
2399 #   --without-foo (or --with-foo=no)
2400 #   --with-foo=/DIR
2401 #
2402 # This function, HANDLE_X_PATH_ARG, deals with the /DIR case.  When it sees
2403 # a directory (string beginning with a slash) it checks to see whether
2404 # /DIR/include and /DIR/lib exist, and adds them to $X_CFLAGS and $X_LIBS
2405 # as appropriate.
2406 #
2407
2408
2409
2410
2411 ###############################################################################
2412 ###############################################################################
2413 #
2414 #       End of function definitions.  Now start actually executing stuff.
2415 #
2416 ###############################################################################
2417 ###############################################################################
2418
2419 # WTF!  autoconf emits this *way* too late.  Do it earlier.
2420 test "x$prefix" = xNONE && prefix=$ac_default_prefix
2421 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
2422
2423
2424 # random compiler setup
2425 ac_aux_dir=
2426 for ac_dir in "$srcdir" "$srcdir/.." "$srcdir/../.."; do
2427   if test -f "$ac_dir/install-sh"; then
2428     ac_aux_dir=$ac_dir
2429     ac_install_sh="$ac_aux_dir/install-sh -c"
2430     break
2431   elif test -f "$ac_dir/install.sh"; then
2432     ac_aux_dir=$ac_dir
2433     ac_install_sh="$ac_aux_dir/install.sh -c"
2434     break
2435   elif test -f "$ac_dir/shtool"; then
2436     ac_aux_dir=$ac_dir
2437     ac_install_sh="$ac_aux_dir/shtool install -c"
2438     break
2439   fi
2440 done
2441 if test -z "$ac_aux_dir"; then
2442   { { $as_echo "$as_me:$LINENO: error: cannot find install-sh or install.sh in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" >&5
2443 $as_echo "$as_me: error: cannot find install-sh or install.sh in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" >&2;}
2444    { (exit 1); exit 1; }; }
2445 fi
2446
2447 # These three variables are undocumented and unsupported,
2448 # and are intended to be withdrawn in a future Autoconf release.
2449 # They can cause serious problems if a builder's source tree is in a directory
2450 # whose full name contains unusual characters.
2451 ac_config_guess="$SHELL $ac_aux_dir/config.guess"  # Please don't use this var.
2452 ac_config_sub="$SHELL $ac_aux_dir/config.sub"  # Please don't use this var.
2453 ac_configure="$SHELL $ac_aux_dir/configure"  # Please don't use this var.
2454
2455
2456 # Make sure we can run config.sub.
2457 $SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 ||
2458   { { $as_echo "$as_me:$LINENO: error: cannot run $SHELL $ac_aux_dir/config.sub" >&5
2459 $as_echo "$as_me: error: cannot run $SHELL $ac_aux_dir/config.sub" >&2;}
2460    { (exit 1); exit 1; }; }
2461
2462 { $as_echo "$as_me:$LINENO: checking build system type" >&5
2463 $as_echo_n "checking build system type... " >&6; }
2464 if test "${ac_cv_build+set}" = set; then
2465   $as_echo_n "(cached) " >&6
2466 else
2467   ac_build_alias=$build_alias
2468 test "x$ac_build_alias" = x &&
2469   ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"`
2470 test "x$ac_build_alias" = x &&
2471   { { $as_echo "$as_me:$LINENO: error: cannot guess build type; you must specify one" >&5
2472 $as_echo "$as_me: error: cannot guess build type; you must specify one" >&2;}
2473    { (exit 1); exit 1; }; }
2474 ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` ||
2475   { { $as_echo "$as_me:$LINENO: error: $SHELL $ac_aux_dir/config.sub $ac_build_alias failed" >&5
2476 $as_echo "$as_me: error: $SHELL $ac_aux_dir/config.sub $ac_build_alias failed" >&2;}
2477    { (exit 1); exit 1; }; }
2478
2479 fi
2480 { $as_echo "$as_me:$LINENO: result: $ac_cv_build" >&5
2481 $as_echo "$ac_cv_build" >&6; }
2482 case $ac_cv_build in
2483 *-*-*) ;;
2484 *) { { $as_echo "$as_me:$LINENO: error: invalid value of canonical build" >&5
2485 $as_echo "$as_me: error: invalid value of canonical build" >&2;}
2486    { (exit 1); exit 1; }; };;
2487 esac
2488 build=$ac_cv_build
2489 ac_save_IFS=$IFS; IFS='-'
2490 set x $ac_cv_build
2491 shift
2492 build_cpu=$1
2493 build_vendor=$2
2494 shift; shift
2495 # Remember, the first character of IFS is used to create $*,
2496 # except with old shells:
2497 build_os=$*
2498 IFS=$ac_save_IFS
2499 case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac
2500
2501
2502 { $as_echo "$as_me:$LINENO: checking host system type" >&5
2503 $as_echo_n "checking host system type... " >&6; }
2504 if test "${ac_cv_host+set}" = set; then
2505   $as_echo_n "(cached) " >&6
2506 else
2507   if test "x$host_alias" = x; then
2508   ac_cv_host=$ac_cv_build
2509 else
2510   ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` ||
2511     { { $as_echo "$as_me:$LINENO: error: $SHELL $ac_aux_dir/config.sub $host_alias failed" >&5
2512 $as_echo "$as_me: error: $SHELL $ac_aux_dir/config.sub $host_alias failed" >&2;}
2513    { (exit 1); exit 1; }; }
2514 fi
2515
2516 fi
2517 { $as_echo "$as_me:$LINENO: result: $ac_cv_host" >&5
2518 $as_echo "$ac_cv_host" >&6; }
2519 case $ac_cv_host in
2520 *-*-*) ;;
2521 *) { { $as_echo "$as_me:$LINENO: error: invalid value of canonical host" >&5
2522 $as_echo "$as_me: error: invalid value of canonical host" >&2;}
2523    { (exit 1); exit 1; }; };;
2524 esac
2525 host=$ac_cv_host
2526 ac_save_IFS=$IFS; IFS='-'
2527 set x $ac_cv_host
2528 shift
2529 host_cpu=$1
2530 host_vendor=$2
2531 shift; shift
2532 # Remember, the first character of IFS is used to create $*,
2533 # except with old shells:
2534 host_os=$*
2535 IFS=$ac_save_IFS
2536 case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac
2537
2538
2539
2540 ac_ext=c
2541 ac_cpp='$CPP $CPPFLAGS'
2542 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2543 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2544 ac_compiler_gnu=$ac_cv_c_compiler_gnu
2545 if test -n "$ac_tool_prefix"; then
2546   # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
2547 set dummy ${ac_tool_prefix}gcc; ac_word=$2
2548 { $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
2549 $as_echo_n "checking for $ac_word... " >&6; }
2550 if test "${ac_cv_prog_CC+set}" = set; then
2551   $as_echo_n "(cached) " >&6
2552 else
2553   if test -n "$CC"; then
2554   ac_cv_prog_CC="$CC" # Let the user override the test.
2555 else
2556 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2557 for as_dir in $PATH
2558 do
2559   IFS=$as_save_IFS
2560   test -z "$as_dir" && as_dir=.
2561   for ac_exec_ext in '' $ac_executable_extensions; do
2562   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
2563     ac_cv_prog_CC="${ac_tool_prefix}gcc"
2564     $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
2565     break 2
2566   fi
2567 done
2568 done
2569 IFS=$as_save_IFS
2570
2571 fi
2572 fi
2573 CC=$ac_cv_prog_CC
2574 if test -n "$CC"; then
2575   { $as_echo "$as_me:$LINENO: result: $CC" >&5
2576 $as_echo "$CC" >&6; }
2577 else
2578   { $as_echo "$as_me:$LINENO: result: no" >&5
2579 $as_echo "no" >&6; }
2580 fi
2581
2582
2583 fi
2584 if test -z "$ac_cv_prog_CC"; then
2585   ac_ct_CC=$CC
2586   # Extract the first word of "gcc", so it can be a program name with args.
2587 set dummy gcc; ac_word=$2
2588 { $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
2589 $as_echo_n "checking for $ac_word... " >&6; }
2590 if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
2591   $as_echo_n "(cached) " >&6
2592 else
2593   if test -n "$ac_ct_CC"; then
2594   ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
2595 else
2596 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2597 for as_dir in $PATH
2598 do
2599   IFS=$as_save_IFS
2600   test -z "$as_dir" && as_dir=.
2601   for ac_exec_ext in '' $ac_executable_extensions; do
2602   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
2603     ac_cv_prog_ac_ct_CC="gcc"
2604     $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
2605     break 2
2606   fi
2607 done
2608 done
2609 IFS=$as_save_IFS
2610
2611 fi
2612 fi
2613 ac_ct_CC=$ac_cv_prog_ac_ct_CC
2614 if test -n "$ac_ct_CC"; then
2615   { $as_echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
2616 $as_echo "$ac_ct_CC" >&6; }
2617 else
2618   { $as_echo "$as_me:$LINENO: result: no" >&5
2619 $as_echo "no" >&6; }
2620 fi
2621
2622   if test "x$ac_ct_CC" = x; then
2623     CC=""
2624   else
2625     case $cross_compiling:$ac_tool_warned in
2626 yes:)
2627 { $as_echo "$as_me:$LINENO: WARNING: using cross tools not prefixed with host triplet" >&5
2628 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
2629 ac_tool_warned=yes ;;
2630 esac
2631     CC=$ac_ct_CC
2632   fi
2633 else
2634   CC="$ac_cv_prog_CC"
2635 fi
2636
2637 if test -z "$CC"; then
2638           if test -n "$ac_tool_prefix"; then
2639     # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args.
2640 set dummy ${ac_tool_prefix}cc; ac_word=$2
2641 { $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
2642 $as_echo_n "checking for $ac_word... " >&6; }
2643 if test "${ac_cv_prog_CC+set}" = set; then
2644   $as_echo_n "(cached) " >&6
2645 else
2646   if test -n "$CC"; then
2647   ac_cv_prog_CC="$CC" # Let the user override the test.
2648 else
2649 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2650 for as_dir in $PATH
2651 do
2652   IFS=$as_save_IFS
2653   test -z "$as_dir" && as_dir=.
2654   for ac_exec_ext in '' $ac_executable_extensions; do
2655   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
2656     ac_cv_prog_CC="${ac_tool_prefix}cc"
2657     $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
2658     break 2
2659   fi
2660 done
2661 done
2662 IFS=$as_save_IFS
2663
2664 fi
2665 fi
2666 CC=$ac_cv_prog_CC
2667 if test -n "$CC"; then
2668   { $as_echo "$as_me:$LINENO: result: $CC" >&5
2669 $as_echo "$CC" >&6; }
2670 else
2671   { $as_echo "$as_me:$LINENO: result: no" >&5
2672 $as_echo "no" >&6; }
2673 fi
2674
2675
2676   fi
2677 fi
2678 if test -z "$CC"; then
2679   # Extract the first word of "cc", so it can be a program name with args.
2680 set dummy cc; ac_word=$2
2681 { $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
2682 $as_echo_n "checking for $ac_word... " >&6; }
2683 if test "${ac_cv_prog_CC+set}" = set; then
2684   $as_echo_n "(cached) " >&6
2685 else
2686   if test -n "$CC"; then
2687   ac_cv_prog_CC="$CC" # Let the user override the test.
2688 else
2689   ac_prog_rejected=no
2690 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2691 for as_dir in $PATH
2692 do
2693   IFS=$as_save_IFS
2694   test -z "$as_dir" && as_dir=.
2695   for ac_exec_ext in '' $ac_executable_extensions; do
2696   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
2697     if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
2698        ac_prog_rejected=yes
2699        continue
2700      fi
2701     ac_cv_prog_CC="cc"
2702     $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
2703     break 2
2704   fi
2705 done
2706 done
2707 IFS=$as_save_IFS
2708
2709 if test $ac_prog_rejected = yes; then
2710   # We found a bogon in the path, so make sure we never use it.
2711   set dummy $ac_cv_prog_CC
2712   shift
2713   if test $# != 0; then
2714     # We chose a different compiler from the bogus one.
2715     # However, it has the same basename, so the bogon will be chosen
2716     # first if we set CC to just the basename; use the full file name.
2717     shift
2718     ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@"
2719   fi
2720 fi
2721 fi
2722 fi
2723 CC=$ac_cv_prog_CC
2724 if test -n "$CC"; then
2725   { $as_echo "$as_me:$LINENO: result: $CC" >&5
2726 $as_echo "$CC" >&6; }
2727 else
2728   { $as_echo "$as_me:$LINENO: result: no" >&5
2729 $as_echo "no" >&6; }
2730 fi
2731
2732
2733 fi
2734 if test -z "$CC"; then
2735   if test -n "$ac_tool_prefix"; then
2736   for ac_prog in cl.exe
2737   do
2738     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
2739 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
2740 { $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
2741 $as_echo_n "checking for $ac_word... " >&6; }
2742 if test "${ac_cv_prog_CC+set}" = set; then
2743   $as_echo_n "(cached) " >&6
2744 else
2745   if test -n "$CC"; then
2746   ac_cv_prog_CC="$CC" # Let the user override the test.
2747 else
2748 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2749 for as_dir in $PATH
2750 do
2751   IFS=$as_save_IFS
2752   test -z "$as_dir" && as_dir=.
2753   for ac_exec_ext in '' $ac_executable_extensions; do
2754   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
2755     ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
2756     $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
2757     break 2
2758   fi
2759 done
2760 done
2761 IFS=$as_save_IFS
2762
2763 fi
2764 fi
2765 CC=$ac_cv_prog_CC
2766 if test -n "$CC"; then
2767   { $as_echo "$as_me:$LINENO: result: $CC" >&5
2768 $as_echo "$CC" >&6; }
2769 else
2770   { $as_echo "$as_me:$LINENO: result: no" >&5
2771 $as_echo "no" >&6; }
2772 fi
2773
2774
2775     test -n "$CC" && break
2776   done
2777 fi
2778 if test -z "$CC"; then
2779   ac_ct_CC=$CC
2780   for ac_prog in cl.exe
2781 do
2782   # Extract the first word of "$ac_prog", so it can be a program name with args.
2783 set dummy $ac_prog; ac_word=$2
2784 { $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
2785 $as_echo_n "checking for $ac_word... " >&6; }
2786 if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
2787   $as_echo_n "(cached) " >&6
2788 else
2789   if test -n "$ac_ct_CC"; then
2790   ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
2791 else
2792 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2793 for as_dir in $PATH
2794 do
2795   IFS=$as_save_IFS
2796   test -z "$as_dir" && as_dir=.
2797   for ac_exec_ext in '' $ac_executable_extensions; do
2798   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
2799     ac_cv_prog_ac_ct_CC="$ac_prog"
2800     $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
2801     break 2
2802   fi
2803 done
2804 done
2805 IFS=$as_save_IFS
2806
2807 fi
2808 fi
2809 ac_ct_CC=$ac_cv_prog_ac_ct_CC
2810 if test -n "$ac_ct_CC"; then
2811   { $as_echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
2812 $as_echo "$ac_ct_CC" >&6; }
2813 else
2814   { $as_echo "$as_me:$LINENO: result: no" >&5
2815 $as_echo "no" >&6; }
2816 fi
2817
2818
2819   test -n "$ac_ct_CC" && break
2820 done
2821
2822   if test "x$ac_ct_CC" = x; then
2823     CC=""
2824   else
2825     case $cross_compiling:$ac_tool_warned in
2826 yes:)
2827 { $as_echo "$as_me:$LINENO: WARNING: using cross tools not prefixed with host triplet" >&5
2828 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
2829 ac_tool_warned=yes ;;
2830 esac
2831     CC=$ac_ct_CC
2832   fi
2833 fi
2834
2835 fi
2836
2837
2838 test -z "$CC" && { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5
2839 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2840 { { $as_echo "$as_me:$LINENO: error: no acceptable C compiler found in \$PATH
2841 See \`config.log' for more details." >&5
2842 $as_echo "$as_me: error: no acceptable C compiler found in \$PATH
2843 See \`config.log' for more details." >&2;}
2844    { (exit 1); exit 1; }; }; }
2845
2846 # Provide some information about the compiler.
2847 $as_echo "$as_me:$LINENO: checking for C compiler version" >&5
2848 set X $ac_compile
2849 ac_compiler=$2
2850 { (ac_try="$ac_compiler --version >&5"
2851 case "(($ac_try" in
2852   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2853   *) ac_try_echo=$ac_try;;
2854 esac
2855 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
2856 $as_echo "$ac_try_echo") >&5
2857   (eval "$ac_compiler --version >&5") 2>&5
2858   ac_status=$?
2859   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
2860   (exit $ac_status); }
2861 { (ac_try="$ac_compiler -v >&5"
2862 case "(($ac_try" in
2863   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2864   *) ac_try_echo=$ac_try;;
2865 esac
2866 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
2867 $as_echo "$ac_try_echo") >&5
2868   (eval "$ac_compiler -v >&5") 2>&5
2869   ac_status=$?
2870   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
2871   (exit $ac_status); }
2872 { (ac_try="$ac_compiler -V >&5"
2873 case "(($ac_try" in
2874   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2875   *) ac_try_echo=$ac_try;;
2876 esac
2877 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
2878 $as_echo "$ac_try_echo") >&5
2879   (eval "$ac_compiler -V >&5") 2>&5
2880   ac_status=$?
2881   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
2882   (exit $ac_status); }
2883
2884 cat >conftest.$ac_ext <<_ACEOF
2885 /* confdefs.h.  */
2886 _ACEOF
2887 cat confdefs.h >>conftest.$ac_ext
2888 cat >>conftest.$ac_ext <<_ACEOF
2889 /* end confdefs.h.  */
2890
2891 int
2892 main ()
2893 {
2894
2895   ;
2896   return 0;
2897 }
2898 _ACEOF
2899 ac_clean_files_save=$ac_clean_files
2900 ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out"
2901 # Try to create an executable without -o first, disregard a.out.
2902 # It will help us diagnose broken compilers, and finding out an intuition
2903 # of exeext.
2904 { $as_echo "$as_me:$LINENO: checking for C compiler default output file name" >&5
2905 $as_echo_n "checking for C compiler default output file name... " >&6; }
2906 ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
2907
2908 # The possible output files:
2909 ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*"
2910
2911 ac_rmfiles=
2912 for ac_file in $ac_files
2913 do
2914   case $ac_file in
2915     *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
2916     * ) ac_rmfiles="$ac_rmfiles $ac_file";;
2917   esac
2918 done
2919 rm -f $ac_rmfiles
2920
2921 if { (ac_try="$ac_link_default"
2922 case "(($ac_try" in
2923   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2924   *) ac_try_echo=$ac_try;;
2925 esac
2926 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
2927 $as_echo "$ac_try_echo") >&5
2928   (eval "$ac_link_default") 2>&5
2929   ac_status=$?
2930   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
2931   (exit $ac_status); }; then
2932   # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
2933 # So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
2934 # in a Makefile.  We should not override ac_cv_exeext if it was cached,
2935 # so that the user can short-circuit this test for compilers unknown to
2936 # Autoconf.
2937 for ac_file in $ac_files ''
2938 do
2939   test -f "$ac_file" || continue
2940   case $ac_file in
2941     *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj )
2942         ;;
2943     [ab].out )
2944         # We found the default executable, but exeext='' is most
2945         # certainly right.
2946         break;;
2947     *.* )
2948         if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no;
2949         then :; else
2950            ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
2951         fi
2952         # We set ac_cv_exeext here because the later test for it is not
2953         # safe: cross compilers may not add the suffix if given an `-o'
2954         # argument, so we may need to know it at that point already.
2955         # Even if this section looks crufty: it has the advantage of
2956         # actually working.
2957         break;;
2958     * )
2959         break;;
2960   esac
2961 done
2962 test "$ac_cv_exeext" = no && ac_cv_exeext=
2963
2964 else
2965   ac_file=''
2966 fi
2967
2968 { $as_echo "$as_me:$LINENO: result: $ac_file" >&5
2969 $as_echo "$ac_file" >&6; }
2970 if test -z "$ac_file"; then
2971   $as_echo "$as_me: failed program was:" >&5
2972 sed 's/^/| /' conftest.$ac_ext >&5
2973
2974 { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5
2975 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2976 { { $as_echo "$as_me:$LINENO: error: C compiler cannot create executables
2977 See \`config.log' for more details." >&5
2978 $as_echo "$as_me: error: C compiler cannot create executables
2979 See \`config.log' for more details." >&2;}
2980    { (exit 77); exit 77; }; }; }
2981 fi
2982
2983 ac_exeext=$ac_cv_exeext
2984
2985 # Check that the compiler produces executables we can run.  If not, either
2986 # the compiler is broken, or we cross compile.
2987 { $as_echo "$as_me:$LINENO: checking whether the C compiler works" >&5
2988 $as_echo_n "checking whether the C compiler works... " >&6; }
2989 # FIXME: These cross compiler hacks should be removed for Autoconf 3.0
2990 # If not cross compiling, check that we can run a simple program.
2991 if test "$cross_compiling" != yes; then
2992   if { ac_try='./$ac_file'
2993   { (case "(($ac_try" in
2994   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2995   *) ac_try_echo=$ac_try;;
2996 esac
2997 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
2998 $as_echo "$ac_try_echo") >&5
2999   (eval "$ac_try") 2>&5
3000   ac_status=$?
3001   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
3002   (exit $ac_status); }; }; then
3003     cross_compiling=no
3004   else
3005     if test "$cross_compiling" = maybe; then
3006         cross_compiling=yes
3007     else
3008         { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5
3009 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3010 { { $as_echo "$as_me:$LINENO: error: cannot run C compiled programs.
3011 If you meant to cross compile, use \`--host'.
3012 See \`config.log' for more details." >&5
3013 $as_echo "$as_me: error: cannot run C compiled programs.
3014 If you meant to cross compile, use \`--host'.
3015 See \`config.log' for more details." >&2;}
3016    { (exit 1); exit 1; }; }; }
3017     fi
3018   fi
3019 fi
3020 { $as_echo "$as_me:$LINENO: result: yes" >&5
3021 $as_echo "yes" >&6; }
3022
3023 rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out
3024 ac_clean_files=$ac_clean_files_save
3025 # Check that the compiler produces executables we can run.  If not, either
3026 # the compiler is broken, or we cross compile.
3027 { $as_echo "$as_me:$LINENO: checking whether we are cross compiling" >&5
3028 $as_echo_n "checking whether we are cross compiling... " >&6; }
3029 { $as_echo "$as_me:$LINENO: result: $cross_compiling" >&5
3030 $as_echo "$cross_compiling" >&6; }
3031
3032 { $as_echo "$as_me:$LINENO: checking for suffix of executables" >&5
3033 $as_echo_n "checking for suffix of executables... " >&6; }
3034 if { (ac_try="$ac_link"
3035 case "(($ac_try" in
3036   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3037   *) ac_try_echo=$ac_try;;
3038 esac
3039 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
3040 $as_echo "$ac_try_echo") >&5
3041   (eval "$ac_link") 2>&5
3042   ac_status=$?
3043   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
3044   (exit $ac_status); }; then
3045   # If both `conftest.exe' and `conftest' are `present' (well, observable)
3046 # catch `conftest.exe'.  For instance with Cygwin, `ls conftest' will
3047 # work properly (i.e., refer to `conftest.exe'), while it won't with
3048 # `rm'.
3049 for ac_file in conftest.exe conftest conftest.*; do
3050   test -f "$ac_file" || continue
3051   case $ac_file in
3052     *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
3053     *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
3054           break;;
3055     * ) break;;
3056   esac
3057 done
3058 else
3059   { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5
3060 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3061 { { $as_echo "$as_me:$LINENO: error: cannot compute suffix of executables: cannot compile and link
3062 See \`config.log' for more details." >&5
3063 $as_echo "$as_me: error: cannot compute suffix of executables: cannot compile and link
3064 See \`config.log' for more details." >&2;}
3065    { (exit 1); exit 1; }; }; }
3066 fi
3067
3068 rm -rf conftest$ac_cv_exeext
3069 { $as_echo "$as_me:$LINENO: result: $ac_cv_exeext" >&5
3070 $as_echo "$ac_cv_exeext" >&6; }
3071
3072 rm -rf conftest.$ac_ext
3073 EXEEXT=$ac_cv_exeext
3074 ac_exeext=$EXEEXT
3075 { $as_echo "$as_me:$LINENO: checking for suffix of object files" >&5
3076 $as_echo_n "checking for suffix of object files... " >&6; }
3077 if test "${ac_cv_objext+set}" = set; then
3078   $as_echo_n "(cached) " >&6
3079 else
3080   cat >conftest.$ac_ext <<_ACEOF
3081 /* confdefs.h.  */
3082 _ACEOF
3083 cat confdefs.h >>conftest.$ac_ext
3084 cat >>conftest.$ac_ext <<_ACEOF
3085 /* end confdefs.h.  */
3086
3087 int
3088 main ()
3089 {
3090
3091   ;
3092   return 0;
3093 }
3094 _ACEOF
3095 rm -rf conftest.o conftest.obj
3096 if { (ac_try="$ac_compile"
3097 case "(($ac_try" in
3098   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3099   *) ac_try_echo=$ac_try;;
3100 esac
3101 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
3102 $as_echo "$ac_try_echo") >&5
3103   (eval "$ac_compile") 2>&5
3104   ac_status=$?
3105   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
3106   (exit $ac_status); }; then
3107   for ac_file in conftest.o conftest.obj conftest.*; do
3108   test -f "$ac_file" || continue;
3109   case $ac_file in
3110     *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;;
3111     *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
3112        break;;
3113   esac
3114 done
3115 else
3116   $as_echo "$as_me: failed program was:" >&5
3117 sed 's/^/| /' conftest.$ac_ext >&5
3118
3119 { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5
3120 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3121 { { $as_echo "$as_me:$LINENO: error: cannot compute suffix of object files: cannot compile
3122 See \`config.log' for more details." >&5
3123 $as_echo "$as_me: error: cannot compute suffix of object files: cannot compile
3124 See \`config.log' for more details." >&2;}
3125    { (exit 1); exit 1; }; }; }
3126 fi
3127
3128 rm -rf conftest.$ac_cv_objext conftest.$ac_ext
3129 fi
3130 { $as_echo "$as_me:$LINENO: result: $ac_cv_objext" >&5
3131 $as_echo "$ac_cv_objext" >&6; }
3132 OBJEXT=$ac_cv_objext
3133 ac_objext=$OBJEXT
3134 { $as_echo "$as_me:$LINENO: checking whether we are using the GNU C compiler" >&5
3135 $as_echo_n "checking whether we are using the GNU C compiler... " >&6; }
3136 if test "${ac_cv_c_compiler_gnu+set}" = set; then
3137   $as_echo_n "(cached) " >&6
3138 else
3139   cat >conftest.$ac_ext <<_ACEOF
3140 /* confdefs.h.  */
3141 _ACEOF
3142 cat confdefs.h >>conftest.$ac_ext
3143 cat >>conftest.$ac_ext <<_ACEOF
3144 /* end confdefs.h.  */
3145
3146 int
3147 main ()
3148 {
3149 #ifndef __GNUC__
3150        choke me
3151 #endif
3152
3153   ;
3154   return 0;
3155 }
3156 _ACEOF
3157 rm -rf conftest.$ac_objext
3158 if { (ac_try="$ac_compile"
3159 case "(($ac_try" in
3160   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3161   *) ac_try_echo=$ac_try;;
3162 esac
3163 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
3164 $as_echo "$ac_try_echo") >&5
3165   (eval "$ac_compile") 2>conftest.er1
3166   ac_status=$?
3167   grep -v '^ *+' conftest.er1 >conftest.err
3168   rm -rf conftest.er1
3169   cat conftest.err >&5
3170   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
3171   (exit $ac_status); } && {
3172          test -z "$ac_c_werror_flag" ||
3173          test ! -s conftest.err
3174        } && test -s conftest.$ac_objext; then
3175   ac_compiler_gnu=yes
3176 else
3177   $as_echo "$as_me: failed program was:" >&5
3178 sed 's/^/| /' conftest.$ac_ext >&5
3179
3180         ac_compiler_gnu=no
3181 fi
3182
3183 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3184 ac_cv_c_compiler_gnu=$ac_compiler_gnu
3185
3186 fi
3187 { $as_echo "$as_me:$LINENO: result: $ac_cv_c_compiler_gnu" >&5
3188 $as_echo "$ac_cv_c_compiler_gnu" >&6; }
3189 if test $ac_compiler_gnu = yes; then
3190   GCC=yes
3191 else
3192   GCC=
3193 fi
3194 ac_test_CFLAGS=${CFLAGS+set}
3195 ac_save_CFLAGS=$CFLAGS
3196 { $as_echo "$as_me:$LINENO: checking whether $CC accepts -g" >&5
3197 $as_echo_n "checking whether $CC accepts -g... " >&6; }
3198 if test "${ac_cv_prog_cc_g+set}" = set; then
3199   $as_echo_n "(cached) " >&6
3200 else
3201   ac_save_c_werror_flag=$ac_c_werror_flag
3202    ac_c_werror_flag=yes
3203    ac_cv_prog_cc_g=no
3204    CFLAGS="-g"
3205    cat >conftest.$ac_ext <<_ACEOF
3206 /* confdefs.h.  */
3207 _ACEOF
3208 cat confdefs.h >>conftest.$ac_ext
3209 cat >>conftest.$ac_ext <<_ACEOF
3210 /* end confdefs.h.  */
3211
3212 int
3213 main ()
3214 {
3215
3216   ;
3217   return 0;
3218 }
3219 _ACEOF
3220 rm -rf conftest.$ac_objext
3221 if { (ac_try="$ac_compile"
3222 case "(($ac_try" in
3223   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3224   *) ac_try_echo=$ac_try;;
3225 esac
3226 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
3227 $as_echo "$ac_try_echo") >&5
3228   (eval "$ac_compile") 2>conftest.er1
3229   ac_status=$?
3230   grep -v '^ *+' conftest.er1 >conftest.err
3231   rm -rf conftest.er1
3232   cat conftest.err >&5
3233   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
3234   (exit $ac_status); } && {
3235          test -z "$ac_c_werror_flag" ||
3236          test ! -s conftest.err
3237        } && test -s conftest.$ac_objext; then
3238   ac_cv_prog_cc_g=yes
3239 else
3240   $as_echo "$as_me: failed program was:" >&5
3241 sed 's/^/| /' conftest.$ac_ext >&5
3242
3243         CFLAGS=""
3244       cat >conftest.$ac_ext <<_ACEOF
3245 /* confdefs.h.  */
3246 _ACEOF
3247 cat confdefs.h >>conftest.$ac_ext
3248 cat >>conftest.$ac_ext <<_ACEOF
3249 /* end confdefs.h.  */
3250
3251 int
3252 main ()
3253 {
3254
3255   ;
3256   return 0;
3257 }
3258 _ACEOF
3259 rm -rf conftest.$ac_objext
3260 if { (ac_try="$ac_compile"
3261 case "(($ac_try" in
3262   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3263   *) ac_try_echo=$ac_try;;
3264 esac
3265 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
3266 $as_echo "$ac_try_echo") >&5
3267   (eval "$ac_compile") 2>conftest.er1
3268   ac_status=$?
3269   grep -v '^ *+' conftest.er1 >conftest.err
3270   rm -rf conftest.er1
3271   cat conftest.err >&5
3272   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
3273   (exit $ac_status); } && {
3274          test -z "$ac_c_werror_flag" ||
3275          test ! -s conftest.err
3276        } && test -s conftest.$ac_objext; then
3277   :
3278 else
3279   $as_echo "$as_me: failed program was:" >&5
3280 sed 's/^/| /' conftest.$ac_ext >&5
3281
3282         ac_c_werror_flag=$ac_save_c_werror_flag
3283          CFLAGS="-g"
3284          cat >conftest.$ac_ext <<_ACEOF
3285 /* confdefs.h.  */
3286 _ACEOF
3287 cat confdefs.h >>conftest.$ac_ext
3288 cat >>conftest.$ac_ext <<_ACEOF
3289 /* end confdefs.h.  */
3290
3291 int
3292 main ()
3293 {
3294
3295   ;
3296   return 0;
3297 }
3298 _ACEOF
3299 rm -rf conftest.$ac_objext
3300 if { (ac_try="$ac_compile"
3301 case "(($ac_try" in
3302   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3303   *) ac_try_echo=$ac_try;;
3304 esac
3305 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
3306 $as_echo "$ac_try_echo") >&5
3307   (eval "$ac_compile") 2>conftest.er1
3308   ac_status=$?
3309   grep -v '^ *+' conftest.er1 >conftest.err
3310   rm -rf conftest.er1
3311   cat conftest.err >&5
3312   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
3313   (exit $ac_status); } && {
3314          test -z "$ac_c_werror_flag" ||
3315          test ! -s conftest.err
3316        } && test -s conftest.$ac_objext; then
3317   ac_cv_prog_cc_g=yes
3318 else
3319   $as_echo "$as_me: failed program was:" >&5
3320 sed 's/^/| /' conftest.$ac_ext >&5
3321
3322
3323 fi
3324
3325 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3326 fi
3327
3328 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3329 fi
3330
3331 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3332    ac_c_werror_flag=$ac_save_c_werror_flag
3333 fi
3334 { $as_echo "$as_me:$LINENO: result: $ac_cv_prog_cc_g" >&5
3335 $as_echo "$ac_cv_prog_cc_g" >&6; }
3336 if test "$ac_test_CFLAGS" = set; then
3337   CFLAGS=$ac_save_CFLAGS
3338 elif test $ac_cv_prog_cc_g = yes; then
3339   if test "$GCC" = yes; then
3340     CFLAGS="-g -O2"
3341   else
3342     CFLAGS="-g"
3343   fi
3344 else
3345   if test "$GCC" = yes; then
3346     CFLAGS="-O2"
3347   else
3348     CFLAGS=
3349   fi
3350 fi
3351 { $as_echo "$as_me:$LINENO: checking for $CC option to accept ISO C89" >&5
3352 $as_echo_n "checking for $CC option to accept ISO C89... " >&6; }
3353 if test "${ac_cv_prog_cc_c89+set}" = set; then
3354   $as_echo_n "(cached) " >&6
3355 else
3356   ac_cv_prog_cc_c89=no
3357 ac_save_CC=$CC
3358 cat >conftest.$ac_ext <<_ACEOF
3359 /* confdefs.h.  */
3360 _ACEOF
3361 cat confdefs.h >>conftest.$ac_ext
3362 cat >>conftest.$ac_ext <<_ACEOF
3363 /* end confdefs.h.  */
3364 #include <stdarg.h>
3365 #include <stdio.h>
3366 #include <sys/types.h>
3367 #include <sys/stat.h>
3368 /* Most of the following tests are stolen from RCS 5.7's src/conf.sh.  */
3369 struct buf { int x; };
3370 FILE * (*rcsopen) (struct buf *, struct stat *, int);
3371 static char *e (p, i)
3372      char **p;
3373      int i;
3374 {
3375   return p[i];
3376 }
3377 static char *f (char * (*g) (char **, int), char **p, ...)
3378 {
3379   char *s;
3380   va_list v;
3381   va_start (v,p);
3382   s = g (p, va_arg (v,int));
3383   va_end (v);
3384   return s;
3385 }
3386
3387 /* OSF 4.0 Compaq cc is some sort of almost-ANSI by default.  It has
3388    function prototypes and stuff, but not '\xHH' hex character constants.
3389    These don't provoke an error unfortunately, instead are silently treated
3390    as 'x'.  The following induces an error, until -std is added to get
3391    proper ANSI mode.  Curiously '\x00'!='x' always comes out true, for an
3392    array size at least.  It's necessary to write '\x00'==0 to get something
3393    that's true only with -std.  */
3394 int osf4_cc_array ['\x00' == 0 ? 1 : -1];
3395
3396 /* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
3397    inside strings and character constants.  */
3398 #define FOO(x) 'x'
3399 int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
3400
3401 int test (int i, double x);
3402 struct s1 {int (*f) (int a);};
3403 struct s2 {int (*f) (double a);};
3404 int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
3405 int argc;
3406 char **argv;
3407 int
3408 main ()
3409 {
3410 return f (e, argv, 0) != argv[0]  ||  f (e, argv, 1) != argv[1];
3411   ;
3412   return 0;
3413 }
3414 _ACEOF
3415 for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
3416         -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
3417 do
3418   CC="$ac_save_CC $ac_arg"
3419   rm -rf conftest.$ac_objext
3420 if { (ac_try="$ac_compile"
3421 case "(($ac_try" in
3422   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3423   *) ac_try_echo=$ac_try;;
3424 esac
3425 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
3426 $as_echo "$ac_try_echo") >&5
3427   (eval "$ac_compile") 2>conftest.er1
3428   ac_status=$?
3429   grep -v '^ *+' conftest.er1 >conftest.err
3430   rm -rf conftest.er1
3431   cat conftest.err >&5
3432   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
3433   (exit $ac_status); } && {
3434          test -z "$ac_c_werror_flag" ||
3435          test ! -s conftest.err
3436        } && test -s conftest.$ac_objext; then
3437   ac_cv_prog_cc_c89=$ac_arg
3438 else
3439   $as_echo "$as_me: failed program was:" >&5
3440 sed 's/^/| /' conftest.$ac_ext >&5
3441
3442
3443 fi
3444
3445 rm -f core conftest.err conftest.$ac_objext
3446   test "x$ac_cv_prog_cc_c89" != "xno" && break
3447 done
3448 rm -rf conftest.$ac_ext
3449 CC=$ac_save_CC
3450
3451 fi
3452 # AC_CACHE_VAL
3453 case "x$ac_cv_prog_cc_c89" in
3454   x)
3455     { $as_echo "$as_me:$LINENO: result: none needed" >&5
3456 $as_echo "none needed" >&6; } ;;
3457   xno)
3458     { $as_echo "$as_me:$LINENO: result: unsupported" >&5
3459 $as_echo "unsupported" >&6; } ;;
3460   *)
3461     CC="$CC $ac_cv_prog_cc_c89"
3462     { $as_echo "$as_me:$LINENO: result: $ac_cv_prog_cc_c89" >&5
3463 $as_echo "$ac_cv_prog_cc_c89" >&6; } ;;
3464 esac
3465
3466
3467 ac_ext=c
3468 ac_cpp='$CPP $CPPFLAGS'
3469 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3470 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3471 ac_compiler_gnu=$ac_cv_c_compiler_gnu
3472
3473
3474   if test -z "$GCC"; then
3475     # not using GCC
3476     { $as_echo "$as_me:$LINENO: checking how to request ANSI compilation" >&5
3477 $as_echo_n "checking how to request ANSI compilation... " >&6; }
3478     case "$host" in
3479       *-hpux* )
3480         { $as_echo "$as_me:$LINENO: result: HPUX: adding -Ae" >&5
3481 $as_echo "HPUX: adding -Ae" >&6; }
3482         CC="$CC -Ae"
3483       ;;
3484       *-aix* )
3485         { $as_echo "$as_me:$LINENO: result: AIX: adding -qlanglvl=ansi -qhalt=e" >&5
3486 $as_echo "AIX: adding -qlanglvl=ansi -qhalt=e" >&6; }
3487         CC="$CC -qlanglvl=ansi -qhalt=e"
3488       ;;
3489       *-dec-* )
3490         { $as_echo "$as_me:$LINENO: result: DEC: adding -std1 -ieee" >&5
3491 $as_echo "DEC: adding -std1 -ieee" >&6; }
3492         CC="$CC -std1"
3493       ;;
3494       *)
3495         { $as_echo "$as_me:$LINENO: result: no idea" >&5
3496 $as_echo "no idea" >&6; }
3497       ;;
3498     esac
3499   else
3500     # using GCC
3501     case "$host" in
3502       *-solaris*)
3503         { $as_echo "$as_me:$LINENO: result: Solaris: adding -D__EXTENSIONS__" >&5
3504 $as_echo "Solaris: adding -D__EXTENSIONS__" >&6; }
3505         CC="$CC -D__EXTENSIONS__"
3506       ;;
3507     esac
3508   fi
3509
3510   OBJCC="$CC"
3511
3512   { $as_echo "$as_me:$LINENO: checking whether the compiler works on ANSI C" >&5
3513 $as_echo_n "checking whether the compiler works on ANSI C... " >&6; }
3514   if test "$cross_compiling" = yes; then
3515   { { $as_echo "$as_me:$LINENO: error: Couldn't build even a trivial ANSI C program: check CC." >&5
3516 $as_echo "$as_me: error: Couldn't build even a trivial ANSI C program: check CC." >&2;}
3517    { (exit 1); exit 1; }; }
3518 else
3519   cat >conftest.$ac_ext <<_ACEOF
3520 /* confdefs.h.  */
3521 _ACEOF
3522 cat confdefs.h >>conftest.$ac_ext
3523 cat >>conftest.$ac_ext <<_ACEOF
3524 /* end confdefs.h.  */
3525  main(int ac, char **av) { return 0; }
3526 _ACEOF
3527 rm -rf conftest$ac_exeext
3528 if { (ac_try="$ac_link"
3529 case "(($ac_try" in
3530   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3531   *) ac_try_echo=$ac_try;;
3532 esac
3533 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
3534 $as_echo "$ac_try_echo") >&5
3535   (eval "$ac_link") 2>&5
3536   ac_status=$?
3537   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
3538   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
3539   { (case "(($ac_try" in
3540   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3541   *) ac_try_echo=$ac_try;;
3542 esac
3543 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
3544 $as_echo "$ac_try_echo") >&5
3545   (eval "$ac_try") 2>&5
3546   ac_status=$?
3547   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
3548   (exit $ac_status); }; }; then
3549   { $as_echo "$as_me:$LINENO: result: yes" >&5
3550 $as_echo "yes" >&6; }
3551 else
3552   $as_echo "$as_me: program exited with status $ac_status" >&5
3553 $as_echo "$as_me: failed program was:" >&5
3554 sed 's/^/| /' conftest.$ac_ext >&5
3555
3556 ( exit $ac_status )
3557 { $as_echo "$as_me:$LINENO: result: no" >&5
3558 $as_echo "no" >&6; }
3559      { { $as_echo "$as_me:$LINENO: error: Couldn't build even a trivial ANSI C program: check CC." >&5
3560 $as_echo "$as_me: error: Couldn't build even a trivial ANSI C program: check CC." >&2;}
3561    { (exit 1); exit 1; }; }
3562 fi
3563 rm -rf conftest.dSYM
3564 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
3565 fi
3566
3567
3568
3569   if test -n "$GCC"; then
3570     { $as_echo "$as_me:$LINENO: result: Turning on gcc compiler warnings." >&5
3571 $as_echo "Turning on gcc compiler warnings." >&6; }
3572     CC="$CC -pedantic -Wall -Wstrict-prototypes -Wnested-externs -Wmissing-prototypes"
3573     OBJCC="$OBJCC -Wall"
3574     # As of gcc 3.4, we have "-Wdeclaration-after-statement"
3575     # and so perhaps now we can do without -pedantic?
3576   else
3577     case "$host" in
3578       *-irix5* |*-irix6.0-3* )
3579         { $as_echo "$as_me:$LINENO: result: Turning on SGI compiler warnings." >&5
3580 $as_echo "Turning on SGI compiler warnings." >&6; }
3581         CC="$CC -fullwarn -use_readonly_const -rdata_shared -g3"
3582       ;;
3583 #     *-dec-osf* )
3584 #       if test -z "$GCC"; then
3585 #         AC_MSG_RESULT(Turning on DEC C compiler warnings.)
3586 #         CC="$CC -migrate -w0 -verbose -warnprotos"
3587 #       fi
3588 #     ;;
3589     esac
3590   fi
3591
3592 if test -n "$GCC"; then
3593    { $as_echo "$as_me:$LINENO: checking whether gcc accepts -Wno-overlength-strings" >&5
3594 $as_echo_n "checking whether gcc accepts -Wno-overlength-strings... " >&6; }
3595 if test "${ac_cv_gcc_accepts_no_overlength+set}" = set; then
3596   $as_echo_n "(cached) " >&6
3597 else
3598   rm -rf conftest.$ac_ext
3599      touch conftest.$ac_ext
3600      if ( ( gcc -c -Wno-overlength-strings conftest.$ac_ext -o/dev/null >/dev/null ) 2>&1 | \
3601           grep unrecognized >/dev/null ); then
3602        ac_cv_gcc_accepts_no_overlength=no
3603      else
3604        ac_cv_gcc_accepts_no_overlength=yes
3605        CC="$CC -Wno-overlength-strings"
3606      fi
3607 fi
3608 { $as_echo "$as_me:$LINENO: result: $ac_cv_gcc_accepts_no_overlength" >&5
3609 $as_echo "$ac_cv_gcc_accepts_no_overlength" >&6; }
3610    ac_gcc_accepts_no_overlength="$ac_cv_gcc_accepts_no_overlength"
3611   fi
3612
3613 if test -n "$GCC"; then
3614    { $as_echo "$as_me:$LINENO: checking whether gcc accepts -Wdeclaration-after-statement" >&5
3615 $as_echo_n "checking whether gcc accepts -Wdeclaration-after-statement... " >&6; }
3616 if test "${ac_cv_gcc_accepts_no_decl_after+set}" = set; then
3617   $as_echo_n "(cached) " >&6
3618 else
3619   rm -rf conftest.$ac_ext
3620      touch conftest.$ac_ext
3621      if ( ( gcc -c -Wdeclaration-after-statement conftest.$ac_ext -o/dev/null >/dev/null ) 2>&1 | \
3622           grep unrecognized >/dev/null ); then
3623        ac_cv_gcc_accepts_no_decl_after=no
3624      else
3625        ac_cv_gcc_accepts_no_decl_after=yes
3626        CC="$CC -Wdeclaration-after-statement"
3627      fi
3628 fi
3629 { $as_echo "$as_me:$LINENO: result: $ac_cv_gcc_accepts_no_decl_after" >&5
3630 $as_echo "$ac_cv_gcc_accepts_no_decl_after" >&6; }
3631    ac_gcc_accepts_no_decl_after="$ac_cv_gcc_accepts_no_decl_after"
3632   fi
3633
3634 if test -n "$GCC"; then
3635    { $as_echo "$as_me:$LINENO: checking whether gcc accepts -no-cpp-precomp" >&5
3636 $as_echo_n "checking whether gcc accepts -no-cpp-precomp... " >&6; }
3637 if test "${ac_cv_gcc_accepts_no_cpp_precomp+set}" = set; then
3638   $as_echo_n "(cached) " >&6
3639 else
3640   rm -rf conftest.$ac_ext
3641      touch conftest.$ac_ext
3642      if ( ( gcc -c -no-cpp-precomp conftest.$ac_ext -o/dev/null >/dev/null ) 2>&1 | \
3643           grep unrecognized >/dev/null ); then
3644        ac_cv_gcc_accepts_no_cpp_precomp=no
3645      else
3646        ac_cv_gcc_accepts_no_cpp_precomp=yes
3647        CC="$CC -no-cpp-precomp"
3648      fi
3649 fi
3650 { $as_echo "$as_me:$LINENO: result: $ac_cv_gcc_accepts_no_cpp_precomp" >&5
3651 $as_echo "$ac_cv_gcc_accepts_no_cpp_precomp" >&6; }
3652    ac_gcc_accepts_no_cpp_precomp="$ac_cv_gcc_accepts_no_cpp_precomp"
3653   fi
3654
3655 if test -n "$GCC"; then
3656
3657   case "$host" in
3658     *-darwin* )
3659       # Fucking Apple let // comments sneak into OpenGL headers, so
3660       # we *must* allow // comments when compiling on Mac OS 10.6!  FUCK!
3661     ;;
3662    *)
3663      if test -n "$GCC"; then
3664    { $as_echo "$as_me:$LINENO: checking whether gcc accepts -std=c89" >&5
3665 $as_echo_n "checking whether gcc accepts -std=c89... " >&6; }
3666 if test "${ac_cv_gcc_accepts_std+set}" = set; then
3667   $as_echo_n "(cached) " >&6
3668 else
3669   rm -rf conftest.$ac_ext
3670      touch conftest.$ac_ext
3671      if ( ( gcc -c -std=c89 conftest.$ac_ext -o/dev/null >/dev/null ) 2>&1 | \
3672           grep unrecognized >/dev/null ); then
3673        ac_cv_gcc_accepts_std=no
3674      else
3675        ac_cv_gcc_accepts_std=yes
3676        CC="$CC -std=c89"
3677      fi
3678 fi
3679 { $as_echo "$as_me:$LINENO: result: $ac_cv_gcc_accepts_std" >&5
3680 $as_echo "$ac_cv_gcc_accepts_std" >&6; }
3681    ac_gcc_accepts_std="$ac_cv_gcc_accepts_std"
3682   fi
3683
3684    ;;
3685   esac
3686
3687    { $as_echo "$as_me:$LINENO: result: Disabling C++ comments in ANSI C code." >&5
3688 $as_echo "Disabling C++ comments in ANSI C code." >&6; }
3689    #
3690    # The reason that // comments are banned from xscreensaver is that gcc is
3691    # basically the only compiler in the world that supports them in C code.
3692    # All other vendors support them only in their C++ compilers, not in their
3693    # ANSI C compilers.  This means that it's a portability problem: every time
3694    # these comments have snuck into the xscreensaver source code, I've gotten
3695    # complaints about it the next day.  So we turn off support for them in gcc
3696    # as well to prevent them from accidentially slipping in.
3697    #
3698    if test "$ac_gcc_accepts_std" = yes ; then
3699      #
3700      # -std=c89 defines __STRICT_ANSI__, which we don't want.
3701      # (That appears to be the only additional preprocessor symbol
3702      # it defines, in addition to the syntax changes it makes.)
3703      #
3704      # -std=gnu89 is no good, because // comments were a GNU extension
3705      # before they were in the ANSI C 99 spec...  (gcc 2.96 permits //
3706      # with -std=gnu89 but not with -std=c89.)
3707      #
3708      # $CC already contains "-std=c89" via AC_GCC_ACCEPTS_STD
3709      CC="$CC -U__STRICT_ANSI__"
3710 #   else
3711 #     # The old way:
3712 #     CC="$CC -Wp,-lang-c89"
3713    fi
3714   fi
3715
3716 ac_ext=c
3717 ac_cpp='$CPP $CPPFLAGS'
3718 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3719 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3720 ac_compiler_gnu=$ac_cv_c_compiler_gnu
3721 { $as_echo "$as_me:$LINENO: checking how to run the C preprocessor" >&5
3722 $as_echo_n "checking how to run the C preprocessor... " >&6; }
3723 # On Suns, sometimes $CPP names a directory.
3724 if test -n "$CPP" && test -d "$CPP"; then
3725   CPP=
3726 fi
3727 if test -z "$CPP"; then
3728   if test "${ac_cv_prog_CPP+set}" = set; then
3729   $as_echo_n "(cached) " >&6
3730 else
3731       # Double quotes because CPP needs to be expanded
3732     for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
3733     do
3734       ac_preproc_ok=false
3735 for ac_c_preproc_warn_flag in '' yes
3736 do
3737   # Use a header file that comes with gcc, so configuring glibc
3738   # with a fresh cross-compiler works.
3739   # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
3740   # <limits.h> exists even on freestanding compilers.
3741   # On the NeXT, cc -E runs the code through the compiler's parser,
3742   # not just through cpp. "Syntax error" is here to catch this case.
3743   cat >conftest.$ac_ext <<_ACEOF
3744 /* confdefs.h.  */
3745 _ACEOF
3746 cat confdefs.h >>conftest.$ac_ext
3747 cat >>conftest.$ac_ext <<_ACEOF
3748 /* end confdefs.h.  */
3749 #ifdef __STDC__
3750 # include <limits.h>
3751 #else
3752 # include <assert.h>
3753 #endif
3754                      Syntax error
3755 _ACEOF
3756 if { (ac_try="$ac_cpp conftest.$ac_ext"
3757 case "(($ac_try" in
3758   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3759   *) ac_try_echo=$ac_try;;
3760 esac
3761 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
3762 $as_echo "$ac_try_echo") >&5
3763   (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
3764   ac_status=$?
3765   grep -v '^ *+' conftest.er1 >conftest.err
3766   rm -rf conftest.er1
3767   cat conftest.err >&5
3768   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
3769   (exit $ac_status); } >/dev/null && {
3770          test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
3771          test ! -s conftest.err
3772        }; then
3773   :
3774 else
3775   $as_echo "$as_me: failed program was:" >&5
3776 sed 's/^/| /' conftest.$ac_ext >&5
3777
3778   # Broken: fails on valid input.
3779 continue
3780 fi
3781
3782 rm -rf conftest.err conftest.$ac_ext
3783
3784   # OK, works on sane cases.  Now check whether nonexistent headers
3785   # can be detected and how.
3786   cat >conftest.$ac_ext <<_ACEOF
3787 /* confdefs.h.  */
3788 _ACEOF
3789 cat confdefs.h >>conftest.$ac_ext
3790 cat >>conftest.$ac_ext <<_ACEOF
3791 /* end confdefs.h.  */
3792 #include <ac_nonexistent.h>
3793 _ACEOF
3794 if { (ac_try="$ac_cpp conftest.$ac_ext"
3795 case "(($ac_try" in
3796   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3797   *) ac_try_echo=$ac_try;;
3798 esac
3799 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
3800 $as_echo "$ac_try_echo") >&5
3801   (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
3802   ac_status=$?
3803   grep -v '^ *+' conftest.er1 >conftest.err
3804   rm -rf conftest.er1
3805   cat conftest.err >&5
3806   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
3807   (exit $ac_status); } >/dev/null && {
3808          test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
3809          test ! -s conftest.err
3810        }; then
3811   # Broken: success on invalid input.
3812 continue
3813 else
3814   $as_echo "$as_me: failed program was:" >&5
3815 sed 's/^/| /' conftest.$ac_ext >&5
3816
3817   # Passes both tests.
3818 ac_preproc_ok=:
3819 break
3820 fi
3821
3822 rm -rf conftest.err conftest.$ac_ext
3823
3824 done
3825 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
3826 rm -rf conftest.err conftest.$ac_ext
3827 if $ac_preproc_ok; then
3828   break
3829 fi
3830
3831     done
3832     ac_cv_prog_CPP=$CPP
3833
3834 fi
3835   CPP=$ac_cv_prog_CPP
3836 else
3837   ac_cv_prog_CPP=$CPP
3838 fi
3839 { $as_echo "$as_me:$LINENO: result: $CPP" >&5
3840 $as_echo "$CPP" >&6; }
3841 ac_preproc_ok=false
3842 for ac_c_preproc_warn_flag in '' yes
3843 do
3844   # Use a header file that comes with gcc, so configuring glibc
3845   # with a fresh cross-compiler works.
3846   # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
3847   # <limits.h> exists even on freestanding compilers.
3848   # On the NeXT, cc -E runs the code through the compiler's parser,
3849   # not just through cpp. "Syntax error" is here to catch this case.
3850   cat >conftest.$ac_ext <<_ACEOF
3851 /* confdefs.h.  */
3852 _ACEOF
3853 cat confdefs.h >>conftest.$ac_ext
3854 cat >>conftest.$ac_ext <<_ACEOF
3855 /* end confdefs.h.  */
3856 #ifdef __STDC__
3857 # include <limits.h>
3858 #else
3859 # include <assert.h>
3860 #endif
3861                      Syntax error
3862 _ACEOF
3863 if { (ac_try="$ac_cpp conftest.$ac_ext"
3864 case "(($ac_try" in
3865   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3866   *) ac_try_echo=$ac_try;;
3867 esac
3868 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
3869 $as_echo "$ac_try_echo") >&5
3870   (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
3871   ac_status=$?
3872   grep -v '^ *+' conftest.er1 >conftest.err
3873   rm -rf conftest.er1
3874   cat conftest.err >&5
3875   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
3876   (exit $ac_status); } >/dev/null && {
3877          test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
3878          test ! -s conftest.err
3879        }; then
3880   :
3881 else
3882   $as_echo "$as_me: failed program was:" >&5
3883 sed 's/^/| /' conftest.$ac_ext >&5
3884
3885   # Broken: fails on valid input.
3886 continue
3887 fi
3888
3889 rm -rf conftest.err conftest.$ac_ext
3890
3891   # OK, works on sane cases.  Now check whether nonexistent headers
3892   # can be detected and how.
3893   cat >conftest.$ac_ext <<_ACEOF
3894 /* confdefs.h.  */
3895 _ACEOF
3896 cat confdefs.h >>conftest.$ac_ext
3897 cat >>conftest.$ac_ext <<_ACEOF
3898 /* end confdefs.h.  */
3899 #include <ac_nonexistent.h>
3900 _ACEOF
3901 if { (ac_try="$ac_cpp conftest.$ac_ext"
3902 case "(($ac_try" in
3903   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3904   *) ac_try_echo=$ac_try;;
3905 esac
3906 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
3907 $as_echo "$ac_try_echo") >&5
3908   (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
3909   ac_status=$?
3910   grep -v '^ *+' conftest.er1 >conftest.err
3911   rm -rf conftest.er1
3912   cat conftest.err >&5
3913   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
3914   (exit $ac_status); } >/dev/null && {
3915          test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
3916          test ! -s conftest.err
3917        }; then
3918   # Broken: success on invalid input.
3919 continue
3920 else
3921   $as_echo "$as_me: failed program was:" >&5
3922 sed 's/^/| /' conftest.$ac_ext >&5
3923
3924   # Passes both tests.
3925 ac_preproc_ok=:
3926 break
3927 fi
3928
3929 rm -rf conftest.err conftest.$ac_ext
3930
3931 done
3932 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
3933 rm -rf conftest.err conftest.$ac_ext
3934 if $ac_preproc_ok; then
3935   :
3936 else
3937   { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5
3938 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3939 { { $as_echo "$as_me:$LINENO: error: C preprocessor \"$CPP\" fails sanity check
3940 See \`config.log' for more details." >&5
3941 $as_echo "$as_me: error: C preprocessor \"$CPP\" fails sanity check
3942 See \`config.log' for more details." >&2;}
3943    { (exit 1); exit 1; }; }; }
3944 fi
3945
3946 ac_ext=c
3947 ac_cpp='$CPP $CPPFLAGS'
3948 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3949 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3950 ac_compiler_gnu=$ac_cv_c_compiler_gnu
3951
3952 { $as_echo "$as_me:$LINENO: checking for an ANSI C-conforming const" >&5
3953 $as_echo_n "checking for an ANSI C-conforming const... " >&6; }
3954 if test "${ac_cv_c_const+set}" = set; then
3955   $as_echo_n "(cached) " >&6
3956 else
3957   cat >conftest.$ac_ext <<_ACEOF
3958 /* confdefs.h.  */
3959 _ACEOF
3960 cat confdefs.h >>conftest.$ac_ext
3961 cat >>conftest.$ac_ext <<_ACEOF
3962 /* end confdefs.h.  */
3963
3964 int
3965 main ()
3966 {
3967 /* FIXME: Include the comments suggested by Paul. */
3968 #ifndef __cplusplus
3969   /* Ultrix mips cc rejects this.  */
3970   typedef int charset[2];
3971   const charset cs;
3972   /* SunOS 4.1.1 cc rejects this.  */
3973   char const *const *pcpcc;
3974   char **ppc;
3975   /* NEC SVR4.0.2 mips cc rejects this.  */
3976   struct point {int x, y;};
3977   static struct point const zero = {0,0};
3978   /* AIX XL C 1.02.0.0 rejects this.
3979      It does not let you subtract one const X* pointer from another in
3980      an arm of an if-expression whose if-part is not a constant
3981      expression */
3982   const char *g = "string";
3983   pcpcc = &g + (g ? g-g : 0);
3984   /* HPUX 7.0 cc rejects these. */
3985   ++pcpcc;
3986   ppc = (char**) pcpcc;
3987   pcpcc = (char const *const *) ppc;
3988   { /* SCO 3.2v4 cc rejects this.  */
3989     char *t;
3990     char const *s = 0 ? (char *) 0 : (char const *) 0;
3991
3992     *t++ = 0;
3993     if (s) return 0;
3994   }
3995   { /* Someone thinks the Sun supposedly-ANSI compiler will reject this.  */
3996     int x[] = {25, 17};
3997     const int *foo = &x[0];
3998     ++foo;
3999   }
4000   { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
4001     typedef const int *iptr;
4002     iptr p = 0;
4003     ++p;
4004   }
4005   { /* AIX XL C 1.02.0.0 rejects this saying
4006        "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
4007     struct s { int j; const int *ap[3]; };
4008     struct s *b; b->j = 5;
4009   }
4010   { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
4011     const int foo = 10;
4012     if (!foo) return 0;
4013   }
4014   return !cs[0] && !zero.x;
4015 #endif
4016
4017   ;
4018   return 0;
4019 }
4020 _ACEOF
4021 rm -rf conftest.$ac_objext
4022 if { (ac_try="$ac_compile"
4023 case "(($ac_try" in
4024   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4025   *) ac_try_echo=$ac_try;;
4026 esac
4027 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
4028 $as_echo "$ac_try_echo") >&5
4029   (eval "$ac_compile") 2>conftest.er1
4030   ac_status=$?
4031   grep -v '^ *+' conftest.er1 >conftest.err
4032   rm -rf conftest.er1
4033   cat conftest.err >&5
4034   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
4035   (exit $ac_status); } && {
4036          test -z "$ac_c_werror_flag" ||
4037          test ! -s conftest.err
4038        } && test -s conftest.$ac_objext; then
4039   ac_cv_c_const=yes
4040 else
4041   $as_echo "$as_me: failed program was:" >&5
4042 sed 's/^/| /' conftest.$ac_ext >&5
4043
4044         ac_cv_c_const=no
4045 fi
4046
4047 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4048 fi
4049 { $as_echo "$as_me:$LINENO: result: $ac_cv_c_const" >&5
4050 $as_echo "$ac_cv_c_const" >&6; }
4051 if test $ac_cv_c_const = no; then
4052
4053 cat >>confdefs.h <<\_ACEOF
4054 #define const /**/
4055 _ACEOF
4056
4057 fi
4058
4059 { $as_echo "$as_me:$LINENO: checking for inline" >&5
4060 $as_echo_n "checking for inline... " >&6; }
4061 if test "${ac_cv_c_inline+set}" = set; then
4062   $as_echo_n "(cached) " >&6
4063 else
4064   ac_cv_c_inline=no
4065 for ac_kw in inline __inline__ __inline; do
4066   cat >conftest.$ac_ext <<_ACEOF
4067 /* confdefs.h.  */
4068 _ACEOF
4069 cat confdefs.h >>conftest.$ac_ext
4070 cat >>conftest.$ac_ext <<_ACEOF
4071 /* end confdefs.h.  */
4072 #ifndef __cplusplus
4073 typedef int foo_t;
4074 static $ac_kw foo_t static_foo () {return 0; }
4075 $ac_kw foo_t foo () {return 0; }
4076 #endif
4077
4078 _ACEOF
4079 rm -rf conftest.$ac_objext
4080 if { (ac_try="$ac_compile"
4081 case "(($ac_try" in
4082   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4083   *) ac_try_echo=$ac_try;;
4084 esac
4085 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
4086 $as_echo "$ac_try_echo") >&5
4087   (eval "$ac_compile") 2>conftest.er1
4088   ac_status=$?
4089   grep -v '^ *+' conftest.er1 >conftest.err
4090   rm -rf conftest.er1
4091   cat conftest.err >&5
4092   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
4093   (exit $ac_status); } && {
4094          test -z "$ac_c_werror_flag" ||
4095          test ! -s conftest.err
4096        } && test -s conftest.$ac_objext; then
4097   ac_cv_c_inline=$ac_kw
4098 else
4099   $as_echo "$as_me: failed program was:" >&5
4100 sed 's/^/| /' conftest.$ac_ext >&5
4101
4102
4103 fi
4104
4105 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4106   test "$ac_cv_c_inline" != no && break
4107 done
4108
4109 fi
4110 { $as_echo "$as_me:$LINENO: result: $ac_cv_c_inline" >&5
4111 $as_echo "$ac_cv_c_inline" >&6; }
4112
4113
4114 case $ac_cv_c_inline in
4115   inline | yes) ;;
4116   *)
4117     case $ac_cv_c_inline in
4118       no) ac_val=;;
4119       *) ac_val=$ac_cv_c_inline;;
4120     esac
4121     cat >>confdefs.h <<_ACEOF
4122 #ifndef __cplusplus
4123 #define inline $ac_val
4124 #endif
4125 _ACEOF
4126     ;;
4127 esac
4128
4129
4130 ac_bc_result=`echo 6+9 | bc 2>/dev/null`
4131   { $as_echo "$as_me:$LINENO: checking for bc" >&5
4132 $as_echo_n "checking for bc... " >&6; }
4133   if test "$ac_bc_result" = "15" ; then
4134     { $as_echo "$as_me:$LINENO: result: yes" >&5
4135 $as_echo "yes" >&6; }
4136   else
4137     { $as_echo "$as_me:$LINENO: result: no" >&5
4138 $as_echo "no" >&6; }
4139     echo ''
4140     { { $as_echo "$as_me:$LINENO: error: Your system doesn't have \"bc\", which has been a standard
4141                   part of Unix since the 1970s.  Come back when your vendor
4142                   has grown a clue." >&5
4143 $as_echo "$as_me: error: Your system doesn't have \"bc\", which has been a standard
4144                   part of Unix since the 1970s.  Come back when your vendor
4145                   has grown a clue." >&2;}
4146    { (exit 1); exit 1; }; }
4147   fi
4148
4149
4150 # stuff for Makefiles
4151 # Find a good install program.  We prefer a C program (faster),
4152 # so one script is as good as another.  But avoid the broken or
4153 # incompatible versions:
4154 # SysV /etc/install, /usr/sbin/install
4155 # SunOS /usr/etc/install
4156 # IRIX /sbin/install
4157 # AIX /bin/install
4158 # AmigaOS /C/install, which installs bootblocks on floppy discs
4159 # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
4160 # AFS /usr/afsws/bin/install, which mishandles nonexistent args
4161 # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
4162 # OS/2's system install, which has a completely different semantic
4163 # ./install, which can be erroneously created by make from ./install.sh.
4164 # Reject install programs that cannot install multiple files.
4165 { $as_echo "$as_me:$LINENO: checking for a BSD-compatible install" >&5
4166 $as_echo_n "checking for a BSD-compatible install... " >&6; }
4167 if test -z "$INSTALL"; then
4168 if test "${ac_cv_path_install+set}" = set; then
4169   $as_echo_n "(cached) " >&6
4170 else
4171   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4172 for as_dir in $PATH
4173 do
4174   IFS=$as_save_IFS
4175   test -z "$as_dir" && as_dir=.
4176   # Account for people who put trailing slashes in PATH elements.
4177 case $as_dir/ in
4178   ./ | .// | /cC/* | \
4179   /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \
4180   ?:\\/os2\\/install\\/* | ?:\\/OS2\\/INSTALL\\/* | \
4181   /usr/ucb/* ) ;;
4182   *)
4183     # OSF1 and SCO ODT 3.0 have their own names for install.
4184     # Don't use installbsd from OSF since it installs stuff as root
4185     # by default.
4186     for ac_prog in ginstall scoinst install; do
4187       for ac_exec_ext in '' $ac_executable_extensions; do
4188         if { test -f "$as_dir/$ac_prog$ac_exec_ext" && $as_test_x "$as_dir/$ac_prog$ac_exec_ext"; }; then
4189           if test $ac_prog = install &&
4190             grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
4191             # AIX install.  It has an incompatible calling convention.
4192             :
4193           elif test $ac_prog = install &&
4194             grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
4195             # program-specific install script used by HP pwplus--don't use.
4196             :
4197           else
4198             rm -rf conftest.one conftest.two conftest.dir
4199             echo one > conftest.one
4200             echo two > conftest.two
4201             mkdir conftest.dir
4202             if "$as_dir/$ac_prog$ac_exec_ext" -c conftest.one conftest.two "`pwd`/conftest.dir" &&
4203               test -s conftest.one && test -s conftest.two &&
4204               test -s conftest.dir/conftest.one &&
4205               test -s conftest.dir/conftest.two
4206             then
4207               ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c"
4208               break 3
4209             fi
4210           fi
4211         fi
4212       done
4213     done
4214     ;;
4215 esac
4216
4217 done
4218 IFS=$as_save_IFS
4219
4220 rm -rf conftest.one conftest.two conftest.dir
4221
4222 fi
4223   if test "${ac_cv_path_install+set}" = set; then
4224     INSTALL=$ac_cv_path_install
4225   else
4226     # As a last resort, use the slow shell script.  Don't cache a
4227     # value for INSTALL within a source directory, because that will
4228     # break other packages using the cache if that directory is
4229     # removed, or if the value is a relative name.
4230     INSTALL=$ac_install_sh
4231   fi
4232 fi
4233 { $as_echo "$as_me:$LINENO: result: $INSTALL" >&5
4234 $as_echo "$INSTALL" >&6; }
4235
4236 # Use test -z because SunOS4 sh mishandles braces in ${var-val}.
4237 # It thinks the first close brace ends the variable substitution.
4238 test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
4239
4240 test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
4241
4242 test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
4243
4244 { $as_echo "$as_me:$LINENO: checking whether \"\${INSTALL} -d\" creates intermediate directories" >&5
4245 $as_echo_n "checking whether \"\${INSTALL} -d\" creates intermediate directories... " >&6; }
4246 if test "${ac_cv_install_d_creates_dirs+set}" = set; then
4247   $as_echo_n "(cached) " >&6
4248 else
4249   ac_cv_install_d_creates_dirs=no
4250      rm -rf conftestdir
4251      if mkdir conftestdir; then
4252        cd conftestdir 2>/dev/null
4253        ${INSTALL} -d `pwd`/dir1/dir2 >/dev/null 2>&1
4254        if test -d dir1/dir2/. ; then
4255          ac_cv_install_d_creates_dirs=yes
4256        fi
4257        cd .. 2>/dev/null
4258        rm -rf conftestdir
4259      fi
4260
4261 fi
4262 { $as_echo "$as_me:$LINENO: result: $ac_cv_install_d_creates_dirs" >&5
4263 $as_echo "$ac_cv_install_d_creates_dirs" >&6; }
4264
4265   if test "$ac_cv_install_d_creates_dirs" = no ; then
4266     { $as_echo "$as_me:$LINENO: checking whether \"mkdir -p\" creates intermediate directories" >&5
4267 $as_echo_n "checking whether \"mkdir -p\" creates intermediate directories... " >&6; }
4268 if test "${ac_cv_mkdir_p_creates_dirs+set}" = set; then
4269   $as_echo_n "(cached) " >&6
4270 else
4271   ac_cv_mkdir_p_creates_dirs=no
4272        rm -rf conftestdir
4273        if mkdir conftestdir; then
4274          cd conftestdir 2>/dev/null
4275          mkdir -p dir1/dir2 >/dev/null 2>&1
4276          if test -d dir1/dir2/. ; then
4277            ac_cv_mkdir_p_creates_dirs=yes
4278          fi
4279          cd .. 2>/dev/null
4280          rm -rf conftestdir
4281        fi
4282
4283 fi
4284 { $as_echo "$as_me:$LINENO: result: $ac_cv_mkdir_p_creates_dirs" >&5
4285 $as_echo "$ac_cv_mkdir_p_creates_dirs" >&6; }
4286   fi
4287
4288   if test "$ac_cv_install_d_creates_dirs" = yes ; then
4289     INSTALL_DIRS='${INSTALL} -d'
4290   elif test "$ac_cv_mkdir_p_creates_dirs" = yes ; then
4291     INSTALL_DIRS='mkdir -p'
4292   else
4293     # any other ideas?
4294     INSTALL_DIRS='${INSTALL} -d'
4295   fi
4296
4297 { $as_echo "$as_me:$LINENO: checking whether ${MAKE-make} sets \$(MAKE)" >&5
4298 $as_echo_n "checking whether ${MAKE-make} sets \$(MAKE)... " >&6; }
4299 set x ${MAKE-make}
4300 ac_make=`$as_echo "$2" | sed 's/+/p/g; s/[^a-zA-Z0-9_]/_/g'`
4301 if { as_var=ac_cv_prog_make_${ac_make}_set; eval "test \"\${$as_var+set}\" = set"; }; then
4302   $as_echo_n "(cached) " >&6
4303 else
4304   cat >conftest.make <<\_ACEOF
4305 SHELL = /bin/sh
4306 all:
4307         @echo '@@@%%%=$(MAKE)=@@@%%%'
4308 _ACEOF
4309 # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
4310 case `${MAKE-make} -f conftest.make 2>/dev/null` in
4311   *@@@%%%=?*=@@@%%%*)
4312     eval ac_cv_prog_make_${ac_make}_set=yes;;
4313   *)
4314     eval ac_cv_prog_make_${ac_make}_set=no;;
4315 esac
4316 rm -rf conftest.make
4317 fi
4318 if eval test \$ac_cv_prog_make_${ac_make}_set = yes; then
4319   { $as_echo "$as_me:$LINENO: result: yes" >&5
4320 $as_echo "yes" >&6; }
4321   SET_MAKE=
4322 else
4323   { $as_echo "$as_me:$LINENO: result: no" >&5
4324 $as_echo "no" >&6; }
4325   SET_MAKE="MAKE=${MAKE-make}"
4326 fi
4327
4328
4329 # By default, autoconf sets INSTALL_SCRIPT to '${INSTALL_PROGRAM}'.
4330 # That's wrong: it should be set to '${INSTALL}', so that one can
4331 # implement the "install-strip" target properly (strip executables,
4332 # but do not try to strip scripts.)
4333 #
4334 INSTALL_SCRIPT='${INSTALL}'
4335
4336 # random libc stuff
4337
4338 { $as_echo "$as_me:$LINENO: checking for grep that handles long lines and -e" >&5
4339 $as_echo_n "checking for grep that handles long lines and -e... " >&6; }
4340 if test "${ac_cv_path_GREP+set}" = set; then
4341   $as_echo_n "(cached) " >&6
4342 else
4343   if test -z "$GREP"; then
4344   ac_path_GREP_found=false
4345   # Loop through the user's path and test for each of PROGNAME-LIST
4346   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4347 for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
4348 do
4349   IFS=$as_save_IFS
4350   test -z "$as_dir" && as_dir=.
4351   for ac_prog in grep ggrep; do
4352     for ac_exec_ext in '' $ac_executable_extensions; do
4353       ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
4354       { test -f "$ac_path_GREP" && $as_test_x "$ac_path_GREP"; } || continue
4355 # Check for GNU ac_path_GREP and select it if it is found.
4356   # Check for GNU $ac_path_GREP
4357 case `"$ac_path_GREP" --version 2>&1` in
4358 *GNU*)
4359   ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
4360 *)
4361   ac_count=0
4362   $as_echo_n 0123456789 >"conftest.in"
4363   while :
4364   do
4365     cat "conftest.in" "conftest.in" >"conftest.tmp"
4366     mv "conftest.tmp" "conftest.in"
4367     cp "conftest.in" "conftest.nl"
4368     $as_echo 'GREP' >> "conftest.nl"
4369     "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
4370     diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
4371     ac_count=`expr $ac_count + 1`
4372     if test $ac_count -gt ${ac_path_GREP_max-0}; then
4373       # Best one so far, save it but keep looking for a better one
4374       ac_cv_path_GREP="$ac_path_GREP"
4375       ac_path_GREP_max=$ac_count
4376     fi
4377     # 10*(2^10) chars as input seems more than enough
4378     test $ac_count -gt 10 && break
4379   done
4380   rm -rf conftest.in conftest.tmp conftest.nl conftest.out;;
4381 esac
4382
4383       $ac_path_GREP_found && break 3
4384     done
4385   done
4386 done
4387 IFS=$as_save_IFS
4388   if test -z "$ac_cv_path_GREP"; then
4389     { { $as_echo "$as_me:$LINENO: error: no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&5
4390 $as_echo "$as_me: error: no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&2;}
4391    { (exit 1); exit 1; }; }
4392   fi
4393 else
4394   ac_cv_path_GREP=$GREP
4395 fi
4396
4397 fi
4398 { $as_echo "$as_me:$LINENO: result: $ac_cv_path_GREP" >&5
4399 $as_echo "$ac_cv_path_GREP" >&6; }
4400  GREP="$ac_cv_path_GREP"
4401
4402
4403 { $as_echo "$as_me:$LINENO: checking for egrep" >&5
4404 $as_echo_n "checking for egrep... " >&6; }
4405 if test "${ac_cv_path_EGREP+set}" = set; then
4406   $as_echo_n "(cached) " >&6
4407 else
4408   if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
4409    then ac_cv_path_EGREP="$GREP -E"
4410    else
4411      if test -z "$EGREP"; then
4412   ac_path_EGREP_found=false
4413   # Loop through the user's path and test for each of PROGNAME-LIST
4414   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4415 for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
4416 do
4417   IFS=$as_save_IFS
4418   test -z "$as_dir" && as_dir=.
4419   for ac_prog in egrep; do
4420     for ac_exec_ext in '' $ac_executable_extensions; do
4421       ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
4422       { test -f "$ac_path_EGREP" && $as_test_x "$ac_path_EGREP"; } || continue
4423 # Check for GNU ac_path_EGREP and select it if it is found.
4424   # Check for GNU $ac_path_EGREP
4425 case `"$ac_path_EGREP" --version 2>&1` in
4426 *GNU*)
4427   ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
4428 *)
4429   ac_count=0
4430   $as_echo_n 0123456789 >"conftest.in"
4431   while :
4432   do
4433     cat "conftest.in" "conftest.in" >"conftest.tmp"
4434     mv "conftest.tmp" "conftest.in"
4435     cp "conftest.in" "conftest.nl"
4436     $as_echo 'EGREP' >> "conftest.nl"
4437     "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
4438     diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
4439     ac_count=`expr $ac_count + 1`
4440     if test $ac_count -gt ${ac_path_EGREP_max-0}; then
4441       # Best one so far, save it but keep looking for a better one
4442       ac_cv_path_EGREP="$ac_path_EGREP"
4443       ac_path_EGREP_max=$ac_count
4444     fi
4445     # 10*(2^10) chars as input seems more than enough
4446     test $ac_count -gt 10 && break
4447   done
4448   rm -rf conftest.in conftest.tmp conftest.nl conftest.out;;
4449 esac
4450
4451       $ac_path_EGREP_found && break 3
4452     done
4453   done
4454 done
4455 IFS=$as_save_IFS
4456   if test -z "$ac_cv_path_EGREP"; then
4457     { { $as_echo "$as_me:$LINENO: error: no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&5
4458 $as_echo "$as_me: error: no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&2;}
4459    { (exit 1); exit 1; }; }
4460   fi
4461 else
4462   ac_cv_path_EGREP=$EGREP
4463 fi
4464
4465    fi
4466 fi
4467 { $as_echo "$as_me:$LINENO: result: $ac_cv_path_EGREP" >&5
4468 $as_echo "$ac_cv_path_EGREP" >&6; }
4469  EGREP="$ac_cv_path_EGREP"
4470
4471
4472 { $as_echo "$as_me:$LINENO: checking for ANSI C header files" >&5
4473 $as_echo_n "checking for ANSI C header files... " >&6; }
4474 if test "${ac_cv_header_stdc+set}" = set; then
4475   $as_echo_n "(cached) " >&6
4476 else
4477   cat >conftest.$ac_ext <<_ACEOF
4478 /* confdefs.h.  */
4479 _ACEOF
4480 cat confdefs.h >>conftest.$ac_ext
4481 cat >>conftest.$ac_ext <<_ACEOF
4482 /* end confdefs.h.  */
4483 #include <stdlib.h>
4484 #include <stdarg.h>
4485 #include <string.h>
4486 #include <float.h>
4487
4488 int
4489 main ()
4490 {
4491
4492   ;
4493   return 0;
4494 }
4495 _ACEOF
4496 rm -rf conftest.$ac_objext
4497 if { (ac_try="$ac_compile"
4498 case "(($ac_try" in
4499   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4500   *) ac_try_echo=$ac_try;;
4501 esac
4502 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
4503 $as_echo "$ac_try_echo") >&5
4504   (eval "$ac_compile") 2>conftest.er1
4505   ac_status=$?
4506   grep -v '^ *+' conftest.er1 >conftest.err
4507   rm -rf conftest.er1
4508   cat conftest.err >&5
4509   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
4510   (exit $ac_status); } && {
4511          test -z "$ac_c_werror_flag" ||
4512          test ! -s conftest.err
4513        } && test -s conftest.$ac_objext; then
4514   ac_cv_header_stdc=yes
4515 else
4516   $as_echo "$as_me: failed program was:" >&5
4517 sed 's/^/| /' conftest.$ac_ext >&5
4518
4519         ac_cv_header_stdc=no
4520 fi
4521
4522 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4523
4524 if test $ac_cv_header_stdc = yes; then
4525   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
4526   cat >conftest.$ac_ext <<_ACEOF
4527 /* confdefs.h.  */
4528 _ACEOF
4529 cat confdefs.h >>conftest.$ac_ext
4530 cat >>conftest.$ac_ext <<_ACEOF
4531 /* end confdefs.h.  */
4532 #include <string.h>
4533
4534 _ACEOF
4535 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4536   $EGREP "memchr" >/dev/null 2>&1; then
4537   :
4538 else
4539   ac_cv_header_stdc=no
4540 fi
4541 rm -rf conftest*
4542
4543 fi
4544
4545 if test $ac_cv_header_stdc = yes; then
4546   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
4547   cat >conftest.$ac_ext <<_ACEOF
4548 /* confdefs.h.  */
4549 _ACEOF
4550 cat confdefs.h >>conftest.$ac_ext
4551 cat >>conftest.$ac_ext <<_ACEOF
4552 /* end confdefs.h.  */
4553 #include <stdlib.h>
4554
4555 _ACEOF
4556 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4557   $EGREP "free" >/dev/null 2>&1; then
4558   :
4559 else
4560   ac_cv_header_stdc=no
4561 fi
4562 rm -rf conftest*
4563
4564 fi
4565
4566 if test $ac_cv_header_stdc = yes; then
4567   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
4568   if test "$cross_compiling" = yes; then
4569   :
4570 else
4571   cat >conftest.$ac_ext <<_ACEOF
4572 /* confdefs.h.  */
4573 _ACEOF
4574 cat confdefs.h >>conftest.$ac_ext
4575 cat >>conftest.$ac_ext <<_ACEOF
4576 /* end confdefs.h.  */
4577 #include <ctype.h>
4578 #include <stdlib.h>
4579 #if ((' ' & 0x0FF) == 0x020)
4580 # define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
4581 # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
4582 #else
4583 # define ISLOWER(c) \
4584                    (('a' <= (c) && (c) <= 'i') \
4585                      || ('j' <= (c) && (c) <= 'r') \
4586                      || ('s' <= (c) && (c) <= 'z'))
4587 # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
4588 #endif
4589
4590 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
4591 int
4592 main ()
4593 {
4594   int i;
4595   for (i = 0; i < 256; i++)
4596     if (XOR (islower (i), ISLOWER (i))
4597         || toupper (i) != TOUPPER (i))
4598       return 2;
4599   return 0;
4600 }
4601 _ACEOF
4602 rm -rf conftest$ac_exeext
4603 if { (ac_try="$ac_link"
4604 case "(($ac_try" in
4605   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4606   *) ac_try_echo=$ac_try;;
4607 esac
4608 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
4609 $as_echo "$ac_try_echo") >&5
4610   (eval "$ac_link") 2>&5
4611   ac_status=$?
4612   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
4613   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
4614   { (case "(($ac_try" in
4615   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4616   *) ac_try_echo=$ac_try;;
4617 esac
4618 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
4619 $as_echo "$ac_try_echo") >&5
4620   (eval "$ac_try") 2>&5
4621   ac_status=$?
4622   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
4623   (exit $ac_status); }; }; then
4624   :
4625 else
4626   $as_echo "$as_me: program exited with status $ac_status" >&5
4627 $as_echo "$as_me: failed program was:" >&5
4628 sed 's/^/| /' conftest.$ac_ext >&5
4629
4630 ( exit $ac_status )
4631 ac_cv_header_stdc=no
4632 fi
4633 rm -rf conftest.dSYM
4634 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
4635 fi
4636
4637
4638 fi
4639 fi
4640 { $as_echo "$as_me:$LINENO: result: $ac_cv_header_stdc" >&5
4641 $as_echo "$ac_cv_header_stdc" >&6; }
4642 if test $ac_cv_header_stdc = yes; then
4643
4644 cat >>confdefs.h <<\_ACEOF
4645 #define STDC_HEADERS 1
4646 _ACEOF
4647
4648 fi
4649
4650 # On IRIX 5.3, sys/types and inttypes.h are conflicting.
4651
4652
4653
4654
4655
4656
4657
4658
4659
4660 for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
4661                   inttypes.h stdint.h unistd.h
4662 do
4663 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
4664 { $as_echo "$as_me:$LINENO: checking for $ac_header" >&5
4665 $as_echo_n "checking for $ac_header... " >&6; }
4666 if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
4667   $as_echo_n "(cached) " >&6
4668 else
4669   cat >conftest.$ac_ext <<_ACEOF
4670 /* confdefs.h.  */
4671 _ACEOF
4672 cat confdefs.h >>conftest.$ac_ext
4673 cat >>conftest.$ac_ext <<_ACEOF
4674 /* end confdefs.h.  */
4675 $ac_includes_default
4676
4677 #include <$ac_header>
4678 _ACEOF
4679 rm -rf conftest.$ac_objext
4680 if { (ac_try="$ac_compile"
4681 case "(($ac_try" in
4682   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4683   *) ac_try_echo=$ac_try;;
4684 esac
4685 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
4686 $as_echo "$ac_try_echo") >&5
4687   (eval "$ac_compile") 2>conftest.er1
4688   ac_status=$?
4689   grep -v '^ *+' conftest.er1 >conftest.err
4690   rm -rf conftest.er1
4691   cat conftest.err >&5
4692   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
4693   (exit $ac_status); } && {
4694          test -z "$ac_c_werror_flag" ||
4695          test ! -s conftest.err
4696        } && test -s conftest.$ac_objext; then
4697   eval "$as_ac_Header=yes"
4698 else
4699   $as_echo "$as_me: failed program was:" >&5
4700 sed 's/^/| /' conftest.$ac_ext >&5
4701
4702         eval "$as_ac_Header=no"
4703 fi
4704
4705 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4706 fi
4707 ac_res=`eval 'as_val=${'$as_ac_Header'}
4708                  $as_echo "$as_val"'`
4709                { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
4710 $as_echo "$ac_res" >&6; }
4711 as_val=`eval 'as_val=${'$as_ac_Header'}
4712                  $as_echo "$as_val"'`
4713    if test "x$as_val" = x""yes; then
4714   cat >>confdefs.h <<_ACEOF
4715 #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
4716 _ACEOF
4717
4718 fi
4719
4720 done
4721
4722
4723
4724 for ac_header in unistd.h
4725 do
4726 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
4727 if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
4728   { $as_echo "$as_me:$LINENO: checking for $ac_header" >&5
4729 $as_echo_n "checking for $ac_header... " >&6; }
4730 if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
4731   $as_echo_n "(cached) " >&6
4732 fi
4733 ac_res=`eval 'as_val=${'$as_ac_Header'}
4734                  $as_echo "$as_val"'`
4735                { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
4736 $as_echo "$ac_res" >&6; }
4737 else
4738   # Is the header compilable?
4739 { $as_echo "$as_me:$LINENO: checking $ac_header usability" >&5
4740 $as_echo_n "checking $ac_header usability... " >&6; }
4741 cat >conftest.$ac_ext <<_ACEOF
4742 /* confdefs.h.  */
4743 _ACEOF
4744 cat confdefs.h >>conftest.$ac_ext
4745 cat >>conftest.$ac_ext <<_ACEOF
4746 /* end confdefs.h.  */
4747 $ac_includes_default
4748 #include <$ac_header>
4749 _ACEOF
4750 rm -rf conftest.$ac_objext
4751 if { (ac_try="$ac_compile"
4752 case "(($ac_try" in
4753   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4754   *) ac_try_echo=$ac_try;;
4755 esac
4756 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
4757 $as_echo "$ac_try_echo") >&5
4758   (eval "$ac_compile") 2>conftest.er1
4759   ac_status=$?
4760   grep -v '^ *+' conftest.er1 >conftest.err
4761   rm -rf conftest.er1
4762   cat conftest.err >&5
4763   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
4764   (exit $ac_status); } && {
4765          test -z "$ac_c_werror_flag" ||
4766          test ! -s conftest.err
4767        } && test -s conftest.$ac_objext; then
4768   ac_header_compiler=yes
4769 else
4770   $as_echo "$as_me: failed program was:" >&5
4771 sed 's/^/| /' conftest.$ac_ext >&5
4772
4773         ac_header_compiler=no
4774 fi
4775
4776 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4777 { $as_echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
4778 $as_echo "$ac_header_compiler" >&6; }
4779
4780 # Is the header present?
4781 { $as_echo "$as_me:$LINENO: checking $ac_header presence" >&5
4782 $as_echo_n "checking $ac_header presence... " >&6; }
4783 cat >conftest.$ac_ext <<_ACEOF
4784 /* confdefs.h.  */
4785 _ACEOF
4786 cat confdefs.h >>conftest.$ac_ext
4787 cat >>conftest.$ac_ext <<_ACEOF
4788 /* end confdefs.h.  */
4789 #include <$ac_header>
4790 _ACEOF
4791 if { (ac_try="$ac_cpp conftest.$ac_ext"
4792 case "(($ac_try" in
4793   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4794   *) ac_try_echo=$ac_try;;
4795 esac
4796 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
4797 $as_echo "$ac_try_echo") >&5
4798   (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
4799   ac_status=$?
4800   grep -v '^ *+' conftest.er1 >conftest.err
4801   rm -rf conftest.er1
4802   cat conftest.err >&5
4803   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
4804   (exit $ac_status); } >/dev/null && {
4805          test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
4806          test ! -s conftest.err
4807        }; then
4808   ac_header_preproc=yes
4809 else
4810   $as_echo "$as_me: failed program was:" >&5
4811 sed 's/^/| /' conftest.$ac_ext >&5
4812
4813   ac_header_preproc=no
4814 fi
4815
4816 rm -rf conftest.err conftest.$ac_ext
4817 { $as_echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
4818 $as_echo "$ac_header_preproc" >&6; }
4819
4820 # So?  What about this header?
4821 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
4822   yes:no: )
4823     { $as_echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
4824 $as_echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
4825     { $as_echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
4826 $as_echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
4827     ac_header_preproc=yes
4828     ;;
4829   no:yes:* )
4830     { $as_echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
4831 $as_echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
4832     { $as_echo "$as_me:$LINENO: WARNING: $ac_header:     check for missing prerequisite headers?" >&5
4833 $as_echo "$as_me: WARNING: $ac_header:     check for missing prerequisite headers?" >&2;}
4834     { $as_echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
4835 $as_echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
4836     { $as_echo "$as_me:$LINENO: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&5
4837 $as_echo "$as_me: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&2;}
4838     { $as_echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
4839 $as_echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
4840     { $as_echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
4841 $as_echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
4842
4843     ;;
4844 esac
4845 { $as_echo "$as_me:$LINENO: checking for $ac_header" >&5
4846 $as_echo_n "checking for $ac_header... " >&6; }
4847 if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
4848   $as_echo_n "(cached) " >&6
4849 else
4850   eval "$as_ac_Header=\$ac_header_preproc"
4851 fi
4852 ac_res=`eval 'as_val=${'$as_ac_Header'}
4853                  $as_echo "$as_val"'`
4854                { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
4855 $as_echo "$ac_res" >&6; }
4856
4857 fi
4858 as_val=`eval 'as_val=${'$as_ac_Header'}
4859                  $as_echo "$as_val"'`
4860    if test "x$as_val" = x""yes; then
4861   cat >>confdefs.h <<_ACEOF
4862 #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
4863 _ACEOF
4864
4865 fi
4866
4867 done
4868
4869 { $as_echo "$as_me:$LINENO: checking for mode_t" >&5
4870 $as_echo_n "checking for mode_t... " >&6; }
4871 if test "${ac_cv_type_mode_t+set}" = set; then
4872   $as_echo_n "(cached) " >&6
4873 else
4874   ac_cv_type_mode_t=no
4875 cat >conftest.$ac_ext <<_ACEOF
4876 /* confdefs.h.  */
4877 _ACEOF
4878 cat confdefs.h >>conftest.$ac_ext
4879 cat >>conftest.$ac_ext <<_ACEOF
4880 /* end confdefs.h.  */
4881 $ac_includes_default
4882 int
4883 main ()
4884 {
4885 if (sizeof (mode_t))
4886        return 0;
4887   ;
4888   return 0;
4889 }
4890 _ACEOF
4891 rm -rf conftest.$ac_objext
4892 if { (ac_try="$ac_compile"
4893 case "(($ac_try" in
4894   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4895   *) ac_try_echo=$ac_try;;
4896 esac
4897 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
4898 $as_echo "$ac_try_echo") >&5
4899   (eval "$ac_compile") 2>conftest.er1
4900   ac_status=$?
4901   grep -v '^ *+' conftest.er1 >conftest.err
4902   rm -rf conftest.er1
4903   cat conftest.err >&5
4904   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
4905   (exit $ac_status); } && {
4906          test -z "$ac_c_werror_flag" ||
4907          test ! -s conftest.err
4908        } && test -s conftest.$ac_objext; then
4909   cat >conftest.$ac_ext <<_ACEOF
4910 /* confdefs.h.  */
4911 _ACEOF
4912 cat confdefs.h >>conftest.$ac_ext
4913 cat >>conftest.$ac_ext <<_ACEOF
4914 /* end confdefs.h.  */
4915 $ac_includes_default
4916 int
4917 main ()
4918 {
4919 if (sizeof ((mode_t)))
4920           return 0;
4921   ;
4922   return 0;
4923 }
4924 _ACEOF
4925 rm -rf conftest.$ac_objext
4926 if { (ac_try="$ac_compile"
4927 case "(($ac_try" in
4928   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4929   *) ac_try_echo=$ac_try;;
4930 esac
4931 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
4932 $as_echo "$ac_try_echo") >&5
4933   (eval "$ac_compile") 2>conftest.er1
4934   ac_status=$?
4935   grep -v '^ *+' conftest.er1 >conftest.err
4936   rm -rf conftest.er1
4937   cat conftest.err >&5
4938   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
4939   (exit $ac_status); } && {
4940          test -z "$ac_c_werror_flag" ||
4941          test ! -s conftest.err
4942        } && test -s conftest.$ac_objext; then
4943   :
4944 else
4945   $as_echo "$as_me: failed program was:" >&5
4946 sed 's/^/| /' conftest.$ac_ext >&5
4947
4948         ac_cv_type_mode_t=yes
4949 fi
4950
4951 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4952 else
4953   $as_echo "$as_me: failed program was:" >&5
4954 sed 's/^/| /' conftest.$ac_ext >&5
4955
4956
4957 fi
4958
4959 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4960 fi
4961 { $as_echo "$as_me:$LINENO: result: $ac_cv_type_mode_t" >&5
4962 $as_echo "$ac_cv_type_mode_t" >&6; }
4963 if test "x$ac_cv_type_mode_t" = x""yes; then
4964   :
4965 else
4966
4967 cat >>confdefs.h <<_ACEOF
4968 #define mode_t int
4969 _ACEOF
4970
4971 fi
4972
4973 { $as_echo "$as_me:$LINENO: checking for pid_t" >&5
4974 $as_echo_n "checking for pid_t... " >&6; }
4975 if test "${ac_cv_type_pid_t+set}" = set; then
4976   $as_echo_n "(cached) " >&6
4977 else
4978   ac_cv_type_pid_t=no
4979 cat >conftest.$ac_ext <<_ACEOF
4980 /* confdefs.h.  */
4981 _ACEOF
4982 cat confdefs.h >>conftest.$ac_ext
4983 cat >>conftest.$ac_ext <<_ACEOF
4984 /* end confdefs.h.  */
4985 $ac_includes_default
4986 int
4987 main ()
4988 {
4989 if (sizeof (pid_t))
4990        return 0;
4991   ;
4992   return 0;
4993 }
4994 _ACEOF
4995 rm -rf conftest.$ac_objext
4996 if { (ac_try="$ac_compile"
4997 case "(($ac_try" in
4998   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4999   *) ac_try_echo=$ac_try;;
5000 esac
5001 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
5002 $as_echo "$ac_try_echo") >&5
5003   (eval "$ac_compile") 2>conftest.er1
5004   ac_status=$?
5005   grep -v '^ *+' conftest.er1 >conftest.err
5006   rm -rf conftest.er1
5007   cat conftest.err >&5
5008   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
5009   (exit $ac_status); } && {
5010          test -z "$ac_c_werror_flag" ||
5011          test ! -s conftest.err
5012        } && test -s conftest.$ac_objext; then
5013   cat >conftest.$ac_ext <<_ACEOF
5014 /* confdefs.h.  */
5015 _ACEOF
5016 cat confdefs.h >>conftest.$ac_ext
5017 cat >>conftest.$ac_ext <<_ACEOF
5018 /* end confdefs.h.  */
5019 $ac_includes_default
5020 int
5021 main ()
5022 {
5023 if (sizeof ((pid_t)))
5024           return 0;
5025   ;
5026   return 0;
5027 }
5028 _ACEOF
5029 rm -rf conftest.$ac_objext
5030 if { (ac_try="$ac_compile"
5031 case "(($ac_try" in
5032   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5033   *) ac_try_echo=$ac_try;;
5034 esac
5035 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
5036 $as_echo "$ac_try_echo") >&5
5037   (eval "$ac_compile") 2>conftest.er1
5038   ac_status=$?
5039   grep -v '^ *+' conftest.er1 >conftest.err
5040   rm -rf conftest.er1
5041   cat conftest.err >&5
5042   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
5043   (exit $ac_status); } && {
5044          test -z "$ac_c_werror_flag" ||
5045          test ! -s conftest.err
5046        } && test -s conftest.$ac_objext; then
5047   :
5048 else
5049   $as_echo "$as_me: failed program was:" >&5
5050 sed 's/^/| /' conftest.$ac_ext >&5
5051
5052         ac_cv_type_pid_t=yes
5053 fi
5054
5055 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5056 else
5057   $as_echo "$as_me: failed program was:" >&5
5058 sed 's/^/| /' conftest.$ac_ext >&5
5059
5060
5061 fi
5062
5063 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5064 fi
5065 { $as_echo "$as_me:$LINENO: result: $ac_cv_type_pid_t" >&5
5066 $as_echo "$ac_cv_type_pid_t" >&6; }
5067 if test "x$ac_cv_type_pid_t" = x""yes; then
5068   :
5069 else
5070
5071 cat >>confdefs.h <<_ACEOF
5072 #define pid_t int
5073 _ACEOF
5074
5075 fi
5076
5077 { $as_echo "$as_me:$LINENO: checking for size_t" >&5
5078 $as_echo_n "checking for size_t... " >&6; }
5079 if test "${ac_cv_type_size_t+set}" = set; then
5080   $as_echo_n "(cached) " >&6
5081 else
5082   ac_cv_type_size_t=no
5083 cat >conftest.$ac_ext <<_ACEOF
5084 /* confdefs.h.  */
5085 _ACEOF
5086 cat confdefs.h >>conftest.$ac_ext
5087 cat >>conftest.$ac_ext <<_ACEOF
5088 /* end confdefs.h.  */
5089 $ac_includes_default
5090 int
5091 main ()
5092 {
5093 if (sizeof (size_t))
5094        return 0;
5095   ;
5096   return 0;
5097 }
5098 _ACEOF
5099 rm -rf conftest.$ac_objext
5100 if { (ac_try="$ac_compile"
5101 case "(($ac_try" in
5102   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5103   *) ac_try_echo=$ac_try;;
5104 esac
5105 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
5106 $as_echo "$ac_try_echo") >&5
5107   (eval "$ac_compile") 2>conftest.er1
5108   ac_status=$?
5109   grep -v '^ *+' conftest.er1 >conftest.err
5110   rm -rf conftest.er1
5111   cat conftest.err >&5
5112   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
5113   (exit $ac_status); } && {
5114          test -z "$ac_c_werror_flag" ||
5115          test ! -s conftest.err
5116        } && test -s conftest.$ac_objext; then
5117   cat >conftest.$ac_ext <<_ACEOF
5118 /* confdefs.h.  */
5119 _ACEOF
5120 cat confdefs.h >>conftest.$ac_ext
5121 cat >>conftest.$ac_ext <<_ACEOF
5122 /* end confdefs.h.  */
5123 $ac_includes_default
5124 int
5125 main ()
5126 {
5127 if (sizeof ((size_t)))
5128           return 0;
5129   ;
5130   return 0;
5131 }
5132 _ACEOF
5133 rm -rf conftest.$ac_objext
5134 if { (ac_try="$ac_compile"
5135 case "(($ac_try" in
5136   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5137   *) ac_try_echo=$ac_try;;
5138 esac
5139 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
5140 $as_echo "$ac_try_echo") >&5
5141   (eval "$ac_compile") 2>conftest.er1
5142   ac_status=$?
5143   grep -v '^ *+' conftest.er1 >conftest.err
5144   rm -rf conftest.er1
5145   cat conftest.err >&5
5146   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
5147   (exit $ac_status); } && {
5148          test -z "$ac_c_werror_flag" ||
5149          test ! -s conftest.err
5150        } && test -s conftest.$ac_objext; then
5151   :
5152 else
5153   $as_echo "$as_me: failed program was:" >&5
5154 sed 's/^/| /' conftest.$ac_ext >&5
5155
5156         ac_cv_type_size_t=yes
5157 fi
5158
5159 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5160 else
5161   $as_echo "$as_me: failed program was:" >&5
5162 sed 's/^/| /' conftest.$ac_ext >&5
5163
5164
5165 fi
5166
5167 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5168 fi
5169 { $as_echo "$as_me:$LINENO: result: $ac_cv_type_size_t" >&5
5170 $as_echo "$ac_cv_type_size_t" >&6; }
5171 if test "x$ac_cv_type_size_t" = x""yes; then
5172   :
5173 else
5174
5175 cat >>confdefs.h <<_ACEOF
5176 #define size_t unsigned int
5177 _ACEOF
5178
5179 fi
5180
5181 { $as_echo "$as_me:$LINENO: checking return type of signal handlers" >&5
5182 $as_echo_n "checking return type of signal handlers... " >&6; }
5183 if test "${ac_cv_type_signal+set}" = set; then
5184   $as_echo_n "(cached) " >&6
5185 else
5186   cat >conftest.$ac_ext <<_ACEOF
5187 /* confdefs.h.  */
5188 _ACEOF
5189 cat confdefs.h >>conftest.$ac_ext
5190 cat >>conftest.$ac_ext <<_ACEOF
5191 /* end confdefs.h.  */
5192 #include <sys/types.h>
5193 #include <signal.h>
5194
5195 int
5196 main ()
5197 {
5198 return *(signal (0, 0)) (0) == 1;
5199   ;
5200   return 0;
5201 }
5202 _ACEOF
5203 rm -rf conftest.$ac_objext
5204 if { (ac_try="$ac_compile"
5205 case "(($ac_try" in
5206   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5207   *) ac_try_echo=$ac_try;;
5208 esac
5209 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
5210 $as_echo "$ac_try_echo") >&5
5211   (eval "$ac_compile") 2>conftest.er1
5212   ac_status=$?
5213   grep -v '^ *+' conftest.er1 >conftest.err
5214   rm -rf conftest.er1
5215   cat conftest.err >&5
5216   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
5217   (exit $ac_status); } && {
5218          test -z "$ac_c_werror_flag" ||
5219          test ! -s conftest.err
5220        } && test -s conftest.$ac_objext; then
5221   ac_cv_type_signal=int
5222 else
5223   $as_echo "$as_me: failed program was:" >&5
5224 sed 's/^/| /' conftest.$ac_ext >&5
5225
5226         ac_cv_type_signal=void
5227 fi
5228
5229 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5230 fi
5231 { $as_echo "$as_me:$LINENO: result: $ac_cv_type_signal" >&5
5232 $as_echo "$ac_cv_type_signal" >&6; }
5233
5234 cat >>confdefs.h <<_ACEOF
5235 #define RETSIGTYPE $ac_cv_type_signal
5236 _ACEOF
5237
5238
5239 { $as_echo "$as_me:$LINENO: checking whether time.h and sys/time.h may both be included" >&5
5240 $as_echo_n "checking whether time.h and sys/time.h may both be included... " >&6; }
5241 if test "${ac_cv_header_time+set}" = set; then
5242   $as_echo_n "(cached) " >&6
5243 else
5244   cat >conftest.$ac_ext <<_ACEOF
5245 /* confdefs.h.  */
5246 _ACEOF
5247 cat confdefs.h >>conftest.$ac_ext
5248 cat >>conftest.$ac_ext <<_ACEOF
5249 /* end confdefs.h.  */
5250 #include <sys/types.h>
5251 #include <sys/time.h>
5252 #include <time.h>
5253
5254 int
5255 main ()
5256 {
5257 if ((struct tm *) 0)
5258 return 0;
5259   ;
5260   return 0;
5261 }
5262 _ACEOF
5263 rm -rf conftest.$ac_objext
5264 if { (ac_try="$ac_compile"
5265 case "(($ac_try" in
5266   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5267   *) ac_try_echo=$ac_try;;
5268 esac
5269 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
5270 $as_echo "$ac_try_echo") >&5
5271   (eval "$ac_compile") 2>conftest.er1
5272   ac_status=$?
5273   grep -v '^ *+' conftest.er1 >conftest.err
5274   rm -rf conftest.er1
5275   cat conftest.err >&5
5276   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
5277   (exit $ac_status); } && {
5278          test -z "$ac_c_werror_flag" ||
5279          test ! -s conftest.err
5280        } && test -s conftest.$ac_objext; then
5281   ac_cv_header_time=yes
5282 else
5283   $as_echo "$as_me: failed program was:" >&5
5284 sed 's/^/| /' conftest.$ac_ext >&5
5285
5286         ac_cv_header_time=no
5287 fi
5288
5289 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5290 fi
5291 { $as_echo "$as_me:$LINENO: result: $ac_cv_header_time" >&5
5292 $as_echo "$ac_cv_header_time" >&6; }
5293 if test $ac_cv_header_time = yes; then
5294
5295 cat >>confdefs.h <<\_ACEOF
5296 #define TIME_WITH_SYS_TIME 1
5297 _ACEOF
5298
5299 fi
5300
5301 { $as_echo "$as_me:$LINENO: checking for sys/wait.h that is POSIX.1 compatible" >&5
5302 $as_echo_n "checking for sys/wait.h that is POSIX.1 compatible... " >&6; }
5303 if test "${ac_cv_header_sys_wait_h+set}" = set; then
5304   $as_echo_n "(cached) " >&6
5305 else
5306   cat >conftest.$ac_ext <<_ACEOF
5307 /* confdefs.h.  */
5308 _ACEOF
5309 cat confdefs.h >>conftest.$ac_ext
5310 cat >>conftest.$ac_ext <<_ACEOF
5311 /* end confdefs.h.  */
5312 #include <sys/types.h>
5313 #include <sys/wait.h>
5314 #ifndef WEXITSTATUS
5315 # define WEXITSTATUS(stat_val) ((unsigned int) (stat_val) >> 8)
5316 #endif
5317 #ifndef WIFEXITED
5318 # define WIFEXITED(stat_val) (((stat_val) & 255) == 0)
5319 #endif
5320
5321 int
5322 main ()
5323 {
5324   int s;
5325   wait (&s);
5326   s = WIFEXITED (s) ? WEXITSTATUS (s) : 1;
5327   ;
5328   return 0;
5329 }
5330 _ACEOF
5331 rm -rf conftest.$ac_objext
5332 if { (ac_try="$ac_compile"
5333 case "(($ac_try" in
5334   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5335   *) ac_try_echo=$ac_try;;
5336 esac
5337 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
5338 $as_echo "$ac_try_echo") >&5
5339   (eval "$ac_compile") 2>conftest.er1
5340   ac_status=$?
5341   grep -v '^ *+' conftest.er1 >conftest.err
5342   rm -rf conftest.er1
5343   cat conftest.err >&5
5344   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
5345   (exit $ac_status); } && {
5346          test -z "$ac_c_werror_flag" ||
5347          test ! -s conftest.err
5348        } && test -s conftest.$ac_objext; then
5349   ac_cv_header_sys_wait_h=yes
5350 else
5351   $as_echo "$as_me: failed program was:" >&5
5352 sed 's/^/| /' conftest.$ac_ext >&5
5353
5354         ac_cv_header_sys_wait_h=no
5355 fi
5356
5357 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5358 fi
5359 { $as_echo "$as_me:$LINENO: result: $ac_cv_header_sys_wait_h" >&5
5360 $as_echo "$ac_cv_header_sys_wait_h" >&6; }
5361 if test $ac_cv_header_sys_wait_h = yes; then
5362
5363 cat >>confdefs.h <<\_ACEOF
5364 #define HAVE_SYS_WAIT_H 1
5365 _ACEOF
5366
5367 fi
5368
5369
5370
5371
5372
5373
5374 ac_header_dirent=no
5375 for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h; do
5376   as_ac_Header=`$as_echo "ac_cv_header_dirent_$ac_hdr" | $as_tr_sh`
5377 { $as_echo "$as_me:$LINENO: checking for $ac_hdr that defines DIR" >&5
5378 $as_echo_n "checking for $ac_hdr that defines DIR... " >&6; }
5379 if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
5380   $as_echo_n "(cached) " >&6
5381 else
5382   cat >conftest.$ac_ext <<_ACEOF
5383 /* confdefs.h.  */
5384 _ACEOF
5385 cat confdefs.h >>conftest.$ac_ext
5386 cat >>conftest.$ac_ext <<_ACEOF
5387 /* end confdefs.h.  */
5388 #include <sys/types.h>
5389 #include <$ac_hdr>
5390
5391 int
5392 main ()
5393 {
5394 if ((DIR *) 0)
5395 return 0;
5396   ;
5397   return 0;
5398 }
5399 _ACEOF
5400 rm -rf conftest.$ac_objext
5401 if { (ac_try="$ac_compile"
5402 case "(($ac_try" in
5403   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5404   *) ac_try_echo=$ac_try;;
5405 esac
5406 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
5407 $as_echo "$ac_try_echo") >&5
5408   (eval "$ac_compile") 2>conftest.er1
5409   ac_status=$?
5410   grep -v '^ *+' conftest.er1 >conftest.err
5411   rm -rf conftest.er1
5412   cat conftest.err >&5
5413   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
5414   (exit $ac_status); } && {
5415          test -z "$ac_c_werror_flag" ||
5416          test ! -s conftest.err
5417        } && test -s conftest.$ac_objext; then
5418   eval "$as_ac_Header=yes"
5419 else
5420   $as_echo "$as_me: failed program was:" >&5
5421 sed 's/^/| /' conftest.$ac_ext >&5
5422
5423         eval "$as_ac_Header=no"
5424 fi
5425
5426 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5427 fi
5428 ac_res=`eval 'as_val=${'$as_ac_Header'}
5429                  $as_echo "$as_val"'`
5430                { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
5431 $as_echo "$ac_res" >&6; }
5432 as_val=`eval 'as_val=${'$as_ac_Header'}
5433                  $as_echo "$as_val"'`
5434    if test "x$as_val" = x""yes; then
5435   cat >>confdefs.h <<_ACEOF
5436 #define `$as_echo "HAVE_$ac_hdr" | $as_tr_cpp` 1
5437 _ACEOF
5438
5439 ac_header_dirent=$ac_hdr; break
5440 fi
5441
5442 done
5443 # Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
5444 if test $ac_header_dirent = dirent.h; then
5445   { $as_echo "$as_me:$LINENO: checking for library containing opendir" >&5
5446 $as_echo_n "checking for library containing opendir... " >&6; }
5447 if test "${ac_cv_search_opendir+set}" = set; then
5448   $as_echo_n "(cached) " >&6
5449 else
5450   ac_func_search_save_LIBS=$LIBS
5451 cat >conftest.$ac_ext <<_ACEOF
5452 /* confdefs.h.  */
5453 _ACEOF
5454 cat confdefs.h >>conftest.$ac_ext
5455 cat >>conftest.$ac_ext <<_ACEOF
5456 /* end confdefs.h.  */
5457
5458 /* Override any GCC internal prototype to avoid an error.
5459    Use char because int might match the return type of a GCC
5460    builtin and then its argument prototype would still apply.  */
5461 #ifdef __cplusplus
5462 extern "C"
5463 #endif
5464 char opendir ();
5465 int
5466 main ()
5467 {
5468 return opendir ();
5469   ;
5470   return 0;
5471 }
5472 _ACEOF
5473 for ac_lib in '' dir; do
5474   if test -z "$ac_lib"; then
5475     ac_res="none required"
5476   else
5477     ac_res=-l$ac_lib
5478     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
5479   fi
5480   rm -rf conftest.$ac_objext conftest$ac_exeext
5481 if { (ac_try="$ac_link"
5482 case "(($ac_try" in
5483   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5484   *) ac_try_echo=$ac_try;;
5485 esac
5486 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
5487 $as_echo "$ac_try_echo") >&5
5488   (eval "$ac_link") 2>conftest.er1
5489   ac_status=$?
5490   grep -v '^ *+' conftest.er1 >conftest.err
5491   rm -rf conftest.er1
5492   cat conftest.err >&5
5493   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
5494   (exit $ac_status); } && {
5495          test -z "$ac_c_werror_flag" ||
5496          test ! -s conftest.err
5497        } && test -s conftest$ac_exeext && {
5498          test "$cross_compiling" = yes ||
5499          $as_test_x conftest$ac_exeext
5500        }; then
5501   ac_cv_search_opendir=$ac_res
5502 else
5503   $as_echo "$as_me: failed program was:" >&5
5504 sed 's/^/| /' conftest.$ac_ext >&5
5505
5506
5507 fi
5508
5509 rm -rf conftest.dSYM
5510 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
5511       conftest$ac_exeext
5512   if test "${ac_cv_search_opendir+set}" = set; then
5513   break
5514 fi
5515 done
5516 if test "${ac_cv_search_opendir+set}" = set; then
5517   :
5518 else
5519   ac_cv_search_opendir=no
5520 fi
5521 rm conftest.$ac_ext
5522 LIBS=$ac_func_search_save_LIBS
5523 fi
5524 { $as_echo "$as_me:$LINENO: result: $ac_cv_search_opendir" >&5
5525 $as_echo "$ac_cv_search_opendir" >&6; }
5526 ac_res=$ac_cv_search_opendir
5527 if test "$ac_res" != no; then
5528   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
5529
5530 fi
5531
5532 else
5533   { $as_echo "$as_me:$LINENO: checking for library containing opendir" >&5
5534 $as_echo_n "checking for library containing opendir... " >&6; }
5535 if test "${ac_cv_search_opendir+set}" = set; then
5536   $as_echo_n "(cached) " >&6
5537 else
5538   ac_func_search_save_LIBS=$LIBS
5539 cat >conftest.$ac_ext <<_ACEOF
5540 /* confdefs.h.  */
5541 _ACEOF
5542 cat confdefs.h >>conftest.$ac_ext
5543 cat >>conftest.$ac_ext <<_ACEOF
5544 /* end confdefs.h.  */
5545
5546 /* Override any GCC internal prototype to avoid an error.
5547    Use char because int might match the return type of a GCC
5548    builtin and then its argument prototype would still apply.  */
5549 #ifdef __cplusplus
5550 extern "C"
5551 #endif
5552 char opendir ();
5553 int
5554 main ()
5555 {
5556 return opendir ();
5557   ;
5558   return 0;
5559 }
5560 _ACEOF
5561 for ac_lib in '' x; do
5562   if test -z "$ac_lib"; then
5563     ac_res="none required"
5564   else
5565     ac_res=-l$ac_lib
5566     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
5567   fi
5568   rm -rf conftest.$ac_objext conftest$ac_exeext
5569 if { (ac_try="$ac_link"
5570 case "(($ac_try" in
5571   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5572   *) ac_try_echo=$ac_try;;
5573 esac
5574 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
5575 $as_echo "$ac_try_echo") >&5
5576   (eval "$ac_link") 2>conftest.er1
5577   ac_status=$?
5578   grep -v '^ *+' conftest.er1 >conftest.err
5579   rm -rf conftest.er1
5580   cat conftest.err >&5
5581   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
5582   (exit $ac_status); } && {
5583          test -z "$ac_c_werror_flag" ||
5584          test ! -s conftest.err
5585        } && test -s conftest$ac_exeext && {
5586          test "$cross_compiling" = yes ||
5587          $as_test_x conftest$ac_exeext
5588        }; then
5589   ac_cv_search_opendir=$ac_res
5590 else
5591   $as_echo "$as_me: failed program was:" >&5
5592 sed 's/^/| /' conftest.$ac_ext >&5
5593
5594
5595 fi
5596
5597 rm -rf conftest.dSYM
5598 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
5599       conftest$ac_exeext
5600   if test "${ac_cv_search_opendir+set}" = set; then
5601   break
5602 fi
5603 done
5604 if test "${ac_cv_search_opendir+set}" = set; then
5605   :
5606 else
5607   ac_cv_search_opendir=no
5608 fi
5609 rm conftest.$ac_ext
5610 LIBS=$ac_func_search_save_LIBS
5611 fi
5612 { $as_echo "$as_me:$LINENO: result: $ac_cv_search_opendir" >&5
5613 $as_echo "$ac_cv_search_opendir" >&6; }
5614 ac_res=$ac_cv_search_opendir
5615 if test "$ac_res" != no; then
5616   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
5617
5618 fi
5619
5620 fi
5621
5622 { $as_echo "$as_me:$LINENO: checking how to call gettimeofday" >&5
5623 $as_echo_n "checking how to call gettimeofday... " >&6; }
5624   if test "${ac_cv_gettimeofday_args+set}" = set; then
5625   $as_echo_n "(cached) " >&6
5626 else
5627   cat >conftest.$ac_ext <<_ACEOF
5628 /* confdefs.h.  */
5629 _ACEOF
5630 cat confdefs.h >>conftest.$ac_ext
5631 cat >>conftest.$ac_ext <<_ACEOF
5632 /* end confdefs.h.  */
5633 #include <stdlib.h>
5634                     #include <sys/time.h>
5635 int
5636 main ()
5637 {
5638 struct timeval tv; struct timezone tzp;
5639                     gettimeofday(&tv, &tzp);
5640   ;
5641   return 0;
5642 }
5643 _ACEOF
5644 rm -rf conftest.$ac_objext
5645 if { (ac_try="$ac_compile"
5646 case "(($ac_try" in
5647   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5648   *) ac_try_echo=$ac_try;;
5649 esac
5650 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
5651 $as_echo "$ac_try_echo") >&5
5652   (eval "$ac_compile") 2>conftest.er1
5653   ac_status=$?
5654   grep -v '^ *+' conftest.er1 >conftest.err
5655   rm -rf conftest.er1
5656   cat conftest.err >&5
5657   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
5658   (exit $ac_status); } && {
5659          test -z "$ac_c_werror_flag" ||
5660          test ! -s conftest.err
5661        } && test -s conftest.$ac_objext; then
5662   ac_gettimeofday_args=2
5663 else
5664   $as_echo "$as_me: failed program was:" >&5
5665 sed 's/^/| /' conftest.$ac_ext >&5
5666
5667         cat >conftest.$ac_ext <<_ACEOF
5668 /* confdefs.h.  */
5669 _ACEOF
5670 cat confdefs.h >>conftest.$ac_ext
5671 cat >>conftest.$ac_ext <<_ACEOF
5672 /* end confdefs.h.  */
5673 #include <stdlib.h>
5674                                     #include <sys/time.h>
5675 int
5676 main ()
5677 {
5678 struct timeval tv; gettimeofday(&tv);
5679   ;
5680   return 0;
5681 }
5682 _ACEOF
5683 rm -rf conftest.$ac_objext
5684 if { (ac_try="$ac_compile"
5685 case "(($ac_try" in
5686   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5687   *) ac_try_echo=$ac_try;;
5688 esac
5689 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
5690 $as_echo "$ac_try_echo") >&5
5691   (eval "$ac_compile") 2>conftest.er1
5692   ac_status=$?
5693   grep -v '^ *+' conftest.er1 >conftest.err
5694   rm -rf conftest.er1
5695   cat conftest.err >&5
5696   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
5697   (exit $ac_status); } && {
5698          test -z "$ac_c_werror_flag" ||
5699          test ! -s conftest.err
5700        } && test -s conftest.$ac_objext; then
5701   ac_gettimeofday_args=1
5702 else
5703   $as_echo "$as_me: failed program was:" >&5
5704 sed 's/^/| /' conftest.$ac_ext >&5
5705
5706         ac_gettimeofday_args=0
5707 fi
5708
5709 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5710 fi
5711
5712 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5713     ac_cv_gettimeofday_args=$ac_gettimeofday_args
5714 fi
5715
5716   ac_gettimeofday_args=$ac_cv_gettimeofday_args
5717   if test "$ac_gettimeofday_args" = 1 ; then
5718     cat >>confdefs.h <<\_ACEOF
5719 #define HAVE_GETTIMEOFDAY 1
5720 _ACEOF
5721
5722     { $as_echo "$as_me:$LINENO: result: one argument" >&5
5723 $as_echo "one argument" >&6; }
5724   elif test "$ac_gettimeofday_args" = 2 ; then
5725     cat >>confdefs.h <<\_ACEOF
5726 #define HAVE_GETTIMEOFDAY 1
5727 _ACEOF
5728
5729     cat >>confdefs.h <<\_ACEOF
5730 #define GETTIMEOFDAY_TWO_ARGS 1
5731 _ACEOF
5732
5733     { $as_echo "$as_me:$LINENO: result: two arguments" >&5
5734 $as_echo "two arguments" >&6; }
5735   else
5736     { $as_echo "$as_me:$LINENO: result: unknown" >&5
5737 $as_echo "unknown" >&6; }
5738   fi
5739
5740
5741
5742
5743
5744
5745
5746
5747
5748
5749 for ac_func in select fcntl uname nice setpriority getcwd getwd putenv sbrk
5750 do
5751 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
5752 { $as_echo "$as_me:$LINENO: checking for $ac_func" >&5
5753 $as_echo_n "checking for $ac_func... " >&6; }
5754 if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
5755   $as_echo_n "(cached) " >&6
5756 else
5757   cat >conftest.$ac_ext <<_ACEOF
5758 /* confdefs.h.  */
5759 _ACEOF
5760 cat confdefs.h >>conftest.$ac_ext
5761 cat >>conftest.$ac_ext <<_ACEOF
5762 /* end confdefs.h.  */
5763 /* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
5764    For example, HP-UX 11i <limits.h> declares gettimeofday.  */
5765 #define $ac_func innocuous_$ac_func
5766
5767 /* System header to define __stub macros and hopefully few prototypes,
5768     which can conflict with char $ac_func (); below.
5769     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
5770     <limits.h> exists even on freestanding compilers.  */
5771
5772 #ifdef __STDC__
5773 # include <limits.h>
5774 #else
5775 # include <assert.h>
5776 #endif
5777
5778 #undef $ac_func
5779
5780 /* Override any GCC internal prototype to avoid an error.
5781    Use char because int might match the return type of a GCC
5782    builtin and then its argument prototype would still apply.  */
5783 #ifdef __cplusplus
5784 extern "C"
5785 #endif
5786 char $ac_func ();
5787 /* The GNU C library defines this for functions which it implements
5788     to always fail with ENOSYS.  Some functions are actually named
5789     something starting with __ and the normal name is an alias.  */
5790 #if defined __stub_$ac_func || defined __stub___$ac_func
5791 choke me
5792 #endif
5793
5794 int
5795 main ()
5796 {
5797 return $ac_func ();
5798   ;
5799   return 0;
5800 }
5801 _ACEOF
5802 rm -rf conftest.$ac_objext conftest$ac_exeext
5803 if { (ac_try="$ac_link"
5804 case "(($ac_try" in
5805   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5806   *) ac_try_echo=$ac_try;;
5807 esac
5808 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
5809 $as_echo "$ac_try_echo") >&5
5810   (eval "$ac_link") 2>conftest.er1
5811   ac_status=$?
5812   grep -v '^ *+' conftest.er1 >conftest.err
5813   rm -rf conftest.er1
5814   cat conftest.err >&5
5815   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
5816   (exit $ac_status); } && {
5817          test -z "$ac_c_werror_flag" ||
5818          test ! -s conftest.err
5819        } && test -s conftest$ac_exeext && {
5820          test "$cross_compiling" = yes ||
5821          $as_test_x conftest$ac_exeext
5822        }; then
5823   eval "$as_ac_var=yes"
5824 else
5825   $as_echo "$as_me: failed program was:" >&5
5826 sed 's/^/| /' conftest.$ac_ext >&5
5827
5828         eval "$as_ac_var=no"
5829 fi
5830
5831 rm -rf conftest.dSYM
5832 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
5833       conftest$ac_exeext conftest.$ac_ext
5834 fi
5835 ac_res=`eval 'as_val=${'$as_ac_var'}
5836                  $as_echo "$as_val"'`
5837                { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
5838 $as_echo "$ac_res" >&6; }
5839 as_val=`eval 'as_val=${'$as_ac_var'}
5840                  $as_echo "$as_val"'`
5841    if test "x$as_val" = x""yes; then
5842   cat >>confdefs.h <<_ACEOF
5843 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
5844 _ACEOF
5845
5846 fi
5847 done
5848
5849
5850
5851
5852
5853 for ac_func in sigaction syslog realpath setrlimit
5854 do
5855 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
5856 { $as_echo "$as_me:$LINENO: checking for $ac_func" >&5
5857 $as_echo_n "checking for $ac_func... " >&6; }
5858 if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
5859   $as_echo_n "(cached) " >&6
5860 else
5861   cat >conftest.$ac_ext <<_ACEOF
5862 /* confdefs.h.  */
5863 _ACEOF
5864 cat confdefs.h >>conftest.$ac_ext
5865 cat >>conftest.$ac_ext <<_ACEOF
5866 /* end confdefs.h.  */
5867 /* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
5868    For example, HP-UX 11i <limits.h> declares gettimeofday.  */
5869 #define $ac_func innocuous_$ac_func
5870
5871 /* System header to define __stub macros and hopefully few prototypes,
5872     which can conflict with char $ac_func (); below.
5873     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
5874     <limits.h> exists even on freestanding compilers.  */
5875
5876 #ifdef __STDC__
5877 # include <limits.h>
5878 #else
5879 # include <assert.h>
5880 #endif
5881
5882 #undef $ac_func
5883
5884 /* Override any GCC internal prototype to avoid an error.
5885    Use char because int might match the return type of a GCC
5886    builtin and then its argument prototype would still apply.  */
5887 #ifdef __cplusplus
5888 extern "C"
5889 #endif
5890 char $ac_func ();
5891 /* The GNU C library defines this for functions which it implements
5892     to always fail with ENOSYS.  Some functions are actually named
5893     something starting with __ and the normal name is an alias.  */
5894 #if defined __stub_$ac_func || defined __stub___$ac_func
5895 choke me
5896 #endif
5897
5898 int
5899 main ()
5900 {
5901 return $ac_func ();
5902   ;
5903   return 0;
5904 }
5905 _ACEOF
5906 rm -rf conftest.$ac_objext conftest$ac_exeext
5907 if { (ac_try="$ac_link"
5908 case "(($ac_try" in
5909   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5910   *) ac_try_echo=$ac_try;;
5911 esac
5912 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
5913 $as_echo "$ac_try_echo") >&5
5914   (eval "$ac_link") 2>conftest.er1
5915   ac_status=$?
5916   grep -v '^ *+' conftest.er1 >conftest.err
5917   rm -rf conftest.er1
5918   cat conftest.err >&5
5919   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
5920   (exit $ac_status); } && {
5921          test -z "$ac_c_werror_flag" ||
5922          test ! -s conftest.err
5923        } && test -s conftest$ac_exeext && {
5924          test "$cross_compiling" = yes ||
5925          $as_test_x conftest$ac_exeext
5926        }; then
5927   eval "$as_ac_var=yes"
5928 else
5929   $as_echo "$as_me: failed program was:" >&5
5930 sed 's/^/| /' conftest.$ac_ext >&5
5931
5932         eval "$as_ac_var=no"
5933 fi
5934
5935 rm -rf conftest.dSYM
5936 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
5937       conftest$ac_exeext conftest.$ac_ext
5938 fi
5939 ac_res=`eval 'as_val=${'$as_ac_var'}
5940                  $as_echo "$as_val"'`
5941                { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
5942 $as_echo "$ac_res" >&6; }
5943 as_val=`eval 'as_val=${'$as_ac_var'}
5944                  $as_echo "$as_val"'`
5945    if test "x$as_val" = x""yes; then
5946   cat >>confdefs.h <<_ACEOF
5947 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
5948 _ACEOF
5949
5950 fi
5951 done
5952
5953
5954 for ac_func in setlocale
5955 do
5956 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
5957 { $as_echo "$as_me:$LINENO: checking for $ac_func" >&5
5958 $as_echo_n "checking for $ac_func... " >&6; }
5959 if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
5960   $as_echo_n "(cached) " >&6
5961 else
5962   cat >conftest.$ac_ext <<_ACEOF
5963 /* confdefs.h.  */
5964 _ACEOF
5965 cat confdefs.h >>conftest.$ac_ext
5966 cat >>conftest.$ac_ext <<_ACEOF
5967 /* end confdefs.h.  */
5968 /* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
5969    For example, HP-UX 11i <limits.h> declares gettimeofday.  */
5970 #define $ac_func innocuous_$ac_func
5971
5972 /* System header to define __stub macros and hopefully few prototypes,
5973     which can conflict with char $ac_func (); below.
5974     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
5975     <limits.h> exists even on freestanding compilers.  */
5976
5977 #ifdef __STDC__
5978 # include <limits.h>
5979 #else
5980 # include <assert.h>
5981 #endif
5982
5983 #undef $ac_func
5984
5985 /* Override any GCC internal prototype to avoid an error.
5986    Use char because int might match the return type of a GCC
5987    builtin and then its argument prototype would still apply.  */
5988 #ifdef __cplusplus
5989 extern "C"
5990 #endif
5991 char $ac_func ();
5992 /* The GNU C library defines this for functions which it implements
5993     to always fail with ENOSYS.  Some functions are actually named
5994     something starting with __ and the normal name is an alias.  */
5995 #if defined __stub_$ac_func || defined __stub___$ac_func
5996 choke me
5997 #endif
5998
5999 int
6000 main ()
6001 {
6002 return $ac_func ();
6003   ;
6004   return 0;
6005 }
6006 _ACEOF
6007 rm -rf conftest.$ac_objext conftest$ac_exeext
6008 if { (ac_try="$ac_link"
6009 case "(($ac_try" in
6010   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6011   *) ac_try_echo=$ac_try;;
6012 esac
6013 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
6014 $as_echo "$ac_try_echo") >&5
6015   (eval "$ac_link") 2>conftest.er1
6016   ac_status=$?
6017   grep -v '^ *+' conftest.er1 >conftest.err
6018   rm -rf conftest.er1
6019   cat conftest.err >&5
6020   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
6021   (exit $ac_status); } && {
6022          test -z "$ac_c_werror_flag" ||
6023          test ! -s conftest.err
6024        } && test -s conftest$ac_exeext && {
6025          test "$cross_compiling" = yes ||
6026          $as_test_x conftest$ac_exeext
6027        }; then
6028   eval "$as_ac_var=yes"
6029 else
6030   $as_echo "$as_me: failed program was:" >&5
6031 sed 's/^/| /' conftest.$ac_ext >&5
6032
6033         eval "$as_ac_var=no"
6034 fi
6035
6036 rm -rf conftest.dSYM
6037 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
6038       conftest$ac_exeext conftest.$ac_ext
6039 fi
6040 ac_res=`eval 'as_val=${'$as_ac_var'}
6041                  $as_echo "$as_val"'`
6042                { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
6043 $as_echo "$ac_res" >&6; }
6044 as_val=`eval 'as_val=${'$as_ac_var'}
6045                  $as_echo "$as_val"'`
6046    if test "x$as_val" = x""yes; then
6047   cat >>confdefs.h <<_ACEOF
6048 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
6049 _ACEOF
6050
6051 fi
6052 done
6053
6054 { $as_echo "$as_me:$LINENO: checking for struct icmp" >&5
6055 $as_echo_n "checking for struct icmp... " >&6; }
6056 if test "${ac_cv_have_icmp+set}" = set; then
6057   $as_echo_n "(cached) " >&6
6058 else
6059   cat >conftest.$ac_ext <<_ACEOF
6060 /* confdefs.h.  */
6061 _ACEOF
6062 cat confdefs.h >>conftest.$ac_ext
6063 cat >>conftest.$ac_ext <<_ACEOF
6064 /* end confdefs.h.  */
6065 #include <stdlib.h>
6066                    #include <stdio.h>
6067                    #include <math.h>
6068                    #include <unistd.h>
6069                    #include <limits.h>
6070                    #include <signal.h>
6071                    #include <fcntl.h>
6072                    #include <sys/types.h>
6073                    #include <sys/time.h>
6074                    #include <sys/ipc.h>
6075                    #include <sys/shm.h>
6076                    #include <sys/socket.h>
6077                    #include <netinet/in_systm.h>
6078                    #include <netinet/in.h>
6079                    #include <netinet/ip.h>
6080                    #include <netinet/ip_icmp.h>
6081                    #include <netinet/udp.h>
6082                    #include <arpa/inet.h>
6083                    #include <netdb.h>
6084 int
6085 main ()
6086 {
6087 struct icmp i;
6088                    struct sockaddr s;
6089                    struct sockaddr_in si;
6090                    struct ip ip;
6091                    i.icmp_type = ICMP_ECHO;
6092                    i.icmp_code = 0;
6093                    i.icmp_cksum = 0;
6094                    i.icmp_id = 0;
6095                    i.icmp_seq = 0;
6096                    si.sin_family = AF_INET;
6097                    #if defined(__DECC) || defined(_IP_VHL)
6098                    ip.ip_vhl = 0;
6099                    #else
6100                    ip.ip_hl = 0;
6101                    #endif
6102
6103   ;
6104   return 0;
6105 }
6106 _ACEOF
6107 rm -rf conftest.$ac_objext
6108 if { (ac_try="$ac_compile"
6109 case "(($ac_try" in
6110   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6111   *) ac_try_echo=$ac_try;;
6112 esac
6113 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
6114 $as_echo "$ac_try_echo") >&5
6115   (eval "$ac_compile") 2>conftest.er1
6116   ac_status=$?
6117   grep -v '^ *+' conftest.er1 >conftest.err
6118   rm -rf conftest.er1
6119   cat conftest.err >&5
6120   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
6121   (exit $ac_status); } && {
6122          test -z "$ac_c_werror_flag" ||
6123          test ! -s conftest.err
6124        } && test -s conftest.$ac_objext; then
6125   ac_cv_have_icmp=yes
6126 else
6127   $as_echo "$as_me: failed program was:" >&5
6128 sed 's/^/| /' conftest.$ac_ext >&5
6129
6130         ac_cv_have_icmp=no
6131 fi
6132
6133 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6134 fi
6135 { $as_echo "$as_me:$LINENO: result: $ac_cv_have_icmp" >&5
6136 $as_echo "$ac_cv_have_icmp" >&6; }
6137  if test "$ac_cv_have_icmp" = yes ; then
6138    cat >>confdefs.h <<\_ACEOF
6139 #define HAVE_ICMP 1
6140 _ACEOF
6141
6142  fi
6143 { $as_echo "$as_me:$LINENO: checking for struct icmphdr" >&5
6144 $as_echo_n "checking for struct icmphdr... " >&6; }
6145 if test "${ac_cv_have_icmphdr+set}" = set; then
6146   $as_echo_n "(cached) " >&6
6147 else
6148   cat >conftest.$ac_ext <<_ACEOF
6149 /* confdefs.h.  */
6150 _ACEOF
6151 cat confdefs.h >>conftest.$ac_ext
6152 cat >>conftest.$ac_ext <<_ACEOF
6153 /* end confdefs.h.  */
6154 #include <stdlib.h>
6155                    #include <stdio.h>
6156                    #include <math.h>
6157                    #include <unistd.h>
6158                    #include <limits.h>
6159                    #include <signal.h>
6160                    #include <fcntl.h>
6161                    #include <sys/types.h>
6162                    #include <sys/time.h>
6163                    #include <sys/ipc.h>
6164                    #include <sys/shm.h>
6165                    #include <sys/socket.h>
6166                    #include <netinet/in_systm.h>
6167                    #include <netinet/in.h>
6168                    #include <netinet/ip.h>
6169                    #include <netinet/ip_icmp.h>
6170                    #include <netinet/udp.h>
6171                    #include <arpa/inet.h>
6172                    #include <netdb.h>
6173 int
6174 main ()
6175 {
6176 struct icmphdr i;
6177                    struct sockaddr s;
6178                    struct sockaddr_in si;
6179                    struct ip ip;
6180                    i.type = ICMP_ECHO;
6181                    i.code = 0;
6182                    i.checksum = 0;
6183                    i.un.echo.id = 0;
6184                    i.un.echo.sequence = 0;
6185                    si.sin_family = AF_INET;
6186                    ip.ip_hl = 0;
6187   ;
6188   return 0;
6189 }
6190 _ACEOF
6191 rm -rf conftest.$ac_objext
6192 if { (ac_try="$ac_compile"
6193 case "(($ac_try" in
6194   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6195   *) ac_try_echo=$ac_try;;
6196 esac
6197 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
6198 $as_echo "$ac_try_echo") >&5
6199   (eval "$ac_compile") 2>conftest.er1
6200   ac_status=$?
6201   grep -v '^ *+' conftest.er1 >conftest.err
6202   rm -rf conftest.er1
6203   cat conftest.err >&5
6204   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
6205   (exit $ac_status); } && {
6206          test -z "$ac_c_werror_flag" ||
6207          test ! -s conftest.err
6208        } && test -s conftest.$ac_objext; then
6209   ac_cv_have_icmphdr=yes
6210 else
6211   $as_echo "$as_me: failed program was:" >&5
6212 sed 's/^/| /' conftest.$ac_ext >&5
6213
6214         ac_cv_have_icmphdr=no
6215 fi
6216
6217 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6218 fi
6219 { $as_echo "$as_me:$LINENO: result: $ac_cv_have_icmphdr" >&5
6220 $as_echo "$ac_cv_have_icmphdr" >&6; }
6221  if test "$ac_cv_have_icmphdr" = yes ; then
6222    cat >>confdefs.h <<\_ACEOF
6223 #define HAVE_ICMPHDR 1
6224 _ACEOF
6225
6226  fi
6227
6228
6229 for ac_header in crypt.h sys/select.h
6230 do
6231 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
6232 if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
6233   { $as_echo "$as_me:$LINENO: checking for $ac_header" >&5
6234 $as_echo_n "checking for $ac_header... " >&6; }
6235 if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
6236   $as_echo_n "(cached) " >&6
6237 fi
6238 ac_res=`eval 'as_val=${'$as_ac_Header'}
6239                  $as_echo "$as_val"'`
6240                { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
6241 $as_echo "$ac_res" >&6; }
6242 else
6243   # Is the header compilable?
6244 { $as_echo "$as_me:$LINENO: checking $ac_header usability" >&5
6245 $as_echo_n "checking $ac_header usability... " >&6; }
6246 cat >conftest.$ac_ext <<_ACEOF
6247 /* confdefs.h.  */
6248 _ACEOF
6249 cat confdefs.h >>conftest.$ac_ext
6250 cat >>conftest.$ac_ext <<_ACEOF
6251 /* end confdefs.h.  */
6252 $ac_includes_default
6253 #include <$ac_header>
6254 _ACEOF
6255 rm -rf conftest.$ac_objext
6256 if { (ac_try="$ac_compile"
6257 case "(($ac_try" in
6258   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6259   *) ac_try_echo=$ac_try;;
6260 esac
6261 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
6262 $as_echo "$ac_try_echo") >&5
6263   (eval "$ac_compile") 2>conftest.er1
6264   ac_status=$?
6265   grep -v '^ *+' conftest.er1 >conftest.err
6266   rm -rf conftest.er1
6267   cat conftest.err >&5
6268   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
6269   (exit $ac_status); } && {
6270          test -z "$ac_c_werror_flag" ||
6271          test ! -s conftest.err
6272        } && test -s conftest.$ac_objext; then
6273   ac_header_compiler=yes
6274 else
6275   $as_echo "$as_me: failed program was:" >&5
6276 sed 's/^/| /' conftest.$ac_ext >&5
6277
6278         ac_header_compiler=no
6279 fi
6280
6281 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6282 { $as_echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
6283 $as_echo "$ac_header_compiler" >&6; }
6284
6285 # Is the header present?
6286 { $as_echo "$as_me:$LINENO: checking $ac_header presence" >&5
6287 $as_echo_n "checking $ac_header presence... " >&6; }
6288 cat >conftest.$ac_ext <<_ACEOF
6289 /* confdefs.h.  */
6290 _ACEOF
6291 cat confdefs.h >>conftest.$ac_ext
6292 cat >>conftest.$ac_ext <<_ACEOF
6293 /* end confdefs.h.  */
6294 #include <$ac_header>
6295 _ACEOF
6296 if { (ac_try="$ac_cpp conftest.$ac_ext"
6297 case "(($ac_try" in
6298   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6299   *) ac_try_echo=$ac_try;;
6300 esac
6301 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
6302 $as_echo "$ac_try_echo") >&5
6303   (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
6304   ac_status=$?
6305   grep -v '^ *+' conftest.er1 >conftest.err
6306   rm -rf conftest.er1
6307   cat conftest.err >&5
6308   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
6309   (exit $ac_status); } >/dev/null && {
6310          test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
6311          test ! -s conftest.err
6312        }; then
6313   ac_header_preproc=yes
6314 else
6315   $as_echo "$as_me: failed program was:" >&5
6316 sed 's/^/| /' conftest.$ac_ext >&5
6317
6318   ac_header_preproc=no
6319 fi
6320
6321 rm -rf conftest.err conftest.$ac_ext
6322 { $as_echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
6323 $as_echo "$ac_header_preproc" >&6; }
6324
6325 # So?  What about this header?
6326 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
6327   yes:no: )
6328     { $as_echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
6329 $as_echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
6330     { $as_echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
6331 $as_echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
6332     ac_header_preproc=yes
6333     ;;
6334   no:yes:* )
6335     { $as_echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
6336 $as_echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
6337     { $as_echo "$as_me:$LINENO: WARNING: $ac_header:     check for missing prerequisite headers?" >&5
6338 $as_echo "$as_me: WARNING: $ac_header:     check for missing prerequisite headers?" >&2;}
6339     { $as_echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
6340 $as_echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
6341     { $as_echo "$as_me:$LINENO: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&5
6342 $as_echo "$as_me: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&2;}
6343     { $as_echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
6344 $as_echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
6345     { $as_echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
6346 $as_echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
6347
6348     ;;
6349 esac
6350 { $as_echo "$as_me:$LINENO: checking for $ac_header" >&5
6351 $as_echo_n "checking for $ac_header... " >&6; }
6352 if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
6353   $as_echo_n "(cached) " >&6
6354 else
6355   eval "$as_ac_Header=\$ac_header_preproc"
6356 fi
6357 ac_res=`eval 'as_val=${'$as_ac_Header'}
6358                  $as_echo "$as_val"'`
6359                { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
6360 $as_echo "$ac_res" >&6; }
6361
6362 fi
6363 as_val=`eval 'as_val=${'$as_ac_Header'}
6364                  $as_echo "$as_val"'`
6365    if test "x$as_val" = x""yes; then
6366   cat >>confdefs.h <<_ACEOF
6367 #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
6368 _ACEOF
6369
6370 fi
6371
6372 done
6373
6374 for ac_prog in perl5 perl
6375 do
6376   # Extract the first word of "$ac_prog", so it can be a program name with args.
6377 set dummy $ac_prog; ac_word=$2
6378 { $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
6379 $as_echo_n "checking for $ac_word... " >&6; }
6380 if test "${ac_cv_path_PERL+set}" = set; then
6381   $as_echo_n "(cached) " >&6
6382 else
6383   case $PERL in
6384   [\\/]* | ?:[\\/]*)
6385   ac_cv_path_PERL="$PERL" # Let the user override the test with a path.
6386   ;;
6387   *)
6388   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6389 for as_dir in $PATH
6390 do
6391   IFS=$as_save_IFS
6392   test -z "$as_dir" && as_dir=.
6393   for ac_exec_ext in '' $ac_executable_extensions; do
6394   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
6395     ac_cv_path_PERL="$as_dir/$ac_word$ac_exec_ext"
6396     $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
6397     break 2
6398   fi
6399 done
6400 done
6401 IFS=$as_save_IFS
6402
6403   ;;
6404 esac
6405 fi
6406 PERL=$ac_cv_path_PERL
6407 if test -n "$PERL"; then
6408   { $as_echo "$as_me:$LINENO: result: $PERL" >&5
6409 $as_echo "$PERL" >&6; }
6410 else
6411   { $as_echo "$as_me:$LINENO: result: no" >&5
6412 $as_echo "no" >&6; }
6413 fi
6414
6415
6416   test -n "$PERL" && break
6417 done
6418
6419   if test -z "$PERL" ; then
6420     PERL_VERSION=0
6421   else
6422     { $as_echo "$as_me:$LINENO: checking perl version" >&5
6423 $as_echo_n "checking perl version... " >&6; }
6424 if test "${ac_cv_perl_version+set}" = set; then
6425   $as_echo_n "(cached) " >&6
6426 else
6427   ac_cv_perl_version=`$PERL -e "$perl_version_cmd"`
6428 fi
6429 { $as_echo "$as_me:$LINENO: result: $ac_cv_perl_version" >&5
6430 $as_echo "$ac_cv_perl_version" >&6; }
6431     PERL_VERSION=$ac_cv_perl_version
6432   fi
6433
6434
6435 if test -z "$PERL" ; then
6436   # don't let it be blank...
6437   PERL=/usr/bin/perl
6438 fi
6439
6440 { $as_echo "$as_me:$LINENO: checking for X" >&5
6441 $as_echo_n "checking for X... " >&6; }
6442
6443
6444 # Check whether --with-x was given.
6445 if test "${with_x+set}" = set; then
6446   withval=$with_x;
6447 fi
6448
6449 # $have_x is `yes', `no', `disabled', or empty when we do not yet know.
6450 if test "x$with_x" = xno; then
6451   # The user explicitly disabled X.
6452   have_x=disabled
6453 else
6454   case $x_includes,$x_libraries in #(
6455     *\'*) { { $as_echo "$as_me:$LINENO: error: cannot use X directory names containing '" >&5
6456 $as_echo "$as_me: error: cannot use X directory names containing '" >&2;}
6457    { (exit 1); exit 1; }; };; #(
6458     *,NONE | NONE,*) if test "${ac_cv_have_x+set}" = set; then
6459   $as_echo_n "(cached) " >&6
6460 else
6461   # One or both of the vars are not set, and there is no cached value.
6462 ac_x_includes=no ac_x_libraries=no
6463 rm -f -r conftest.dir
6464 if mkdir conftest.dir; then
6465   cd conftest.dir
6466   cat >Imakefile <<'_ACEOF'
6467 incroot:
6468         @echo incroot='${INCROOT}'
6469 usrlibdir:
6470         @echo usrlibdir='${USRLIBDIR}'
6471 libdir:
6472         @echo libdir='${LIBDIR}'
6473 _ACEOF
6474   if (export CC; ${XMKMF-xmkmf}) >/dev/null 2>/dev/null && test -f Makefile; then
6475     # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
6476     for ac_var in incroot usrlibdir libdir; do
6477       eval "ac_im_$ac_var=\`\${MAKE-make} $ac_var 2>/dev/null | sed -n 's/^$ac_var=//p'\`"
6478     done
6479     # Open Windows xmkmf reportedly sets LIBDIR instead of USRLIBDIR.
6480     for ac_extension in a so sl dylib la dll; do
6481       if test ! -f "$ac_im_usrlibdir/libX11.$ac_extension" &&
6482          test -f "$ac_im_libdir/libX11.$ac_extension"; then
6483         ac_im_usrlibdir=$ac_im_libdir; break
6484       fi
6485     done
6486     # Screen out bogus values from the imake configuration.  They are
6487     # bogus both because they are the default anyway, and because
6488     # using them would break gcc on systems where it needs fixed includes.
6489     case $ac_im_incroot in
6490         /usr/include) ac_x_includes= ;;
6491         *) test -f "$ac_im_incroot/X11/Xos.h" && ac_x_includes=$ac_im_incroot;;
6492     esac
6493     case $ac_im_usrlibdir in
6494         /usr/lib | /usr/lib64 | /lib | /lib64) ;;
6495         *) test -d "$ac_im_usrlibdir" && ac_x_libraries=$ac_im_usrlibdir ;;
6496     esac
6497   fi
6498   cd ..
6499   rm -f -r conftest.dir
6500 fi
6501
6502 # Standard set of common directories for X headers.
6503 # Check X11 before X11Rn because it is often a symlink to the current release.
6504 ac_x_header_dirs='
6505 /usr/X11/include
6506 /usr/X11R6/include
6507 /usr/X11R5/include
6508 /usr/X11R4/include
6509
6510 /usr/include/X11
6511 /usr/include/X11R6
6512 /usr/include/X11R5
6513 /usr/include/X11R4
6514
6515 /usr/local/X11/include
6516 /usr/local/X11R6/include
6517 /usr/local/X11R5/include
6518 /usr/local/X11R4/include
6519
6520 /usr/local/include/X11
6521 /usr/local/include/X11R6
6522 /usr/local/include/X11R5
6523 /usr/local/include/X11R4
6524
6525 /usr/X386/include
6526 /usr/x386/include
6527 /usr/XFree86/include/X11
6528
6529 /usr/include
6530 /usr/local/include
6531 /usr/unsupported/include
6532 /usr/athena/include
6533 /usr/local/x11r5/include
6534 /usr/lpp/Xamples/include
6535
6536 /usr/openwin/include
6537 /usr/openwin/share/include'
6538
6539 if test "$ac_x_includes" = no; then
6540   # Guess where to find include files, by looking for Xlib.h.
6541   # First, try using that file with no special directory specified.
6542   cat >conftest.$ac_ext <<_ACEOF
6543 /* confdefs.h.  */
6544 _ACEOF
6545 cat confdefs.h >>conftest.$ac_ext
6546 cat >>conftest.$ac_ext <<_ACEOF
6547 /* end confdefs.h.  */
6548 #include <X11/Xlib.h>
6549 _ACEOF
6550 if { (ac_try="$ac_cpp conftest.$ac_ext"
6551 case "(($ac_try" in
6552   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6553   *) ac_try_echo=$ac_try;;
6554 esac
6555 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
6556 $as_echo "$ac_try_echo") >&5
6557   (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
6558   ac_status=$?
6559   grep -v '^ *+' conftest.er1 >conftest.err
6560   rm -rf conftest.er1
6561   cat conftest.err >&5
6562   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
6563   (exit $ac_status); } >/dev/null && {
6564          test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
6565          test ! -s conftest.err
6566        }; then
6567   # We can compile using X headers with no special include directory.
6568 ac_x_includes=
6569 else
6570   $as_echo "$as_me: failed program was:" >&5
6571 sed 's/^/| /' conftest.$ac_ext >&5
6572
6573   for ac_dir in $ac_x_header_dirs; do
6574   if test -r "$ac_dir/X11/Xlib.h"; then
6575     ac_x_includes=$ac_dir
6576     break
6577   fi
6578 done
6579 fi
6580
6581 rm -rf conftest.err conftest.$ac_ext
6582 fi # $ac_x_includes = no
6583
6584 if test "$ac_x_libraries" = no; then
6585   # Check for the libraries.
6586   # See if we find them without any special options.
6587   # Don't add to $LIBS permanently.
6588   ac_save_LIBS=$LIBS
6589   LIBS="-lX11 $LIBS"
6590   cat >conftest.$ac_ext <<_ACEOF
6591 /* confdefs.h.  */
6592 _ACEOF
6593 cat confdefs.h >>conftest.$ac_ext
6594 cat >>conftest.$ac_ext <<_ACEOF
6595 /* end confdefs.h.  */
6596 #include <X11/Xlib.h>
6597 int
6598 main ()
6599 {
6600 XrmInitialize ()
6601   ;
6602   return 0;
6603 }
6604 _ACEOF
6605 rm -rf conftest.$ac_objext conftest$ac_exeext
6606 if { (ac_try="$ac_link"
6607 case "(($ac_try" in
6608   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6609   *) ac_try_echo=$ac_try;;
6610 esac
6611 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
6612 $as_echo "$ac_try_echo") >&5
6613   (eval "$ac_link") 2>conftest.er1
6614   ac_status=$?
6615   grep -v '^ *+' conftest.er1 >conftest.err
6616   rm -rf conftest.er1
6617   cat conftest.err >&5
6618   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
6619   (exit $ac_status); } && {
6620          test -z "$ac_c_werror_flag" ||
6621          test ! -s conftest.err
6622        } && test -s conftest$ac_exeext && {
6623          test "$cross_compiling" = yes ||
6624          $as_test_x conftest$ac_exeext
6625        }; then
6626   LIBS=$ac_save_LIBS
6627 # We can link X programs with no special library path.
6628 ac_x_libraries=
6629 else
6630   $as_echo "$as_me: failed program was:" >&5
6631 sed 's/^/| /' conftest.$ac_ext >&5
6632
6633         LIBS=$ac_save_LIBS
6634 for ac_dir in `$as_echo "$ac_x_includes $ac_x_header_dirs" | sed s/include/lib/g`
6635 do
6636   # Don't even attempt the hair of trying to link an X program!
6637   for ac_extension in a so sl dylib la dll; do
6638     if test -r "$ac_dir/libX11.$ac_extension"; then
6639       ac_x_libraries=$ac_dir
6640       break 2
6641     fi
6642   done
6643 done
6644 fi
6645
6646 rm -rf conftest.dSYM
6647 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
6648       conftest$ac_exeext conftest.$ac_ext
6649 fi # $ac_x_libraries = no
6650
6651 case $ac_x_includes,$ac_x_libraries in #(
6652   no,* | *,no | *\'*)
6653     # Didn't find X, or a directory has "'" in its name.
6654     ac_cv_have_x="have_x=no";; #(
6655   *)
6656     # Record where we found X for the cache.
6657     ac_cv_have_x="have_x=yes\
6658         ac_x_includes='$ac_x_includes'\
6659         ac_x_libraries='$ac_x_libraries'"
6660 esac
6661 fi
6662 ;; #(
6663     *) have_x=yes;;
6664   esac
6665   eval "$ac_cv_have_x"
6666 fi # $with_x != no
6667
6668 if test "$have_x" != yes; then
6669   { $as_echo "$as_me:$LINENO: result: $have_x" >&5
6670 $as_echo "$have_x" >&6; }
6671   no_x=yes
6672 else
6673   # If each of the values was on the command line, it overrides each guess.
6674   test "x$x_includes" = xNONE && x_includes=$ac_x_includes
6675   test "x$x_libraries" = xNONE && x_libraries=$ac_x_libraries
6676   # Update the cache value to reflect the command line values.
6677   ac_cv_have_x="have_x=yes\
6678         ac_x_includes='$x_includes'\
6679         ac_x_libraries='$x_libraries'"
6680   { $as_echo "$as_me:$LINENO: result: libraries $x_libraries, headers $x_includes" >&5
6681 $as_echo "libraries $x_libraries, headers $x_includes" >&6; }
6682 fi
6683
6684 if test "$no_x" = yes; then
6685   # Not all programs may use this symbol, but it does not hurt to define it.
6686
6687 cat >>confdefs.h <<\_ACEOF
6688 #define X_DISPLAY_MISSING 1
6689 _ACEOF
6690
6691   X_CFLAGS= X_PRE_LIBS= X_LIBS= X_EXTRA_LIBS=
6692 else
6693   if test -n "$x_includes"; then
6694     X_CFLAGS="$X_CFLAGS -I$x_includes"
6695   fi
6696
6697   # It would also be nice to do this for all -L options, not just this one.
6698   if test -n "$x_libraries"; then
6699     X_LIBS="$X_LIBS -L$x_libraries"
6700     # For Solaris; some versions of Sun CC require a space after -R and
6701     # others require no space.  Words are not sufficient . . . .
6702     { $as_echo "$as_me:$LINENO: checking whether -R must be followed by a space" >&5
6703 $as_echo_n "checking whether -R must be followed by a space... " >&6; }
6704     ac_xsave_LIBS=$LIBS; LIBS="$LIBS -R$x_libraries"
6705     ac_xsave_c_werror_flag=$ac_c_werror_flag
6706     ac_c_werror_flag=yes
6707     cat >conftest.$ac_ext <<_ACEOF
6708 /* confdefs.h.  */
6709 _ACEOF
6710 cat confdefs.h >>conftest.$ac_ext
6711 cat >>conftest.$ac_ext <<_ACEOF
6712 /* end confdefs.h.  */
6713
6714 int
6715 main ()
6716 {
6717
6718   ;
6719   return 0;
6720 }
6721 _ACEOF
6722 rm -rf conftest.$ac_objext conftest$ac_exeext
6723 if { (ac_try="$ac_link"
6724 case "(($ac_try" in
6725   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6726   *) ac_try_echo=$ac_try;;
6727 esac
6728 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
6729 $as_echo "$ac_try_echo") >&5
6730   (eval "$ac_link") 2>conftest.er1
6731   ac_status=$?
6732   grep -v '^ *+' conftest.er1 >conftest.err
6733   rm -rf conftest.er1
6734   cat conftest.err >&5
6735   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
6736   (exit $ac_status); } && {
6737          test -z "$ac_c_werror_flag" ||
6738          test ! -s conftest.err
6739        } && test -s conftest$ac_exeext && {
6740          test "$cross_compiling" = yes ||
6741          $as_test_x conftest$ac_exeext
6742        }; then
6743   { $as_echo "$as_me:$LINENO: result: no" >&5
6744 $as_echo "no" >&6; }
6745        X_LIBS="$X_LIBS -R$x_libraries"
6746 else
6747   $as_echo "$as_me: failed program was:" >&5
6748 sed 's/^/| /' conftest.$ac_ext >&5
6749
6750         LIBS="$ac_xsave_LIBS -R $x_libraries"
6751        cat >conftest.$ac_ext <<_ACEOF
6752 /* confdefs.h.  */
6753 _ACEOF
6754 cat confdefs.h >>conftest.$ac_ext
6755 cat >>conftest.$ac_ext <<_ACEOF
6756 /* end confdefs.h.  */
6757
6758 int
6759 main ()
6760 {
6761
6762   ;
6763   return 0;
6764 }
6765 _ACEOF
6766 rm -rf conftest.$ac_objext conftest$ac_exeext
6767 if { (ac_try="$ac_link"
6768 case "(($ac_try" in
6769   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6770   *) ac_try_echo=$ac_try;;
6771 esac
6772 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
6773 $as_echo "$ac_try_echo") >&5
6774   (eval "$ac_link") 2>conftest.er1
6775   ac_status=$?
6776   grep -v '^ *+' conftest.er1 >conftest.err
6777   rm -rf conftest.er1
6778   cat conftest.err >&5
6779   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
6780   (exit $ac_status); } && {
6781          test -z "$ac_c_werror_flag" ||
6782          test ! -s conftest.err
6783        } && test -s conftest$ac_exeext && {
6784          test "$cross_compiling" = yes ||
6785          $as_test_x conftest$ac_exeext
6786        }; then
6787   { $as_echo "$as_me:$LINENO: result: yes" >&5
6788 $as_echo "yes" >&6; }
6789           X_LIBS="$X_LIBS -R $x_libraries"
6790 else
6791   $as_echo "$as_me: failed program was:" >&5
6792 sed 's/^/| /' conftest.$ac_ext >&5
6793
6794         { $as_echo "$as_me:$LINENO: result: neither works" >&5
6795 $as_echo "neither works" >&6; }
6796 fi
6797
6798 rm -rf conftest.dSYM
6799 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
6800       conftest$ac_exeext conftest.$ac_ext
6801 fi
6802
6803 rm -rf conftest.dSYM
6804 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
6805       conftest$ac_exeext conftest.$ac_ext
6806     ac_c_werror_flag=$ac_xsave_c_werror_flag
6807     LIBS=$ac_xsave_LIBS
6808   fi
6809
6810   # Check for system-dependent libraries X programs must link with.
6811   # Do this before checking for the system-independent R6 libraries
6812   # (-lICE), since we may need -lsocket or whatever for X linking.
6813
6814   if test "$ISC" = yes; then
6815     X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl_s -linet"
6816   else
6817     # Martyn Johnson says this is needed for Ultrix, if the X
6818     # libraries were built with DECnet support.  And Karl Berry says
6819     # the Alpha needs dnet_stub (dnet does not exist).
6820     ac_xsave_LIBS="$LIBS"; LIBS="$LIBS $X_LIBS -lX11"
6821     cat >conftest.$ac_ext <<_ACEOF
6822 /* confdefs.h.  */
6823 _ACEOF
6824 cat confdefs.h >>conftest.$ac_ext
6825 cat >>conftest.$ac_ext <<_ACEOF
6826 /* end confdefs.h.  */
6827
6828 /* Override any GCC internal prototype to avoid an error.
6829    Use char because int might match the return type of a GCC
6830    builtin and then its argument prototype would still apply.  */
6831 #ifdef __cplusplus
6832 extern "C"
6833 #endif
6834 char XOpenDisplay ();
6835 int
6836 main ()
6837 {
6838 return XOpenDisplay ();
6839   ;
6840   return 0;
6841 }
6842 _ACEOF
6843 rm -rf conftest.$ac_objext conftest$ac_exeext
6844 if { (ac_try="$ac_link"
6845 case "(($ac_try" in
6846   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6847   *) ac_try_echo=$ac_try;;
6848 esac
6849 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
6850 $as_echo "$ac_try_echo") >&5
6851   (eval "$ac_link") 2>conftest.er1
6852   ac_status=$?
6853   grep -v '^ *+' conftest.er1 >conftest.err
6854   rm -rf conftest.er1
6855   cat conftest.err >&5
6856   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
6857   (exit $ac_status); } && {
6858          test -z "$ac_c_werror_flag" ||
6859          test ! -s conftest.err
6860        } && test -s conftest$ac_exeext && {
6861          test "$cross_compiling" = yes ||
6862          $as_test_x conftest$ac_exeext
6863        }; then
6864   :
6865 else
6866   $as_echo "$as_me: failed program was:" >&5
6867 sed 's/^/| /' conftest.$ac_ext >&5
6868
6869         { $as_echo "$as_me:$LINENO: checking for dnet_ntoa in -ldnet" >&5
6870 $as_echo_n "checking for dnet_ntoa in -ldnet... " >&6; }
6871 if test "${ac_cv_lib_dnet_dnet_ntoa+set}" = set; then
6872   $as_echo_n "(cached) " >&6
6873 else
6874   ac_check_lib_save_LIBS=$LIBS
6875 LIBS="-ldnet  $LIBS"
6876 cat >conftest.$ac_ext <<_ACEOF
6877 /* confdefs.h.  */
6878 _ACEOF
6879 cat confdefs.h >>conftest.$ac_ext
6880 cat >>conftest.$ac_ext <<_ACEOF
6881 /* end confdefs.h.  */
6882
6883 /* Override any GCC internal prototype to avoid an error.
6884    Use char because int might match the return type of a GCC
6885    builtin and then its argument prototype would still apply.  */
6886 #ifdef __cplusplus
6887 extern "C"
6888 #endif
6889 char dnet_ntoa ();
6890 int
6891 main ()
6892 {
6893 return dnet_ntoa ();
6894   ;
6895   return 0;
6896 }
6897 _ACEOF
6898 rm -rf conftest.$ac_objext conftest$ac_exeext
6899 if { (ac_try="$ac_link"
6900 case "(($ac_try" in
6901   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6902   *) ac_try_echo=$ac_try;;
6903 esac
6904 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
6905 $as_echo "$ac_try_echo") >&5
6906   (eval "$ac_link") 2>conftest.er1
6907   ac_status=$?
6908   grep -v '^ *+' conftest.er1 >conftest.err
6909   rm -rf conftest.er1
6910   cat conftest.err >&5
6911   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
6912   (exit $ac_status); } && {
6913          test -z "$ac_c_werror_flag" ||
6914          test ! -s conftest.err
6915        } && test -s conftest$ac_exeext && {
6916          test "$cross_compiling" = yes ||
6917          $as_test_x conftest$ac_exeext
6918        }; then
6919   ac_cv_lib_dnet_dnet_ntoa=yes
6920 else
6921   $as_echo "$as_me: failed program was:" >&5
6922 sed 's/^/| /' conftest.$ac_ext >&5
6923
6924         ac_cv_lib_dnet_dnet_ntoa=no
6925 fi
6926
6927 rm -rf conftest.dSYM
6928 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
6929       conftest$ac_exeext conftest.$ac_ext
6930 LIBS=$ac_check_lib_save_LIBS
6931 fi
6932 { $as_echo "$as_me:$LINENO: result: $ac_cv_lib_dnet_dnet_ntoa" >&5
6933 $as_echo "$ac_cv_lib_dnet_dnet_ntoa" >&6; }
6934 if test "x$ac_cv_lib_dnet_dnet_ntoa" = x""yes; then
6935   X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet"
6936 fi
6937
6938     if test $ac_cv_lib_dnet_dnet_ntoa = no; then
6939       { $as_echo "$as_me:$LINENO: checking for dnet_ntoa in -ldnet_stub" >&5
6940 $as_echo_n "checking for dnet_ntoa in -ldnet_stub... " >&6; }
6941 if test "${ac_cv_lib_dnet_stub_dnet_ntoa+set}" = set; then
6942   $as_echo_n "(cached) " >&6
6943 else
6944   ac_check_lib_save_LIBS=$LIBS
6945 LIBS="-ldnet_stub  $LIBS"
6946 cat >conftest.$ac_ext <<_ACEOF
6947 /* confdefs.h.  */
6948 _ACEOF
6949 cat confdefs.h >>conftest.$ac_ext
6950 cat >>conftest.$ac_ext <<_ACEOF
6951 /* end confdefs.h.  */
6952
6953 /* Override any GCC internal prototype to avoid an error.
6954    Use char because int might match the return type of a GCC
6955    builtin and then its argument prototype would still apply.  */
6956 #ifdef __cplusplus
6957 extern "C"
6958 #endif
6959 char dnet_ntoa ();
6960 int
6961 main ()
6962 {
6963 return dnet_ntoa ();
6964   ;
6965   return 0;
6966 }
6967 _ACEOF
6968 rm -rf conftest.$ac_objext conftest$ac_exeext
6969 if { (ac_try="$ac_link"
6970 case "(($ac_try" in
6971   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6972   *) ac_try_echo=$ac_try;;
6973 esac
6974 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
6975 $as_echo "$ac_try_echo") >&5
6976   (eval "$ac_link") 2>conftest.er1
6977   ac_status=$?
6978   grep -v '^ *+' conftest.er1 >conftest.err
6979   rm -rf conftest.er1
6980   cat conftest.err >&5
6981   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
6982   (exit $ac_status); } && {
6983          test -z "$ac_c_werror_flag" ||
6984          test ! -s conftest.err
6985        } && test -s conftest$ac_exeext && {
6986          test "$cross_compiling" = yes ||
6987          $as_test_x conftest$ac_exeext
6988        }; then
6989   ac_cv_lib_dnet_stub_dnet_ntoa=yes
6990 else
6991   $as_echo "$as_me: failed program was:" >&5
6992 sed 's/^/| /' conftest.$ac_ext >&5
6993
6994         ac_cv_lib_dnet_stub_dnet_ntoa=no
6995 fi
6996
6997 rm -rf conftest.dSYM
6998 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
6999       conftest$ac_exeext conftest.$ac_ext
7000 LIBS=$ac_check_lib_save_LIBS
7001 fi
7002 { $as_echo "$as_me:$LINENO: result: $ac_cv_lib_dnet_stub_dnet_ntoa" >&5
7003 $as_echo "$ac_cv_lib_dnet_stub_dnet_ntoa" >&6; }
7004 if test "x$ac_cv_lib_dnet_stub_dnet_ntoa" = x""yes; then
7005   X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet_stub"
7006 fi
7007
7008     fi
7009 fi
7010
7011 rm -rf conftest.dSYM
7012 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
7013       conftest$ac_exeext conftest.$ac_ext
7014     LIBS="$ac_xsave_LIBS"
7015
7016     # msh@cis.ufl.edu says -lnsl (and -lsocket) are needed for his 386/AT,
7017     # to get the SysV transport functions.
7018     # Chad R. Larson says the Pyramis MIS-ES running DC/OSx (SVR4)
7019     # needs -lnsl.
7020     # The nsl library prevents programs from opening the X display
7021     # on Irix 5.2, according to T.E. Dickey.
7022     # The functions gethostbyname, getservbyname, and inet_addr are
7023     # in -lbsd on LynxOS 3.0.1/i386, according to Lars Hecking.
7024     { $as_echo "$as_me:$LINENO: checking for gethostbyname" >&5
7025 $as_echo_n "checking for gethostbyname... " >&6; }
7026 if test "${ac_cv_func_gethostbyname+set}" = set; then
7027   $as_echo_n "(cached) " >&6
7028 else
7029   cat >conftest.$ac_ext <<_ACEOF
7030 /* confdefs.h.  */
7031 _ACEOF
7032 cat confdefs.h >>conftest.$ac_ext
7033 cat >>conftest.$ac_ext <<_ACEOF
7034 /* end confdefs.h.  */
7035 /* Define gethostbyname to an innocuous variant, in case <limits.h> declares gethostbyname.
7036    For example, HP-UX 11i <limits.h> declares gettimeofday.  */
7037 #define gethostbyname innocuous_gethostbyname
7038
7039 /* System header to define __stub macros and hopefully few prototypes,
7040     which can conflict with char gethostbyname (); below.
7041     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
7042     <limits.h> exists even on freestanding compilers.  */
7043
7044 #ifdef __STDC__
7045 # include <limits.h>
7046 #else
7047 # include <assert.h>
7048 #endif
7049
7050 #undef gethostbyname
7051
7052 /* Override any GCC internal prototype to avoid an error.
7053    Use char because int might match the return type of a GCC
7054    builtin and then its argument prototype would still apply.  */
7055 #ifdef __cplusplus
7056 extern "C"
7057 #endif
7058 char gethostbyname ();
7059 /* The GNU C library defines this for functions which it implements
7060     to always fail with ENOSYS.  Some functions are actually named
7061     something starting with __ and the normal name is an alias.  */
7062 #if defined __stub_gethostbyname || defined __stub___gethostbyname
7063 choke me
7064 #endif
7065
7066 int
7067 main ()
7068 {
7069 return gethostbyname ();
7070   ;
7071   return 0;
7072 }
7073 _ACEOF
7074 rm -rf conftest.$ac_objext conftest$ac_exeext
7075 if { (ac_try="$ac_link"
7076 case "(($ac_try" in
7077   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7078   *) ac_try_echo=$ac_try;;
7079 esac
7080 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
7081 $as_echo "$ac_try_echo") >&5
7082   (eval "$ac_link") 2>conftest.er1
7083   ac_status=$?
7084   grep -v '^ *+' conftest.er1 >conftest.err
7085   rm -rf conftest.er1
7086   cat conftest.err >&5
7087   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
7088   (exit $ac_status); } && {
7089          test -z "$ac_c_werror_flag" ||
7090          test ! -s conftest.err
7091        } && test -s conftest$ac_exeext && {
7092          test "$cross_compiling" = yes ||
7093          $as_test_x conftest$ac_exeext
7094        }; then
7095   ac_cv_func_gethostbyname=yes
7096 else
7097   $as_echo "$as_me: failed program was:" >&5
7098 sed 's/^/| /' conftest.$ac_ext >&5
7099
7100         ac_cv_func_gethostbyname=no
7101 fi
7102
7103 rm -rf conftest.dSYM
7104 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
7105       conftest$ac_exeext conftest.$ac_ext
7106 fi
7107 { $as_echo "$as_me:$LINENO: result: $ac_cv_func_gethostbyname" >&5
7108 $as_echo "$ac_cv_func_gethostbyname" >&6; }
7109
7110     if test $ac_cv_func_gethostbyname = no; then
7111       { $as_echo "$as_me:$LINENO: checking for gethostbyname in -lnsl" >&5
7112 $as_echo_n "checking for gethostbyname in -lnsl... " >&6; }
7113 if test "${ac_cv_lib_nsl_gethostbyname+set}" = set; then
7114   $as_echo_n "(cached) " >&6
7115 else
7116   ac_check_lib_save_LIBS=$LIBS
7117 LIBS="-lnsl  $LIBS"
7118 cat >conftest.$ac_ext <<_ACEOF
7119 /* confdefs.h.  */
7120 _ACEOF
7121 cat confdefs.h >>conftest.$ac_ext
7122 cat >>conftest.$ac_ext <<_ACEOF
7123 /* end confdefs.h.  */
7124
7125 /* Override any GCC internal prototype to avoid an error.
7126    Use char because int might match the return type of a GCC
7127    builtin and then its argument prototype would still apply.  */
7128 #ifdef __cplusplus
7129 extern "C"
7130 #endif
7131 char gethostbyname ();
7132 int
7133 main ()
7134 {
7135 return gethostbyname ();
7136   ;
7137   return 0;
7138 }
7139 _ACEOF
7140 rm -rf conftest.$ac_objext conftest$ac_exeext
7141 if { (ac_try="$ac_link"
7142 case "(($ac_try" in
7143   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7144   *) ac_try_echo=$ac_try;;
7145 esac
7146 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
7147 $as_echo "$ac_try_echo") >&5
7148   (eval "$ac_link") 2>conftest.er1
7149   ac_status=$?
7150   grep -v '^ *+' conftest.er1 >conftest.err
7151   rm -rf conftest.er1
7152   cat conftest.err >&5
7153   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
7154   (exit $ac_status); } && {
7155          test -z "$ac_c_werror_flag" ||
7156          test ! -s conftest.err
7157        } && test -s conftest$ac_exeext && {
7158          test "$cross_compiling" = yes ||
7159          $as_test_x conftest$ac_exeext
7160        }; then
7161   ac_cv_lib_nsl_gethostbyname=yes
7162 else
7163   $as_echo "$as_me: failed program was:" >&5
7164 sed 's/^/| /' conftest.$ac_ext >&5
7165
7166         ac_cv_lib_nsl_gethostbyname=no
7167 fi
7168
7169 rm -rf conftest.dSYM
7170 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
7171       conftest$ac_exeext conftest.$ac_ext
7172 LIBS=$ac_check_lib_save_LIBS
7173 fi
7174 { $as_echo "$as_me:$LINENO: result: $ac_cv_lib_nsl_gethostbyname" >&5
7175 $as_echo "$ac_cv_lib_nsl_gethostbyname" >&6; }
7176 if test "x$ac_cv_lib_nsl_gethostbyname" = x""yes; then
7177   X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl"
7178 fi
7179
7180       if test $ac_cv_lib_nsl_gethostbyname = no; then
7181         { $as_echo "$as_me:$LINENO: checking for gethostbyname in -lbsd" >&5
7182 $as_echo_n "checking for gethostbyname in -lbsd... " >&6; }
7183 if test "${ac_cv_lib_bsd_gethostbyname+set}" = set; then
7184   $as_echo_n "(cached) " >&6
7185 else
7186   ac_check_lib_save_LIBS=$LIBS
7187 LIBS="-lbsd  $LIBS"
7188 cat >conftest.$ac_ext <<_ACEOF
7189 /* confdefs.h.  */
7190 _ACEOF
7191 cat confdefs.h >>conftest.$ac_ext
7192 cat >>conftest.$ac_ext <<_ACEOF
7193 /* end confdefs.h.  */
7194
7195 /* Override any GCC internal prototype to avoid an error.
7196    Use char because int might match the return type of a GCC
7197    builtin and then its argument prototype would still apply.  */
7198 #ifdef __cplusplus
7199 extern "C"
7200 #endif
7201 char gethostbyname ();
7202 int
7203 main ()
7204 {
7205 return gethostbyname ();
7206   ;
7207   return 0;
7208 }
7209 _ACEOF
7210 rm -rf conftest.$ac_objext conftest$ac_exeext
7211 if { (ac_try="$ac_link"
7212 case "(($ac_try" in
7213   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7214   *) ac_try_echo=$ac_try;;
7215 esac
7216 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
7217 $as_echo "$ac_try_echo") >&5
7218   (eval "$ac_link") 2>conftest.er1
7219   ac_status=$?
7220   grep -v '^ *+' conftest.er1 >conftest.err
7221   rm -rf conftest.er1
7222   cat conftest.err >&5
7223   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
7224   (exit $ac_status); } && {
7225          test -z "$ac_c_werror_flag" ||
7226          test ! -s conftest.err
7227        } && test -s conftest$ac_exeext && {
7228          test "$cross_compiling" = yes ||
7229          $as_test_x conftest$ac_exeext
7230        }; then
7231   ac_cv_lib_bsd_gethostbyname=yes
7232 else
7233   $as_echo "$as_me: failed program was:" >&5
7234 sed 's/^/| /' conftest.$ac_ext >&5
7235
7236         ac_cv_lib_bsd_gethostbyname=no
7237 fi
7238
7239 rm -rf conftest.dSYM
7240 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
7241       conftest$ac_exeext conftest.$ac_ext
7242 LIBS=$ac_check_lib_save_LIBS
7243 fi
7244 { $as_echo "$as_me:$LINENO: result: $ac_cv_lib_bsd_gethostbyname" >&5
7245 $as_echo "$ac_cv_lib_bsd_gethostbyname" >&6; }
7246 if test "x$ac_cv_lib_bsd_gethostbyname" = x""yes; then
7247   X_EXTRA_LIBS="$X_EXTRA_LIBS -lbsd"
7248 fi
7249
7250       fi
7251     fi
7252
7253     # lieder@skyler.mavd.honeywell.com says without -lsocket,
7254     # socket/setsockopt and other routines are undefined under SCO ODT
7255     # 2.0.  But -lsocket is broken on IRIX 5.2 (and is not necessary
7256     # on later versions), says Simon Leinen: it contains gethostby*
7257     # variants that don't use the name server (or something).  -lsocket
7258     # must be given before -lnsl if both are needed.  We assume that
7259     # if connect needs -lnsl, so does gethostbyname.
7260     { $as_echo "$as_me:$LINENO: checking for connect" >&5
7261 $as_echo_n "checking for connect... " >&6; }
7262 if test "${ac_cv_func_connect+set}" = set; then
7263   $as_echo_n "(cached) " >&6
7264 else
7265   cat >conftest.$ac_ext <<_ACEOF
7266 /* confdefs.h.  */
7267 _ACEOF
7268 cat confdefs.h >>conftest.$ac_ext
7269 cat >>conftest.$ac_ext <<_ACEOF
7270 /* end confdefs.h.  */
7271 /* Define connect to an innocuous variant, in case <limits.h> declares connect.
7272    For example, HP-UX 11i <limits.h> declares gettimeofday.  */
7273 #define connect innocuous_connect
7274
7275 /* System header to define __stub macros and hopefully few prototypes,
7276     which can conflict with char connect (); below.
7277     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
7278     <limits.h> exists even on freestanding compilers.  */
7279
7280 #ifdef __STDC__
7281 # include <limits.h>
7282 #else
7283 # include <assert.h>
7284 #endif
7285
7286 #undef connect
7287
7288 /* Override any GCC internal prototype to avoid an error.
7289    Use char because int might match the return type of a GCC
7290    builtin and then its argument prototype would still apply.  */
7291 #ifdef __cplusplus
7292 extern "C"
7293 #endif
7294 char connect ();
7295 /* The GNU C library defines this for functions which it implements
7296     to always fail with ENOSYS.  Some functions are actually named
7297     something starting with __ and the normal name is an alias.  */
7298 #if defined __stub_connect || defined __stub___connect
7299 choke me
7300 #endif
7301
7302 int
7303 main ()
7304 {
7305 return connect ();
7306   ;
7307   return 0;
7308 }
7309 _ACEOF
7310 rm -rf conftest.$ac_objext conftest$ac_exeext
7311 if { (ac_try="$ac_link"
7312 case "(($ac_try" in
7313   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7314   *) ac_try_echo=$ac_try;;
7315 esac
7316 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
7317 $as_echo "$ac_try_echo") >&5
7318   (eval "$ac_link") 2>conftest.er1
7319   ac_status=$?
7320   grep -v '^ *+' conftest.er1 >conftest.err
7321   rm -rf conftest.er1
7322   cat conftest.err >&5
7323   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
7324   (exit $ac_status); } && {
7325          test -z "$ac_c_werror_flag" ||
7326          test ! -s conftest.err
7327        } && test -s conftest$ac_exeext && {
7328          test "$cross_compiling" = yes ||
7329          $as_test_x conftest$ac_exeext
7330        }; then
7331   ac_cv_func_connect=yes
7332 else
7333   $as_echo "$as_me: failed program was:" >&5
7334 sed 's/^/| /' conftest.$ac_ext >&5
7335
7336         ac_cv_func_connect=no
7337 fi
7338
7339 rm -rf conftest.dSYM
7340 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
7341       conftest$ac_exeext conftest.$ac_ext
7342 fi
7343 { $as_echo "$as_me:$LINENO: result: $ac_cv_func_connect" >&5
7344 $as_echo "$ac_cv_func_connect" >&6; }
7345
7346     if test $ac_cv_func_connect = no; then
7347       { $as_echo "$as_me:$LINENO: checking for connect in -lsocket" >&5
7348 $as_echo_n "checking for connect in -lsocket... " >&6; }
7349 if test "${ac_cv_lib_socket_connect+set}" = set; then
7350   $as_echo_n "(cached) " >&6
7351 else
7352   ac_check_lib_save_LIBS=$LIBS
7353 LIBS="-lsocket $X_EXTRA_LIBS $LIBS"
7354 cat >conftest.$ac_ext <<_ACEOF
7355 /* confdefs.h.  */
7356 _ACEOF
7357 cat confdefs.h >>conftest.$ac_ext
7358 cat >>conftest.$ac_ext <<_ACEOF
7359 /* end confdefs.h.  */
7360
7361 /* Override any GCC internal prototype to avoid an error.
7362    Use char because int might match the return type of a GCC
7363    builtin and then its argument prototype would still apply.  */
7364 #ifdef __cplusplus
7365 extern "C"
7366 #endif
7367 char connect ();
7368 int
7369 main ()
7370 {
7371 return connect ();
7372   ;
7373   return 0;
7374 }
7375 _ACEOF
7376 rm -rf conftest.$ac_objext conftest$ac_exeext
7377 if { (ac_try="$ac_link"
7378 case "(($ac_try" in
7379   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7380   *) ac_try_echo=$ac_try;;
7381 esac
7382 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
7383 $as_echo "$ac_try_echo") >&5
7384   (eval "$ac_link") 2>conftest.er1
7385   ac_status=$?
7386   grep -v '^ *+' conftest.er1 >conftest.err
7387   rm -rf conftest.er1
7388   cat conftest.err >&5
7389   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
7390   (exit $ac_status); } && {
7391          test -z "$ac_c_werror_flag" ||
7392          test ! -s conftest.err
7393        } && test -s conftest$ac_exeext && {
7394          test "$cross_compiling" = yes ||
7395          $as_test_x conftest$ac_exeext
7396        }; then
7397   ac_cv_lib_socket_connect=yes
7398 else
7399   $as_echo "$as_me: failed program was:" >&5
7400 sed 's/^/| /' conftest.$ac_ext >&5
7401
7402         ac_cv_lib_socket_connect=no
7403 fi
7404
7405 rm -rf conftest.dSYM
7406 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
7407       conftest$ac_exeext conftest.$ac_ext
7408 LIBS=$ac_check_lib_save_LIBS
7409 fi
7410 { $as_echo "$as_me:$LINENO: result: $ac_cv_lib_socket_connect" >&5
7411 $as_echo "$ac_cv_lib_socket_connect" >&6; }
7412 if test "x$ac_cv_lib_socket_connect" = x""yes; then
7413   X_EXTRA_LIBS="-lsocket $X_EXTRA_LIBS"
7414 fi
7415
7416     fi
7417
7418     # Guillermo Gomez says -lposix is necessary on A/UX.
7419     { $as_echo "$as_me:$LINENO: checking for remove" >&5
7420 $as_echo_n "checking for remove... " >&6; }
7421 if test "${ac_cv_func_remove+set}" = set; then
7422   $as_echo_n "(cached) " >&6
7423 else
7424   cat >conftest.$ac_ext <<_ACEOF
7425 /* confdefs.h.  */
7426 _ACEOF
7427 cat confdefs.h >>conftest.$ac_ext
7428 cat >>conftest.$ac_ext <<_ACEOF
7429 /* end confdefs.h.  */
7430 /* Define remove to an innocuous variant, in case <limits.h> declares remove.
7431    For example, HP-UX 11i <limits.h> declares gettimeofday.  */
7432 #define remove innocuous_remove
7433
7434 /* System header to define __stub macros and hopefully few prototypes,
7435     which can conflict with char remove (); below.
7436     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
7437     <limits.h> exists even on freestanding compilers.  */
7438
7439 #ifdef __STDC__
7440 # include <limits.h>
7441 #else
7442 # include <assert.h>
7443 #endif
7444
7445 #undef remove
7446
7447 /* Override any GCC internal prototype to avoid an error.
7448    Use char because int might match the return type of a GCC
7449    builtin and then its argument prototype would still apply.  */
7450 #ifdef __cplusplus
7451 extern "C"
7452 #endif
7453 char remove ();
7454 /* The GNU C library defines this for functions which it implements
7455     to always fail with ENOSYS.  Some functions are actually named
7456     something starting with __ and the normal name is an alias.  */
7457 #if defined __stub_remove || defined __stub___remove
7458 choke me
7459 #endif
7460
7461 int
7462 main ()
7463 {
7464 return remove ();
7465   ;
7466   return 0;
7467 }
7468 _ACEOF
7469 rm -rf conftest.$ac_objext conftest$ac_exeext
7470 if { (ac_try="$ac_link"
7471 case "(($ac_try" in
7472   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7473   *) ac_try_echo=$ac_try;;
7474 esac
7475 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
7476 $as_echo "$ac_try_echo") >&5
7477   (eval "$ac_link") 2>conftest.er1
7478   ac_status=$?
7479   grep -v '^ *+' conftest.er1 >conftest.err
7480   rm -rf conftest.er1
7481   cat conftest.err >&5
7482   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
7483   (exit $ac_status); } && {
7484          test -z "$ac_c_werror_flag" ||
7485          test ! -s conftest.err
7486        } && test -s conftest$ac_exeext && {
7487          test "$cross_compiling" = yes ||
7488          $as_test_x conftest$ac_exeext
7489        }; then
7490   ac_cv_func_remove=yes
7491 else
7492   $as_echo "$as_me: failed program was:" >&5
7493 sed 's/^/| /' conftest.$ac_ext >&5
7494
7495         ac_cv_func_remove=no
7496 fi
7497
7498 rm -rf conftest.dSYM
7499 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
7500       conftest$ac_exeext conftest.$ac_ext
7501 fi
7502 { $as_echo "$as_me:$LINENO: result: $ac_cv_func_remove" >&5
7503 $as_echo "$ac_cv_func_remove" >&6; }
7504
7505     if test $ac_cv_func_remove = no; then
7506       { $as_echo "$as_me:$LINENO: checking for remove in -lposix" >&5
7507 $as_echo_n "checking for remove in -lposix... " >&6; }
7508 if test "${ac_cv_lib_posix_remove+set}" = set; then
7509   $as_echo_n "(cached) " >&6
7510 else
7511   ac_check_lib_save_LIBS=$LIBS
7512 LIBS="-lposix  $LIBS"
7513 cat >conftest.$ac_ext <<_ACEOF
7514 /* confdefs.h.  */
7515 _ACEOF
7516 cat confdefs.h >>conftest.$ac_ext
7517 cat >>conftest.$ac_ext <<_ACEOF
7518 /* end confdefs.h.  */
7519
7520 /* Override any GCC internal prototype to avoid an error.
7521    Use char because int might match the return type of a GCC
7522    builtin and then its argument prototype would still apply.  */
7523 #ifdef __cplusplus
7524 extern "C"
7525 #endif
7526 char remove ();
7527 int
7528 main ()
7529 {
7530 return remove ();
7531   ;
7532   return 0;
7533 }
7534 _ACEOF
7535 rm -rf conftest.$ac_objext conftest$ac_exeext
7536 if { (ac_try="$ac_link"
7537 case "(($ac_try" in
7538   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7539   *) ac_try_echo=$ac_try;;
7540 esac
7541 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
7542 $as_echo "$ac_try_echo") >&5
7543   (eval "$ac_link") 2>conftest.er1
7544   ac_status=$?
7545   grep -v '^ *+' conftest.er1 >conftest.err
7546   rm -rf conftest.er1
7547   cat conftest.err >&5
7548   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
7549   (exit $ac_status); } && {
7550          test -z "$ac_c_werror_flag" ||
7551          test ! -s conftest.err
7552        } && test -s conftest$ac_exeext && {
7553          test "$cross_compiling" = yes ||
7554          $as_test_x conftest$ac_exeext
7555        }; then
7556   ac_cv_lib_posix_remove=yes
7557 else
7558   $as_echo "$as_me: failed program was:" >&5
7559 sed 's/^/| /' conftest.$ac_ext >&5
7560
7561         ac_cv_lib_posix_remove=no
7562 fi
7563
7564 rm -rf conftest.dSYM
7565 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
7566       conftest$ac_exeext conftest.$ac_ext
7567 LIBS=$ac_check_lib_save_LIBS
7568 fi
7569 { $as_echo "$as_me:$LINENO: result: $ac_cv_lib_posix_remove" >&5
7570 $as_echo "$ac_cv_lib_posix_remove" >&6; }
7571 if test "x$ac_cv_lib_posix_remove" = x""yes; then
7572   X_EXTRA_LIBS="$X_EXTRA_LIBS -lposix"
7573 fi
7574
7575     fi
7576
7577     # BSDI BSD/OS 2.1 needs -lipc for XOpenDisplay.
7578     { $as_echo "$as_me:$LINENO: checking for shmat" >&5
7579 $as_echo_n "checking for shmat... " >&6; }
7580 if test "${ac_cv_func_shmat+set}" = set; then
7581   $as_echo_n "(cached) " >&6
7582 else
7583   cat >conftest.$ac_ext <<_ACEOF
7584 /* confdefs.h.  */
7585 _ACEOF
7586 cat confdefs.h >>conftest.$ac_ext
7587 cat >>conftest.$ac_ext <<_ACEOF
7588 /* end confdefs.h.  */
7589 /* Define shmat to an innocuous variant, in case <limits.h> declares shmat.
7590    For example, HP-UX 11i <limits.h> declares gettimeofday.  */
7591 #define shmat innocuous_shmat
7592
7593 /* System header to define __stub macros and hopefully few prototypes,
7594     which can conflict with char shmat (); below.
7595     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
7596     <limits.h> exists even on freestanding compilers.  */
7597
7598 #ifdef __STDC__
7599 # include <limits.h>
7600 #else
7601 # include <assert.h>
7602 #endif
7603
7604 #undef shmat
7605
7606 /* Override any GCC internal prototype to avoid an error.
7607    Use char because int might match the return type of a GCC
7608    builtin and then its argument prototype would still apply.  */
7609 #ifdef __cplusplus
7610 extern "C"
7611 #endif
7612 char shmat ();
7613 /* The GNU C library defines this for functions which it implements
7614     to always fail with ENOSYS.  Some functions are actually named
7615     something starting with __ and the normal name is an alias.  */
7616 #if defined __stub_shmat || defined __stub___shmat
7617 choke me
7618 #endif
7619
7620 int
7621 main ()
7622 {
7623 return shmat ();
7624   ;
7625   return 0;
7626 }
7627 _ACEOF
7628 rm -rf conftest.$ac_objext conftest$ac_exeext
7629 if { (ac_try="$ac_link"
7630 case "(($ac_try" in
7631   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7632   *) ac_try_echo=$ac_try;;
7633 esac
7634 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
7635 $as_echo "$ac_try_echo") >&5
7636   (eval "$ac_link") 2>conftest.er1
7637   ac_status=$?
7638   grep -v '^ *+' conftest.er1 >conftest.err
7639   rm -rf conftest.er1
7640   cat conftest.err >&5
7641   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
7642   (exit $ac_status); } && {
7643          test -z "$ac_c_werror_flag" ||
7644          test ! -s conftest.err
7645        } && test -s conftest$ac_exeext && {
7646          test "$cross_compiling" = yes ||
7647          $as_test_x conftest$ac_exeext
7648        }; then
7649   ac_cv_func_shmat=yes
7650 else
7651   $as_echo "$as_me: failed program was:" >&5
7652 sed 's/^/| /' conftest.$ac_ext >&5
7653
7654         ac_cv_func_shmat=no
7655 fi
7656
7657 rm -rf conftest.dSYM
7658 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
7659       conftest$ac_exeext conftest.$ac_ext
7660 fi
7661 { $as_echo "$as_me:$LINENO: result: $ac_cv_func_shmat" >&5
7662 $as_echo "$ac_cv_func_shmat" >&6; }
7663
7664     if test $ac_cv_func_shmat = no; then
7665       { $as_echo "$as_me:$LINENO: checking for shmat in -lipc" >&5
7666 $as_echo_n "checking for shmat in -lipc... " >&6; }
7667 if test "${ac_cv_lib_ipc_shmat+set}" = set; then
7668   $as_echo_n "(cached) " >&6
7669 else
7670   ac_check_lib_save_LIBS=$LIBS
7671 LIBS="-lipc  $LIBS"
7672 cat >conftest.$ac_ext <<_ACEOF
7673 /* confdefs.h.  */
7674 _ACEOF
7675 cat confdefs.h >>conftest.$ac_ext
7676 cat >>conftest.$ac_ext <<_ACEOF
7677 /* end confdefs.h.  */
7678
7679 /* Override any GCC internal prototype to avoid an error.
7680    Use char because int might match the return type of a GCC
7681    builtin and then its argument prototype would still apply.  */
7682 #ifdef __cplusplus
7683 extern "C"
7684 #endif
7685 char shmat ();
7686 int
7687 main ()
7688 {
7689 return shmat ();
7690   ;
7691   return 0;
7692 }
7693 _ACEOF
7694 rm -rf conftest.$ac_objext conftest$ac_exeext
7695 if { (ac_try="$ac_link"
7696 case "(($ac_try" in
7697   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7698   *) ac_try_echo=$ac_try;;
7699 esac
7700 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
7701 $as_echo "$ac_try_echo") >&5
7702   (eval "$ac_link") 2>conftest.er1
7703   ac_status=$?
7704   grep -v '^ *+' conftest.er1 >conftest.err
7705   rm -rf conftest.er1
7706   cat conftest.err >&5
7707   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
7708   (exit $ac_status); } && {
7709          test -z "$ac_c_werror_flag" ||
7710          test ! -s conftest.err
7711        } && test -s conftest$ac_exeext && {
7712          test "$cross_compiling" = yes ||
7713          $as_test_x conftest$ac_exeext
7714        }; then
7715   ac_cv_lib_ipc_shmat=yes
7716 else
7717   $as_echo "$as_me: failed program was:" >&5
7718 sed 's/^/| /' conftest.$ac_ext >&5
7719
7720         ac_cv_lib_ipc_shmat=no
7721 fi
7722
7723 rm -rf conftest.dSYM
7724 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
7725       conftest$ac_exeext conftest.$ac_ext
7726 LIBS=$ac_check_lib_save_LIBS
7727 fi
7728 { $as_echo "$as_me:$LINENO: result: $ac_cv_lib_ipc_shmat" >&5
7729 $as_echo "$ac_cv_lib_ipc_shmat" >&6; }
7730 if test "x$ac_cv_lib_ipc_shmat" = x""yes; then
7731   X_EXTRA_LIBS="$X_EXTRA_LIBS -lipc"
7732 fi
7733
7734     fi
7735   fi
7736
7737   # Check for libraries that X11R6 Xt/Xaw programs need.
7738   ac_save_LDFLAGS=$LDFLAGS
7739   test -n "$x_libraries" && LDFLAGS="$LDFLAGS -L$x_libraries"
7740   # SM needs ICE to (dynamically) link under SunOS 4.x (so we have to
7741   # check for ICE first), but we must link in the order -lSM -lICE or
7742   # we get undefined symbols.  So assume we have SM if we have ICE.
7743   # These have to be linked with before -lX11, unlike the other
7744   # libraries we check for below, so use a different variable.
7745   # John Interrante, Karl Berry
7746   { $as_echo "$as_me:$LINENO: checking for IceConnectionNumber in -lICE" >&5
7747 $as_echo_n "checking for IceConnectionNumber in -lICE... " >&6; }
7748 if test "${ac_cv_lib_ICE_IceConnectionNumber+set}" = set; then
7749   $as_echo_n "(cached) " >&6
7750 else
7751   ac_check_lib_save_LIBS=$LIBS
7752 LIBS="-lICE $X_EXTRA_LIBS $LIBS"
7753 cat >conftest.$ac_ext <<_ACEOF
7754 /* confdefs.h.  */
7755 _ACEOF
7756 cat confdefs.h >>conftest.$ac_ext
7757 cat >>conftest.$ac_ext <<_ACEOF
7758 /* end confdefs.h.  */
7759
7760 /* Override any GCC internal prototype to avoid an error.
7761    Use char because int might match the return type of a GCC
7762    builtin and then its argument prototype would still apply.  */
7763 #ifdef __cplusplus
7764 extern "C"
7765 #endif
7766 char IceConnectionNumber ();
7767 int
7768 main ()
7769 {
7770 return IceConnectionNumber ();
7771   ;
7772   return 0;
7773 }
7774 _ACEOF
7775 rm -rf conftest.$ac_objext conftest$ac_exeext
7776 if { (ac_try="$ac_link"
7777 case "(($ac_try" in
7778   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7779   *) ac_try_echo=$ac_try;;
7780 esac
7781 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
7782 $as_echo "$ac_try_echo") >&5
7783   (eval "$ac_link") 2>conftest.er1
7784   ac_status=$?
7785   grep -v '^ *+' conftest.er1 >conftest.err
7786   rm -rf conftest.er1
7787   cat conftest.err >&5
7788   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
7789   (exit $ac_status); } && {
7790          test -z "$ac_c_werror_flag" ||
7791          test ! -s conftest.err
7792        } && test -s conftest$ac_exeext && {
7793          test "$cross_compiling" = yes ||
7794          $as_test_x conftest$ac_exeext
7795        }; then
7796   ac_cv_lib_ICE_IceConnectionNumber=yes
7797 else
7798   $as_echo "$as_me: failed program was:" >&5
7799 sed 's/^/| /' conftest.$ac_ext >&5
7800
7801         ac_cv_lib_ICE_IceConnectionNumber=no
7802 fi
7803
7804 rm -rf conftest.dSYM
7805 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
7806       conftest$ac_exeext conftest.$ac_ext
7807 LIBS=$ac_check_lib_save_LIBS
7808 fi
7809 { $as_echo "$as_me:$LINENO: result: $ac_cv_lib_ICE_IceConnectionNumber" >&5
7810 $as_echo "$ac_cv_lib_ICE_IceConnectionNumber" >&6; }
7811 if test "x$ac_cv_lib_ICE_IceConnectionNumber" = x""yes; then
7812   X_PRE_LIBS="$X_PRE_LIBS -lSM -lICE"
7813 fi
7814
7815   LDFLAGS=$ac_save_LDFLAGS
7816
7817 fi
7818
7819
7820 if test "$have_x" != yes; then
7821   { { $as_echo "$as_me:$LINENO: error: Couldn't find X11 headers/libs.  Try \`$0 --help'." >&5
7822 $as_echo "$as_me: error: Couldn't find X11 headers/libs.  Try \`$0 --help'." >&2;}
7823    { (exit 1); exit 1; }; }
7824 fi
7825
7826
7827     { $as_echo "$as_me:$LINENO: checking for X app-defaults directory" >&5
7828 $as_echo_n "checking for X app-defaults directory... " >&6; }
7829 if test "${ac_cv_x_app_defaults+set}" = set; then
7830   $as_echo_n "(cached) " >&6
7831 else
7832
7833   rm -fr conftestdir
7834   if mkdir conftestdir; then
7835     cd conftestdir 2>/dev/null
7836     # Make sure to not put "make" in the Imakefile rules, since we grep it out.
7837     cat > Imakefile <<'EOF'
7838 acfindx:
7839         @echo 'ac_x_app_defaults="${XAPPLOADDIR}"'
7840 EOF
7841     if (xmkmf) >/dev/null 2>&1 && test -f Makefile; then
7842       # GNU make sometimes prints "make[1]: Entering...", which'd confuse us.
7843       eval `${MAKE-make} acfindx 2>/dev/null | grep -v make`
7844     fi
7845     cd .. 2>/dev/null
7846     rm -fr conftestdir
7847   fi
7848       if test x"$ac_x_app_defaults" = x; then
7849
7850   # Look for the directory under a standard set of common directories.
7851   # Check X11 before X11Rn because it's often a symlink to the current release.
7852   for ac_dir in                                 \
7853     /usr/X11/lib/app-defaults                   \
7854     /usr/X11R6/lib/app-defaults                 \
7855     /usr/X11R6/lib/X11/app-defaults             \
7856     /usr/X11R5/lib/app-defaults                 \
7857     /usr/X11R5/lib/X11/app-defaults             \
7858     /usr/X11R4/lib/app-defaults                 \
7859     /usr/X11R4/lib/X11/app-defaults             \
7860                                                 \
7861     /usr/lib/X11/app-defaults                   \
7862     /usr/lib/X11R6/app-defaults                 \
7863     /usr/lib/X11R5/app-defaults                 \
7864     /usr/lib/X11R4/app-defaults                 \
7865                                                 \
7866     /usr/local/X11/lib/app-defaults             \
7867     /usr/local/X11R6/lib/app-defaults           \
7868     /usr/local/X11R5/lib/app-defaults           \
7869     /usr/local/X11R4/lib/app-defaults           \
7870                                                 \
7871     /usr/local/lib/X11/app-defaults             \
7872     /usr/local/lib/X11R6/app-defaults           \
7873     /usr/local/lib/X11R6/X11/app-defaults       \
7874     /usr/local/lib/X11R5/app-defaults           \
7875     /usr/local/lib/X11R5/X11/app-defaults       \
7876     /usr/local/lib/X11R4/app-defaults           \
7877     /usr/local/lib/X11R4/X11/app-defaults       \
7878                                                 \
7879     /usr/X386/lib/X11/app-defaults              \
7880     /usr/x386/lib/X11/app-defaults              \
7881     /usr/XFree86/lib/X11/app-defaults           \
7882                                                 \
7883     /usr/lib/X11/app-defaults                   \
7884     /usr/local/lib/X11/app-defaults             \
7885     /usr/unsupported/lib/X11/app-defaults       \
7886     /usr/athena/lib/X11/app-defaults            \
7887     /usr/local/x11r5/lib/X11/app-defaults       \
7888     /usr/lpp/Xamples/lib/X11/app-defaults       \
7889     /lib/usr/lib/X11/app-defaults               \
7890                                                 \
7891     /usr/openwin/lib/app-defaults               \
7892     /usr/openwin/lib/X11/app-defaults           \
7893     /usr/openwin/share/lib/app-defaults         \
7894     /usr/openwin/share/lib/X11/app-defaults     \
7895                                                 \
7896     /X11R6/lib/app-defaults                     \
7897     /X11R5/lib/app-defaults                     \
7898     /X11R4/lib/app-defaults                     \
7899     ; \
7900   do
7901     if test -d "$ac_dir"; then
7902       ac_x_app_defaults=$ac_dir
7903       break
7904     fi
7905   done
7906
7907       fi
7908       if test x"$ac_x_app_defaults" = x; then
7909         ac_cv_x_app_defaults="/usr/lib/X11/app-defaults"
7910       else
7911         # Record where we found app-defaults for the cache.
7912         ac_cv_x_app_defaults="$ac_x_app_defaults"
7913       fi
7914 fi
7915 { $as_echo "$as_me:$LINENO: result: $ac_cv_x_app_defaults" >&5
7916 $as_echo "$ac_cv_x_app_defaults" >&6; }
7917     eval ac_x_app_defaults="$ac_cv_x_app_defaults"
7918 case "$host" in
7919     *-hpux*)
7920
7921       # The following arcana was gleaned from conversations with
7922       # Eric Schwartz <erics@col.hp.com>:
7923       #
7924       # On HPUX 10.x, the parts of X that HP considers "standard" live in
7925       # /usr/{include,lib}/X11R6/.  The parts that HP doesn't consider
7926       # "standard", notably, Xaw and Xmu, live in /usr/contrib/X11R6/.
7927       # Yet /usr/contrib/X11R6/ comes preinstalled on all HPUX systems.
7928       # Also, there are symlinks from /usr/include/ and /usr/lib/ into
7929       # /usr/{include,lib}/X11R6/, so that (if you don't use Xmu at all)
7930       # you don't need any -I or -L arguments.
7931       #
7932       # On HPUX 9.x, /usr/{include,lib}/X11R5/ and /usr/contrib/X11R5/
7933       # are the same division as 10.x.  However, there are no symlinks to
7934       # the X stuff from /usr/include/ and /usr/lib/, so -I and -L
7935       # arguments are always necessary.
7936       #
7937       # However, X11R6 was available on HPUX 9.x as a patch: if that
7938       # patch was installed, then all of X11R6 went in to
7939       # /usr/contrib/X11R6/ (there was no /usr/{include,lib}/X11R6/.)
7940       #
7941       # HPUX 8.x was the same as 9.x, but was X11R4 instead (I don't know
7942       # whether R5 was available as a patch; R6 undoubtedly was not.)
7943       #
7944       # So.  We try and use the highest numbered pair of
7945       # /usr/{include,lib}/X11R?/ and /usr/contrib/X11R?/{include,lib}/
7946       # that are available.  We do not mix and match different versions
7947       # of X.
7948       #
7949       # Question I still don't know the answer to: (do you?)
7950       #
7951       #   * On HPUX 9.x, where /usr/include/X11R5/ was standard, and
7952       #     /usr/contrib/X11R6/ could be installed as a patch, what was in
7953       #     that contrib directory?  Did it contain so-called "standard"
7954       #     X11R6, or did it include Xaw and Xmu as well?  If the former,
7955       #     where did one find Xaw and Xmu on 9.x R6 systems?  Would this
7956       #     be a situation where one had to reach into the R5 headers and
7957       #     libs to find Xmu?  That is, must both R6 and R5 directories
7958       #     be on the -I and -L lists in that case?
7959       #
7960       for version in X11R6 X11R5 X11R4 ; do
7961         # if either pair of directories exists...
7962         if test -d /usr/include/$version || test -d /usr/contrib/$version/include
7963         then
7964            # if contrib exists, use it...
7965            if test -d /usr/contrib/$version/include ; then
7966              X_CFLAGS="$X_CFLAGS -I/usr/contrib/$version/include"
7967              X_LIBS="$X_LIBS -L/usr/contrib/$version/lib"
7968            fi
7969            # if the "standard" one exists, use it.
7970            if test -d /usr/include/$version ; then
7971              X_CFLAGS="$X_CFLAGS -I/usr/include/$version"
7972              X_LIBS="$X_LIBS -L/usr/lib/$version"
7973            fi
7974            # since at least one of the pair exists, go no farther.
7975            break
7976         fi
7977       done
7978
7979       # Now find Motif.  Thanks for not making xmkmf find this by
7980       # default, you losers.
7981       #
7982       if test -d /usr/include/Motif2.1 ; then
7983         X_CFLAGS="$X_CFLAGS -I/usr/include/Motif2.1"
7984         X_LIBS="$X_LIBS -L/usr/lib/Motif2.1"
7985       elif test -d /usr/include/Motif1.2 ; then
7986         X_CFLAGS="$X_CFLAGS -I/usr/include/Motif1.2"
7987         X_LIBS="$X_LIBS -L/usr/lib/Motif1.2"
7988       elif test -d /usr/include/Motif1.1 ; then
7989         X_CFLAGS="$X_CFLAGS -I/usr/include/Motif1.1"
7990         X_LIBS="$X_LIBS -L/usr/lib/Motif1.1"
7991       fi
7992
7993       # Now let's check for the pseudo-standard locations for OpenGL and XPM.
7994       #
7995       if test -d /opt/graphics/OpenGL/include ; then
7996         # HP-UX 10.20 puts it here
7997         X_CFLAGS="-I/opt/graphics/OpenGL/include $X_CFLAGS"
7998         X_LIBS="-L/opt/graphics/OpenGL/lib $X_LIBS"
7999       elif test -d /opt/Mesa/lib ; then
8000         X_CFLAGS="-I/opt/Mesa/include $X_CFLAGS"
8001         X_LIBS="-L/opt/Mesa/lib $X_LIBS"
8002       fi
8003
8004
8005       if test -d /opt/xpm/lib/X11 ; then
8006         X_CFLAGS="-I/opt/xpm/include $X_CFLAGS"
8007         X_LIBS="-L/opt/xpm/lib/X11 $X_LIBS"
8008       fi
8009
8010       # On HPUX, default to installing in /opt/xscreensaver/ instead of
8011       # in /usr/local/, unless there is already an xscreensaver in
8012       # /usr/local/bin/.  This can be overridden with the --prefix arg
8013       # to configure.  I'm not sure this is the right thing to do, but
8014       # Richard Lloyd says so...
8015       #
8016       if test \! -x /usr/local/bin/xscreensaver ; then
8017         ac_default_prefix=/opt/xscreensaver
8018       fi
8019
8020     ;;
8021     *-solaris*)
8022
8023       # Thanks for not making xmkmf find this by default, pinheads.
8024       # And thanks for moving things around again, too.  Is this
8025       # really the standard location now?  What happened to the
8026       # joke that this kind of thing went in /opt?
8027       # cthomp says "answer: CDE (Common Disorganized Environment)"
8028       #
8029       if test -f /usr/dt/include/Xm/Xm.h ; then
8030         X_CFLAGS="$X_CFLAGS -I/usr/dt/include"
8031         MOTIF_LIBS="$MOTIF_LIBS -L/usr/dt/lib -R/usr/dt/lib"
8032
8033         # Some versions of Slowlaris Motif require -lgen.  But not all.  Why?
8034         { $as_echo "$as_me:$LINENO: checking for regcmp in -lgen" >&5
8035 $as_echo_n "checking for regcmp in -lgen... " >&6; }
8036 if test "${ac_cv_lib_gen_regcmp+set}" = set; then
8037   $as_echo_n "(cached) " >&6
8038 else
8039   ac_check_lib_save_LIBS=$LIBS
8040 LIBS="-lgen  $LIBS"
8041 cat >conftest.$ac_ext <<_ACEOF
8042 /* confdefs.h.  */
8043 _ACEOF
8044 cat confdefs.h >>conftest.$ac_ext
8045 cat >>conftest.$ac_ext <<_ACEOF
8046 /* end confdefs.h.  */
8047
8048 /* Override any GCC internal prototype to avoid an error.
8049    Use char because int might match the return type of a GCC
8050    builtin and then its argument prototype would still apply.  */
8051 #ifdef __cplusplus
8052 extern "C"
8053 #endif
8054 char regcmp ();
8055 int
8056 main ()
8057 {
8058 return regcmp ();
8059   ;
8060   return 0;
8061 }
8062 _ACEOF
8063 rm -rf conftest.$ac_objext conftest$ac_exeext
8064 if { (ac_try="$ac_link"
8065 case "(($ac_try" in
8066   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8067   *) ac_try_echo=$ac_try;;
8068 esac
8069 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
8070 $as_echo "$ac_try_echo") >&5
8071   (eval "$ac_link") 2>conftest.er1
8072   ac_status=$?
8073   grep -v '^ *+' conftest.er1 >conftest.err
8074   rm -rf conftest.er1
8075   cat conftest.err >&5
8076   $as_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_exeext && {
8081          test "$cross_compiling" = yes ||
8082          $as_test_x conftest$ac_exeext
8083        }; then
8084   ac_cv_lib_gen_regcmp=yes
8085 else
8086   $as_echo "$as_me: failed program was:" >&5
8087 sed 's/^/| /' conftest.$ac_ext >&5
8088
8089         ac_cv_lib_gen_regcmp=no
8090 fi
8091
8092 rm -rf conftest.dSYM
8093 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
8094       conftest$ac_exeext conftest.$ac_ext
8095 LIBS=$ac_check_lib_save_LIBS
8096 fi
8097 { $as_echo "$as_me:$LINENO: result: $ac_cv_lib_gen_regcmp" >&5
8098 $as_echo "$ac_cv_lib_gen_regcmp" >&6; }
8099 if test "x$ac_cv_lib_gen_regcmp" = x""yes; then
8100   MOTIF_LIBS="$MOTIF_LIBS -lgen"
8101 fi
8102
8103       fi
8104
8105     ;;
8106     *-darwin*)
8107
8108       # On MacOS X (10.x with "fink"), many things are under /sw/.
8109       #
8110       if test -d /sw/include ; then
8111         X_CFLAGS="-I/sw/include $X_CFLAGS"
8112         X_LIBS="-L/sw/lib $X_LIBS"
8113       fi
8114     ;;
8115   esac
8116 { $as_echo "$as_me:$LINENO: checking for XPointer" >&5
8117 $as_echo_n "checking for XPointer... " >&6; }
8118 if test "${ac_cv_xpointer+set}" = set; then
8119   $as_echo_n "(cached) " >&6
8120 else
8121
8122   ac_save_CPPFLAGS="$CPPFLAGS"
8123   if test \! -z "$includedir" ; then
8124     CPPFLAGS="$CPPFLAGS -I$includedir"
8125   fi
8126   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
8127   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
8128   cat >conftest.$ac_ext <<_ACEOF
8129 /* confdefs.h.  */
8130 _ACEOF
8131 cat confdefs.h >>conftest.$ac_ext
8132 cat >>conftest.$ac_ext <<_ACEOF
8133 /* end confdefs.h.  */
8134 #include <X11/Xlib.h>
8135 int
8136 main ()
8137 {
8138 XPointer foo = (XPointer) 0;
8139   ;
8140   return 0;
8141 }
8142 _ACEOF
8143 rm -rf conftest.$ac_objext
8144 if { (ac_try="$ac_compile"
8145 case "(($ac_try" in
8146   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8147   *) ac_try_echo=$ac_try;;
8148 esac
8149 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
8150 $as_echo "$ac_try_echo") >&5
8151   (eval "$ac_compile") 2>conftest.er1
8152   ac_status=$?
8153   grep -v '^ *+' conftest.er1 >conftest.err
8154   rm -rf conftest.er1
8155   cat conftest.err >&5
8156   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
8157   (exit $ac_status); } && {
8158          test -z "$ac_c_werror_flag" ||
8159          test ! -s conftest.err
8160        } && test -s conftest.$ac_objext; then
8161   ac_cv_xpointer=yes
8162 else
8163   $as_echo "$as_me: failed program was:" >&5
8164 sed 's/^/| /' conftest.$ac_ext >&5
8165
8166         ac_cv_xpointer=no
8167 fi
8168
8169 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
8170   CPPFLAGS="$ac_save_CPPFLAGS"
8171 fi
8172 { $as_echo "$as_me:$LINENO: result: $ac_cv_xpointer" >&5
8173 $as_echo "$ac_cv_xpointer" >&6; }
8174   if test "$ac_cv_xpointer" != yes; then
8175    cat >>confdefs.h <<\_ACEOF
8176 #define XPointer char*
8177 _ACEOF
8178
8179   fi
8180
8181 { $as_echo "$as_me:$LINENO: checking whether this is MacOS X" >&5
8182 $as_echo_n "checking whether this is MacOS X... " >&6; }
8183   ac_macosx=no
8184   case "$host" in
8185     *-apple-darwin* )
8186       ac_macosx=yes
8187     ;;
8188   esac
8189 { $as_echo "$as_me:$LINENO: result: $ac_macosx" >&5
8190 $as_echo "$ac_macosx" >&6; }
8191
8192
8193 ###############################################################################
8194 #
8195 #       Gettext support
8196 #
8197 ###############################################################################
8198
8199
8200
8201 if test -n ""; then
8202     { $as_echo "$as_me:$LINENO: checking for intltool >= " >&5
8203 $as_echo_n "checking for intltool >= ... " >&6; }
8204
8205     INTLTOOL_REQUIRED_VERSION_AS_INT=`echo  | awk -F. '{ printf "%d", $1 * 100 + $2; }'`
8206     INTLTOOL_APPLIED_VERSION=`awk -F\" '/\\$VERSION / { printf $2; }'  < intltool-update.in`
8207
8208     INTLTOOL_APPLIED_VERSION_AS_INT=`awk -F\" '/\\$VERSION / { split($2, VERSION, "."); printf "%d\n", VERSION[1] * 100 + VERSION[2];}' < intltool-update.in`
8209
8210
8211     if test "$INTLTOOL_APPLIED_VERSION_AS_INT" -ge "$INTLTOOL_REQUIRED_VERSION_AS_INT"; then
8212         { $as_echo "$as_me:$LINENO: result: $INTLTOOL_APPLIED_VERSION found" >&5
8213 $as_echo "$INTLTOOL_APPLIED_VERSION found" >&6; }
8214     else
8215         { $as_echo "$as_me:$LINENO: result: $INTLTOOL_APPLIED_VERSION found. Your intltool is too old.  You need intltool  or later." >&5
8216 $as_echo "$INTLTOOL_APPLIED_VERSION found. Your intltool is too old.  You need intltool  or later." >&6; }
8217         exit 1
8218     fi
8219 fi
8220
8221   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'
8222 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'
8223      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'
8224       INTLTOOL_OAF_RULE='%.oaf:       %.oaf.in       $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; $(INTLTOOL_MERGE) $(top_srcdir)/po $< $@ -o -p'
8225      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'
8226    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'
8227     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'
8228 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'
8229        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'
8230       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'
8231     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'
8232
8233
8234
8235
8236
8237
8238
8239
8240
8241
8242
8243
8244
8245 # Use the tools built into the package, not the ones that are installed.
8246
8247 INTLTOOL_EXTRACT='$(top_builddir)/intltool-extract'
8248 INTLTOOL_MERGE='$(top_builddir)/intltool-merge'
8249 INTLTOOL_UPDATE='$(top_builddir)/intltool-update'
8250
8251
8252
8253
8254
8255 # Extract the first word of "perl", so it can be a program name with args.
8256 set dummy perl; ac_word=$2
8257 { $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
8258 $as_echo_n "checking for $ac_word... " >&6; }
8259 if test "${ac_cv_path_INTLTOOL_PERL+set}" = set; then
8260   $as_echo_n "(cached) " >&6
8261 else
8262   case $INTLTOOL_PERL in
8263   [\\/]* | ?:[\\/]*)
8264   ac_cv_path_INTLTOOL_PERL="$INTLTOOL_PERL" # Let the user override the test with a path.
8265   ;;
8266   *)
8267   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8268 for as_dir in $PATH
8269 do
8270   IFS=$as_save_IFS
8271   test -z "$as_dir" && as_dir=.
8272   for ac_exec_ext in '' $ac_executable_extensions; do
8273   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
8274     ac_cv_path_INTLTOOL_PERL="$as_dir/$ac_word$ac_exec_ext"
8275     $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
8276     break 2
8277   fi
8278 done
8279 done
8280 IFS=$as_save_IFS
8281
8282   ;;
8283 esac
8284 fi
8285 INTLTOOL_PERL=$ac_cv_path_INTLTOOL_PERL
8286 if test -n "$INTLTOOL_PERL"; then
8287   { $as_echo "$as_me:$LINENO: result: $INTLTOOL_PERL" >&5
8288 $as_echo "$INTLTOOL_PERL" >&6; }
8289 else
8290   { $as_echo "$as_me:$LINENO: result: no" >&5
8291 $as_echo "no" >&6; }
8292 fi
8293
8294
8295 if test -z "$INTLTOOL_PERL"; then
8296    { { $as_echo "$as_me:$LINENO: error: perl not found; required for intltool" >&5
8297 $as_echo "$as_me: error: perl not found; required for intltool" >&2;}
8298    { (exit 1); exit 1; }; }
8299 fi
8300 if test -z "`$INTLTOOL_PERL -v | fgrep '5.' 2> /dev/null`"; then
8301    { { $as_echo "$as_me:$LINENO: error: perl 5.x required for intltool" >&5
8302 $as_echo "$as_me: error: perl 5.x required for intltool" >&2;}
8303    { (exit 1); exit 1; }; }
8304 fi
8305
8306 # Remove file type tags (using []) from po/POTFILES.
8307
8308
8309
8310
8311
8312
8313
8314 # Manually sed perl in so people don't have to put the intltool scripts in AC_OUTPUT.
8315
8316 ac_config_commands="$ac_config_commands default-1"
8317
8318
8319
8320 GETTEXT_PACKAGE=xscreensaver
8321
8322 cat >>confdefs.h <<_ACEOF
8323 #define GETTEXT_PACKAGE "$GETTEXT_PACKAGE"
8324 _ACEOF
8325
8326
8327 cat >>confdefs.h <<_ACEOF
8328 #define PACKAGE "$GETTEXT_PACKAGE"
8329 _ACEOF
8330
8331
8332
8333 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"
8334 if test -n "$ac_tool_prefix"; then
8335   # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
8336 set dummy ${ac_tool_prefix}ranlib; ac_word=$2
8337 { $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
8338 $as_echo_n "checking for $ac_word... " >&6; }
8339 if test "${ac_cv_prog_RANLIB+set}" = set; then
8340   $as_echo_n "(cached) " >&6
8341 else
8342   if test -n "$RANLIB"; then
8343   ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
8344 else
8345 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8346 for as_dir in $PATH
8347 do
8348   IFS=$as_save_IFS
8349   test -z "$as_dir" && as_dir=.
8350   for ac_exec_ext in '' $ac_executable_extensions; do
8351   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
8352     ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
8353     $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
8354     break 2
8355   fi
8356 done
8357 done
8358 IFS=$as_save_IFS
8359
8360 fi
8361 fi
8362 RANLIB=$ac_cv_prog_RANLIB
8363 if test -n "$RANLIB"; then
8364   { $as_echo "$as_me:$LINENO: result: $RANLIB" >&5
8365 $as_echo "$RANLIB" >&6; }
8366 else
8367   { $as_echo "$as_me:$LINENO: result: no" >&5
8368 $as_echo "no" >&6; }
8369 fi
8370
8371
8372 fi
8373 if test -z "$ac_cv_prog_RANLIB"; then
8374   ac_ct_RANLIB=$RANLIB
8375   # Extract the first word of "ranlib", so it can be a program name with args.
8376 set dummy ranlib; ac_word=$2
8377 { $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
8378 $as_echo_n "checking for $ac_word... " >&6; }
8379 if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then
8380   $as_echo_n "(cached) " >&6
8381 else
8382   if test -n "$ac_ct_RANLIB"; then
8383   ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
8384 else
8385 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8386 for as_dir in $PATH
8387 do
8388   IFS=$as_save_IFS
8389   test -z "$as_dir" && as_dir=.
8390   for ac_exec_ext in '' $ac_executable_extensions; do
8391   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
8392     ac_cv_prog_ac_ct_RANLIB="ranlib"
8393     $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
8394     break 2
8395   fi
8396 done
8397 done
8398 IFS=$as_save_IFS
8399
8400 fi
8401 fi
8402 ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
8403 if test -n "$ac_ct_RANLIB"; then
8404   { $as_echo "$as_me:$LINENO: result: $ac_ct_RANLIB" >&5
8405 $as_echo "$ac_ct_RANLIB" >&6; }
8406 else
8407   { $as_echo "$as_me:$LINENO: result: no" >&5
8408 $as_echo "no" >&6; }
8409 fi
8410
8411   if test "x$ac_ct_RANLIB" = x; then
8412     RANLIB=":"
8413   else
8414     case $cross_compiling:$ac_tool_warned in
8415 yes:)
8416 { $as_echo "$as_me:$LINENO: WARNING: using cross tools not prefixed with host triplet" >&5
8417 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
8418 ac_tool_warned=yes ;;
8419 esac
8420     RANLIB=$ac_ct_RANLIB
8421   fi
8422 else
8423   RANLIB="$ac_cv_prog_RANLIB"
8424 fi
8425
8426 { $as_echo "$as_me:$LINENO: checking for off_t" >&5
8427 $as_echo_n "checking for off_t... " >&6; }
8428 if test "${ac_cv_type_off_t+set}" = set; then
8429   $as_echo_n "(cached) " >&6
8430 else
8431   ac_cv_type_off_t=no
8432 cat >conftest.$ac_ext <<_ACEOF
8433 /* confdefs.h.  */
8434 _ACEOF
8435 cat confdefs.h >>conftest.$ac_ext
8436 cat >>conftest.$ac_ext <<_ACEOF
8437 /* end confdefs.h.  */
8438 $ac_includes_default
8439 int
8440 main ()
8441 {
8442 if (sizeof (off_t))
8443        return 0;
8444   ;
8445   return 0;
8446 }
8447 _ACEOF
8448 rm -rf conftest.$ac_objext
8449 if { (ac_try="$ac_compile"
8450 case "(($ac_try" in
8451   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8452   *) ac_try_echo=$ac_try;;
8453 esac
8454 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
8455 $as_echo "$ac_try_echo") >&5
8456   (eval "$ac_compile") 2>conftest.er1
8457   ac_status=$?
8458   grep -v '^ *+' conftest.er1 >conftest.err
8459   rm -rf conftest.er1
8460   cat conftest.err >&5
8461   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
8462   (exit $ac_status); } && {
8463          test -z "$ac_c_werror_flag" ||
8464          test ! -s conftest.err
8465        } && test -s conftest.$ac_objext; then
8466   cat >conftest.$ac_ext <<_ACEOF
8467 /* confdefs.h.  */
8468 _ACEOF
8469 cat confdefs.h >>conftest.$ac_ext
8470 cat >>conftest.$ac_ext <<_ACEOF
8471 /* end confdefs.h.  */
8472 $ac_includes_default
8473 int
8474 main ()
8475 {
8476 if (sizeof ((off_t)))
8477           return 0;
8478   ;
8479   return 0;
8480 }
8481 _ACEOF
8482 rm -rf conftest.$ac_objext
8483 if { (ac_try="$ac_compile"
8484 case "(($ac_try" in
8485   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8486   *) ac_try_echo=$ac_try;;
8487 esac
8488 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
8489 $as_echo "$ac_try_echo") >&5
8490   (eval "$ac_compile") 2>conftest.er1
8491   ac_status=$?
8492   grep -v '^ *+' conftest.er1 >conftest.err
8493   rm -rf conftest.er1
8494   cat conftest.err >&5
8495   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
8496   (exit $ac_status); } && {
8497          test -z "$ac_c_werror_flag" ||
8498          test ! -s conftest.err
8499        } && test -s conftest.$ac_objext; then
8500   :
8501 else
8502   $as_echo "$as_me: failed program was:" >&5
8503 sed 's/^/| /' conftest.$ac_ext >&5
8504
8505         ac_cv_type_off_t=yes
8506 fi
8507
8508 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
8509 else
8510   $as_echo "$as_me: failed program was:" >&5
8511 sed 's/^/| /' conftest.$ac_ext >&5
8512
8513
8514 fi
8515
8516 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
8517 fi
8518 { $as_echo "$as_me:$LINENO: result: $ac_cv_type_off_t" >&5
8519 $as_echo "$ac_cv_type_off_t" >&6; }
8520 if test "x$ac_cv_type_off_t" = x""yes; then
8521   :
8522 else
8523
8524 cat >>confdefs.h <<_ACEOF
8525 #define off_t long int
8526 _ACEOF
8527
8528 fi
8529
8530 # The Ultrix 4.2 mips builtin alloca declared by alloca.h only works
8531 # for constant arguments.  Useless!
8532 { $as_echo "$as_me:$LINENO: checking for working alloca.h" >&5
8533 $as_echo_n "checking for working alloca.h... " >&6; }
8534 if test "${ac_cv_working_alloca_h+set}" = set; then
8535   $as_echo_n "(cached) " >&6
8536 else
8537   cat >conftest.$ac_ext <<_ACEOF
8538 /* confdefs.h.  */
8539 _ACEOF
8540 cat confdefs.h >>conftest.$ac_ext
8541 cat >>conftest.$ac_ext <<_ACEOF
8542 /* end confdefs.h.  */
8543 #include <alloca.h>
8544 int
8545 main ()
8546 {
8547 char *p = (char *) alloca (2 * sizeof (int));
8548                           if (p) return 0;
8549   ;
8550   return 0;
8551 }
8552 _ACEOF
8553 rm -rf conftest.$ac_objext conftest$ac_exeext
8554 if { (ac_try="$ac_link"
8555 case "(($ac_try" in
8556   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8557   *) ac_try_echo=$ac_try;;
8558 esac
8559 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
8560 $as_echo "$ac_try_echo") >&5
8561   (eval "$ac_link") 2>conftest.er1
8562   ac_status=$?
8563   grep -v '^ *+' conftest.er1 >conftest.err
8564   rm -rf conftest.er1
8565   cat conftest.err >&5
8566   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
8567   (exit $ac_status); } && {
8568          test -z "$ac_c_werror_flag" ||
8569          test ! -s conftest.err
8570        } && test -s conftest$ac_exeext && {
8571          test "$cross_compiling" = yes ||
8572          $as_test_x conftest$ac_exeext
8573        }; then
8574   ac_cv_working_alloca_h=yes
8575 else
8576   $as_echo "$as_me: failed program was:" >&5
8577 sed 's/^/| /' conftest.$ac_ext >&5
8578
8579         ac_cv_working_alloca_h=no
8580 fi
8581
8582 rm -rf conftest.dSYM
8583 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
8584       conftest$ac_exeext conftest.$ac_ext
8585 fi
8586 { $as_echo "$as_me:$LINENO: result: $ac_cv_working_alloca_h" >&5
8587 $as_echo "$ac_cv_working_alloca_h" >&6; }
8588 if test $ac_cv_working_alloca_h = yes; then
8589
8590 cat >>confdefs.h <<\_ACEOF
8591 #define HAVE_ALLOCA_H 1
8592 _ACEOF
8593
8594 fi
8595
8596 { $as_echo "$as_me:$LINENO: checking for alloca" >&5
8597 $as_echo_n "checking for alloca... " >&6; }
8598 if test "${ac_cv_func_alloca_works+set}" = set; then
8599   $as_echo_n "(cached) " >&6
8600 else
8601   cat >conftest.$ac_ext <<_ACEOF
8602 /* confdefs.h.  */
8603 _ACEOF
8604 cat confdefs.h >>conftest.$ac_ext
8605 cat >>conftest.$ac_ext <<_ACEOF
8606 /* end confdefs.h.  */
8607 #ifdef __GNUC__
8608 # define alloca __builtin_alloca
8609 #else
8610 # ifdef _MSC_VER
8611 #  include <malloc.h>
8612 #  define alloca _alloca
8613 # else
8614 #  ifdef HAVE_ALLOCA_H
8615 #   include <alloca.h>
8616 #  else
8617 #   ifdef _AIX
8618  #pragma alloca
8619 #   else
8620 #    ifndef alloca /* predefined by HP cc +Olibcalls */
8621 char *alloca ();
8622 #    endif
8623 #   endif
8624 #  endif
8625 # endif
8626 #endif
8627
8628 int
8629 main ()
8630 {
8631 char *p = (char *) alloca (1);
8632                                     if (p) return 0;
8633   ;
8634   return 0;
8635 }
8636 _ACEOF
8637 rm -rf conftest.$ac_objext conftest$ac_exeext
8638 if { (ac_try="$ac_link"
8639 case "(($ac_try" in
8640   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8641   *) ac_try_echo=$ac_try;;
8642 esac
8643 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
8644 $as_echo "$ac_try_echo") >&5
8645   (eval "$ac_link") 2>conftest.er1
8646   ac_status=$?
8647   grep -v '^ *+' conftest.er1 >conftest.err
8648   rm -rf conftest.er1
8649   cat conftest.err >&5
8650   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
8651   (exit $ac_status); } && {
8652          test -z "$ac_c_werror_flag" ||
8653          test ! -s conftest.err
8654        } && test -s conftest$ac_exeext && {
8655          test "$cross_compiling" = yes ||
8656          $as_test_x conftest$ac_exeext
8657        }; then
8658   ac_cv_func_alloca_works=yes
8659 else
8660   $as_echo "$as_me: failed program was:" >&5
8661 sed 's/^/| /' conftest.$ac_ext >&5
8662
8663         ac_cv_func_alloca_works=no
8664 fi
8665
8666 rm -rf conftest.dSYM
8667 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
8668       conftest$ac_exeext conftest.$ac_ext
8669 fi
8670 { $as_echo "$as_me:$LINENO: result: $ac_cv_func_alloca_works" >&5
8671 $as_echo "$ac_cv_func_alloca_works" >&6; }
8672
8673 if test $ac_cv_func_alloca_works = yes; then
8674
8675 cat >>confdefs.h <<\_ACEOF
8676 #define HAVE_ALLOCA 1
8677 _ACEOF
8678
8679 else
8680   # The SVR3 libPW and SVR4 libucb both contain incompatible functions
8681 # that cause trouble.  Some versions do not even contain alloca or
8682 # contain a buggy version.  If you still want to use their alloca,
8683 # use ar to extract alloca.o from them instead of compiling alloca.c.
8684
8685 ALLOCA=\${LIBOBJDIR}alloca.$ac_objext
8686
8687 cat >>confdefs.h <<\_ACEOF
8688 #define C_ALLOCA 1
8689 _ACEOF
8690
8691
8692 { $as_echo "$as_me:$LINENO: checking whether \`alloca.c' needs Cray hooks" >&5
8693 $as_echo_n "checking whether \`alloca.c' needs Cray hooks... " >&6; }
8694 if test "${ac_cv_os_cray+set}" = set; then
8695   $as_echo_n "(cached) " >&6
8696 else
8697   cat >conftest.$ac_ext <<_ACEOF
8698 /* confdefs.h.  */
8699 _ACEOF
8700 cat confdefs.h >>conftest.$ac_ext
8701 cat >>conftest.$ac_ext <<_ACEOF
8702 /* end confdefs.h.  */
8703 #if defined CRAY && ! defined CRAY2
8704 webecray
8705 #else
8706 wenotbecray
8707 #endif
8708
8709 _ACEOF
8710 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
8711   $EGREP "webecray" >/dev/null 2>&1; then
8712   ac_cv_os_cray=yes
8713 else
8714   ac_cv_os_cray=no
8715 fi
8716 rm -rf conftest*
8717
8718 fi
8719 { $as_echo "$as_me:$LINENO: result: $ac_cv_os_cray" >&5
8720 $as_echo "$ac_cv_os_cray" >&6; }
8721 if test $ac_cv_os_cray = yes; then
8722   for ac_func in _getb67 GETB67 getb67; do
8723     as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
8724 { $as_echo "$as_me:$LINENO: checking for $ac_func" >&5
8725 $as_echo_n "checking for $ac_func... " >&6; }
8726 if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
8727   $as_echo_n "(cached) " >&6
8728 else
8729   cat >conftest.$ac_ext <<_ACEOF
8730 /* confdefs.h.  */
8731 _ACEOF
8732 cat confdefs.h >>conftest.$ac_ext
8733 cat >>conftest.$ac_ext <<_ACEOF
8734 /* end confdefs.h.  */
8735 /* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
8736    For example, HP-UX 11i <limits.h> declares gettimeofday.  */
8737 #define $ac_func innocuous_$ac_func
8738
8739 /* System header to define __stub macros and hopefully few prototypes,
8740     which can conflict with char $ac_func (); below.
8741     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
8742     <limits.h> exists even on freestanding compilers.  */
8743
8744 #ifdef __STDC__
8745 # include <limits.h>
8746 #else
8747 # include <assert.h>
8748 #endif
8749
8750 #undef $ac_func
8751
8752 /* Override any GCC internal prototype to avoid an error.
8753    Use char because int might match the return type of a GCC
8754    builtin and then its argument prototype would still apply.  */
8755 #ifdef __cplusplus
8756 extern "C"
8757 #endif
8758 char $ac_func ();
8759 /* The GNU C library defines this for functions which it implements
8760     to always fail with ENOSYS.  Some functions are actually named
8761     something starting with __ and the normal name is an alias.  */
8762 #if defined __stub_$ac_func || defined __stub___$ac_func
8763 choke me
8764 #endif
8765
8766 int
8767 main ()
8768 {
8769 return $ac_func ();
8770   ;
8771   return 0;
8772 }
8773 _ACEOF
8774 rm -rf conftest.$ac_objext conftest$ac_exeext
8775 if { (ac_try="$ac_link"
8776 case "(($ac_try" in
8777   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8778   *) ac_try_echo=$ac_try;;
8779 esac
8780 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
8781 $as_echo "$ac_try_echo") >&5
8782   (eval "$ac_link") 2>conftest.er1
8783   ac_status=$?
8784   grep -v '^ *+' conftest.er1 >conftest.err
8785   rm -rf conftest.er1
8786   cat conftest.err >&5
8787   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
8788   (exit $ac_status); } && {
8789          test -z "$ac_c_werror_flag" ||
8790          test ! -s conftest.err
8791        } && test -s conftest$ac_exeext && {
8792          test "$cross_compiling" = yes ||
8793          $as_test_x conftest$ac_exeext
8794        }; then
8795   eval "$as_ac_var=yes"
8796 else
8797   $as_echo "$as_me: failed program was:" >&5
8798 sed 's/^/| /' conftest.$ac_ext >&5
8799
8800         eval "$as_ac_var=no"
8801 fi
8802
8803 rm -rf conftest.dSYM
8804 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
8805       conftest$ac_exeext conftest.$ac_ext
8806 fi
8807 ac_res=`eval 'as_val=${'$as_ac_var'}
8808                  $as_echo "$as_val"'`
8809                { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
8810 $as_echo "$ac_res" >&6; }
8811 as_val=`eval 'as_val=${'$as_ac_var'}
8812                  $as_echo "$as_val"'`
8813    if test "x$as_val" = x""yes; then
8814
8815 cat >>confdefs.h <<_ACEOF
8816 #define CRAY_STACKSEG_END $ac_func
8817 _ACEOF
8818
8819     break
8820 fi
8821
8822   done
8823 fi
8824
8825 { $as_echo "$as_me:$LINENO: checking stack direction for C alloca" >&5
8826 $as_echo_n "checking stack direction for C alloca... " >&6; }
8827 if test "${ac_cv_c_stack_direction+set}" = set; then
8828   $as_echo_n "(cached) " >&6
8829 else
8830   if test "$cross_compiling" = yes; then
8831   ac_cv_c_stack_direction=0
8832 else
8833   cat >conftest.$ac_ext <<_ACEOF
8834 /* confdefs.h.  */
8835 _ACEOF
8836 cat confdefs.h >>conftest.$ac_ext
8837 cat >>conftest.$ac_ext <<_ACEOF
8838 /* end confdefs.h.  */
8839 $ac_includes_default
8840 int
8841 find_stack_direction ()
8842 {
8843   static char *addr = 0;
8844   auto char dummy;
8845   if (addr == 0)
8846     {
8847       addr = &dummy;
8848       return find_stack_direction ();
8849     }
8850   else
8851     return (&dummy > addr) ? 1 : -1;
8852 }
8853
8854 int
8855 main ()
8856 {
8857   return find_stack_direction () < 0;
8858 }
8859 _ACEOF
8860 rm -rf conftest$ac_exeext
8861 if { (ac_try="$ac_link"
8862 case "(($ac_try" in
8863   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8864   *) ac_try_echo=$ac_try;;
8865 esac
8866 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
8867 $as_echo "$ac_try_echo") >&5
8868   (eval "$ac_link") 2>&5
8869   ac_status=$?
8870   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
8871   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
8872   { (case "(($ac_try" in
8873   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8874   *) ac_try_echo=$ac_try;;
8875 esac
8876 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
8877 $as_echo "$ac_try_echo") >&5
8878   (eval "$ac_try") 2>&5
8879   ac_status=$?
8880   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
8881   (exit $ac_status); }; }; then
8882   ac_cv_c_stack_direction=1
8883 else
8884   $as_echo "$as_me: program exited with status $ac_status" >&5
8885 $as_echo "$as_me: failed program was:" >&5
8886 sed 's/^/| /' conftest.$ac_ext >&5
8887
8888 ( exit $ac_status )
8889 ac_cv_c_stack_direction=-1
8890 fi
8891 rm -rf conftest.dSYM
8892 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
8893 fi
8894
8895
8896 fi
8897 { $as_echo "$as_me:$LINENO: result: $ac_cv_c_stack_direction" >&5
8898 $as_echo "$ac_cv_c_stack_direction" >&6; }
8899
8900 cat >>confdefs.h <<_ACEOF
8901 #define STACK_DIRECTION $ac_cv_c_stack_direction
8902 _ACEOF
8903
8904
8905 fi
8906
8907
8908
8909 for ac_header in stdlib.h unistd.h
8910 do
8911 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
8912 if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
8913   { $as_echo "$as_me:$LINENO: checking for $ac_header" >&5
8914 $as_echo_n "checking for $ac_header... " >&6; }
8915 if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
8916   $as_echo_n "(cached) " >&6
8917 fi
8918 ac_res=`eval 'as_val=${'$as_ac_Header'}
8919                  $as_echo "$as_val"'`
8920                { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
8921 $as_echo "$ac_res" >&6; }
8922 else
8923   # Is the header compilable?
8924 { $as_echo "$as_me:$LINENO: checking $ac_header usability" >&5
8925 $as_echo_n "checking $ac_header usability... " >&6; }
8926 cat >conftest.$ac_ext <<_ACEOF
8927 /* confdefs.h.  */
8928 _ACEOF
8929 cat confdefs.h >>conftest.$ac_ext
8930 cat >>conftest.$ac_ext <<_ACEOF
8931 /* end confdefs.h.  */
8932 $ac_includes_default
8933 #include <$ac_header>
8934 _ACEOF
8935 rm -rf conftest.$ac_objext
8936 if { (ac_try="$ac_compile"
8937 case "(($ac_try" in
8938   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8939   *) ac_try_echo=$ac_try;;
8940 esac
8941 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
8942 $as_echo "$ac_try_echo") >&5
8943   (eval "$ac_compile") 2>conftest.er1
8944   ac_status=$?
8945   grep -v '^ *+' conftest.er1 >conftest.err
8946   rm -rf conftest.er1
8947   cat conftest.err >&5
8948   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
8949   (exit $ac_status); } && {
8950          test -z "$ac_c_werror_flag" ||
8951          test ! -s conftest.err
8952        } && test -s conftest.$ac_objext; then
8953   ac_header_compiler=yes
8954 else
8955   $as_echo "$as_me: failed program was:" >&5
8956 sed 's/^/| /' conftest.$ac_ext >&5
8957
8958         ac_header_compiler=no
8959 fi
8960
8961 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
8962 { $as_echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
8963 $as_echo "$ac_header_compiler" >&6; }
8964
8965 # Is the header present?
8966 { $as_echo "$as_me:$LINENO: checking $ac_header presence" >&5
8967 $as_echo_n "checking $ac_header presence... " >&6; }
8968 cat >conftest.$ac_ext <<_ACEOF
8969 /* confdefs.h.  */
8970 _ACEOF
8971 cat confdefs.h >>conftest.$ac_ext
8972 cat >>conftest.$ac_ext <<_ACEOF
8973 /* end confdefs.h.  */
8974 #include <$ac_header>
8975 _ACEOF
8976 if { (ac_try="$ac_cpp conftest.$ac_ext"
8977 case "(($ac_try" in
8978   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8979   *) ac_try_echo=$ac_try;;
8980 esac
8981 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
8982 $as_echo "$ac_try_echo") >&5
8983   (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
8984   ac_status=$?
8985   grep -v '^ *+' conftest.er1 >conftest.err
8986   rm -rf conftest.er1
8987   cat conftest.err >&5
8988   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
8989   (exit $ac_status); } >/dev/null && {
8990          test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
8991          test ! -s conftest.err
8992        }; then
8993   ac_header_preproc=yes
8994 else
8995   $as_echo "$as_me: failed program was:" >&5
8996 sed 's/^/| /' conftest.$ac_ext >&5
8997
8998   ac_header_preproc=no
8999 fi
9000
9001 rm -rf conftest.err conftest.$ac_ext
9002 { $as_echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
9003 $as_echo "$ac_header_preproc" >&6; }
9004
9005 # So?  What about this header?
9006 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
9007   yes:no: )
9008     { $as_echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
9009 $as_echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
9010     { $as_echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
9011 $as_echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
9012     ac_header_preproc=yes
9013     ;;
9014   no:yes:* )
9015     { $as_echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
9016 $as_echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
9017     { $as_echo "$as_me:$LINENO: WARNING: $ac_header:     check for missing prerequisite headers?" >&5
9018 $as_echo "$as_me: WARNING: $ac_header:     check for missing prerequisite headers?" >&2;}
9019     { $as_echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
9020 $as_echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
9021     { $as_echo "$as_me:$LINENO: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&5
9022 $as_echo "$as_me: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&2;}
9023     { $as_echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
9024 $as_echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
9025     { $as_echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
9026 $as_echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
9027
9028     ;;
9029 esac
9030 { $as_echo "$as_me:$LINENO: checking for $ac_header" >&5
9031 $as_echo_n "checking for $ac_header... " >&6; }
9032 if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
9033   $as_echo_n "(cached) " >&6
9034 else
9035   eval "$as_ac_Header=\$ac_header_preproc"
9036 fi
9037 ac_res=`eval 'as_val=${'$as_ac_Header'}
9038                  $as_echo "$as_val"'`
9039                { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
9040 $as_echo "$ac_res" >&6; }
9041
9042 fi
9043 as_val=`eval 'as_val=${'$as_ac_Header'}
9044                  $as_echo "$as_val"'`
9045    if test "x$as_val" = x""yes; then
9046   cat >>confdefs.h <<_ACEOF
9047 #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
9048 _ACEOF
9049
9050 fi
9051
9052 done
9053
9054
9055 for ac_func in getpagesize
9056 do
9057 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
9058 { $as_echo "$as_me:$LINENO: checking for $ac_func" >&5
9059 $as_echo_n "checking for $ac_func... " >&6; }
9060 if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
9061   $as_echo_n "(cached) " >&6
9062 else
9063   cat >conftest.$ac_ext <<_ACEOF
9064 /* confdefs.h.  */
9065 _ACEOF
9066 cat confdefs.h >>conftest.$ac_ext
9067 cat >>conftest.$ac_ext <<_ACEOF
9068 /* end confdefs.h.  */
9069 /* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
9070    For example, HP-UX 11i <limits.h> declares gettimeofday.  */
9071 #define $ac_func innocuous_$ac_func
9072
9073 /* System header to define __stub macros and hopefully few prototypes,
9074     which can conflict with char $ac_func (); below.
9075     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
9076     <limits.h> exists even on freestanding compilers.  */
9077
9078 #ifdef __STDC__
9079 # include <limits.h>
9080 #else
9081 # include <assert.h>
9082 #endif
9083
9084 #undef $ac_func
9085
9086 /* Override any GCC internal prototype to avoid an error.
9087    Use char because int might match the return type of a GCC
9088    builtin and then its argument prototype would still apply.  */
9089 #ifdef __cplusplus
9090 extern "C"
9091 #endif
9092 char $ac_func ();
9093 /* The GNU C library defines this for functions which it implements
9094     to always fail with ENOSYS.  Some functions are actually named
9095     something starting with __ and the normal name is an alias.  */
9096 #if defined __stub_$ac_func || defined __stub___$ac_func
9097 choke me
9098 #endif
9099
9100 int
9101 main ()
9102 {
9103 return $ac_func ();
9104   ;
9105   return 0;
9106 }
9107 _ACEOF
9108 rm -rf conftest.$ac_objext conftest$ac_exeext
9109 if { (ac_try="$ac_link"
9110 case "(($ac_try" in
9111   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9112   *) ac_try_echo=$ac_try;;
9113 esac
9114 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
9115 $as_echo "$ac_try_echo") >&5
9116   (eval "$ac_link") 2>conftest.er1
9117   ac_status=$?
9118   grep -v '^ *+' conftest.er1 >conftest.err
9119   rm -rf conftest.er1
9120   cat conftest.err >&5
9121   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
9122   (exit $ac_status); } && {
9123          test -z "$ac_c_werror_flag" ||
9124          test ! -s conftest.err
9125        } && test -s conftest$ac_exeext && {
9126          test "$cross_compiling" = yes ||
9127          $as_test_x conftest$ac_exeext
9128        }; then
9129   eval "$as_ac_var=yes"
9130 else
9131   $as_echo "$as_me: failed program was:" >&5
9132 sed 's/^/| /' conftest.$ac_ext >&5
9133
9134         eval "$as_ac_var=no"
9135 fi
9136
9137 rm -rf conftest.dSYM
9138 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
9139       conftest$ac_exeext conftest.$ac_ext
9140 fi
9141 ac_res=`eval 'as_val=${'$as_ac_var'}
9142                  $as_echo "$as_val"'`
9143                { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
9144 $as_echo "$ac_res" >&6; }
9145 as_val=`eval 'as_val=${'$as_ac_var'}
9146                  $as_echo "$as_val"'`
9147    if test "x$as_val" = x""yes; then
9148   cat >>confdefs.h <<_ACEOF
9149 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
9150 _ACEOF
9151
9152 fi
9153 done
9154
9155 { $as_echo "$as_me:$LINENO: checking for working mmap" >&5
9156 $as_echo_n "checking for working mmap... " >&6; }
9157 if test "${ac_cv_func_mmap_fixed_mapped+set}" = set; then
9158   $as_echo_n "(cached) " >&6
9159 else
9160   if test "$cross_compiling" = yes; then
9161   ac_cv_func_mmap_fixed_mapped=no
9162 else
9163   cat >conftest.$ac_ext <<_ACEOF
9164 /* confdefs.h.  */
9165 _ACEOF
9166 cat confdefs.h >>conftest.$ac_ext
9167 cat >>conftest.$ac_ext <<_ACEOF
9168 /* end confdefs.h.  */
9169 $ac_includes_default
9170 /* malloc might have been renamed as rpl_malloc. */
9171 #undef malloc
9172
9173 /* Thanks to Mike Haertel and Jim Avera for this test.
9174    Here is a matrix of mmap possibilities:
9175         mmap private not fixed
9176         mmap private fixed at somewhere currently unmapped
9177         mmap private fixed at somewhere already mapped
9178         mmap shared not fixed
9179         mmap shared fixed at somewhere currently unmapped
9180         mmap shared fixed at somewhere already mapped
9181    For private mappings, we should verify that changes cannot be read()
9182    back from the file, nor mmap's back from the file at a different
9183    address.  (There have been systems where private was not correctly
9184    implemented like the infamous i386 svr4.0, and systems where the
9185    VM page cache was not coherent with the file system buffer cache
9186    like early versions of FreeBSD and possibly contemporary NetBSD.)
9187    For shared mappings, we should conversely verify that changes get
9188    propagated back to all the places they're supposed to be.
9189
9190    Grep wants private fixed already mapped.
9191    The main things grep needs to know about mmap are:
9192    * does it exist and is it safe to write into the mmap'd area
9193    * how to use it (BSD variants)  */
9194
9195 #include <fcntl.h>
9196 #include <sys/mman.h>
9197
9198 #if !defined STDC_HEADERS && !defined HAVE_STDLIB_H
9199 char *malloc ();
9200 #endif
9201
9202 /* This mess was copied from the GNU getpagesize.h.  */
9203 #ifndef HAVE_GETPAGESIZE
9204 /* Assume that all systems that can run configure have sys/param.h.  */
9205 # ifndef HAVE_SYS_PARAM_H
9206 #  define HAVE_SYS_PARAM_H 1
9207 # endif
9208
9209 # ifdef _SC_PAGESIZE
9210 #  define getpagesize() sysconf(_SC_PAGESIZE)
9211 # else /* no _SC_PAGESIZE */
9212 #  ifdef HAVE_SYS_PARAM_H
9213 #   include <sys/param.h>
9214 #   ifdef EXEC_PAGESIZE
9215 #    define getpagesize() EXEC_PAGESIZE
9216 #   else /* no EXEC_PAGESIZE */
9217 #    ifdef NBPG
9218 #     define getpagesize() NBPG * CLSIZE
9219 #     ifndef CLSIZE
9220 #      define CLSIZE 1
9221 #     endif /* no CLSIZE */
9222 #    else /* no NBPG */
9223 #     ifdef NBPC
9224 #      define getpagesize() NBPC
9225 #     else /* no NBPC */
9226 #      ifdef PAGESIZE
9227 #       define getpagesize() PAGESIZE
9228 #      endif /* PAGESIZE */
9229 #     endif /* no NBPC */
9230 #    endif /* no NBPG */
9231 #   endif /* no EXEC_PAGESIZE */
9232 #  else /* no HAVE_SYS_PARAM_H */
9233 #   define getpagesize() 8192   /* punt totally */
9234 #  endif /* no HAVE_SYS_PARAM_H */
9235 # endif /* no _SC_PAGESIZE */
9236
9237 #endif /* no HAVE_GETPAGESIZE */
9238
9239 int
9240 main ()
9241 {
9242   char *data, *data2, *data3;
9243   int i, pagesize;
9244   int fd;
9245
9246   pagesize = getpagesize ();
9247
9248   /* First, make a file with some known garbage in it. */
9249   data = (char *) malloc (pagesize);
9250   if (!data)
9251     return 1;
9252   for (i = 0; i < pagesize; ++i)
9253     *(data + i) = rand ();
9254   umask (0);
9255   fd = creat ("conftest.mmap", 0600);
9256   if (fd < 0)
9257     return 1;
9258   if (write (fd, data, pagesize) != pagesize)
9259     return 1;
9260   close (fd);
9261
9262   /* Next, try to mmap the file at a fixed address which already has
9263      something else allocated at it.  If we can, also make sure that
9264      we see the same garbage.  */
9265   fd = open ("conftest.mmap", O_RDWR);
9266   if (fd < 0)
9267     return 1;
9268   data2 = (char *) malloc (2 * pagesize);
9269   if (!data2)
9270     return 1;
9271   data2 += (pagesize - ((long int) data2 & (pagesize - 1))) & (pagesize - 1);
9272   if (data2 != mmap (data2, pagesize, PROT_READ | PROT_WRITE,
9273                      MAP_PRIVATE | MAP_FIXED, fd, 0L))
9274     return 1;
9275   for (i = 0; i < pagesize; ++i)
9276     if (*(data + i) != *(data2 + i))
9277       return 1;
9278
9279   /* Finally, make sure that changes to the mapped area do not
9280      percolate back to the file as seen by read().  (This is a bug on
9281      some variants of i386 svr4.0.)  */
9282   for (i = 0; i < pagesize; ++i)
9283     *(data2 + i) = *(data2 + i) + 1;
9284   data3 = (char *) malloc (pagesize);
9285   if (!data3)
9286     return 1;
9287   if (read (fd, data3, pagesize) != pagesize)
9288     return 1;
9289   for (i = 0; i < pagesize; ++i)
9290     if (*(data + i) != *(data3 + i))
9291       return 1;
9292   close (fd);
9293   return 0;
9294 }
9295 _ACEOF
9296 rm -rf conftest$ac_exeext
9297 if { (ac_try="$ac_link"
9298 case "(($ac_try" in
9299   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9300   *) ac_try_echo=$ac_try;;
9301 esac
9302 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
9303 $as_echo "$ac_try_echo") >&5
9304   (eval "$ac_link") 2>&5
9305   ac_status=$?
9306   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
9307   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
9308   { (case "(($ac_try" in
9309   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9310   *) ac_try_echo=$ac_try;;
9311 esac
9312 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
9313 $as_echo "$ac_try_echo") >&5
9314   (eval "$ac_try") 2>&5
9315   ac_status=$?
9316   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
9317   (exit $ac_status); }; }; then
9318   ac_cv_func_mmap_fixed_mapped=yes
9319 else
9320   $as_echo "$as_me: program exited with status $ac_status" >&5
9321 $as_echo "$as_me: failed program was:" >&5
9322 sed 's/^/| /' conftest.$ac_ext >&5
9323
9324 ( exit $ac_status )
9325 ac_cv_func_mmap_fixed_mapped=no
9326 fi
9327 rm -rf conftest.dSYM
9328 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
9329 fi
9330
9331
9332 fi
9333 { $as_echo "$as_me:$LINENO: result: $ac_cv_func_mmap_fixed_mapped" >&5
9334 $as_echo "$ac_cv_func_mmap_fixed_mapped" >&6; }
9335 if test $ac_cv_func_mmap_fixed_mapped = yes; then
9336
9337 cat >>confdefs.h <<\_ACEOF
9338 #define HAVE_MMAP 1
9339 _ACEOF
9340
9341 fi
9342 rm -rf conftest.mmap
9343
9344
9345
9346
9347
9348
9349
9350
9351
9352
9353 for ac_header in argz.h limits.h locale.h nl_types.h malloc.h string.h \
9354 unistd.h sys/param.h
9355 do
9356 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
9357 if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
9358   { $as_echo "$as_me:$LINENO: checking for $ac_header" >&5
9359 $as_echo_n "checking for $ac_header... " >&6; }
9360 if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
9361   $as_echo_n "(cached) " >&6
9362 fi
9363 ac_res=`eval 'as_val=${'$as_ac_Header'}
9364                  $as_echo "$as_val"'`
9365                { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
9366 $as_echo "$ac_res" >&6; }
9367 else
9368   # Is the header compilable?
9369 { $as_echo "$as_me:$LINENO: checking $ac_header usability" >&5
9370 $as_echo_n "checking $ac_header usability... " >&6; }
9371 cat >conftest.$ac_ext <<_ACEOF
9372 /* confdefs.h.  */
9373 _ACEOF
9374 cat confdefs.h >>conftest.$ac_ext
9375 cat >>conftest.$ac_ext <<_ACEOF
9376 /* end confdefs.h.  */
9377 $ac_includes_default
9378 #include <$ac_header>
9379 _ACEOF
9380 rm -rf conftest.$ac_objext
9381 if { (ac_try="$ac_compile"
9382 case "(($ac_try" in
9383   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9384   *) ac_try_echo=$ac_try;;
9385 esac
9386 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
9387 $as_echo "$ac_try_echo") >&5
9388   (eval "$ac_compile") 2>conftest.er1
9389   ac_status=$?
9390   grep -v '^ *+' conftest.er1 >conftest.err
9391   rm -rf conftest.er1
9392   cat conftest.err >&5
9393   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
9394   (exit $ac_status); } && {
9395          test -z "$ac_c_werror_flag" ||
9396          test ! -s conftest.err
9397        } && test -s conftest.$ac_objext; then
9398   ac_header_compiler=yes
9399 else
9400   $as_echo "$as_me: failed program was:" >&5
9401 sed 's/^/| /' conftest.$ac_ext >&5
9402
9403         ac_header_compiler=no
9404 fi
9405
9406 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9407 { $as_echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
9408 $as_echo "$ac_header_compiler" >&6; }
9409
9410 # Is the header present?
9411 { $as_echo "$as_me:$LINENO: checking $ac_header presence" >&5
9412 $as_echo_n "checking $ac_header presence... " >&6; }
9413 cat >conftest.$ac_ext <<_ACEOF
9414 /* confdefs.h.  */
9415 _ACEOF
9416 cat confdefs.h >>conftest.$ac_ext
9417 cat >>conftest.$ac_ext <<_ACEOF
9418 /* end confdefs.h.  */
9419 #include <$ac_header>
9420 _ACEOF
9421 if { (ac_try="$ac_cpp conftest.$ac_ext"
9422 case "(($ac_try" in
9423   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9424   *) ac_try_echo=$ac_try;;
9425 esac
9426 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
9427 $as_echo "$ac_try_echo") >&5
9428   (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
9429   ac_status=$?
9430   grep -v '^ *+' conftest.er1 >conftest.err
9431   rm -rf conftest.er1
9432   cat conftest.err >&5
9433   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
9434   (exit $ac_status); } >/dev/null && {
9435          test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
9436          test ! -s conftest.err
9437        }; then
9438   ac_header_preproc=yes
9439 else
9440   $as_echo "$as_me: failed program was:" >&5
9441 sed 's/^/| /' conftest.$ac_ext >&5
9442
9443   ac_header_preproc=no
9444 fi
9445
9446 rm -rf conftest.err conftest.$ac_ext
9447 { $as_echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
9448 $as_echo "$ac_header_preproc" >&6; }
9449
9450 # So?  What about this header?
9451 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
9452   yes:no: )
9453     { $as_echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
9454 $as_echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
9455     { $as_echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
9456 $as_echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
9457     ac_header_preproc=yes
9458     ;;
9459   no:yes:* )
9460     { $as_echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
9461 $as_echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
9462     { $as_echo "$as_me:$LINENO: WARNING: $ac_header:     check for missing prerequisite headers?" >&5
9463 $as_echo "$as_me: WARNING: $ac_header:     check for missing prerequisite headers?" >&2;}
9464     { $as_echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
9465 $as_echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
9466     { $as_echo "$as_me:$LINENO: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&5
9467 $as_echo "$as_me: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&2;}
9468     { $as_echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
9469 $as_echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
9470     { $as_echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
9471 $as_echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
9472
9473     ;;
9474 esac
9475 { $as_echo "$as_me:$LINENO: checking for $ac_header" >&5
9476 $as_echo_n "checking for $ac_header... " >&6; }
9477 if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
9478   $as_echo_n "(cached) " >&6
9479 else
9480   eval "$as_ac_Header=\$ac_header_preproc"
9481 fi
9482 ac_res=`eval 'as_val=${'$as_ac_Header'}
9483                  $as_echo "$as_val"'`
9484                { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
9485 $as_echo "$ac_res" >&6; }
9486
9487 fi
9488 as_val=`eval 'as_val=${'$as_ac_Header'}
9489                  $as_echo "$as_val"'`
9490    if test "x$as_val" = x""yes; then
9491   cat >>confdefs.h <<_ACEOF
9492 #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
9493 _ACEOF
9494
9495 fi
9496
9497 done
9498
9499
9500
9501
9502
9503
9504
9505
9506
9507
9508
9509
9510 for ac_func in getcwd munmap putenv setenv setlocale strchr strcasecmp \
9511 strdup __argz_count __argz_stringify __argz_next
9512 do
9513 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
9514 { $as_echo "$as_me:$LINENO: checking for $ac_func" >&5
9515 $as_echo_n "checking for $ac_func... " >&6; }
9516 if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
9517   $as_echo_n "(cached) " >&6
9518 else
9519   cat >conftest.$ac_ext <<_ACEOF
9520 /* confdefs.h.  */
9521 _ACEOF
9522 cat confdefs.h >>conftest.$ac_ext
9523 cat >>conftest.$ac_ext <<_ACEOF
9524 /* end confdefs.h.  */
9525 /* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
9526    For example, HP-UX 11i <limits.h> declares gettimeofday.  */
9527 #define $ac_func innocuous_$ac_func
9528
9529 /* System header to define __stub macros and hopefully few prototypes,
9530     which can conflict with char $ac_func (); below.
9531     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
9532     <limits.h> exists even on freestanding compilers.  */
9533
9534 #ifdef __STDC__
9535 # include <limits.h>
9536 #else
9537 # include <assert.h>
9538 #endif
9539
9540 #undef $ac_func
9541
9542 /* Override any GCC internal prototype to avoid an error.
9543    Use char because int might match the return type of a GCC
9544    builtin and then its argument prototype would still apply.  */
9545 #ifdef __cplusplus
9546 extern "C"
9547 #endif
9548 char $ac_func ();
9549 /* The GNU C library defines this for functions which it implements
9550     to always fail with ENOSYS.  Some functions are actually named
9551     something starting with __ and the normal name is an alias.  */
9552 #if defined __stub_$ac_func || defined __stub___$ac_func
9553 choke me
9554 #endif
9555
9556 int
9557 main ()
9558 {
9559 return $ac_func ();
9560   ;
9561   return 0;
9562 }
9563 _ACEOF
9564 rm -rf conftest.$ac_objext conftest$ac_exeext
9565 if { (ac_try="$ac_link"
9566 case "(($ac_try" in
9567   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9568   *) ac_try_echo=$ac_try;;
9569 esac
9570 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
9571 $as_echo "$ac_try_echo") >&5
9572   (eval "$ac_link") 2>conftest.er1
9573   ac_status=$?
9574   grep -v '^ *+' conftest.er1 >conftest.err
9575   rm -rf conftest.er1
9576   cat conftest.err >&5
9577   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
9578   (exit $ac_status); } && {
9579          test -z "$ac_c_werror_flag" ||
9580          test ! -s conftest.err
9581        } && test -s conftest$ac_exeext && {
9582          test "$cross_compiling" = yes ||
9583          $as_test_x conftest$ac_exeext
9584        }; then
9585   eval "$as_ac_var=yes"
9586 else
9587   $as_echo "$as_me: failed program was:" >&5
9588 sed 's/^/| /' conftest.$ac_ext >&5
9589
9590         eval "$as_ac_var=no"
9591 fi
9592
9593 rm -rf conftest.dSYM
9594 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
9595       conftest$ac_exeext conftest.$ac_ext
9596 fi
9597 ac_res=`eval 'as_val=${'$as_ac_var'}
9598                  $as_echo "$as_val"'`
9599                { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
9600 $as_echo "$ac_res" >&6; }
9601 as_val=`eval 'as_val=${'$as_ac_var'}
9602                  $as_echo "$as_val"'`
9603    if test "x$as_val" = x""yes; then
9604   cat >>confdefs.h <<_ACEOF
9605 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
9606 _ACEOF
9607
9608 fi
9609 done
9610
9611
9612    if test $ac_cv_header_locale_h = yes; then
9613     { $as_echo "$as_me:$LINENO: checking for LC_MESSAGES" >&5
9614 $as_echo_n "checking for LC_MESSAGES... " >&6; }
9615 if test "${am_cv_val_LC_MESSAGES+set}" = set; then
9616   $as_echo_n "(cached) " >&6
9617 else
9618   cat >conftest.$ac_ext <<_ACEOF
9619 /* confdefs.h.  */
9620 _ACEOF
9621 cat confdefs.h >>conftest.$ac_ext
9622 cat >>conftest.$ac_ext <<_ACEOF
9623 /* end confdefs.h.  */
9624 #include <locale.h>
9625 int
9626 main ()
9627 {
9628 return LC_MESSAGES
9629   ;
9630   return 0;
9631 }
9632 _ACEOF
9633 rm -rf conftest.$ac_objext conftest$ac_exeext
9634 if { (ac_try="$ac_link"
9635 case "(($ac_try" in
9636   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9637   *) ac_try_echo=$ac_try;;
9638 esac
9639 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
9640 $as_echo "$ac_try_echo") >&5
9641   (eval "$ac_link") 2>conftest.er1
9642   ac_status=$?
9643   grep -v '^ *+' conftest.er1 >conftest.err
9644   rm -rf conftest.er1
9645   cat conftest.err >&5
9646   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
9647   (exit $ac_status); } && {
9648          test -z "$ac_c_werror_flag" ||
9649          test ! -s conftest.err
9650        } && test -s conftest$ac_exeext && {
9651          test "$cross_compiling" = yes ||
9652          $as_test_x conftest$ac_exeext
9653        }; then
9654   am_cv_val_LC_MESSAGES=yes
9655 else
9656   $as_echo "$as_me: failed program was:" >&5
9657 sed 's/^/| /' conftest.$ac_ext >&5
9658
9659         am_cv_val_LC_MESSAGES=no
9660 fi
9661
9662 rm -rf conftest.dSYM
9663 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
9664       conftest$ac_exeext conftest.$ac_ext
9665 fi
9666 { $as_echo "$as_me:$LINENO: result: $am_cv_val_LC_MESSAGES" >&5
9667 $as_echo "$am_cv_val_LC_MESSAGES" >&6; }
9668     if test $am_cv_val_LC_MESSAGES = yes; then
9669
9670 cat >>confdefs.h <<\_ACEOF
9671 #define HAVE_LC_MESSAGES 1
9672 _ACEOF
9673
9674     fi
9675   fi
9676      USE_NLS=yes
9677
9678
9679         nls_cv_force_use_gnu_gettext="no"
9680
9681     nls_cv_use_gnu_gettext="$nls_cv_force_use_gnu_gettext"
9682     if test "$nls_cv_force_use_gnu_gettext" != "yes"; then
9683                               nls_cv_header_intl=
9684       nls_cv_header_libgt=
9685       CATOBJEXT=NONE
9686
9687       if test "${ac_cv_header_libintl_h+set}" = set; then
9688   { $as_echo "$as_me:$LINENO: checking for libintl.h" >&5
9689 $as_echo_n "checking for libintl.h... " >&6; }
9690 if test "${ac_cv_header_libintl_h+set}" = set; then
9691   $as_echo_n "(cached) " >&6
9692 fi
9693 { $as_echo "$as_me:$LINENO: result: $ac_cv_header_libintl_h" >&5
9694 $as_echo "$ac_cv_header_libintl_h" >&6; }
9695 else
9696   # Is the header compilable?
9697 { $as_echo "$as_me:$LINENO: checking libintl.h usability" >&5
9698 $as_echo_n "checking libintl.h usability... " >&6; }
9699 cat >conftest.$ac_ext <<_ACEOF
9700 /* confdefs.h.  */
9701 _ACEOF
9702 cat confdefs.h >>conftest.$ac_ext
9703 cat >>conftest.$ac_ext <<_ACEOF
9704 /* end confdefs.h.  */
9705 $ac_includes_default
9706 #include <libintl.h>
9707 _ACEOF
9708 rm -rf conftest.$ac_objext
9709 if { (ac_try="$ac_compile"
9710 case "(($ac_try" in
9711   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9712   *) ac_try_echo=$ac_try;;
9713 esac
9714 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
9715 $as_echo "$ac_try_echo") >&5
9716   (eval "$ac_compile") 2>conftest.er1
9717   ac_status=$?
9718   grep -v '^ *+' conftest.er1 >conftest.err
9719   rm -rf conftest.er1
9720   cat conftest.err >&5
9721   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
9722   (exit $ac_status); } && {
9723          test -z "$ac_c_werror_flag" ||
9724          test ! -s conftest.err
9725        } && test -s conftest.$ac_objext; then
9726   ac_header_compiler=yes
9727 else
9728   $as_echo "$as_me: failed program was:" >&5
9729 sed 's/^/| /' conftest.$ac_ext >&5
9730
9731         ac_header_compiler=no
9732 fi
9733
9734 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9735 { $as_echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
9736 $as_echo "$ac_header_compiler" >&6; }
9737
9738 # Is the header present?
9739 { $as_echo "$as_me:$LINENO: checking libintl.h presence" >&5
9740 $as_echo_n "checking libintl.h presence... " >&6; }
9741 cat >conftest.$ac_ext <<_ACEOF
9742 /* confdefs.h.  */
9743 _ACEOF
9744 cat confdefs.h >>conftest.$ac_ext
9745 cat >>conftest.$ac_ext <<_ACEOF
9746 /* end confdefs.h.  */
9747 #include <libintl.h>
9748 _ACEOF
9749 if { (ac_try="$ac_cpp conftest.$ac_ext"
9750 case "(($ac_try" in
9751   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9752   *) ac_try_echo=$ac_try;;
9753 esac
9754 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
9755 $as_echo "$ac_try_echo") >&5
9756   (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
9757   ac_status=$?
9758   grep -v '^ *+' conftest.er1 >conftest.err
9759   rm -rf conftest.er1
9760   cat conftest.err >&5
9761   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
9762   (exit $ac_status); } >/dev/null && {
9763          test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
9764          test ! -s conftest.err
9765        }; then
9766   ac_header_preproc=yes
9767 else
9768   $as_echo "$as_me: failed program was:" >&5
9769 sed 's/^/| /' conftest.$ac_ext >&5
9770
9771   ac_header_preproc=no
9772 fi
9773
9774 rm -rf conftest.err conftest.$ac_ext
9775 { $as_echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
9776 $as_echo "$ac_header_preproc" >&6; }
9777
9778 # So?  What about this header?
9779 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
9780   yes:no: )
9781     { $as_echo "$as_me:$LINENO: WARNING: libintl.h: accepted by the compiler, rejected by the preprocessor!" >&5
9782 $as_echo "$as_me: WARNING: libintl.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
9783     { $as_echo "$as_me:$LINENO: WARNING: libintl.h: proceeding with the compiler's result" >&5
9784 $as_echo "$as_me: WARNING: libintl.h: proceeding with the compiler's result" >&2;}
9785     ac_header_preproc=yes
9786     ;;
9787   no:yes:* )
9788     { $as_echo "$as_me:$LINENO: WARNING: libintl.h: present but cannot be compiled" >&5
9789 $as_echo "$as_me: WARNING: libintl.h: present but cannot be compiled" >&2;}
9790     { $as_echo "$as_me:$LINENO: WARNING: libintl.h:     check for missing prerequisite headers?" >&5
9791 $as_echo "$as_me: WARNING: libintl.h:     check for missing prerequisite headers?" >&2;}
9792     { $as_echo "$as_me:$LINENO: WARNING: libintl.h: see the Autoconf documentation" >&5
9793 $as_echo "$as_me: WARNING: libintl.h: see the Autoconf documentation" >&2;}
9794     { $as_echo "$as_me:$LINENO: WARNING: libintl.h:     section \"Present But Cannot Be Compiled\"" >&5
9795 $as_echo "$as_me: WARNING: libintl.h:     section \"Present But Cannot Be Compiled\"" >&2;}
9796     { $as_echo "$as_me:$LINENO: WARNING: libintl.h: proceeding with the preprocessor's result" >&5
9797 $as_echo "$as_me: WARNING: libintl.h: proceeding with the preprocessor's result" >&2;}
9798     { $as_echo "$as_me:$LINENO: WARNING: libintl.h: in the future, the compiler will take precedence" >&5
9799 $as_echo "$as_me: WARNING: libintl.h: in the future, the compiler will take precedence" >&2;}
9800
9801     ;;
9802 esac
9803 { $as_echo "$as_me:$LINENO: checking for libintl.h" >&5
9804 $as_echo_n "checking for libintl.h... " >&6; }
9805 if test "${ac_cv_header_libintl_h+set}" = set; then
9806   $as_echo_n "(cached) " >&6
9807 else
9808   ac_cv_header_libintl_h=$ac_header_preproc
9809 fi
9810 { $as_echo "$as_me:$LINENO: result: $ac_cv_header_libintl_h" >&5
9811 $as_echo "$ac_cv_header_libintl_h" >&6; }
9812
9813 fi
9814 if test "x$ac_cv_header_libintl_h" = x""yes; then
9815   { $as_echo "$as_me:$LINENO: checking for dgettext in libc" >&5
9816 $as_echo_n "checking for dgettext in libc... " >&6; }
9817 if test "${gt_cv_func_dgettext_libc+set}" = set; then
9818   $as_echo_n "(cached) " >&6
9819 else
9820   cat >conftest.$ac_ext <<_ACEOF
9821 /* confdefs.h.  */
9822 _ACEOF
9823 cat confdefs.h >>conftest.$ac_ext
9824 cat >>conftest.$ac_ext <<_ACEOF
9825 /* end confdefs.h.  */
9826 #include <libintl.h>
9827 int
9828 main ()
9829 {
9830 return (int) dgettext ("","")
9831   ;
9832   return 0;
9833 }
9834 _ACEOF
9835 rm -rf conftest.$ac_objext conftest$ac_exeext
9836 if { (ac_try="$ac_link"
9837 case "(($ac_try" in
9838   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9839   *) ac_try_echo=$ac_try;;
9840 esac
9841 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
9842 $as_echo "$ac_try_echo") >&5
9843   (eval "$ac_link") 2>conftest.er1
9844   ac_status=$?
9845   grep -v '^ *+' conftest.er1 >conftest.err
9846   rm -rf conftest.er1
9847   cat conftest.err >&5
9848   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
9849   (exit $ac_status); } && {
9850          test -z "$ac_c_werror_flag" ||
9851          test ! -s conftest.err
9852        } && test -s conftest$ac_exeext && {
9853          test "$cross_compiling" = yes ||
9854          $as_test_x conftest$ac_exeext
9855        }; then
9856   gt_cv_func_dgettext_libc=yes
9857 else
9858   $as_echo "$as_me: failed program was:" >&5
9859 sed 's/^/| /' conftest.$ac_ext >&5
9860
9861         gt_cv_func_dgettext_libc=no
9862 fi
9863
9864 rm -rf conftest.dSYM
9865 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
9866       conftest$ac_exeext conftest.$ac_ext
9867 fi
9868 { $as_echo "$as_me:$LINENO: result: $gt_cv_func_dgettext_libc" >&5
9869 $as_echo "$gt_cv_func_dgettext_libc" >&6; }
9870
9871           if test "$gt_cv_func_dgettext_libc" != "yes"; then
9872             { $as_echo "$as_me:$LINENO: checking for bindtextdomain in -lintl" >&5
9873 $as_echo_n "checking for bindtextdomain in -lintl... " >&6; }
9874 if test "${ac_cv_lib_intl_bindtextdomain+set}" = set; then
9875   $as_echo_n "(cached) " >&6
9876 else
9877   ac_check_lib_save_LIBS=$LIBS
9878 LIBS="-lintl  $LIBS"
9879 cat >conftest.$ac_ext <<_ACEOF
9880 /* confdefs.h.  */
9881 _ACEOF
9882 cat confdefs.h >>conftest.$ac_ext
9883 cat >>conftest.$ac_ext <<_ACEOF
9884 /* end confdefs.h.  */
9885
9886 /* Override any GCC internal prototype to avoid an error.
9887    Use char because int might match the return type of a GCC
9888    builtin and then its argument prototype would still apply.  */
9889 #ifdef __cplusplus
9890 extern "C"
9891 #endif
9892 char bindtextdomain ();
9893 int
9894 main ()
9895 {
9896 return bindtextdomain ();
9897   ;
9898   return 0;
9899 }
9900 _ACEOF
9901 rm -rf conftest.$ac_objext conftest$ac_exeext
9902 if { (ac_try="$ac_link"
9903 case "(($ac_try" in
9904   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9905   *) ac_try_echo=$ac_try;;
9906 esac
9907 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
9908 $as_echo "$ac_try_echo") >&5
9909   (eval "$ac_link") 2>conftest.er1
9910   ac_status=$?
9911   grep -v '^ *+' conftest.er1 >conftest.err
9912   rm -rf conftest.er1
9913   cat conftest.err >&5
9914   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
9915   (exit $ac_status); } && {
9916          test -z "$ac_c_werror_flag" ||
9917          test ! -s conftest.err
9918        } && test -s conftest$ac_exeext && {
9919          test "$cross_compiling" = yes ||
9920          $as_test_x conftest$ac_exeext
9921        }; then
9922   ac_cv_lib_intl_bindtextdomain=yes
9923 else
9924   $as_echo "$as_me: failed program was:" >&5
9925 sed 's/^/| /' conftest.$ac_ext >&5
9926
9927         ac_cv_lib_intl_bindtextdomain=no
9928 fi
9929
9930 rm -rf conftest.dSYM
9931 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
9932       conftest$ac_exeext conftest.$ac_ext
9933 LIBS=$ac_check_lib_save_LIBS
9934 fi
9935 { $as_echo "$as_me:$LINENO: result: $ac_cv_lib_intl_bindtextdomain" >&5
9936 $as_echo "$ac_cv_lib_intl_bindtextdomain" >&6; }
9937 if test "x$ac_cv_lib_intl_bindtextdomain" = x""yes; then
9938   { $as_echo "$as_me:$LINENO: checking for dgettext in libintl" >&5
9939 $as_echo_n "checking for dgettext in libintl... " >&6; }
9940 if test "${gt_cv_func_dgettext_libintl+set}" = set; then
9941   $as_echo_n "(cached) " >&6
9942 else
9943   { $as_echo "$as_me:$LINENO: checking for dgettext in -lintl" >&5
9944 $as_echo_n "checking for dgettext in -lintl... " >&6; }
9945 if test "${ac_cv_lib_intl_dgettext+set}" = set; then
9946   $as_echo_n "(cached) " >&6
9947 else
9948   ac_check_lib_save_LIBS=$LIBS
9949 LIBS="-lintl  $LIBS"
9950 cat >conftest.$ac_ext <<_ACEOF
9951 /* confdefs.h.  */
9952 _ACEOF
9953 cat confdefs.h >>conftest.$ac_ext
9954 cat >>conftest.$ac_ext <<_ACEOF
9955 /* end confdefs.h.  */
9956
9957 /* Override any GCC internal prototype to avoid an error.
9958    Use char because int might match the return type of a GCC
9959    builtin and then its argument prototype would still apply.  */
9960 #ifdef __cplusplus
9961 extern "C"
9962 #endif
9963 char dgettext ();
9964 int
9965 main ()
9966 {
9967 return dgettext ();
9968   ;
9969   return 0;
9970 }
9971 _ACEOF
9972 rm -rf conftest.$ac_objext conftest$ac_exeext
9973 if { (ac_try="$ac_link"
9974 case "(($ac_try" in
9975   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9976   *) ac_try_echo=$ac_try;;
9977 esac
9978 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
9979 $as_echo "$ac_try_echo") >&5
9980   (eval "$ac_link") 2>conftest.er1
9981   ac_status=$?
9982   grep -v '^ *+' conftest.er1 >conftest.err
9983   rm -rf conftest.er1
9984   cat conftest.err >&5
9985   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
9986   (exit $ac_status); } && {
9987          test -z "$ac_c_werror_flag" ||
9988          test ! -s conftest.err
9989        } && test -s conftest$ac_exeext && {
9990          test "$cross_compiling" = yes ||
9991          $as_test_x conftest$ac_exeext
9992        }; then
9993   ac_cv_lib_intl_dgettext=yes
9994 else
9995   $as_echo "$as_me: failed program was:" >&5
9996 sed 's/^/| /' conftest.$ac_ext >&5
9997
9998         ac_cv_lib_intl_dgettext=no
9999 fi
10000
10001 rm -rf conftest.dSYM
10002 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
10003       conftest$ac_exeext conftest.$ac_ext
10004 LIBS=$ac_check_lib_save_LIBS
10005 fi
10006 { $as_echo "$as_me:$LINENO: result: $ac_cv_lib_intl_dgettext" >&5
10007 $as_echo "$ac_cv_lib_intl_dgettext" >&6; }
10008 if test "x$ac_cv_lib_intl_dgettext" = x""yes; then
10009   gt_cv_func_dgettext_libintl=yes
10010 else
10011   gt_cv_func_dgettext_libintl=no
10012 fi
10013
10014 fi
10015 { $as_echo "$as_me:$LINENO: result: $gt_cv_func_dgettext_libintl" >&5
10016 $as_echo "$gt_cv_func_dgettext_libintl" >&6; }
10017 fi
10018
10019           fi
10020
10021           if test "$gt_cv_func_dgettext_libintl" = "yes"; then
10022             LIBS="$LIBS -lintl";
10023           fi
10024
10025           if test "$gt_cv_func_dgettext_libc" = "yes" \
10026             || test "$gt_cv_func_dgettext_libintl" = "yes"; then
10027
10028 cat >>confdefs.h <<\_ACEOF
10029 #define HAVE_GETTEXT 1
10030 _ACEOF
10031
10032             # Extract the first word of "msgfmt", so it can be a program name with args.
10033 set dummy msgfmt; ac_word=$2
10034 { $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
10035 $as_echo_n "checking for $ac_word... " >&6; }
10036 if test "${ac_cv_path_MSGFMT+set}" = set; then
10037   $as_echo_n "(cached) " >&6
10038 else
10039   case "$MSGFMT" in
10040   /*)
10041   ac_cv_path_MSGFMT="$MSGFMT" # Let the user override the test with a path.
10042   ;;
10043   *)
10044   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
10045   for ac_dir in $PATH; do
10046     test -z "$ac_dir" && ac_dir=.
10047     if test -f $ac_dir/$ac_word; then
10048       if test -z "`$ac_dir/$ac_word -h 2>&1 | grep 'dv '`"; then
10049         ac_cv_path_MSGFMT="$ac_dir/$ac_word"
10050         break
10051       fi
10052     fi
10053   done
10054   IFS="$ac_save_ifs"
10055   test -z "$ac_cv_path_MSGFMT" && ac_cv_path_MSGFMT="no"
10056   ;;
10057 esac
10058 fi
10059 MSGFMT="$ac_cv_path_MSGFMT"
10060 if test -n "$MSGFMT"; then
10061   { $as_echo "$as_me:$LINENO: result: $MSGFMT" >&5
10062 $as_echo "$MSGFMT" >&6; }
10063 else
10064   { $as_echo "$as_me:$LINENO: result: no" >&5
10065 $as_echo "no" >&6; }
10066 fi
10067             if test "$MSGFMT" != "no"; then
10068
10069 for ac_func in dcgettext
10070 do
10071 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
10072 { $as_echo "$as_me:$LINENO: checking for $ac_func" >&5
10073 $as_echo_n "checking for $ac_func... " >&6; }
10074 if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
10075   $as_echo_n "(cached) " >&6
10076 else
10077   cat >conftest.$ac_ext <<_ACEOF
10078 /* confdefs.h.  */
10079 _ACEOF
10080 cat confdefs.h >>conftest.$ac_ext
10081 cat >>conftest.$ac_ext <<_ACEOF
10082 /* end confdefs.h.  */
10083 /* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
10084    For example, HP-UX 11i <limits.h> declares gettimeofday.  */
10085 #define $ac_func innocuous_$ac_func
10086
10087 /* System header to define __stub macros and hopefully few prototypes,
10088     which can conflict with char $ac_func (); below.
10089     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
10090     <limits.h> exists even on freestanding compilers.  */
10091
10092 #ifdef __STDC__
10093 # include <limits.h>
10094 #else
10095 # include <assert.h>
10096 #endif
10097
10098 #undef $ac_func
10099
10100 /* Override any GCC internal prototype to avoid an error.
10101    Use char because int might match the return type of a GCC
10102    builtin and then its argument prototype would still apply.  */
10103 #ifdef __cplusplus
10104 extern "C"
10105 #endif
10106 char $ac_func ();
10107 /* The GNU C library defines this for functions which it implements
10108     to always fail with ENOSYS.  Some functions are actually named
10109     something starting with __ and the normal name is an alias.  */
10110 #if defined __stub_$ac_func || defined __stub___$ac_func
10111 choke me
10112 #endif
10113
10114 int
10115 main ()
10116 {
10117 return $ac_func ();
10118   ;
10119   return 0;
10120 }
10121 _ACEOF
10122 rm -rf conftest.$ac_objext conftest$ac_exeext
10123 if { (ac_try="$ac_link"
10124 case "(($ac_try" in
10125   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10126   *) ac_try_echo=$ac_try;;
10127 esac
10128 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
10129 $as_echo "$ac_try_echo") >&5
10130   (eval "$ac_link") 2>conftest.er1
10131   ac_status=$?
10132   grep -v '^ *+' conftest.er1 >conftest.err
10133   rm -rf conftest.er1
10134   cat conftest.err >&5
10135   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
10136   (exit $ac_status); } && {
10137          test -z "$ac_c_werror_flag" ||
10138          test ! -s conftest.err
10139        } && test -s conftest$ac_exeext && {
10140          test "$cross_compiling" = yes ||
10141          $as_test_x conftest$ac_exeext
10142        }; then
10143   eval "$as_ac_var=yes"
10144 else
10145   $as_echo "$as_me: failed program was:" >&5
10146 sed 's/^/| /' conftest.$ac_ext >&5
10147
10148         eval "$as_ac_var=no"
10149 fi
10150
10151 rm -rf conftest.dSYM
10152 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
10153       conftest$ac_exeext conftest.$ac_ext
10154 fi
10155 ac_res=`eval 'as_val=${'$as_ac_var'}
10156                  $as_echo "$as_val"'`
10157                { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
10158 $as_echo "$ac_res" >&6; }
10159 as_val=`eval 'as_val=${'$as_ac_var'}
10160                  $as_echo "$as_val"'`
10161    if test "x$as_val" = x""yes; then
10162   cat >>confdefs.h <<_ACEOF
10163 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
10164 _ACEOF
10165
10166 fi
10167 done
10168
10169               # Extract the first word of "gmsgfmt", so it can be a program name with args.
10170 set dummy gmsgfmt; ac_word=$2
10171 { $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
10172 $as_echo_n "checking for $ac_word... " >&6; }
10173 if test "${ac_cv_path_GMSGFMT+set}" = set; then
10174   $as_echo_n "(cached) " >&6
10175 else
10176   case $GMSGFMT in
10177   [\\/]* | ?:[\\/]*)
10178   ac_cv_path_GMSGFMT="$GMSGFMT" # Let the user override the test with a path.
10179   ;;
10180   *)
10181   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10182 for as_dir in $PATH
10183 do
10184   IFS=$as_save_IFS
10185   test -z "$as_dir" && as_dir=.
10186   for ac_exec_ext in '' $ac_executable_extensions; do
10187   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
10188     ac_cv_path_GMSGFMT="$as_dir/$ac_word$ac_exec_ext"
10189     $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
10190     break 2
10191   fi
10192 done
10193 done
10194 IFS=$as_save_IFS
10195
10196   test -z "$ac_cv_path_GMSGFMT" && ac_cv_path_GMSGFMT="$MSGFMT"
10197   ;;
10198 esac
10199 fi
10200 GMSGFMT=$ac_cv_path_GMSGFMT
10201 if test -n "$GMSGFMT"; then
10202   { $as_echo "$as_me:$LINENO: result: $GMSGFMT" >&5
10203 $as_echo "$GMSGFMT" >&6; }
10204 else
10205   { $as_echo "$as_me:$LINENO: result: no" >&5
10206 $as_echo "no" >&6; }
10207 fi
10208
10209
10210               # Extract the first word of "xgettext", so it can be a program name with args.
10211 set dummy xgettext; ac_word=$2
10212 { $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
10213 $as_echo_n "checking for $ac_word... " >&6; }
10214 if test "${ac_cv_path_XGETTEXT+set}" = set; then
10215   $as_echo_n "(cached) " >&6
10216 else
10217   case "$XGETTEXT" in
10218   /*)
10219   ac_cv_path_XGETTEXT="$XGETTEXT" # Let the user override the test with a path.
10220   ;;
10221   *)
10222   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
10223   for ac_dir in $PATH; do
10224     test -z "$ac_dir" && ac_dir=.
10225     if test -f $ac_dir/$ac_word; then
10226       if test -z "`$ac_dir/$ac_word -h 2>&1 | grep '(HELP)'`"; then
10227         ac_cv_path_XGETTEXT="$ac_dir/$ac_word"
10228         break
10229       fi
10230     fi
10231   done
10232   IFS="$ac_save_ifs"
10233   test -z "$ac_cv_path_XGETTEXT" && ac_cv_path_XGETTEXT=":"
10234   ;;
10235 esac
10236 fi
10237 XGETTEXT="$ac_cv_path_XGETTEXT"
10238 if test -n "$XGETTEXT"; then
10239   { $as_echo "$as_me:$LINENO: result: $XGETTEXT" >&5
10240 $as_echo "$XGETTEXT" >&6; }
10241 else
10242   { $as_echo "$as_me:$LINENO: result: no" >&5
10243 $as_echo "no" >&6; }
10244 fi
10245
10246               cat >conftest.$ac_ext <<_ACEOF
10247 /* confdefs.h.  */
10248 _ACEOF
10249 cat confdefs.h >>conftest.$ac_ext
10250 cat >>conftest.$ac_ext <<_ACEOF
10251 /* end confdefs.h.  */
10252
10253 int
10254 main ()
10255 {
10256 extern int _nl_msg_cat_cntr;
10257                              return _nl_msg_cat_cntr
10258   ;
10259   return 0;
10260 }
10261 _ACEOF
10262 rm -rf conftest.$ac_objext conftest$ac_exeext
10263 if { (ac_try="$ac_link"
10264 case "(($ac_try" in
10265   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10266   *) ac_try_echo=$ac_try;;
10267 esac
10268 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
10269 $as_echo "$ac_try_echo") >&5
10270   (eval "$ac_link") 2>conftest.er1
10271   ac_status=$?
10272   grep -v '^ *+' conftest.er1 >conftest.err
10273   rm -rf conftest.er1
10274   cat conftest.err >&5
10275   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
10276   (exit $ac_status); } && {
10277          test -z "$ac_c_werror_flag" ||
10278          test ! -s conftest.err
10279        } && test -s conftest$ac_exeext && {
10280          test "$cross_compiling" = yes ||
10281          $as_test_x conftest$ac_exeext
10282        }; then
10283   CATOBJEXT=.gmo
10284                  DATADIRNAME=share
10285 else
10286   $as_echo "$as_me: failed program was:" >&5
10287 sed 's/^/| /' conftest.$ac_ext >&5
10288
10289         CATOBJEXT=.mo
10290                  DATADIRNAME=lib
10291 fi
10292
10293 rm -rf conftest.dSYM
10294 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
10295       conftest$ac_exeext conftest.$ac_ext
10296               INSTOBJEXT=.mo
10297             fi
10298           fi
10299
10300           # Added by Martin Baulig 12/15/98 for libc5 systems
10301           if test "$gt_cv_func_dgettext_libc" != "yes" \
10302             && test "$gt_cv_func_dgettext_libintl" = "yes"; then
10303             INTLLIBS=-lintl
10304             LIBS=`echo $LIBS | sed -e 's/-lintl//'`
10305           fi
10306
10307 fi
10308
10309
10310
10311       if test "$CATOBJEXT" = "NONE"; then
10312                         nls_cv_use_gnu_gettext=yes
10313       fi
10314     fi
10315
10316     if test "$nls_cv_use_gnu_gettext" != "yes"; then
10317
10318 cat >>confdefs.h <<\_ACEOF
10319 #define ENABLE_NLS 1
10320 _ACEOF
10321
10322     else
10323             CATOBJEXT=
10324     fi
10325
10326         if test "$XGETTEXT" != ":"; then
10327                   if $XGETTEXT --omit-header /dev/null 2> /dev/null; then
10328         : ;
10329       else
10330         { $as_echo "$as_me:$LINENO: result: found xgettext program is not GNU xgettext; ignore it" >&5
10331 $as_echo "found xgettext program is not GNU xgettext; ignore it" >&6; }
10332         XGETTEXT=":"
10333       fi
10334     fi
10335
10336     # We need to process the po/ directory.
10337     POSUB=po
10338
10339     ac_config_commands="$ac_config_commands default-2"
10340
10341
10342                 for lang in $ALL_LINGUAS; do
10343       GMOFILES="$GMOFILES $lang.gmo"
10344       POFILES="$POFILES $lang.po"
10345     done
10346
10347
10348
10349
10350
10351
10352
10353
10354
10355
10356
10357
10358
10359    if test "x$CATOBJEXT" != "x"; then
10360      if test "x$ALL_LINGUAS" = "x"; then
10361        LINGUAS=
10362      else
10363        { $as_echo "$as_me:$LINENO: checking for catalogs to be installed" >&5
10364 $as_echo_n "checking for catalogs to be installed... " >&6; }
10365        NEW_LINGUAS=
10366        for lang in ${LINGUAS=$ALL_LINGUAS}; do
10367          case "$ALL_LINGUAS" in
10368           *$lang*) NEW_LINGUAS="$NEW_LINGUAS $lang" ;;
10369          esac
10370        done
10371        LINGUAS=$NEW_LINGUAS
10372        { $as_echo "$as_me:$LINENO: result: $LINGUAS" >&5
10373 $as_echo "$LINGUAS" >&6; }
10374      fi
10375
10376           if test -n "$LINGUAS"; then
10377        for lang in $LINGUAS; do CATALOGS="$CATALOGS $lang$CATOBJEXT"; done
10378      fi
10379    fi
10380
10381             test -d po || mkdir po
10382    if test "$CATOBJEXT" = ".cat"; then
10383      if test "${ac_cv_header_linux_version_h+set}" = set; then
10384   { $as_echo "$as_me:$LINENO: checking for linux/version.h" >&5
10385 $as_echo_n "checking for linux/version.h... " >&6; }
10386 if test "${ac_cv_header_linux_version_h+set}" = set; then
10387   $as_echo_n "(cached) " >&6
10388 fi
10389 { $as_echo "$as_me:$LINENO: result: $ac_cv_header_linux_version_h" >&5
10390 $as_echo "$ac_cv_header_linux_version_h" >&6; }
10391 else
10392   # Is the header compilable?
10393 { $as_echo "$as_me:$LINENO: checking linux/version.h usability" >&5
10394 $as_echo_n "checking linux/version.h usability... " >&6; }
10395 cat >conftest.$ac_ext <<_ACEOF
10396 /* confdefs.h.  */
10397 _ACEOF
10398 cat confdefs.h >>conftest.$ac_ext
10399 cat >>conftest.$ac_ext <<_ACEOF
10400 /* end confdefs.h.  */
10401 $ac_includes_default
10402 #include <linux/version.h>
10403 _ACEOF
10404 rm -rf conftest.$ac_objext
10405 if { (ac_try="$ac_compile"
10406 case "(($ac_try" in
10407   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10408   *) ac_try_echo=$ac_try;;
10409 esac
10410 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
10411 $as_echo "$ac_try_echo") >&5
10412   (eval "$ac_compile") 2>conftest.er1
10413   ac_status=$?
10414   grep -v '^ *+' conftest.er1 >conftest.err
10415   rm -rf conftest.er1
10416   cat conftest.err >&5
10417   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
10418   (exit $ac_status); } && {
10419          test -z "$ac_c_werror_flag" ||
10420          test ! -s conftest.err
10421        } && test -s conftest.$ac_objext; then
10422   ac_header_compiler=yes
10423 else
10424   $as_echo "$as_me: failed program was:" >&5
10425 sed 's/^/| /' conftest.$ac_ext >&5
10426
10427         ac_header_compiler=no
10428 fi
10429
10430 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10431 { $as_echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
10432 $as_echo "$ac_header_compiler" >&6; }
10433
10434 # Is the header present?
10435 { $as_echo "$as_me:$LINENO: checking linux/version.h presence" >&5
10436 $as_echo_n "checking linux/version.h presence... " >&6; }
10437 cat >conftest.$ac_ext <<_ACEOF
10438 /* confdefs.h.  */
10439 _ACEOF
10440 cat confdefs.h >>conftest.$ac_ext
10441 cat >>conftest.$ac_ext <<_ACEOF
10442 /* end confdefs.h.  */
10443 #include <linux/version.h>
10444 _ACEOF
10445 if { (ac_try="$ac_cpp conftest.$ac_ext"
10446 case "(($ac_try" in
10447   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10448   *) ac_try_echo=$ac_try;;
10449 esac
10450 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
10451 $as_echo "$ac_try_echo") >&5
10452   (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
10453   ac_status=$?
10454   grep -v '^ *+' conftest.er1 >conftest.err
10455   rm -rf conftest.er1
10456   cat conftest.err >&5
10457   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
10458   (exit $ac_status); } >/dev/null && {
10459          test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
10460          test ! -s conftest.err
10461        }; then
10462   ac_header_preproc=yes
10463 else
10464   $as_echo "$as_me: failed program was:" >&5
10465 sed 's/^/| /' conftest.$ac_ext >&5
10466
10467   ac_header_preproc=no
10468 fi
10469
10470 rm -rf conftest.err conftest.$ac_ext
10471 { $as_echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
10472 $as_echo "$ac_header_preproc" >&6; }
10473
10474 # So?  What about this header?
10475 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
10476   yes:no: )
10477     { $as_echo "$as_me:$LINENO: WARNING: linux/version.h: accepted by the compiler, rejected by the preprocessor!" >&5
10478 $as_echo "$as_me: WARNING: linux/version.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
10479     { $as_echo "$as_me:$LINENO: WARNING: linux/version.h: proceeding with the compiler's result" >&5
10480 $as_echo "$as_me: WARNING: linux/version.h: proceeding with the compiler's result" >&2;}
10481     ac_header_preproc=yes
10482     ;;
10483   no:yes:* )
10484     { $as_echo "$as_me:$LINENO: WARNING: linux/version.h: present but cannot be compiled" >&5
10485 $as_echo "$as_me: WARNING: linux/version.h: present but cannot be compiled" >&2;}
10486     { $as_echo "$as_me:$LINENO: WARNING: linux/version.h:     check for missing prerequisite headers?" >&5
10487 $as_echo "$as_me: WARNING: linux/version.h:     check for missing prerequisite headers?" >&2;}
10488     { $as_echo "$as_me:$LINENO: WARNING: linux/version.h: see the Autoconf documentation" >&5
10489 $as_echo "$as_me: WARNING: linux/version.h: see the Autoconf documentation" >&2;}
10490     { $as_echo "$as_me:$LINENO: WARNING: linux/version.h:     section \"Present But Cannot Be Compiled\"" >&5
10491 $as_echo "$as_me: WARNING: linux/version.h:     section \"Present But Cannot Be Compiled\"" >&2;}
10492     { $as_echo "$as_me:$LINENO: WARNING: linux/version.h: proceeding with the preprocessor's result" >&5
10493 $as_echo "$as_me: WARNING: linux/version.h: proceeding with the preprocessor's result" >&2;}
10494     { $as_echo "$as_me:$LINENO: WARNING: linux/version.h: in the future, the compiler will take precedence" >&5
10495 $as_echo "$as_me: WARNING: linux/version.h: in the future, the compiler will take precedence" >&2;}
10496
10497     ;;
10498 esac
10499 { $as_echo "$as_me:$LINENO: checking for linux/version.h" >&5
10500 $as_echo_n "checking for linux/version.h... " >&6; }
10501 if test "${ac_cv_header_linux_version_h+set}" = set; then
10502   $as_echo_n "(cached) " >&6
10503 else
10504   ac_cv_header_linux_version_h=$ac_header_preproc
10505 fi
10506 { $as_echo "$as_me:$LINENO: result: $ac_cv_header_linux_version_h" >&5
10507 $as_echo "$ac_cv_header_linux_version_h" >&6; }
10508
10509 fi
10510 if test "x$ac_cv_header_linux_version_h" = x""yes; then
10511   msgformat=linux
10512 else
10513   msgformat=xopen
10514 fi
10515
10516
10517
10518                sed -e '/^#/d' $srcdir/po/$msgformat-msg.sed > po/po2msg.sed
10519    fi
10520
10521             MKINSTALLDIRS=
10522 #
10523 # jwz: fuck this!  it puts hardcoded pathnames into the generated Makefiles!
10524 #
10525 #   if test -n "$ac_aux_dir"; then
10526 #     MKINSTALLDIRS="$ac_aux_dir/mkinstalldirs"
10527 #   fi
10528    if test -z "$MKINSTALLDIRS"; then
10529      MKINSTALLDIRS="\$(top_srcdir)/mkinstalldirs"
10530    fi
10531
10532    # jwz: you know what, screw it.  Let's just use the version that I
10533    # already computed in configure.in, instead of this version that came
10534    # with the i18n crud, ok?
10535    MKINSTALLDIRS="$INSTALL_DIRS"
10536
10537
10538
10539
10540          test -d po || mkdir po
10541    if test "x$srcdir" != "x."; then
10542      if test "x`echo $srcdir | sed 's@/.*@@'`" = "x"; then
10543        posrcprefix="$srcdir/"
10544      else
10545        posrcprefix="../$srcdir/"
10546      fi
10547    else
10548      posrcprefix="../"
10549    fi
10550    rm -f po/POTFILES
10551    sed -e "/^#/d" -e "/^\$/d" -e "s,.*, $posrcprefix& \\\\," -e "\$s/\(.*\) \\\\/\1/" \
10552         < $srcdir/po/POTFILES.in > po/POTFILES
10553
10554 MKINSTALLDIRS="$INSTALL_DIRS"
10555
10556
10557 ###############################################################################
10558 #
10559 #       Check for -lXmu (some fucked up vendors don't ship it...)
10560 #
10561 ###############################################################################
10562
10563 have_xmu=no
10564
10565   ac_save_CPPFLAGS="$CPPFLAGS"
10566   if test \! -z "$includedir" ; then
10567     CPPFLAGS="$CPPFLAGS -I$includedir"
10568   fi
10569   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
10570   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
10571   { $as_echo "$as_me:$LINENO: checking for X11/Xmu/Error.h" >&5
10572 $as_echo_n "checking for X11/Xmu/Error.h... " >&6; }
10573 if test "${ac_cv_header_X11_Xmu_Error_h+set}" = set; then
10574   $as_echo_n "(cached) " >&6
10575 else
10576   cat >conftest.$ac_ext <<_ACEOF
10577 /* confdefs.h.  */
10578 _ACEOF
10579 cat confdefs.h >>conftest.$ac_ext
10580 cat >>conftest.$ac_ext <<_ACEOF
10581 /* end confdefs.h.  */
10582 #include <stdlib.h>
10583                    #include <stdio.h>
10584                    #include <X11/Intrinsic.h>
10585
10586 #include <X11/Xmu/Error.h>
10587 _ACEOF
10588 rm -rf conftest.$ac_objext
10589 if { (ac_try="$ac_compile"
10590 case "(($ac_try" in
10591   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10592   *) ac_try_echo=$ac_try;;
10593 esac
10594 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
10595 $as_echo "$ac_try_echo") >&5
10596   (eval "$ac_compile") 2>conftest.er1
10597   ac_status=$?
10598   grep -v '^ *+' conftest.er1 >conftest.err
10599   rm -rf conftest.er1
10600   cat conftest.err >&5
10601   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
10602   (exit $ac_status); } && {
10603          test -z "$ac_c_werror_flag" ||
10604          test ! -s conftest.err
10605        } && test -s conftest.$ac_objext; then
10606   ac_cv_header_X11_Xmu_Error_h=yes
10607 else
10608   $as_echo "$as_me: failed program was:" >&5
10609 sed 's/^/| /' conftest.$ac_ext >&5
10610
10611         ac_cv_header_X11_Xmu_Error_h=no
10612 fi
10613
10614 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10615 fi
10616 { $as_echo "$as_me:$LINENO: result: $ac_cv_header_X11_Xmu_Error_h" >&5
10617 $as_echo "$ac_cv_header_X11_Xmu_Error_h" >&6; }
10618 if test "x$ac_cv_header_X11_Xmu_Error_h" = x""yes; then
10619   have_xmu=yes
10620 fi
10621
10622
10623   CPPFLAGS="$ac_save_CPPFLAGS"
10624 if test "$have_xmu" = no ; then
10625   XMU_SRCS='$(UTILS_SRC)/xmu.c'
10626   XMU_OBJS='$(UTILS_BIN)/xmu.o'
10627   XMU_LIBS=''
10628 else
10629   XMU_SRCS=''
10630   XMU_OBJS=''
10631   XMU_LIBS='-lXmu'
10632   cat >>confdefs.h <<\_ACEOF
10633 #define HAVE_XMU 1
10634 _ACEOF
10635
10636 fi
10637
10638
10639 ###############################################################################
10640 #
10641 #       Check for the SunOS 4.1.x _get_wmShellWidgetClass bug.
10642 #       See comp.windows.x FAQ question 124.  The right fix is to
10643 #       get OpenWindows 3.0 patches 100512-02 and 100573-03.
10644 #
10645 ###############################################################################
10646
10647 if test "$have_xmu" = yes ; then
10648   case "$host" in
10649     *-sunos4*)
10650     { $as_echo "$as_me:$LINENO: checking for the SunOS 4.1.x _get_wmShellWidgetClass bug" >&5
10651 $as_echo_n "checking for the SunOS 4.1.x _get_wmShellWidgetClass bug... " >&6; }
10652 if test "${ac_cv_sunos_xmu_bug+set}" = set; then
10653   $as_echo_n "(cached) " >&6
10654 else
10655   ac_save_LDFLAGS="$LDFLAGS"
10656                     if test \! -z "$x_libraries" ; then
10657                       LDFLAGS="$LDFLAGS -L$x_libraries"
10658                     fi
10659                     # Note: this trick never works!  (Generally.)
10660                     # We're only getting away with using AC_TRY_LINK
10661                     # with X libraries because we know it's SunOS.
10662                     LDFLAGS="$LDFLAGS -lXmu -lXt -lX11 -lXext -lm"
10663                     cat >conftest.$ac_ext <<_ACEOF
10664 /* confdefs.h.  */
10665 _ACEOF
10666 cat confdefs.h >>conftest.$ac_ext
10667 cat >>conftest.$ac_ext <<_ACEOF
10668 /* end confdefs.h.  */
10669
10670 int
10671 main ()
10672 {
10673
10674   ;
10675   return 0;
10676 }
10677 _ACEOF
10678 rm -rf conftest.$ac_objext conftest$ac_exeext
10679 if { (ac_try="$ac_link"
10680 case "(($ac_try" in
10681   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10682   *) ac_try_echo=$ac_try;;
10683 esac
10684 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
10685 $as_echo "$ac_try_echo") >&5
10686   (eval "$ac_link") 2>conftest.er1
10687   ac_status=$?
10688   grep -v '^ *+' conftest.er1 >conftest.err
10689   rm -rf conftest.er1
10690   cat conftest.err >&5
10691   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
10692   (exit $ac_status); } && {
10693          test -z "$ac_c_werror_flag" ||
10694          test ! -s conftest.err
10695        } && test -s conftest$ac_exeext && {
10696          test "$cross_compiling" = yes ||
10697          $as_test_x conftest$ac_exeext
10698        }; then
10699   ac_cv_sunos_xmu_bug=no
10700 else
10701   $as_echo "$as_me: failed program was:" >&5
10702 sed 's/^/| /' conftest.$ac_ext >&5
10703
10704         ac_cv_sunos_xmu_bug=yes
10705 fi
10706
10707 rm -rf conftest.dSYM
10708 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
10709       conftest$ac_exeext conftest.$ac_ext
10710                     LDFLAGS="$ac_save_LDFLAGS"
10711 fi
10712 { $as_echo "$as_me:$LINENO: result: $ac_cv_sunos_xmu_bug" >&5
10713 $as_echo "$ac_cv_sunos_xmu_bug" >&6; }
10714     if test "$ac_cv_sunos_xmu_bug" = yes ; then
10715       { $as_echo "$as_me:$LINENO: checking whether the compiler understands -static" >&5
10716 $as_echo_n "checking whether the compiler understands -static... " >&6; }
10717 if test "${ac_cv_ld_static+set}" = set; then
10718   $as_echo_n "(cached) " >&6
10719 else
10720   ac_save_LDFLAGS="$LDFLAGS"
10721                       LDFLAGS="$LDFLAGS -static"
10722                       cat >conftest.$ac_ext <<_ACEOF
10723 /* confdefs.h.  */
10724 _ACEOF
10725 cat confdefs.h >>conftest.$ac_ext
10726 cat >>conftest.$ac_ext <<_ACEOF
10727 /* end confdefs.h.  */
10728
10729 int
10730 main ()
10731 {
10732
10733   ;
10734   return 0;
10735 }
10736 _ACEOF
10737 rm -rf conftest.$ac_objext conftest$ac_exeext
10738 if { (ac_try="$ac_link"
10739 case "(($ac_try" in
10740   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10741   *) ac_try_echo=$ac_try;;
10742 esac
10743 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
10744 $as_echo "$ac_try_echo") >&5
10745   (eval "$ac_link") 2>conftest.er1
10746   ac_status=$?
10747   grep -v '^ *+' conftest.er1 >conftest.err
10748   rm -rf conftest.er1
10749   cat conftest.err >&5
10750   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
10751   (exit $ac_status); } && {
10752          test -z "$ac_c_werror_flag" ||
10753          test ! -s conftest.err
10754        } && test -s conftest$ac_exeext && {
10755          test "$cross_compiling" = yes ||
10756          $as_test_x conftest$ac_exeext
10757        }; then
10758   ac_cv_ld_static=yes
10759 else
10760   $as_echo "$as_me: failed program was:" >&5
10761 sed 's/^/| /' conftest.$ac_ext >&5
10762
10763         ac_cv_ld_static=no
10764 fi
10765
10766 rm -rf conftest.dSYM
10767 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
10768       conftest$ac_exeext conftest.$ac_ext
10769                     LDFLAGS="$ac_save_LDFLAGS"
10770 fi
10771 { $as_echo "$as_me:$LINENO: result: $ac_cv_ld_static" >&5
10772 $as_echo "$ac_cv_ld_static" >&6; }
10773       if test "$ac_cv_ld_static" = yes ; then
10774         LDFLAGS="$LDFLAGS -static"
10775       else
10776         LDFLAGS="$LDFLAGS -Bstatic"
10777       fi
10778     fi
10779     ;;
10780   esac
10781 fi
10782
10783
10784 ###############################################################################
10785 #
10786 #       Handle the --with-hackdir option
10787 #
10788 ###############################################################################
10789
10790 have_hackdir=yes
10791 with_hackdir_req=unspecified
10792
10793 # Check whether --with-hackdir was given.
10794 if test "${with_hackdir+set}" = set; then
10795   withval=$with_hackdir; with_hackdir="$withval"; with_hackdir_req="$withval"
10796 else
10797   with_hackdir=yes
10798 fi
10799
10800
10801 if test x"$with_hackdir" = xyes; then
10802   HACKDIR='${libexecdir}/xscreensaver'
10803 elif test x"$with_hackdir" = xno; then
10804   HACKDIR='${bindir}'
10805 else
10806   HACKDIR=$with_hackdir
10807 fi
10808
10809 # canonicalize slashes.
10810 HACKDIR=`echo "${HACKDIR}" | sed 's@/$@@;s@//*@/@g'`
10811
10812 # Expand HACKDIR as HACKDIR_FULL
10813 HACKDIR_FULL=`eval eval eval eval eval eval eval eval eval echo $HACKDIR`
10814
10815 # This option used to be called --enable-subdir; make sure that is no longer
10816 # used, since configure brain-damagedly ignores unknown --enable options.
10817
10818 obsolete_enable=
10819 # Check whether --enable-subdir was given.
10820 if test "${enable_subdir+set}" = set; then
10821   enableval=$enable_subdir; obsolete_enable=yes
10822 fi
10823
10824 if test -n "$obsolete_enable"; then
10825   echo "error: the --enable-subdir option has been replaced with"
10826   echo "       the new --with-hackdir option; see \`configure --help'"
10827   echo "       for more information."
10828   exit 1
10829 fi
10830
10831
10832 ###############################################################################
10833 #
10834 #       Handle the --with-configdir option
10835 #       Help for --with-x-app-defaults option added.
10836 #
10837 ###############################################################################
10838
10839 have_configdir=yes
10840 with_configdir_req=unspecified
10841
10842 # Check whether --with-configdir was given.
10843 if test "${with_configdir+set}" = set; then
10844   withval=$with_configdir; with_configdir="$withval"; with_configdir_req="$withval"
10845 else
10846   with_configdir=yes
10847 fi
10848
10849
10850 if test x"$with_configdir" = xyes; then
10851   HACK_CONF_DIR='${datadir}/xscreensaver/config'
10852 elif test x"$with_configdir" = xno; then
10853   echo "error: must be yes, or a pathname: --with-configdir=$with_configdir"
10854   exit 1
10855 else
10856   # there must be a better way than this...
10857   if test -z "`echo $with_configdir | sed 's@^/.*@@'`" ; then
10858     # absolute path
10859     HACK_CONF_DIR=$with_configdir
10860   else
10861     # relative path
10862     HACK_CONF_DIR="\${exec_prefix}$with_configdir"
10863   fi
10864 fi
10865
10866
10867
10868
10869 ###############################################################################
10870 #
10871 #       Check for the SGI SCREEN_SAVER server extension.
10872 #
10873 ###############################################################################
10874
10875 #have_sgi=no
10876 #with_sgi_req=unspecified
10877 #AC_ARG_WITH(sgi-ext,
10878 #[Except where noted, all of the --with options below can also take a
10879 #directory argument: for example, `--with-motif=/opt/Motif'.  That would
10880 #cause /opt/Motif/include/ to be added to the -I list, and /opt/Motif/lib/
10881 #to be added to the -L list, assuming those directories exist.
10882 #
10883 #By default, support for each of these options will be built in, if the
10884 #relevant library routines exist.  At run time, they will then be used
10885 #only if the X server being used supports them.  Each --with option has
10886 #a corresponding --without option, to override building support for them
10887 #at all.
10888 #
10889 #Screen blanking and idle-detection options:
10890 #
10891 #  --with-sgi-ext          Include support for the SGI SCREEN_SAVER extension.],
10892 #  [with_sgi="$withval"; with_sgi_req="$withval"],[with_sgi=yes])
10893 #
10894 #HANDLE_X_PATH_ARG(with_sgi, --with-sgi-ext, SGI SCREEN_SAVER)
10895 #
10896 #if test "$with_sgi" = yes; then
10897 #  AC_CHECK_X_HEADER(X11/extensions/XScreenSaver.h,
10898 #                    [have_sgi=yes
10899 #                     AC_DEFINE(HAVE_SGI_SAVER_EXTENSION)],,
10900 #                    [#include <X11/Xlib.h>])
10901 #
10902 #elif test "$with_sgi" != no; then
10903 #  echo "error: must be yes or no: --with-sgi-ext=$with_sgi"
10904 #  exit 1
10905 #fi
10906
10907
10908 ###############################################################################
10909 #
10910 #       Check for the XIDLE server extension.
10911 #
10912 ###############################################################################
10913
10914 #have_xidle=no
10915 #with_xidle_req=unspecified
10916 #AC_ARG_WITH(xidle-ext,
10917 #[  --with-xidle-ext        Include support for the XIDLE extension.],
10918 #  [with_xidle="$withval"; with_xidle_req="$withval"],[with_xidle=yes])
10919 #
10920 #HANDLE_X_PATH_ARG(with_xidle, --with-xidle-ext, XIDLE)
10921 #
10922 #if test "$with_xidle" = yes; then
10923 #  AC_CHECK_X_HEADER(X11/extensions/xidle.h,
10924 #                    [have_xidle=yes
10925 #                     AC_DEFINE(HAVE_XIDLE_EXTENSION)],,
10926 #                    [#include <X11/Xlib.h>])
10927 #elif test "$with_xidle" != no; then
10928 #  echo "error: must be yes or no: --with-xidle-ext=$with_xidle"
10929 #  exit 1
10930 #fi
10931
10932
10933 ###############################################################################
10934 #
10935 #       Check for the SGI-VIDEO-CONTROL server extension.
10936 #
10937 ###############################################################################
10938
10939 #have_sgivc=no
10940 #with_sgivc_req=unspecified
10941 #AC_ARG_WITH(sgivc-ext,
10942 #[  --with-sgivc-ext        Include support for the SGI-VIDEO-CONTROL extension.],
10943 #  [with_sgivc="$withval"; with_sgivc_req="$withval"],[with_sgivc=yes])
10944 #
10945 #HANDLE_X_PATH_ARG(with_sgivc, --with-sgivc-ext, SGI-VIDEO-CONTROL)
10946 #
10947 #if test "$with_sgivc" = yes; then
10948 #
10949 #  # first check for XSGIvc.h
10950 #  AC_CHECK_X_HEADER(X11/extensions/XSGIvc.h, [have_sgivc=yes],,
10951 #                    [#include <X11/Xlib.h>])
10952 #
10953 #  # if that succeeded, then check for the -lXsgivc
10954 #  if test "$have_sgivc" = yes; then
10955 #    have_sgivc=no
10956 #    AC_CHECK_X_LIB(Xsgivc, XSGIvcQueryGammaMap,
10957 #                  [have_sgivc=yes; SAVER_LIBS="$SAVER_LIBS -lXsgivc"], [true],
10958 #                  -lXext -lX11)
10959 #  fi
10960 #
10961 #  # if that succeeded, then we've really got it.
10962 #  if test "$have_sgivc" = yes; then
10963 #    AC_DEFINE(HAVE_SGI_VC_EXTENSION)
10964 #  fi
10965 #
10966 #elif test "$with_sgivc" != no; then
10967 #  echo "error: must be yes or no: --with-sgivc-ext=$with_sgivc"
10968 #  exit 1
10969 #fi
10970
10971
10972 ###############################################################################
10973 #
10974 #       Check for the DPMS server extension.
10975 #
10976 ###############################################################################
10977
10978 have_dpms=no
10979 with_dpms_req=unspecified
10980
10981 # Check whether --with-dpms-ext was given.
10982 if test "${with_dpms_ext+set}" = set; then
10983   withval=$with_dpms_ext; with_dpms="$withval"; with_dpms_req="$withval"
10984 else
10985   with_dpms=yes
10986 fi
10987
10988
10989
10990    case "$with_dpms" in
10991     yes) ;;
10992     no)  ;;
10993
10994     /*)
10995      { $as_echo "$as_me:$LINENO: checking for DPMS headers" >&5
10996 $as_echo_n "checking for DPMS headers... " >&6; }
10997      d=$with_dpms/include
10998      if test -d $d; then
10999        X_CFLAGS="-I$d $X_CFLAGS"
11000        { $as_echo "$as_me:$LINENO: result: $d" >&5
11001 $as_echo "$d" >&6; }
11002      else
11003        { $as_echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
11004 $as_echo "not found ($d: no such directory)" >&6; }
11005      fi
11006
11007      { $as_echo "$as_me:$LINENO: checking for DPMS libs" >&5
11008 $as_echo_n "checking for DPMS libs... " >&6; }
11009      d=$with_dpms/lib
11010      if test -d $d; then
11011        X_LIBS="-L$d $X_LIBS"
11012        { $as_echo "$as_me:$LINENO: result: $d" >&5
11013 $as_echo "$d" >&6; }
11014      else
11015        { $as_echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
11016 $as_echo "not found ($d: no such directory)" >&6; }
11017      fi
11018
11019      # replace the directory string with "yes".
11020      with_dpms_req="yes"
11021      with_dpms=$with_dpms_req
11022      ;;
11023
11024     *)
11025      echo ""
11026      echo "error: argument to --with-dpms-ext must be \"yes\", \"no\", or a directory."
11027      echo "       If it is a directory, then \`DIR/include' will be added to"
11028      echo "       the -I list, and \`DIR/lib' will be added to the -L list."
11029      exit 1
11030      ;;
11031    esac
11032
11033
11034 if test "$with_dpms" = yes; then
11035
11036   # first check for dpms.h
11037
11038   ac_save_CPPFLAGS="$CPPFLAGS"
11039   if test \! -z "$includedir" ; then
11040     CPPFLAGS="$CPPFLAGS -I$includedir"
11041   fi
11042   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
11043   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
11044   { $as_echo "$as_me:$LINENO: checking for X11/extensions/dpms.h" >&5
11045 $as_echo_n "checking for X11/extensions/dpms.h... " >&6; }
11046 if test "${ac_cv_header_X11_extensions_dpms_h+set}" = set; then
11047   $as_echo_n "(cached) " >&6
11048 else
11049   cat >conftest.$ac_ext <<_ACEOF
11050 /* confdefs.h.  */
11051 _ACEOF
11052 cat confdefs.h >>conftest.$ac_ext
11053 cat >>conftest.$ac_ext <<_ACEOF
11054 /* end confdefs.h.  */
11055 #include <X11/Xlib.h>
11056                      #include <X11/Xmd.h>
11057
11058 #include <X11/extensions/dpms.h>
11059 _ACEOF
11060 rm -rf conftest.$ac_objext
11061 if { (ac_try="$ac_compile"
11062 case "(($ac_try" in
11063   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11064   *) ac_try_echo=$ac_try;;
11065 esac
11066 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
11067 $as_echo "$ac_try_echo") >&5
11068   (eval "$ac_compile") 2>conftest.er1
11069   ac_status=$?
11070   grep -v '^ *+' conftest.er1 >conftest.err
11071   rm -rf conftest.er1
11072   cat conftest.err >&5
11073   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
11074   (exit $ac_status); } && {
11075          test -z "$ac_c_werror_flag" ||
11076          test ! -s conftest.err
11077        } && test -s conftest.$ac_objext; then
11078   ac_cv_header_X11_extensions_dpms_h=yes
11079 else
11080   $as_echo "$as_me: failed program was:" >&5
11081 sed 's/^/| /' conftest.$ac_ext >&5
11082
11083         ac_cv_header_X11_extensions_dpms_h=no
11084 fi
11085
11086 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11087 fi
11088 { $as_echo "$as_me:$LINENO: result: $ac_cv_header_X11_extensions_dpms_h" >&5
11089 $as_echo "$ac_cv_header_X11_extensions_dpms_h" >&6; }
11090 if test "x$ac_cv_header_X11_extensions_dpms_h" = x""yes; then
11091   have_dpms=yes
11092 fi
11093
11094
11095   CPPFLAGS="$ac_save_CPPFLAGS"
11096
11097   # if that succeeded, then check for the DPMS code in the libraries
11098   if test "$have_dpms" = yes; then
11099
11100     # first look in -lXext (this is where it is with XFree86 4.0)
11101     have_dpms=no
11102
11103   ac_save_CPPFLAGS="$CPPFLAGS"
11104   ac_save_LDFLAGS="$LDFLAGS"
11105 #  ac_save_LIBS="$LIBS"
11106
11107   if test \! -z "$includedir" ; then
11108     CPPFLAGS="$CPPFLAGS -I$includedir"
11109   fi
11110   # note: $X_CFLAGS includes $x_includes
11111   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
11112
11113   if test \! -z "$libdir" ; then
11114     LDFLAGS="$LDFLAGS -L$libdir"
11115   fi
11116   # note: $X_LIBS includes $x_libraries
11117   LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
11118
11119   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
11120   LDFLAGS=`eval eval eval eval eval eval eval eval eval echo $LDFLAGS`
11121   { $as_echo "$as_me:$LINENO: checking for DPMSInfo in -lXext" >&5
11122 $as_echo_n "checking for DPMSInfo in -lXext... " >&6; }
11123 if test "${ac_cv_lib_Xext_DPMSInfo+set}" = set; then
11124   $as_echo_n "(cached) " >&6
11125 else
11126   ac_check_lib_save_LIBS=$LIBS
11127 LIBS="-lXext -lXext -lX11 $LIBS"
11128 cat >conftest.$ac_ext <<_ACEOF
11129 /* confdefs.h.  */
11130 _ACEOF
11131 cat confdefs.h >>conftest.$ac_ext
11132 cat >>conftest.$ac_ext <<_ACEOF
11133 /* end confdefs.h.  */
11134
11135 /* Override any GCC internal prototype to avoid an error.
11136    Use char because int might match the return type of a GCC
11137    builtin and then its argument prototype would still apply.  */
11138 #ifdef __cplusplus
11139 extern "C"
11140 #endif
11141 char DPMSInfo ();
11142 int
11143 main ()
11144 {
11145 return DPMSInfo ();
11146   ;
11147   return 0;
11148 }
11149 _ACEOF
11150 rm -rf conftest.$ac_objext conftest$ac_exeext
11151 if { (ac_try="$ac_link"
11152 case "(($ac_try" in
11153   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11154   *) ac_try_echo=$ac_try;;
11155 esac
11156 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
11157 $as_echo "$ac_try_echo") >&5
11158   (eval "$ac_link") 2>conftest.er1
11159   ac_status=$?
11160   grep -v '^ *+' conftest.er1 >conftest.err
11161   rm -rf conftest.er1
11162   cat conftest.err >&5
11163   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
11164   (exit $ac_status); } && {
11165          test -z "$ac_c_werror_flag" ||
11166          test ! -s conftest.err
11167        } && test -s conftest$ac_exeext && {
11168          test "$cross_compiling" = yes ||
11169          $as_test_x conftest$ac_exeext
11170        }; then
11171   ac_cv_lib_Xext_DPMSInfo=yes
11172 else
11173   $as_echo "$as_me: failed program was:" >&5
11174 sed 's/^/| /' conftest.$ac_ext >&5
11175
11176         ac_cv_lib_Xext_DPMSInfo=no
11177 fi
11178
11179 rm -rf conftest.dSYM
11180 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
11181       conftest$ac_exeext conftest.$ac_ext
11182 LIBS=$ac_check_lib_save_LIBS
11183 fi
11184 { $as_echo "$as_me:$LINENO: result: $ac_cv_lib_Xext_DPMSInfo" >&5
11185 $as_echo "$ac_cv_lib_Xext_DPMSInfo" >&6; }
11186 if test "x$ac_cv_lib_Xext_DPMSInfo" = x""yes; then
11187   have_dpms=yes
11188 else
11189   true
11190 fi
11191
11192   CPPFLAGS="$ac_save_CPPFLAGS"
11193   LDFLAGS="$ac_save_LDFLAGS"
11194 #  LIBS="$ac_save_LIBS"
11195
11196
11197     # if that failed, look in -lXdpms (this is where it was in XFree86 3.x)
11198     if test "$have_dpms" = no; then
11199
11200   ac_save_CPPFLAGS="$CPPFLAGS"
11201   ac_save_LDFLAGS="$LDFLAGS"
11202 #  ac_save_LIBS="$LIBS"
11203
11204   if test \! -z "$includedir" ; then
11205     CPPFLAGS="$CPPFLAGS -I$includedir"
11206   fi
11207   # note: $X_CFLAGS includes $x_includes
11208   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
11209
11210   if test \! -z "$libdir" ; then
11211     LDFLAGS="$LDFLAGS -L$libdir"
11212   fi
11213   # note: $X_LIBS includes $x_libraries
11214   LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
11215
11216   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
11217   LDFLAGS=`eval eval eval eval eval eval eval eval eval echo $LDFLAGS`
11218   { $as_echo "$as_me:$LINENO: checking for DPMSInfo in -lXdpms" >&5
11219 $as_echo_n "checking for DPMSInfo in -lXdpms... " >&6; }
11220 if test "${ac_cv_lib_Xdpms_DPMSInfo+set}" = set; then
11221   $as_echo_n "(cached) " >&6
11222 else
11223   ac_check_lib_save_LIBS=$LIBS
11224 LIBS="-lXdpms -lXext -lX11 $LIBS"
11225 cat >conftest.$ac_ext <<_ACEOF
11226 /* confdefs.h.  */
11227 _ACEOF
11228 cat confdefs.h >>conftest.$ac_ext
11229 cat >>conftest.$ac_ext <<_ACEOF
11230 /* end confdefs.h.  */
11231
11232 /* Override any GCC internal prototype to avoid an error.
11233    Use char because int might match the return type of a GCC
11234    builtin and then its argument prototype would still apply.  */
11235 #ifdef __cplusplus
11236 extern "C"
11237 #endif
11238 char DPMSInfo ();
11239 int
11240 main ()
11241 {
11242 return DPMSInfo ();
11243   ;
11244   return 0;
11245 }
11246 _ACEOF
11247 rm -rf conftest.$ac_objext conftest$ac_exeext
11248 if { (ac_try="$ac_link"
11249 case "(($ac_try" in
11250   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11251   *) ac_try_echo=$ac_try;;
11252 esac
11253 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
11254 $as_echo "$ac_try_echo") >&5
11255   (eval "$ac_link") 2>conftest.er1
11256   ac_status=$?
11257   grep -v '^ *+' conftest.er1 >conftest.err
11258   rm -rf conftest.er1
11259   cat conftest.err >&5
11260   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
11261   (exit $ac_status); } && {
11262          test -z "$ac_c_werror_flag" ||
11263          test ! -s conftest.err
11264        } && test -s conftest$ac_exeext && {
11265          test "$cross_compiling" = yes ||
11266          $as_test_x conftest$ac_exeext
11267        }; then
11268   ac_cv_lib_Xdpms_DPMSInfo=yes
11269 else
11270   $as_echo "$as_me: failed program was:" >&5
11271 sed 's/^/| /' conftest.$ac_ext >&5
11272
11273         ac_cv_lib_Xdpms_DPMSInfo=no
11274 fi
11275
11276 rm -rf conftest.dSYM
11277 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
11278       conftest$ac_exeext conftest.$ac_ext
11279 LIBS=$ac_check_lib_save_LIBS
11280 fi
11281 { $as_echo "$as_me:$LINENO: result: $ac_cv_lib_Xdpms_DPMSInfo" >&5
11282 $as_echo "$ac_cv_lib_Xdpms_DPMSInfo" >&6; }
11283 if test "x$ac_cv_lib_Xdpms_DPMSInfo" = x""yes; then
11284   have_dpms=yes; XDPMS_LIBS="-lXdpms"
11285 else
11286   true
11287 fi
11288
11289   CPPFLAGS="$ac_save_CPPFLAGS"
11290   LDFLAGS="$ac_save_LDFLAGS"
11291 #  LIBS="$ac_save_LIBS"
11292
11293     fi
11294   fi
11295
11296
11297   # if that succeeded, then we've really got it.
11298   if test "$have_dpms" = yes; then
11299     cat >>confdefs.h <<\_ACEOF
11300 #define HAVE_DPMS_EXTENSION 1
11301 _ACEOF
11302
11303   fi
11304
11305 elif test "$with_dpms" != no; then
11306   echo "error: must be yes or no: --with-dpms-ext=$with_dpms"
11307   exit 1
11308 fi
11309
11310
11311 ###############################################################################
11312 #
11313 #       Check for the XINERAMA server extension.
11314 #
11315 ###############################################################################
11316
11317 have_xinerama=no
11318 with_xinerama_req=unspecified
11319
11320 # Check whether --with-xinerama-ext was given.
11321 if test "${with_xinerama_ext+set}" = set; then
11322   withval=$with_xinerama_ext; with_xinerama="$withval"; with_xinerama_req="$withval"
11323 else
11324   with_xinerama=yes
11325 fi
11326
11327
11328
11329    case "$with_xinerama" in
11330     yes) ;;
11331     no)  ;;
11332
11333     /*)
11334      { $as_echo "$as_me:$LINENO: checking for XINERAMA headers" >&5
11335 $as_echo_n "checking for XINERAMA headers... " >&6; }
11336      d=$with_xinerama/include
11337      if test -d $d; then
11338        X_CFLAGS="-I$d $X_CFLAGS"
11339        { $as_echo "$as_me:$LINENO: result: $d" >&5
11340 $as_echo "$d" >&6; }
11341      else
11342        { $as_echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
11343 $as_echo "not found ($d: no such directory)" >&6; }
11344      fi
11345
11346      { $as_echo "$as_me:$LINENO: checking for XINERAMA libs" >&5
11347 $as_echo_n "checking for XINERAMA libs... " >&6; }
11348      d=$with_xinerama/lib
11349      if test -d $d; then
11350        X_LIBS="-L$d $X_LIBS"
11351        { $as_echo "$as_me:$LINENO: result: $d" >&5
11352 $as_echo "$d" >&6; }
11353      else
11354        { $as_echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
11355 $as_echo "not found ($d: no such directory)" >&6; }
11356      fi
11357
11358      # replace the directory string with "yes".
11359      with_xinerama_req="yes"
11360      with_xinerama=$with_xinerama_req
11361      ;;
11362
11363     *)
11364      echo ""
11365      echo "error: argument to --with-xinerama-ext must be \"yes\", \"no\", or a directory."
11366      echo "       If it is a directory, then \`DIR/include' will be added to"
11367      echo "       the -I list, and \`DIR/lib' will be added to the -L list."
11368      exit 1
11369      ;;
11370    esac
11371
11372
11373 if test "$with_xinerama" = yes; then
11374
11375   # first check for Xinerama.h
11376
11377   ac_save_CPPFLAGS="$CPPFLAGS"
11378   if test \! -z "$includedir" ; then
11379     CPPFLAGS="$CPPFLAGS -I$includedir"
11380   fi
11381   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
11382   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
11383   { $as_echo "$as_me:$LINENO: checking for X11/extensions/Xinerama.h" >&5
11384 $as_echo_n "checking for X11/extensions/Xinerama.h... " >&6; }
11385 if test "${ac_cv_header_X11_extensions_Xinerama_h+set}" = set; then
11386   $as_echo_n "(cached) " >&6
11387 else
11388   cat >conftest.$ac_ext <<_ACEOF
11389 /* confdefs.h.  */
11390 _ACEOF
11391 cat confdefs.h >>conftest.$ac_ext
11392 cat >>conftest.$ac_ext <<_ACEOF
11393 /* end confdefs.h.  */
11394 #include <X11/Xlib.h>
11395
11396 #include <X11/extensions/Xinerama.h>
11397 _ACEOF
11398 rm -rf conftest.$ac_objext
11399 if { (ac_try="$ac_compile"
11400 case "(($ac_try" in
11401   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11402   *) ac_try_echo=$ac_try;;
11403 esac
11404 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
11405 $as_echo "$ac_try_echo") >&5
11406   (eval "$ac_compile") 2>conftest.er1
11407   ac_status=$?
11408   grep -v '^ *+' conftest.er1 >conftest.err
11409   rm -rf conftest.er1
11410   cat conftest.err >&5
11411   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
11412   (exit $ac_status); } && {
11413          test -z "$ac_c_werror_flag" ||
11414          test ! -s conftest.err
11415        } && test -s conftest.$ac_objext; then
11416   ac_cv_header_X11_extensions_Xinerama_h=yes
11417 else
11418   $as_echo "$as_me: failed program was:" >&5
11419 sed 's/^/| /' conftest.$ac_ext >&5
11420
11421         ac_cv_header_X11_extensions_Xinerama_h=no
11422 fi
11423
11424 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11425 fi
11426 { $as_echo "$as_me:$LINENO: result: $ac_cv_header_X11_extensions_Xinerama_h" >&5
11427 $as_echo "$ac_cv_header_X11_extensions_Xinerama_h" >&6; }
11428 if test "x$ac_cv_header_X11_extensions_Xinerama_h" = x""yes; then
11429   have_xinerama=yes
11430 fi
11431
11432
11433   CPPFLAGS="$ac_save_CPPFLAGS"
11434
11435   # if that succeeded, then check for the XINERAMA code in the libraries
11436   if test "$have_xinerama" = yes; then
11437
11438     # first look in -lXext
11439     have_xinerama=no
11440
11441   ac_save_CPPFLAGS="$CPPFLAGS"
11442   ac_save_LDFLAGS="$LDFLAGS"
11443 #  ac_save_LIBS="$LIBS"
11444
11445   if test \! -z "$includedir" ; then
11446     CPPFLAGS="$CPPFLAGS -I$includedir"
11447   fi
11448   # note: $X_CFLAGS includes $x_includes
11449   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
11450
11451   if test \! -z "$libdir" ; then
11452     LDFLAGS="$LDFLAGS -L$libdir"
11453   fi
11454   # note: $X_LIBS includes $x_libraries
11455   LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
11456
11457   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
11458   LDFLAGS=`eval eval eval eval eval eval eval eval eval echo $LDFLAGS`
11459   { $as_echo "$as_me:$LINENO: checking for XineramaQueryScreens in -lXext" >&5
11460 $as_echo_n "checking for XineramaQueryScreens in -lXext... " >&6; }
11461 if test "${ac_cv_lib_Xext_XineramaQueryScreens+set}" = set; then
11462   $as_echo_n "(cached) " >&6
11463 else
11464   ac_check_lib_save_LIBS=$LIBS
11465 LIBS="-lXext -lXext -lX11 $LIBS"
11466 cat >conftest.$ac_ext <<_ACEOF
11467 /* confdefs.h.  */
11468 _ACEOF
11469 cat confdefs.h >>conftest.$ac_ext
11470 cat >>conftest.$ac_ext <<_ACEOF
11471 /* end confdefs.h.  */
11472
11473 /* Override any GCC internal prototype to avoid an error.
11474    Use char because int might match the return type of a GCC
11475    builtin and then its argument prototype would still apply.  */
11476 #ifdef __cplusplus
11477 extern "C"
11478 #endif
11479 char XineramaQueryScreens ();
11480 int
11481 main ()
11482 {
11483 return XineramaQueryScreens ();
11484   ;
11485   return 0;
11486 }
11487 _ACEOF
11488 rm -rf conftest.$ac_objext conftest$ac_exeext
11489 if { (ac_try="$ac_link"
11490 case "(($ac_try" in
11491   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11492   *) ac_try_echo=$ac_try;;
11493 esac
11494 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
11495 $as_echo "$ac_try_echo") >&5
11496   (eval "$ac_link") 2>conftest.er1
11497   ac_status=$?
11498   grep -v '^ *+' conftest.er1 >conftest.err
11499   rm -rf conftest.er1
11500   cat conftest.err >&5
11501   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
11502   (exit $ac_status); } && {
11503          test -z "$ac_c_werror_flag" ||
11504          test ! -s conftest.err
11505        } && test -s conftest$ac_exeext && {
11506          test "$cross_compiling" = yes ||
11507          $as_test_x conftest$ac_exeext
11508        }; then
11509   ac_cv_lib_Xext_XineramaQueryScreens=yes
11510 else
11511   $as_echo "$as_me: failed program was:" >&5
11512 sed 's/^/| /' conftest.$ac_ext >&5
11513
11514         ac_cv_lib_Xext_XineramaQueryScreens=no
11515 fi
11516
11517 rm -rf conftest.dSYM
11518 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
11519       conftest$ac_exeext conftest.$ac_ext
11520 LIBS=$ac_check_lib_save_LIBS
11521 fi
11522 { $as_echo "$as_me:$LINENO: result: $ac_cv_lib_Xext_XineramaQueryScreens" >&5
11523 $as_echo "$ac_cv_lib_Xext_XineramaQueryScreens" >&6; }
11524 if test "x$ac_cv_lib_Xext_XineramaQueryScreens" = x""yes; then
11525   have_xinerama=yes
11526 else
11527   true
11528 fi
11529
11530   CPPFLAGS="$ac_save_CPPFLAGS"
11531   LDFLAGS="$ac_save_LDFLAGS"
11532 #  LIBS="$ac_save_LIBS"
11533
11534
11535     # if that failed, look in -lXinerama (this is where it is in XFree86 4.1.)
11536     if test "$have_xinerama" = no; then
11537
11538   ac_save_CPPFLAGS="$CPPFLAGS"
11539   ac_save_LDFLAGS="$LDFLAGS"
11540 #  ac_save_LIBS="$LIBS"
11541
11542   if test \! -z "$includedir" ; then
11543     CPPFLAGS="$CPPFLAGS -I$includedir"
11544   fi
11545   # note: $X_CFLAGS includes $x_includes
11546   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
11547
11548   if test \! -z "$libdir" ; then
11549     LDFLAGS="$LDFLAGS -L$libdir"
11550   fi
11551   # note: $X_LIBS includes $x_libraries
11552   LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
11553
11554   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
11555   LDFLAGS=`eval eval eval eval eval eval eval eval eval echo $LDFLAGS`
11556   { $as_echo "$as_me:$LINENO: checking for XineramaQueryScreens in -lXinerama" >&5
11557 $as_echo_n "checking for XineramaQueryScreens in -lXinerama... " >&6; }
11558 if test "${ac_cv_lib_Xinerama_XineramaQueryScreens+set}" = set; then
11559   $as_echo_n "(cached) " >&6
11560 else
11561   ac_check_lib_save_LIBS=$LIBS
11562 LIBS="-lXinerama -lXext -lX11 $LIBS"
11563 cat >conftest.$ac_ext <<_ACEOF
11564 /* confdefs.h.  */
11565 _ACEOF
11566 cat confdefs.h >>conftest.$ac_ext
11567 cat >>conftest.$ac_ext <<_ACEOF
11568 /* end confdefs.h.  */
11569
11570 /* Override any GCC internal prototype to avoid an error.
11571    Use char because int might match the return type of a GCC
11572    builtin and then its argument prototype would still apply.  */
11573 #ifdef __cplusplus
11574 extern "C"
11575 #endif
11576 char XineramaQueryScreens ();
11577 int
11578 main ()
11579 {
11580 return XineramaQueryScreens ();
11581   ;
11582   return 0;
11583 }
11584 _ACEOF
11585 rm -rf conftest.$ac_objext conftest$ac_exeext
11586 if { (ac_try="$ac_link"
11587 case "(($ac_try" in
11588   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11589   *) ac_try_echo=$ac_try;;
11590 esac
11591 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
11592 $as_echo "$ac_try_echo") >&5
11593   (eval "$ac_link") 2>conftest.er1
11594   ac_status=$?
11595   grep -v '^ *+' conftest.er1 >conftest.err
11596   rm -rf conftest.er1
11597   cat conftest.err >&5
11598   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
11599   (exit $ac_status); } && {
11600          test -z "$ac_c_werror_flag" ||
11601          test ! -s conftest.err
11602        } && test -s conftest$ac_exeext && {
11603          test "$cross_compiling" = yes ||
11604          $as_test_x conftest$ac_exeext
11605        }; then
11606   ac_cv_lib_Xinerama_XineramaQueryScreens=yes
11607 else
11608   $as_echo "$as_me: failed program was:" >&5
11609 sed 's/^/| /' conftest.$ac_ext >&5
11610
11611         ac_cv_lib_Xinerama_XineramaQueryScreens=no
11612 fi
11613
11614 rm -rf conftest.dSYM
11615 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
11616       conftest$ac_exeext conftest.$ac_ext
11617 LIBS=$ac_check_lib_save_LIBS
11618 fi
11619 { $as_echo "$as_me:$LINENO: result: $ac_cv_lib_Xinerama_XineramaQueryScreens" >&5
11620 $as_echo "$ac_cv_lib_Xinerama_XineramaQueryScreens" >&6; }
11621 if test "x$ac_cv_lib_Xinerama_XineramaQueryScreens" = x""yes; then
11622   have_xinerama=yes; XINERAMA_LIBS="-lXinerama"
11623 else
11624   true
11625 fi
11626
11627   CPPFLAGS="$ac_save_CPPFLAGS"
11628   LDFLAGS="$ac_save_LDFLAGS"
11629 #  LIBS="$ac_save_LIBS"
11630
11631     fi
11632   fi
11633
11634   # if that succeeded, then we've really got it.
11635   if test "$have_xinerama" = yes; then
11636     cat >>confdefs.h <<\_ACEOF
11637 #define HAVE_XINERAMA 1
11638 _ACEOF
11639
11640   fi
11641
11642 elif test "$with_xinerama" != no; then
11643   echo "error: must be yes or no: --with-xinerama-ext=$with_xinerama"
11644   exit 1
11645 fi
11646
11647
11648 ###############################################################################
11649 #
11650 #       Check for the XINPUT server extension.
11651 #
11652 ###############################################################################
11653
11654 have_xinput=no
11655 with_xinput_req=unspecified
11656
11657 # Check whether --with-xinput-ext was given.
11658 if test "${with_xinput_ext+set}" = set; then
11659   withval=$with_xinput_ext; with_xinput="$withval"; with_xinput_req="$withval"
11660 else
11661   with_xinput=yes
11662 fi
11663
11664
11665
11666    case "$with_xinput" in
11667     yes) ;;
11668     no)  ;;
11669
11670     /*)
11671      { $as_echo "$as_me:$LINENO: checking for XINPUT headers" >&5
11672 $as_echo_n "checking for XINPUT headers... " >&6; }
11673      d=$with_xinput/include
11674      if test -d $d; then
11675        X_CFLAGS="-I$d $X_CFLAGS"
11676        { $as_echo "$as_me:$LINENO: result: $d" >&5
11677 $as_echo "$d" >&6; }
11678      else
11679        { $as_echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
11680 $as_echo "not found ($d: no such directory)" >&6; }
11681      fi
11682
11683      { $as_echo "$as_me:$LINENO: checking for XINPUT libs" >&5
11684 $as_echo_n "checking for XINPUT libs... " >&6; }
11685      d=$with_xinput/lib
11686      if test -d $d; then
11687        X_LIBS="-L$d $X_LIBS"
11688        { $as_echo "$as_me:$LINENO: result: $d" >&5
11689 $as_echo "$d" >&6; }
11690      else
11691        { $as_echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
11692 $as_echo "not found ($d: no such directory)" >&6; }
11693      fi
11694
11695      # replace the directory string with "yes".
11696      with_xinput_req="yes"
11697      with_xinput=$with_xinput_req
11698      ;;
11699
11700     *)
11701      echo ""
11702      echo "error: argument to --with-xinput-ext must be \"yes\", \"no\", or a directory."
11703      echo "       If it is a directory, then \`DIR/include' will be added to"
11704      echo "       the -I list, and \`DIR/lib' will be added to the -L list."
11705      exit 1
11706      ;;
11707    esac
11708
11709
11710 if test "$with_xinput" = yes; then
11711
11712   # first check for Xinput.h
11713
11714   ac_save_CPPFLAGS="$CPPFLAGS"
11715   if test \! -z "$includedir" ; then
11716     CPPFLAGS="$CPPFLAGS -I$includedir"
11717   fi
11718   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
11719   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
11720   { $as_echo "$as_me:$LINENO: checking for X11/extensions/XInput.h" >&5
11721 $as_echo_n "checking for X11/extensions/XInput.h... " >&6; }
11722 if test "${ac_cv_header_X11_extensions_XInput_h+set}" = set; then
11723   $as_echo_n "(cached) " >&6
11724 else
11725   cat >conftest.$ac_ext <<_ACEOF
11726 /* confdefs.h.  */
11727 _ACEOF
11728 cat confdefs.h >>conftest.$ac_ext
11729 cat >>conftest.$ac_ext <<_ACEOF
11730 /* end confdefs.h.  */
11731 #include <X11/Xlib.h>
11732
11733 #include <X11/extensions/XInput.h>
11734 _ACEOF
11735 rm -rf conftest.$ac_objext
11736 if { (ac_try="$ac_compile"
11737 case "(($ac_try" in
11738   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11739   *) ac_try_echo=$ac_try;;
11740 esac
11741 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
11742 $as_echo "$ac_try_echo") >&5
11743   (eval "$ac_compile") 2>conftest.er1
11744   ac_status=$?
11745   grep -v '^ *+' conftest.er1 >conftest.err
11746   rm -rf conftest.er1
11747   cat conftest.err >&5
11748   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
11749   (exit $ac_status); } && {
11750          test -z "$ac_c_werror_flag" ||
11751          test ! -s conftest.err
11752        } && test -s conftest.$ac_objext; then
11753   ac_cv_header_X11_extensions_XInput_h=yes
11754 else
11755   $as_echo "$as_me: failed program was:" >&5
11756 sed 's/^/| /' conftest.$ac_ext >&5
11757
11758         ac_cv_header_X11_extensions_XInput_h=no
11759 fi
11760
11761 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11762 fi
11763 { $as_echo "$as_me:$LINENO: result: $ac_cv_header_X11_extensions_XInput_h" >&5
11764 $as_echo "$ac_cv_header_X11_extensions_XInput_h" >&6; }
11765 if test "x$ac_cv_header_X11_extensions_XInput_h" = x""yes; then
11766   have_xinput=yes
11767 fi
11768
11769
11770   CPPFLAGS="$ac_save_CPPFLAGS"
11771
11772   # if that succeeded, then check for libXi
11773   if test "$have_xinput" = yes; then
11774     have_xinput=no
11775
11776   ac_save_CPPFLAGS="$CPPFLAGS"
11777   ac_save_LDFLAGS="$LDFLAGS"
11778 #  ac_save_LIBS="$LIBS"
11779
11780   if test \! -z "$includedir" ; then
11781     CPPFLAGS="$CPPFLAGS -I$includedir"
11782   fi
11783   # note: $X_CFLAGS includes $x_includes
11784   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
11785
11786   if test \! -z "$libdir" ; then
11787     LDFLAGS="$LDFLAGS -L$libdir"
11788   fi
11789   # note: $X_LIBS includes $x_libraries
11790   LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
11791
11792   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
11793   LDFLAGS=`eval eval eval eval eval eval eval eval eval echo $LDFLAGS`
11794   { $as_echo "$as_me:$LINENO: checking for XListInputDevices in -lXi" >&5
11795 $as_echo_n "checking for XListInputDevices in -lXi... " >&6; }
11796 if test "${ac_cv_lib_Xi_XListInputDevices+set}" = set; then
11797   $as_echo_n "(cached) " >&6
11798 else
11799   ac_check_lib_save_LIBS=$LIBS
11800 LIBS="-lXi -lXext -lX11 $LIBS"
11801 cat >conftest.$ac_ext <<_ACEOF
11802 /* confdefs.h.  */
11803 _ACEOF
11804 cat confdefs.h >>conftest.$ac_ext
11805 cat >>conftest.$ac_ext <<_ACEOF
11806 /* end confdefs.h.  */
11807
11808 /* Override any GCC internal prototype to avoid an error.
11809    Use char because int might match the return type of a GCC
11810    builtin and then its argument prototype would still apply.  */
11811 #ifdef __cplusplus
11812 extern "C"
11813 #endif
11814 char XListInputDevices ();
11815 int
11816 main ()
11817 {
11818 return XListInputDevices ();
11819   ;
11820   return 0;
11821 }
11822 _ACEOF
11823 rm -rf conftest.$ac_objext conftest$ac_exeext
11824 if { (ac_try="$ac_link"
11825 case "(($ac_try" in
11826   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11827   *) ac_try_echo=$ac_try;;
11828 esac
11829 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
11830 $as_echo "$ac_try_echo") >&5
11831   (eval "$ac_link") 2>conftest.er1
11832   ac_status=$?
11833   grep -v '^ *+' conftest.er1 >conftest.err
11834   rm -rf conftest.er1
11835   cat conftest.err >&5
11836   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
11837   (exit $ac_status); } && {
11838          test -z "$ac_c_werror_flag" ||
11839          test ! -s conftest.err
11840        } && test -s conftest$ac_exeext && {
11841          test "$cross_compiling" = yes ||
11842          $as_test_x conftest$ac_exeext
11843        }; then
11844   ac_cv_lib_Xi_XListInputDevices=yes
11845 else
11846   $as_echo "$as_me: failed program was:" >&5
11847 sed 's/^/| /' conftest.$ac_ext >&5
11848
11849         ac_cv_lib_Xi_XListInputDevices=no
11850 fi
11851
11852 rm -rf conftest.dSYM
11853 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
11854       conftest$ac_exeext conftest.$ac_ext
11855 LIBS=$ac_check_lib_save_LIBS
11856 fi
11857 { $as_echo "$as_me:$LINENO: result: $ac_cv_lib_Xi_XListInputDevices" >&5
11858 $as_echo "$ac_cv_lib_Xi_XListInputDevices" >&6; }
11859 if test "x$ac_cv_lib_Xi_XListInputDevices" = x""yes; then
11860   have_xinput=yes; SAVER_LIBS="$SAVER_LIBS -lXi"
11861 else
11862   true
11863 fi
11864
11865   CPPFLAGS="$ac_save_CPPFLAGS"
11866   LDFLAGS="$ac_save_LDFLAGS"
11867 #  LIBS="$ac_save_LIBS"
11868
11869   fi
11870
11871   # if that succeeded, then we've really got it.
11872   if test "$have_xinput" = yes; then
11873     cat >>confdefs.h <<\_ACEOF
11874 #define HAVE_XINPUT 1
11875 _ACEOF
11876
11877   fi
11878
11879 elif test "$with_xinput" != no; then
11880   echo "error: must be yes or no: --with-xinput-ext=$with_xinput"
11881   exit 1
11882 fi
11883
11884
11885 ###############################################################################
11886 #
11887 #       Check for the XF86VMODE server extension (for virtual screens.)
11888 #
11889 ###############################################################################
11890
11891 have_xf86vmode=no
11892 with_xf86vmode_req=unspecified
11893
11894 # Check whether --with-xf86vmode-ext was given.
11895 if test "${with_xf86vmode_ext+set}" = set; then
11896   withval=$with_xf86vmode_ext; with_xf86vmode="$withval"; with_xf86vmode_req="$withval"
11897 else
11898   with_xf86vmode=yes
11899 fi
11900
11901
11902
11903    case "$with_xf86vmode" in
11904     yes) ;;
11905     no)  ;;
11906
11907     /*)
11908      { $as_echo "$as_me:$LINENO: checking for xf86vmode headers" >&5
11909 $as_echo_n "checking for xf86vmode headers... " >&6; }
11910      d=$with_xf86vmode/include
11911      if test -d $d; then
11912        X_CFLAGS="-I$d $X_CFLAGS"
11913        { $as_echo "$as_me:$LINENO: result: $d" >&5
11914 $as_echo "$d" >&6; }
11915      else
11916        { $as_echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
11917 $as_echo "not found ($d: no such directory)" >&6; }
11918      fi
11919
11920      { $as_echo "$as_me:$LINENO: checking for xf86vmode libs" >&5
11921 $as_echo_n "checking for xf86vmode libs... " >&6; }
11922      d=$with_xf86vmode/lib
11923      if test -d $d; then
11924        X_LIBS="-L$d $X_LIBS"
11925        { $as_echo "$as_me:$LINENO: result: $d" >&5
11926 $as_echo "$d" >&6; }
11927      else
11928        { $as_echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
11929 $as_echo "not found ($d: no such directory)" >&6; }
11930      fi
11931
11932      # replace the directory string with "yes".
11933      with_xf86vmode_req="yes"
11934      with_xf86vmode=$with_xf86vmode_req
11935      ;;
11936
11937     *)
11938      echo ""
11939      echo "error: argument to --with-xf86vmode-ext must be \"yes\", \"no\", or a directory."
11940      echo "       If it is a directory, then \`DIR/include' will be added to"
11941      echo "       the -I list, and \`DIR/lib' will be added to the -L list."
11942      exit 1
11943      ;;
11944    esac
11945
11946
11947 VIDMODE_LIBS=""
11948
11949 if test "$with_xf86vmode" = yes; then
11950
11951   # first check for xf86vmode.h
11952
11953   ac_save_CPPFLAGS="$CPPFLAGS"
11954   if test \! -z "$includedir" ; then
11955     CPPFLAGS="$CPPFLAGS -I$includedir"
11956   fi
11957   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
11958   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
11959   { $as_echo "$as_me:$LINENO: checking for X11/extensions/xf86vmode.h" >&5
11960 $as_echo_n "checking for X11/extensions/xf86vmode.h... " >&6; }
11961 if test "${ac_cv_header_X11_extensions_xf86vmode_h+set}" = set; then
11962   $as_echo_n "(cached) " >&6
11963 else
11964   cat >conftest.$ac_ext <<_ACEOF
11965 /* confdefs.h.  */
11966 _ACEOF
11967 cat confdefs.h >>conftest.$ac_ext
11968 cat >>conftest.$ac_ext <<_ACEOF
11969 /* end confdefs.h.  */
11970 #include <X11/Xlib.h>
11971
11972 #include <X11/extensions/xf86vmode.h>
11973 _ACEOF
11974 rm -rf conftest.$ac_objext
11975 if { (ac_try="$ac_compile"
11976 case "(($ac_try" in
11977   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11978   *) ac_try_echo=$ac_try;;
11979 esac
11980 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
11981 $as_echo "$ac_try_echo") >&5
11982   (eval "$ac_compile") 2>conftest.er1
11983   ac_status=$?
11984   grep -v '^ *+' conftest.er1 >conftest.err
11985   rm -rf conftest.er1
11986   cat conftest.err >&5
11987   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
11988   (exit $ac_status); } && {
11989          test -z "$ac_c_werror_flag" ||
11990          test ! -s conftest.err
11991        } && test -s conftest.$ac_objext; then
11992   ac_cv_header_X11_extensions_xf86vmode_h=yes
11993 else
11994   $as_echo "$as_me: failed program was:" >&5
11995 sed 's/^/| /' conftest.$ac_ext >&5
11996
11997         ac_cv_header_X11_extensions_xf86vmode_h=no
11998 fi
11999
12000 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12001 fi
12002 { $as_echo "$as_me:$LINENO: result: $ac_cv_header_X11_extensions_xf86vmode_h" >&5
12003 $as_echo "$ac_cv_header_X11_extensions_xf86vmode_h" >&6; }
12004 if test "x$ac_cv_header_X11_extensions_xf86vmode_h" = x""yes; then
12005   have_xf86vmode=yes
12006 fi
12007
12008
12009   CPPFLAGS="$ac_save_CPPFLAGS"
12010
12011   # if that succeeded, then check for the -lXxf86vm
12012   if test "$have_xf86vmode" = yes; then
12013     have_xf86vmode=no
12014
12015   ac_save_CPPFLAGS="$CPPFLAGS"
12016   ac_save_LDFLAGS="$LDFLAGS"
12017 #  ac_save_LIBS="$LIBS"
12018
12019   if test \! -z "$includedir" ; then
12020     CPPFLAGS="$CPPFLAGS -I$includedir"
12021   fi
12022   # note: $X_CFLAGS includes $x_includes
12023   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
12024
12025   if test \! -z "$libdir" ; then
12026     LDFLAGS="$LDFLAGS -L$libdir"
12027   fi
12028   # note: $X_LIBS includes $x_libraries
12029   LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
12030
12031   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
12032   LDFLAGS=`eval eval eval eval eval eval eval eval eval echo $LDFLAGS`
12033   { $as_echo "$as_me:$LINENO: checking for XF86VidModeGetViewPort in -lXxf86vm" >&5
12034 $as_echo_n "checking for XF86VidModeGetViewPort in -lXxf86vm... " >&6; }
12035 if test "${ac_cv_lib_Xxf86vm_XF86VidModeGetViewPort+set}" = set; then
12036   $as_echo_n "(cached) " >&6
12037 else
12038   ac_check_lib_save_LIBS=$LIBS
12039 LIBS="-lXxf86vm -lXext -lX11 $LIBS"
12040 cat >conftest.$ac_ext <<_ACEOF
12041 /* confdefs.h.  */
12042 _ACEOF
12043 cat confdefs.h >>conftest.$ac_ext
12044 cat >>conftest.$ac_ext <<_ACEOF
12045 /* end confdefs.h.  */
12046
12047 /* Override any GCC internal prototype to avoid an error.
12048    Use char because int might match the return type of a GCC
12049    builtin and then its argument prototype would still apply.  */
12050 #ifdef __cplusplus
12051 extern "C"
12052 #endif
12053 char XF86VidModeGetViewPort ();
12054 int
12055 main ()
12056 {
12057 return XF86VidModeGetViewPort ();
12058   ;
12059   return 0;
12060 }
12061 _ACEOF
12062 rm -rf conftest.$ac_objext conftest$ac_exeext
12063 if { (ac_try="$ac_link"
12064 case "(($ac_try" in
12065   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12066   *) ac_try_echo=$ac_try;;
12067 esac
12068 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
12069 $as_echo "$ac_try_echo") >&5
12070   (eval "$ac_link") 2>conftest.er1
12071   ac_status=$?
12072   grep -v '^ *+' conftest.er1 >conftest.err
12073   rm -rf conftest.er1
12074   cat conftest.err >&5
12075   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
12076   (exit $ac_status); } && {
12077          test -z "$ac_c_werror_flag" ||
12078          test ! -s conftest.err
12079        } && test -s conftest$ac_exeext && {
12080          test "$cross_compiling" = yes ||
12081          $as_test_x conftest$ac_exeext
12082        }; then
12083   ac_cv_lib_Xxf86vm_XF86VidModeGetViewPort=yes
12084 else
12085   $as_echo "$as_me: failed program was:" >&5
12086 sed 's/^/| /' conftest.$ac_ext >&5
12087
12088         ac_cv_lib_Xxf86vm_XF86VidModeGetViewPort=no
12089 fi
12090
12091 rm -rf conftest.dSYM
12092 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
12093       conftest$ac_exeext conftest.$ac_ext
12094 LIBS=$ac_check_lib_save_LIBS
12095 fi
12096 { $as_echo "$as_me:$LINENO: result: $ac_cv_lib_Xxf86vm_XF86VidModeGetViewPort" >&5
12097 $as_echo "$ac_cv_lib_Xxf86vm_XF86VidModeGetViewPort" >&6; }
12098 if test "x$ac_cv_lib_Xxf86vm_XF86VidModeGetViewPort" = x""yes; then
12099   have_xf86vmode=yes;
12100                    VIDMODE_LIBS="-lXxf86vm";
12101                    SAVER_LIBS="$SAVER_LIBS $VIDMODE_LIBS"
12102 else
12103   true
12104 fi
12105
12106   CPPFLAGS="$ac_save_CPPFLAGS"
12107   LDFLAGS="$ac_save_LDFLAGS"
12108 #  LIBS="$ac_save_LIBS"
12109
12110   fi
12111
12112   # if that succeeded, then we've really got it.
12113   if test "$have_xf86vmode" = yes; then
12114     cat >>confdefs.h <<\_ACEOF
12115 #define HAVE_XF86VMODE 1
12116 _ACEOF
12117
12118   fi
12119
12120 elif test "$with_xf86vmode" != no; then
12121   echo "error: must be yes or no: --with-xf86vmode-ext=$with_xf86vmode"
12122   exit 1
12123 fi
12124
12125
12126 ###############################################################################
12127 #
12128 #       Check for the XF86VMODE server extension (for gamma fading.)
12129 #
12130 ###############################################################################
12131
12132 have_xf86gamma=no
12133 have_xf86gamma_ramp=no
12134 with_xf86gamma_req=unspecified
12135
12136 # Check whether --with-xf86gamma-ext was given.
12137 if test "${with_xf86gamma_ext+set}" = set; then
12138   withval=$with_xf86gamma_ext; with_xf86gamma="$withval"; with_xf86gamma_req="$withval"
12139 else
12140   with_xf86gamma=yes
12141 fi
12142
12143
12144
12145    case "$with_xf86gamma" in
12146     yes) ;;
12147     no)  ;;
12148
12149     /*)
12150      { $as_echo "$as_me:$LINENO: checking for xf86gamma headers" >&5
12151 $as_echo_n "checking for xf86gamma headers... " >&6; }
12152      d=$with_xf86gamma/include
12153      if test -d $d; then
12154        X_CFLAGS="-I$d $X_CFLAGS"
12155        { $as_echo "$as_me:$LINENO: result: $d" >&5
12156 $as_echo "$d" >&6; }
12157      else
12158        { $as_echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
12159 $as_echo "not found ($d: no such directory)" >&6; }
12160      fi
12161
12162      { $as_echo "$as_me:$LINENO: checking for xf86gamma libs" >&5
12163 $as_echo_n "checking for xf86gamma libs... " >&6; }
12164      d=$with_xf86gamma/lib
12165      if test -d $d; then
12166        X_LIBS="-L$d $X_LIBS"
12167        { $as_echo "$as_me:$LINENO: result: $d" >&5
12168 $as_echo "$d" >&6; }
12169      else
12170        { $as_echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
12171 $as_echo "not found ($d: no such directory)" >&6; }
12172      fi
12173
12174      # replace the directory string with "yes".
12175      with_xf86gamma_req="yes"
12176      with_xf86gamma=$with_xf86gamma_req
12177      ;;
12178
12179     *)
12180      echo ""
12181      echo "error: argument to --with-xf86gamma-ext must be \"yes\", \"no\", or a directory."
12182      echo "       If it is a directory, then \`DIR/include' will be added to"
12183      echo "       the -I list, and \`DIR/lib' will be added to the -L list."
12184      exit 1
12185      ;;
12186    esac
12187
12188
12189 if test "$with_xf86gamma" = yes; then
12190
12191   # first check for xf86vmode.h, if we haven't already
12192   if test "$have_xf86vmode" = yes; then
12193     have_xf86gamma=yes
12194   else
12195
12196   ac_save_CPPFLAGS="$CPPFLAGS"
12197   if test \! -z "$includedir" ; then
12198     CPPFLAGS="$CPPFLAGS -I$includedir"
12199   fi
12200   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
12201   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
12202   { $as_echo "$as_me:$LINENO: checking for X11/extensions/xf86vmode.h" >&5
12203 $as_echo_n "checking for X11/extensions/xf86vmode.h... " >&6; }
12204 if test "${ac_cv_header_X11_extensions_xf86vmode_h+set}" = set; then
12205   $as_echo_n "(cached) " >&6
12206 else
12207   cat >conftest.$ac_ext <<_ACEOF
12208 /* confdefs.h.  */
12209 _ACEOF
12210 cat confdefs.h >>conftest.$ac_ext
12211 cat >>conftest.$ac_ext <<_ACEOF
12212 /* end confdefs.h.  */
12213 #include <X11/Xlib.h>
12214
12215 #include <X11/extensions/xf86vmode.h>
12216 _ACEOF
12217 rm -rf conftest.$ac_objext
12218 if { (ac_try="$ac_compile"
12219 case "(($ac_try" in
12220   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12221   *) ac_try_echo=$ac_try;;
12222 esac
12223 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
12224 $as_echo "$ac_try_echo") >&5
12225   (eval "$ac_compile") 2>conftest.er1
12226   ac_status=$?
12227   grep -v '^ *+' conftest.er1 >conftest.err
12228   rm -rf conftest.er1
12229   cat conftest.err >&5
12230   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
12231   (exit $ac_status); } && {
12232          test -z "$ac_c_werror_flag" ||
12233          test ! -s conftest.err
12234        } && test -s conftest.$ac_objext; then
12235   ac_cv_header_X11_extensions_xf86vmode_h=yes
12236 else
12237   $as_echo "$as_me: failed program was:" >&5
12238 sed 's/^/| /' conftest.$ac_ext >&5
12239
12240         ac_cv_header_X11_extensions_xf86vmode_h=no
12241 fi
12242
12243 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12244 fi
12245 { $as_echo "$as_me:$LINENO: result: $ac_cv_header_X11_extensions_xf86vmode_h" >&5
12246 $as_echo "$ac_cv_header_X11_extensions_xf86vmode_h" >&6; }
12247 if test "x$ac_cv_header_X11_extensions_xf86vmode_h" = x""yes; then
12248   have_xf86gamma=yes
12249 fi
12250
12251
12252   CPPFLAGS="$ac_save_CPPFLAGS"
12253   fi
12254
12255   # if that succeeded, then check for the -lXxf86vm
12256   if test "$have_xf86gamma" = yes; then
12257     have_xf86gamma=no
12258
12259   ac_save_CPPFLAGS="$CPPFLAGS"
12260   ac_save_LDFLAGS="$LDFLAGS"
12261 #  ac_save_LIBS="$LIBS"
12262
12263   if test \! -z "$includedir" ; then
12264     CPPFLAGS="$CPPFLAGS -I$includedir"
12265   fi
12266   # note: $X_CFLAGS includes $x_includes
12267   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
12268
12269   if test \! -z "$libdir" ; then
12270     LDFLAGS="$LDFLAGS -L$libdir"
12271   fi
12272   # note: $X_LIBS includes $x_libraries
12273   LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
12274
12275   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
12276   LDFLAGS=`eval eval eval eval eval eval eval eval eval echo $LDFLAGS`
12277   { $as_echo "$as_me:$LINENO: checking for XF86VidModeSetGamma in -lXxf86vm" >&5
12278 $as_echo_n "checking for XF86VidModeSetGamma in -lXxf86vm... " >&6; }
12279 if test "${ac_cv_lib_Xxf86vm_XF86VidModeSetGamma+set}" = set; then
12280   $as_echo_n "(cached) " >&6
12281 else
12282   ac_check_lib_save_LIBS=$LIBS
12283 LIBS="-lXxf86vm -lXext -lX11 $LIBS"
12284 cat >conftest.$ac_ext <<_ACEOF
12285 /* confdefs.h.  */
12286 _ACEOF
12287 cat confdefs.h >>conftest.$ac_ext
12288 cat >>conftest.$ac_ext <<_ACEOF
12289 /* end confdefs.h.  */
12290
12291 /* Override any GCC internal prototype to avoid an error.
12292    Use char because int might match the return type of a GCC
12293    builtin and then its argument prototype would still apply.  */
12294 #ifdef __cplusplus
12295 extern "C"
12296 #endif
12297 char XF86VidModeSetGamma ();
12298 int
12299 main ()
12300 {
12301 return XF86VidModeSetGamma ();
12302   ;
12303   return 0;
12304 }
12305 _ACEOF
12306 rm -rf conftest.$ac_objext conftest$ac_exeext
12307 if { (ac_try="$ac_link"
12308 case "(($ac_try" in
12309   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12310   *) ac_try_echo=$ac_try;;
12311 esac
12312 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
12313 $as_echo "$ac_try_echo") >&5
12314   (eval "$ac_link") 2>conftest.er1
12315   ac_status=$?
12316   grep -v '^ *+' conftest.er1 >conftest.err
12317   rm -rf conftest.er1
12318   cat conftest.err >&5
12319   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
12320   (exit $ac_status); } && {
12321          test -z "$ac_c_werror_flag" ||
12322          test ! -s conftest.err
12323        } && test -s conftest$ac_exeext && {
12324          test "$cross_compiling" = yes ||
12325          $as_test_x conftest$ac_exeext
12326        }; then
12327   ac_cv_lib_Xxf86vm_XF86VidModeSetGamma=yes
12328 else
12329   $as_echo "$as_me: failed program was:" >&5
12330 sed 's/^/| /' conftest.$ac_ext >&5
12331
12332         ac_cv_lib_Xxf86vm_XF86VidModeSetGamma=no
12333 fi
12334
12335 rm -rf conftest.dSYM
12336 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
12337       conftest$ac_exeext conftest.$ac_ext
12338 LIBS=$ac_check_lib_save_LIBS
12339 fi
12340 { $as_echo "$as_me:$LINENO: result: $ac_cv_lib_Xxf86vm_XF86VidModeSetGamma" >&5
12341 $as_echo "$ac_cv_lib_Xxf86vm_XF86VidModeSetGamma" >&6; }
12342 if test "x$ac_cv_lib_Xxf86vm_XF86VidModeSetGamma" = x""yes; then
12343   have_xf86gamma=yes
12344 else
12345   true
12346 fi
12347
12348   CPPFLAGS="$ac_save_CPPFLAGS"
12349   LDFLAGS="$ac_save_LDFLAGS"
12350 #  LIBS="$ac_save_LIBS"
12351
12352   fi
12353
12354   # check for the Ramp versions of the functions too.
12355   if test "$have_xf86gamma" = yes; then
12356     have_xf86gamma_ramp=no
12357
12358   ac_save_CPPFLAGS="$CPPFLAGS"
12359   ac_save_LDFLAGS="$LDFLAGS"
12360 #  ac_save_LIBS="$LIBS"
12361
12362   if test \! -z "$includedir" ; then
12363     CPPFLAGS="$CPPFLAGS -I$includedir"
12364   fi
12365   # note: $X_CFLAGS includes $x_includes
12366   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
12367
12368   if test \! -z "$libdir" ; then
12369     LDFLAGS="$LDFLAGS -L$libdir"
12370   fi
12371   # note: $X_LIBS includes $x_libraries
12372   LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
12373
12374   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
12375   LDFLAGS=`eval eval eval eval eval eval eval eval eval echo $LDFLAGS`
12376   { $as_echo "$as_me:$LINENO: checking for XF86VidModeSetGammaRamp in -lXxf86vm" >&5
12377 $as_echo_n "checking for XF86VidModeSetGammaRamp in -lXxf86vm... " >&6; }
12378 if test "${ac_cv_lib_Xxf86vm_XF86VidModeSetGammaRamp+set}" = set; then
12379   $as_echo_n "(cached) " >&6
12380 else
12381   ac_check_lib_save_LIBS=$LIBS
12382 LIBS="-lXxf86vm -lXext -lX11 $LIBS"
12383 cat >conftest.$ac_ext <<_ACEOF
12384 /* confdefs.h.  */
12385 _ACEOF
12386 cat confdefs.h >>conftest.$ac_ext
12387 cat >>conftest.$ac_ext <<_ACEOF
12388 /* end confdefs.h.  */
12389
12390 /* Override any GCC internal prototype to avoid an error.
12391    Use char because int might match the return type of a GCC
12392    builtin and then its argument prototype would still apply.  */
12393 #ifdef __cplusplus
12394 extern "C"
12395 #endif
12396 char XF86VidModeSetGammaRamp ();
12397 int
12398 main ()
12399 {
12400 return XF86VidModeSetGammaRamp ();
12401   ;
12402   return 0;
12403 }
12404 _ACEOF
12405 rm -rf conftest.$ac_objext conftest$ac_exeext
12406 if { (ac_try="$ac_link"
12407 case "(($ac_try" in
12408   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12409   *) ac_try_echo=$ac_try;;
12410 esac
12411 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
12412 $as_echo "$ac_try_echo") >&5
12413   (eval "$ac_link") 2>conftest.er1
12414   ac_status=$?
12415   grep -v '^ *+' conftest.er1 >conftest.err
12416   rm -rf conftest.er1
12417   cat conftest.err >&5
12418   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
12419   (exit $ac_status); } && {
12420          test -z "$ac_c_werror_flag" ||
12421          test ! -s conftest.err
12422        } && test -s conftest$ac_exeext && {
12423          test "$cross_compiling" = yes ||
12424          $as_test_x conftest$ac_exeext
12425        }; then
12426   ac_cv_lib_Xxf86vm_XF86VidModeSetGammaRamp=yes
12427 else
12428   $as_echo "$as_me: failed program was:" >&5
12429 sed 's/^/| /' conftest.$ac_ext >&5
12430
12431         ac_cv_lib_Xxf86vm_XF86VidModeSetGammaRamp=no
12432 fi
12433
12434 rm -rf conftest.dSYM
12435 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
12436       conftest$ac_exeext conftest.$ac_ext
12437 LIBS=$ac_check_lib_save_LIBS
12438 fi
12439 { $as_echo "$as_me:$LINENO: result: $ac_cv_lib_Xxf86vm_XF86VidModeSetGammaRamp" >&5
12440 $as_echo "$ac_cv_lib_Xxf86vm_XF86VidModeSetGammaRamp" >&6; }
12441 if test "x$ac_cv_lib_Xxf86vm_XF86VidModeSetGammaRamp" = x""yes; then
12442   have_xf86gamma_ramp=yes
12443 else
12444   true
12445 fi
12446
12447   CPPFLAGS="$ac_save_CPPFLAGS"
12448   LDFLAGS="$ac_save_LDFLAGS"
12449 #  LIBS="$ac_save_LIBS"
12450
12451   fi
12452
12453   # if those tests succeeded, then we've really got the functions.
12454   if test "$have_xf86gamma" = yes; then
12455     cat >>confdefs.h <<\_ACEOF
12456 #define HAVE_XF86VMODE_GAMMA 1
12457 _ACEOF
12458
12459   fi
12460
12461   if test "$have_xf86gamma_ramp" = yes; then
12462     cat >>confdefs.h <<\_ACEOF
12463 #define HAVE_XF86VMODE_GAMMA_RAMP 1
12464 _ACEOF
12465
12466   fi
12467
12468   # pull in the lib, if we haven't already
12469   if test "$have_xf86gamma" = yes -a "$have_xf86vmode" = no; then
12470     SAVER_LIBS="$SAVER_LIBS -lXxf86vm"
12471   fi
12472
12473 elif test "$with_xf86gamma" != no; then
12474   echo "error: must be yes or no: --with-xf86gamma-ext=$with_xf86vmode"
12475   exit 1
12476 fi
12477
12478
12479 ###############################################################################
12480 #
12481 #       Check for the RANDR (Resize and Rotate) server extension.
12482 #
12483 #       We need this to detect when the resolution of the desktop
12484 #       has changed out from under us (this is a newer, different
12485 #       mechanism than the XF86VMODE virtual viewports.)
12486 #
12487 ###############################################################################
12488
12489 have_randr=no
12490 with_randr_req=unspecified
12491
12492 # Check whether --with-randr-ext was given.
12493 if test "${with_randr_ext+set}" = set; then
12494   withval=$with_randr_ext; with_randr="$withval"; with_randr_req="$withval"
12495 else
12496   with_randr=yes
12497 fi
12498
12499
12500
12501    case "$with_randr" in
12502     yes) ;;
12503     no)  ;;
12504
12505     /*)
12506      { $as_echo "$as_me:$LINENO: checking for RANDR headers" >&5
12507 $as_echo_n "checking for RANDR headers... " >&6; }
12508      d=$with_randr/include
12509      if test -d $d; then
12510        X_CFLAGS="-I$d $X_CFLAGS"
12511        { $as_echo "$as_me:$LINENO: result: $d" >&5
12512 $as_echo "$d" >&6; }
12513      else
12514        { $as_echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
12515 $as_echo "not found ($d: no such directory)" >&6; }
12516      fi
12517
12518      { $as_echo "$as_me:$LINENO: checking for RANDR libs" >&5
12519 $as_echo_n "checking for RANDR libs... " >&6; }
12520      d=$with_randr/lib
12521      if test -d $d; then
12522        X_LIBS="-L$d $X_LIBS"
12523        { $as_echo "$as_me:$LINENO: result: $d" >&5
12524 $as_echo "$d" >&6; }
12525      else
12526        { $as_echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
12527 $as_echo "not found ($d: no such directory)" >&6; }
12528      fi
12529
12530      # replace the directory string with "yes".
12531      with_randr_req="yes"
12532      with_randr=$with_randr_req
12533      ;;
12534
12535     *)
12536      echo ""
12537      echo "error: argument to --with-randr-ext must be \"yes\", \"no\", or a directory."
12538      echo "       If it is a directory, then \`DIR/include' will be added to"
12539      echo "       the -I list, and \`DIR/lib' will be added to the -L list."
12540      exit 1
12541      ;;
12542    esac
12543
12544
12545 if test "$with_randr" = yes; then
12546
12547   # first check for Xrandr.h
12548
12549   ac_save_CPPFLAGS="$CPPFLAGS"
12550   if test \! -z "$includedir" ; then
12551     CPPFLAGS="$CPPFLAGS -I$includedir"
12552   fi
12553   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
12554   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
12555   { $as_echo "$as_me:$LINENO: checking for X11/extensions/Xrandr.h" >&5
12556 $as_echo_n "checking for X11/extensions/Xrandr.h... " >&6; }
12557 if test "${ac_cv_header_X11_extensions_Xrandr_h+set}" = set; then
12558   $as_echo_n "(cached) " >&6
12559 else
12560   cat >conftest.$ac_ext <<_ACEOF
12561 /* confdefs.h.  */
12562 _ACEOF
12563 cat confdefs.h >>conftest.$ac_ext
12564 cat >>conftest.$ac_ext <<_ACEOF
12565 /* end confdefs.h.  */
12566 #include <X11/Xlib.h>
12567
12568 #include <X11/extensions/Xrandr.h>
12569 _ACEOF
12570 rm -rf conftest.$ac_objext
12571 if { (ac_try="$ac_compile"
12572 case "(($ac_try" in
12573   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12574   *) ac_try_echo=$ac_try;;
12575 esac
12576 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
12577 $as_echo "$ac_try_echo") >&5
12578   (eval "$ac_compile") 2>conftest.er1
12579   ac_status=$?
12580   grep -v '^ *+' conftest.er1 >conftest.err
12581   rm -rf conftest.er1
12582   cat conftest.err >&5
12583   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
12584   (exit $ac_status); } && {
12585          test -z "$ac_c_werror_flag" ||
12586          test ! -s conftest.err
12587        } && test -s conftest.$ac_objext; then
12588   ac_cv_header_X11_extensions_Xrandr_h=yes
12589 else
12590   $as_echo "$as_me: failed program was:" >&5
12591 sed 's/^/| /' conftest.$ac_ext >&5
12592
12593         ac_cv_header_X11_extensions_Xrandr_h=no
12594 fi
12595
12596 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12597 fi
12598 { $as_echo "$as_me:$LINENO: result: $ac_cv_header_X11_extensions_Xrandr_h" >&5
12599 $as_echo "$ac_cv_header_X11_extensions_Xrandr_h" >&6; }
12600 if test "x$ac_cv_header_X11_extensions_Xrandr_h" = x""yes; then
12601   have_randr=yes
12602 fi
12603
12604
12605   CPPFLAGS="$ac_save_CPPFLAGS"
12606
12607   # if that succeeded, then check for the XRR code in the libraries
12608   if test "$have_randr" = yes; then
12609
12610     # RANDR probably needs -lXrender
12611     xrender_libs=
12612
12613   ac_save_CPPFLAGS="$CPPFLAGS"
12614   ac_save_LDFLAGS="$LDFLAGS"
12615 #  ac_save_LIBS="$LIBS"
12616
12617   if test \! -z "$includedir" ; then
12618     CPPFLAGS="$CPPFLAGS -I$includedir"
12619   fi
12620   # note: $X_CFLAGS includes $x_includes
12621   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
12622
12623   if test \! -z "$libdir" ; then
12624     LDFLAGS="$LDFLAGS -L$libdir"
12625   fi
12626   # note: $X_LIBS includes $x_libraries
12627   LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
12628
12629   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
12630   LDFLAGS=`eval eval eval eval eval eval eval eval eval echo $LDFLAGS`
12631   { $as_echo "$as_me:$LINENO: checking for XRenderSetSubpixelOrder in -lXrender" >&5
12632 $as_echo_n "checking for XRenderSetSubpixelOrder in -lXrender... " >&6; }
12633 if test "${ac_cv_lib_Xrender_XRenderSetSubpixelOrder+set}" = set; then
12634   $as_echo_n "(cached) " >&6
12635 else
12636   ac_check_lib_save_LIBS=$LIBS
12637 LIBS="-lXrender -lXext -lX11 $LIBS"
12638 cat >conftest.$ac_ext <<_ACEOF
12639 /* confdefs.h.  */
12640 _ACEOF
12641 cat confdefs.h >>conftest.$ac_ext
12642 cat >>conftest.$ac_ext <<_ACEOF
12643 /* end confdefs.h.  */
12644
12645 /* Override any GCC internal prototype to avoid an error.
12646    Use char because int might match the return type of a GCC
12647    builtin and then its argument prototype would still apply.  */
12648 #ifdef __cplusplus
12649 extern "C"
12650 #endif
12651 char XRenderSetSubpixelOrder ();
12652 int
12653 main ()
12654 {
12655 return XRenderSetSubpixelOrder ();
12656   ;
12657   return 0;
12658 }
12659 _ACEOF
12660 rm -rf conftest.$ac_objext conftest$ac_exeext
12661 if { (ac_try="$ac_link"
12662 case "(($ac_try" in
12663   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12664   *) ac_try_echo=$ac_try;;
12665 esac
12666 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
12667 $as_echo "$ac_try_echo") >&5
12668   (eval "$ac_link") 2>conftest.er1
12669   ac_status=$?
12670   grep -v '^ *+' conftest.er1 >conftest.err
12671   rm -rf conftest.er1
12672   cat conftest.err >&5
12673   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
12674   (exit $ac_status); } && {
12675          test -z "$ac_c_werror_flag" ||
12676          test ! -s conftest.err
12677        } && test -s conftest$ac_exeext && {
12678          test "$cross_compiling" = yes ||
12679          $as_test_x conftest$ac_exeext
12680        }; then
12681   ac_cv_lib_Xrender_XRenderSetSubpixelOrder=yes
12682 else
12683   $as_echo "$as_me: failed program was:" >&5
12684 sed 's/^/| /' conftest.$ac_ext >&5
12685
12686         ac_cv_lib_Xrender_XRenderSetSubpixelOrder=no
12687 fi
12688
12689 rm -rf conftest.dSYM
12690 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
12691       conftest$ac_exeext conftest.$ac_ext
12692 LIBS=$ac_check_lib_save_LIBS
12693 fi
12694 { $as_echo "$as_me:$LINENO: result: $ac_cv_lib_Xrender_XRenderSetSubpixelOrder" >&5
12695 $as_echo "$ac_cv_lib_Xrender_XRenderSetSubpixelOrder" >&6; }
12696 if test "x$ac_cv_lib_Xrender_XRenderSetSubpixelOrder" = x""yes; then
12697   xrender_libs="-lXrender"
12698 else
12699   true
12700 fi
12701
12702   CPPFLAGS="$ac_save_CPPFLAGS"
12703   LDFLAGS="$ac_save_LDFLAGS"
12704 #  LIBS="$ac_save_LIBS"
12705
12706
12707     # first look for RANDR in -lXext
12708     have_randr=no
12709
12710   ac_save_CPPFLAGS="$CPPFLAGS"
12711   ac_save_LDFLAGS="$LDFLAGS"
12712 #  ac_save_LIBS="$LIBS"
12713
12714   if test \! -z "$includedir" ; then
12715     CPPFLAGS="$CPPFLAGS -I$includedir"
12716   fi
12717   # note: $X_CFLAGS includes $x_includes
12718   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
12719
12720   if test \! -z "$libdir" ; then
12721     LDFLAGS="$LDFLAGS -L$libdir"
12722   fi
12723   # note: $X_LIBS includes $x_libraries
12724   LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
12725
12726   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
12727   LDFLAGS=`eval eval eval eval eval eval eval eval eval echo $LDFLAGS`
12728   { $as_echo "$as_me:$LINENO: checking for XRRGetScreenInfo in -lXext" >&5
12729 $as_echo_n "checking for XRRGetScreenInfo in -lXext... " >&6; }
12730 if test "${ac_cv_lib_Xext_XRRGetScreenInfo+set}" = set; then
12731   $as_echo_n "(cached) " >&6
12732 else
12733   ac_check_lib_save_LIBS=$LIBS
12734 LIBS="-lXext $xrender_libs -lXext -lX11 $LIBS"
12735 cat >conftest.$ac_ext <<_ACEOF
12736 /* confdefs.h.  */
12737 _ACEOF
12738 cat confdefs.h >>conftest.$ac_ext
12739 cat >>conftest.$ac_ext <<_ACEOF
12740 /* end confdefs.h.  */
12741
12742 /* Override any GCC internal prototype to avoid an error.
12743    Use char because int might match the return type of a GCC
12744    builtin and then its argument prototype would still apply.  */
12745 #ifdef __cplusplus
12746 extern "C"
12747 #endif
12748 char XRRGetScreenInfo ();
12749 int
12750 main ()
12751 {
12752 return XRRGetScreenInfo ();
12753   ;
12754   return 0;
12755 }
12756 _ACEOF
12757 rm -rf conftest.$ac_objext conftest$ac_exeext
12758 if { (ac_try="$ac_link"
12759 case "(($ac_try" in
12760   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12761   *) ac_try_echo=$ac_try;;
12762 esac
12763 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
12764 $as_echo "$ac_try_echo") >&5
12765   (eval "$ac_link") 2>conftest.er1
12766   ac_status=$?
12767   grep -v '^ *+' conftest.er1 >conftest.err
12768   rm -rf conftest.er1
12769   cat conftest.err >&5
12770   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
12771   (exit $ac_status); } && {
12772          test -z "$ac_c_werror_flag" ||
12773          test ! -s conftest.err
12774        } && test -s conftest$ac_exeext && {
12775          test "$cross_compiling" = yes ||
12776          $as_test_x conftest$ac_exeext
12777        }; then
12778   ac_cv_lib_Xext_XRRGetScreenInfo=yes
12779 else
12780   $as_echo "$as_me: failed program was:" >&5
12781 sed 's/^/| /' conftest.$ac_ext >&5
12782
12783         ac_cv_lib_Xext_XRRGetScreenInfo=no
12784 fi
12785
12786 rm -rf conftest.dSYM
12787 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
12788       conftest$ac_exeext conftest.$ac_ext
12789 LIBS=$ac_check_lib_save_LIBS
12790 fi
12791 { $as_echo "$as_me:$LINENO: result: $ac_cv_lib_Xext_XRRGetScreenInfo" >&5
12792 $as_echo "$ac_cv_lib_Xext_XRRGetScreenInfo" >&6; }
12793 if test "x$ac_cv_lib_Xext_XRRGetScreenInfo" = x""yes; then
12794   have_randr=yes; SAVER_LIBS="$SAVER_LIBS $xrender_libs"
12795 else
12796   true
12797 fi
12798
12799   CPPFLAGS="$ac_save_CPPFLAGS"
12800   LDFLAGS="$ac_save_LDFLAGS"
12801 #  LIBS="$ac_save_LIBS"
12802
12803
12804     # if that failed, look in -lXrandr
12805     if test "$have_randr" = no; then
12806
12807   ac_save_CPPFLAGS="$CPPFLAGS"
12808   ac_save_LDFLAGS="$LDFLAGS"
12809 #  ac_save_LIBS="$LIBS"
12810
12811   if test \! -z "$includedir" ; then
12812     CPPFLAGS="$CPPFLAGS -I$includedir"
12813   fi
12814   # note: $X_CFLAGS includes $x_includes
12815   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
12816
12817   if test \! -z "$libdir" ; then
12818     LDFLAGS="$LDFLAGS -L$libdir"
12819   fi
12820   # note: $X_LIBS includes $x_libraries
12821   LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
12822
12823   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
12824   LDFLAGS=`eval eval eval eval eval eval eval eval eval echo $LDFLAGS`
12825   { $as_echo "$as_me:$LINENO: checking for XRRGetScreenInfo in -lXrandr" >&5
12826 $as_echo_n "checking for XRRGetScreenInfo in -lXrandr... " >&6; }
12827 if test "${ac_cv_lib_Xrandr_XRRGetScreenInfo+set}" = set; then
12828   $as_echo_n "(cached) " >&6
12829 else
12830   ac_check_lib_save_LIBS=$LIBS
12831 LIBS="-lXrandr $xrender_libs -lXext -lX11 $LIBS"
12832 cat >conftest.$ac_ext <<_ACEOF
12833 /* confdefs.h.  */
12834 _ACEOF
12835 cat confdefs.h >>conftest.$ac_ext
12836 cat >>conftest.$ac_ext <<_ACEOF
12837 /* end confdefs.h.  */
12838
12839 /* Override any GCC internal prototype to avoid an error.
12840    Use char because int might match the return type of a GCC
12841    builtin and then its argument prototype would still apply.  */
12842 #ifdef __cplusplus
12843 extern "C"
12844 #endif
12845 char XRRGetScreenInfo ();
12846 int
12847 main ()
12848 {
12849 return XRRGetScreenInfo ();
12850   ;
12851   return 0;
12852 }
12853 _ACEOF
12854 rm -rf conftest.$ac_objext conftest$ac_exeext
12855 if { (ac_try="$ac_link"
12856 case "(($ac_try" in
12857   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12858   *) ac_try_echo=$ac_try;;
12859 esac
12860 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
12861 $as_echo "$ac_try_echo") >&5
12862   (eval "$ac_link") 2>conftest.er1
12863   ac_status=$?
12864   grep -v '^ *+' conftest.er1 >conftest.err
12865   rm -rf conftest.er1
12866   cat conftest.err >&5
12867   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
12868   (exit $ac_status); } && {
12869          test -z "$ac_c_werror_flag" ||
12870          test ! -s conftest.err
12871        } && test -s conftest$ac_exeext && {
12872          test "$cross_compiling" = yes ||
12873          $as_test_x conftest$ac_exeext
12874        }; then
12875   ac_cv_lib_Xrandr_XRRGetScreenInfo=yes
12876 else
12877   $as_echo "$as_me: failed program was:" >&5
12878 sed 's/^/| /' conftest.$ac_ext >&5
12879
12880         ac_cv_lib_Xrandr_XRRGetScreenInfo=no
12881 fi
12882
12883 rm -rf conftest.dSYM
12884 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
12885       conftest$ac_exeext conftest.$ac_ext
12886 LIBS=$ac_check_lib_save_LIBS
12887 fi
12888 { $as_echo "$as_me:$LINENO: result: $ac_cv_lib_Xrandr_XRRGetScreenInfo" >&5
12889 $as_echo "$ac_cv_lib_Xrandr_XRRGetScreenInfo" >&6; }
12890 if test "x$ac_cv_lib_Xrandr_XRRGetScreenInfo" = x""yes; then
12891   have_randr=yes; SAVER_LIBS="$SAVER_LIBS -lXrandr $xrender_libs"
12892 else
12893   true
12894 fi
12895
12896   CPPFLAGS="$ac_save_CPPFLAGS"
12897   LDFLAGS="$ac_save_LDFLAGS"
12898 #  LIBS="$ac_save_LIBS"
12899
12900     fi
12901   fi
12902
12903   # if that succeeded, then we've really got it.
12904   if test "$have_randr" = yes; then
12905     cat >>confdefs.h <<\_ACEOF
12906 #define HAVE_RANDR 1
12907 _ACEOF
12908
12909
12910     # Now check for version 1.2 in the same libs.
12911     # Try to compile, since on MacOS 10.5.7, headers are older than libs!
12912     { $as_echo "$as_me:$LINENO: checking for XRRGetScreenResources" >&5
12913 $as_echo_n "checking for XRRGetScreenResources... " >&6; }
12914 if test "${ac_cv_randr_12+set}" = set; then
12915   $as_echo_n "(cached) " >&6
12916 else
12917   ac_cv_randr_12=no
12918
12919   ac_save_CPPFLAGS="$CPPFLAGS"
12920   if test \! -z "$includedir" ; then
12921     CPPFLAGS="$CPPFLAGS -I$includedir"
12922   fi
12923   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
12924   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
12925   cat >conftest.$ac_ext <<_ACEOF
12926 /* confdefs.h.  */
12927 _ACEOF
12928 cat confdefs.h >>conftest.$ac_ext
12929 cat >>conftest.$ac_ext <<_ACEOF
12930 /* end confdefs.h.  */
12931 #include <stdlib.h>
12932                          #include <X11/Xlib.h>
12933                          #include <X11/extensions/Xrandr.h>
12934 int
12935 main ()
12936 {
12937 XRRScreenResources *res =
12938                            XRRGetScreenResources (0, 0);
12939   ;
12940   return 0;
12941 }
12942 _ACEOF
12943 rm -rf conftest.$ac_objext
12944 if { (ac_try="$ac_compile"
12945 case "(($ac_try" in
12946   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12947   *) ac_try_echo=$ac_try;;
12948 esac
12949 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
12950 $as_echo "$ac_try_echo") >&5
12951   (eval "$ac_compile") 2>conftest.er1
12952   ac_status=$?
12953   grep -v '^ *+' conftest.er1 >conftest.err
12954   rm -rf conftest.er1
12955   cat conftest.err >&5
12956   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
12957   (exit $ac_status); } && {
12958          test -z "$ac_c_werror_flag" ||
12959          test ! -s conftest.err
12960        } && test -s conftest.$ac_objext; then
12961   ac_cv_randr_12=yes
12962 else
12963   $as_echo "$as_me: failed program was:" >&5
12964 sed 's/^/| /' conftest.$ac_ext >&5
12965
12966         ac_cv_randr_12=no
12967 fi
12968
12969 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12970   CPPFLAGS="$ac_save_CPPFLAGS"
12971 fi
12972 { $as_echo "$as_me:$LINENO: result: $ac_cv_randr_12" >&5
12973 $as_echo "$ac_cv_randr_12" >&6; }
12974     if test "$ac_cv_randr_12" = yes ; then
12975       cat >>confdefs.h <<\_ACEOF
12976 #define HAVE_RANDR_12 1
12977 _ACEOF
12978
12979     fi
12980 #   AC_CHECK_X_LIB(c, XRRGetOutputInfo, [AC_DEFINE(HAVE_RANDR_12)],
12981 #                  [true], $SAVER_LIBS)
12982   fi
12983
12984
12985 elif test "$with_randr" != no; then
12986   echo "error: must be yes or no: --with-randr-ext=$with_randr"
12987   exit 1
12988 fi
12989
12990
12991 ###############################################################################
12992 #
12993 #       Check for XF86MiscSetGrabKeysState (but only bother if we are already
12994 #       using other XF86 stuff.)
12995 #
12996 ###############################################################################
12997
12998 have_xf86miscsetgrabkeysstate=no
12999 if test "$have_xf86gamma" = yes -o "$have_xf86vmode" = yes; then
13000
13001   ac_save_CPPFLAGS="$CPPFLAGS"
13002   ac_save_LDFLAGS="$LDFLAGS"
13003 #  ac_save_LIBS="$LIBS"
13004
13005   if test \! -z "$includedir" ; then
13006     CPPFLAGS="$CPPFLAGS -I$includedir"
13007   fi
13008   # note: $X_CFLAGS includes $x_includes
13009   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
13010
13011   if test \! -z "$libdir" ; then
13012     LDFLAGS="$LDFLAGS -L$libdir"
13013   fi
13014   # note: $X_LIBS includes $x_libraries
13015   LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
13016
13017   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
13018   LDFLAGS=`eval eval eval eval eval eval eval eval eval echo $LDFLAGS`
13019   { $as_echo "$as_me:$LINENO: checking for XF86MiscSetGrabKeysState in -lXxf86misc" >&5
13020 $as_echo_n "checking for XF86MiscSetGrabKeysState in -lXxf86misc... " >&6; }
13021 if test "${ac_cv_lib_Xxf86misc_XF86MiscSetGrabKeysState+set}" = set; then
13022   $as_echo_n "(cached) " >&6
13023 else
13024   ac_check_lib_save_LIBS=$LIBS
13025 LIBS="-lXxf86misc -lXext -lX11 $LIBS"
13026 cat >conftest.$ac_ext <<_ACEOF
13027 /* confdefs.h.  */
13028 _ACEOF
13029 cat confdefs.h >>conftest.$ac_ext
13030 cat >>conftest.$ac_ext <<_ACEOF
13031 /* end confdefs.h.  */
13032
13033 /* Override any GCC internal prototype to avoid an error.
13034    Use char because int might match the return type of a GCC
13035    builtin and then its argument prototype would still apply.  */
13036 #ifdef __cplusplus
13037 extern "C"
13038 #endif
13039 char XF86MiscSetGrabKeysState ();
13040 int
13041 main ()
13042 {
13043 return XF86MiscSetGrabKeysState ();
13044   ;
13045   return 0;
13046 }
13047 _ACEOF
13048 rm -rf conftest.$ac_objext conftest$ac_exeext
13049 if { (ac_try="$ac_link"
13050 case "(($ac_try" in
13051   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13052   *) ac_try_echo=$ac_try;;
13053 esac
13054 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
13055 $as_echo "$ac_try_echo") >&5
13056   (eval "$ac_link") 2>conftest.er1
13057   ac_status=$?
13058   grep -v '^ *+' conftest.er1 >conftest.err
13059   rm -rf conftest.er1
13060   cat conftest.err >&5
13061   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
13062   (exit $ac_status); } && {
13063          test -z "$ac_c_werror_flag" ||
13064          test ! -s conftest.err
13065        } && test -s conftest$ac_exeext && {
13066          test "$cross_compiling" = yes ||
13067          $as_test_x conftest$ac_exeext
13068        }; then
13069   ac_cv_lib_Xxf86misc_XF86MiscSetGrabKeysState=yes
13070 else
13071   $as_echo "$as_me: failed program was:" >&5
13072 sed 's/^/| /' conftest.$ac_ext >&5
13073
13074         ac_cv_lib_Xxf86misc_XF86MiscSetGrabKeysState=no
13075 fi
13076
13077 rm -rf conftest.dSYM
13078 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
13079       conftest$ac_exeext conftest.$ac_ext
13080 LIBS=$ac_check_lib_save_LIBS
13081 fi
13082 { $as_echo "$as_me:$LINENO: result: $ac_cv_lib_Xxf86misc_XF86MiscSetGrabKeysState" >&5
13083 $as_echo "$ac_cv_lib_Xxf86misc_XF86MiscSetGrabKeysState" >&6; }
13084 if test "x$ac_cv_lib_Xxf86misc_XF86MiscSetGrabKeysState" = x""yes; then
13085   have_xf86miscsetgrabkeysstate=yes
13086 else
13087   true
13088 fi
13089
13090   CPPFLAGS="$ac_save_CPPFLAGS"
13091   LDFLAGS="$ac_save_LDFLAGS"
13092 #  LIBS="$ac_save_LIBS"
13093
13094   if test "$have_xf86miscsetgrabkeysstate" = yes ; then
13095     SAVER_LIBS="$SAVER_LIBS -lXxf86misc"
13096     cat >>confdefs.h <<\_ACEOF
13097 #define HAVE_XF86MISCSETGRABKEYSSTATE 1
13098 _ACEOF
13099
13100   fi
13101 fi
13102
13103
13104 ###############################################################################
13105 #
13106 #       Check for HP XHPDisableReset and XHPEnableReset.
13107 #
13108 ###############################################################################
13109
13110 { $as_echo "$as_me:$LINENO: checking for XHPDisableReset in X11/XHPlib.h" >&5
13111 $as_echo_n "checking for XHPDisableReset in X11/XHPlib.h... " >&6; }
13112
13113   ac_save_CPPFLAGS="$CPPFLAGS"
13114   if test \! -z "$includedir" ; then
13115     CPPFLAGS="$CPPFLAGS -I$includedir"
13116   fi
13117   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
13118   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
13119   cat >conftest.$ac_ext <<_ACEOF
13120 /* confdefs.h.  */
13121 _ACEOF
13122 cat confdefs.h >>conftest.$ac_ext
13123 cat >>conftest.$ac_ext <<_ACEOF
13124 /* end confdefs.h.  */
13125 #include <X11/XHPlib.h>
13126
13127 _ACEOF
13128 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
13129   $EGREP "XHPDisableReset" >/dev/null 2>&1; then
13130   cat >>confdefs.h <<\_ACEOF
13131 #define HAVE_XHPDISABLERESET 1
13132 _ACEOF
13133
13134                    SAVER_LIBS="-lXhp11 $SAVER_LIBS"
13135                    { $as_echo "$as_me:$LINENO: result: yes" >&5
13136 $as_echo "yes" >&6; }
13137 else
13138   { $as_echo "$as_me:$LINENO: result: no" >&5
13139 $as_echo "no" >&6; }
13140 fi
13141 rm -rf conftest*
13142
13143   CPPFLAGS="$ac_save_CPPFLAGS"
13144
13145
13146 ###############################################################################
13147 #
13148 #       Check for /proc/interrupts.
13149 #
13150 ###############################################################################
13151
13152 have_proc_interrupts=no
13153 with_proc_interrupts_req=unspecified
13154
13155 # Check whether --with-proc-interrupts was given.
13156 if test "${with_proc_interrupts+set}" = set; then
13157   withval=$with_proc_interrupts; with_proc_interrupts="$withval"; with_proc_interrupts_req="$withval"
13158 else
13159   with_proc_interrupts=yes
13160 fi
13161
13162
13163 if test "$with_proc_interrupts" = yes; then
13164
13165   # Note that we may be building in an environment (e.g. Debian buildd chroot)
13166   # without a proper /proc filesystem. If /proc/interrupts exists, then we'll
13167   # check that it has the bits we need, but otherwise we'll just go on faith.
13168   #
13169   have_proc_interrupts=yes
13170
13171   if test -f /proc/interrupts; then
13172    { $as_echo "$as_me:$LINENO: checking whether /proc/interrupts contains keyboard data" >&5
13173 $as_echo_n "checking whether /proc/interrupts contains keyboard data... " >&6; }
13174 if test "${ac_cv_have_proc_interrupts+set}" = set; then
13175   $as_echo_n "(cached) " >&6
13176 else
13177   ac_cv_have_proc_interrupts=no
13178      if grep 'keyboard\|i8042' /proc/interrupts >/dev/null 2>&1 ; then
13179        ac_cv_have_proc_interrupts=yes
13180      fi
13181
13182 fi
13183 { $as_echo "$as_me:$LINENO: result: $ac_cv_have_proc_interrupts" >&5
13184 $as_echo "$ac_cv_have_proc_interrupts" >&6; }
13185    have_proc_interrupts=$ac_cv_have_proc_interrupts
13186   fi
13187
13188   if test "$have_proc_interrupts" = yes; then
13189     cat >>confdefs.h <<\_ACEOF
13190 #define HAVE_PROC_INTERRUPTS 1
13191 _ACEOF
13192
13193   fi
13194
13195 elif test "$with_proc_interrupts" != no; then
13196   echo "error: must be yes or no: --with-proc-interrupts=$with_proc_interrupts"
13197   exit 1
13198 fi
13199
13200
13201 ###############################################################################
13202 #
13203 #       The --enable-locking option
13204 #
13205 ###############################################################################
13206
13207 # Check whether --enable-locking was given.
13208 if test "${enable_locking+set}" = set; then
13209   enableval=$enable_locking; enable_locking="$enableval"
13210 else
13211   if test "$ac_macosx" = yes; then
13212     # We can't lock on MacOS X, so default to not compiling in support for it.
13213     # But allow --enable-locking to override that, so I can debug Linux locking
13214     # under MacOS X11.
13215     enable_locking=no
13216    else
13217     enable_locking=yes
13218    fi
13219 fi
13220
13221 if test "$enable_locking" = yes; then
13222   true
13223 elif test "$enable_locking" = no; then
13224   cat >>confdefs.h <<\_ACEOF
13225 #define NO_LOCKING 1
13226 _ACEOF
13227
13228 else
13229   echo "error: must be yes or no: --enable-locking=$enable_locking"
13230   exit 1
13231 fi
13232
13233
13234 ###############################################################################
13235 #
13236 #       Whether to allow root password to unblank.
13237 #
13238 ###############################################################################
13239 # Check whether --enable-root-passwd was given.
13240 if test "${enable_root_passwd+set}" = set; then
13241   enableval=$enable_root_passwd; enable_root_passwd="$enableval"
13242 else
13243   enable_root_passwd=yes
13244 fi
13245
13246 if test "$enable_root_passwd" = yes; then
13247   cat >>confdefs.h <<\_ACEOF
13248 #define ALLOW_ROOT_PASSWD 1
13249 _ACEOF
13250
13251   true
13252 elif test "$enable_root_passwd" != no; then
13253   echo "error: must be yes or no: --enable-root-passwd=$enable_root_passwd"
13254   exit 1
13255 fi
13256
13257 ###############################################################################
13258 #
13259 #       Check for PAM.
13260 #
13261 ###############################################################################
13262
13263 case "$host" in
13264   *-solaris*)
13265    # Solaris systems tend to come with PAM misconfigured.
13266    #  Don't build it by default, even if the headers exist.
13267    with_pam_default=no
13268    ;;
13269   *)
13270    # Default to building PAM support on all other systems, if it exists.
13271    with_pam_default=yes
13272   ;;
13273 esac
13274
13275 have_pam=no
13276 with_pam_req=unspecified
13277
13278
13279 # Check whether --with-pam was given.
13280 if test "${with_pam+set}" = set; then
13281   withval=$with_pam; with_pam="$withval"; with_pam_req="$withval"
13282 else
13283   with_pam=$with_pam_default
13284 fi
13285
13286
13287
13288 # Check whether --with-pam_service_name was given.
13289 if test "${with_pam_service_name+set}" = set; then
13290   withval=$with_pam_service_name; pam_service_name="$withval"
13291 else
13292   pam_service_name="xscreensaver"
13293 fi
13294
13295
13296
13297    case "$with_pam" in
13298     yes) ;;
13299     no)  ;;
13300
13301     /*)
13302      { $as_echo "$as_me:$LINENO: checking for PAM headers" >&5
13303 $as_echo_n "checking for PAM headers... " >&6; }
13304      d=$with_pam/include
13305      if test -d $d; then
13306        X_CFLAGS="-I$d $X_CFLAGS"
13307        { $as_echo "$as_me:$LINENO: result: $d" >&5
13308 $as_echo "$d" >&6; }
13309      else
13310        { $as_echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
13311 $as_echo "not found ($d: no such directory)" >&6; }
13312      fi
13313
13314      { $as_echo "$as_me:$LINENO: checking for PAM libs" >&5
13315 $as_echo_n "checking for PAM libs... " >&6; }
13316      d=$with_pam/lib
13317      if test -d $d; then
13318        X_LIBS="-L$d $X_LIBS"
13319        { $as_echo "$as_me:$LINENO: result: $d" >&5
13320 $as_echo "$d" >&6; }
13321      else
13322        { $as_echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
13323 $as_echo "not found ($d: no such directory)" >&6; }
13324      fi
13325
13326      # replace the directory string with "yes".
13327      with_pam_req="yes"
13328      with_pam=$with_pam_req
13329      ;;
13330
13331     *)
13332      echo ""
13333      echo "error: argument to --with-pam must be \"yes\", \"no\", or a directory."
13334      echo "       If it is a directory, then \`DIR/include' will be added to"
13335      echo "       the -I list, and \`DIR/lib' will be added to the -L list."
13336      exit 1
13337      ;;
13338    esac
13339
13340
13341 if test "$enable_locking" = yes -a "$with_pam" = yes; then
13342   { $as_echo "$as_me:$LINENO: checking for PAM" >&5
13343 $as_echo_n "checking for PAM... " >&6; }
13344 if test "${ac_cv_pam+set}" = set; then
13345   $as_echo_n "(cached) " >&6
13346 else
13347
13348   ac_save_CPPFLAGS="$CPPFLAGS"
13349   if test \! -z "$includedir" ; then
13350     CPPFLAGS="$CPPFLAGS -I$includedir"
13351   fi
13352   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
13353   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
13354   cat >conftest.$ac_ext <<_ACEOF
13355 /* confdefs.h.  */
13356 _ACEOF
13357 cat confdefs.h >>conftest.$ac_ext
13358 cat >>conftest.$ac_ext <<_ACEOF
13359 /* end confdefs.h.  */
13360 #include <security/pam_appl.h>
13361 int
13362 main ()
13363 {
13364
13365   ;
13366   return 0;
13367 }
13368 _ACEOF
13369 rm -rf conftest.$ac_objext
13370 if { (ac_try="$ac_compile"
13371 case "(($ac_try" in
13372   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13373   *) ac_try_echo=$ac_try;;
13374 esac
13375 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
13376 $as_echo "$ac_try_echo") >&5
13377   (eval "$ac_compile") 2>conftest.er1
13378   ac_status=$?
13379   grep -v '^ *+' conftest.er1 >conftest.err
13380   rm -rf conftest.er1
13381   cat conftest.err >&5
13382   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
13383   (exit $ac_status); } && {
13384          test -z "$ac_c_werror_flag" ||
13385          test ! -s conftest.err
13386        } && test -s conftest.$ac_objext; then
13387   ac_cv_pam=yes
13388 else
13389   $as_echo "$as_me: failed program was:" >&5
13390 sed 's/^/| /' conftest.$ac_ext >&5
13391
13392         ac_cv_pam=no
13393 fi
13394
13395 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13396   CPPFLAGS="$ac_save_CPPFLAGS"
13397 fi
13398 { $as_echo "$as_me:$LINENO: result: $ac_cv_pam" >&5
13399 $as_echo "$ac_cv_pam" >&6; }
13400   if test "$ac_cv_pam" = yes ; then
13401     have_pam=yes
13402     cat >>confdefs.h <<\_ACEOF
13403 #define HAVE_PAM 1
13404 _ACEOF
13405
13406     cat >>confdefs.h <<_ACEOF
13407 #define PAM_SERVICE_NAME "$pam_service_name"
13408 _ACEOF
13409
13410
13411     PASSWD_LIBS="${PASSWD_LIBS} -lpam"
13412
13413     # libpam typically requires dlopen and dlsym.  On FreeBSD,
13414     # those are in libc.  On Linux and Solaris, they're in libdl.
13415     { $as_echo "$as_me:$LINENO: checking for dlopen in -ldl" >&5
13416 $as_echo_n "checking for dlopen in -ldl... " >&6; }
13417 if test "${ac_cv_lib_dl_dlopen+set}" = set; then
13418   $as_echo_n "(cached) " >&6
13419 else
13420   ac_check_lib_save_LIBS=$LIBS
13421 LIBS="-ldl  $LIBS"
13422 cat >conftest.$ac_ext <<_ACEOF
13423 /* confdefs.h.  */
13424 _ACEOF
13425 cat confdefs.h >>conftest.$ac_ext
13426 cat >>conftest.$ac_ext <<_ACEOF
13427 /* end confdefs.h.  */
13428
13429 /* Override any GCC internal prototype to avoid an error.
13430    Use char because int might match the return type of a GCC
13431    builtin and then its argument prototype would still apply.  */
13432 #ifdef __cplusplus
13433 extern "C"
13434 #endif
13435 char dlopen ();
13436 int
13437 main ()
13438 {
13439 return dlopen ();
13440   ;
13441   return 0;
13442 }
13443 _ACEOF
13444 rm -rf conftest.$ac_objext conftest$ac_exeext
13445 if { (ac_try="$ac_link"
13446 case "(($ac_try" in
13447   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13448   *) ac_try_echo=$ac_try;;
13449 esac
13450 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
13451 $as_echo "$ac_try_echo") >&5
13452   (eval "$ac_link") 2>conftest.er1
13453   ac_status=$?
13454   grep -v '^ *+' conftest.er1 >conftest.err
13455   rm -rf conftest.er1
13456   cat conftest.err >&5
13457   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
13458   (exit $ac_status); } && {
13459          test -z "$ac_c_werror_flag" ||
13460          test ! -s conftest.err
13461        } && test -s conftest$ac_exeext && {
13462          test "$cross_compiling" = yes ||
13463          $as_test_x conftest$ac_exeext
13464        }; then
13465   ac_cv_lib_dl_dlopen=yes
13466 else
13467   $as_echo "$as_me: failed program was:" >&5
13468 sed 's/^/| /' conftest.$ac_ext >&5
13469
13470         ac_cv_lib_dl_dlopen=no
13471 fi
13472
13473 rm -rf conftest.dSYM
13474 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
13475       conftest$ac_exeext conftest.$ac_ext
13476 LIBS=$ac_check_lib_save_LIBS
13477 fi
13478 { $as_echo "$as_me:$LINENO: result: $ac_cv_lib_dl_dlopen" >&5
13479 $as_echo "$ac_cv_lib_dl_dlopen" >&6; }
13480 if test "x$ac_cv_lib_dl_dlopen" = x""yes; then
13481   PASSWD_LIBS="${PASSWD_LIBS} -ldl"
13482 fi
13483
13484
13485     # On Linux, sigtimedwait() is in libc; on Solaris, it's in librt.
13486     have_timedwait=no
13487     { $as_echo "$as_me:$LINENO: checking for sigtimedwait in -lc" >&5
13488 $as_echo_n "checking for sigtimedwait in -lc... " >&6; }
13489 if test "${ac_cv_lib_c_sigtimedwait+set}" = set; then
13490   $as_echo_n "(cached) " >&6
13491 else
13492   ac_check_lib_save_LIBS=$LIBS
13493 LIBS="-lc  $LIBS"
13494 cat >conftest.$ac_ext <<_ACEOF
13495 /* confdefs.h.  */
13496 _ACEOF
13497 cat confdefs.h >>conftest.$ac_ext
13498 cat >>conftest.$ac_ext <<_ACEOF
13499 /* end confdefs.h.  */
13500
13501 /* Override any GCC internal prototype to avoid an error.
13502    Use char because int might match the return type of a GCC
13503    builtin and then its argument prototype would still apply.  */
13504 #ifdef __cplusplus
13505 extern "C"
13506 #endif
13507 char sigtimedwait ();
13508 int
13509 main ()
13510 {
13511 return sigtimedwait ();
13512   ;
13513   return 0;
13514 }
13515 _ACEOF
13516 rm -rf conftest.$ac_objext conftest$ac_exeext
13517 if { (ac_try="$ac_link"
13518 case "(($ac_try" in
13519   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13520   *) ac_try_echo=$ac_try;;
13521 esac
13522 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
13523 $as_echo "$ac_try_echo") >&5
13524   (eval "$ac_link") 2>conftest.er1
13525   ac_status=$?
13526   grep -v '^ *+' conftest.er1 >conftest.err
13527   rm -rf conftest.er1
13528   cat conftest.err >&5
13529   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
13530   (exit $ac_status); } && {
13531          test -z "$ac_c_werror_flag" ||
13532          test ! -s conftest.err
13533        } && test -s conftest$ac_exeext && {
13534          test "$cross_compiling" = yes ||
13535          $as_test_x conftest$ac_exeext
13536        }; then
13537   ac_cv_lib_c_sigtimedwait=yes
13538 else
13539   $as_echo "$as_me: failed program was:" >&5
13540 sed 's/^/| /' conftest.$ac_ext >&5
13541
13542         ac_cv_lib_c_sigtimedwait=no
13543 fi
13544
13545 rm -rf conftest.dSYM
13546 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
13547       conftest$ac_exeext conftest.$ac_ext
13548 LIBS=$ac_check_lib_save_LIBS
13549 fi
13550 { $as_echo "$as_me:$LINENO: result: $ac_cv_lib_c_sigtimedwait" >&5
13551 $as_echo "$ac_cv_lib_c_sigtimedwait" >&6; }
13552 if test "x$ac_cv_lib_c_sigtimedwait" = x""yes; then
13553   have_timedwait=yes
13554                   cat >>confdefs.h <<\_ACEOF
13555 #define HAVE_SIGTIMEDWAIT 1
13556 _ACEOF
13557
13558 fi
13559
13560     if test "$have_timedwait" = no ; then
13561       { $as_echo "$as_me:$LINENO: checking for sigtimedwait in -lrt" >&5
13562 $as_echo_n "checking for sigtimedwait in -lrt... " >&6; }
13563 if test "${ac_cv_lib_rt_sigtimedwait+set}" = set; then
13564   $as_echo_n "(cached) " >&6
13565 else
13566   ac_check_lib_save_LIBS=$LIBS
13567 LIBS="-lrt  $LIBS"
13568 cat >conftest.$ac_ext <<_ACEOF
13569 /* confdefs.h.  */
13570 _ACEOF
13571 cat confdefs.h >>conftest.$ac_ext
13572 cat >>conftest.$ac_ext <<_ACEOF
13573 /* end confdefs.h.  */
13574
13575 /* Override any GCC internal prototype to avoid an error.
13576    Use char because int might match the return type of a GCC
13577    builtin and then its argument prototype would still apply.  */
13578 #ifdef __cplusplus
13579 extern "C"
13580 #endif
13581 char sigtimedwait ();
13582 int
13583 main ()
13584 {
13585 return sigtimedwait ();
13586   ;
13587   return 0;
13588 }
13589 _ACEOF
13590 rm -rf conftest.$ac_objext conftest$ac_exeext
13591 if { (ac_try="$ac_link"
13592 case "(($ac_try" in
13593   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13594   *) ac_try_echo=$ac_try;;
13595 esac
13596 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
13597 $as_echo "$ac_try_echo") >&5
13598   (eval "$ac_link") 2>conftest.er1
13599   ac_status=$?
13600   grep -v '^ *+' conftest.er1 >conftest.err
13601   rm -rf conftest.er1
13602   cat conftest.err >&5
13603   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
13604   (exit $ac_status); } && {
13605          test -z "$ac_c_werror_flag" ||
13606          test ! -s conftest.err
13607        } && test -s conftest$ac_exeext && {
13608          test "$cross_compiling" = yes ||
13609          $as_test_x conftest$ac_exeext
13610        }; then
13611   ac_cv_lib_rt_sigtimedwait=yes
13612 else
13613   $as_echo "$as_me: failed program was:" >&5
13614 sed 's/^/| /' conftest.$ac_ext >&5
13615
13616         ac_cv_lib_rt_sigtimedwait=no
13617 fi
13618
13619 rm -rf conftest.dSYM
13620 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
13621       conftest$ac_exeext conftest.$ac_ext
13622 LIBS=$ac_check_lib_save_LIBS
13623 fi
13624 { $as_echo "$as_me:$LINENO: result: $ac_cv_lib_rt_sigtimedwait" >&5
13625 $as_echo "$ac_cv_lib_rt_sigtimedwait" >&6; }
13626 if test "x$ac_cv_lib_rt_sigtimedwait" = x""yes; then
13627   have_timedwait=yes
13628                                       cat >>confdefs.h <<\_ACEOF
13629 #define HAVE_SIGTIMEDWAIT 1
13630 _ACEOF
13631
13632                                       PASSWD_LIBS="${PASSWD_LIBS} -lrt"
13633 fi
13634
13635     fi
13636
13637     { $as_echo "$as_me:$LINENO: checking how to call pam_strerror" >&5
13638 $as_echo_n "checking how to call pam_strerror... " >&6; }
13639     if test "${ac_cv_pam_strerror_args+set}" = set; then
13640   $as_echo_n "(cached) " >&6
13641 else
13642
13643   ac_save_CPPFLAGS="$CPPFLAGS"
13644   if test \! -z "$includedir" ; then
13645     CPPFLAGS="$CPPFLAGS -I$includedir"
13646   fi
13647   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
13648   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
13649   cat >conftest.$ac_ext <<_ACEOF
13650 /* confdefs.h.  */
13651 _ACEOF
13652 cat confdefs.h >>conftest.$ac_ext
13653 cat >>conftest.$ac_ext <<_ACEOF
13654 /* end confdefs.h.  */
13655 #include <stdio.h>
13656                         #include <stdlib.h>
13657                         #include <security/pam_appl.h>
13658 int
13659 main ()
13660 {
13661 pam_handle_t *pamh = 0;
13662                         char *s = pam_strerror(pamh, PAM_SUCCESS);
13663   ;
13664   return 0;
13665 }
13666 _ACEOF
13667 rm -rf conftest.$ac_objext
13668 if { (ac_try="$ac_compile"
13669 case "(($ac_try" in
13670   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13671   *) ac_try_echo=$ac_try;;
13672 esac
13673 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
13674 $as_echo "$ac_try_echo") >&5
13675   (eval "$ac_compile") 2>conftest.er1
13676   ac_status=$?
13677   grep -v '^ *+' conftest.er1 >conftest.err
13678   rm -rf conftest.er1
13679   cat conftest.err >&5
13680   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
13681   (exit $ac_status); } && {
13682          test -z "$ac_c_werror_flag" ||
13683          test ! -s conftest.err
13684        } && test -s conftest.$ac_objext; then
13685   ac_pam_strerror_args=2
13686 else
13687   $as_echo "$as_me: failed program was:" >&5
13688 sed 's/^/| /' conftest.$ac_ext >&5
13689
13690
13691   ac_save_CPPFLAGS="$CPPFLAGS"
13692   if test \! -z "$includedir" ; then
13693     CPPFLAGS="$CPPFLAGS -I$includedir"
13694   fi
13695   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
13696   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
13697   cat >conftest.$ac_ext <<_ACEOF
13698 /* confdefs.h.  */
13699 _ACEOF
13700 cat confdefs.h >>conftest.$ac_ext
13701 cat >>conftest.$ac_ext <<_ACEOF
13702 /* end confdefs.h.  */
13703 #include <stdio.h>
13704                                           #include <stdlib.h>
13705                                           #include <security/pam_appl.h>
13706 int
13707 main ()
13708 {
13709 char *s =
13710                                            pam_strerror(PAM_SUCCESS);
13711   ;
13712   return 0;
13713 }
13714 _ACEOF
13715 rm -rf conftest.$ac_objext
13716 if { (ac_try="$ac_compile"
13717 case "(($ac_try" in
13718   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13719   *) ac_try_echo=$ac_try;;
13720 esac
13721 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
13722 $as_echo "$ac_try_echo") >&5
13723   (eval "$ac_compile") 2>conftest.er1
13724   ac_status=$?
13725   grep -v '^ *+' conftest.er1 >conftest.err
13726   rm -rf conftest.er1
13727   cat conftest.err >&5
13728   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
13729   (exit $ac_status); } && {
13730          test -z "$ac_c_werror_flag" ||
13731          test ! -s conftest.err
13732        } && test -s conftest.$ac_objext; then
13733   ac_pam_strerror_args=1
13734 else
13735   $as_echo "$as_me: failed program was:" >&5
13736 sed 's/^/| /' conftest.$ac_ext >&5
13737
13738         ac_pam_strerror_args=0
13739 fi
13740
13741 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13742   CPPFLAGS="$ac_save_CPPFLAGS"
13743 fi
13744
13745 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13746   CPPFLAGS="$ac_save_CPPFLAGS"
13747       ac_cv_pam_strerror_args=$ac_pam_strerror_args
13748 fi
13749
13750     ac_pam_strerror_args=$ac_cv_pam_strerror_args
13751     if test "$ac_pam_strerror_args" = 1 ; then
13752       { $as_echo "$as_me:$LINENO: result: one argument" >&5
13753 $as_echo "one argument" >&6; }
13754     elif test "$ac_pam_strerror_args" = 2 ; then
13755       cat >>confdefs.h <<\_ACEOF
13756 #define PAM_STRERROR_TWO_ARGS 1
13757 _ACEOF
13758
13759       { $as_echo "$as_me:$LINENO: result: two arguments" >&5
13760 $as_echo "two arguments" >&6; }
13761     else
13762       { $as_echo "$as_me:$LINENO: result: unknown" >&5
13763 $as_echo "unknown" >&6; }
13764     fi
13765
13766 # Check pam_fail_delay
13767     { $as_echo "$as_me:$LINENO: checking pam_fail_delay in -lpam" >&5
13768 $as_echo_n "checking pam_fail_delay in -lpam... " >&6; }
13769     if test "${ac_cv_pam_fail_delay+set}" = set; then
13770   $as_echo_n "(cached) " >&6
13771 else
13772   ac_save_LDFLAGS="$LDFLAGS"
13773       LDFLAGS="-lpam"
13774       cat >conftest.$ac_ext <<_ACEOF
13775 /* confdefs.h.  */
13776 _ACEOF
13777 cat confdefs.h >>conftest.$ac_ext
13778 cat >>conftest.$ac_ext <<_ACEOF
13779 /* end confdefs.h.  */
13780 #include <security/pam_appl.h>
13781 int
13782 main ()
13783 {
13784 pam_handle_t *pamh = 0;
13785                    unsigned int usec = 1;
13786                    int status = pam_fail_delay (pamh, usec);
13787   ;
13788   return 0;
13789 }
13790 _ACEOF
13791 rm -rf conftest.$ac_objext conftest$ac_exeext
13792 if { (ac_try="$ac_link"
13793 case "(($ac_try" in
13794   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13795   *) ac_try_echo=$ac_try;;
13796 esac
13797 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
13798 $as_echo "$ac_try_echo") >&5
13799   (eval "$ac_link") 2>conftest.er1
13800   ac_status=$?
13801   grep -v '^ *+' conftest.er1 >conftest.err
13802   rm -rf conftest.er1
13803   cat conftest.err >&5
13804   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
13805   (exit $ac_status); } && {
13806          test -z "$ac_c_werror_flag" ||
13807          test ! -s conftest.err
13808        } && test -s conftest$ac_exeext && {
13809          test "$cross_compiling" = yes ||
13810          $as_test_x conftest$ac_exeext
13811        }; then
13812   ac_pam_fail_delay=yes
13813 else
13814   $as_echo "$as_me: failed program was:" >&5
13815 sed 's/^/| /' conftest.$ac_ext >&5
13816
13817         ac_pam_fail_delay=no
13818 fi
13819
13820 rm -rf conftest.dSYM
13821 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
13822       conftest$ac_exeext conftest.$ac_ext
13823       ac_cv_pam_fail_delay=$ac_pam_fail_delay,
13824       LDFLAGS=$ac_save_LDFLAGS
13825 fi
13826
13827
13828       if test "$ac_pam_fail_delay" = yes ; then
13829         { $as_echo "$as_me:$LINENO: result: yes" >&5
13830 $as_echo "yes" >&6; }
13831         cat >>confdefs.h <<\_ACEOF
13832 #define HAVE_PAM_FAIL_DELAY 1
13833 _ACEOF
13834
13835       else
13836         { $as_echo "$as_me:$LINENO: result: no" >&5
13837 $as_echo "no" >&6; }
13838       fi
13839
13840   fi
13841 fi
13842
13843
13844 ###############################################################################
13845 #
13846 #       Check for Kerberos.
13847 #
13848 ###############################################################################
13849
13850 have_kerberos=no
13851 have_kerberos5=no
13852 with_kerberos_req=unspecified
13853
13854
13855 # Check whether --with-kerberos was given.
13856 if test "${with_kerberos+set}" = set; then
13857   withval=$with_kerberos; with_kerberos="$withval"; with_kerberos_req="$withval"
13858 else
13859   with_kerberos=yes
13860 fi
13861
13862
13863
13864    case "$with_kerberos" in
13865     yes) ;;
13866     no)  ;;
13867
13868     /*)
13869      { $as_echo "$as_me:$LINENO: checking for Kerberos headers" >&5
13870 $as_echo_n "checking for Kerberos headers... " >&6; }
13871      d=$with_kerberos/include
13872      if test -d $d; then
13873        X_CFLAGS="-I$d $X_CFLAGS"
13874        { $as_echo "$as_me:$LINENO: result: $d" >&5
13875 $as_echo "$d" >&6; }
13876      else
13877        { $as_echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
13878 $as_echo "not found ($d: no such directory)" >&6; }
13879      fi
13880
13881      { $as_echo "$as_me:$LINENO: checking for Kerberos libs" >&5
13882 $as_echo_n "checking for Kerberos libs... " >&6; }
13883      d=$with_kerberos/lib
13884      if test -d $d; then
13885        X_LIBS="-L$d $X_LIBS"
13886        { $as_echo "$as_me:$LINENO: result: $d" >&5
13887 $as_echo "$d" >&6; }
13888      else
13889        { $as_echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
13890 $as_echo "not found ($d: no such directory)" >&6; }
13891      fi
13892
13893      # replace the directory string with "yes".
13894      with_kerberos_req="yes"
13895      with_kerberos=$with_kerberos_req
13896      ;;
13897
13898     *)
13899      echo ""
13900      echo "error: argument to --with-kerberos must be \"yes\", \"no\", or a directory."
13901      echo "       If it is a directory, then \`DIR/include' will be added to"
13902      echo "       the -I list, and \`DIR/lib' will be added to the -L list."
13903      exit 1
13904      ;;
13905    esac
13906
13907
13908 if test "$enable_locking" = yes -a "$with_kerberos" = yes; then
13909   { $as_echo "$as_me:$LINENO: checking for Kerberos 4" >&5
13910 $as_echo_n "checking for Kerberos 4... " >&6; }
13911 if test "${ac_cv_kerberos+set}" = set; then
13912   $as_echo_n "(cached) " >&6
13913 else
13914
13915   ac_save_CPPFLAGS="$CPPFLAGS"
13916   if test \! -z "$includedir" ; then
13917     CPPFLAGS="$CPPFLAGS -I$includedir"
13918   fi
13919   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
13920   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
13921   cat >conftest.$ac_ext <<_ACEOF
13922 /* confdefs.h.  */
13923 _ACEOF
13924 cat confdefs.h >>conftest.$ac_ext
13925 cat >>conftest.$ac_ext <<_ACEOF
13926 /* end confdefs.h.  */
13927 #include <krb.h>
13928 int
13929 main ()
13930 {
13931
13932   ;
13933   return 0;
13934 }
13935 _ACEOF
13936 rm -rf conftest.$ac_objext
13937 if { (ac_try="$ac_compile"
13938 case "(($ac_try" in
13939   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13940   *) ac_try_echo=$ac_try;;
13941 esac
13942 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
13943 $as_echo "$ac_try_echo") >&5
13944   (eval "$ac_compile") 2>conftest.er1
13945   ac_status=$?
13946   grep -v '^ *+' conftest.er1 >conftest.err
13947   rm -rf conftest.er1
13948   cat conftest.err >&5
13949   $as_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_objext; then
13954   ac_cv_kerberos=yes
13955 else
13956   $as_echo "$as_me: failed program was:" >&5
13957 sed 's/^/| /' conftest.$ac_ext >&5
13958
13959         ac_cv_kerberos=no
13960 fi
13961
13962 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13963   CPPFLAGS="$ac_save_CPPFLAGS"
13964 fi
13965 { $as_echo "$as_me:$LINENO: result: $ac_cv_kerberos" >&5
13966 $as_echo "$ac_cv_kerberos" >&6; }
13967   { $as_echo "$as_me:$LINENO: checking for Kerberos 5" >&5
13968 $as_echo_n "checking for Kerberos 5... " >&6; }
13969 if test "${ac_cv_kerberos5+set}" = set; then
13970   $as_echo_n "(cached) " >&6
13971 else
13972
13973   ac_save_CPPFLAGS="$CPPFLAGS"
13974   if test \! -z "$includedir" ; then
13975     CPPFLAGS="$CPPFLAGS -I$includedir"
13976   fi
13977   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
13978   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
13979   cat >conftest.$ac_ext <<_ACEOF
13980 /* confdefs.h.  */
13981 _ACEOF
13982 cat confdefs.h >>conftest.$ac_ext
13983 cat >>conftest.$ac_ext <<_ACEOF
13984 /* end confdefs.h.  */
13985 #include <kerberosIV/krb.h>
13986 int
13987 main ()
13988 {
13989
13990   ;
13991   return 0;
13992 }
13993 _ACEOF
13994 rm -rf conftest.$ac_objext
13995 if { (ac_try="$ac_compile"
13996 case "(($ac_try" in
13997   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13998   *) ac_try_echo=$ac_try;;
13999 esac
14000 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
14001 $as_echo "$ac_try_echo") >&5
14002   (eval "$ac_compile") 2>conftest.er1
14003   ac_status=$?
14004   grep -v '^ *+' conftest.er1 >conftest.err
14005   rm -rf conftest.er1
14006   cat conftest.err >&5
14007   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
14008   (exit $ac_status); } && {
14009          test -z "$ac_c_werror_flag" ||
14010          test ! -s conftest.err
14011        } && test -s conftest.$ac_objext; then
14012   ac_cv_kerberos5=yes
14013 else
14014   $as_echo "$as_me: failed program was:" >&5
14015 sed 's/^/| /' conftest.$ac_ext >&5
14016
14017         ac_cv_kerberos5=no
14018 fi
14019
14020 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14021   CPPFLAGS="$ac_save_CPPFLAGS"
14022 fi
14023 { $as_echo "$as_me:$LINENO: result: $ac_cv_kerberos5" >&5
14024 $as_echo "$ac_cv_kerberos5" >&6; }
14025
14026   if test "$ac_cv_kerberos" = yes ; then
14027     have_kerberos=yes
14028     cat >>confdefs.h <<\_ACEOF
14029 #define HAVE_KERBEROS 1
14030 _ACEOF
14031
14032   fi
14033
14034   if test "$ac_cv_kerberos5" = yes ; then
14035
14036     # Andrew Snare <ajs@pigpond.com> wrote:
14037     #
14038     # You were assuming that if kerberosV (krb5) was found, then kerberosIV
14039     # (krb4) was also available.  This turns out not to be the case with
14040     # mit-krb-1.2.7; apparently backwards-compatibility with KerberosIV
14041     # is optional.
14042     #
14043     # So, disable kerberosV support if libkrb4 can't be found.
14044     # This is not the best solution, but it makes the compile not fail.
14045     #
14046
14047   ac_save_CPPFLAGS="$CPPFLAGS"
14048   ac_save_LDFLAGS="$LDFLAGS"
14049 #  ac_save_LIBS="$LIBS"
14050
14051   if test \! -z "$includedir" ; then
14052     CPPFLAGS="$CPPFLAGS -I$includedir"
14053   fi
14054   # note: $X_CFLAGS includes $x_includes
14055   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
14056
14057   if test \! -z "$libdir" ; then
14058     LDFLAGS="$LDFLAGS -L$libdir"
14059   fi
14060   # note: $X_LIBS includes $x_libraries
14061   LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
14062
14063   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
14064   LDFLAGS=`eval eval eval eval eval eval eval eval eval echo $LDFLAGS`
14065   { $as_echo "$as_me:$LINENO: checking for krb_get_tf_realm in -lkrb4" >&5
14066 $as_echo_n "checking for krb_get_tf_realm in -lkrb4... " >&6; }
14067 if test "${ac_cv_lib_krb4_krb_get_tf_realm+set}" = set; then
14068   $as_echo_n "(cached) " >&6
14069 else
14070   ac_check_lib_save_LIBS=$LIBS
14071 LIBS="-lkrb4  $LIBS"
14072 cat >conftest.$ac_ext <<_ACEOF
14073 /* confdefs.h.  */
14074 _ACEOF
14075 cat confdefs.h >>conftest.$ac_ext
14076 cat >>conftest.$ac_ext <<_ACEOF
14077 /* end confdefs.h.  */
14078
14079 /* Override any GCC internal prototype to avoid an error.
14080    Use char because int might match the return type of a GCC
14081    builtin and then its argument prototype would still apply.  */
14082 #ifdef __cplusplus
14083 extern "C"
14084 #endif
14085 char krb_get_tf_realm ();
14086 int
14087 main ()
14088 {
14089 return krb_get_tf_realm ();
14090   ;
14091   return 0;
14092 }
14093 _ACEOF
14094 rm -rf conftest.$ac_objext conftest$ac_exeext
14095 if { (ac_try="$ac_link"
14096 case "(($ac_try" in
14097   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14098   *) ac_try_echo=$ac_try;;
14099 esac
14100 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
14101 $as_echo "$ac_try_echo") >&5
14102   (eval "$ac_link") 2>conftest.er1
14103   ac_status=$?
14104   grep -v '^ *+' conftest.er1 >conftest.err
14105   rm -rf conftest.er1
14106   cat conftest.err >&5
14107   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
14108   (exit $ac_status); } && {
14109          test -z "$ac_c_werror_flag" ||
14110          test ! -s conftest.err
14111        } && test -s conftest$ac_exeext && {
14112          test "$cross_compiling" = yes ||
14113          $as_test_x conftest$ac_exeext
14114        }; then
14115   ac_cv_lib_krb4_krb_get_tf_realm=yes
14116 else
14117   $as_echo "$as_me: failed program was:" >&5
14118 sed 's/^/| /' conftest.$ac_ext >&5
14119
14120         ac_cv_lib_krb4_krb_get_tf_realm=no
14121 fi
14122
14123 rm -rf conftest.dSYM
14124 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
14125       conftest$ac_exeext conftest.$ac_ext
14126 LIBS=$ac_check_lib_save_LIBS
14127 fi
14128 { $as_echo "$as_me:$LINENO: result: $ac_cv_lib_krb4_krb_get_tf_realm" >&5
14129 $as_echo "$ac_cv_lib_krb4_krb_get_tf_realm" >&6; }
14130 if test "x$ac_cv_lib_krb4_krb_get_tf_realm" = x""yes; then
14131   have_kerberos=yes
14132 else
14133   have_kerberos=no
14134 fi
14135
14136   CPPFLAGS="$ac_save_CPPFLAGS"
14137   LDFLAGS="$ac_save_LDFLAGS"
14138 #  LIBS="$ac_save_LIBS"
14139
14140     if test "$have_kerberos" = yes ; then
14141       have_kerberos5=yes
14142       cat >>confdefs.h <<\_ACEOF
14143 #define HAVE_KERBEROS 1
14144 _ACEOF
14145
14146       cat >>confdefs.h <<\_ACEOF
14147 #define HAVE_KERBEROS5 1
14148 _ACEOF
14149
14150     else
14151       have_kerberos5=no
14152       { $as_echo "$as_me:$LINENO: WARNING: Cannot find compat lib (libkrb4) needed to use Kerberos 5" >&5
14153 $as_echo "$as_me: WARNING: Cannot find compat lib (libkrb4) needed to use Kerberos 5" >&2;}
14154     fi
14155
14156   fi
14157
14158   if test "$have_kerberos5" = yes ; then
14159     # from Matt Knopp <mhat@infocalypse.netlag.com>
14160     # (who got it from amu@mit.edu)
14161
14162     PASSWD_LIBS="$PASSWD_LIBS -lkrb4 -ldes425 -lkrb5 -lk5crypto -lcom_err"
14163
14164     # jwz: MacOS X uses -lkrb5, but not -lcrypt
14165
14166   ac_save_CPPFLAGS="$CPPFLAGS"
14167   ac_save_LDFLAGS="$LDFLAGS"
14168 #  ac_save_LIBS="$LIBS"
14169
14170   if test \! -z "$includedir" ; then
14171     CPPFLAGS="$CPPFLAGS -I$includedir"
14172   fi
14173   # note: $X_CFLAGS includes $x_includes
14174   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
14175
14176   if test \! -z "$libdir" ; then
14177     LDFLAGS="$LDFLAGS -L$libdir"
14178   fi
14179   # note: $X_LIBS includes $x_libraries
14180   LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
14181
14182   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
14183   LDFLAGS=`eval eval eval eval eval eval eval eval eval echo $LDFLAGS`
14184   { $as_echo "$as_me:$LINENO: checking for crypt in -lcrypt" >&5
14185 $as_echo_n "checking for crypt in -lcrypt... " >&6; }
14186 if test "${ac_cv_lib_crypt_crypt+set}" = set; then
14187   $as_echo_n "(cached) " >&6
14188 else
14189   ac_check_lib_save_LIBS=$LIBS
14190 LIBS="-lcrypt  $LIBS"
14191 cat >conftest.$ac_ext <<_ACEOF
14192 /* confdefs.h.  */
14193 _ACEOF
14194 cat confdefs.h >>conftest.$ac_ext
14195 cat >>conftest.$ac_ext <<_ACEOF
14196 /* end confdefs.h.  */
14197
14198 /* Override any GCC internal prototype to avoid an error.
14199    Use char because int might match the return type of a GCC
14200    builtin and then its argument prototype would still apply.  */
14201 #ifdef __cplusplus
14202 extern "C"
14203 #endif
14204 char crypt ();
14205 int
14206 main ()
14207 {
14208 return crypt ();
14209   ;
14210   return 0;
14211 }
14212 _ACEOF
14213 rm -rf conftest.$ac_objext conftest$ac_exeext
14214 if { (ac_try="$ac_link"
14215 case "(($ac_try" in
14216   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14217   *) ac_try_echo=$ac_try;;
14218 esac
14219 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
14220 $as_echo "$ac_try_echo") >&5
14221   (eval "$ac_link") 2>conftest.er1
14222   ac_status=$?
14223   grep -v '^ *+' conftest.er1 >conftest.err
14224   rm -rf conftest.er1
14225   cat conftest.err >&5
14226   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
14227   (exit $ac_status); } && {
14228          test -z "$ac_c_werror_flag" ||
14229          test ! -s conftest.err
14230        } && test -s conftest$ac_exeext && {
14231          test "$cross_compiling" = yes ||
14232          $as_test_x conftest$ac_exeext
14233        }; then
14234   ac_cv_lib_crypt_crypt=yes
14235 else
14236   $as_echo "$as_me: failed program was:" >&5
14237 sed 's/^/| /' conftest.$ac_ext >&5
14238
14239         ac_cv_lib_crypt_crypt=no
14240 fi
14241
14242 rm -rf conftest.dSYM
14243 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
14244       conftest$ac_exeext conftest.$ac_ext
14245 LIBS=$ac_check_lib_save_LIBS
14246 fi
14247 { $as_echo "$as_me:$LINENO: result: $ac_cv_lib_crypt_crypt" >&5
14248 $as_echo "$ac_cv_lib_crypt_crypt" >&6; }
14249 if test "x$ac_cv_lib_crypt_crypt" = x""yes; then
14250   PASSWD_LIBS="$PASSWD_LIBS -lcrypt"
14251 fi
14252
14253   CPPFLAGS="$ac_save_CPPFLAGS"
14254   LDFLAGS="$ac_save_LDFLAGS"
14255 #  LIBS="$ac_save_LIBS"
14256
14257
14258   elif test "$have_kerberos" = yes ; then
14259     # from Tim Showalter <tjs@psaux.com> for FreeBSD 4.2
14260     PASSWD_LIBS="$PASSWD_LIBS -lkrb -ldes -lcom_err"
14261   fi
14262
14263   if test "$have_kerberos" = yes ; then
14264     { $as_echo "$as_me:$LINENO: checking for res_search" >&5
14265 $as_echo_n "checking for res_search... " >&6; }
14266 if test "${ac_cv_func_res_search+set}" = set; then
14267   $as_echo_n "(cached) " >&6
14268 else
14269   cat >conftest.$ac_ext <<_ACEOF
14270 /* confdefs.h.  */
14271 _ACEOF
14272 cat confdefs.h >>conftest.$ac_ext
14273 cat >>conftest.$ac_ext <<_ACEOF
14274 /* end confdefs.h.  */
14275 /* Define res_search to an innocuous variant, in case <limits.h> declares res_search.
14276    For example, HP-UX 11i <limits.h> declares gettimeofday.  */
14277 #define res_search innocuous_res_search
14278
14279 /* System header to define __stub macros and hopefully few prototypes,
14280     which can conflict with char res_search (); below.
14281     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
14282     <limits.h> exists even on freestanding compilers.  */
14283
14284 #ifdef __STDC__
14285 # include <limits.h>
14286 #else
14287 # include <assert.h>
14288 #endif
14289
14290 #undef res_search
14291
14292 /* Override any GCC internal prototype to avoid an error.
14293    Use char because int might match the return type of a GCC
14294    builtin and then its argument prototype would still apply.  */
14295 #ifdef __cplusplus
14296 extern "C"
14297 #endif
14298 char res_search ();
14299 /* The GNU C library defines this for functions which it implements
14300     to always fail with ENOSYS.  Some functions are actually named
14301     something starting with __ and the normal name is an alias.  */
14302 #if defined __stub_res_search || defined __stub___res_search
14303 choke me
14304 #endif
14305
14306 int
14307 main ()
14308 {
14309 return res_search ();
14310   ;
14311   return 0;
14312 }
14313 _ACEOF
14314 rm -rf conftest.$ac_objext conftest$ac_exeext
14315 if { (ac_try="$ac_link"
14316 case "(($ac_try" in
14317   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14318   *) ac_try_echo=$ac_try;;
14319 esac
14320 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
14321 $as_echo "$ac_try_echo") >&5
14322   (eval "$ac_link") 2>conftest.er1
14323   ac_status=$?
14324   grep -v '^ *+' conftest.er1 >conftest.err
14325   rm -rf conftest.er1
14326   cat conftest.err >&5
14327   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
14328   (exit $ac_status); } && {
14329          test -z "$ac_c_werror_flag" ||
14330          test ! -s conftest.err
14331        } && test -s conftest$ac_exeext && {
14332          test "$cross_compiling" = yes ||
14333          $as_test_x conftest$ac_exeext
14334        }; then
14335   ac_cv_func_res_search=yes
14336 else
14337   $as_echo "$as_me: failed program was:" >&5
14338 sed 's/^/| /' conftest.$ac_ext >&5
14339
14340         ac_cv_func_res_search=no
14341 fi
14342
14343 rm -rf conftest.dSYM
14344 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
14345       conftest$ac_exeext conftest.$ac_ext
14346 fi
14347 { $as_echo "$as_me:$LINENO: result: $ac_cv_func_res_search" >&5
14348 $as_echo "$ac_cv_func_res_search" >&6; }
14349 if test "x$ac_cv_func_res_search" = x""yes; then
14350   :
14351 else
14352   { $as_echo "$as_me:$LINENO: checking for res_search in -lresolv" >&5
14353 $as_echo_n "checking for res_search in -lresolv... " >&6; }
14354 if test "${ac_cv_lib_resolv_res_search+set}" = set; then
14355   $as_echo_n "(cached) " >&6
14356 else
14357   ac_check_lib_save_LIBS=$LIBS
14358 LIBS="-lresolv  $LIBS"
14359 cat >conftest.$ac_ext <<_ACEOF
14360 /* confdefs.h.  */
14361 _ACEOF
14362 cat confdefs.h >>conftest.$ac_ext
14363 cat >>conftest.$ac_ext <<_ACEOF
14364 /* end confdefs.h.  */
14365
14366 /* Override any GCC internal prototype to avoid an error.
14367    Use char because int might match the return type of a GCC
14368    builtin and then its argument prototype would still apply.  */
14369 #ifdef __cplusplus
14370 extern "C"
14371 #endif
14372 char res_search ();
14373 int
14374 main ()
14375 {
14376 return res_search ();
14377   ;
14378   return 0;
14379 }
14380 _ACEOF
14381 rm -rf conftest.$ac_objext conftest$ac_exeext
14382 if { (ac_try="$ac_link"
14383 case "(($ac_try" in
14384   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14385   *) ac_try_echo=$ac_try;;
14386 esac
14387 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
14388 $as_echo "$ac_try_echo") >&5
14389   (eval "$ac_link") 2>conftest.er1
14390   ac_status=$?
14391   grep -v '^ *+' conftest.er1 >conftest.err
14392   rm -rf conftest.er1
14393   cat conftest.err >&5
14394   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
14395   (exit $ac_status); } && {
14396          test -z "$ac_c_werror_flag" ||
14397          test ! -s conftest.err
14398        } && test -s conftest$ac_exeext && {
14399          test "$cross_compiling" = yes ||
14400          $as_test_x conftest$ac_exeext
14401        }; then
14402   ac_cv_lib_resolv_res_search=yes
14403 else
14404   $as_echo "$as_me: failed program was:" >&5
14405 sed 's/^/| /' conftest.$ac_ext >&5
14406
14407         ac_cv_lib_resolv_res_search=no
14408 fi
14409
14410 rm -rf conftest.dSYM
14411 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
14412       conftest$ac_exeext conftest.$ac_ext
14413 LIBS=$ac_check_lib_save_LIBS
14414 fi
14415 { $as_echo "$as_me:$LINENO: result: $ac_cv_lib_resolv_res_search" >&5
14416 $as_echo "$ac_cv_lib_resolv_res_search" >&6; }
14417 if test "x$ac_cv_lib_resolv_res_search" = x""yes; then
14418   PASSWD_LIBS="${PASSWD_LIBS} -lresolv"
14419 else
14420   { $as_echo "$as_me:$LINENO: WARNING: Can't find DNS resolver libraries needed for Kerberos" >&5
14421 $as_echo "$as_me: WARNING: Can't find DNS resolver libraries needed for Kerberos" >&2;}
14422
14423 fi
14424
14425 fi
14426
14427   fi
14428 fi
14429
14430
14431 ###############################################################################
14432 #
14433 #       Check for the nine billion variants of shadow passwords...
14434 #
14435 ###############################################################################
14436
14437 need_setuid=no
14438
14439 have_shadow=no
14440 with_shadow_req=unspecified
14441
14442
14443 # Check whether --with-shadow was given.
14444 if test "${with_shadow+set}" = set; then
14445   withval=$with_shadow; with_shadow="$withval"; with_shadow_req="$withval"
14446 else
14447   with_shadow=yes
14448 fi
14449
14450
14451
14452    case "$with_shadow" in
14453     yes) ;;
14454     no)  ;;
14455
14456     /*)
14457      { $as_echo "$as_me:$LINENO: checking for shadow password headers" >&5
14458 $as_echo_n "checking for shadow password headers... " >&6; }
14459      d=$with_shadow/include
14460      if test -d $d; then
14461        X_CFLAGS="-I$d $X_CFLAGS"
14462        { $as_echo "$as_me:$LINENO: result: $d" >&5
14463 $as_echo "$d" >&6; }
14464      else
14465        { $as_echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
14466 $as_echo "not found ($d: no such directory)" >&6; }
14467      fi
14468
14469      { $as_echo "$as_me:$LINENO: checking for shadow password libs" >&5
14470 $as_echo_n "checking for shadow password libs... " >&6; }
14471      d=$with_shadow/lib
14472      if test -d $d; then
14473        X_LIBS="-L$d $X_LIBS"
14474        { $as_echo "$as_me:$LINENO: result: $d" >&5
14475 $as_echo "$d" >&6; }
14476      else
14477        { $as_echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
14478 $as_echo "not found ($d: no such directory)" >&6; }
14479      fi
14480
14481      # replace the directory string with "yes".
14482      with_shadow_req="yes"
14483      with_shadow=$with_shadow_req
14484      ;;
14485
14486     *)
14487      echo ""
14488      echo "error: argument to --with-shadow must be \"yes\", \"no\", or a directory."
14489      echo "       If it is a directory, then \`DIR/include' will be added to"
14490      echo "       the -I list, and \`DIR/lib' will be added to the -L list."
14491      exit 1
14492      ;;
14493    esac
14494
14495
14496 if test "$enable_locking" = no ; then
14497   with_shadow_req=no
14498   with_shadow=no
14499 fi
14500
14501
14502 ###############################################################################
14503 #
14504 #       Check for Sun "adjunct" passwords.
14505 #
14506 ###############################################################################
14507
14508 if test "$with_shadow" = yes ; then
14509   { $as_echo "$as_me:$LINENO: checking for Sun-style shadow passwords" >&5
14510 $as_echo_n "checking for Sun-style shadow passwords... " >&6; }
14511 if test "${ac_cv_sun_adjunct+set}" = set; then
14512   $as_echo_n "(cached) " >&6
14513 else
14514
14515   ac_save_CPPFLAGS="$CPPFLAGS"
14516   if test \! -z "$includedir" ; then
14517     CPPFLAGS="$CPPFLAGS -I$includedir"
14518   fi
14519   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
14520   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
14521   cat >conftest.$ac_ext <<_ACEOF
14522 /* confdefs.h.  */
14523 _ACEOF
14524 cat confdefs.h >>conftest.$ac_ext
14525 cat >>conftest.$ac_ext <<_ACEOF
14526 /* end confdefs.h.  */
14527 #include <stdlib.h>
14528                                     #include <unistd.h>
14529                                     #include <sys/types.h>
14530                                     #include <sys/label.h>
14531                                     #include <sys/audit.h>
14532                                     #include <pwdadj.h>
14533 int
14534 main ()
14535 {
14536 struct passwd_adjunct *p = getpwanam("nobody");
14537                        const char *pw = p->pwa_passwd;
14538   ;
14539   return 0;
14540 }
14541 _ACEOF
14542 rm -rf conftest.$ac_objext
14543 if { (ac_try="$ac_compile"
14544 case "(($ac_try" in
14545   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14546   *) ac_try_echo=$ac_try;;
14547 esac
14548 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
14549 $as_echo "$ac_try_echo") >&5
14550   (eval "$ac_compile") 2>conftest.er1
14551   ac_status=$?
14552   grep -v '^ *+' conftest.er1 >conftest.err
14553   rm -rf conftest.er1
14554   cat conftest.err >&5
14555   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
14556   (exit $ac_status); } && {
14557          test -z "$ac_c_werror_flag" ||
14558          test ! -s conftest.err
14559        } && test -s conftest.$ac_objext; then
14560   ac_cv_sun_adjunct=yes
14561 else
14562   $as_echo "$as_me: failed program was:" >&5
14563 sed 's/^/| /' conftest.$ac_ext >&5
14564
14565         ac_cv_sun_adjunct=no
14566 fi
14567
14568 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14569   CPPFLAGS="$ac_save_CPPFLAGS"
14570 fi
14571 { $as_echo "$as_me:$LINENO: result: $ac_cv_sun_adjunct" >&5
14572 $as_echo "$ac_cv_sun_adjunct" >&6; }
14573   if test "$ac_cv_sun_adjunct" = yes; then
14574     have_shadow_adjunct=yes
14575     have_shadow=yes
14576     need_setuid=yes
14577   fi
14578 fi
14579
14580
14581 ###############################################################################
14582 #
14583 #       Check for DEC and SCO so-called "enhanced" security.
14584 #
14585 ###############################################################################
14586
14587 if test "$with_shadow" = yes ; then
14588   { $as_echo "$as_me:$LINENO: checking for DEC-style shadow passwords" >&5
14589 $as_echo_n "checking for DEC-style shadow passwords... " >&6; }
14590 if test "${ac_cv_enhanced_passwd+set}" = set; then
14591   $as_echo_n "(cached) " >&6
14592 else
14593
14594   ac_save_CPPFLAGS="$CPPFLAGS"
14595   if test \! -z "$includedir" ; then
14596     CPPFLAGS="$CPPFLAGS -I$includedir"
14597   fi
14598   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
14599   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
14600   cat >conftest.$ac_ext <<_ACEOF
14601 /* confdefs.h.  */
14602 _ACEOF
14603 cat confdefs.h >>conftest.$ac_ext
14604 cat >>conftest.$ac_ext <<_ACEOF
14605 /* end confdefs.h.  */
14606 #include <stdlib.h>
14607                                     #include <unistd.h>
14608                                     #include <sys/types.h>
14609                                     #include <pwd.h>
14610                                     #include <sys/security.h>
14611                                     #include <prot.h>
14612 int
14613 main ()
14614 {
14615 struct pr_passwd *p;
14616                        const char *pw;
14617                        set_auth_parameters(0, 0);
14618                        check_auth_parameters();
14619                        p = getprpwnam("nobody");
14620                        pw = p->ufld.fd_encrypt;
14621   ;
14622   return 0;
14623 }
14624 _ACEOF
14625 rm -rf conftest.$ac_objext
14626 if { (ac_try="$ac_compile"
14627 case "(($ac_try" in
14628   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14629   *) ac_try_echo=$ac_try;;
14630 esac
14631 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
14632 $as_echo "$ac_try_echo") >&5
14633   (eval "$ac_compile") 2>conftest.er1
14634   ac_status=$?
14635   grep -v '^ *+' conftest.er1 >conftest.err
14636   rm -rf conftest.er1
14637   cat conftest.err >&5
14638   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
14639   (exit $ac_status); } && {
14640          test -z "$ac_c_werror_flag" ||
14641          test ! -s conftest.err
14642        } && test -s conftest.$ac_objext; then
14643   ac_cv_enhanced_passwd=yes
14644 else
14645   $as_echo "$as_me: failed program was:" >&5
14646 sed 's/^/| /' conftest.$ac_ext >&5
14647
14648         ac_cv_enhanced_passwd=no
14649 fi
14650
14651 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14652   CPPFLAGS="$ac_save_CPPFLAGS"
14653 fi
14654 { $as_echo "$as_me:$LINENO: result: $ac_cv_enhanced_passwd" >&5
14655 $as_echo "$ac_cv_enhanced_passwd" >&6; }
14656   if test $ac_cv_enhanced_passwd = yes; then
14657     have_shadow_enhanced=yes
14658     have_shadow=yes
14659     need_setuid=yes
14660
14661     # On SCO, getprpwnam() is in -lprot (which uses nap() from -lx)
14662     # (I'm told it needs -lcurses too, but I don't understand why.)
14663     # But on DEC, it's in -lsecurity.
14664     #
14665     { $as_echo "$as_me:$LINENO: checking for getprpwnam in -lprot" >&5
14666 $as_echo_n "checking for getprpwnam in -lprot... " >&6; }
14667 if test "${ac_cv_lib_prot_getprpwnam+set}" = set; then
14668   $as_echo_n "(cached) " >&6
14669 else
14670   ac_check_lib_save_LIBS=$LIBS
14671 LIBS="-lprot -lx $LIBS"
14672 cat >conftest.$ac_ext <<_ACEOF
14673 /* confdefs.h.  */
14674 _ACEOF
14675 cat confdefs.h >>conftest.$ac_ext
14676 cat >>conftest.$ac_ext <<_ACEOF
14677 /* end confdefs.h.  */
14678
14679 /* Override any GCC internal prototype to avoid an error.
14680    Use char because int might match the return type of a GCC
14681    builtin and then its argument prototype would still apply.  */
14682 #ifdef __cplusplus
14683 extern "C"
14684 #endif
14685 char getprpwnam ();
14686 int
14687 main ()
14688 {
14689 return getprpwnam ();
14690   ;
14691   return 0;
14692 }
14693 _ACEOF
14694 rm -rf conftest.$ac_objext conftest$ac_exeext
14695 if { (ac_try="$ac_link"
14696 case "(($ac_try" in
14697   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14698   *) ac_try_echo=$ac_try;;
14699 esac
14700 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
14701 $as_echo "$ac_try_echo") >&5
14702   (eval "$ac_link") 2>conftest.er1
14703   ac_status=$?
14704   grep -v '^ *+' conftest.er1 >conftest.err
14705   rm -rf conftest.er1
14706   cat conftest.err >&5
14707   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
14708   (exit $ac_status); } && {
14709          test -z "$ac_c_werror_flag" ||
14710          test ! -s conftest.err
14711        } && test -s conftest$ac_exeext && {
14712          test "$cross_compiling" = yes ||
14713          $as_test_x conftest$ac_exeext
14714        }; then
14715   ac_cv_lib_prot_getprpwnam=yes
14716 else
14717   $as_echo "$as_me: failed program was:" >&5
14718 sed 's/^/| /' conftest.$ac_ext >&5
14719
14720         ac_cv_lib_prot_getprpwnam=no
14721 fi
14722
14723 rm -rf conftest.dSYM
14724 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
14725       conftest$ac_exeext conftest.$ac_ext
14726 LIBS=$ac_check_lib_save_LIBS
14727 fi
14728 { $as_echo "$as_me:$LINENO: result: $ac_cv_lib_prot_getprpwnam" >&5
14729 $as_echo "$ac_cv_lib_prot_getprpwnam" >&6; }
14730 if test "x$ac_cv_lib_prot_getprpwnam" = x""yes; then
14731   PASSWD_LIBS="$PASSWD_LIBS -lprot -lcurses -lx"
14732 else
14733   { $as_echo "$as_me:$LINENO: checking for getprpwnam in -lsecurity" >&5
14734 $as_echo_n "checking for getprpwnam in -lsecurity... " >&6; }
14735 if test "${ac_cv_lib_security_getprpwnam+set}" = set; then
14736   $as_echo_n "(cached) " >&6
14737 else
14738   ac_check_lib_save_LIBS=$LIBS
14739 LIBS="-lsecurity  $LIBS"
14740 cat >conftest.$ac_ext <<_ACEOF
14741 /* confdefs.h.  */
14742 _ACEOF
14743 cat confdefs.h >>conftest.$ac_ext
14744 cat >>conftest.$ac_ext <<_ACEOF
14745 /* end confdefs.h.  */
14746
14747 /* Override any GCC internal prototype to avoid an error.
14748    Use char because int might match the return type of a GCC
14749    builtin and then its argument prototype would still apply.  */
14750 #ifdef __cplusplus
14751 extern "C"
14752 #endif
14753 char getprpwnam ();
14754 int
14755 main ()
14756 {
14757 return getprpwnam ();
14758   ;
14759   return 0;
14760 }
14761 _ACEOF
14762 rm -rf conftest.$ac_objext conftest$ac_exeext
14763 if { (ac_try="$ac_link"
14764 case "(($ac_try" in
14765   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14766   *) ac_try_echo=$ac_try;;
14767 esac
14768 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
14769 $as_echo "$ac_try_echo") >&5
14770   (eval "$ac_link") 2>conftest.er1
14771   ac_status=$?
14772   grep -v '^ *+' conftest.er1 >conftest.err
14773   rm -rf conftest.er1
14774   cat conftest.err >&5
14775   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
14776   (exit $ac_status); } && {
14777          test -z "$ac_c_werror_flag" ||
14778          test ! -s conftest.err
14779        } && test -s conftest$ac_exeext && {
14780          test "$cross_compiling" = yes ||
14781          $as_test_x conftest$ac_exeext
14782        }; then
14783   ac_cv_lib_security_getprpwnam=yes
14784 else
14785   $as_echo "$as_me: failed program was:" >&5
14786 sed 's/^/| /' conftest.$ac_ext >&5
14787
14788         ac_cv_lib_security_getprpwnam=no
14789 fi
14790
14791 rm -rf conftest.dSYM
14792 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
14793       conftest$ac_exeext conftest.$ac_ext
14794 LIBS=$ac_check_lib_save_LIBS
14795 fi
14796 { $as_echo "$as_me:$LINENO: result: $ac_cv_lib_security_getprpwnam" >&5
14797 $as_echo "$ac_cv_lib_security_getprpwnam" >&6; }
14798 if test "x$ac_cv_lib_security_getprpwnam" = x""yes; then
14799   PASSWD_LIBS="$PASSWD_LIBS -lsecurity"
14800 fi
14801
14802 fi
14803
14804   fi
14805 fi
14806
14807 ###############################################################################
14808 #
14809 #       Check for HP's entry in the "Not Invented Here" Sweepstakes.
14810 #
14811 ###############################################################################
14812
14813 if test "$with_shadow" = yes ; then
14814   { $as_echo "$as_me:$LINENO: checking for HP-style shadow passwords" >&5
14815 $as_echo_n "checking for HP-style shadow passwords... " >&6; }
14816 if test "${ac_cv_hpux_passwd+set}" = set; then
14817   $as_echo_n "(cached) " >&6
14818 else
14819
14820   ac_save_CPPFLAGS="$CPPFLAGS"
14821   if test \! -z "$includedir" ; then
14822     CPPFLAGS="$CPPFLAGS -I$includedir"
14823   fi
14824   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
14825   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
14826   cat >conftest.$ac_ext <<_ACEOF
14827 /* confdefs.h.  */
14828 _ACEOF
14829 cat confdefs.h >>conftest.$ac_ext
14830 cat >>conftest.$ac_ext <<_ACEOF
14831 /* end confdefs.h.  */
14832 #include <stdlib.h>
14833                                     #include <unistd.h>
14834                                     #include <sys/types.h>
14835                                     #include <pwd.h>
14836                                     #include <hpsecurity.h>
14837                                     #include <prot.h>
14838 int
14839 main ()
14840 {
14841 struct s_passwd *p = getspwnam("nobody");
14842                        const char *pw = p->pw_passwd;
14843   ;
14844   return 0;
14845 }
14846 _ACEOF
14847 rm -rf conftest.$ac_objext
14848 if { (ac_try="$ac_compile"
14849 case "(($ac_try" in
14850   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14851   *) ac_try_echo=$ac_try;;
14852 esac
14853 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
14854 $as_echo "$ac_try_echo") >&5
14855   (eval "$ac_compile") 2>conftest.er1
14856   ac_status=$?
14857   grep -v '^ *+' conftest.er1 >conftest.err
14858   rm -rf conftest.er1
14859   cat conftest.err >&5
14860   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
14861   (exit $ac_status); } && {
14862          test -z "$ac_c_werror_flag" ||
14863          test ! -s conftest.err
14864        } && test -s conftest.$ac_objext; then
14865   ac_cv_hpux_passwd=yes
14866 else
14867   $as_echo "$as_me: failed program was:" >&5
14868 sed 's/^/| /' conftest.$ac_ext >&5
14869
14870         ac_cv_hpux_passwd=no
14871 fi
14872
14873 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14874   CPPFLAGS="$ac_save_CPPFLAGS"
14875 fi
14876 { $as_echo "$as_me:$LINENO: result: $ac_cv_hpux_passwd" >&5
14877 $as_echo "$ac_cv_hpux_passwd" >&6; }
14878   if test "$ac_cv_hpux_passwd" = yes; then
14879     have_shadow_hpux=yes
14880     have_shadow=yes
14881     need_setuid=yes
14882
14883     # on HPUX, bigcrypt is in -lsec
14884     { $as_echo "$as_me:$LINENO: checking for bigcrypt in -lsec" >&5
14885 $as_echo_n "checking for bigcrypt in -lsec... " >&6; }
14886 if test "${ac_cv_lib_sec_bigcrypt+set}" = set; then
14887   $as_echo_n "(cached) " >&6
14888 else
14889   ac_check_lib_save_LIBS=$LIBS
14890 LIBS="-lsec  $LIBS"
14891 cat >conftest.$ac_ext <<_ACEOF
14892 /* confdefs.h.  */
14893 _ACEOF
14894 cat confdefs.h >>conftest.$ac_ext
14895 cat >>conftest.$ac_ext <<_ACEOF
14896 /* end confdefs.h.  */
14897
14898 /* Override any GCC internal prototype to avoid an error.
14899    Use char because int might match the return type of a GCC
14900    builtin and then its argument prototype would still apply.  */
14901 #ifdef __cplusplus
14902 extern "C"
14903 #endif
14904 char bigcrypt ();
14905 int
14906 main ()
14907 {
14908 return bigcrypt ();
14909   ;
14910   return 0;
14911 }
14912 _ACEOF
14913 rm -rf conftest.$ac_objext conftest$ac_exeext
14914 if { (ac_try="$ac_link"
14915 case "(($ac_try" in
14916   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14917   *) ac_try_echo=$ac_try;;
14918 esac
14919 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
14920 $as_echo "$ac_try_echo") >&5
14921   (eval "$ac_link") 2>conftest.er1
14922   ac_status=$?
14923   grep -v '^ *+' conftest.er1 >conftest.err
14924   rm -rf conftest.er1
14925   cat conftest.err >&5
14926   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
14927   (exit $ac_status); } && {
14928          test -z "$ac_c_werror_flag" ||
14929          test ! -s conftest.err
14930        } && test -s conftest$ac_exeext && {
14931          test "$cross_compiling" = yes ||
14932          $as_test_x conftest$ac_exeext
14933        }; then
14934   ac_cv_lib_sec_bigcrypt=yes
14935 else
14936   $as_echo "$as_me: failed program was:" >&5
14937 sed 's/^/| /' conftest.$ac_ext >&5
14938
14939         ac_cv_lib_sec_bigcrypt=no
14940 fi
14941
14942 rm -rf conftest.dSYM
14943 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
14944       conftest$ac_exeext conftest.$ac_ext
14945 LIBS=$ac_check_lib_save_LIBS
14946 fi
14947 { $as_echo "$as_me:$LINENO: result: $ac_cv_lib_sec_bigcrypt" >&5
14948 $as_echo "$ac_cv_lib_sec_bigcrypt" >&6; }
14949 if test "x$ac_cv_lib_sec_bigcrypt" = x""yes; then
14950   PASSWD_LIBS="$PASSWD_LIBS -lsec"
14951 fi
14952
14953   fi
14954 fi
14955
14956
14957 ###############################################################################
14958 #
14959 #       Check for FreeBSD-style shadow passwords.
14960 #
14961 #       On FreeBSD, getpwnam() and friends work just like on non-shadow-
14962 #       password systems -- except you only get stuff in the pw_passwd field
14963 #       if the running program is setuid.  So, guess that we've got this
14964 #       lossage to contend with if /etc/master.passwd exists, and default to
14965 #       a setuid installation.
14966 #
14967 ###############################################################################
14968
14969 if test "$with_shadow" = yes ; then
14970   { $as_echo "$as_me:$LINENO: checking for FreeBSD-style shadow passwords" >&5
14971 $as_echo_n "checking for FreeBSD-style shadow passwords... " >&6; }
14972 if test "${ac_cv_master_passwd+set}" = set; then
14973   $as_echo_n "(cached) " >&6
14974 else
14975   if test -f /etc/master.passwd ; then
14976                     ac_cv_master_passwd=yes
14977                   else
14978                     ac_cv_master_passwd=no
14979                   fi
14980 fi
14981 { $as_echo "$as_me:$LINENO: result: $ac_cv_master_passwd" >&5
14982 $as_echo "$ac_cv_master_passwd" >&6; }
14983   if test "$ac_cv_master_passwd" = yes; then
14984     need_setuid=yes
14985   fi
14986 fi
14987
14988
14989 ###############################################################################
14990 #
14991 #       Check for traditional (ha!) shadow passwords.
14992 #
14993 ###############################################################################
14994
14995 if test "$with_shadow" = yes ; then
14996   { $as_echo "$as_me:$LINENO: checking for generic shadow passwords" >&5
14997 $as_echo_n "checking for generic shadow passwords... " >&6; }
14998 if test "${ac_cv_shadow+set}" = set; then
14999   $as_echo_n "(cached) " >&6
15000 else
15001
15002   ac_save_CPPFLAGS="$CPPFLAGS"
15003   if test \! -z "$includedir" ; then
15004     CPPFLAGS="$CPPFLAGS -I$includedir"
15005   fi
15006   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
15007   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
15008   cat >conftest.$ac_ext <<_ACEOF
15009 /* confdefs.h.  */
15010 _ACEOF
15011 cat confdefs.h >>conftest.$ac_ext
15012 cat >>conftest.$ac_ext <<_ACEOF
15013 /* end confdefs.h.  */
15014 #include <stdlib.h>
15015                                     #include <unistd.h>
15016                                     #include <sys/types.h>
15017                                     #include <pwd.h>
15018                                     #include <shadow.h>
15019 int
15020 main ()
15021 {
15022 struct spwd *p = getspnam("nobody");
15023                        const char *pw = p->sp_pwdp;
15024   ;
15025   return 0;
15026 }
15027 _ACEOF
15028 rm -rf conftest.$ac_objext
15029 if { (ac_try="$ac_compile"
15030 case "(($ac_try" in
15031   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15032   *) ac_try_echo=$ac_try;;
15033 esac
15034 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
15035 $as_echo "$ac_try_echo") >&5
15036   (eval "$ac_compile") 2>conftest.er1
15037   ac_status=$?
15038   grep -v '^ *+' conftest.er1 >conftest.err
15039   rm -rf conftest.er1
15040   cat conftest.err >&5
15041   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
15042   (exit $ac_status); } && {
15043          test -z "$ac_c_werror_flag" ||
15044          test ! -s conftest.err
15045        } && test -s conftest.$ac_objext; then
15046   ac_cv_shadow=yes
15047 else
15048   $as_echo "$as_me: failed program was:" >&5
15049 sed 's/^/| /' conftest.$ac_ext >&5
15050
15051         ac_cv_shadow=no
15052 fi
15053
15054 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15055   CPPFLAGS="$ac_save_CPPFLAGS"
15056 fi
15057 { $as_echo "$as_me:$LINENO: result: $ac_cv_shadow" >&5
15058 $as_echo "$ac_cv_shadow" >&6; }
15059   if test "$ac_cv_shadow" = yes; then
15060     have_shadow=yes
15061     need_setuid=yes
15062
15063     # On some systems (UnixWare 2.1), getspnam() is in -lgen instead of -lc.
15064     have_getspnam=no
15065     { $as_echo "$as_me:$LINENO: checking for getspnam in -lc" >&5
15066 $as_echo_n "checking for getspnam in -lc... " >&6; }
15067 if test "${ac_cv_lib_c_getspnam+set}" = set; then
15068   $as_echo_n "(cached) " >&6
15069 else
15070   ac_check_lib_save_LIBS=$LIBS
15071 LIBS="-lc  $LIBS"
15072 cat >conftest.$ac_ext <<_ACEOF
15073 /* confdefs.h.  */
15074 _ACEOF
15075 cat confdefs.h >>conftest.$ac_ext
15076 cat >>conftest.$ac_ext <<_ACEOF
15077 /* end confdefs.h.  */
15078
15079 /* Override any GCC internal prototype to avoid an error.
15080    Use char because int might match the return type of a GCC
15081    builtin and then its argument prototype would still apply.  */
15082 #ifdef __cplusplus
15083 extern "C"
15084 #endif
15085 char getspnam ();
15086 int
15087 main ()
15088 {
15089 return getspnam ();
15090   ;
15091   return 0;
15092 }
15093 _ACEOF
15094 rm -rf conftest.$ac_objext conftest$ac_exeext
15095 if { (ac_try="$ac_link"
15096 case "(($ac_try" in
15097   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15098   *) ac_try_echo=$ac_try;;
15099 esac
15100 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
15101 $as_echo "$ac_try_echo") >&5
15102   (eval "$ac_link") 2>conftest.er1
15103   ac_status=$?
15104   grep -v '^ *+' conftest.er1 >conftest.err
15105   rm -rf conftest.er1
15106   cat conftest.err >&5
15107   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
15108   (exit $ac_status); } && {
15109          test -z "$ac_c_werror_flag" ||
15110          test ! -s conftest.err
15111        } && test -s conftest$ac_exeext && {
15112          test "$cross_compiling" = yes ||
15113          $as_test_x conftest$ac_exeext
15114        }; then
15115   ac_cv_lib_c_getspnam=yes
15116 else
15117   $as_echo "$as_me: failed program was:" >&5
15118 sed 's/^/| /' conftest.$ac_ext >&5
15119
15120         ac_cv_lib_c_getspnam=no
15121 fi
15122
15123 rm -rf conftest.dSYM
15124 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
15125       conftest$ac_exeext conftest.$ac_ext
15126 LIBS=$ac_check_lib_save_LIBS
15127 fi
15128 { $as_echo "$as_me:$LINENO: result: $ac_cv_lib_c_getspnam" >&5
15129 $as_echo "$ac_cv_lib_c_getspnam" >&6; }
15130 if test "x$ac_cv_lib_c_getspnam" = x""yes; then
15131   have_getspnam=yes
15132 fi
15133
15134     if test "$have_getspnam" = no ; then
15135       { $as_echo "$as_me:$LINENO: checking for getspnam in -lgen" >&5
15136 $as_echo_n "checking for getspnam in -lgen... " >&6; }
15137 if test "${ac_cv_lib_gen_getspnam+set}" = set; then
15138   $as_echo_n "(cached) " >&6
15139 else
15140   ac_check_lib_save_LIBS=$LIBS
15141 LIBS="-lgen  $LIBS"
15142 cat >conftest.$ac_ext <<_ACEOF
15143 /* confdefs.h.  */
15144 _ACEOF
15145 cat confdefs.h >>conftest.$ac_ext
15146 cat >>conftest.$ac_ext <<_ACEOF
15147 /* end confdefs.h.  */
15148
15149 /* Override any GCC internal prototype to avoid an error.
15150    Use char because int might match the return type of a GCC
15151    builtin and then its argument prototype would still apply.  */
15152 #ifdef __cplusplus
15153 extern "C"
15154 #endif
15155 char getspnam ();
15156 int
15157 main ()
15158 {
15159 return getspnam ();
15160   ;
15161   return 0;
15162 }
15163 _ACEOF
15164 rm -rf conftest.$ac_objext conftest$ac_exeext
15165 if { (ac_try="$ac_link"
15166 case "(($ac_try" in
15167   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15168   *) ac_try_echo=$ac_try;;
15169 esac
15170 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
15171 $as_echo "$ac_try_echo") >&5
15172   (eval "$ac_link") 2>conftest.er1
15173   ac_status=$?
15174   grep -v '^ *+' conftest.er1 >conftest.err
15175   rm -rf conftest.er1
15176   cat conftest.err >&5
15177   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
15178   (exit $ac_status); } && {
15179          test -z "$ac_c_werror_flag" ||
15180          test ! -s conftest.err
15181        } && test -s conftest$ac_exeext && {
15182          test "$cross_compiling" = yes ||
15183          $as_test_x conftest$ac_exeext
15184        }; then
15185   ac_cv_lib_gen_getspnam=yes
15186 else
15187   $as_echo "$as_me: failed program was:" >&5
15188 sed 's/^/| /' conftest.$ac_ext >&5
15189
15190         ac_cv_lib_gen_getspnam=no
15191 fi
15192
15193 rm -rf conftest.dSYM
15194 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
15195       conftest$ac_exeext conftest.$ac_ext
15196 LIBS=$ac_check_lib_save_LIBS
15197 fi
15198 { $as_echo "$as_me:$LINENO: result: $ac_cv_lib_gen_getspnam" >&5
15199 $as_echo "$ac_cv_lib_gen_getspnam" >&6; }
15200 if test "x$ac_cv_lib_gen_getspnam" = x""yes; then
15201   have_getspnam=yes; PASSWD_LIBS="$PASSWD_LIBS -lgen"
15202 fi
15203
15204     fi
15205   fi
15206 fi
15207
15208
15209 ###############################################################################
15210 #
15211 #       Check for other libraries needed for non-shadow passwords.
15212 #
15213 ###############################################################################
15214
15215 if test "$enable_locking" = yes ; then
15216
15217   # On some systems (UnixWare 2.1), crypt() is in -lcrypt instead of -lc.
15218   have_crypt=no
15219   { $as_echo "$as_me:$LINENO: checking for crypt in -lc" >&5
15220 $as_echo_n "checking for crypt in -lc... " >&6; }
15221 if test "${ac_cv_lib_c_crypt+set}" = set; then
15222   $as_echo_n "(cached) " >&6
15223 else
15224   ac_check_lib_save_LIBS=$LIBS
15225 LIBS="-lc  $LIBS"
15226 cat >conftest.$ac_ext <<_ACEOF
15227 /* confdefs.h.  */
15228 _ACEOF
15229 cat confdefs.h >>conftest.$ac_ext
15230 cat >>conftest.$ac_ext <<_ACEOF
15231 /* end confdefs.h.  */
15232
15233 /* Override any GCC internal prototype to avoid an error.
15234    Use char because int might match the return type of a GCC
15235    builtin and then its argument prototype would still apply.  */
15236 #ifdef __cplusplus
15237 extern "C"
15238 #endif
15239 char crypt ();
15240 int
15241 main ()
15242 {
15243 return crypt ();
15244   ;
15245   return 0;
15246 }
15247 _ACEOF
15248 rm -rf conftest.$ac_objext conftest$ac_exeext
15249 if { (ac_try="$ac_link"
15250 case "(($ac_try" in
15251   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15252   *) ac_try_echo=$ac_try;;
15253 esac
15254 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
15255 $as_echo "$ac_try_echo") >&5
15256   (eval "$ac_link") 2>conftest.er1
15257   ac_status=$?
15258   grep -v '^ *+' conftest.er1 >conftest.err
15259   rm -rf conftest.er1
15260   cat conftest.err >&5
15261   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
15262   (exit $ac_status); } && {
15263          test -z "$ac_c_werror_flag" ||
15264          test ! -s conftest.err
15265        } && test -s conftest$ac_exeext && {
15266          test "$cross_compiling" = yes ||
15267          $as_test_x conftest$ac_exeext
15268        }; then
15269   ac_cv_lib_c_crypt=yes
15270 else
15271   $as_echo "$as_me: failed program was:" >&5
15272 sed 's/^/| /' conftest.$ac_ext >&5
15273
15274         ac_cv_lib_c_crypt=no
15275 fi
15276
15277 rm -rf conftest.dSYM
15278 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
15279       conftest$ac_exeext conftest.$ac_ext
15280 LIBS=$ac_check_lib_save_LIBS
15281 fi
15282 { $as_echo "$as_me:$LINENO: result: $ac_cv_lib_c_crypt" >&5
15283 $as_echo "$ac_cv_lib_c_crypt" >&6; }
15284 if test "x$ac_cv_lib_c_crypt" = x""yes; then
15285   have_crypt=yes
15286 fi
15287
15288   if test "$have_crypt" = no ; then
15289     { $as_echo "$as_me:$LINENO: checking for crypt in -lcrypt" >&5
15290 $as_echo_n "checking for crypt in -lcrypt... " >&6; }
15291 if test "${ac_cv_lib_crypt_crypt+set}" = set; then
15292   $as_echo_n "(cached) " >&6
15293 else
15294   ac_check_lib_save_LIBS=$LIBS
15295 LIBS="-lcrypt  $LIBS"
15296 cat >conftest.$ac_ext <<_ACEOF
15297 /* confdefs.h.  */
15298 _ACEOF
15299 cat confdefs.h >>conftest.$ac_ext
15300 cat >>conftest.$ac_ext <<_ACEOF
15301 /* end confdefs.h.  */
15302
15303 /* Override any GCC internal prototype to avoid an error.
15304    Use char because int might match the return type of a GCC
15305    builtin and then its argument prototype would still apply.  */
15306 #ifdef __cplusplus
15307 extern "C"
15308 #endif
15309 char crypt ();
15310 int
15311 main ()
15312 {
15313 return crypt ();
15314   ;
15315   return 0;
15316 }
15317 _ACEOF
15318 rm -rf conftest.$ac_objext conftest$ac_exeext
15319 if { (ac_try="$ac_link"
15320 case "(($ac_try" in
15321   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15322   *) ac_try_echo=$ac_try;;
15323 esac
15324 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
15325 $as_echo "$ac_try_echo") >&5
15326   (eval "$ac_link") 2>conftest.er1
15327   ac_status=$?
15328   grep -v '^ *+' conftest.er1 >conftest.err
15329   rm -rf conftest.er1
15330   cat conftest.err >&5
15331   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
15332   (exit $ac_status); } && {
15333          test -z "$ac_c_werror_flag" ||
15334          test ! -s conftest.err
15335        } && test -s conftest$ac_exeext && {
15336          test "$cross_compiling" = yes ||
15337          $as_test_x conftest$ac_exeext
15338        }; then
15339   ac_cv_lib_crypt_crypt=yes
15340 else
15341   $as_echo "$as_me: failed program was:" >&5
15342 sed 's/^/| /' conftest.$ac_ext >&5
15343
15344         ac_cv_lib_crypt_crypt=no
15345 fi
15346
15347 rm -rf conftest.dSYM
15348 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
15349       conftest$ac_exeext conftest.$ac_ext
15350 LIBS=$ac_check_lib_save_LIBS
15351 fi
15352 { $as_echo "$as_me:$LINENO: result: $ac_cv_lib_crypt_crypt" >&5
15353 $as_echo "$ac_cv_lib_crypt_crypt" >&6; }
15354 if test "x$ac_cv_lib_crypt_crypt" = x""yes; then
15355   have_crypt=yes; PASSWD_LIBS="$PASSWD_LIBS -lcrypt"
15356 fi
15357
15358   fi
15359 fi
15360
15361
15362 # Most of the above shadow mechanisms will have set need_setuid to yes,
15363 # if they were found.  But, on some systems, we need setuid even when
15364 # using plain old vanilla passwords.
15365 #
15366 if test "$enable_locking" = yes ; then
15367   case "$host" in
15368     *-hpux* | *-aix* | *-netbsd* | *-freebsd* | *-openbsd* )
15369       need_setuid=yes
15370     ;;
15371   esac
15372 fi
15373
15374
15375 if test "$have_shadow_adjunct" = yes ; then
15376   cat >>confdefs.h <<\_ACEOF
15377 #define HAVE_ADJUNCT_PASSWD 1
15378 _ACEOF
15379
15380 elif test "$have_shadow_enhanced" = yes ; then
15381   cat >>confdefs.h <<\_ACEOF
15382 #define HAVE_ENHANCED_PASSWD 1
15383 _ACEOF
15384
15385 elif test "$have_shadow_hpux" = yes ; then
15386   cat >>confdefs.h <<\_ACEOF
15387 #define HAVE_HPUX_PASSWD 1
15388 _ACEOF
15389
15390 elif test "$have_shadow" = yes ; then
15391   cat >>confdefs.h <<\_ACEOF
15392 #define HAVE_SHADOW_PASSWD 1
15393 _ACEOF
15394
15395 fi
15396
15397
15398 ###############################################################################
15399 #
15400 #       Check for external password helper
15401 #       On SuSE, instead of having xscreensaver be a setuid program, they
15402 #       fork an external program that takes the password on stdin, and
15403 #       returns true if that password is a valid one.  Then only that
15404 #       smaller program needs to be setuid.
15405 #
15406 #       (Note that this external program is not a GUI: the GUI is still
15407 #       all in xscreensaver itself; the external program just does auth.)
15408 #
15409 ###############################################################################
15410
15411 have_passwd_helper=no
15412 with_passwd_helper_req=unspecified
15413
15414
15415 # Check whether --with-passwd-helper was given.
15416 if test "${with_passwd_helper+set}" = set; then
15417   withval=$with_passwd_helper; with_passwd_helper="$withval"; with_passwd_helper_req="$withval"
15418 else
15419   with_passwd_helper=no
15420 fi
15421
15422 # no HANDLE_X_PATH_ARG for this one
15423
15424 if test "$enable_locking" = no ; then
15425   with_passwd_helper_req=no
15426   with_passwd_helper=no
15427 fi
15428
15429 case "$with_passwd_helper" in
15430   ""|no) : ;;
15431   /*)
15432     cat >>confdefs.h <<_ACEOF
15433 #define PASSWD_HELPER_PROGRAM "$with_passwd_helper"
15434 _ACEOF
15435
15436     have_passwd_helper=yes;;
15437   *)
15438     echo "error: --with-passwd-helper needs full pathname of helper (not '$with_passwd_helper')." >&2
15439     exit 1
15440 esac
15441
15442
15443 ###############################################################################
15444 #
15445 #       Check for a login manager for a "New Login" button on the lock dialog.
15446 #       Usually this will be "/usr/bin/gdmflexiserver".
15447 #
15448 ###############################################################################
15449
15450 with_login_manager_req=unspecified
15451 default_login_manager_1='gdmflexiserver -ls'
15452 default_login_manager_2='kdmctl reserve'
15453
15454
15455 # Check whether --with-login-manager was given.
15456 if test "${with_login_manager+set}" = set; then
15457   withval=$with_login_manager; with_login_manager="$withval"; with_login_manager_req="$withval"
15458 else
15459   with_login_manager=yes
15460 fi
15461
15462 # no HANDLE_X_PATH_ARG for this one
15463
15464 if test "$enable_locking" = no ; then
15465   with_login_manager_req=no
15466   with_login_manager=no
15467 fi
15468
15469 case "$with_login_manager_req" in
15470   no)
15471     with_login_manager=""
15472   ;;
15473
15474   yes|unspecified)
15475     # Try both defaults, use the one that exists.
15476
15477     set dummy $default_login_manager_1 ; login_manager_tmp=$2
15478     unset ac_cv_path_login_manager_tmp  # don't cache
15479     # Extract the first word of "$login_manager_tmp", so it can be a program name with args.
15480 set dummy $login_manager_tmp; ac_word=$2
15481 { $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
15482 $as_echo_n "checking for $ac_word... " >&6; }
15483 if test "${ac_cv_path_login_manager_tmp+set}" = set; then
15484   $as_echo_n "(cached) " >&6
15485 else
15486   case $login_manager_tmp in
15487   [\\/]* | ?:[\\/]*)
15488   ac_cv_path_login_manager_tmp="$login_manager_tmp" # Let the user override the test with a path.
15489   ;;
15490   *)
15491   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
15492 for as_dir in $PATH
15493 do
15494   IFS=$as_save_IFS
15495   test -z "$as_dir" && as_dir=.
15496   for ac_exec_ext in '' $ac_executable_extensions; do
15497   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
15498     ac_cv_path_login_manager_tmp="$as_dir/$ac_word$ac_exec_ext"
15499     $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
15500     break 2
15501   fi
15502 done
15503 done
15504 IFS=$as_save_IFS
15505
15506   ;;
15507 esac
15508 fi
15509 login_manager_tmp=$ac_cv_path_login_manager_tmp
15510 if test -n "$login_manager_tmp"; then
15511   { $as_echo "$as_me:$LINENO: result: $login_manager_tmp" >&5
15512 $as_echo "$login_manager_tmp" >&6; }
15513 else
15514   { $as_echo "$as_me:$LINENO: result: no" >&5
15515 $as_echo "no" >&6; }
15516 fi
15517
15518
15519     if test ! -z "$login_manager_tmp" ; then
15520       with_login_manager="$default_login_manager_1"
15521     else
15522       set dummy $default_login_manager_2 ; login_manager_tmp=$2
15523       unset ac_cv_path_login_manager_tmp  # don't cache
15524       # Extract the first word of "$login_manager_tmp", so it can be a program name with args.
15525 set dummy $login_manager_tmp; ac_word=$2
15526 { $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
15527 $as_echo_n "checking for $ac_word... " >&6; }
15528 if test "${ac_cv_path_login_manager_tmp+set}" = set; then
15529   $as_echo_n "(cached) " >&6
15530 else
15531   case $login_manager_tmp in
15532   [\\/]* | ?:[\\/]*)
15533   ac_cv_path_login_manager_tmp="$login_manager_tmp" # Let the user override the test with a path.
15534   ;;
15535   *)
15536   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
15537 for as_dir in $PATH
15538 do
15539   IFS=$as_save_IFS
15540   test -z "$as_dir" && as_dir=.
15541   for ac_exec_ext in '' $ac_executable_extensions; do
15542   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
15543     ac_cv_path_login_manager_tmp="$as_dir/$ac_word$ac_exec_ext"
15544     $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
15545     break 2
15546   fi
15547 done
15548 done
15549 IFS=$as_save_IFS
15550
15551   ;;
15552 esac
15553 fi
15554 login_manager_tmp=$ac_cv_path_login_manager_tmp
15555 if test -n "$login_manager_tmp"; then
15556   { $as_echo "$as_me:$LINENO: result: $login_manager_tmp" >&5
15557 $as_echo "$login_manager_tmp" >&6; }
15558 else
15559   { $as_echo "$as_me:$LINENO: result: no" >&5
15560 $as_echo "no" >&6; }
15561 fi
15562
15563
15564       if test ! -z "$login_manager_tmp" ; then
15565         with_login_manager="$default_login_manager_2"
15566       else
15567         with_login_manager=""
15568       fi
15569     fi
15570   ;;
15571
15572   /*)
15573     # absolute path specified on cmd line
15574     set dummy $with_login_manager_req ; login_manager_tmp=$2
15575     { $as_echo "$as_me:$LINENO: checking for $login_manager_tmp" >&5
15576 $as_echo_n "checking for $login_manager_tmp... " >&6; }
15577     if test -x "$login_manager_tmp" ; then
15578       { $as_echo "$as_me:$LINENO: result: yes" >&5
15579 $as_echo "yes" >&6; }
15580     else
15581       { $as_echo "$as_me:$LINENO: result: no" >&5
15582 $as_echo "no" >&6; }
15583       with_login_manager=""
15584     fi
15585   ;;
15586
15587   *)
15588     # relative path specified on cmd line
15589     set dummy $with_login_manager_req ; login_manager_tmp=$2
15590     unset ac_cv_path_login_manager_tmp    # don't cache
15591     # Extract the first word of "$login_manager_tmp", so it can be a program name with args.
15592 set dummy $login_manager_tmp; ac_word=$2
15593 { $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
15594 $as_echo_n "checking for $ac_word... " >&6; }
15595 if test "${ac_cv_path_login_manager_tmp+set}" = set; then
15596   $as_echo_n "(cached) " >&6
15597 else
15598   case $login_manager_tmp in
15599   [\\/]* | ?:[\\/]*)
15600   ac_cv_path_login_manager_tmp="$login_manager_tmp" # Let the user override the test with a path.
15601   ;;
15602   *)
15603   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
15604 for as_dir in $PATH
15605 do
15606   IFS=$as_save_IFS
15607   test -z "$as_dir" && as_dir=.
15608   for ac_exec_ext in '' $ac_executable_extensions; do
15609   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
15610     ac_cv_path_login_manager_tmp="$as_dir/$ac_word$ac_exec_ext"
15611     $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
15612     break 2
15613   fi
15614 done
15615 done
15616 IFS=$as_save_IFS
15617
15618   ;;
15619 esac
15620 fi
15621 login_manager_tmp=$ac_cv_path_login_manager_tmp
15622 if test -n "$login_manager_tmp"; then
15623   { $as_echo "$as_me:$LINENO: result: $login_manager_tmp" >&5
15624 $as_echo "$login_manager_tmp" >&6; }
15625 else
15626   { $as_echo "$as_me:$LINENO: result: no" >&5
15627 $as_echo "no" >&6; }
15628 fi
15629
15630
15631     if test -z "$login_manager_tmp" ; then
15632       with_login_manager=""
15633     else
15634       with_login_manager="$login_manager_tmp"
15635     fi
15636   ;;
15637 esac
15638 ac_cv_login_manager_program="$with_login_manager"
15639
15640 NEW_LOGIN_COMMAND_P=''
15641 NEW_LOGIN_COMMAND="$ac_cv_login_manager_program"
15642
15643 { $as_echo "$as_me:$LINENO: checking for login manager" >&5
15644 $as_echo_n "checking for login manager... " >&6; }
15645 if test -z "$NEW_LOGIN_COMMAND" ; then
15646   NEW_LOGIN_COMMAND="$default_login_manager_1"
15647   NEW_LOGIN_COMMAND_P='! '
15648   { $as_echo "$as_me:$LINENO: result: $NEW_LOGIN_COMMAND (disabled)" >&5
15649 $as_echo "$NEW_LOGIN_COMMAND (disabled)" >&6; }
15650 else
15651   { $as_echo "$as_me:$LINENO: result: $NEW_LOGIN_COMMAND" >&5
15652 $as_echo "$NEW_LOGIN_COMMAND" >&6; }
15653 fi
15654
15655
15656 ###############################################################################
15657 #
15658 #       Check for -lgtk (and Gnome stuff)
15659 #
15660 ###############################################################################
15661
15662 have_gtk=no
15663 with_gtk_req=unspecified
15664
15665 # Check whether --with-gtk was given.
15666 if test "${with_gtk+set}" = set; then
15667   withval=$with_gtk; with_gtk="$withval"; with_gtk_req="$withval"
15668 else
15669   with_gtk=yes
15670 fi
15671
15672
15673 # if --with-gtk=/directory/ was specified, remember that directory so that
15674 # we can also look for the `gtk-config' program in that directory.
15675 case "$with_gtk" in
15676   /*)
15677     gtk_dir="$with_gtk"
15678     ;;
15679   *)
15680     gtk_dir=""
15681     ;;
15682 esac
15683
15684
15685    case "$with_gtk" in
15686     yes) ;;
15687     no)  ;;
15688
15689     /*)
15690      { $as_echo "$as_me:$LINENO: checking for Gtk headers" >&5
15691 $as_echo_n "checking for Gtk headers... " >&6; }
15692      d=$with_gtk/include
15693      if test -d $d; then
15694        X_CFLAGS="-I$d $X_CFLAGS"
15695        { $as_echo "$as_me:$LINENO: result: $d" >&5
15696 $as_echo "$d" >&6; }
15697      else
15698        { $as_echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
15699 $as_echo "not found ($d: no such directory)" >&6; }
15700      fi
15701
15702      { $as_echo "$as_me:$LINENO: checking for Gtk libs" >&5
15703 $as_echo_n "checking for Gtk libs... " >&6; }
15704      d=$with_gtk/lib
15705      if test -d $d; then
15706        X_LIBS="-L$d $X_LIBS"
15707        { $as_echo "$as_me:$LINENO: result: $d" >&5
15708 $as_echo "$d" >&6; }
15709      else
15710        { $as_echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
15711 $as_echo "not found ($d: no such directory)" >&6; }
15712      fi
15713
15714      # replace the directory string with "yes".
15715      with_gtk_req="yes"
15716      with_gtk=$with_gtk_req
15717      ;;
15718
15719     *)
15720      echo ""
15721      echo "error: argument to --with-gtk must be \"yes\", \"no\", or a directory."
15722      echo "       If it is a directory, then \`DIR/include' will be added to"
15723      echo "       the -I list, and \`DIR/lib' will be added to the -L list."
15724      exit 1
15725      ;;
15726    esac
15727
15728
15729 if test "$with_gtk" != yes -a "$with_gtk" != no ; then
15730   echo "error: must be yes or no: --with-gtk=$with_gtk"
15731   exit 1
15732 fi
15733
15734
15735 parse_gtk_version_string() {
15736   # M4 sucks!!
15737
15738   maj=`echo $ac_gtk_version_string | sed -n 's/\..*//p'`
15739   min=`echo $ac_gtk_version_string | sed -n 's/[^.]*\.\([^.]*\).*/\1/p'`
15740
15741   ac_gtk_version=`echo "$maj * 1000 + $min" | bc`
15742   if test -z "$ac_gtk_version"; then
15743     ac_gtk_version=unknown
15744     ac_gtk_version_string=unknown
15745   fi
15746 }
15747
15748 # Find pkg-config... (need this for both gtk and gdk_pixbuf.)
15749 # if the user specified --with-gtk=/foo/ then look there.
15750 #
15751 gtk_path="$PATH"
15752 if test ! -z "$gtk_dir"; then
15753   # canonicalize slashes.
15754   foo=`echo "${gtk_dir}/bin" | sed 's@//*@/@g'`
15755   gtk_path="$foo:$gtk_path"
15756 fi
15757
15758 for ac_prog in pkg-config
15759 do
15760   # Extract the first word of "$ac_prog", so it can be a program name with args.
15761 set dummy $ac_prog; ac_word=$2
15762 { $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
15763 $as_echo_n "checking for $ac_word... " >&6; }
15764 if test "${ac_cv_path_pkg_config+set}" = set; then
15765   $as_echo_n "(cached) " >&6
15766 else
15767   case $pkg_config in
15768   [\\/]* | ?:[\\/]*)
15769   ac_cv_path_pkg_config="$pkg_config" # Let the user override the test with a path.
15770   ;;
15771   *)
15772   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
15773 for as_dir in $gtk_path
15774 do
15775   IFS=$as_save_IFS
15776   test -z "$as_dir" && as_dir=.
15777   for ac_exec_ext in '' $ac_executable_extensions; do
15778   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
15779     ac_cv_path_pkg_config="$as_dir/$ac_word$ac_exec_ext"
15780     $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
15781     break 2
15782   fi
15783 done
15784 done
15785 IFS=$as_save_IFS
15786
15787   ;;
15788 esac
15789 fi
15790 pkg_config=$ac_cv_path_pkg_config
15791 if test -n "$pkg_config"; then
15792   { $as_echo "$as_me:$LINENO: result: $pkg_config" >&5
15793 $as_echo "$pkg_config" >&6; }
15794 else
15795   { $as_echo "$as_me:$LINENO: result: no" >&5
15796 $as_echo "no" >&6; }
15797 fi
15798
15799
15800   test -n "$pkg_config" && break
15801 done
15802
15803
15804 if test -z "$pkg_config" ; then
15805   { $as_echo "$as_me:$LINENO: WARNING: pkg-config not found!" >&5
15806 $as_echo "$as_me: WARNING: pkg-config not found!" >&2;}
15807   pkg_config="false"
15808 fi
15809
15810
15811 # Utility function for running pkg-config-based tests...
15812 #
15813 pkgs=''
15814 pkg_check_version() {
15815   if test "$ok" = yes ; then
15816     req="$1"
15817     min="$2"
15818     { $as_echo "$as_me:$LINENO: checking for $req" >&5
15819 $as_echo_n "checking for $req... " >&6; }
15820     if $pkg_config --exists "$req" ; then
15821       vers=`$pkg_config --modversion "$req"`
15822       if $pkg_config --exists "$req >= $min" ; then
15823         { $as_echo "$as_me:$LINENO: result: $vers" >&5
15824 $as_echo "$vers" >&6; }
15825         pkgs="$pkgs $req"
15826         return 1
15827       else
15828         { $as_echo "$as_me:$LINENO: result: $vers (wanted >= $min)" >&5
15829 $as_echo "$vers (wanted >= $min)" >&6; }
15830         ok=no
15831         return 0
15832       fi
15833     else
15834       { $as_echo "$as_me:$LINENO: result: no" >&5
15835 $as_echo "no" >&6; }
15836       ok=no
15837       return 0
15838     fi
15839   fi
15840 }
15841
15842
15843 jurassic_gtk=no
15844 gtk_halfassed=no
15845
15846 if test "$with_gtk" = yes; then
15847   have_gtk=no
15848
15849   ok="yes"
15850   pkg_check_version            gtk+-2.0  2.0.1  ; ac_gtk_version_string="$vers"
15851   pkg_check_version         gmodule-2.0  2.0.0
15852   pkg_check_version          libxml-2.0  2.4.6
15853   pkg_check_version        libglade-2.0  1.99.0
15854   pkg_check_version      gdk-pixbuf-2.0  2.0.0
15855   pkg_check_version gdk-pixbuf-xlib-2.0  2.0.0
15856   have_gtk="$ok"
15857
15858   if test "$have_gtk" = no; then
15859     if test -n "$ac_gtk_version_string" ; then
15860       gtk_halfassed="$ac_gtk_version_string"
15861       gtk_halfassed_lib="$req"
15862     fi
15863   fi
15864
15865   if test "$have_gtk" = yes; then
15866     parse_gtk_version_string
15867     jurassic_gtk=no
15868   fi
15869
15870   if test "$have_gtk" = yes; then
15871     { $as_echo "$as_me:$LINENO: checking for Gtk includes" >&5
15872 $as_echo_n "checking for Gtk includes... " >&6; }
15873 if test "${ac_cv_gtk_config_cflags+set}" = set; then
15874   $as_echo_n "(cached) " >&6
15875 else
15876   ac_cv_gtk_config_cflags=`$pkg_config --cflags $pkgs`
15877 fi
15878 { $as_echo "$as_me:$LINENO: result: $ac_cv_gtk_config_cflags" >&5
15879 $as_echo "$ac_cv_gtk_config_cflags" >&6; }
15880     { $as_echo "$as_me:$LINENO: checking for Gtk libs" >&5
15881 $as_echo_n "checking for Gtk libs... " >&6; }
15882 if test "${ac_cv_gtk_config_libs+set}" = set; then
15883   $as_echo_n "(cached) " >&6
15884 else
15885   ac_cv_gtk_config_libs=`$pkg_config --libs $pkgs`
15886 fi
15887 { $as_echo "$as_me:$LINENO: result: $ac_cv_gtk_config_libs" >&5
15888 $as_echo "$ac_cv_gtk_config_libs" >&6; }
15889   fi
15890
15891   ac_gtk_config_cflags=$ac_cv_gtk_config_cflags
15892   ac_gtk_config_libs=$ac_cv_gtk_config_libs
15893
15894   GTK_EXTRA_OBJS=""
15895   GTK_DATADIR=""
15896   if test "$have_gtk" = yes; then
15897     GTK_DATADIR=`$pkg_config --variable=prefix gtk+-2.0`
15898     GTK_DATADIR="$GTK_DATADIR/share"
15899   fi
15900
15901   if test "$have_gtk" = yes; then
15902     INCLUDES="$INCLUDES $ac_gtk_config_cflags"
15903     GTK_LIBS="$GTK_LIBS $ac_gtk_config_libs"
15904     cat >>confdefs.h <<\_ACEOF
15905 #define HAVE_GTK 1
15906 _ACEOF
15907
15908     cat >>confdefs.h <<\_ACEOF
15909 #define HAVE_GTK2 1
15910 _ACEOF
15911
15912     cat >>confdefs.h <<\_ACEOF
15913 #define HAVE_XML 1
15914 _ACEOF
15915
15916   fi
15917
15918 fi
15919
15920
15921 # Check for the various Gnome help and URL loading programs.
15922 #
15923 WITH_BROWSER=gnome-open
15924 if test "$have_gtk" = yes; then
15925   for ac_prog in gnome-open
15926 do
15927   # Extract the first word of "$ac_prog", so it can be a program name with args.
15928 set dummy $ac_prog; ac_word=$2
15929 { $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
15930 $as_echo_n "checking for $ac_word... " >&6; }
15931 if test "${ac_cv_prog_gnome_open_program+set}" = set; then
15932   $as_echo_n "(cached) " >&6
15933 else
15934   if test -n "$gnome_open_program"; then
15935   ac_cv_prog_gnome_open_program="$gnome_open_program" # Let the user override the test.
15936 else
15937 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
15938 for as_dir in $PATH
15939 do
15940   IFS=$as_save_IFS
15941   test -z "$as_dir" && as_dir=.
15942   for ac_exec_ext in '' $ac_executable_extensions; do
15943   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
15944     ac_cv_prog_gnome_open_program="$ac_prog"
15945     $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
15946     break 2
15947   fi
15948 done
15949 done
15950 IFS=$as_save_IFS
15951
15952 fi
15953 fi
15954 gnome_open_program=$ac_cv_prog_gnome_open_program
15955 if test -n "$gnome_open_program"; then
15956   { $as_echo "$as_me:$LINENO: result: $gnome_open_program" >&5
15957 $as_echo "$gnome_open_program" >&6; }
15958 else
15959   { $as_echo "$as_me:$LINENO: result: no" >&5
15960 $as_echo "no" >&6; }
15961 fi
15962
15963
15964   test -n "$gnome_open_program" && break
15965 done
15966
15967   for ac_prog in gnome-url-show
15968 do
15969   # Extract the first word of "$ac_prog", so it can be a program name with args.
15970 set dummy $ac_prog; ac_word=$2
15971 { $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
15972 $as_echo_n "checking for $ac_word... " >&6; }
15973 if test "${ac_cv_prog_gnome_url_show_program+set}" = set; then
15974   $as_echo_n "(cached) " >&6
15975 else
15976   if test -n "$gnome_url_show_program"; then
15977   ac_cv_prog_gnome_url_show_program="$gnome_url_show_program" # Let the user override the test.
15978 else
15979 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
15980 for as_dir in $PATH
15981 do
15982   IFS=$as_save_IFS
15983   test -z "$as_dir" && as_dir=.
15984   for ac_exec_ext in '' $ac_executable_extensions; do
15985   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
15986     ac_cv_prog_gnome_url_show_program="$ac_prog"
15987     $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
15988     break 2
15989   fi
15990 done
15991 done
15992 IFS=$as_save_IFS
15993
15994 fi
15995 fi
15996 gnome_url_show_program=$ac_cv_prog_gnome_url_show_program
15997 if test -n "$gnome_url_show_program"; then
15998   { $as_echo "$as_me:$LINENO: result: $gnome_url_show_program" >&5
15999 $as_echo "$gnome_url_show_program" >&6; }
16000 else
16001   { $as_echo "$as_me:$LINENO: result: no" >&5
16002 $as_echo "no" >&6; }
16003 fi
16004
16005
16006   test -n "$gnome_url_show_program" && break
16007 done
16008
16009 fi
16010
16011
16012 ###############################################################################
16013 #
16014 #       Check for -lXm.
16015 #
16016 ###############################################################################
16017
16018 have_motif=no
16019 with_motif_req=unspecified
16020
16021 # Check whether --with-motif was given.
16022 if test "${with_motif+set}" = set; then
16023   withval=$with_motif; with_motif="$withval"; with_motif_req="$withval"
16024 else
16025   with_motif=no
16026 fi
16027
16028
16029
16030    case "$with_motif" in
16031     yes) ;;
16032     no)  ;;
16033
16034     /*)
16035      { $as_echo "$as_me:$LINENO: checking for Motif headers" >&5
16036 $as_echo_n "checking for Motif headers... " >&6; }
16037      d=$with_motif/include
16038      if test -d $d; then
16039        X_CFLAGS="-I$d $X_CFLAGS"
16040        { $as_echo "$as_me:$LINENO: result: $d" >&5
16041 $as_echo "$d" >&6; }
16042      else
16043        { $as_echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
16044 $as_echo "not found ($d: no such directory)" >&6; }
16045      fi
16046
16047      { $as_echo "$as_me:$LINENO: checking for Motif libs" >&5
16048 $as_echo_n "checking for Motif libs... " >&6; }
16049      d=$with_motif/lib
16050      if test -d $d; then
16051        X_LIBS="-L$d $X_LIBS"
16052        { $as_echo "$as_me:$LINENO: result: $d" >&5
16053 $as_echo "$d" >&6; }
16054      else
16055        { $as_echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
16056 $as_echo "not found ($d: no such directory)" >&6; }
16057      fi
16058
16059      # replace the directory string with "yes".
16060      with_motif_req="yes"
16061      with_motif=$with_motif_req
16062      ;;
16063
16064     *)
16065      echo ""
16066      echo "error: argument to --with-motif must be \"yes\", \"no\", or a directory."
16067      echo "       If it is a directory, then \`DIR/include' will be added to"
16068      echo "       the -I list, and \`DIR/lib' will be added to the -L list."
16069      exit 1
16070      ;;
16071    esac
16072
16073
16074 if test "$with_motif" != yes -a "$with_motif" != no ; then
16075   echo "error: must be yes or no: --with-motif=$with_motif"
16076   exit 1
16077 fi
16078
16079 if test "$with_motif" = yes; then
16080   have_motif=no
16081
16082   ac_save_CPPFLAGS="$CPPFLAGS"
16083   if test \! -z "$includedir" ; then
16084     CPPFLAGS="$CPPFLAGS -I$includedir"
16085   fi
16086   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
16087   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
16088   { $as_echo "$as_me:$LINENO: checking for Xm/Xm.h" >&5
16089 $as_echo_n "checking for Xm/Xm.h... " >&6; }
16090 if test "${ac_cv_header_Xm_Xm_h+set}" = set; then
16091   $as_echo_n "(cached) " >&6
16092 else
16093   cat >conftest.$ac_ext <<_ACEOF
16094 /* confdefs.h.  */
16095 _ACEOF
16096 cat confdefs.h >>conftest.$ac_ext
16097 cat >>conftest.$ac_ext <<_ACEOF
16098 /* end confdefs.h.  */
16099 #include <stdlib.h>
16100                      #include <stdio.h>
16101                      #include <X11/Intrinsic.h>
16102
16103 #include <Xm/Xm.h>
16104 _ACEOF
16105 rm -rf conftest.$ac_objext
16106 if { (ac_try="$ac_compile"
16107 case "(($ac_try" in
16108   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16109   *) ac_try_echo=$ac_try;;
16110 esac
16111 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
16112 $as_echo "$ac_try_echo") >&5
16113   (eval "$ac_compile") 2>conftest.er1
16114   ac_status=$?
16115   grep -v '^ *+' conftest.er1 >conftest.err
16116   rm -rf conftest.er1
16117   cat conftest.err >&5
16118   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
16119   (exit $ac_status); } && {
16120          test -z "$ac_c_werror_flag" ||
16121          test ! -s conftest.err
16122        } && test -s conftest.$ac_objext; then
16123   ac_cv_header_Xm_Xm_h=yes
16124 else
16125   $as_echo "$as_me: failed program was:" >&5
16126 sed 's/^/| /' conftest.$ac_ext >&5
16127
16128         ac_cv_header_Xm_Xm_h=no
16129 fi
16130
16131 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16132 fi
16133 { $as_echo "$as_me:$LINENO: result: $ac_cv_header_Xm_Xm_h" >&5
16134 $as_echo "$ac_cv_header_Xm_Xm_h" >&6; }
16135 if test "x$ac_cv_header_Xm_Xm_h" = x""yes; then
16136   have_motif=yes
16137                      cat >>confdefs.h <<\_ACEOF
16138 #define HAVE_MOTIF 1
16139 _ACEOF
16140
16141                      MOTIF_LIBS="$MOTIF_LIBS -lXm"
16142 fi
16143
16144
16145   CPPFLAGS="$ac_save_CPPFLAGS"
16146 fi
16147
16148
16149 if test "$have_motif" = yes; then
16150
16151   ac_save_CPPFLAGS="$CPPFLAGS"
16152   if test \! -z "$includedir" ; then
16153     CPPFLAGS="$CPPFLAGS -I$includedir"
16154   fi
16155   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
16156   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
16157   { $as_echo "$as_me:$LINENO: checking for Xm/ComboBox.h" >&5
16158 $as_echo_n "checking for Xm/ComboBox.h... " >&6; }
16159 if test "${ac_cv_header_Xm_ComboBox_h+set}" = set; then
16160   $as_echo_n "(cached) " >&6
16161 else
16162   cat >conftest.$ac_ext <<_ACEOF
16163 /* confdefs.h.  */
16164 _ACEOF
16165 cat confdefs.h >>conftest.$ac_ext
16166 cat >>conftest.$ac_ext <<_ACEOF
16167 /* end confdefs.h.  */
16168 #include <stdlib.h>
16169                      #include <stdio.h>
16170                      #include <X11/Intrinsic.h>
16171
16172 #include <Xm/ComboBox.h>
16173 _ACEOF
16174 rm -rf conftest.$ac_objext
16175 if { (ac_try="$ac_compile"
16176 case "(($ac_try" in
16177   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16178   *) ac_try_echo=$ac_try;;
16179 esac
16180 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
16181 $as_echo "$ac_try_echo") >&5
16182   (eval "$ac_compile") 2>conftest.er1
16183   ac_status=$?
16184   grep -v '^ *+' conftest.er1 >conftest.err
16185   rm -rf conftest.er1
16186   cat conftest.err >&5
16187   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
16188   (exit $ac_status); } && {
16189          test -z "$ac_c_werror_flag" ||
16190          test ! -s conftest.err
16191        } && test -s conftest.$ac_objext; then
16192   ac_cv_header_Xm_ComboBox_h=yes
16193 else
16194   $as_echo "$as_me: failed program was:" >&5
16195 sed 's/^/| /' conftest.$ac_ext >&5
16196
16197         ac_cv_header_Xm_ComboBox_h=no
16198 fi
16199
16200 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16201 fi
16202 { $as_echo "$as_me:$LINENO: result: $ac_cv_header_Xm_ComboBox_h" >&5
16203 $as_echo "$ac_cv_header_Xm_ComboBox_h" >&6; }
16204 if test "x$ac_cv_header_Xm_ComboBox_h" = x""yes; then
16205   cat >>confdefs.h <<\_ACEOF
16206 #define HAVE_XMCOMBOBOX 1
16207 _ACEOF
16208
16209 fi
16210
16211
16212   CPPFLAGS="$ac_save_CPPFLAGS"
16213 fi
16214
16215
16216 ###############################################################################
16217 #
16218 #       Checking whether Motif is really Lesstif.
16219 #
16220 ###############################################################################
16221
16222 have_lesstif=no
16223 if test "$have_motif" = yes ; then
16224   { $as_echo "$as_me:$LINENO: checking whether Motif is really LessTif" >&5
16225 $as_echo_n "checking whether Motif is really LessTif... " >&6; }
16226 if test "${ac_cv_have_lesstif+set}" = set; then
16227   $as_echo_n "(cached) " >&6
16228 else
16229
16230   ac_save_CPPFLAGS="$CPPFLAGS"
16231   if test \! -z "$includedir" ; then
16232     CPPFLAGS="$CPPFLAGS -I$includedir"
16233   fi
16234   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
16235   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
16236   cat >conftest.$ac_ext <<_ACEOF
16237 /* confdefs.h.  */
16238 _ACEOF
16239 cat confdefs.h >>conftest.$ac_ext
16240 cat >>conftest.$ac_ext <<_ACEOF
16241 /* end confdefs.h.  */
16242 #include <Xm/Xm.h>
16243 int
16244 main ()
16245 {
16246 long vers = LesstifVersion;
16247   ;
16248   return 0;
16249 }
16250 _ACEOF
16251 rm -rf conftest.$ac_objext
16252 if { (ac_try="$ac_compile"
16253 case "(($ac_try" in
16254   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16255   *) ac_try_echo=$ac_try;;
16256 esac
16257 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
16258 $as_echo "$ac_try_echo") >&5
16259   (eval "$ac_compile") 2>conftest.er1
16260   ac_status=$?
16261   grep -v '^ *+' conftest.er1 >conftest.err
16262   rm -rf conftest.er1
16263   cat conftest.err >&5
16264   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
16265   (exit $ac_status); } && {
16266          test -z "$ac_c_werror_flag" ||
16267          test ! -s conftest.err
16268        } && test -s conftest.$ac_objext; then
16269   ac_cv_have_lesstif=yes
16270 else
16271   $as_echo "$as_me: failed program was:" >&5
16272 sed 's/^/| /' conftest.$ac_ext >&5
16273
16274         ac_cv_have_lesstif=no
16275 fi
16276
16277 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16278   CPPFLAGS="$ac_save_CPPFLAGS"
16279 fi
16280 { $as_echo "$as_me:$LINENO: result: $ac_cv_have_lesstif" >&5
16281 $as_echo "$ac_cv_have_lesstif" >&6; }
16282   have_lesstif=$ac_cv_have_lesstif
16283 fi
16284
16285
16286 lesstif_version=unknown
16287 lesstif_version_string=unknown
16288
16289 if test "$have_lesstif" = yes ; then
16290   ltv=unknown
16291   echo unknown > conftest-lt
16292   { $as_echo "$as_me:$LINENO: checking LessTif version number" >&5
16293 $as_echo_n "checking LessTif version number... " >&6; }
16294 if test "${ac_cv_lesstif_version_string+set}" = set; then
16295   $as_echo_n "(cached) " >&6
16296 else
16297
16298   ac_save_CPPFLAGS="$CPPFLAGS"
16299   if test \! -z "$includedir" ; then
16300     CPPFLAGS="$CPPFLAGS -I$includedir"
16301   fi
16302   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
16303   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
16304   if test "$cross_compiling" = yes; then
16305   ac_cv_lesstif_version=unknown
16306                      ac_cv_lesstif_version_string=unknown
16307 else
16308   cat >conftest.$ac_ext <<_ACEOF
16309 /* confdefs.h.  */
16310 _ACEOF
16311 cat confdefs.h >>conftest.$ac_ext
16312 cat >>conftest.$ac_ext <<_ACEOF
16313 /* end confdefs.h.  */
16314 #include <stdio.h>
16315                      #include <Xm/Xm.h>
16316                      int main() {
16317                        FILE *f = fopen("conftest-lt", "w");
16318                        if (!f) exit(1);
16319                        fprintf(f, "%d %d.%d\n", LesstifVersion,
16320                           LESSTIF_VERSION, LESSTIF_REVISION);
16321                        fclose(f);
16322                        exit(0);
16323                      }
16324 _ACEOF
16325 rm -rf conftest$ac_exeext
16326 if { (ac_try="$ac_link"
16327 case "(($ac_try" in
16328   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16329   *) ac_try_echo=$ac_try;;
16330 esac
16331 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
16332 $as_echo "$ac_try_echo") >&5
16333   (eval "$ac_link") 2>&5
16334   ac_status=$?
16335   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
16336   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
16337   { (case "(($ac_try" in
16338   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16339   *) ac_try_echo=$ac_try;;
16340 esac
16341 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
16342 $as_echo "$ac_try_echo") >&5
16343   (eval "$ac_try") 2>&5
16344   ac_status=$?
16345   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
16346   (exit $ac_status); }; }; then
16347   ltv=`cat conftest-lt`
16348                      ac_cv_lesstif_version=`echo $ltv | sed 's/ .*//'`
16349                      ac_cv_lesstif_version_string=`echo $ltv | sed 's/.* //'`
16350 else
16351   $as_echo "$as_me: program exited with status $ac_status" >&5
16352 $as_echo "$as_me: failed program was:" >&5
16353 sed 's/^/| /' conftest.$ac_ext >&5
16354
16355 ( exit $ac_status )
16356 ac_cv_lesstif_version=unknown
16357                      ac_cv_lesstif_version_string=unknown
16358 fi
16359 rm -rf conftest.dSYM
16360 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
16361 fi
16362
16363
16364   CPPFLAGS="$ac_save_CPPFLAGS"
16365 fi
16366 { $as_echo "$as_me:$LINENO: result: $ac_cv_lesstif_version_string" >&5
16367 $as_echo "$ac_cv_lesstif_version_string" >&6; }
16368   rm -rf conftest-lt
16369   lesstif_version=$ac_cv_lesstif_version
16370   lesstif_version_string=$ac_cv_lesstif_version_string
16371
16372 fi
16373
16374
16375 if test "$have_motif" = yes ; then
16376   mtv=unknown
16377   echo unknown > conftest-mt
16378   { $as_echo "$as_me:$LINENO: checking Motif version number" >&5
16379 $as_echo_n "checking Motif version number... " >&6; }
16380 if test "${ac_cv_motif_version_string+set}" = set; then
16381   $as_echo_n "(cached) " >&6
16382 else
16383
16384   ac_save_CPPFLAGS="$CPPFLAGS"
16385   if test \! -z "$includedir" ; then
16386     CPPFLAGS="$CPPFLAGS -I$includedir"
16387   fi
16388   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
16389   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
16390   if test "$cross_compiling" = yes; then
16391   ac_cv_motif_version=unknown
16392                      ac_cv_motif_version_string=unknown
16393 else
16394   cat >conftest.$ac_ext <<_ACEOF
16395 /* confdefs.h.  */
16396 _ACEOF
16397 cat confdefs.h >>conftest.$ac_ext
16398 cat >>conftest.$ac_ext <<_ACEOF
16399 /* end confdefs.h.  */
16400 #include <stdio.h>
16401                      #include <Xm/Xm.h>
16402                      int main() {
16403                        FILE *f = fopen("conftest-mt", "w");
16404                        if (!f) exit(1);
16405                        fprintf(f, "%d %d.%d\n", XmVersion,
16406                           XmVERSION, XmREVISION);
16407                        fclose(f);
16408                        exit(0);
16409                      }
16410 _ACEOF
16411 rm -rf conftest$ac_exeext
16412 if { (ac_try="$ac_link"
16413 case "(($ac_try" in
16414   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16415   *) ac_try_echo=$ac_try;;
16416 esac
16417 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
16418 $as_echo "$ac_try_echo") >&5
16419   (eval "$ac_link") 2>&5
16420   ac_status=$?
16421   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
16422   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
16423   { (case "(($ac_try" in
16424   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16425   *) ac_try_echo=$ac_try;;
16426 esac
16427 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
16428 $as_echo "$ac_try_echo") >&5
16429   (eval "$ac_try") 2>&5
16430   ac_status=$?
16431   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
16432   (exit $ac_status); }; }; then
16433   mtv=`cat conftest-mt`
16434                      ac_cv_motif_version=`echo $mtv | sed 's/ .*//'`
16435                      ac_cv_motif_version_string=`echo $mtv | sed 's/.* //'`
16436 else
16437   $as_echo "$as_me: program exited with status $ac_status" >&5
16438 $as_echo "$as_me: failed program was:" >&5
16439 sed 's/^/| /' conftest.$ac_ext >&5
16440
16441 ( exit $ac_status )
16442 ac_cv_motif_version=unknown
16443                      ac_cv_motif_version_string=unknown
16444 fi
16445 rm -rf conftest.dSYM
16446 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
16447 fi
16448
16449
16450   CPPFLAGS="$ac_save_CPPFLAGS"
16451 fi
16452 { $as_echo "$as_me:$LINENO: result: $ac_cv_motif_version_string" >&5
16453 $as_echo "$ac_cv_motif_version_string" >&6; }
16454   rm -rf conftest-mt
16455   motif_version=$ac_cv_motif_version
16456   motif_version_string=$ac_cv_motif_version_string
16457
16458 fi
16459
16460
16461 ###############################################################################
16462 #
16463 #       Checking whether Motif requires -lXpm.
16464 #
16465 #       If this is Motif 2.x, and we have XPM, then link against XPM as well.
16466 #       The deal is, Motif 2.x requires XPM -- but it's a compilation option
16467 #       of the library whether to build the XPM code into libXm, or whether
16468 #       to rely on an external libXm.  So the only way to tell whether XPM is
16469 #       a link-time requirement is to examine libXm.a, which is very
16470 #       difficult to do in an autoconf script.  So... if it's Motif 2.x, we
16471 #       always link against XPM if the XPM lib exists (and this will be a
16472 #       no-op if libXm happens to already have the XPM code in it.)
16473 #
16474 ###############################################################################
16475
16476 motif_requires_xpm=no
16477 if test "$have_motif" = yes ; then
16478    { $as_echo "$as_me:$LINENO: checking whether Motif requires XPM" >&5
16479 $as_echo_n "checking whether Motif requires XPM... " >&6; }
16480    if test "$motif_version" = "unknown" || test "$motif_version" -ge 2000
16481    then
16482      motif_requires_xpm=yes
16483      { $as_echo "$as_me:$LINENO: result: maybe" >&5
16484 $as_echo "maybe" >&6; }
16485    else
16486      { $as_echo "$as_me:$LINENO: result: no" >&5
16487 $as_echo "no" >&6; }
16488    fi
16489 fi
16490
16491
16492 ###############################################################################
16493 #
16494 #       Checking whether Motif requires -lXp.
16495 #
16496 #       Some versions of Motif (2.1.0, at least) require -lXp, the "X Printing
16497 #       Extension".   Why this extension isn't in -lXext with all the others,
16498 #       I have no idea.
16499 #
16500 ###############################################################################
16501
16502 have_xp_ext=no
16503 if test "$have_motif" = yes ; then
16504    have_xp_ext=no
16505
16506   ac_save_CPPFLAGS="$CPPFLAGS"
16507   ac_save_LDFLAGS="$LDFLAGS"
16508 #  ac_save_LIBS="$LIBS"
16509
16510   if test \! -z "$includedir" ; then
16511     CPPFLAGS="$CPPFLAGS -I$includedir"
16512   fi
16513   # note: $X_CFLAGS includes $x_includes
16514   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
16515
16516   if test \! -z "$libdir" ; then
16517     LDFLAGS="$LDFLAGS -L$libdir"
16518   fi
16519   # note: $X_LIBS includes $x_libraries
16520   LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
16521
16522   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
16523   LDFLAGS=`eval eval eval eval eval eval eval eval eval echo $LDFLAGS`
16524   { $as_echo "$as_me:$LINENO: checking for XpQueryExtension in -lXp" >&5
16525 $as_echo_n "checking for XpQueryExtension in -lXp... " >&6; }
16526 if test "${ac_cv_lib_Xp_XpQueryExtension+set}" = set; then
16527   $as_echo_n "(cached) " >&6
16528 else
16529   ac_check_lib_save_LIBS=$LIBS
16530 LIBS="-lXp -lX11 -lXext -lm $LIBS"
16531 cat >conftest.$ac_ext <<_ACEOF
16532 /* confdefs.h.  */
16533 _ACEOF
16534 cat confdefs.h >>conftest.$ac_ext
16535 cat >>conftest.$ac_ext <<_ACEOF
16536 /* end confdefs.h.  */
16537
16538 /* Override any GCC internal prototype to avoid an error.
16539    Use char because int might match the return type of a GCC
16540    builtin and then its argument prototype would still apply.  */
16541 #ifdef __cplusplus
16542 extern "C"
16543 #endif
16544 char XpQueryExtension ();
16545 int
16546 main ()
16547 {
16548 return XpQueryExtension ();
16549   ;
16550   return 0;
16551 }
16552 _ACEOF
16553 rm -rf conftest.$ac_objext conftest$ac_exeext
16554 if { (ac_try="$ac_link"
16555 case "(($ac_try" in
16556   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16557   *) ac_try_echo=$ac_try;;
16558 esac
16559 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
16560 $as_echo "$ac_try_echo") >&5
16561   (eval "$ac_link") 2>conftest.er1
16562   ac_status=$?
16563   grep -v '^ *+' conftest.er1 >conftest.err
16564   rm -rf conftest.er1
16565   cat conftest.err >&5
16566   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
16567   (exit $ac_status); } && {
16568          test -z "$ac_c_werror_flag" ||
16569          test ! -s conftest.err
16570        } && test -s conftest$ac_exeext && {
16571          test "$cross_compiling" = yes ||
16572          $as_test_x conftest$ac_exeext
16573        }; then
16574   ac_cv_lib_Xp_XpQueryExtension=yes
16575 else
16576   $as_echo "$as_me: failed program was:" >&5
16577 sed 's/^/| /' conftest.$ac_ext >&5
16578
16579         ac_cv_lib_Xp_XpQueryExtension=no
16580 fi
16581
16582 rm -rf conftest.dSYM
16583 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
16584       conftest$ac_exeext conftest.$ac_ext
16585 LIBS=$ac_check_lib_save_LIBS
16586 fi
16587 { $as_echo "$as_me:$LINENO: result: $ac_cv_lib_Xp_XpQueryExtension" >&5
16588 $as_echo "$ac_cv_lib_Xp_XpQueryExtension" >&6; }
16589 if test "x$ac_cv_lib_Xp_XpQueryExtension" = x""yes; then
16590   have_xp_ext=yes; MOTIF_LIBS="$MOTIF_LIBS -lXp"
16591 else
16592   true
16593 fi
16594
16595   CPPFLAGS="$ac_save_CPPFLAGS"
16596   LDFLAGS="$ac_save_LDFLAGS"
16597 #  LIBS="$ac_save_LIBS"
16598
16599 fi
16600
16601
16602 ###############################################################################
16603 #
16604 #       Checking whether Motif requires -lXintl (for _Xsetlocale.)
16605 #
16606 ###############################################################################
16607
16608 have_xintl=no
16609 if test "$have_motif" = yes ; then
16610
16611   ac_save_CPPFLAGS="$CPPFLAGS"
16612   ac_save_LDFLAGS="$LDFLAGS"
16613 #  ac_save_LIBS="$LIBS"
16614
16615   if test \! -z "$includedir" ; then
16616     CPPFLAGS="$CPPFLAGS -I$includedir"
16617   fi
16618   # note: $X_CFLAGS includes $x_includes
16619   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
16620
16621   if test \! -z "$libdir" ; then
16622     LDFLAGS="$LDFLAGS -L$libdir"
16623   fi
16624   # note: $X_LIBS includes $x_libraries
16625   LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
16626
16627   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
16628   LDFLAGS=`eval eval eval eval eval eval eval eval eval echo $LDFLAGS`
16629   { $as_echo "$as_me:$LINENO: checking for _Xsetlocale in -lXintl" >&5
16630 $as_echo_n "checking for _Xsetlocale in -lXintl... " >&6; }
16631 if test "${ac_cv_lib_Xintl__Xsetlocale+set}" = set; then
16632   $as_echo_n "(cached) " >&6
16633 else
16634   ac_check_lib_save_LIBS=$LIBS
16635 LIBS="-lXintl -lX11 -lXext -lm $LIBS"
16636 cat >conftest.$ac_ext <<_ACEOF
16637 /* confdefs.h.  */
16638 _ACEOF
16639 cat confdefs.h >>conftest.$ac_ext
16640 cat >>conftest.$ac_ext <<_ACEOF
16641 /* end confdefs.h.  */
16642
16643 /* Override any GCC internal prototype to avoid an error.
16644    Use char because int might match the return type of a GCC
16645    builtin and then its argument prototype would still apply.  */
16646 #ifdef __cplusplus
16647 extern "C"
16648 #endif
16649 char _Xsetlocale ();
16650 int
16651 main ()
16652 {
16653 return _Xsetlocale ();
16654   ;
16655   return 0;
16656 }
16657 _ACEOF
16658 rm -rf conftest.$ac_objext conftest$ac_exeext
16659 if { (ac_try="$ac_link"
16660 case "(($ac_try" in
16661   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16662   *) ac_try_echo=$ac_try;;
16663 esac
16664 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
16665 $as_echo "$ac_try_echo") >&5
16666   (eval "$ac_link") 2>conftest.er1
16667   ac_status=$?
16668   grep -v '^ *+' conftest.er1 >conftest.err
16669   rm -rf conftest.er1
16670   cat conftest.err >&5
16671   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
16672   (exit $ac_status); } && {
16673          test -z "$ac_c_werror_flag" ||
16674          test ! -s conftest.err
16675        } && test -s conftest$ac_exeext && {
16676          test "$cross_compiling" = yes ||
16677          $as_test_x conftest$ac_exeext
16678        }; then
16679   ac_cv_lib_Xintl__Xsetlocale=yes
16680 else
16681   $as_echo "$as_me: failed program was:" >&5
16682 sed 's/^/| /' conftest.$ac_ext >&5
16683
16684         ac_cv_lib_Xintl__Xsetlocale=no
16685 fi
16686
16687 rm -rf conftest.dSYM
16688 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
16689       conftest$ac_exeext conftest.$ac_ext
16690 LIBS=$ac_check_lib_save_LIBS
16691 fi
16692 { $as_echo "$as_me:$LINENO: result: $ac_cv_lib_Xintl__Xsetlocale" >&5
16693 $as_echo "$ac_cv_lib_Xintl__Xsetlocale" >&6; }
16694 if test "x$ac_cv_lib_Xintl__Xsetlocale" = x""yes; then
16695   have_xintl=yes
16696 else
16697   have_xintl=no
16698 fi
16699
16700   CPPFLAGS="$ac_save_CPPFLAGS"
16701   LDFLAGS="$ac_save_LDFLAGS"
16702 #  LIBS="$ac_save_LIBS"
16703
16704   if test "$have_xintl" = yes; then
16705     MOTIF_LIBS="$MOTIF_LIBS -lXintl"
16706   fi
16707 fi
16708
16709
16710 ###############################################################################
16711 #
16712 #       Check for -lGL or -lMesaGL.
16713 #
16714 ###############################################################################
16715
16716 have_gl=no
16717 ac_have_mesa_gl=no
16718 with_gl_req=unspecified
16719 gl_halfassed=no
16720
16721 # Check whether --with-gl was given.
16722 if test "${with_gl+set}" = set; then
16723   withval=$with_gl; with_gl="$withval"; with_gl_req="$withval"
16724 else
16725   with_gl=yes
16726 fi
16727
16728
16729
16730    case "$with_gl" in
16731     yes) ;;
16732     no)  ;;
16733
16734     /*)
16735      { $as_echo "$as_me:$LINENO: checking for GL headers" >&5
16736 $as_echo_n "checking for GL headers... " >&6; }
16737      d=$with_gl/include
16738      if test -d $d; then
16739        X_CFLAGS="-I$d $X_CFLAGS"
16740        { $as_echo "$as_me:$LINENO: result: $d" >&5
16741 $as_echo "$d" >&6; }
16742      else
16743        { $as_echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
16744 $as_echo "not found ($d: no such directory)" >&6; }
16745      fi
16746
16747      { $as_echo "$as_me:$LINENO: checking for GL libs" >&5
16748 $as_echo_n "checking for GL libs... " >&6; }
16749      d=$with_gl/lib
16750      if test -d $d; then
16751        X_LIBS="-L$d $X_LIBS"
16752        { $as_echo "$as_me:$LINENO: result: $d" >&5
16753 $as_echo "$d" >&6; }
16754      else
16755        { $as_echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
16756 $as_echo "not found ($d: no such directory)" >&6; }
16757      fi
16758
16759      # replace the directory string with "yes".
16760      with_gl_req="yes"
16761      with_gl=$with_gl_req
16762      ;;
16763
16764     *)
16765      echo ""
16766      echo "error: argument to --with-gl must be \"yes\", \"no\", or a directory."
16767      echo "       If it is a directory, then \`DIR/include' will be added to"
16768      echo "       the -I list, and \`DIR/lib' will be added to the -L list."
16769      exit 1
16770      ;;
16771    esac
16772
16773
16774 ac_mesagl_version=unknown
16775 ac_mesagl_version_string=unknown
16776
16777 if test "$with_gl" = yes; then
16778
16779   ac_save_CPPFLAGS="$CPPFLAGS"
16780   if test \! -z "$includedir" ; then
16781     CPPFLAGS="$CPPFLAGS -I$includedir"
16782   fi
16783   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
16784   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
16785   if test "${ac_cv_header_GL_gl_h+set}" = set; then
16786   { $as_echo "$as_me:$LINENO: checking for GL/gl.h" >&5
16787 $as_echo_n "checking for GL/gl.h... " >&6; }
16788 if test "${ac_cv_header_GL_gl_h+set}" = set; then
16789   $as_echo_n "(cached) " >&6
16790 fi
16791 { $as_echo "$as_me:$LINENO: result: $ac_cv_header_GL_gl_h" >&5
16792 $as_echo "$ac_cv_header_GL_gl_h" >&6; }
16793 else
16794   # Is the header compilable?
16795 { $as_echo "$as_me:$LINENO: checking GL/gl.h usability" >&5
16796 $as_echo_n "checking GL/gl.h usability... " >&6; }
16797 cat >conftest.$ac_ext <<_ACEOF
16798 /* confdefs.h.  */
16799 _ACEOF
16800 cat confdefs.h >>conftest.$ac_ext
16801 cat >>conftest.$ac_ext <<_ACEOF
16802 /* end confdefs.h.  */
16803 $ac_includes_default
16804 #include <GL/gl.h>
16805 _ACEOF
16806 rm -rf conftest.$ac_objext
16807 if { (ac_try="$ac_compile"
16808 case "(($ac_try" in
16809   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16810   *) ac_try_echo=$ac_try;;
16811 esac
16812 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
16813 $as_echo "$ac_try_echo") >&5
16814   (eval "$ac_compile") 2>conftest.er1
16815   ac_status=$?
16816   grep -v '^ *+' conftest.er1 >conftest.err
16817   rm -rf conftest.er1
16818   cat conftest.err >&5
16819   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
16820   (exit $ac_status); } && {
16821          test -z "$ac_c_werror_flag" ||
16822          test ! -s conftest.err
16823        } && test -s conftest.$ac_objext; then
16824   ac_header_compiler=yes
16825 else
16826   $as_echo "$as_me: failed program was:" >&5
16827 sed 's/^/| /' conftest.$ac_ext >&5
16828
16829         ac_header_compiler=no
16830 fi
16831
16832 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16833 { $as_echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
16834 $as_echo "$ac_header_compiler" >&6; }
16835
16836 # Is the header present?
16837 { $as_echo "$as_me:$LINENO: checking GL/gl.h presence" >&5
16838 $as_echo_n "checking GL/gl.h presence... " >&6; }
16839 cat >conftest.$ac_ext <<_ACEOF
16840 /* confdefs.h.  */
16841 _ACEOF
16842 cat confdefs.h >>conftest.$ac_ext
16843 cat >>conftest.$ac_ext <<_ACEOF
16844 /* end confdefs.h.  */
16845 #include <GL/gl.h>
16846 _ACEOF
16847 if { (ac_try="$ac_cpp conftest.$ac_ext"
16848 case "(($ac_try" in
16849   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16850   *) ac_try_echo=$ac_try;;
16851 esac
16852 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
16853 $as_echo "$ac_try_echo") >&5
16854   (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
16855   ac_status=$?
16856   grep -v '^ *+' conftest.er1 >conftest.err
16857   rm -rf conftest.er1
16858   cat conftest.err >&5
16859   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
16860   (exit $ac_status); } >/dev/null && {
16861          test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
16862          test ! -s conftest.err
16863        }; then
16864   ac_header_preproc=yes
16865 else
16866   $as_echo "$as_me: failed program was:" >&5
16867 sed 's/^/| /' conftest.$ac_ext >&5
16868
16869   ac_header_preproc=no
16870 fi
16871
16872 rm -rf conftest.err conftest.$ac_ext
16873 { $as_echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
16874 $as_echo "$ac_header_preproc" >&6; }
16875
16876 # So?  What about this header?
16877 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
16878   yes:no: )
16879     { $as_echo "$as_me:$LINENO: WARNING: GL/gl.h: accepted by the compiler, rejected by the preprocessor!" >&5
16880 $as_echo "$as_me: WARNING: GL/gl.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
16881     { $as_echo "$as_me:$LINENO: WARNING: GL/gl.h: proceeding with the compiler's result" >&5
16882 $as_echo "$as_me: WARNING: GL/gl.h: proceeding with the compiler's result" >&2;}
16883     ac_header_preproc=yes
16884     ;;
16885   no:yes:* )
16886     { $as_echo "$as_me:$LINENO: WARNING: GL/gl.h: present but cannot be compiled" >&5
16887 $as_echo "$as_me: WARNING: GL/gl.h: present but cannot be compiled" >&2;}
16888     { $as_echo "$as_me:$LINENO: WARNING: GL/gl.h:     check for missing prerequisite headers?" >&5
16889 $as_echo "$as_me: WARNING: GL/gl.h:     check for missing prerequisite headers?" >&2;}
16890     { $as_echo "$as_me:$LINENO: WARNING: GL/gl.h: see the Autoconf documentation" >&5
16891 $as_echo "$as_me: WARNING: GL/gl.h: see the Autoconf documentation" >&2;}
16892     { $as_echo "$as_me:$LINENO: WARNING: GL/gl.h:     section \"Present But Cannot Be Compiled\"" >&5
16893 $as_echo "$as_me: WARNING: GL/gl.h:     section \"Present But Cannot Be Compiled\"" >&2;}
16894     { $as_echo "$as_me:$LINENO: WARNING: GL/gl.h: proceeding with the preprocessor's result" >&5
16895 $as_echo "$as_me: WARNING: GL/gl.h: proceeding with the preprocessor's result" >&2;}
16896     { $as_echo "$as_me:$LINENO: WARNING: GL/gl.h: in the future, the compiler will take precedence" >&5
16897 $as_echo "$as_me: WARNING: GL/gl.h: in the future, the compiler will take precedence" >&2;}
16898
16899     ;;
16900 esac
16901 { $as_echo "$as_me:$LINENO: checking for GL/gl.h" >&5
16902 $as_echo_n "checking for GL/gl.h... " >&6; }
16903 if test "${ac_cv_header_GL_gl_h+set}" = set; then
16904   $as_echo_n "(cached) " >&6
16905 else
16906   ac_cv_header_GL_gl_h=$ac_header_preproc
16907 fi
16908 { $as_echo "$as_me:$LINENO: result: $ac_cv_header_GL_gl_h" >&5
16909 $as_echo "$ac_cv_header_GL_gl_h" >&6; }
16910
16911 fi
16912 if test "x$ac_cv_header_GL_gl_h" = x""yes; then
16913   have_gl=yes
16914 else
16915   have_gl=no
16916 fi
16917
16918
16919   CPPFLAGS="$ac_save_CPPFLAGS"
16920   if test "$have_gl" = yes ; then
16921
16922   ac_save_CPPFLAGS="$CPPFLAGS"
16923   if test \! -z "$includedir" ; then
16924     CPPFLAGS="$CPPFLAGS -I$includedir"
16925   fi
16926   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
16927   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
16928   { $as_echo "$as_me:$LINENO: checking for GL/glx.h" >&5
16929 $as_echo_n "checking for GL/glx.h... " >&6; }
16930 if test "${ac_cv_header_GL_glx_h+set}" = set; then
16931   $as_echo_n "(cached) " >&6
16932 else
16933   cat >conftest.$ac_ext <<_ACEOF
16934 /* confdefs.h.  */
16935 _ACEOF
16936 cat confdefs.h >>conftest.$ac_ext
16937 cat >>conftest.$ac_ext <<_ACEOF
16938 /* end confdefs.h.  */
16939 #include <GL/gl.h>
16940
16941 #include <GL/glx.h>
16942 _ACEOF
16943 rm -rf conftest.$ac_objext
16944 if { (ac_try="$ac_compile"
16945 case "(($ac_try" in
16946   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16947   *) ac_try_echo=$ac_try;;
16948 esac
16949 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
16950 $as_echo "$ac_try_echo") >&5
16951   (eval "$ac_compile") 2>conftest.er1
16952   ac_status=$?
16953   grep -v '^ *+' conftest.er1 >conftest.err
16954   rm -rf conftest.er1
16955   cat conftest.err >&5
16956   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
16957   (exit $ac_status); } && {
16958          test -z "$ac_c_werror_flag" ||
16959          test ! -s conftest.err
16960        } && test -s conftest.$ac_objext; then
16961   ac_cv_header_GL_glx_h=yes
16962 else
16963   $as_echo "$as_me: failed program was:" >&5
16964 sed 's/^/| /' conftest.$ac_ext >&5
16965
16966         ac_cv_header_GL_glx_h=no
16967 fi
16968
16969 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16970 fi
16971 { $as_echo "$as_me:$LINENO: result: $ac_cv_header_GL_glx_h" >&5
16972 $as_echo "$ac_cv_header_GL_glx_h" >&6; }
16973 if test "x$ac_cv_header_GL_glx_h" = x""yes; then
16974   have_gl=yes
16975 else
16976   have_gl=no
16977 fi
16978
16979
16980   CPPFLAGS="$ac_save_CPPFLAGS"
16981   fi
16982
16983   # If we have the headers, try and figure out which vendor it's from.
16984   #
16985   if test "$have_gl" = yes ; then
16986
16987     # We need to know whether it's MesaGL so that we know which libraries
16988     # to link against.
16989     #
16990     { $as_echo "$as_me:$LINENO: checking whether GL is really MesaGL" >&5
16991 $as_echo_n "checking whether GL is really MesaGL... " >&6; }
16992 if test "${ac_cv_have_mesa_gl+set}" = set; then
16993   $as_echo_n "(cached) " >&6
16994 else
16995   ac_cv_have_mesa_gl=no
16996        if test "$ac_macosx" = no; then
16997          # WTF! MacOS 10.5.0 ships the Mesa GL headers!
16998          # It's not really Mesa, is it?
16999
17000   ac_save_CPPFLAGS="$CPPFLAGS"
17001   if test \! -z "$includedir" ; then
17002     CPPFLAGS="$CPPFLAGS -I$includedir"
17003   fi
17004   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
17005   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
17006   cat >conftest.$ac_ext <<_ACEOF
17007 /* confdefs.h.  */
17008 _ACEOF
17009 cat confdefs.h >>conftest.$ac_ext
17010 cat >>conftest.$ac_ext <<_ACEOF
17011 /* end confdefs.h.  */
17012 #include <GL/glx.h>
17013
17014 _ACEOF
17015 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
17016   $EGREP "Mesa|MESA" >/dev/null 2>&1; then
17017   ac_cv_have_mesa_gl=yes
17018 fi
17019 rm -rf conftest*
17020
17021   CPPFLAGS="$ac_save_CPPFLAGS"
17022        fi
17023 fi
17024 { $as_echo "$as_me:$LINENO: result: $ac_cv_have_mesa_gl" >&5
17025 $as_echo "$ac_cv_have_mesa_gl" >&6; }
17026     ac_have_mesa_gl=$ac_cv_have_mesa_gl
17027
17028     gl_lib_1=""
17029     GL_LIBS=""
17030
17031     if test "$ac_macosx" = yes; then
17032
17033       # Without these, every link against libGL gets a bunch of useless
17034       # warnings.
17035       #
17036       osx_crud="-bind_at_load -multiply_defined suppress"
17037       { $as_echo "$as_me:$LINENO: result: adding \"$osx_crud\" to GL_LIBS" >&5
17038 $as_echo "adding \"$osx_crud\" to GL_LIBS" >&6; }
17039       GL_LIBS="$GL_LIBS $osx_crud"
17040       unset osx_crud
17041
17042       # New lossage in 10.5.0: without this, we get:
17043       #   ld: cycle in dylib re-exports with /usr/X11/lib/libGL.dylib
17044       #
17045       osx_crud="/System/Library/Frameworks/OpenGL.framework/Versions/A/Libraries/libGL.dylib"
17046       osx_crud="-Wl,-dylib_file,${osx_crud}:${osx_crud}"
17047
17048       { $as_echo "$as_me:$LINENO: result: adding \"$osx_crud\" to GL_LIBS" >&5
17049 $as_echo "adding \"$osx_crud\" to GL_LIBS" >&6; }
17050       GL_LIBS="$GL_LIBS $osx_crud"
17051       unset osx_crud
17052     fi
17053
17054
17055     # Some versions of MesaGL are compiled to require -lpthread.
17056     # So if the Mesa headers exist, and -lpthread exists, then always
17057     # link -lpthread after the Mesa libs (be they named -lGL or -lMesaGL.)
17058     #
17059     if test "$ac_have_mesa_gl" = yes; then
17060       { $as_echo "$as_me:$LINENO: checking for pthread_create in -lpthread" >&5
17061 $as_echo_n "checking for pthread_create in -lpthread... " >&6; }
17062 if test "${ac_cv_lib_pthread_pthread_create+set}" = set; then
17063   $as_echo_n "(cached) " >&6
17064 else
17065   ac_check_lib_save_LIBS=$LIBS
17066 LIBS="-lpthread  $LIBS"
17067 cat >conftest.$ac_ext <<_ACEOF
17068 /* confdefs.h.  */
17069 _ACEOF
17070 cat confdefs.h >>conftest.$ac_ext
17071 cat >>conftest.$ac_ext <<_ACEOF
17072 /* end confdefs.h.  */
17073
17074 /* Override any GCC internal prototype to avoid an error.
17075    Use char because int might match the return type of a GCC
17076    builtin and then its argument prototype would still apply.  */
17077 #ifdef __cplusplus
17078 extern "C"
17079 #endif
17080 char pthread_create ();
17081 int
17082 main ()
17083 {
17084 return pthread_create ();
17085   ;
17086   return 0;
17087 }
17088 _ACEOF
17089 rm -rf conftest.$ac_objext conftest$ac_exeext
17090 if { (ac_try="$ac_link"
17091 case "(($ac_try" in
17092   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17093   *) ac_try_echo=$ac_try;;
17094 esac
17095 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
17096 $as_echo "$ac_try_echo") >&5
17097   (eval "$ac_link") 2>conftest.er1
17098   ac_status=$?
17099   grep -v '^ *+' conftest.er1 >conftest.err
17100   rm -rf conftest.er1
17101   cat conftest.err >&5
17102   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
17103   (exit $ac_status); } && {
17104          test -z "$ac_c_werror_flag" ||
17105          test ! -s conftest.err
17106        } && test -s conftest$ac_exeext && {
17107          test "$cross_compiling" = yes ||
17108          $as_test_x conftest$ac_exeext
17109        }; then
17110   ac_cv_lib_pthread_pthread_create=yes
17111 else
17112   $as_echo "$as_me: failed program was:" >&5
17113 sed 's/^/| /' conftest.$ac_ext >&5
17114
17115         ac_cv_lib_pthread_pthread_create=no
17116 fi
17117
17118 rm -rf conftest.dSYM
17119 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
17120       conftest$ac_exeext conftest.$ac_ext
17121 LIBS=$ac_check_lib_save_LIBS
17122 fi
17123 { $as_echo "$as_me:$LINENO: result: $ac_cv_lib_pthread_pthread_create" >&5
17124 $as_echo "$ac_cv_lib_pthread_pthread_create" >&6; }
17125 if test "x$ac_cv_lib_pthread_pthread_create" = x""yes; then
17126   GL_LIBS="-lpthread"
17127 fi
17128
17129     fi
17130
17131
17132     # If we have Mesa headers, check to see if we can link against -lMesaGL.
17133     # If we don't have Mesa headers, or we don't have -lMesaGL, try -lGL.
17134     # Else, warn that GL is busted.  (We have the headers, but no libs.)
17135     #
17136
17137     if test "$ac_have_mesa_gl" = yes ; then
17138
17139   ac_save_CPPFLAGS="$CPPFLAGS"
17140   ac_save_LDFLAGS="$LDFLAGS"
17141 #  ac_save_LIBS="$LIBS"
17142
17143   if test \! -z "$includedir" ; then
17144     CPPFLAGS="$CPPFLAGS -I$includedir"
17145   fi
17146   # note: $X_CFLAGS includes $x_includes
17147   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
17148
17149   if test \! -z "$libdir" ; then
17150     LDFLAGS="$LDFLAGS -L$libdir"
17151   fi
17152   # note: $X_LIBS includes $x_libraries
17153   LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
17154
17155   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
17156   LDFLAGS=`eval eval eval eval eval eval eval eval eval echo $LDFLAGS`
17157   { $as_echo "$as_me:$LINENO: checking for glXCreateContext in -lMesaGL" >&5
17158 $as_echo_n "checking for glXCreateContext in -lMesaGL... " >&6; }
17159 if test "${ac_cv_lib_MesaGL_glXCreateContext+set}" = set; then
17160   $as_echo_n "(cached) " >&6
17161 else
17162   ac_check_lib_save_LIBS=$LIBS
17163 LIBS="-lMesaGL -lMesaGLU $GL_LIBS -lX11 -lXext $VIDMODE_LIBS -lm $LIBS"
17164 cat >conftest.$ac_ext <<_ACEOF
17165 /* confdefs.h.  */
17166 _ACEOF
17167 cat confdefs.h >>conftest.$ac_ext
17168 cat >>conftest.$ac_ext <<_ACEOF
17169 /* end confdefs.h.  */
17170
17171 /* Override any GCC internal prototype to avoid an error.
17172    Use char because int might match the return type of a GCC
17173    builtin and then its argument prototype would still apply.  */
17174 #ifdef __cplusplus
17175 extern "C"
17176 #endif
17177 char glXCreateContext ();
17178 int
17179 main ()
17180 {
17181 return glXCreateContext ();
17182   ;
17183   return 0;
17184 }
17185 _ACEOF
17186 rm -rf conftest.$ac_objext conftest$ac_exeext
17187 if { (ac_try="$ac_link"
17188 case "(($ac_try" in
17189   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17190   *) ac_try_echo=$ac_try;;
17191 esac
17192 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
17193 $as_echo "$ac_try_echo") >&5
17194   (eval "$ac_link") 2>conftest.er1
17195   ac_status=$?
17196   grep -v '^ *+' conftest.er1 >conftest.err
17197   rm -rf conftest.er1
17198   cat conftest.err >&5
17199   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
17200   (exit $ac_status); } && {
17201          test -z "$ac_c_werror_flag" ||
17202          test ! -s conftest.err
17203        } && test -s conftest$ac_exeext && {
17204          test "$cross_compiling" = yes ||
17205          $as_test_x conftest$ac_exeext
17206        }; then
17207   ac_cv_lib_MesaGL_glXCreateContext=yes
17208 else
17209   $as_echo "$as_me: failed program was:" >&5
17210 sed 's/^/| /' conftest.$ac_ext >&5
17211
17212         ac_cv_lib_MesaGL_glXCreateContext=no
17213 fi
17214
17215 rm -rf conftest.dSYM
17216 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
17217       conftest$ac_exeext conftest.$ac_ext
17218 LIBS=$ac_check_lib_save_LIBS
17219 fi
17220 { $as_echo "$as_me:$LINENO: result: $ac_cv_lib_MesaGL_glXCreateContext" >&5
17221 $as_echo "$ac_cv_lib_MesaGL_glXCreateContext" >&6; }
17222 if test "x$ac_cv_lib_MesaGL_glXCreateContext" = x""yes; then
17223   gl_lib_1="MesaGL"
17224                       GL_LIBS="-lMesaGL -lMesaGLU $VIDMODE_LIBS $GL_LIBS"
17225 fi
17226
17227   CPPFLAGS="$ac_save_CPPFLAGS"
17228   LDFLAGS="$ac_save_LDFLAGS"
17229 #  LIBS="$ac_save_LIBS"
17230
17231     fi
17232
17233     if test "$gl_lib_1" = "" ; then
17234
17235   ac_save_CPPFLAGS="$CPPFLAGS"
17236   ac_save_LDFLAGS="$LDFLAGS"
17237 #  ac_save_LIBS="$LIBS"
17238
17239   if test \! -z "$includedir" ; then
17240     CPPFLAGS="$CPPFLAGS -I$includedir"
17241   fi
17242   # note: $X_CFLAGS includes $x_includes
17243   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
17244
17245   if test \! -z "$libdir" ; then
17246     LDFLAGS="$LDFLAGS -L$libdir"
17247   fi
17248   # note: $X_LIBS includes $x_libraries
17249   LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
17250
17251   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
17252   LDFLAGS=`eval eval eval eval eval eval eval eval eval echo $LDFLAGS`
17253   { $as_echo "$as_me:$LINENO: checking for glXCreateContext in -lGL" >&5
17254 $as_echo_n "checking for glXCreateContext in -lGL... " >&6; }
17255 if test "${ac_cv_lib_GL_glXCreateContext+set}" = set; then
17256   $as_echo_n "(cached) " >&6
17257 else
17258   ac_check_lib_save_LIBS=$LIBS
17259 LIBS="-lGL -lGLU $GL_LIBS -lX11 -lXext $VIDMODE_LIBS -lm $LIBS"
17260 cat >conftest.$ac_ext <<_ACEOF
17261 /* confdefs.h.  */
17262 _ACEOF
17263 cat confdefs.h >>conftest.$ac_ext
17264 cat >>conftest.$ac_ext <<_ACEOF
17265 /* end confdefs.h.  */
17266
17267 /* Override any GCC internal prototype to avoid an error.
17268    Use char because int might match the return type of a GCC
17269    builtin and then its argument prototype would still apply.  */
17270 #ifdef __cplusplus
17271 extern "C"
17272 #endif
17273 char glXCreateContext ();
17274 int
17275 main ()
17276 {
17277 return glXCreateContext ();
17278   ;
17279   return 0;
17280 }
17281 _ACEOF
17282 rm -rf conftest.$ac_objext conftest$ac_exeext
17283 if { (ac_try="$ac_link"
17284 case "(($ac_try" in
17285   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17286   *) ac_try_echo=$ac_try;;
17287 esac
17288 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
17289 $as_echo "$ac_try_echo") >&5
17290   (eval "$ac_link") 2>conftest.er1
17291   ac_status=$?
17292   grep -v '^ *+' conftest.er1 >conftest.err
17293   rm -rf conftest.er1
17294   cat conftest.err >&5
17295   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
17296   (exit $ac_status); } && {
17297          test -z "$ac_c_werror_flag" ||
17298          test ! -s conftest.err
17299        } && test -s conftest$ac_exeext && {
17300          test "$cross_compiling" = yes ||
17301          $as_test_x conftest$ac_exeext
17302        }; then
17303   ac_cv_lib_GL_glXCreateContext=yes
17304 else
17305   $as_echo "$as_me: failed program was:" >&5
17306 sed 's/^/| /' conftest.$ac_ext >&5
17307
17308         ac_cv_lib_GL_glXCreateContext=no
17309 fi
17310
17311 rm -rf conftest.dSYM
17312 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
17313       conftest$ac_exeext conftest.$ac_ext
17314 LIBS=$ac_check_lib_save_LIBS
17315 fi
17316 { $as_echo "$as_me:$LINENO: result: $ac_cv_lib_GL_glXCreateContext" >&5
17317 $as_echo "$ac_cv_lib_GL_glXCreateContext" >&6; }
17318 if test "x$ac_cv_lib_GL_glXCreateContext" = x""yes; then
17319   gl_lib_1="GL"
17320                       GL_LIBS="-lGL -lGLU $VIDMODE_LIBS $GL_LIBS"
17321 fi
17322
17323   CPPFLAGS="$ac_save_CPPFLAGS"
17324   LDFLAGS="$ac_save_LDFLAGS"
17325 #  LIBS="$ac_save_LIBS"
17326
17327     fi
17328
17329     if test "$gl_lib_1" = "" ; then
17330       # we have headers, but no libs -- bail.
17331       have_gl=no
17332       ac_have_mesa_gl=no
17333       gl_halfassed=yes
17334     else
17335       # linking works -- we can build the GL hacks.
17336       cat >>confdefs.h <<\_ACEOF
17337 #define HAVE_GL 1
17338 _ACEOF
17339
17340       if test "$ac_have_mesa_gl" = yes ; then
17341         cat >>confdefs.h <<\_ACEOF
17342 #define HAVE_MESA_GL 1
17343 _ACEOF
17344
17345       fi
17346     fi
17347   fi
17348
17349
17350   # Now that we know we have GL headers and libs, do some more GL testing.
17351   #
17352
17353   if test "$have_gl" = yes ; then
17354     # If it's MesaGL, we'd like to issue a warning if the version number
17355     # is less than or equal to 2.6, because that version had a security bug.
17356     #
17357     if test "$ac_have_mesa_gl" = yes; then
17358
17359       { $as_echo "$as_me:$LINENO: checking MesaGL version number" >&5
17360 $as_echo_n "checking MesaGL version number... " >&6; }
17361 if test "${ac_cv_mesagl_version_string+set}" = set; then
17362   $as_echo_n "(cached) " >&6
17363 else
17364   cat > conftest.$ac_ext <<EOF
17365 #line 17369 "configure"
17366 #include "confdefs.h"
17367 #include <GL/gl.h>
17368 #ifndef MESA_MAJOR_VERSION
17369 # include <GL/xmesa.h>
17370 # ifdef XMESA_MAJOR_VERSION
17371    /* Around Mesa 3.2, they took out the Mesa version number, so instead,
17372       we have to check the XMesa version number (the number of the X protocol
17373       support, which seems to be the same as the Mesa version number.)
17374     */
17375 #  define MESA_MAJOR_VERSION XMESA_MAJOR_VERSION
17376 #  define MESA_MINOR_VERSION XMESA_MINOR_VERSION
17377 # else
17378    /* Oh great.  Some time after 3.4, they took out the xmesa.h header file,
17379       so we have no way of telling what version of Mesa this is at all.
17380       So, we'll guess that the osmesa version (the "offscreen protocol")
17381       is less than or equal to the real mesa version number.  Except that
17382       if OSmesa is 3.3, assume at least Mesa 3.4, since OSmesa was 3.3 in
17383       Mesa 3.4.  And Mesa 3.3 had xmesa.h.  What a complete load of shit!
17384     */
17385 # include <GL/osmesa.h>
17386 #  define MESA_MAJOR_VERSION OSMESA_MAJOR_VERSION
17387 #  define MESA_MINOR_VERSION OSMESA_MINOR_VERSION or newer, probably?
17388 #  if OSMESA_MAJOR_VERSION == 3 && OSMESA_MINOR_VERSION == 3
17389 #   undef MESA_MINOR_VERSION
17390 #   define MESA_MINOR_VERSION 4 or newer, probably?
17391 #  endif
17392 # endif
17393 #endif
17394 configure: MESA_MAJOR_VERSION MESA_MINOR_VERSION
17395 EOF
17396
17397          ac_save_CPPFLAGS="$CPPFLAGS"
17398          if test \! -z "$includedir" ; then
17399            CPPFLAGS="$CPPFLAGS -I$includedir"
17400          fi
17401          CPPFLAGS="$CPPFLAGS $X_CFLAGS"
17402
17403          mglv=`(eval "$ac_cpp conftest.$ac_ext") 2>&5 | grep configure:`
17404
17405          # M4 sucks!!
17406
17407           mglv=`echo "$mglv" | sed -n \
17408              's/^configure: *\([0-9][0-9]*\)  *\([0-9].*\)$/\1.\2/p'`
17409
17410
17411          rm -rf conftest.$ac_ext
17412
17413          CPPFLAGS="$ac_save_CPPFLAGS"
17414
17415          if test "$mglv" = ""; then
17416            ac_mesagl_version=unknown
17417            ac_mesagl_version_string=unknown
17418          else
17419            ac_mesagl_version_string="$mglv"
17420            # M4 sucks!!
17421
17422            maj=`echo "$mglv" | sed -n 's/^\([0-9][0-9]*\)\..*$/\1/p'`
17423            min=`echo "$mglv" | sed -n 's/^.*\.\([0-9][0-9]*\).*$/\1/p'`
17424
17425            ac_mesagl_version=`echo "$maj * 1000 + $min" | bc`
17426            if test -z "$ac_mesagl_version"; then
17427              ac_mesagl_version=unknown
17428              ac_mesagl_version_string=unknown
17429            fi
17430          fi
17431          ac_cv_mesagl_version=$ac_mesagl_version
17432          ac_cv_mesagl_version_string=$ac_mesagl_version_string
17433
17434 fi
17435 { $as_echo "$as_me:$LINENO: result: $ac_cv_mesagl_version_string" >&5
17436 $as_echo "$ac_cv_mesagl_version_string" >&6; }
17437       ac_mesagl_version=$ac_cv_mesagl_version
17438       ac_mesagl_version_string=$ac_cv_mesagl_version_string
17439     fi
17440
17441
17442     # Check for OpenGL 1.1 features.
17443     #
17444
17445   ac_save_CPPFLAGS="$CPPFLAGS"
17446   ac_save_LDFLAGS="$LDFLAGS"
17447 #  ac_save_LIBS="$LIBS"
17448
17449   if test \! -z "$includedir" ; then
17450     CPPFLAGS="$CPPFLAGS -I$includedir"
17451   fi
17452   # note: $X_CFLAGS includes $x_includes
17453   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
17454
17455   if test \! -z "$libdir" ; then
17456     LDFLAGS="$LDFLAGS -L$libdir"
17457   fi
17458   # note: $X_LIBS includes $x_libraries
17459   LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
17460
17461   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
17462   LDFLAGS=`eval eval eval eval eval eval eval eval eval echo $LDFLAGS`
17463   as_ac_Lib=`$as_echo "ac_cv_lib_$gl_lib_1''_glBindTexture" | $as_tr_sh`
17464 { $as_echo "$as_me:$LINENO: checking for glBindTexture in -l$gl_lib_1" >&5
17465 $as_echo_n "checking for glBindTexture in -l$gl_lib_1... " >&6; }
17466 if { as_var=$as_ac_Lib; eval "test \"\${$as_var+set}\" = set"; }; then
17467   $as_echo_n "(cached) " >&6
17468 else
17469   ac_check_lib_save_LIBS=$LIBS
17470 LIBS="-l$gl_lib_1 $GL_LIBS -lX11 -lXext -lm $LIBS"
17471 cat >conftest.$ac_ext <<_ACEOF
17472 /* confdefs.h.  */
17473 _ACEOF
17474 cat confdefs.h >>conftest.$ac_ext
17475 cat >>conftest.$ac_ext <<_ACEOF
17476 /* end confdefs.h.  */
17477
17478 /* Override any GCC internal prototype to avoid an error.
17479    Use char because int might match the return type of a GCC
17480    builtin and then its argument prototype would still apply.  */
17481 #ifdef __cplusplus
17482 extern "C"
17483 #endif
17484 char glBindTexture ();
17485 int
17486 main ()
17487 {
17488 return glBindTexture ();
17489   ;
17490   return 0;
17491 }
17492 _ACEOF
17493 rm -rf conftest.$ac_objext conftest$ac_exeext
17494 if { (ac_try="$ac_link"
17495 case "(($ac_try" in
17496   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17497   *) ac_try_echo=$ac_try;;
17498 esac
17499 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
17500 $as_echo "$ac_try_echo") >&5
17501   (eval "$ac_link") 2>conftest.er1
17502   ac_status=$?
17503   grep -v '^ *+' conftest.er1 >conftest.err
17504   rm -rf conftest.er1
17505   cat conftest.err >&5
17506   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
17507   (exit $ac_status); } && {
17508          test -z "$ac_c_werror_flag" ||
17509          test ! -s conftest.err
17510        } && test -s conftest$ac_exeext && {
17511          test "$cross_compiling" = yes ||
17512          $as_test_x conftest$ac_exeext
17513        }; then
17514   eval "$as_ac_Lib=yes"
17515 else
17516   $as_echo "$as_me: failed program was:" >&5
17517 sed 's/^/| /' conftest.$ac_ext >&5
17518
17519         eval "$as_ac_Lib=no"
17520 fi
17521
17522 rm -rf conftest.dSYM
17523 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
17524       conftest$ac_exeext conftest.$ac_ext
17525 LIBS=$ac_check_lib_save_LIBS
17526 fi
17527 ac_res=`eval 'as_val=${'$as_ac_Lib'}
17528                  $as_echo "$as_val"'`
17529                { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
17530 $as_echo "$ac_res" >&6; }
17531 as_val=`eval 'as_val=${'$as_ac_Lib'}
17532                  $as_echo "$as_val"'`
17533    if test "x$as_val" = x""yes; then
17534   cat >>confdefs.h <<\_ACEOF
17535 #define HAVE_GLBINDTEXTURE 1
17536 _ACEOF
17537
17538 else
17539   true
17540 fi
17541
17542   CPPFLAGS="$ac_save_CPPFLAGS"
17543   LDFLAGS="$ac_save_LDFLAGS"
17544 #  LIBS="$ac_save_LIBS"
17545
17546   fi
17547
17548 elif test "$with_gl" != no; then
17549   echo "error: must be yes or no: --with-gl=$with_gl"
17550   exit 1
17551 fi
17552
17553
17554 ###############################################################################
17555 #
17556 #       Check for -lgle.
17557 #
17558 ###############################################################################
17559
17560 have_gle=no
17561 with_gle_req=unspecified
17562 gle_halfassed=no
17563
17564 # Check whether --with-gle was given.
17565 if test "${with_gle+set}" = set; then
17566   withval=$with_gle; with_gle="$withval"; with_gle_req="$withval"
17567 else
17568   with_gle=yes
17569 fi
17570
17571
17572
17573    case "$with_gle" in
17574     yes) ;;
17575     no)  ;;
17576
17577     /*)
17578      { $as_echo "$as_me:$LINENO: checking for GLE headers" >&5
17579 $as_echo_n "checking for GLE headers... " >&6; }
17580      d=$with_gle/include
17581      if test -d $d; then
17582        X_CFLAGS="-I$d $X_CFLAGS"
17583        { $as_echo "$as_me:$LINENO: result: $d" >&5
17584 $as_echo "$d" >&6; }
17585      else
17586        { $as_echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
17587 $as_echo "not found ($d: no such directory)" >&6; }
17588      fi
17589
17590      { $as_echo "$as_me:$LINENO: checking for GLE libs" >&5
17591 $as_echo_n "checking for GLE libs... " >&6; }
17592      d=$with_gle/lib
17593      if test -d $d; then
17594        X_LIBS="-L$d $X_LIBS"
17595        { $as_echo "$as_me:$LINENO: result: $d" >&5
17596 $as_echo "$d" >&6; }
17597      else
17598        { $as_echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
17599 $as_echo "not found ($d: no such directory)" >&6; }
17600      fi
17601
17602      # replace the directory string with "yes".
17603      with_gle_req="yes"
17604      with_gle=$with_gle_req
17605      ;;
17606
17607     *)
17608      echo ""
17609      echo "error: argument to --with-gle must be \"yes\", \"no\", or a directory."
17610      echo "       If it is a directory, then \`DIR/include' will be added to"
17611      echo "       the -I list, and \`DIR/lib' will be added to the -L list."
17612      exit 1
17613      ;;
17614    esac
17615
17616
17617 GLE_LIBS=""
17618
17619 if test "$have_gl" = no ; then
17620  true
17621 elif test "$with_gle" = yes; then
17622
17623
17624   ac_save_CPPFLAGS="$CPPFLAGS"
17625   if test \! -z "$includedir" ; then
17626     CPPFLAGS="$CPPFLAGS -I$includedir"
17627   fi
17628   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
17629   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
17630   { $as_echo "$as_me:$LINENO: checking for GL/gle.h" >&5
17631 $as_echo_n "checking for GL/gle.h... " >&6; }
17632 if test "${ac_cv_header_GL_gle_h+set}" = set; then
17633   $as_echo_n "(cached) " >&6
17634 else
17635   cat >conftest.$ac_ext <<_ACEOF
17636 /* confdefs.h.  */
17637 _ACEOF
17638 cat confdefs.h >>conftest.$ac_ext
17639 cat >>conftest.$ac_ext <<_ACEOF
17640 /* end confdefs.h.  */
17641 #include <GL/gl.h>
17642
17643 #include <GL/gle.h>
17644 _ACEOF
17645 rm -rf conftest.$ac_objext
17646 if { (ac_try="$ac_compile"
17647 case "(($ac_try" in
17648   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17649   *) ac_try_echo=$ac_try;;
17650 esac
17651 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
17652 $as_echo "$ac_try_echo") >&5
17653   (eval "$ac_compile") 2>conftest.er1
17654   ac_status=$?
17655   grep -v '^ *+' conftest.er1 >conftest.err
17656   rm -rf conftest.er1
17657   cat conftest.err >&5
17658   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
17659   (exit $ac_status); } && {
17660          test -z "$ac_c_werror_flag" ||
17661          test ! -s conftest.err
17662        } && test -s conftest.$ac_objext; then
17663   ac_cv_header_GL_gle_h=yes
17664 else
17665   $as_echo "$as_me: failed program was:" >&5
17666 sed 's/^/| /' conftest.$ac_ext >&5
17667
17668         ac_cv_header_GL_gle_h=no
17669 fi
17670
17671 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
17672 fi
17673 { $as_echo "$as_me:$LINENO: result: $ac_cv_header_GL_gle_h" >&5
17674 $as_echo "$ac_cv_header_GL_gle_h" >&6; }
17675 if test "x$ac_cv_header_GL_gle_h" = x""yes; then
17676   have_gle3=yes
17677 else
17678   have_gle3=no
17679 fi
17680
17681
17682   CPPFLAGS="$ac_save_CPPFLAGS"
17683   if test "$have_gle3" = yes ; then
17684     have_gle=yes;
17685   else
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   { $as_echo "$as_me:$LINENO: checking for GL/gutil.h" >&5
17694 $as_echo_n "checking for GL/gutil.h... " >&6; }
17695 if test "${ac_cv_header_GL_gutil_h+set}" = set; then
17696   $as_echo_n "(cached) " >&6
17697 else
17698   cat >conftest.$ac_ext <<_ACEOF
17699 /* confdefs.h.  */
17700 _ACEOF
17701 cat confdefs.h >>conftest.$ac_ext
17702 cat >>conftest.$ac_ext <<_ACEOF
17703 /* end confdefs.h.  */
17704 #include <GL/gl.h>
17705
17706 #include <GL/gutil.h>
17707 _ACEOF
17708 rm -rf conftest.$ac_objext
17709 if { (ac_try="$ac_compile"
17710 case "(($ac_try" in
17711   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17712   *) ac_try_echo=$ac_try;;
17713 esac
17714 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
17715 $as_echo "$ac_try_echo") >&5
17716   (eval "$ac_compile") 2>conftest.er1
17717   ac_status=$?
17718   grep -v '^ *+' conftest.er1 >conftest.err
17719   rm -rf conftest.er1
17720   cat conftest.err >&5
17721   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
17722   (exit $ac_status); } && {
17723          test -z "$ac_c_werror_flag" ||
17724          test ! -s conftest.err
17725        } && test -s conftest.$ac_objext; then
17726   ac_cv_header_GL_gutil_h=yes
17727 else
17728   $as_echo "$as_me: failed program was:" >&5
17729 sed 's/^/| /' conftest.$ac_ext >&5
17730
17731         ac_cv_header_GL_gutil_h=no
17732 fi
17733
17734 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
17735 fi
17736 { $as_echo "$as_me:$LINENO: result: $ac_cv_header_GL_gutil_h" >&5
17737 $as_echo "$ac_cv_header_GL_gutil_h" >&6; }
17738 if test "x$ac_cv_header_GL_gutil_h" = x""yes; then
17739   have_gle=yes
17740 else
17741   have_gle=no
17742 fi
17743
17744
17745   CPPFLAGS="$ac_save_CPPFLAGS"
17746     if test "$have_gle" = yes ; then
17747
17748   ac_save_CPPFLAGS="$CPPFLAGS"
17749   if test \! -z "$includedir" ; then
17750     CPPFLAGS="$CPPFLAGS -I$includedir"
17751   fi
17752   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
17753   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
17754   { $as_echo "$as_me:$LINENO: checking for GL/tube.h" >&5
17755 $as_echo_n "checking for GL/tube.h... " >&6; }
17756 if test "${ac_cv_header_GL_tube_h+set}" = set; then
17757   $as_echo_n "(cached) " >&6
17758 else
17759   cat >conftest.$ac_ext <<_ACEOF
17760 /* confdefs.h.  */
17761 _ACEOF
17762 cat confdefs.h >>conftest.$ac_ext
17763 cat >>conftest.$ac_ext <<_ACEOF
17764 /* end confdefs.h.  */
17765 #include <GL/gl.h>
17766
17767 #include <GL/tube.h>
17768 _ACEOF
17769 rm -rf conftest.$ac_objext
17770 if { (ac_try="$ac_compile"
17771 case "(($ac_try" in
17772   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17773   *) ac_try_echo=$ac_try;;
17774 esac
17775 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
17776 $as_echo "$ac_try_echo") >&5
17777   (eval "$ac_compile") 2>conftest.er1
17778   ac_status=$?
17779   grep -v '^ *+' conftest.er1 >conftest.err
17780   rm -rf conftest.er1
17781   cat conftest.err >&5
17782   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
17783   (exit $ac_status); } && {
17784          test -z "$ac_c_werror_flag" ||
17785          test ! -s conftest.err
17786        } && test -s conftest.$ac_objext; then
17787   ac_cv_header_GL_tube_h=yes
17788 else
17789   $as_echo "$as_me: failed program was:" >&5
17790 sed 's/^/| /' conftest.$ac_ext >&5
17791
17792         ac_cv_header_GL_tube_h=no
17793 fi
17794
17795 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
17796 fi
17797 { $as_echo "$as_me:$LINENO: result: $ac_cv_header_GL_tube_h" >&5
17798 $as_echo "$ac_cv_header_GL_tube_h" >&6; }
17799 if test "x$ac_cv_header_GL_tube_h" = x""yes; then
17800   have_gle=yes
17801 else
17802   have_gle=no
17803 fi
17804
17805
17806   CPPFLAGS="$ac_save_CPPFLAGS"
17807     fi
17808   fi
17809
17810   if test "$have_gle" = yes ; then
17811     have_gle=no
17812     gle_halfassed=yes
17813
17814   ac_save_CPPFLAGS="$CPPFLAGS"
17815   ac_save_LDFLAGS="$LDFLAGS"
17816 #  ac_save_LIBS="$LIBS"
17817
17818   if test \! -z "$includedir" ; then
17819     CPPFLAGS="$CPPFLAGS -I$includedir"
17820   fi
17821   # note: $X_CFLAGS includes $x_includes
17822   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
17823
17824   if test \! -z "$libdir" ; then
17825     LDFLAGS="$LDFLAGS -L$libdir"
17826   fi
17827   # note: $X_LIBS includes $x_libraries
17828   LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
17829
17830   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
17831   LDFLAGS=`eval eval eval eval eval eval eval eval eval echo $LDFLAGS`
17832   { $as_echo "$as_me:$LINENO: checking for gleCreateGC in -lgle" >&5
17833 $as_echo_n "checking for gleCreateGC in -lgle... " >&6; }
17834 if test "${ac_cv_lib_gle_gleCreateGC+set}" = set; then
17835   $as_echo_n "(cached) " >&6
17836 else
17837   ac_check_lib_save_LIBS=$LIBS
17838 LIBS="-lgle $GL_LIBS -lX11 -lXext -lm $LIBS"
17839 cat >conftest.$ac_ext <<_ACEOF
17840 /* confdefs.h.  */
17841 _ACEOF
17842 cat confdefs.h >>conftest.$ac_ext
17843 cat >>conftest.$ac_ext <<_ACEOF
17844 /* end confdefs.h.  */
17845
17846 /* Override any GCC internal prototype to avoid an error.
17847    Use char because int might match the return type of a GCC
17848    builtin and then its argument prototype would still apply.  */
17849 #ifdef __cplusplus
17850 extern "C"
17851 #endif
17852 char gleCreateGC ();
17853 int
17854 main ()
17855 {
17856 return gleCreateGC ();
17857   ;
17858   return 0;
17859 }
17860 _ACEOF
17861 rm -rf conftest.$ac_objext conftest$ac_exeext
17862 if { (ac_try="$ac_link"
17863 case "(($ac_try" in
17864   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17865   *) ac_try_echo=$ac_try;;
17866 esac
17867 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
17868 $as_echo "$ac_try_echo") >&5
17869   (eval "$ac_link") 2>conftest.er1
17870   ac_status=$?
17871   grep -v '^ *+' conftest.er1 >conftest.err
17872   rm -rf conftest.er1
17873   cat conftest.err >&5
17874   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
17875   (exit $ac_status); } && {
17876          test -z "$ac_c_werror_flag" ||
17877          test ! -s conftest.err
17878        } && test -s conftest$ac_exeext && {
17879          test "$cross_compiling" = yes ||
17880          $as_test_x conftest$ac_exeext
17881        }; then
17882   ac_cv_lib_gle_gleCreateGC=yes
17883 else
17884   $as_echo "$as_me: failed program was:" >&5
17885 sed 's/^/| /' conftest.$ac_ext >&5
17886
17887         ac_cv_lib_gle_gleCreateGC=no
17888 fi
17889
17890 rm -rf conftest.dSYM
17891 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
17892       conftest$ac_exeext conftest.$ac_ext
17893 LIBS=$ac_check_lib_save_LIBS
17894 fi
17895 { $as_echo "$as_me:$LINENO: result: $ac_cv_lib_gle_gleCreateGC" >&5
17896 $as_echo "$ac_cv_lib_gle_gleCreateGC" >&6; }
17897 if test "x$ac_cv_lib_gle_gleCreateGC" = x""yes; then
17898   have_gle=yes; gle_halfassed=no; GLE_LIBS="-lgle"
17899 fi
17900
17901   CPPFLAGS="$ac_save_CPPFLAGS"
17902   LDFLAGS="$ac_save_LDFLAGS"
17903 #  LIBS="$ac_save_LIBS"
17904
17905   fi
17906   if test "$have_gle" = yes ; then
17907     have_gle=no
17908     gle_halfassed=yes
17909
17910     # sometimes the libmatrix stuff is included in libgle.  look there first.
17911 #
17912 # I don't get it.  For some reason, this test passes on SGI, as if
17913 # uview_direction_d() was in libgle -- but it's not, it's in libmatrix.
17914 # Yet the link is succeeding.  Why???
17915 #
17916 #    AC_CHECK_X_LIB(gle, uview_direction_d,
17917 #                   [have_gle=yes; gle_halfassed=no],
17918 #                   [], $GL_LIBS -lX11 -lXext -lm)
17919
17920     # As of GLE 3 this is in libgle, and has changed name to uview_direction!
17921     # *sigh*
17922     if test "$have_gle3" = yes ; then
17923
17924   ac_save_CPPFLAGS="$CPPFLAGS"
17925   ac_save_LDFLAGS="$LDFLAGS"
17926 #  ac_save_LIBS="$LIBS"
17927
17928   if test \! -z "$includedir" ; then
17929     CPPFLAGS="$CPPFLAGS -I$includedir"
17930   fi
17931   # note: $X_CFLAGS includes $x_includes
17932   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
17933
17934   if test \! -z "$libdir" ; then
17935     LDFLAGS="$LDFLAGS -L$libdir"
17936   fi
17937   # note: $X_LIBS includes $x_libraries
17938   LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
17939
17940   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
17941   LDFLAGS=`eval eval eval eval eval eval eval eval eval echo $LDFLAGS`
17942   { $as_echo "$as_me:$LINENO: checking for uview_direction in -lgle" >&5
17943 $as_echo_n "checking for uview_direction in -lgle... " >&6; }
17944 if test "${ac_cv_lib_gle_uview_direction+set}" = set; then
17945   $as_echo_n "(cached) " >&6
17946 else
17947   ac_check_lib_save_LIBS=$LIBS
17948 LIBS="-lgle $GL_LIBS -lX11 -lXext -lm $LIBS"
17949 cat >conftest.$ac_ext <<_ACEOF
17950 /* confdefs.h.  */
17951 _ACEOF
17952 cat confdefs.h >>conftest.$ac_ext
17953 cat >>conftest.$ac_ext <<_ACEOF
17954 /* end confdefs.h.  */
17955
17956 /* Override any GCC internal prototype to avoid an error.
17957    Use char because int might match the return type of a GCC
17958    builtin and then its argument prototype would still apply.  */
17959 #ifdef __cplusplus
17960 extern "C"
17961 #endif
17962 char uview_direction ();
17963 int
17964 main ()
17965 {
17966 return uview_direction ();
17967   ;
17968   return 0;
17969 }
17970 _ACEOF
17971 rm -rf conftest.$ac_objext conftest$ac_exeext
17972 if { (ac_try="$ac_link"
17973 case "(($ac_try" in
17974   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17975   *) ac_try_echo=$ac_try;;
17976 esac
17977 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
17978 $as_echo "$ac_try_echo") >&5
17979   (eval "$ac_link") 2>conftest.er1
17980   ac_status=$?
17981   grep -v '^ *+' conftest.er1 >conftest.err
17982   rm -rf conftest.er1
17983   cat conftest.err >&5
17984   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
17985   (exit $ac_status); } && {
17986          test -z "$ac_c_werror_flag" ||
17987          test ! -s conftest.err
17988        } && test -s conftest$ac_exeext && {
17989          test "$cross_compiling" = yes ||
17990          $as_test_x conftest$ac_exeext
17991        }; then
17992   ac_cv_lib_gle_uview_direction=yes
17993 else
17994   $as_echo "$as_me: failed program was:" >&5
17995 sed 's/^/| /' conftest.$ac_ext >&5
17996
17997         ac_cv_lib_gle_uview_direction=no
17998 fi
17999
18000 rm -rf conftest.dSYM
18001 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
18002       conftest$ac_exeext conftest.$ac_ext
18003 LIBS=$ac_check_lib_save_LIBS
18004 fi
18005 { $as_echo "$as_me:$LINENO: result: $ac_cv_lib_gle_uview_direction" >&5
18006 $as_echo "$ac_cv_lib_gle_uview_direction" >&6; }
18007 if test "x$ac_cv_lib_gle_uview_direction" = x""yes; then
18008   have_gle=yes; gle_halfassed=no
18009 fi
18010
18011   CPPFLAGS="$ac_save_CPPFLAGS"
18012   LDFLAGS="$ac_save_LDFLAGS"
18013 #  LIBS="$ac_save_LIBS"
18014
18015     fi
18016     # if it wasn't in libgle, then look in libmatrix.
18017     if test "$have_gle" = no ; then
18018
18019   ac_save_CPPFLAGS="$CPPFLAGS"
18020   ac_save_LDFLAGS="$LDFLAGS"
18021 #  ac_save_LIBS="$LIBS"
18022
18023   if test \! -z "$includedir" ; then
18024     CPPFLAGS="$CPPFLAGS -I$includedir"
18025   fi
18026   # note: $X_CFLAGS includes $x_includes
18027   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
18028
18029   if test \! -z "$libdir" ; then
18030     LDFLAGS="$LDFLAGS -L$libdir"
18031   fi
18032   # note: $X_LIBS includes $x_libraries
18033   LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
18034
18035   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
18036   LDFLAGS=`eval eval eval eval eval eval eval eval eval echo $LDFLAGS`
18037   { $as_echo "$as_me:$LINENO: checking for uview_direction_d in -lmatrix" >&5
18038 $as_echo_n "checking for uview_direction_d in -lmatrix... " >&6; }
18039 if test "${ac_cv_lib_matrix_uview_direction_d+set}" = set; then
18040   $as_echo_n "(cached) " >&6
18041 else
18042   ac_check_lib_save_LIBS=$LIBS
18043 LIBS="-lmatrix $GL_LIBS -lX11 -lXext -lm $LIBS"
18044 cat >conftest.$ac_ext <<_ACEOF
18045 /* confdefs.h.  */
18046 _ACEOF
18047 cat confdefs.h >>conftest.$ac_ext
18048 cat >>conftest.$ac_ext <<_ACEOF
18049 /* end confdefs.h.  */
18050
18051 /* Override any GCC internal prototype to avoid an error.
18052    Use char because int might match the return type of a GCC
18053    builtin and then its argument prototype would still apply.  */
18054 #ifdef __cplusplus
18055 extern "C"
18056 #endif
18057 char uview_direction_d ();
18058 int
18059 main ()
18060 {
18061 return uview_direction_d ();
18062   ;
18063   return 0;
18064 }
18065 _ACEOF
18066 rm -rf conftest.$ac_objext conftest$ac_exeext
18067 if { (ac_try="$ac_link"
18068 case "(($ac_try" in
18069   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18070   *) ac_try_echo=$ac_try;;
18071 esac
18072 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
18073 $as_echo "$ac_try_echo") >&5
18074   (eval "$ac_link") 2>conftest.er1
18075   ac_status=$?
18076   grep -v '^ *+' conftest.er1 >conftest.err
18077   rm -rf conftest.er1
18078   cat conftest.err >&5
18079   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
18080   (exit $ac_status); } && {
18081          test -z "$ac_c_werror_flag" ||
18082          test ! -s conftest.err
18083        } && test -s conftest$ac_exeext && {
18084          test "$cross_compiling" = yes ||
18085          $as_test_x conftest$ac_exeext
18086        }; then
18087   ac_cv_lib_matrix_uview_direction_d=yes
18088 else
18089   $as_echo "$as_me: failed program was:" >&5
18090 sed 's/^/| /' conftest.$ac_ext >&5
18091
18092         ac_cv_lib_matrix_uview_direction_d=no
18093 fi
18094
18095 rm -rf conftest.dSYM
18096 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
18097       conftest$ac_exeext conftest.$ac_ext
18098 LIBS=$ac_check_lib_save_LIBS
18099 fi
18100 { $as_echo "$as_me:$LINENO: result: $ac_cv_lib_matrix_uview_direction_d" >&5
18101 $as_echo "$ac_cv_lib_matrix_uview_direction_d" >&6; }
18102 if test "x$ac_cv_lib_matrix_uview_direction_d" = x""yes; then
18103   have_gle=yes; gle_halfassed=no;
18104                       GLE_LIBS="$GLE_LIBS -lmatrix"
18105 fi
18106
18107   CPPFLAGS="$ac_save_CPPFLAGS"
18108   LDFLAGS="$ac_save_LDFLAGS"
18109 #  LIBS="$ac_save_LIBS"
18110
18111     fi
18112   fi
18113
18114   if test "$have_gle" = yes ; then
18115     cat >>confdefs.h <<\_ACEOF
18116 #define HAVE_GLE 1
18117 _ACEOF
18118
18119     if test "$have_gle3" = yes ; then
18120       cat >>confdefs.h <<\_ACEOF
18121 #define HAVE_GLE3 1
18122 _ACEOF
18123
18124     fi
18125   fi
18126
18127 elif test "$with_gle" != no; then
18128   echo "error: must be yes or no: --with-gle=$with_gle"
18129   exit 1
18130
18131 fi
18132
18133
18134 ###############################################################################
18135 #
18136 #       Check for -lgdk_pixbuf.
18137 #       These tests are for gdk_pixbuf usage of the hacks,
18138 #       not xscreensaver-demo (thus we have to test again to get
18139 #       the libraries right: don't want to pull in all of GTK
18140 #       for the hacks.)
18141 #
18142 ###############################################################################
18143
18144 have_gdk_pixbuf=no
18145 with_gdk_pixbuf_req=unspecified
18146
18147 # Check whether --with-pixbuf was given.
18148 if test "${with_pixbuf+set}" = set; then
18149   withval=$with_pixbuf; with_gdk_pixbuf="$withval"; with_gdk_pixbuf_req="$withval"
18150 else
18151   with_gdk_pixbuf=yes
18152 fi
18153
18154
18155 # if --with-pixbuf=/directory/ was specified, remember that directory so that
18156 # we can also look for the `gdk-pixbuf-config' program in that directory.
18157 case "$with_gdk_pixbuf" in
18158   /*)
18159     gdk_pixbuf_dir="$with_gdk_pixbuf"
18160     ;;
18161   *)
18162     gdk_pixbuf_dir=""
18163     ;;
18164 esac
18165
18166
18167    case "$with_gdk_pixbuf" in
18168     yes) ;;
18169     no)  ;;
18170
18171     /*)
18172      { $as_echo "$as_me:$LINENO: checking for GDK_PIXBUF headers" >&5
18173 $as_echo_n "checking for GDK_PIXBUF headers... " >&6; }
18174      d=$with_gdk_pixbuf/include
18175      if test -d $d; then
18176        X_CFLAGS="-I$d $X_CFLAGS"
18177        { $as_echo "$as_me:$LINENO: result: $d" >&5
18178 $as_echo "$d" >&6; }
18179      else
18180        { $as_echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
18181 $as_echo "not found ($d: no such directory)" >&6; }
18182      fi
18183
18184      { $as_echo "$as_me:$LINENO: checking for GDK_PIXBUF libs" >&5
18185 $as_echo_n "checking for GDK_PIXBUF libs... " >&6; }
18186      d=$with_gdk_pixbuf/lib
18187      if test -d $d; then
18188        X_LIBS="-L$d $X_LIBS"
18189        { $as_echo "$as_me:$LINENO: result: $d" >&5
18190 $as_echo "$d" >&6; }
18191      else
18192        { $as_echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
18193 $as_echo "not found ($d: no such directory)" >&6; }
18194      fi
18195
18196      # replace the directory string with "yes".
18197      with_gdk_pixbuf_req="yes"
18198      with_gdk_pixbuf=$with_gdk_pixbuf_req
18199      ;;
18200
18201     *)
18202      echo ""
18203      echo "error: argument to --with-pixbuf must be \"yes\", \"no\", or a directory."
18204      echo "       If it is a directory, then \`DIR/include' will be added to"
18205      echo "       the -I list, and \`DIR/lib' will be added to the -L list."
18206      exit 1
18207      ;;
18208    esac
18209
18210
18211 if test "$with_gdk_pixbuf" != yes -a "$with_gdk_pixbuf" != no ; then
18212   echo "error: must be yes or no: --with-pixbuf=$with_gdk_pixbuf"
18213   exit 1
18214 fi
18215
18216 if test "$with_gdk_pixbuf" = yes; then
18217   have_gdk_pixbuf=no
18218
18219   pkgs=''
18220   ok="yes"
18221
18222   pkg_check_version gdk-pixbuf-2.0      2.0.0
18223   pkg_check_version gdk-pixbuf-xlib-2.0 2.0.0
18224   have_gdk_pixbuf="$ok"
18225
18226   if test "$have_gdk_pixbuf" = yes; then
18227     { $as_echo "$as_me:$LINENO: checking for gdk-pixbuf includes" >&5
18228 $as_echo_n "checking for gdk-pixbuf includes... " >&6; }
18229 if test "${ac_cv_gdk_pixbuf_config_cflags+set}" = set; then
18230   $as_echo_n "(cached) " >&6
18231 else
18232   ac_cv_gdk_pixbuf_config_cflags=`$pkg_config --cflags $pkgs`
18233 fi
18234 { $as_echo "$as_me:$LINENO: result: $ac_cv_gdk_pixbuf_config_cflags" >&5
18235 $as_echo "$ac_cv_gdk_pixbuf_config_cflags" >&6; }
18236     { $as_echo "$as_me:$LINENO: checking for gdk-pixbuf libs" >&5
18237 $as_echo_n "checking for gdk-pixbuf libs... " >&6; }
18238 if test "${ac_cv_gdk_pixbuf_config_libs+set}" = set; then
18239   $as_echo_n "(cached) " >&6
18240 else
18241   ac_cv_gdk_pixbuf_config_libs=`$pkg_config --libs $pkgs`
18242 fi
18243 { $as_echo "$as_me:$LINENO: result: $ac_cv_gdk_pixbuf_config_libs" >&5
18244 $as_echo "$ac_cv_gdk_pixbuf_config_libs" >&6; }
18245   fi
18246
18247   ac_gdk_pixbuf_config_cflags=$ac_cv_gdk_pixbuf_config_cflags
18248   ac_gdk_pixbuf_config_libs=$ac_cv_gdk_pixbuf_config_libs
18249
18250
18251   if test "$have_gdk_pixbuf" = yes; then
18252     #
18253     # we appear to have pixbuf; check for headers/libs to be sure.
18254     #
18255     ac_save_gdk_pixbuf_CPPFLAGS="$CPPFLAGS"
18256     CPPFLAGS="$CPPFLAGS $ac_gdk_pixbuf_config_cflags"
18257
18258     have_gdk_pixbuf=no
18259
18260     # check for header A...
18261
18262   ac_save_CPPFLAGS="$CPPFLAGS"
18263   if test \! -z "$includedir" ; then
18264     CPPFLAGS="$CPPFLAGS -I$includedir"
18265   fi
18266   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
18267   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
18268   if test "${ac_cv_header_gdk_pixbuf_gdk_pixbuf_h+set}" = set; then
18269   { $as_echo "$as_me:$LINENO: checking for gdk-pixbuf/gdk-pixbuf.h" >&5
18270 $as_echo_n "checking for gdk-pixbuf/gdk-pixbuf.h... " >&6; }
18271 if test "${ac_cv_header_gdk_pixbuf_gdk_pixbuf_h+set}" = set; then
18272   $as_echo_n "(cached) " >&6
18273 fi
18274 { $as_echo "$as_me:$LINENO: result: $ac_cv_header_gdk_pixbuf_gdk_pixbuf_h" >&5
18275 $as_echo "$ac_cv_header_gdk_pixbuf_gdk_pixbuf_h" >&6; }
18276 else
18277   # Is the header compilable?
18278 { $as_echo "$as_me:$LINENO: checking gdk-pixbuf/gdk-pixbuf.h usability" >&5
18279 $as_echo_n "checking gdk-pixbuf/gdk-pixbuf.h usability... " >&6; }
18280 cat >conftest.$ac_ext <<_ACEOF
18281 /* confdefs.h.  */
18282 _ACEOF
18283 cat confdefs.h >>conftest.$ac_ext
18284 cat >>conftest.$ac_ext <<_ACEOF
18285 /* end confdefs.h.  */
18286 $ac_includes_default
18287 #include <gdk-pixbuf/gdk-pixbuf.h>
18288 _ACEOF
18289 rm -rf conftest.$ac_objext
18290 if { (ac_try="$ac_compile"
18291 case "(($ac_try" in
18292   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18293   *) ac_try_echo=$ac_try;;
18294 esac
18295 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
18296 $as_echo "$ac_try_echo") >&5
18297   (eval "$ac_compile") 2>conftest.er1
18298   ac_status=$?
18299   grep -v '^ *+' conftest.er1 >conftest.err
18300   rm -rf conftest.er1
18301   cat conftest.err >&5
18302   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
18303   (exit $ac_status); } && {
18304          test -z "$ac_c_werror_flag" ||
18305          test ! -s conftest.err
18306        } && test -s conftest.$ac_objext; then
18307   ac_header_compiler=yes
18308 else
18309   $as_echo "$as_me: failed program was:" >&5
18310 sed 's/^/| /' conftest.$ac_ext >&5
18311
18312         ac_header_compiler=no
18313 fi
18314
18315 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
18316 { $as_echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
18317 $as_echo "$ac_header_compiler" >&6; }
18318
18319 # Is the header present?
18320 { $as_echo "$as_me:$LINENO: checking gdk-pixbuf/gdk-pixbuf.h presence" >&5
18321 $as_echo_n "checking gdk-pixbuf/gdk-pixbuf.h presence... " >&6; }
18322 cat >conftest.$ac_ext <<_ACEOF
18323 /* confdefs.h.  */
18324 _ACEOF
18325 cat confdefs.h >>conftest.$ac_ext
18326 cat >>conftest.$ac_ext <<_ACEOF
18327 /* end confdefs.h.  */
18328 #include <gdk-pixbuf/gdk-pixbuf.h>
18329 _ACEOF
18330 if { (ac_try="$ac_cpp conftest.$ac_ext"
18331 case "(($ac_try" in
18332   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18333   *) ac_try_echo=$ac_try;;
18334 esac
18335 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
18336 $as_echo "$ac_try_echo") >&5
18337   (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
18338   ac_status=$?
18339   grep -v '^ *+' conftest.er1 >conftest.err
18340   rm -rf conftest.er1
18341   cat conftest.err >&5
18342   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
18343   (exit $ac_status); } >/dev/null && {
18344          test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
18345          test ! -s conftest.err
18346        }; then
18347   ac_header_preproc=yes
18348 else
18349   $as_echo "$as_me: failed program was:" >&5
18350 sed 's/^/| /' conftest.$ac_ext >&5
18351
18352   ac_header_preproc=no
18353 fi
18354
18355 rm -rf conftest.err conftest.$ac_ext
18356 { $as_echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
18357 $as_echo "$ac_header_preproc" >&6; }
18358
18359 # So?  What about this header?
18360 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
18361   yes:no: )
18362     { $as_echo "$as_me:$LINENO: WARNING: gdk-pixbuf/gdk-pixbuf.h: accepted by the compiler, rejected by the preprocessor!" >&5
18363 $as_echo "$as_me: WARNING: gdk-pixbuf/gdk-pixbuf.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
18364     { $as_echo "$as_me:$LINENO: WARNING: gdk-pixbuf/gdk-pixbuf.h: proceeding with the compiler's result" >&5
18365 $as_echo "$as_me: WARNING: gdk-pixbuf/gdk-pixbuf.h: proceeding with the compiler's result" >&2;}
18366     ac_header_preproc=yes
18367     ;;
18368   no:yes:* )
18369     { $as_echo "$as_me:$LINENO: WARNING: gdk-pixbuf/gdk-pixbuf.h: present but cannot be compiled" >&5
18370 $as_echo "$as_me: WARNING: gdk-pixbuf/gdk-pixbuf.h: present but cannot be compiled" >&2;}
18371     { $as_echo "$as_me:$LINENO: WARNING: gdk-pixbuf/gdk-pixbuf.h:     check for missing prerequisite headers?" >&5
18372 $as_echo "$as_me: WARNING: gdk-pixbuf/gdk-pixbuf.h:     check for missing prerequisite headers?" >&2;}
18373     { $as_echo "$as_me:$LINENO: WARNING: gdk-pixbuf/gdk-pixbuf.h: see the Autoconf documentation" >&5
18374 $as_echo "$as_me: WARNING: gdk-pixbuf/gdk-pixbuf.h: see the Autoconf documentation" >&2;}
18375     { $as_echo "$as_me:$LINENO: WARNING: gdk-pixbuf/gdk-pixbuf.h:     section \"Present But Cannot Be Compiled\"" >&5
18376 $as_echo "$as_me: WARNING: gdk-pixbuf/gdk-pixbuf.h:     section \"Present But Cannot Be Compiled\"" >&2;}
18377     { $as_echo "$as_me:$LINENO: WARNING: gdk-pixbuf/gdk-pixbuf.h: proceeding with the preprocessor's result" >&5
18378 $as_echo "$as_me: WARNING: gdk-pixbuf/gdk-pixbuf.h: proceeding with the preprocessor's result" >&2;}
18379     { $as_echo "$as_me:$LINENO: WARNING: gdk-pixbuf/gdk-pixbuf.h: in the future, the compiler will take precedence" >&5
18380 $as_echo "$as_me: WARNING: gdk-pixbuf/gdk-pixbuf.h: in the future, the compiler will take precedence" >&2;}
18381
18382     ;;
18383 esac
18384 { $as_echo "$as_me:$LINENO: checking for gdk-pixbuf/gdk-pixbuf.h" >&5
18385 $as_echo_n "checking for gdk-pixbuf/gdk-pixbuf.h... " >&6; }
18386 if test "${ac_cv_header_gdk_pixbuf_gdk_pixbuf_h+set}" = set; then
18387   $as_echo_n "(cached) " >&6
18388 else
18389   ac_cv_header_gdk_pixbuf_gdk_pixbuf_h=$ac_header_preproc
18390 fi
18391 { $as_echo "$as_me:$LINENO: result: $ac_cv_header_gdk_pixbuf_gdk_pixbuf_h" >&5
18392 $as_echo "$ac_cv_header_gdk_pixbuf_gdk_pixbuf_h" >&6; }
18393
18394 fi
18395 if test "x$ac_cv_header_gdk_pixbuf_gdk_pixbuf_h" = x""yes; then
18396   have_gdk_pixbuf=yes
18397 fi
18398
18399
18400   CPPFLAGS="$ac_save_CPPFLAGS"
18401
18402     # if that worked, check for header B...
18403     if test "$have_gdk_pixbuf" = yes; then
18404       have_gdk_pixbuf=no
18405       gdk_pixbuf_halfassed=yes
18406
18407   ac_save_CPPFLAGS="$CPPFLAGS"
18408   if test \! -z "$includedir" ; then
18409     CPPFLAGS="$CPPFLAGS -I$includedir"
18410   fi
18411   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
18412   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
18413   if test "${ac_cv_header_gdk_pixbuf_gdk_pixbuf_xlib_h+set}" = set; then
18414   { $as_echo "$as_me:$LINENO: checking for gdk-pixbuf/gdk-pixbuf-xlib.h" >&5
18415 $as_echo_n "checking for gdk-pixbuf/gdk-pixbuf-xlib.h... " >&6; }
18416 if test "${ac_cv_header_gdk_pixbuf_gdk_pixbuf_xlib_h+set}" = set; then
18417   $as_echo_n "(cached) " >&6
18418 fi
18419 { $as_echo "$as_me:$LINENO: result: $ac_cv_header_gdk_pixbuf_gdk_pixbuf_xlib_h" >&5
18420 $as_echo "$ac_cv_header_gdk_pixbuf_gdk_pixbuf_xlib_h" >&6; }
18421 else
18422   # Is the header compilable?
18423 { $as_echo "$as_me:$LINENO: checking gdk-pixbuf/gdk-pixbuf-xlib.h usability" >&5
18424 $as_echo_n "checking gdk-pixbuf/gdk-pixbuf-xlib.h usability... " >&6; }
18425 cat >conftest.$ac_ext <<_ACEOF
18426 /* confdefs.h.  */
18427 _ACEOF
18428 cat confdefs.h >>conftest.$ac_ext
18429 cat >>conftest.$ac_ext <<_ACEOF
18430 /* end confdefs.h.  */
18431 $ac_includes_default
18432 #include <gdk-pixbuf/gdk-pixbuf-xlib.h>
18433 _ACEOF
18434 rm -rf conftest.$ac_objext
18435 if { (ac_try="$ac_compile"
18436 case "(($ac_try" in
18437   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18438   *) ac_try_echo=$ac_try;;
18439 esac
18440 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
18441 $as_echo "$ac_try_echo") >&5
18442   (eval "$ac_compile") 2>conftest.er1
18443   ac_status=$?
18444   grep -v '^ *+' conftest.er1 >conftest.err
18445   rm -rf conftest.er1
18446   cat conftest.err >&5
18447   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
18448   (exit $ac_status); } && {
18449          test -z "$ac_c_werror_flag" ||
18450          test ! -s conftest.err
18451        } && test -s conftest.$ac_objext; then
18452   ac_header_compiler=yes
18453 else
18454   $as_echo "$as_me: failed program was:" >&5
18455 sed 's/^/| /' conftest.$ac_ext >&5
18456
18457         ac_header_compiler=no
18458 fi
18459
18460 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
18461 { $as_echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
18462 $as_echo "$ac_header_compiler" >&6; }
18463
18464 # Is the header present?
18465 { $as_echo "$as_me:$LINENO: checking gdk-pixbuf/gdk-pixbuf-xlib.h presence" >&5
18466 $as_echo_n "checking gdk-pixbuf/gdk-pixbuf-xlib.h presence... " >&6; }
18467 cat >conftest.$ac_ext <<_ACEOF
18468 /* confdefs.h.  */
18469 _ACEOF
18470 cat confdefs.h >>conftest.$ac_ext
18471 cat >>conftest.$ac_ext <<_ACEOF
18472 /* end confdefs.h.  */
18473 #include <gdk-pixbuf/gdk-pixbuf-xlib.h>
18474 _ACEOF
18475 if { (ac_try="$ac_cpp conftest.$ac_ext"
18476 case "(($ac_try" in
18477   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18478   *) ac_try_echo=$ac_try;;
18479 esac
18480 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
18481 $as_echo "$ac_try_echo") >&5
18482   (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
18483   ac_status=$?
18484   grep -v '^ *+' conftest.er1 >conftest.err
18485   rm -rf conftest.er1
18486   cat conftest.err >&5
18487   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
18488   (exit $ac_status); } >/dev/null && {
18489          test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
18490          test ! -s conftest.err
18491        }; then
18492   ac_header_preproc=yes
18493 else
18494   $as_echo "$as_me: failed program was:" >&5
18495 sed 's/^/| /' conftest.$ac_ext >&5
18496
18497   ac_header_preproc=no
18498 fi
18499
18500 rm -rf conftest.err conftest.$ac_ext
18501 { $as_echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
18502 $as_echo "$ac_header_preproc" >&6; }
18503
18504 # So?  What about this header?
18505 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
18506   yes:no: )
18507     { $as_echo "$as_me:$LINENO: WARNING: gdk-pixbuf/gdk-pixbuf-xlib.h: accepted by the compiler, rejected by the preprocessor!" >&5
18508 $as_echo "$as_me: WARNING: gdk-pixbuf/gdk-pixbuf-xlib.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
18509     { $as_echo "$as_me:$LINENO: WARNING: gdk-pixbuf/gdk-pixbuf-xlib.h: proceeding with the compiler's result" >&5
18510 $as_echo "$as_me: WARNING: gdk-pixbuf/gdk-pixbuf-xlib.h: proceeding with the compiler's result" >&2;}
18511     ac_header_preproc=yes
18512     ;;
18513   no:yes:* )
18514     { $as_echo "$as_me:$LINENO: WARNING: gdk-pixbuf/gdk-pixbuf-xlib.h: present but cannot be compiled" >&5
18515 $as_echo "$as_me: WARNING: gdk-pixbuf/gdk-pixbuf-xlib.h: present but cannot be compiled" >&2;}
18516     { $as_echo "$as_me:$LINENO: WARNING: gdk-pixbuf/gdk-pixbuf-xlib.h:     check for missing prerequisite headers?" >&5
18517 $as_echo "$as_me: WARNING: gdk-pixbuf/gdk-pixbuf-xlib.h:     check for missing prerequisite headers?" >&2;}
18518     { $as_echo "$as_me:$LINENO: WARNING: gdk-pixbuf/gdk-pixbuf-xlib.h: see the Autoconf documentation" >&5
18519 $as_echo "$as_me: WARNING: gdk-pixbuf/gdk-pixbuf-xlib.h: see the Autoconf documentation" >&2;}
18520     { $as_echo "$as_me:$LINENO: WARNING: gdk-pixbuf/gdk-pixbuf-xlib.h:     section \"Present But Cannot Be Compiled\"" >&5
18521 $as_echo "$as_me: WARNING: gdk-pixbuf/gdk-pixbuf-xlib.h:     section \"Present But Cannot Be Compiled\"" >&2;}
18522     { $as_echo "$as_me:$LINENO: WARNING: gdk-pixbuf/gdk-pixbuf-xlib.h: proceeding with the preprocessor's result" >&5
18523 $as_echo "$as_me: WARNING: gdk-pixbuf/gdk-pixbuf-xlib.h: proceeding with the preprocessor's result" >&2;}
18524     { $as_echo "$as_me:$LINENO: WARNING: gdk-pixbuf/gdk-pixbuf-xlib.h: in the future, the compiler will take precedence" >&5
18525 $as_echo "$as_me: WARNING: gdk-pixbuf/gdk-pixbuf-xlib.h: in the future, the compiler will take precedence" >&2;}
18526
18527     ;;
18528 esac
18529 { $as_echo "$as_me:$LINENO: checking for gdk-pixbuf/gdk-pixbuf-xlib.h" >&5
18530 $as_echo_n "checking for gdk-pixbuf/gdk-pixbuf-xlib.h... " >&6; }
18531 if test "${ac_cv_header_gdk_pixbuf_gdk_pixbuf_xlib_h+set}" = set; then
18532   $as_echo_n "(cached) " >&6
18533 else
18534   ac_cv_header_gdk_pixbuf_gdk_pixbuf_xlib_h=$ac_header_preproc
18535 fi
18536 { $as_echo "$as_me:$LINENO: result: $ac_cv_header_gdk_pixbuf_gdk_pixbuf_xlib_h" >&5
18537 $as_echo "$ac_cv_header_gdk_pixbuf_gdk_pixbuf_xlib_h" >&6; }
18538
18539 fi
18540 if test "x$ac_cv_header_gdk_pixbuf_gdk_pixbuf_xlib_h" = x""yes; then
18541   have_gdk_pixbuf=yes
18542                          gdk_pixbuf_halfassed=no
18543 fi
18544
18545
18546   CPPFLAGS="$ac_save_CPPFLAGS"
18547
18548       # yay, it has a new name in Gtk 2.x...
18549       if test "$have_gdk_pixbuf" = no; then
18550         have_gdk_pixbuf=no
18551         gdk_pixbuf_halfassed=yes
18552
18553   ac_save_CPPFLAGS="$CPPFLAGS"
18554   if test \! -z "$includedir" ; then
18555     CPPFLAGS="$CPPFLAGS -I$includedir"
18556   fi
18557   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
18558   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
18559   if test "${ac_cv_header_gdk_pixbuf_xlib_gdk_pixbuf_xlib_h+set}" = set; then
18560   { $as_echo "$as_me:$LINENO: checking for gdk-pixbuf-xlib/gdk-pixbuf-xlib.h" >&5
18561 $as_echo_n "checking for gdk-pixbuf-xlib/gdk-pixbuf-xlib.h... " >&6; }
18562 if test "${ac_cv_header_gdk_pixbuf_xlib_gdk_pixbuf_xlib_h+set}" = set; then
18563   $as_echo_n "(cached) " >&6
18564 fi
18565 { $as_echo "$as_me:$LINENO: result: $ac_cv_header_gdk_pixbuf_xlib_gdk_pixbuf_xlib_h" >&5
18566 $as_echo "$ac_cv_header_gdk_pixbuf_xlib_gdk_pixbuf_xlib_h" >&6; }
18567 else
18568   # Is the header compilable?
18569 { $as_echo "$as_me:$LINENO: checking gdk-pixbuf-xlib/gdk-pixbuf-xlib.h usability" >&5
18570 $as_echo_n "checking gdk-pixbuf-xlib/gdk-pixbuf-xlib.h usability... " >&6; }
18571 cat >conftest.$ac_ext <<_ACEOF
18572 /* confdefs.h.  */
18573 _ACEOF
18574 cat confdefs.h >>conftest.$ac_ext
18575 cat >>conftest.$ac_ext <<_ACEOF
18576 /* end confdefs.h.  */
18577 $ac_includes_default
18578 #include <gdk-pixbuf-xlib/gdk-pixbuf-xlib.h>
18579 _ACEOF
18580 rm -rf conftest.$ac_objext
18581 if { (ac_try="$ac_compile"
18582 case "(($ac_try" in
18583   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18584   *) ac_try_echo=$ac_try;;
18585 esac
18586 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
18587 $as_echo "$ac_try_echo") >&5
18588   (eval "$ac_compile") 2>conftest.er1
18589   ac_status=$?
18590   grep -v '^ *+' conftest.er1 >conftest.err
18591   rm -rf conftest.er1
18592   cat conftest.err >&5
18593   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
18594   (exit $ac_status); } && {
18595          test -z "$ac_c_werror_flag" ||
18596          test ! -s conftest.err
18597        } && test -s conftest.$ac_objext; then
18598   ac_header_compiler=yes
18599 else
18600   $as_echo "$as_me: failed program was:" >&5
18601 sed 's/^/| /' conftest.$ac_ext >&5
18602
18603         ac_header_compiler=no
18604 fi
18605
18606 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
18607 { $as_echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
18608 $as_echo "$ac_header_compiler" >&6; }
18609
18610 # Is the header present?
18611 { $as_echo "$as_me:$LINENO: checking gdk-pixbuf-xlib/gdk-pixbuf-xlib.h presence" >&5
18612 $as_echo_n "checking gdk-pixbuf-xlib/gdk-pixbuf-xlib.h presence... " >&6; }
18613 cat >conftest.$ac_ext <<_ACEOF
18614 /* confdefs.h.  */
18615 _ACEOF
18616 cat confdefs.h >>conftest.$ac_ext
18617 cat >>conftest.$ac_ext <<_ACEOF
18618 /* end confdefs.h.  */
18619 #include <gdk-pixbuf-xlib/gdk-pixbuf-xlib.h>
18620 _ACEOF
18621 if { (ac_try="$ac_cpp conftest.$ac_ext"
18622 case "(($ac_try" in
18623   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18624   *) ac_try_echo=$ac_try;;
18625 esac
18626 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
18627 $as_echo "$ac_try_echo") >&5
18628   (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
18629   ac_status=$?
18630   grep -v '^ *+' conftest.er1 >conftest.err
18631   rm -rf conftest.er1
18632   cat conftest.err >&5
18633   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
18634   (exit $ac_status); } >/dev/null && {
18635          test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
18636          test ! -s conftest.err
18637        }; then
18638   ac_header_preproc=yes
18639 else
18640   $as_echo "$as_me: failed program was:" >&5
18641 sed 's/^/| /' conftest.$ac_ext >&5
18642
18643   ac_header_preproc=no
18644 fi
18645
18646 rm -rf conftest.err conftest.$ac_ext
18647 { $as_echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
18648 $as_echo "$ac_header_preproc" >&6; }
18649
18650 # So?  What about this header?
18651 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
18652   yes:no: )
18653     { $as_echo "$as_me:$LINENO: WARNING: gdk-pixbuf-xlib/gdk-pixbuf-xlib.h: accepted by the compiler, rejected by the preprocessor!" >&5
18654 $as_echo "$as_me: WARNING: gdk-pixbuf-xlib/gdk-pixbuf-xlib.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
18655     { $as_echo "$as_me:$LINENO: WARNING: gdk-pixbuf-xlib/gdk-pixbuf-xlib.h: proceeding with the compiler's result" >&5
18656 $as_echo "$as_me: WARNING: gdk-pixbuf-xlib/gdk-pixbuf-xlib.h: proceeding with the compiler's result" >&2;}
18657     ac_header_preproc=yes
18658     ;;
18659   no:yes:* )
18660     { $as_echo "$as_me:$LINENO: WARNING: gdk-pixbuf-xlib/gdk-pixbuf-xlib.h: present but cannot be compiled" >&5
18661 $as_echo "$as_me: WARNING: gdk-pixbuf-xlib/gdk-pixbuf-xlib.h: present but cannot be compiled" >&2;}
18662     { $as_echo "$as_me:$LINENO: WARNING: gdk-pixbuf-xlib/gdk-pixbuf-xlib.h:     check for missing prerequisite headers?" >&5
18663 $as_echo "$as_me: WARNING: gdk-pixbuf-xlib/gdk-pixbuf-xlib.h:     check for missing prerequisite headers?" >&2;}
18664     { $as_echo "$as_me:$LINENO: WARNING: gdk-pixbuf-xlib/gdk-pixbuf-xlib.h: see the Autoconf documentation" >&5
18665 $as_echo "$as_me: WARNING: gdk-pixbuf-xlib/gdk-pixbuf-xlib.h: see the Autoconf documentation" >&2;}
18666     { $as_echo "$as_me:$LINENO: WARNING: gdk-pixbuf-xlib/gdk-pixbuf-xlib.h:     section \"Present But Cannot Be Compiled\"" >&5
18667 $as_echo "$as_me: WARNING: gdk-pixbuf-xlib/gdk-pixbuf-xlib.h:     section \"Present But Cannot Be Compiled\"" >&2;}
18668     { $as_echo "$as_me:$LINENO: WARNING: gdk-pixbuf-xlib/gdk-pixbuf-xlib.h: proceeding with the preprocessor's result" >&5
18669 $as_echo "$as_me: WARNING: gdk-pixbuf-xlib/gdk-pixbuf-xlib.h: proceeding with the preprocessor's result" >&2;}
18670     { $as_echo "$as_me:$LINENO: WARNING: gdk-pixbuf-xlib/gdk-pixbuf-xlib.h: in the future, the compiler will take precedence" >&5
18671 $as_echo "$as_me: WARNING: gdk-pixbuf-xlib/gdk-pixbuf-xlib.h: in the future, the compiler will take precedence" >&2;}
18672
18673     ;;
18674 esac
18675 { $as_echo "$as_me:$LINENO: checking for gdk-pixbuf-xlib/gdk-pixbuf-xlib.h" >&5
18676 $as_echo_n "checking for gdk-pixbuf-xlib/gdk-pixbuf-xlib.h... " >&6; }
18677 if test "${ac_cv_header_gdk_pixbuf_xlib_gdk_pixbuf_xlib_h+set}" = set; then
18678   $as_echo_n "(cached) " >&6
18679 else
18680   ac_cv_header_gdk_pixbuf_xlib_gdk_pixbuf_xlib_h=$ac_header_preproc
18681 fi
18682 { $as_echo "$as_me:$LINENO: result: $ac_cv_header_gdk_pixbuf_xlib_gdk_pixbuf_xlib_h" >&5
18683 $as_echo "$ac_cv_header_gdk_pixbuf_xlib_gdk_pixbuf_xlib_h" >&6; }
18684
18685 fi
18686 if test "x$ac_cv_header_gdk_pixbuf_xlib_gdk_pixbuf_xlib_h" = x""yes; then
18687   have_gdk_pixbuf=yes
18688                            gdk_pixbuf_halfassed=no
18689 fi
18690
18691
18692   CPPFLAGS="$ac_save_CPPFLAGS"
18693       fi
18694     fi
18695     CPPFLAGS="$ac_save_gdk_pixbuf_CPPFLAGS"
18696   fi
18697
18698   if test "$have_gdk_pixbuf" = yes; then
18699     # we have the headers, now check for the libraries
18700     have_gdk_pixbuf=no
18701     gdk_pixbuf_halfassed=yes
18702
18703     { $as_echo "$as_me:$LINENO: result: checking for gdk_pixbuf usability..." >&5
18704 $as_echo "checking for gdk_pixbuf usability..." >&6; }
18705
18706     # library A...
18707
18708   ac_save_CPPFLAGS="$CPPFLAGS"
18709   ac_save_LDFLAGS="$LDFLAGS"
18710 #  ac_save_LIBS="$LIBS"
18711
18712   if test \! -z "$includedir" ; then
18713     CPPFLAGS="$CPPFLAGS -I$includedir"
18714   fi
18715   # note: $X_CFLAGS includes $x_includes
18716   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
18717
18718   if test \! -z "$libdir" ; then
18719     LDFLAGS="$LDFLAGS -L$libdir"
18720   fi
18721   # note: $X_LIBS includes $x_libraries
18722   LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
18723
18724   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
18725   LDFLAGS=`eval eval eval eval eval eval eval eval eval echo $LDFLAGS`
18726   { $as_echo "$as_me:$LINENO: checking for gdk_pixbuf_new_from_file in -lc" >&5
18727 $as_echo_n "checking for gdk_pixbuf_new_from_file in -lc... " >&6; }
18728 if test "${ac_cv_lib_c_gdk_pixbuf_new_from_file+set}" = set; then
18729   $as_echo_n "(cached) " >&6
18730 else
18731   ac_check_lib_save_LIBS=$LIBS
18732 LIBS="-lc $ac_gdk_pixbuf_config_libs -lX11 -lXext -lm $LIBS"
18733 cat >conftest.$ac_ext <<_ACEOF
18734 /* confdefs.h.  */
18735 _ACEOF
18736 cat confdefs.h >>conftest.$ac_ext
18737 cat >>conftest.$ac_ext <<_ACEOF
18738 /* end confdefs.h.  */
18739
18740 /* Override any GCC internal prototype to avoid an error.
18741    Use char because int might match the return type of a GCC
18742    builtin and then its argument prototype would still apply.  */
18743 #ifdef __cplusplus
18744 extern "C"
18745 #endif
18746 char gdk_pixbuf_new_from_file ();
18747 int
18748 main ()
18749 {
18750 return gdk_pixbuf_new_from_file ();
18751   ;
18752   return 0;
18753 }
18754 _ACEOF
18755 rm -rf conftest.$ac_objext conftest$ac_exeext
18756 if { (ac_try="$ac_link"
18757 case "(($ac_try" in
18758   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18759   *) ac_try_echo=$ac_try;;
18760 esac
18761 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
18762 $as_echo "$ac_try_echo") >&5
18763   (eval "$ac_link") 2>conftest.er1
18764   ac_status=$?
18765   grep -v '^ *+' conftest.er1 >conftest.err
18766   rm -rf conftest.er1
18767   cat conftest.err >&5
18768   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
18769   (exit $ac_status); } && {
18770          test -z "$ac_c_werror_flag" ||
18771          test ! -s conftest.err
18772        } && test -s conftest$ac_exeext && {
18773          test "$cross_compiling" = yes ||
18774          $as_test_x conftest$ac_exeext
18775        }; then
18776   ac_cv_lib_c_gdk_pixbuf_new_from_file=yes
18777 else
18778   $as_echo "$as_me: failed program was:" >&5
18779 sed 's/^/| /' conftest.$ac_ext >&5
18780
18781         ac_cv_lib_c_gdk_pixbuf_new_from_file=no
18782 fi
18783
18784 rm -rf conftest.dSYM
18785 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
18786       conftest$ac_exeext conftest.$ac_ext
18787 LIBS=$ac_check_lib_save_LIBS
18788 fi
18789 { $as_echo "$as_me:$LINENO: result: $ac_cv_lib_c_gdk_pixbuf_new_from_file" >&5
18790 $as_echo "$ac_cv_lib_c_gdk_pixbuf_new_from_file" >&6; }
18791 if test "x$ac_cv_lib_c_gdk_pixbuf_new_from_file" = x""yes; then
18792   have_gdk_pixbuf=yes
18793 fi
18794
18795   CPPFLAGS="$ac_save_CPPFLAGS"
18796   LDFLAGS="$ac_save_LDFLAGS"
18797 #  LIBS="$ac_save_LIBS"
18798
18799     # library B...
18800     if test "$have_gdk_pixbuf" = yes; then
18801       have_gdk_pixbuf=no
18802
18803   ac_save_CPPFLAGS="$CPPFLAGS"
18804   ac_save_LDFLAGS="$LDFLAGS"
18805 #  ac_save_LIBS="$LIBS"
18806
18807   if test \! -z "$includedir" ; then
18808     CPPFLAGS="$CPPFLAGS -I$includedir"
18809   fi
18810   # note: $X_CFLAGS includes $x_includes
18811   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
18812
18813   if test \! -z "$libdir" ; then
18814     LDFLAGS="$LDFLAGS -L$libdir"
18815   fi
18816   # note: $X_LIBS includes $x_libraries
18817   LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
18818
18819   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
18820   LDFLAGS=`eval eval eval eval eval eval eval eval eval echo $LDFLAGS`
18821   { $as_echo "$as_me:$LINENO: checking for gdk_pixbuf_xlib_init in -lc" >&5
18822 $as_echo_n "checking for gdk_pixbuf_xlib_init in -lc... " >&6; }
18823 if test "${ac_cv_lib_c_gdk_pixbuf_xlib_init+set}" = set; then
18824   $as_echo_n "(cached) " >&6
18825 else
18826   ac_check_lib_save_LIBS=$LIBS
18827 LIBS="-lc $ac_gdk_pixbuf_config_libs -lX11 -lXext -lm $LIBS"
18828 cat >conftest.$ac_ext <<_ACEOF
18829 /* confdefs.h.  */
18830 _ACEOF
18831 cat confdefs.h >>conftest.$ac_ext
18832 cat >>conftest.$ac_ext <<_ACEOF
18833 /* end confdefs.h.  */
18834
18835 /* Override any GCC internal prototype to avoid an error.
18836    Use char because int might match the return type of a GCC
18837    builtin and then its argument prototype would still apply.  */
18838 #ifdef __cplusplus
18839 extern "C"
18840 #endif
18841 char gdk_pixbuf_xlib_init ();
18842 int
18843 main ()
18844 {
18845 return gdk_pixbuf_xlib_init ();
18846   ;
18847   return 0;
18848 }
18849 _ACEOF
18850 rm -rf conftest.$ac_objext conftest$ac_exeext
18851 if { (ac_try="$ac_link"
18852 case "(($ac_try" in
18853   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18854   *) ac_try_echo=$ac_try;;
18855 esac
18856 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
18857 $as_echo "$ac_try_echo") >&5
18858   (eval "$ac_link") 2>conftest.er1
18859   ac_status=$?
18860   grep -v '^ *+' conftest.er1 >conftest.err
18861   rm -rf conftest.er1
18862   cat conftest.err >&5
18863   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
18864   (exit $ac_status); } && {
18865          test -z "$ac_c_werror_flag" ||
18866          test ! -s conftest.err
18867        } && test -s conftest$ac_exeext && {
18868          test "$cross_compiling" = yes ||
18869          $as_test_x conftest$ac_exeext
18870        }; then
18871   ac_cv_lib_c_gdk_pixbuf_xlib_init=yes
18872 else
18873   $as_echo "$as_me: failed program was:" >&5
18874 sed 's/^/| /' conftest.$ac_ext >&5
18875
18876         ac_cv_lib_c_gdk_pixbuf_xlib_init=no
18877 fi
18878
18879 rm -rf conftest.dSYM
18880 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
18881       conftest$ac_exeext conftest.$ac_ext
18882 LIBS=$ac_check_lib_save_LIBS
18883 fi
18884 { $as_echo "$as_me:$LINENO: result: $ac_cv_lib_c_gdk_pixbuf_xlib_init" >&5
18885 $as_echo "$ac_cv_lib_c_gdk_pixbuf_xlib_init" >&6; }
18886 if test "x$ac_cv_lib_c_gdk_pixbuf_xlib_init" = x""yes; then
18887   have_gdk_pixbuf=yes
18888                       gdk_pixbuf_halfassed=no
18889 fi
18890
18891   CPPFLAGS="$ac_save_CPPFLAGS"
18892   LDFLAGS="$ac_save_LDFLAGS"
18893 #  LIBS="$ac_save_LIBS"
18894
18895     fi
18896   fi
18897
18898   if test "$have_gdk_pixbuf" = yes; then
18899     INCLUDES="$INCLUDES $ac_gdk_pixbuf_config_cflags"
18900     XPM_LIBS="$ac_gdk_pixbuf_config_libs"
18901     cat >>confdefs.h <<\_ACEOF
18902 #define HAVE_GDK_PIXBUF 1
18903 _ACEOF
18904
18905   else
18906     { $as_echo "$as_me:$LINENO: result: checking for gdk_pixbuf usability... no" >&5
18907 $as_echo "checking for gdk_pixbuf usability... no" >&6; }
18908   fi
18909
18910   if test "$have_gdk_pixbuf" = yes; then
18911
18912   ac_save_CPPFLAGS="$CPPFLAGS"
18913   ac_save_LDFLAGS="$LDFLAGS"
18914 #  ac_save_LIBS="$LIBS"
18915
18916   if test \! -z "$includedir" ; then
18917     CPPFLAGS="$CPPFLAGS -I$includedir"
18918   fi
18919   # note: $X_CFLAGS includes $x_includes
18920   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
18921
18922   if test \! -z "$libdir" ; then
18923     LDFLAGS="$LDFLAGS -L$libdir"
18924   fi
18925   # note: $X_LIBS includes $x_libraries
18926   LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
18927
18928   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
18929   LDFLAGS=`eval eval eval eval eval eval eval eval eval echo $LDFLAGS`
18930   { $as_echo "$as_me:$LINENO: checking for gdk_pixbuf_apply_embedded_orientation in -lc" >&5
18931 $as_echo_n "checking for gdk_pixbuf_apply_embedded_orientation in -lc... " >&6; }
18932 if test "${ac_cv_lib_c_gdk_pixbuf_apply_embedded_orientation+set}" = set; then
18933   $as_echo_n "(cached) " >&6
18934 else
18935   ac_check_lib_save_LIBS=$LIBS
18936 LIBS="-lc $ac_gdk_pixbuf_config_libs -lX11 -lXext -lm $LIBS"
18937 cat >conftest.$ac_ext <<_ACEOF
18938 /* confdefs.h.  */
18939 _ACEOF
18940 cat confdefs.h >>conftest.$ac_ext
18941 cat >>conftest.$ac_ext <<_ACEOF
18942 /* end confdefs.h.  */
18943
18944 /* Override any GCC internal prototype to avoid an error.
18945    Use char because int might match the return type of a GCC
18946    builtin and then its argument prototype would still apply.  */
18947 #ifdef __cplusplus
18948 extern "C"
18949 #endif
18950 char gdk_pixbuf_apply_embedded_orientation ();
18951 int
18952 main ()
18953 {
18954 return gdk_pixbuf_apply_embedded_orientation ();
18955   ;
18956   return 0;
18957 }
18958 _ACEOF
18959 rm -rf conftest.$ac_objext conftest$ac_exeext
18960 if { (ac_try="$ac_link"
18961 case "(($ac_try" in
18962   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18963   *) ac_try_echo=$ac_try;;
18964 esac
18965 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
18966 $as_echo "$ac_try_echo") >&5
18967   (eval "$ac_link") 2>conftest.er1
18968   ac_status=$?
18969   grep -v '^ *+' conftest.er1 >conftest.err
18970   rm -rf conftest.er1
18971   cat conftest.err >&5
18972   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
18973   (exit $ac_status); } && {
18974          test -z "$ac_c_werror_flag" ||
18975          test ! -s conftest.err
18976        } && test -s conftest$ac_exeext && {
18977          test "$cross_compiling" = yes ||
18978          $as_test_x conftest$ac_exeext
18979        }; then
18980   ac_cv_lib_c_gdk_pixbuf_apply_embedded_orientation=yes
18981 else
18982   $as_echo "$as_me: failed program was:" >&5
18983 sed 's/^/| /' conftest.$ac_ext >&5
18984
18985         ac_cv_lib_c_gdk_pixbuf_apply_embedded_orientation=no
18986 fi
18987
18988 rm -rf conftest.dSYM
18989 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
18990       conftest$ac_exeext conftest.$ac_ext
18991 LIBS=$ac_check_lib_save_LIBS
18992 fi
18993 { $as_echo "$as_me:$LINENO: result: $ac_cv_lib_c_gdk_pixbuf_apply_embedded_orientation" >&5
18994 $as_echo "$ac_cv_lib_c_gdk_pixbuf_apply_embedded_orientation" >&6; }
18995 if test "x$ac_cv_lib_c_gdk_pixbuf_apply_embedded_orientation" = x""yes; then
18996   cat >>confdefs.h <<\_ACEOF
18997 #define HAVE_GDK_PIXBUF_APPLY_EMBEDDED_ORIENTATION 1
18998 _ACEOF
18999
19000 fi
19001
19002   CPPFLAGS="$ac_save_CPPFLAGS"
19003   LDFLAGS="$ac_save_LDFLAGS"
19004 #  LIBS="$ac_save_LIBS"
19005
19006   fi
19007 fi
19008
19009
19010 ###############################################################################
19011 #
19012 #       Check for -lXpm.
19013 #
19014 ###############################################################################
19015
19016 have_xpm=no
19017 with_xpm_req=unspecified
19018
19019 # Check whether --with-xpm was given.
19020 if test "${with_xpm+set}" = set; then
19021   withval=$with_xpm; with_xpm="$withval"; with_xpm_req="$withval"
19022 else
19023   with_xpm=yes
19024 fi
19025
19026
19027
19028    case "$with_xpm" in
19029     yes) ;;
19030     no)  ;;
19031
19032     /*)
19033      { $as_echo "$as_me:$LINENO: checking for XPM headers" >&5
19034 $as_echo_n "checking for XPM headers... " >&6; }
19035      d=$with_xpm/include
19036      if test -d $d; then
19037        X_CFLAGS="-I$d $X_CFLAGS"
19038        { $as_echo "$as_me:$LINENO: result: $d" >&5
19039 $as_echo "$d" >&6; }
19040      else
19041        { $as_echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
19042 $as_echo "not found ($d: no such directory)" >&6; }
19043      fi
19044
19045      { $as_echo "$as_me:$LINENO: checking for XPM libs" >&5
19046 $as_echo_n "checking for XPM libs... " >&6; }
19047      d=$with_xpm/lib
19048      if test -d $d; then
19049        X_LIBS="-L$d $X_LIBS"
19050        { $as_echo "$as_me:$LINENO: result: $d" >&5
19051 $as_echo "$d" >&6; }
19052      else
19053        { $as_echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
19054 $as_echo "not found ($d: no such directory)" >&6; }
19055      fi
19056
19057      # replace the directory string with "yes".
19058      with_xpm_req="yes"
19059      with_xpm=$with_xpm_req
19060      ;;
19061
19062     *)
19063      echo ""
19064      echo "error: argument to --with-xpm must be \"yes\", \"no\", or a directory."
19065      echo "       If it is a directory, then \`DIR/include' will be added to"
19066      echo "       the -I list, and \`DIR/lib' will be added to the -L list."
19067      exit 1
19068      ;;
19069    esac
19070
19071
19072 if test "$with_xpm" = yes; then
19073
19074   ac_save_CPPFLAGS="$CPPFLAGS"
19075   if test \! -z "$includedir" ; then
19076     CPPFLAGS="$CPPFLAGS -I$includedir"
19077   fi
19078   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
19079   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
19080   { $as_echo "$as_me:$LINENO: checking for X11/xpm.h" >&5
19081 $as_echo_n "checking for X11/xpm.h... " >&6; }
19082 if test "${ac_cv_header_X11_xpm_h+set}" = set; then
19083   $as_echo_n "(cached) " >&6
19084 else
19085   cat >conftest.$ac_ext <<_ACEOF
19086 /* confdefs.h.  */
19087 _ACEOF
19088 cat confdefs.h >>conftest.$ac_ext
19089 cat >>conftest.$ac_ext <<_ACEOF
19090 /* end confdefs.h.  */
19091 #include <X11/Xlib.h>
19092
19093 #include <X11/xpm.h>
19094 _ACEOF
19095 rm -rf conftest.$ac_objext
19096 if { (ac_try="$ac_compile"
19097 case "(($ac_try" in
19098   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19099   *) ac_try_echo=$ac_try;;
19100 esac
19101 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
19102 $as_echo "$ac_try_echo") >&5
19103   (eval "$ac_compile") 2>conftest.er1
19104   ac_status=$?
19105   grep -v '^ *+' conftest.er1 >conftest.err
19106   rm -rf conftest.er1
19107   cat conftest.err >&5
19108   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
19109   (exit $ac_status); } && {
19110          test -z "$ac_c_werror_flag" ||
19111          test ! -s conftest.err
19112        } && test -s conftest.$ac_objext; then
19113   ac_cv_header_X11_xpm_h=yes
19114 else
19115   $as_echo "$as_me: failed program was:" >&5
19116 sed 's/^/| /' conftest.$ac_ext >&5
19117
19118         ac_cv_header_X11_xpm_h=no
19119 fi
19120
19121 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
19122 fi
19123 { $as_echo "$as_me:$LINENO: result: $ac_cv_header_X11_xpm_h" >&5
19124 $as_echo "$ac_cv_header_X11_xpm_h" >&6; }
19125 if test "x$ac_cv_header_X11_xpm_h" = x""yes; then
19126   have_xpm=yes
19127                     cat >>confdefs.h <<\_ACEOF
19128 #define HAVE_XPM 1
19129 _ACEOF
19130
19131                     XPM_LIBS="-lXpm $XPM_LIBS"
19132 fi
19133
19134
19135   CPPFLAGS="$ac_save_CPPFLAGS"
19136 elif test "$with_xpm" != no; then
19137   echo "error: must be yes or no: --with-xpm=$with_xpm"
19138   exit 1
19139 fi
19140
19141 # See comment near $motif_requires_xpm, above.
19142 # Need to do this here, after both Motif and XPM have been checked for.
19143 #
19144 if test "$have_motif" = yes -a "$have_xpm" = yes ; then
19145   if test "$motif_requires_xpm" = yes ; then
19146     MOTIF_LIBS="$MOTIF_LIBS $XPM_LIBS"
19147   fi
19148 fi
19149
19150 if test "$XPM_LIBS" = "" ; then
19151   XPM_LIBS=$(MINIXPM)
19152 fi
19153
19154
19155 ###############################################################################
19156 #
19157 #       Check for -ljpeg
19158 #
19159 ###############################################################################
19160
19161 have_jpeg=no
19162 with_jpeg_req=unspecified
19163 jpeg_halfassed=no
19164
19165 # Check whether --with-jpeg was given.
19166 if test "${with_jpeg+set}" = set; then
19167   withval=$with_jpeg; with_jpeg="$withval"; with_jpeg_req="$withval"
19168 else
19169   with_jpeg=yes
19170 fi
19171
19172
19173
19174    case "$with_jpeg" in
19175     yes) ;;
19176     no)  ;;
19177
19178     /*)
19179      { $as_echo "$as_me:$LINENO: checking for JPEG headers" >&5
19180 $as_echo_n "checking for JPEG headers... " >&6; }
19181      d=$with_jpeg/include
19182      if test -d $d; then
19183        X_CFLAGS="-I$d $X_CFLAGS"
19184        { $as_echo "$as_me:$LINENO: result: $d" >&5
19185 $as_echo "$d" >&6; }
19186      else
19187        { $as_echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
19188 $as_echo "not found ($d: no such directory)" >&6; }
19189      fi
19190
19191      { $as_echo "$as_me:$LINENO: checking for JPEG libs" >&5
19192 $as_echo_n "checking for JPEG libs... " >&6; }
19193      d=$with_jpeg/lib
19194      if test -d $d; then
19195        X_LIBS="-L$d $X_LIBS"
19196        { $as_echo "$as_me:$LINENO: result: $d" >&5
19197 $as_echo "$d" >&6; }
19198      else
19199        { $as_echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
19200 $as_echo "not found ($d: no such directory)" >&6; }
19201      fi
19202
19203      # replace the directory string with "yes".
19204      with_jpeg_req="yes"
19205      with_jpeg=$with_jpeg_req
19206      ;;
19207
19208     *)
19209      echo ""
19210      echo "error: argument to --with-jpeg must be \"yes\", \"no\", or a directory."
19211      echo "       If it is a directory, then \`DIR/include' will be added to"
19212      echo "       the -I list, and \`DIR/lib' will be added to the -L list."
19213      exit 1
19214      ;;
19215    esac
19216
19217
19218 if test "$with_jpeg" != yes -a "$with_jpeg" != no ; then
19219   echo "error: must be yes or no: --with-jpeg=$with_jpeg"
19220   exit 1
19221 fi
19222
19223 if test "$with_jpeg" = yes; then
19224
19225   have_jpeg=no
19226
19227   ac_save_CPPFLAGS="$CPPFLAGS"
19228   if test \! -z "$includedir" ; then
19229     CPPFLAGS="$CPPFLAGS -I$includedir"
19230   fi
19231   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
19232   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
19233   if test "${ac_cv_header_jpeglib_h+set}" = set; then
19234   { $as_echo "$as_me:$LINENO: checking for jpeglib.h" >&5
19235 $as_echo_n "checking for jpeglib.h... " >&6; }
19236 if test "${ac_cv_header_jpeglib_h+set}" = set; then
19237   $as_echo_n "(cached) " >&6
19238 fi
19239 { $as_echo "$as_me:$LINENO: result: $ac_cv_header_jpeglib_h" >&5
19240 $as_echo "$ac_cv_header_jpeglib_h" >&6; }
19241 else
19242   # Is the header compilable?
19243 { $as_echo "$as_me:$LINENO: checking jpeglib.h usability" >&5
19244 $as_echo_n "checking jpeglib.h usability... " >&6; }
19245 cat >conftest.$ac_ext <<_ACEOF
19246 /* confdefs.h.  */
19247 _ACEOF
19248 cat confdefs.h >>conftest.$ac_ext
19249 cat >>conftest.$ac_ext <<_ACEOF
19250 /* end confdefs.h.  */
19251 $ac_includes_default
19252 #include <jpeglib.h>
19253 _ACEOF
19254 rm -rf conftest.$ac_objext
19255 if { (ac_try="$ac_compile"
19256 case "(($ac_try" in
19257   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19258   *) ac_try_echo=$ac_try;;
19259 esac
19260 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
19261 $as_echo "$ac_try_echo") >&5
19262   (eval "$ac_compile") 2>conftest.er1
19263   ac_status=$?
19264   grep -v '^ *+' conftest.er1 >conftest.err
19265   rm -rf conftest.er1
19266   cat conftest.err >&5
19267   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
19268   (exit $ac_status); } && {
19269          test -z "$ac_c_werror_flag" ||
19270          test ! -s conftest.err
19271        } && test -s conftest.$ac_objext; then
19272   ac_header_compiler=yes
19273 else
19274   $as_echo "$as_me: failed program was:" >&5
19275 sed 's/^/| /' conftest.$ac_ext >&5
19276
19277         ac_header_compiler=no
19278 fi
19279
19280 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
19281 { $as_echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
19282 $as_echo "$ac_header_compiler" >&6; }
19283
19284 # Is the header present?
19285 { $as_echo "$as_me:$LINENO: checking jpeglib.h presence" >&5
19286 $as_echo_n "checking jpeglib.h presence... " >&6; }
19287 cat >conftest.$ac_ext <<_ACEOF
19288 /* confdefs.h.  */
19289 _ACEOF
19290 cat confdefs.h >>conftest.$ac_ext
19291 cat >>conftest.$ac_ext <<_ACEOF
19292 /* end confdefs.h.  */
19293 #include <jpeglib.h>
19294 _ACEOF
19295 if { (ac_try="$ac_cpp conftest.$ac_ext"
19296 case "(($ac_try" in
19297   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19298   *) ac_try_echo=$ac_try;;
19299 esac
19300 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
19301 $as_echo "$ac_try_echo") >&5
19302   (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
19303   ac_status=$?
19304   grep -v '^ *+' conftest.er1 >conftest.err
19305   rm -rf conftest.er1
19306   cat conftest.err >&5
19307   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
19308   (exit $ac_status); } >/dev/null && {
19309          test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
19310          test ! -s conftest.err
19311        }; then
19312   ac_header_preproc=yes
19313 else
19314   $as_echo "$as_me: failed program was:" >&5
19315 sed 's/^/| /' conftest.$ac_ext >&5
19316
19317   ac_header_preproc=no
19318 fi
19319
19320 rm -rf conftest.err conftest.$ac_ext
19321 { $as_echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
19322 $as_echo "$ac_header_preproc" >&6; }
19323
19324 # So?  What about this header?
19325 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
19326   yes:no: )
19327     { $as_echo "$as_me:$LINENO: WARNING: jpeglib.h: accepted by the compiler, rejected by the preprocessor!" >&5
19328 $as_echo "$as_me: WARNING: jpeglib.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
19329     { $as_echo "$as_me:$LINENO: WARNING: jpeglib.h: proceeding with the compiler's result" >&5
19330 $as_echo "$as_me: WARNING: jpeglib.h: proceeding with the compiler's result" >&2;}
19331     ac_header_preproc=yes
19332     ;;
19333   no:yes:* )
19334     { $as_echo "$as_me:$LINENO: WARNING: jpeglib.h: present but cannot be compiled" >&5
19335 $as_echo "$as_me: WARNING: jpeglib.h: present but cannot be compiled" >&2;}
19336     { $as_echo "$as_me:$LINENO: WARNING: jpeglib.h:     check for missing prerequisite headers?" >&5
19337 $as_echo "$as_me: WARNING: jpeglib.h:     check for missing prerequisite headers?" >&2;}
19338     { $as_echo "$as_me:$LINENO: WARNING: jpeglib.h: see the Autoconf documentation" >&5
19339 $as_echo "$as_me: WARNING: jpeglib.h: see the Autoconf documentation" >&2;}
19340     { $as_echo "$as_me:$LINENO: WARNING: jpeglib.h:     section \"Present But Cannot Be Compiled\"" >&5
19341 $as_echo "$as_me: WARNING: jpeglib.h:     section \"Present But Cannot Be Compiled\"" >&2;}
19342     { $as_echo "$as_me:$LINENO: WARNING: jpeglib.h: proceeding with the preprocessor's result" >&5
19343 $as_echo "$as_me: WARNING: jpeglib.h: proceeding with the preprocessor's result" >&2;}
19344     { $as_echo "$as_me:$LINENO: WARNING: jpeglib.h: in the future, the compiler will take precedence" >&5
19345 $as_echo "$as_me: WARNING: jpeglib.h: in the future, the compiler will take precedence" >&2;}
19346
19347     ;;
19348 esac
19349 { $as_echo "$as_me:$LINENO: checking for jpeglib.h" >&5
19350 $as_echo_n "checking for jpeglib.h... " >&6; }
19351 if test "${ac_cv_header_jpeglib_h+set}" = set; then
19352   $as_echo_n "(cached) " >&6
19353 else
19354   ac_cv_header_jpeglib_h=$ac_header_preproc
19355 fi
19356 { $as_echo "$as_me:$LINENO: result: $ac_cv_header_jpeglib_h" >&5
19357 $as_echo "$ac_cv_header_jpeglib_h" >&6; }
19358
19359 fi
19360 if test "x$ac_cv_header_jpeglib_h" = x""yes; then
19361   have_jpeg=yes
19362 fi
19363
19364
19365   CPPFLAGS="$ac_save_CPPFLAGS"
19366
19367   if test "$have_jpeg" = yes; then
19368     # we have the header, now check for the library
19369     have_jpeg=no
19370     jpeg_halfassed=yes
19371
19372   ac_save_CPPFLAGS="$CPPFLAGS"
19373   ac_save_LDFLAGS="$LDFLAGS"
19374 #  ac_save_LIBS="$LIBS"
19375
19376   if test \! -z "$includedir" ; then
19377     CPPFLAGS="$CPPFLAGS -I$includedir"
19378   fi
19379   # note: $X_CFLAGS includes $x_includes
19380   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
19381
19382   if test \! -z "$libdir" ; then
19383     LDFLAGS="$LDFLAGS -L$libdir"
19384   fi
19385   # note: $X_LIBS includes $x_libraries
19386   LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
19387
19388   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
19389   LDFLAGS=`eval eval eval eval eval eval eval eval eval echo $LDFLAGS`
19390   { $as_echo "$as_me:$LINENO: checking for jpeg_start_compress in -ljpeg" >&5
19391 $as_echo_n "checking for jpeg_start_compress in -ljpeg... " >&6; }
19392 if test "${ac_cv_lib_jpeg_jpeg_start_compress+set}" = set; then
19393   $as_echo_n "(cached) " >&6
19394 else
19395   ac_check_lib_save_LIBS=$LIBS
19396 LIBS="-ljpeg  $LIBS"
19397 cat >conftest.$ac_ext <<_ACEOF
19398 /* confdefs.h.  */
19399 _ACEOF
19400 cat confdefs.h >>conftest.$ac_ext
19401 cat >>conftest.$ac_ext <<_ACEOF
19402 /* end confdefs.h.  */
19403
19404 /* Override any GCC internal prototype to avoid an error.
19405    Use char because int might match the return type of a GCC
19406    builtin and then its argument prototype would still apply.  */
19407 #ifdef __cplusplus
19408 extern "C"
19409 #endif
19410 char jpeg_start_compress ();
19411 int
19412 main ()
19413 {
19414 return jpeg_start_compress ();
19415   ;
19416   return 0;
19417 }
19418 _ACEOF
19419 rm -rf conftest.$ac_objext conftest$ac_exeext
19420 if { (ac_try="$ac_link"
19421 case "(($ac_try" in
19422   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19423   *) ac_try_echo=$ac_try;;
19424 esac
19425 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
19426 $as_echo "$ac_try_echo") >&5
19427   (eval "$ac_link") 2>conftest.er1
19428   ac_status=$?
19429   grep -v '^ *+' conftest.er1 >conftest.err
19430   rm -rf conftest.er1
19431   cat conftest.err >&5
19432   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
19433   (exit $ac_status); } && {
19434          test -z "$ac_c_werror_flag" ||
19435          test ! -s conftest.err
19436        } && test -s conftest$ac_exeext && {
19437          test "$cross_compiling" = yes ||
19438          $as_test_x conftest$ac_exeext
19439        }; then
19440   ac_cv_lib_jpeg_jpeg_start_compress=yes
19441 else
19442   $as_echo "$as_me: failed program was:" >&5
19443 sed 's/^/| /' conftest.$ac_ext >&5
19444
19445         ac_cv_lib_jpeg_jpeg_start_compress=no
19446 fi
19447
19448 rm -rf conftest.dSYM
19449 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
19450       conftest$ac_exeext conftest.$ac_ext
19451 LIBS=$ac_check_lib_save_LIBS
19452 fi
19453 { $as_echo "$as_me:$LINENO: result: $ac_cv_lib_jpeg_jpeg_start_compress" >&5
19454 $as_echo "$ac_cv_lib_jpeg_jpeg_start_compress" >&6; }
19455 if test "x$ac_cv_lib_jpeg_jpeg_start_compress" = x""yes; then
19456   have_jpeg=yes
19457                     jpeg_halfassed=no
19458                     JPEG_LIBS="-ljpeg"
19459                     cat >>confdefs.h <<\_ACEOF
19460 #define HAVE_JPEGLIB 1
19461 _ACEOF
19462
19463 fi
19464
19465   CPPFLAGS="$ac_save_CPPFLAGS"
19466   LDFLAGS="$ac_save_LDFLAGS"
19467 #  LIBS="$ac_save_LIBS"
19468
19469   fi
19470 fi
19471
19472
19473 ###############################################################################
19474 #
19475 #       Check for pty support: this allows 'phosphor' and 'apple2'
19476 #       to run curses-based programs, or be used as terminal windows.
19477 #
19478 ###############################################################################
19479
19480 PTY_LIBS=
19481
19482
19483 for ac_header in pty.h util.h
19484 do
19485 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
19486 if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
19487   { $as_echo "$as_me:$LINENO: checking for $ac_header" >&5
19488 $as_echo_n "checking for $ac_header... " >&6; }
19489 if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
19490   $as_echo_n "(cached) " >&6
19491 fi
19492 ac_res=`eval 'as_val=${'$as_ac_Header'}
19493                  $as_echo "$as_val"'`
19494                { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
19495 $as_echo "$ac_res" >&6; }
19496 else
19497   # Is the header compilable?
19498 { $as_echo "$as_me:$LINENO: checking $ac_header usability" >&5
19499 $as_echo_n "checking $ac_header usability... " >&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 <$ac_header>
19508 _ACEOF
19509 rm -rf 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 ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
19516 $as_echo "$ac_try_echo") >&5
19517   (eval "$ac_compile") 2>conftest.er1
19518   ac_status=$?
19519   grep -v '^ *+' conftest.er1 >conftest.err
19520   rm -rf conftest.er1
19521   cat conftest.err >&5
19522   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
19523   (exit $ac_status); } && {
19524          test -z "$ac_c_werror_flag" ||
19525          test ! -s conftest.err
19526        } && test -s conftest.$ac_objext; then
19527   ac_header_compiler=yes
19528 else
19529   $as_echo "$as_me: failed program was:" >&5
19530 sed 's/^/| /' conftest.$ac_ext >&5
19531
19532         ac_header_compiler=no
19533 fi
19534
19535 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
19536 { $as_echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
19537 $as_echo "$ac_header_compiler" >&6; }
19538
19539 # Is the header present?
19540 { $as_echo "$as_me:$LINENO: checking $ac_header presence" >&5
19541 $as_echo_n "checking $ac_header presence... " >&6; }
19542 cat >conftest.$ac_ext <<_ACEOF
19543 /* confdefs.h.  */
19544 _ACEOF
19545 cat confdefs.h >>conftest.$ac_ext
19546 cat >>conftest.$ac_ext <<_ACEOF
19547 /* end confdefs.h.  */
19548 #include <$ac_header>
19549 _ACEOF
19550 if { (ac_try="$ac_cpp conftest.$ac_ext"
19551 case "(($ac_try" in
19552   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19553   *) ac_try_echo=$ac_try;;
19554 esac
19555 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
19556 $as_echo "$ac_try_echo") >&5
19557   (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
19558   ac_status=$?
19559   grep -v '^ *+' conftest.er1 >conftest.err
19560   rm -rf conftest.er1
19561   cat conftest.err >&5
19562   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
19563   (exit $ac_status); } >/dev/null && {
19564          test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
19565          test ! -s conftest.err
19566        }; then
19567   ac_header_preproc=yes
19568 else
19569   $as_echo "$as_me: failed program was:" >&5
19570 sed 's/^/| /' conftest.$ac_ext >&5
19571
19572   ac_header_preproc=no
19573 fi
19574
19575 rm -rf conftest.err conftest.$ac_ext
19576 { $as_echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
19577 $as_echo "$ac_header_preproc" >&6; }
19578
19579 # So?  What about this header?
19580 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
19581   yes:no: )
19582     { $as_echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
19583 $as_echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
19584     { $as_echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
19585 $as_echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
19586     ac_header_preproc=yes
19587     ;;
19588   no:yes:* )
19589     { $as_echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
19590 $as_echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
19591     { $as_echo "$as_me:$LINENO: WARNING: $ac_header:     check for missing prerequisite headers?" >&5
19592 $as_echo "$as_me: WARNING: $ac_header:     check for missing prerequisite headers?" >&2;}
19593     { $as_echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
19594 $as_echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
19595     { $as_echo "$as_me:$LINENO: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&5
19596 $as_echo "$as_me: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&2;}
19597     { $as_echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
19598 $as_echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
19599     { $as_echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
19600 $as_echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
19601
19602     ;;
19603 esac
19604 { $as_echo "$as_me:$LINENO: checking for $ac_header" >&5
19605 $as_echo_n "checking for $ac_header... " >&6; }
19606 if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
19607   $as_echo_n "(cached) " >&6
19608 else
19609   eval "$as_ac_Header=\$ac_header_preproc"
19610 fi
19611 ac_res=`eval 'as_val=${'$as_ac_Header'}
19612                  $as_echo "$as_val"'`
19613                { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
19614 $as_echo "$ac_res" >&6; }
19615
19616 fi
19617 as_val=`eval 'as_val=${'$as_ac_Header'}
19618                  $as_echo "$as_val"'`
19619    if test "x$as_val" = x""yes; then
19620   cat >>confdefs.h <<_ACEOF
19621 #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
19622 _ACEOF
19623
19624 fi
19625
19626 done
19627
19628
19629   ac_save_CPPFLAGS="$CPPFLAGS"
19630   ac_save_LDFLAGS="$LDFLAGS"
19631 #  ac_save_LIBS="$LIBS"
19632
19633   if test \! -z "$includedir" ; then
19634     CPPFLAGS="$CPPFLAGS -I$includedir"
19635   fi
19636   # note: $X_CFLAGS includes $x_includes
19637   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
19638
19639   if test \! -z "$libdir" ; then
19640     LDFLAGS="$LDFLAGS -L$libdir"
19641   fi
19642   # note: $X_LIBS includes $x_libraries
19643   LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
19644
19645   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
19646   LDFLAGS=`eval eval eval eval eval eval eval eval eval echo $LDFLAGS`
19647   { $as_echo "$as_me:$LINENO: checking for forkpty in -lutil" >&5
19648 $as_echo_n "checking for forkpty in -lutil... " >&6; }
19649 if test "${ac_cv_lib_util_forkpty+set}" = set; then
19650   $as_echo_n "(cached) " >&6
19651 else
19652   ac_check_lib_save_LIBS=$LIBS
19653 LIBS="-lutil  $LIBS"
19654 cat >conftest.$ac_ext <<_ACEOF
19655 /* confdefs.h.  */
19656 _ACEOF
19657 cat confdefs.h >>conftest.$ac_ext
19658 cat >>conftest.$ac_ext <<_ACEOF
19659 /* end confdefs.h.  */
19660
19661 /* Override any GCC internal prototype to avoid an error.
19662    Use char because int might match the return type of a GCC
19663    builtin and then its argument prototype would still apply.  */
19664 #ifdef __cplusplus
19665 extern "C"
19666 #endif
19667 char forkpty ();
19668 int
19669 main ()
19670 {
19671 return forkpty ();
19672   ;
19673   return 0;
19674 }
19675 _ACEOF
19676 rm -rf conftest.$ac_objext conftest$ac_exeext
19677 if { (ac_try="$ac_link"
19678 case "(($ac_try" in
19679   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19680   *) ac_try_echo=$ac_try;;
19681 esac
19682 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
19683 $as_echo "$ac_try_echo") >&5
19684   (eval "$ac_link") 2>conftest.er1
19685   ac_status=$?
19686   grep -v '^ *+' conftest.er1 >conftest.err
19687   rm -rf conftest.er1
19688   cat conftest.err >&5
19689   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
19690   (exit $ac_status); } && {
19691          test -z "$ac_c_werror_flag" ||
19692          test ! -s conftest.err
19693        } && test -s conftest$ac_exeext && {
19694          test "$cross_compiling" = yes ||
19695          $as_test_x conftest$ac_exeext
19696        }; then
19697   ac_cv_lib_util_forkpty=yes
19698 else
19699   $as_echo "$as_me: failed program was:" >&5
19700 sed 's/^/| /' conftest.$ac_ext >&5
19701
19702         ac_cv_lib_util_forkpty=no
19703 fi
19704
19705 rm -rf conftest.dSYM
19706 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
19707       conftest$ac_exeext conftest.$ac_ext
19708 LIBS=$ac_check_lib_save_LIBS
19709 fi
19710 { $as_echo "$as_me:$LINENO: result: $ac_cv_lib_util_forkpty" >&5
19711 $as_echo "$ac_cv_lib_util_forkpty" >&6; }
19712 if test "x$ac_cv_lib_util_forkpty" = x""yes; then
19713   PTY_LIBS="-lutil"
19714                 ac_have_forkpty=yes
19715                 cat >>confdefs.h <<\_ACEOF
19716 #define HAVE_FORKPTY 1
19717 _ACEOF
19718
19719 fi
19720
19721   CPPFLAGS="$ac_save_CPPFLAGS"
19722   LDFLAGS="$ac_save_LDFLAGS"
19723 #  LIBS="$ac_save_LIBS"
19724
19725
19726 if test "$ac_have_forkpty" != yes ; then
19727   # we don't need (or have) -lutil on MacOS 10.4.2...
19728
19729   ac_save_CPPFLAGS="$CPPFLAGS"
19730   ac_save_LDFLAGS="$LDFLAGS"
19731 #  ac_save_LIBS="$LIBS"
19732
19733   if test \! -z "$includedir" ; then
19734     CPPFLAGS="$CPPFLAGS -I$includedir"
19735   fi
19736   # note: $X_CFLAGS includes $x_includes
19737   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
19738
19739   if test \! -z "$libdir" ; then
19740     LDFLAGS="$LDFLAGS -L$libdir"
19741   fi
19742   # note: $X_LIBS includes $x_libraries
19743   LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
19744
19745   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
19746   LDFLAGS=`eval eval eval eval eval eval eval eval eval echo $LDFLAGS`
19747   { $as_echo "$as_me:$LINENO: checking for forkpty in -lc" >&5
19748 $as_echo_n "checking for forkpty in -lc... " >&6; }
19749 if test "${ac_cv_lib_c_forkpty+set}" = set; then
19750   $as_echo_n "(cached) " >&6
19751 else
19752   ac_check_lib_save_LIBS=$LIBS
19753 LIBS="-lc  $LIBS"
19754 cat >conftest.$ac_ext <<_ACEOF
19755 /* confdefs.h.  */
19756 _ACEOF
19757 cat confdefs.h >>conftest.$ac_ext
19758 cat >>conftest.$ac_ext <<_ACEOF
19759 /* end confdefs.h.  */
19760
19761 /* Override any GCC internal prototype to avoid an error.
19762    Use char because int might match the return type of a GCC
19763    builtin and then its argument prototype would still apply.  */
19764 #ifdef __cplusplus
19765 extern "C"
19766 #endif
19767 char forkpty ();
19768 int
19769 main ()
19770 {
19771 return forkpty ();
19772   ;
19773   return 0;
19774 }
19775 _ACEOF
19776 rm -rf conftest.$ac_objext conftest$ac_exeext
19777 if { (ac_try="$ac_link"
19778 case "(($ac_try" in
19779   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19780   *) ac_try_echo=$ac_try;;
19781 esac
19782 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
19783 $as_echo "$ac_try_echo") >&5
19784   (eval "$ac_link") 2>conftest.er1
19785   ac_status=$?
19786   grep -v '^ *+' conftest.er1 >conftest.err
19787   rm -rf conftest.er1
19788   cat conftest.err >&5
19789   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
19790   (exit $ac_status); } && {
19791          test -z "$ac_c_werror_flag" ||
19792          test ! -s conftest.err
19793        } && test -s conftest$ac_exeext && {
19794          test "$cross_compiling" = yes ||
19795          $as_test_x conftest$ac_exeext
19796        }; then
19797   ac_cv_lib_c_forkpty=yes
19798 else
19799   $as_echo "$as_me: failed program was:" >&5
19800 sed 's/^/| /' conftest.$ac_ext >&5
19801
19802         ac_cv_lib_c_forkpty=no
19803 fi
19804
19805 rm -rf conftest.dSYM
19806 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
19807       conftest$ac_exeext conftest.$ac_ext
19808 LIBS=$ac_check_lib_save_LIBS
19809 fi
19810 { $as_echo "$as_me:$LINENO: result: $ac_cv_lib_c_forkpty" >&5
19811 $as_echo "$ac_cv_lib_c_forkpty" >&6; }
19812 if test "x$ac_cv_lib_c_forkpty" = x""yes; then
19813   PTY_LIBS=""
19814                   cat >>confdefs.h <<\_ACEOF
19815 #define HAVE_FORKPTY 1
19816 _ACEOF
19817
19818 fi
19819
19820   CPPFLAGS="$ac_save_CPPFLAGS"
19821   LDFLAGS="$ac_save_LDFLAGS"
19822 #  LIBS="$ac_save_LIBS"
19823
19824 fi
19825
19826 ###############################################################################
19827 #
19828 #       Check for the XSHM server extension.
19829 #
19830 ###############################################################################
19831
19832 have_xshm=no
19833 with_xshm_req=unspecified
19834
19835 # Check whether --with-xshm-ext was given.
19836 if test "${with_xshm_ext+set}" = set; then
19837   withval=$with_xshm_ext; with_xshm="$withval"; with_xshm_req="$withval"
19838 else
19839   with_xshm=yes
19840 fi
19841
19842
19843
19844    case "$with_xshm" in
19845     yes) ;;
19846     no)  ;;
19847
19848     /*)
19849      { $as_echo "$as_me:$LINENO: checking for XSHM headers" >&5
19850 $as_echo_n "checking for XSHM headers... " >&6; }
19851      d=$with_xshm/include
19852      if test -d $d; then
19853        X_CFLAGS="-I$d $X_CFLAGS"
19854        { $as_echo "$as_me:$LINENO: result: $d" >&5
19855 $as_echo "$d" >&6; }
19856      else
19857        { $as_echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
19858 $as_echo "not found ($d: no such directory)" >&6; }
19859      fi
19860
19861      { $as_echo "$as_me:$LINENO: checking for XSHM libs" >&5
19862 $as_echo_n "checking for XSHM libs... " >&6; }
19863      d=$with_xshm/lib
19864      if test -d $d; then
19865        X_LIBS="-L$d $X_LIBS"
19866        { $as_echo "$as_me:$LINENO: result: $d" >&5
19867 $as_echo "$d" >&6; }
19868      else
19869        { $as_echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
19870 $as_echo "not found ($d: no such directory)" >&6; }
19871      fi
19872
19873      # replace the directory string with "yes".
19874      with_xshm_req="yes"
19875      with_xshm=$with_xshm_req
19876      ;;
19877
19878     *)
19879      echo ""
19880      echo "error: argument to --with-xshm-ext must be \"yes\", \"no\", or a directory."
19881      echo "       If it is a directory, then \`DIR/include' will be added to"
19882      echo "       the -I list, and \`DIR/lib' will be added to the -L list."
19883      exit 1
19884      ;;
19885    esac
19886
19887
19888 if test "$with_xshm" = yes; then
19889
19890   # first check for Xshm.h.
19891
19892   ac_save_CPPFLAGS="$CPPFLAGS"
19893   if test \! -z "$includedir" ; then
19894     CPPFLAGS="$CPPFLAGS -I$includedir"
19895   fi
19896   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
19897   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
19898   { $as_echo "$as_me:$LINENO: checking for X11/extensions/XShm.h" >&5
19899 $as_echo_n "checking for X11/extensions/XShm.h... " >&6; }
19900 if test "${ac_cv_header_X11_extensions_XShm_h+set}" = set; then
19901   $as_echo_n "(cached) " >&6
19902 else
19903   cat >conftest.$ac_ext <<_ACEOF
19904 /* confdefs.h.  */
19905 _ACEOF
19906 cat confdefs.h >>conftest.$ac_ext
19907 cat >>conftest.$ac_ext <<_ACEOF
19908 /* end confdefs.h.  */
19909 #include <X11/Xlib.h>
19910
19911 #include <X11/extensions/XShm.h>
19912 _ACEOF
19913 rm -rf conftest.$ac_objext
19914 if { (ac_try="$ac_compile"
19915 case "(($ac_try" in
19916   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19917   *) ac_try_echo=$ac_try;;
19918 esac
19919 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
19920 $as_echo "$ac_try_echo") >&5
19921   (eval "$ac_compile") 2>conftest.er1
19922   ac_status=$?
19923   grep -v '^ *+' conftest.er1 >conftest.err
19924   rm -rf conftest.er1
19925   cat conftest.err >&5
19926   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
19927   (exit $ac_status); } && {
19928          test -z "$ac_c_werror_flag" ||
19929          test ! -s conftest.err
19930        } && test -s conftest.$ac_objext; then
19931   ac_cv_header_X11_extensions_XShm_h=yes
19932 else
19933   $as_echo "$as_me: failed program was:" >&5
19934 sed 's/^/| /' conftest.$ac_ext >&5
19935
19936         ac_cv_header_X11_extensions_XShm_h=no
19937 fi
19938
19939 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
19940 fi
19941 { $as_echo "$as_me:$LINENO: result: $ac_cv_header_X11_extensions_XShm_h" >&5
19942 $as_echo "$ac_cv_header_X11_extensions_XShm_h" >&6; }
19943 if test "x$ac_cv_header_X11_extensions_XShm_h" = x""yes; then
19944   have_xshm=yes
19945 fi
19946
19947
19948   CPPFLAGS="$ac_save_CPPFLAGS"
19949
19950   # if that succeeded, then check for sys/ipc.h.
19951   if test "$have_xshm" = yes; then
19952     have_xshm=no
19953
19954   ac_save_CPPFLAGS="$CPPFLAGS"
19955   if test \! -z "$includedir" ; then
19956     CPPFLAGS="$CPPFLAGS -I$includedir"
19957   fi
19958   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
19959   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
19960   if test "${ac_cv_header_sys_ipc_h+set}" = set; then
19961   { $as_echo "$as_me:$LINENO: checking for sys/ipc.h" >&5
19962 $as_echo_n "checking for sys/ipc.h... " >&6; }
19963 if test "${ac_cv_header_sys_ipc_h+set}" = set; then
19964   $as_echo_n "(cached) " >&6
19965 fi
19966 { $as_echo "$as_me:$LINENO: result: $ac_cv_header_sys_ipc_h" >&5
19967 $as_echo "$ac_cv_header_sys_ipc_h" >&6; }
19968 else
19969   # Is the header compilable?
19970 { $as_echo "$as_me:$LINENO: checking sys/ipc.h usability" >&5
19971 $as_echo_n "checking sys/ipc.h usability... " >&6; }
19972 cat >conftest.$ac_ext <<_ACEOF
19973 /* confdefs.h.  */
19974 _ACEOF
19975 cat confdefs.h >>conftest.$ac_ext
19976 cat >>conftest.$ac_ext <<_ACEOF
19977 /* end confdefs.h.  */
19978 $ac_includes_default
19979 #include <sys/ipc.h>
19980 _ACEOF
19981 rm -rf conftest.$ac_objext
19982 if { (ac_try="$ac_compile"
19983 case "(($ac_try" in
19984   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19985   *) ac_try_echo=$ac_try;;
19986 esac
19987 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
19988 $as_echo "$ac_try_echo") >&5
19989   (eval "$ac_compile") 2>conftest.er1
19990   ac_status=$?
19991   grep -v '^ *+' conftest.er1 >conftest.err
19992   rm -rf conftest.er1
19993   cat conftest.err >&5
19994   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
19995   (exit $ac_status); } && {
19996          test -z "$ac_c_werror_flag" ||
19997          test ! -s conftest.err
19998        } && test -s conftest.$ac_objext; then
19999   ac_header_compiler=yes
20000 else
20001   $as_echo "$as_me: failed program was:" >&5
20002 sed 's/^/| /' conftest.$ac_ext >&5
20003
20004         ac_header_compiler=no
20005 fi
20006
20007 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
20008 { $as_echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
20009 $as_echo "$ac_header_compiler" >&6; }
20010
20011 # Is the header present?
20012 { $as_echo "$as_me:$LINENO: checking sys/ipc.h presence" >&5
20013 $as_echo_n "checking sys/ipc.h presence... " >&6; }
20014 cat >conftest.$ac_ext <<_ACEOF
20015 /* confdefs.h.  */
20016 _ACEOF
20017 cat confdefs.h >>conftest.$ac_ext
20018 cat >>conftest.$ac_ext <<_ACEOF
20019 /* end confdefs.h.  */
20020 #include <sys/ipc.h>
20021 _ACEOF
20022 if { (ac_try="$ac_cpp conftest.$ac_ext"
20023 case "(($ac_try" in
20024   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20025   *) ac_try_echo=$ac_try;;
20026 esac
20027 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
20028 $as_echo "$ac_try_echo") >&5
20029   (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
20030   ac_status=$?
20031   grep -v '^ *+' conftest.er1 >conftest.err
20032   rm -rf conftest.er1
20033   cat conftest.err >&5
20034   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
20035   (exit $ac_status); } >/dev/null && {
20036          test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
20037          test ! -s conftest.err
20038        }; then
20039   ac_header_preproc=yes
20040 else
20041   $as_echo "$as_me: failed program was:" >&5
20042 sed 's/^/| /' conftest.$ac_ext >&5
20043
20044   ac_header_preproc=no
20045 fi
20046
20047 rm -rf conftest.err conftest.$ac_ext
20048 { $as_echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
20049 $as_echo "$ac_header_preproc" >&6; }
20050
20051 # So?  What about this header?
20052 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
20053   yes:no: )
20054     { $as_echo "$as_me:$LINENO: WARNING: sys/ipc.h: accepted by the compiler, rejected by the preprocessor!" >&5
20055 $as_echo "$as_me: WARNING: sys/ipc.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
20056     { $as_echo "$as_me:$LINENO: WARNING: sys/ipc.h: proceeding with the compiler's result" >&5
20057 $as_echo "$as_me: WARNING: sys/ipc.h: proceeding with the compiler's result" >&2;}
20058     ac_header_preproc=yes
20059     ;;
20060   no:yes:* )
20061     { $as_echo "$as_me:$LINENO: WARNING: sys/ipc.h: present but cannot be compiled" >&5
20062 $as_echo "$as_me: WARNING: sys/ipc.h: present but cannot be compiled" >&2;}
20063     { $as_echo "$as_me:$LINENO: WARNING: sys/ipc.h:     check for missing prerequisite headers?" >&5
20064 $as_echo "$as_me: WARNING: sys/ipc.h:     check for missing prerequisite headers?" >&2;}
20065     { $as_echo "$as_me:$LINENO: WARNING: sys/ipc.h: see the Autoconf documentation" >&5
20066 $as_echo "$as_me: WARNING: sys/ipc.h: see the Autoconf documentation" >&2;}
20067     { $as_echo "$as_me:$LINENO: WARNING: sys/ipc.h:     section \"Present But Cannot Be Compiled\"" >&5
20068 $as_echo "$as_me: WARNING: sys/ipc.h:     section \"Present But Cannot Be Compiled\"" >&2;}
20069     { $as_echo "$as_me:$LINENO: WARNING: sys/ipc.h: proceeding with the preprocessor's result" >&5
20070 $as_echo "$as_me: WARNING: sys/ipc.h: proceeding with the preprocessor's result" >&2;}
20071     { $as_echo "$as_me:$LINENO: WARNING: sys/ipc.h: in the future, the compiler will take precedence" >&5
20072 $as_echo "$as_me: WARNING: sys/ipc.h: in the future, the compiler will take precedence" >&2;}
20073
20074     ;;
20075 esac
20076 { $as_echo "$as_me:$LINENO: checking for sys/ipc.h" >&5
20077 $as_echo_n "checking for sys/ipc.h... " >&6; }
20078 if test "${ac_cv_header_sys_ipc_h+set}" = set; then
20079   $as_echo_n "(cached) " >&6
20080 else
20081   ac_cv_header_sys_ipc_h=$ac_header_preproc
20082 fi
20083 { $as_echo "$as_me:$LINENO: result: $ac_cv_header_sys_ipc_h" >&5
20084 $as_echo "$ac_cv_header_sys_ipc_h" >&6; }
20085
20086 fi
20087 if test "x$ac_cv_header_sys_ipc_h" = x""yes; then
20088   have_xshm=yes
20089 fi
20090
20091
20092   CPPFLAGS="$ac_save_CPPFLAGS"
20093   fi
20094
20095   # if that succeeded, then check for sys/shm.h.
20096   if test "$have_xshm" = yes; then
20097     have_xshm=no
20098
20099   ac_save_CPPFLAGS="$CPPFLAGS"
20100   if test \! -z "$includedir" ; then
20101     CPPFLAGS="$CPPFLAGS -I$includedir"
20102   fi
20103   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
20104   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
20105   if test "${ac_cv_header_sys_shm_h+set}" = set; then
20106   { $as_echo "$as_me:$LINENO: checking for sys/shm.h" >&5
20107 $as_echo_n "checking for sys/shm.h... " >&6; }
20108 if test "${ac_cv_header_sys_shm_h+set}" = set; then
20109   $as_echo_n "(cached) " >&6
20110 fi
20111 { $as_echo "$as_me:$LINENO: result: $ac_cv_header_sys_shm_h" >&5
20112 $as_echo "$ac_cv_header_sys_shm_h" >&6; }
20113 else
20114   # Is the header compilable?
20115 { $as_echo "$as_me:$LINENO: checking sys/shm.h usability" >&5
20116 $as_echo_n "checking sys/shm.h usability... " >&6; }
20117 cat >conftest.$ac_ext <<_ACEOF
20118 /* confdefs.h.  */
20119 _ACEOF
20120 cat confdefs.h >>conftest.$ac_ext
20121 cat >>conftest.$ac_ext <<_ACEOF
20122 /* end confdefs.h.  */
20123 $ac_includes_default
20124 #include <sys/shm.h>
20125 _ACEOF
20126 rm -rf conftest.$ac_objext
20127 if { (ac_try="$ac_compile"
20128 case "(($ac_try" in
20129   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20130   *) ac_try_echo=$ac_try;;
20131 esac
20132 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
20133 $as_echo "$ac_try_echo") >&5
20134   (eval "$ac_compile") 2>conftest.er1
20135   ac_status=$?
20136   grep -v '^ *+' conftest.er1 >conftest.err
20137   rm -rf conftest.er1
20138   cat conftest.err >&5
20139   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
20140   (exit $ac_status); } && {
20141          test -z "$ac_c_werror_flag" ||
20142          test ! -s conftest.err
20143        } && test -s conftest.$ac_objext; then
20144   ac_header_compiler=yes
20145 else
20146   $as_echo "$as_me: failed program was:" >&5
20147 sed 's/^/| /' conftest.$ac_ext >&5
20148
20149         ac_header_compiler=no
20150 fi
20151
20152 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
20153 { $as_echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
20154 $as_echo "$ac_header_compiler" >&6; }
20155
20156 # Is the header present?
20157 { $as_echo "$as_me:$LINENO: checking sys/shm.h presence" >&5
20158 $as_echo_n "checking sys/shm.h presence... " >&6; }
20159 cat >conftest.$ac_ext <<_ACEOF
20160 /* confdefs.h.  */
20161 _ACEOF
20162 cat confdefs.h >>conftest.$ac_ext
20163 cat >>conftest.$ac_ext <<_ACEOF
20164 /* end confdefs.h.  */
20165 #include <sys/shm.h>
20166 _ACEOF
20167 if { (ac_try="$ac_cpp conftest.$ac_ext"
20168 case "(($ac_try" in
20169   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20170   *) ac_try_echo=$ac_try;;
20171 esac
20172 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
20173 $as_echo "$ac_try_echo") >&5
20174   (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
20175   ac_status=$?
20176   grep -v '^ *+' conftest.er1 >conftest.err
20177   rm -rf conftest.er1
20178   cat conftest.err >&5
20179   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
20180   (exit $ac_status); } >/dev/null && {
20181          test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
20182          test ! -s conftest.err
20183        }; then
20184   ac_header_preproc=yes
20185 else
20186   $as_echo "$as_me: failed program was:" >&5
20187 sed 's/^/| /' conftest.$ac_ext >&5
20188
20189   ac_header_preproc=no
20190 fi
20191
20192 rm -rf conftest.err conftest.$ac_ext
20193 { $as_echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
20194 $as_echo "$ac_header_preproc" >&6; }
20195
20196 # So?  What about this header?
20197 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
20198   yes:no: )
20199     { $as_echo "$as_me:$LINENO: WARNING: sys/shm.h: accepted by the compiler, rejected by the preprocessor!" >&5
20200 $as_echo "$as_me: WARNING: sys/shm.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
20201     { $as_echo "$as_me:$LINENO: WARNING: sys/shm.h: proceeding with the compiler's result" >&5
20202 $as_echo "$as_me: WARNING: sys/shm.h: proceeding with the compiler's result" >&2;}
20203     ac_header_preproc=yes
20204     ;;
20205   no:yes:* )
20206     { $as_echo "$as_me:$LINENO: WARNING: sys/shm.h: present but cannot be compiled" >&5
20207 $as_echo "$as_me: WARNING: sys/shm.h: present but cannot be compiled" >&2;}
20208     { $as_echo "$as_me:$LINENO: WARNING: sys/shm.h:     check for missing prerequisite headers?" >&5
20209 $as_echo "$as_me: WARNING: sys/shm.h:     check for missing prerequisite headers?" >&2;}
20210     { $as_echo "$as_me:$LINENO: WARNING: sys/shm.h: see the Autoconf documentation" >&5
20211 $as_echo "$as_me: WARNING: sys/shm.h: see the Autoconf documentation" >&2;}
20212     { $as_echo "$as_me:$LINENO: WARNING: sys/shm.h:     section \"Present But Cannot Be Compiled\"" >&5
20213 $as_echo "$as_me: WARNING: sys/shm.h:     section \"Present But Cannot Be Compiled\"" >&2;}
20214     { $as_echo "$as_me:$LINENO: WARNING: sys/shm.h: proceeding with the preprocessor's result" >&5
20215 $as_echo "$as_me: WARNING: sys/shm.h: proceeding with the preprocessor's result" >&2;}
20216     { $as_echo "$as_me:$LINENO: WARNING: sys/shm.h: in the future, the compiler will take precedence" >&5
20217 $as_echo "$as_me: WARNING: sys/shm.h: in the future, the compiler will take precedence" >&2;}
20218
20219     ;;
20220 esac
20221 { $as_echo "$as_me:$LINENO: checking for sys/shm.h" >&5
20222 $as_echo_n "checking for sys/shm.h... " >&6; }
20223 if test "${ac_cv_header_sys_shm_h+set}" = set; then
20224   $as_echo_n "(cached) " >&6
20225 else
20226   ac_cv_header_sys_shm_h=$ac_header_preproc
20227 fi
20228 { $as_echo "$as_me:$LINENO: result: $ac_cv_header_sys_shm_h" >&5
20229 $as_echo "$ac_cv_header_sys_shm_h" >&6; }
20230
20231 fi
20232 if test "x$ac_cv_header_sys_shm_h" = x""yes; then
20233   have_xshm=yes
20234 fi
20235
20236
20237   CPPFLAGS="$ac_save_CPPFLAGS"
20238   fi
20239
20240   # AIX is pathological, as usual: apparently it's normal for the Xshm headers
20241   # to exist, but the library code to not exist.  And even better, the library
20242   # code is in its own library: libXextSam.a.  So, if we're on AIX, and that
20243   # lib doesn't exist, give up.  (This lib gets added to X_EXTRA_LIBS, and
20244   # that's not quite right, but close enough.)
20245   #
20246   case "$host" in
20247     *-aix*)
20248       if  `uname -v` -eq 3 ; then
20249         have_xshm=no
20250
20251   ac_save_CPPFLAGS="$CPPFLAGS"
20252   ac_save_LDFLAGS="$LDFLAGS"
20253 #  ac_save_LIBS="$LIBS"
20254
20255   if test \! -z "$includedir" ; then
20256     CPPFLAGS="$CPPFLAGS -I$includedir"
20257   fi
20258   # note: $X_CFLAGS includes $x_includes
20259   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
20260
20261   if test \! -z "$libdir" ; then
20262     LDFLAGS="$LDFLAGS -L$libdir"
20263   fi
20264   # note: $X_LIBS includes $x_libraries
20265   LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
20266
20267   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
20268   LDFLAGS=`eval eval eval eval eval eval eval eval eval echo $LDFLAGS`
20269   { $as_echo "$as_me:$LINENO: checking for XShmQueryExtension in -lXextSam" >&5
20270 $as_echo_n "checking for XShmQueryExtension in -lXextSam... " >&6; }
20271 if test "${ac_cv_lib_XextSam_XShmQueryExtension+set}" = set; then
20272   $as_echo_n "(cached) " >&6
20273 else
20274   ac_check_lib_save_LIBS=$LIBS
20275 LIBS="-lXextSam -lX11 -lXext -lm $LIBS"
20276 cat >conftest.$ac_ext <<_ACEOF
20277 /* confdefs.h.  */
20278 _ACEOF
20279 cat confdefs.h >>conftest.$ac_ext
20280 cat >>conftest.$ac_ext <<_ACEOF
20281 /* end confdefs.h.  */
20282
20283 /* Override any GCC internal prototype to avoid an error.
20284    Use char because int might match the return type of a GCC
20285    builtin and then its argument prototype would still apply.  */
20286 #ifdef __cplusplus
20287 extern "C"
20288 #endif
20289 char XShmQueryExtension ();
20290 int
20291 main ()
20292 {
20293 return XShmQueryExtension ();
20294   ;
20295   return 0;
20296 }
20297 _ACEOF
20298 rm -rf conftest.$ac_objext conftest$ac_exeext
20299 if { (ac_try="$ac_link"
20300 case "(($ac_try" in
20301   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20302   *) ac_try_echo=$ac_try;;
20303 esac
20304 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
20305 $as_echo "$ac_try_echo") >&5
20306   (eval "$ac_link") 2>conftest.er1
20307   ac_status=$?
20308   grep -v '^ *+' conftest.er1 >conftest.err
20309   rm -rf conftest.er1
20310   cat conftest.err >&5
20311   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
20312   (exit $ac_status); } && {
20313          test -z "$ac_c_werror_flag" ||
20314          test ! -s conftest.err
20315        } && test -s conftest$ac_exeext && {
20316          test "$cross_compiling" = yes ||
20317          $as_test_x conftest$ac_exeext
20318        }; then
20319   ac_cv_lib_XextSam_XShmQueryExtension=yes
20320 else
20321   $as_echo "$as_me: failed program was:" >&5
20322 sed 's/^/| /' conftest.$ac_ext >&5
20323
20324         ac_cv_lib_XextSam_XShmQueryExtension=no
20325 fi
20326
20327 rm -rf conftest.dSYM
20328 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
20329       conftest$ac_exeext conftest.$ac_ext
20330 LIBS=$ac_check_lib_save_LIBS
20331 fi
20332 { $as_echo "$as_me:$LINENO: result: $ac_cv_lib_XextSam_XShmQueryExtension" >&5
20333 $as_echo "$ac_cv_lib_XextSam_XShmQueryExtension" >&6; }
20334 if test "x$ac_cv_lib_XextSam_XShmQueryExtension" = x""yes; then
20335   have_xshm=yes; X_EXTRA_LIBS="$X_EXTRA_LIBS -lXextSam"
20336 else
20337   true
20338 fi
20339
20340   CPPFLAGS="$ac_save_CPPFLAGS"
20341   LDFLAGS="$ac_save_LDFLAGS"
20342 #  LIBS="$ac_save_LIBS"
20343
20344       fi
20345     ;;
20346   esac
20347
20348   # if that succeeded, then we've really got it.
20349   if test "$have_xshm" = yes; then
20350     cat >>confdefs.h <<\_ACEOF
20351 #define HAVE_XSHM_EXTENSION 1
20352 _ACEOF
20353
20354   fi
20355
20356 elif test "$with_xshm" != no; then
20357   echo "error: must be yes or no: --with-xshm-ext=$with_xshm"
20358   exit 1
20359 fi
20360
20361
20362 ###############################################################################
20363 #
20364 #       Check for the DOUBLE-BUFFER server extension.
20365 #
20366 ###############################################################################
20367
20368 have_xdbe=no
20369 with_xdbe_req=unspecified
20370
20371 # Check whether --with-xdbe-ext was given.
20372 if test "${with_xdbe_ext+set}" = set; then
20373   withval=$with_xdbe_ext; with_xdbe="$withval"; with_xdbe_req="$withval"
20374 else
20375   with_xdbe=yes
20376 fi
20377
20378
20379
20380    case "$with_xdbe" in
20381     yes) ;;
20382     no)  ;;
20383
20384     /*)
20385      { $as_echo "$as_me:$LINENO: checking for DOUBLE-BUFFER headers" >&5
20386 $as_echo_n "checking for DOUBLE-BUFFER headers... " >&6; }
20387      d=$with_xdbe/include
20388      if test -d $d; then
20389        X_CFLAGS="-I$d $X_CFLAGS"
20390        { $as_echo "$as_me:$LINENO: result: $d" >&5
20391 $as_echo "$d" >&6; }
20392      else
20393        { $as_echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
20394 $as_echo "not found ($d: no such directory)" >&6; }
20395      fi
20396
20397      { $as_echo "$as_me:$LINENO: checking for DOUBLE-BUFFER libs" >&5
20398 $as_echo_n "checking for DOUBLE-BUFFER libs... " >&6; }
20399      d=$with_xdbe/lib
20400      if test -d $d; then
20401        X_LIBS="-L$d $X_LIBS"
20402        { $as_echo "$as_me:$LINENO: result: $d" >&5
20403 $as_echo "$d" >&6; }
20404      else
20405        { $as_echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
20406 $as_echo "not found ($d: no such directory)" >&6; }
20407      fi
20408
20409      # replace the directory string with "yes".
20410      with_xdbe_req="yes"
20411      with_xdbe=$with_xdbe_req
20412      ;;
20413
20414     *)
20415      echo ""
20416      echo "error: argument to --with-xdbe-ext must be \"yes\", \"no\", or a directory."
20417      echo "       If it is a directory, then \`DIR/include' will be added to"
20418      echo "       the -I list, and \`DIR/lib' will be added to the -L list."
20419      exit 1
20420      ;;
20421    esac
20422
20423
20424 if test "$with_xdbe" = yes; then
20425
20426
20427   ac_save_CPPFLAGS="$CPPFLAGS"
20428   if test \! -z "$includedir" ; then
20429     CPPFLAGS="$CPPFLAGS -I$includedir"
20430   fi
20431   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
20432   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
20433   { $as_echo "$as_me:$LINENO: checking for X11/extensions/Xdbe.h" >&5
20434 $as_echo_n "checking for X11/extensions/Xdbe.h... " >&6; }
20435 if test "${ac_cv_header_X11_extensions_Xdbe_h+set}" = set; then
20436   $as_echo_n "(cached) " >&6
20437 else
20438   cat >conftest.$ac_ext <<_ACEOF
20439 /* confdefs.h.  */
20440 _ACEOF
20441 cat confdefs.h >>conftest.$ac_ext
20442 cat >>conftest.$ac_ext <<_ACEOF
20443 /* end confdefs.h.  */
20444 #include <X11/Xlib.h>
20445
20446 #include <X11/extensions/Xdbe.h>
20447 _ACEOF
20448 rm -rf conftest.$ac_objext
20449 if { (ac_try="$ac_compile"
20450 case "(($ac_try" in
20451   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20452   *) ac_try_echo=$ac_try;;
20453 esac
20454 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
20455 $as_echo "$ac_try_echo") >&5
20456   (eval "$ac_compile") 2>conftest.er1
20457   ac_status=$?
20458   grep -v '^ *+' conftest.er1 >conftest.err
20459   rm -rf conftest.er1
20460   cat conftest.err >&5
20461   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
20462   (exit $ac_status); } && {
20463          test -z "$ac_c_werror_flag" ||
20464          test ! -s conftest.err
20465        } && test -s conftest.$ac_objext; then
20466   ac_cv_header_X11_extensions_Xdbe_h=yes
20467 else
20468   $as_echo "$as_me: failed program was:" >&5
20469 sed 's/^/| /' conftest.$ac_ext >&5
20470
20471         ac_cv_header_X11_extensions_Xdbe_h=no
20472 fi
20473
20474 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
20475 fi
20476 { $as_echo "$as_me:$LINENO: result: $ac_cv_header_X11_extensions_Xdbe_h" >&5
20477 $as_echo "$ac_cv_header_X11_extensions_Xdbe_h" >&6; }
20478 if test "x$ac_cv_header_X11_extensions_Xdbe_h" = x""yes; then
20479   have_xdbe=yes
20480 fi
20481
20482
20483   CPPFLAGS="$ac_save_CPPFLAGS"
20484   if test "$have_xdbe" = yes; then
20485     cat >>confdefs.h <<\_ACEOF
20486 #define HAVE_DOUBLE_BUFFER_EXTENSION 1
20487 _ACEOF
20488
20489   fi
20490
20491 elif test "$with_xdbe" != no; then
20492   echo "error: must be yes or no: --with-xdbe-ext=$with_xshm"
20493   exit 1
20494 fi
20495
20496
20497 ###############################################################################
20498 #
20499 #       Check for the SGI XReadDisplay server extension.
20500 #
20501 #       Note: this has to be down here, rather than up with the other server
20502 #       extension tests, so that the output of `configure --help' is in the
20503 #       right order.  Arrgh!
20504 #
20505 ###############################################################################
20506
20507 have_readdisplay=no
20508 with_readdisplay_req=unspecified
20509
20510 # Check whether --with-readdisplay was given.
20511 if test "${with_readdisplay+set}" = set; then
20512   withval=$with_readdisplay; with_readdisplay="$withval"; with_readdisplay_req="$withval"
20513 else
20514   with_readdisplay=yes
20515 fi
20516
20517
20518
20519    case "$with_readdisplay" in
20520     yes) ;;
20521     no)  ;;
20522
20523     /*)
20524      { $as_echo "$as_me:$LINENO: checking for XReadDisplay headers" >&5
20525 $as_echo_n "checking for XReadDisplay headers... " >&6; }
20526      d=$with_readdisplay/include
20527      if test -d $d; then
20528        X_CFLAGS="-I$d $X_CFLAGS"
20529        { $as_echo "$as_me:$LINENO: result: $d" >&5
20530 $as_echo "$d" >&6; }
20531      else
20532        { $as_echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
20533 $as_echo "not found ($d: no such directory)" >&6; }
20534      fi
20535
20536      { $as_echo "$as_me:$LINENO: checking for XReadDisplay libs" >&5
20537 $as_echo_n "checking for XReadDisplay libs... " >&6; }
20538      d=$with_readdisplay/lib
20539      if test -d $d; then
20540        X_LIBS="-L$d $X_LIBS"
20541        { $as_echo "$as_me:$LINENO: result: $d" >&5
20542 $as_echo "$d" >&6; }
20543      else
20544        { $as_echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
20545 $as_echo "not found ($d: no such directory)" >&6; }
20546      fi
20547
20548      # replace the directory string with "yes".
20549      with_readdisplay_req="yes"
20550      with_readdisplay=$with_readdisplay_req
20551      ;;
20552
20553     *)
20554      echo ""
20555      echo "error: argument to --with-readdisplay must be \"yes\", \"no\", or a directory."
20556      echo "       If it is a directory, then \`DIR/include' will be added to"
20557      echo "       the -I list, and \`DIR/lib' will be added to the -L list."
20558      exit 1
20559      ;;
20560    esac
20561
20562
20563 if test "$with_readdisplay" = yes; then
20564
20565   ac_save_CPPFLAGS="$CPPFLAGS"
20566   if test \! -z "$includedir" ; then
20567     CPPFLAGS="$CPPFLAGS -I$includedir"
20568   fi
20569   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
20570   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
20571   { $as_echo "$as_me:$LINENO: checking for X11/extensions/readdisplay.h" >&5
20572 $as_echo_n "checking for X11/extensions/readdisplay.h... " >&6; }
20573 if test "${ac_cv_header_X11_extensions_readdisplay_h+set}" = set; then
20574   $as_echo_n "(cached) " >&6
20575 else
20576   cat >conftest.$ac_ext <<_ACEOF
20577 /* confdefs.h.  */
20578 _ACEOF
20579 cat confdefs.h >>conftest.$ac_ext
20580 cat >>conftest.$ac_ext <<_ACEOF
20581 /* end confdefs.h.  */
20582 #include <X11/Xlib.h>
20583
20584 #include <X11/extensions/readdisplay.h>
20585 _ACEOF
20586 rm -rf conftest.$ac_objext
20587 if { (ac_try="$ac_compile"
20588 case "(($ac_try" in
20589   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20590   *) ac_try_echo=$ac_try;;
20591 esac
20592 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
20593 $as_echo "$ac_try_echo") >&5
20594   (eval "$ac_compile") 2>conftest.er1
20595   ac_status=$?
20596   grep -v '^ *+' conftest.er1 >conftest.err
20597   rm -rf conftest.er1
20598   cat conftest.err >&5
20599   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
20600   (exit $ac_status); } && {
20601          test -z "$ac_c_werror_flag" ||
20602          test ! -s conftest.err
20603        } && test -s conftest.$ac_objext; then
20604   ac_cv_header_X11_extensions_readdisplay_h=yes
20605 else
20606   $as_echo "$as_me: failed program was:" >&5
20607 sed 's/^/| /' conftest.$ac_ext >&5
20608
20609         ac_cv_header_X11_extensions_readdisplay_h=no
20610 fi
20611
20612 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
20613 fi
20614 { $as_echo "$as_me:$LINENO: result: $ac_cv_header_X11_extensions_readdisplay_h" >&5
20615 $as_echo "$ac_cv_header_X11_extensions_readdisplay_h" >&6; }
20616 if test "x$ac_cv_header_X11_extensions_readdisplay_h" = x""yes; then
20617   cat >>confdefs.h <<\_ACEOF
20618 #define HAVE_READ_DISPLAY_EXTENSION 1
20619 _ACEOF
20620
20621 fi
20622
20623
20624   CPPFLAGS="$ac_save_CPPFLAGS"
20625 elif test "$with_readdisplay" != no; then
20626   echo "error: must be yes or no: --with-readdisplay=$with_readdisplay"
20627   exit 1
20628 fi
20629
20630
20631 ###############################################################################
20632 #
20633 #       Check for a directory full of images to use as the default value
20634 #       of the "imageDirectory" preference.
20635 #
20636 ###############################################################################
20637
20638 have_imagedir=no
20639 with_imagedir_req=unspecified
20640
20641
20642 # Check whether --with-image-directory was given.
20643 if test "${with_image_directory+set}" = set; then
20644   withval=$with_image_directory; with_imagedir="$withval"; with_imagedir_req="$withval"
20645 else
20646   with_imagedir=yes
20647 fi
20648
20649 # no HANDLE_X_PATH_ARG for this one
20650
20651 case "$with_imagedir" in
20652   /*)
20653     # absolute path
20654     { $as_echo "$as_me:$LINENO: checking for image directory $with_imagedir" >&5
20655 $as_echo_n "checking for image directory $with_imagedir... " >&6; }
20656     if test -d "$with_imagedir" ; then
20657       { $as_echo "$as_me:$LINENO: result: yes" >&5
20658 $as_echo "yes" >&6; }
20659     else
20660       { $as_echo "$as_me:$LINENO: result: no" >&5
20661 $as_echo "no" >&6; }
20662       with_imagedir=""
20663     fi
20664   ;;
20665   yes)
20666     with_imagedir=""
20667
20668     #### Could use some more defaults here...
20669     for dd in \
20670       "/usr/share/backgrounds/images/"          \
20671       "/usr/share/wallpapers/"                  \
20672       "/Library/Desktop Pictures/"              \
20673     ; do
20674       if test -z "$with_imagedir"; then
20675         { $as_echo "$as_me:$LINENO: checking for image directory $dd" >&5
20676 $as_echo_n "checking for image directory $dd... " >&6; }
20677         if test -d "$dd" ; then
20678           { $as_echo "$as_me:$LINENO: result: yes" >&5
20679 $as_echo "yes" >&6; }
20680           with_imagedir="$dd"
20681         else
20682           { $as_echo "$as_me:$LINENO: result: no" >&5
20683 $as_echo "no" >&6; }
20684         fi
20685       fi
20686     done
20687
20688   ;;
20689   no)
20690     with_imagedir=""
20691   ;;
20692
20693   *)
20694     echo "error: must be an absolute path: --with-image-directory=$with_imagedir_req"
20695     exit 1
20696   ;;
20697 esac
20698 ac_cv_imagedir="$with_imagedir"
20699
20700 DEFAULT_IMAGES_P='True'
20701 DEFAULT_IMAGE_DIRECTORY="$ac_cv_imagedir"
20702
20703 if test -z "$DEFAULT_IMAGE_DIRECTORY" ; then
20704   DEFAULT_IMAGES_P='False'
20705 fi
20706
20707
20708 ###############################################################################
20709 #
20710 #       Pick a text file to use as the default of the "textFile" preference.
20711 #       Any old file will do, but preferably one that will make interesting
20712 #       shapes when displayed by "starwars" and "fontglide".
20713 #
20714 ###############################################################################
20715
20716 have_textfile=no
20717 with_textfile_req=unspecified
20718
20719
20720 # Check whether --with-text-file was given.
20721 if test "${with_text_file+set}" = set; then
20722   withval=$with_text_file; with_textfile="$withval"; with_textfile_req="$withval"
20723 else
20724   with_textfile=yes
20725 fi
20726
20727 # no HANDLE_X_PATH_ARG for this one
20728
20729 case "$with_textfile" in
20730   /*)
20731     # absolute path
20732     { $as_echo "$as_me:$LINENO: checking for text file $with_textfile" >&5
20733 $as_echo_n "checking for text file $with_textfile... " >&6; }
20734     if test -f "$with_textfile" ; then
20735       { $as_echo "$as_me:$LINENO: result: yes" >&5
20736 $as_echo "yes" >&6; }
20737     else
20738       { $as_echo "$as_me:$LINENO: result: no" >&5
20739 $as_echo "no" >&6; }
20740       with_textfile=""
20741     fi
20742   ;;
20743   yes)
20744     with_textfile=""
20745
20746     #### Could use some more defaults here...
20747     for f in \
20748       "/usr/X11R6/lib/X11/doc/README"              \
20749       "/usr/share/doc/xserver-common/copyright"    \
20750       "/usr/share/doc/xserver-xorg-core/copyright" \
20751       "/usr/X11R6/README"                          \
20752       "/usr/share/doc/debian/debian-manifesto"     \
20753     ; do
20754       if test -z "$with_textfile"; then
20755         { $as_echo "$as_me:$LINENO: checking for text file $f" >&5
20756 $as_echo_n "checking for text file $f... " >&6; }
20757         if test -f "$f" ; then
20758           { $as_echo "$as_me:$LINENO: result: yes" >&5
20759 $as_echo "yes" >&6; }
20760           with_textfile="$f"
20761         else
20762           { $as_echo "$as_me:$LINENO: result: no" >&5
20763 $as_echo "no" >&6; }
20764         fi
20765       fi
20766     done
20767
20768   ;;
20769   no)
20770     with_textfile=""
20771   ;;
20772
20773   *)
20774     echo "error: must be an absolute path: --with-text-file=$with_textfile_req"
20775     exit 1
20776   ;;
20777 esac
20778 ac_cv_textfile="$with_textfile"
20779
20780 DEFAULT_TEXT_FILE="$ac_cv_textfile"
20781
20782
20783 ###############################################################################
20784 #
20785 #       Check the browser to see help URL
20786 #
20787 ###############################################################################
20788
20789 have_browser=no
20790 with_browser_req=unspecified
20791
20792
20793 # Check whether --with-browser was given.
20794 if test "${with_browser+set}" = set; then
20795   withval=$with_browser; with_browser="$withval"; with_browser_req="$withval"
20796 else
20797   with_browser=no
20798 fi
20799
20800 # no HANDLE_X_PATH_ARG for this one
20801
20802 case "$with_browser" in
20803   no )
20804   ;;
20805   * )
20806     WITH_BROWSER=$with_browser
20807     gnome_open_program=$with_browser
20808     { $as_echo "$as_me:$LINENO: checking for browser $with_browser" >&5
20809 $as_echo_n "checking for browser $with_browser... " >&6; }
20810     with_browser_fullpath=`which $with_browser 2>/dev/null`
20811     case $with_browser_fullpath in
20812          /* )
20813                 { $as_echo "$as_me:$LINENO: result: yes" >&5
20814 $as_echo "yes" >&6; }
20815                  have_browser=yes
20816                  ;;
20817         * )
20818                { $as_echo "$as_me:$LINENO: result: no" >&5
20819 $as_echo "no" >&6; }
20820 # Only warning: we don't want to install all packages for the
20821 # dependency of the browser in building stage...
20822                echo "WARNING: browser not found: --with-browser=$with_browser"
20823                ;;
20824     esac
20825   ;;
20826 esac
20827 ac_cv_browser="$with_browser"
20828
20829 ###############################################################################
20830 #
20831 #       Check whether it's ok to install some hacks as setuid (e.g., "sonar")
20832 #       This should be safe, but let's give people the option.
20833 #
20834 ###############################################################################
20835
20836 setuid_hacks_default=no
20837 setuid_hacks="$setuid_hacks_default"
20838
20839 # Check whether --with-setuid-hacks was given.
20840 if test "${with_setuid_hacks+set}" = set; then
20841   withval=$with_setuid_hacks; setuid_hacks="$withval"
20842 else
20843   setuid_hacks="$setuid_hacks_default"
20844 fi
20845
20846
20847
20848    case "$setuid_hacks" in
20849     yes) ;;
20850     no)  ;;
20851
20852     /*)
20853      { $as_echo "$as_me:$LINENO: checking for setuid hacks headers" >&5
20854 $as_echo_n "checking for setuid hacks headers... " >&6; }
20855      d=$setuid_hacks/include
20856      if test -d $d; then
20857        X_CFLAGS="-I$d $X_CFLAGS"
20858        { $as_echo "$as_me:$LINENO: result: $d" >&5
20859 $as_echo "$d" >&6; }
20860      else
20861        { $as_echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
20862 $as_echo "not found ($d: no such directory)" >&6; }
20863      fi
20864
20865      { $as_echo "$as_me:$LINENO: checking for setuid hacks libs" >&5
20866 $as_echo_n "checking for setuid hacks libs... " >&6; }
20867      d=$setuid_hacks/lib
20868      if test -d $d; then
20869        X_LIBS="-L$d $X_LIBS"
20870        { $as_echo "$as_me:$LINENO: result: $d" >&5
20871 $as_echo "$d" >&6; }
20872      else
20873        { $as_echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
20874 $as_echo "not found ($d: no such directory)" >&6; }
20875      fi
20876
20877      # replace the directory string with "yes".
20878      setuid_hacks_req="yes"
20879      setuid_hacks=$setuid_hacks_req
20880      ;;
20881
20882     *)
20883      echo ""
20884      echo "error: argument to --with-setuid-hacks must be \"yes\", \"no\", or a directory."
20885      echo "       If it is a directory, then \`DIR/include' will be added to"
20886      echo "       the -I list, and \`DIR/lib' will be added to the -L list."
20887      exit 1
20888      ;;
20889    esac
20890
20891
20892 if test "$setuid_hacks" = yes; then
20893   true
20894 elif test "$setuid_hacks" != no; then
20895   echo "error: must be yes or no: --with-setuid-hacks=$setuid_hacks"
20896   exit 1
20897 fi
20898
20899
20900 ###############################################################################
20901 #
20902 #       Done testing.  Now, set up the various -I and -L variables,
20903 #       and decide which GUI program to build by default.
20904 #
20905 ###############################################################################
20906
20907 DEPEND=makedepend
20908 DEPEND_FLAGS=
20909 DEPEND_DEFINES=
20910
20911
20912 if test \! -z "$includedir" ; then
20913   INCLUDES="$INCLUDES -I$includedir"
20914 fi
20915
20916 if test \! -z "$libdir" ; then
20917   LDFLAGS="$LDFLAGS -L$libdir"
20918 fi
20919
20920
20921 PREFERRED_DEMO_PROGRAM=''
20922 ALL_DEMO_PROGRAMS=
20923 if test "$have_motif" = yes; then
20924   PREFERRED_DEMO_PROGRAM=xscreensaver-demo-Xm
20925   ALL_DEMO_PROGRAMS="$PREFERRED_DEMO_PROGRAM $ALL_DEMO_PROGRAMS"
20926 fi
20927 if test "$have_gtk" = yes; then
20928   PREFERRED_DEMO_PROGRAM=xscreensaver-demo-Gtk
20929   ALL_DEMO_PROGRAMS="$PREFERRED_DEMO_PROGRAM $ALL_DEMO_PROGRAMS"
20930 fi
20931
20932
20933 if test "$have_kerberos" = yes; then
20934   PASSWD_SRCS="$PASSWD_SRCS \$(KERBEROS_SRCS)"
20935   PASSWD_OBJS="$PASSWD_OBJS \$(KERBEROS_OBJS)"
20936 fi
20937 if test "$have_pam" = yes; then
20938   PASSWD_SRCS="$PASSWD_SRCS \$(PAM_SRCS)"
20939   PASSWD_OBJS="$PASSWD_OBJS \$(PAM_OBJS)"
20940   INSTALL_PAM="install-pam"
20941 fi
20942 if test "$have_passwd_helper" = yes; then
20943   PASSWD_SRCS="$PASSWD_SRCS \$(PWHELPER_SRCS)"
20944   PASSWD_OBJS="$PASSWD_OBJS \$(PWHELPER_OBJS)"
20945 fi
20946   PASSWD_SRCS="$PASSWD_SRCS \$(PWENT_SRCS)"
20947   PASSWD_OBJS="$PASSWD_OBJS \$(PWENT_OBJS)"
20948
20949
20950 if test "$enable_locking" = yes; then
20951   LOCK_SRCS='$(LOCK_SRCS_1) $(PASSWD_SRCS)'
20952   LOCK_OBJS='$(LOCK_OBJS_1) $(PASSWD_OBJS)'
20953 else
20954   LOCK_SRCS='$(NOLOCK_SRCS_1)'
20955   LOCK_OBJS='$(NOLOCK_OBJS_1)'
20956 fi
20957
20958 if test "$ac_macosx" = yes; then
20959   EXES_OSX='$(EXES_OSX)'
20960   SCRIPTS_OSX='$(SCRIPTS_OSX)'
20961   MEN_OSX='$(MEN_OSX)'
20962 else
20963   EXES_OSX=
20964   SCRIPTS_OSX=
20965   MEN_OSX=
20966 fi
20967
20968
20969 INSTALL_SETUID='$(INSTALL_PROGRAM) $(SUID_FLAGS)'
20970
20971 if test "$need_setuid" = yes; then
20972   NEED_SETUID=yes
20973 else
20974   NEED_SETUID=no
20975 fi
20976
20977 if test "$setuid_hacks" = yes; then
20978   SETUID_HACKS=yes
20979 else
20980   SETUID_HACKS=no
20981 fi
20982
20983 tab='   '
20984 if test "$have_gl" = yes; then
20985   GL_EXES='$(GL_EXES)'
20986   SUID_EXES='$(SUID_EXES)'
20987   RETIRED_GL_EXES='$(RETIRED_GL_EXES)'
20988   GL_UTIL_EXES='$(GL_UTIL_EXES)'
20989   GL_MEN='$(GL_MEN)'
20990   GL_KLUDGE=" "
20991 else
20992   GL_KLUDGE="-"
20993 fi
20994
20995 if test "$have_gle" = yes; then
20996   GLE_EXES='$(GLE_EXES)'
20997   GLE_KLUDGE=" "
20998 else
20999   GLE_KLUDGE="-"
21000 fi
21001
21002 if test "$have_jpeg" = yes -a "$have_gdk_pixbuf" = yes; then
21003  JPEG_EXES='$(JPEG_EXES)'
21004 fi
21005
21006
21007 # Another substitution in the XScreenSaver.ad.in file:
21008 #
21009 if test "$gnome_open_program" != ''; then
21010   GNOME24=''
21011   GNOME22='!    '
21012   NOGNOME='!    '
21013 elif test "$gnome_url_show_program" != ''; then
21014   GNOME24='!    '
21015   GNOME22=''
21016   NOGNOME='!    '
21017 else
21018   GNOME24='!    '
21019   GNOME22='!    '
21020   NOGNOME=''
21021 fi
21022
21023
21024 # Set PO_DATADIR to something sensible.
21025 #
21026 { $as_echo "$as_me:$LINENO: checking for locale directory" >&5
21027 $as_echo_n "checking for locale directory... " >&6; }
21028 if test -n "$GTK_DATADIR" ; then
21029   PO_DATADIR="$GTK_DATADIR"
21030 elif test "$have_gtk" = yes; then
21031   PO_DATADIR=`$pkg_config --variable=prefix gtk+-2.0`
21032   PO_DATADIR="$PO_DATADIR/share"
21033 fi
21034
21035 if test -z "$PO_DATADIR" ; then
21036   #
21037   # #### Total fucking kludge --
21038   # Map /build/prefix/usr/X11R6/share/ to /build/prefix/usr/share/
21039   # but of course we need to expand all the nested variables to do that...
21040   #
21041   dd=`eval eval eval eval eval eval eval eval eval eval eval echo $datadir`
21042   PO_DATADIR=`echo $dd | sed 's@/X11R6/@/@'`
21043 fi
21044
21045 { $as_echo "$as_me:$LINENO: result: $PO_DATADIR/locale" >&5
21046 $as_echo "$PO_DATADIR/locale" >&6; }
21047
21048
21049 # canonicalize slashes.
21050 HACK_CONF_DIR=`echo "${HACK_CONF_DIR}" | sed 's@/$@@;s@//*@/@g'`
21051
21052 # gcc 3.0 likes to issue this warning for every file:
21053 #
21054 # cc1: warning: changing search order for system directory "/usr/local/include"
21055 # cc1: warning:   as it has already been specified as a non-system directory
21056 #
21057 # Yay.  We can only avoid that by deleting "-I${prefix}/include" from the list.
21058 # Which *should* be totally redundant, and thus an ok thing to delete?
21059 #
21060 INCLUDES=`echo "$INCLUDES" | sed 's@ -I${prefix}/include@@g;'`
21061
21062
21063 ###############################################################################
21064 #
21065 #       Perform substitutions and write Makefiles.
21066 #
21067 ###############################################################################
21068
21069
21070
21071
21072
21073
21074
21075
21076
21077
21078
21079
21080
21081
21082
21083
21084
21085
21086
21087
21088
21089
21090
21091
21092
21093
21094
21095
21096
21097
21098
21099
21100
21101
21102
21103
21104
21105
21106
21107
21108
21109
21110
21111
21112
21113
21114
21115
21116
21117
21118
21119
21120
21121
21122
21123
21124
21125
21126
21127
21128
21129
21130
21131
21132
21133 APPDEFAULTS=$ac_x_app_defaults
21134
21135
21136
21137
21138
21139
21140
21141 ac_config_files="$ac_config_files Makefile utils/Makefile driver/Makefile hacks/Makefile hacks/glx/Makefile po/Makefile.in driver/XScreenSaver.ad"
21142
21143 cat >confcache <<\_ACEOF
21144 # This file is a shell script that caches the results of configure
21145 # tests run on this system so they can be shared between configure
21146 # scripts and configure runs, see configure's option --config-cache.
21147 # It is not useful on other systems.  If it contains results you don't
21148 # want to keep, you may remove or edit it.
21149 #
21150 # config.status only pays attention to the cache file if you give it
21151 # the --recheck option to rerun configure.
21152 #
21153 # `ac_cv_env_foo' variables (set or unset) will be overridden when
21154 # loading this file, other *unset* `ac_cv_foo' will be assigned the
21155 # following values.
21156
21157 _ACEOF
21158
21159 # The following way of writing the cache mishandles newlines in values,
21160 # but we know of no workaround that is simple, portable, and efficient.
21161 # So, we kill variables containing newlines.
21162 # Ultrix sh set writes to stderr and can't be redirected directly,
21163 # and sets the high bit in the cache file unless we assign to the vars.
21164 (
21165   for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
21166     eval ac_val=\$$ac_var
21167     case $ac_val in #(
21168     *${as_nl}*)
21169       case $ac_var in #(
21170       *_cv_*) { $as_echo "$as_me:$LINENO: WARNING: cache variable $ac_var contains a newline" >&5
21171 $as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
21172       esac
21173       case $ac_var in #(
21174       _ | IFS | as_nl) ;; #(
21175       BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
21176       *) $as_unset $ac_var ;;
21177       esac ;;
21178     esac
21179   done
21180
21181   (set) 2>&1 |
21182     case $as_nl`(ac_space=' '; set) 2>&1` in #(
21183     *${as_nl}ac_space=\ *)
21184       # `set' does not quote correctly, so add quotes (double-quote
21185       # substitution turns \\\\ into \\, and sed turns \\ into \).
21186       sed -n \
21187         "s/'/'\\\\''/g;
21188           s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
21189       ;; #(
21190     *)
21191       # `set' quotes correctly as required by POSIX, so do not add quotes.
21192       sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
21193       ;;
21194     esac |
21195     sort
21196 ) |
21197   sed '
21198      /^ac_cv_env_/b end
21199      t clear
21200      :clear
21201      s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
21202      t end
21203      s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
21204      :end' >>confcache
21205 if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
21206   if test -w "$cache_file"; then
21207     test "x$cache_file" != "x/dev/null" &&
21208       { $as_echo "$as_me:$LINENO: updating cache $cache_file" >&5
21209 $as_echo "$as_me: updating cache $cache_file" >&6;}
21210     cat confcache >$cache_file
21211   else
21212     { $as_echo "$as_me:$LINENO: not updating unwritable cache $cache_file" >&5
21213 $as_echo "$as_me: not updating unwritable cache $cache_file" >&6;}
21214   fi
21215 fi
21216 rm -f confcache
21217
21218 test "x$prefix" = xNONE && prefix=$ac_default_prefix
21219 # Let make expand exec_prefix.
21220 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
21221
21222 DEFS=-DHAVE_CONFIG_H
21223
21224 ac_libobjs=
21225 ac_ltlibobjs=
21226 for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
21227   # 1. Remove the extension, and $U if already installed.
21228   ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
21229   ac_i=`$as_echo "$ac_i" | sed "$ac_script"`
21230   # 2. Prepend LIBOBJDIR.  When used with automake>=1.10 LIBOBJDIR
21231   #    will be set to the directory where LIBOBJS objects are built.
21232   ac_libobjs="$ac_libobjs \${LIBOBJDIR}$ac_i\$U.$ac_objext"
21233   ac_ltlibobjs="$ac_ltlibobjs \${LIBOBJDIR}$ac_i"'$U.lo'
21234 done
21235 LIBOBJS=$ac_libobjs
21236
21237 LTLIBOBJS=$ac_ltlibobjs
21238
21239
21240
21241
21242         mv -f po/POTFILES po/POTFILES.tmp
21243         sed -e 's/\[.*\] *//' < po/POTFILES.tmp > po/POTFILES
21244         rm -f po/POTFILES.tmp
21245
21246
21247
21248 : ${CONFIG_STATUS=./config.status}
21249 ac_write_fail=0
21250 ac_clean_files_save=$ac_clean_files
21251 ac_clean_files="$ac_clean_files $CONFIG_STATUS"
21252 { $as_echo "$as_me:$LINENO: creating $CONFIG_STATUS" >&5
21253 $as_echo "$as_me: creating $CONFIG_STATUS" >&6;}
21254 cat >$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
21255 #! $SHELL
21256 # Generated by $as_me.
21257 # Run this file to recreate the current configuration.
21258 # Compiler output produced by configure, useful for debugging
21259 # configure, is in config.log if it exists.
21260
21261 debug=false
21262 ac_cs_recheck=false
21263 ac_cs_silent=false
21264 SHELL=\${CONFIG_SHELL-$SHELL}
21265 _ACEOF
21266
21267 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
21268 ## --------------------- ##
21269 ## M4sh Initialization.  ##
21270 ## --------------------- ##
21271
21272 # Be more Bourne compatible
21273 DUALCASE=1; export DUALCASE # for MKS sh
21274 if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
21275   emulate sh
21276   NULLCMD=:
21277   # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
21278   # is contrary to our usage.  Disable this feature.
21279   alias -g '${1+"$@"}'='"$@"'
21280   setopt NO_GLOB_SUBST
21281 else
21282   case `(set -o) 2>/dev/null` in
21283   *posix*) set -o posix ;;
21284 esac
21285
21286 fi
21287
21288
21289
21290
21291 # PATH needs CR
21292 # Avoid depending upon Character Ranges.
21293 as_cr_letters='abcdefghijklmnopqrstuvwxyz'
21294 as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
21295 as_cr_Letters=$as_cr_letters$as_cr_LETTERS
21296 as_cr_digits='0123456789'
21297 as_cr_alnum=$as_cr_Letters$as_cr_digits
21298
21299 as_nl='
21300 '
21301 export as_nl
21302 # Printing a long string crashes Solaris 7 /usr/bin/printf.
21303 as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
21304 as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
21305 as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
21306 if (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
21307   as_echo='printf %s\n'
21308   as_echo_n='printf %s'
21309 else
21310   if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
21311     as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
21312     as_echo_n='/usr/ucb/echo -n'
21313   else
21314     as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
21315     as_echo_n_body='eval
21316       arg=$1;
21317       case $arg in
21318       *"$as_nl"*)
21319         expr "X$arg" : "X\\(.*\\)$as_nl";
21320         arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
21321       esac;
21322       expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
21323     '
21324     export as_echo_n_body
21325     as_echo_n='sh -c $as_echo_n_body as_echo'
21326   fi
21327   export as_echo_body
21328   as_echo='sh -c $as_echo_body as_echo'
21329 fi
21330
21331 # The user is always right.
21332 if test "${PATH_SEPARATOR+set}" != set; then
21333   PATH_SEPARATOR=:
21334   (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
21335     (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
21336       PATH_SEPARATOR=';'
21337   }
21338 fi
21339
21340 # Support unset when possible.
21341 if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then
21342   as_unset=unset
21343 else
21344   as_unset=false
21345 fi
21346
21347
21348 # IFS
21349 # We need space, tab and new line, in precisely that order.  Quoting is
21350 # there to prevent editors from complaining about space-tab.
21351 # (If _AS_PATH_WALK were called with IFS unset, it would disable word
21352 # splitting by setting IFS to empty value.)
21353 IFS=" ""        $as_nl"
21354
21355 # Find who we are.  Look in the path if we contain no directory separator.
21356 case $0 in
21357   *[\\/]* ) as_myself=$0 ;;
21358   *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21359 for as_dir in $PATH
21360 do
21361   IFS=$as_save_IFS
21362   test -z "$as_dir" && as_dir=.
21363   test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
21364 done
21365 IFS=$as_save_IFS
21366
21367      ;;
21368 esac
21369 # We did not find ourselves, most probably we were run as `sh COMMAND'
21370 # in which case we are not to be found in the path.
21371 if test "x$as_myself" = x; then
21372   as_myself=$0
21373 fi
21374 if test ! -f "$as_myself"; then
21375   $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
21376   { (exit 1); exit 1; }
21377 fi
21378
21379 # Work around bugs in pre-3.0 UWIN ksh.
21380 for as_var in ENV MAIL MAILPATH
21381 do ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var
21382 done
21383 PS1='$ '
21384 PS2='> '
21385 PS4='+ '
21386
21387 # NLS nuisances.
21388 LC_ALL=C
21389 export LC_ALL
21390 LANGUAGE=C
21391 export LANGUAGE
21392
21393 # Required to use basename.
21394 if expr a : '\(a\)' >/dev/null 2>&1 &&
21395    test "X`expr 00001 : '.*\(...\)'`" = X001; then
21396   as_expr=expr
21397 else
21398   as_expr=false
21399 fi
21400
21401 if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
21402   as_basename=basename
21403 else
21404   as_basename=false
21405 fi
21406
21407
21408 # Name of the executable.
21409 as_me=`$as_basename -- "$0" ||
21410 $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
21411          X"$0" : 'X\(//\)$' \| \
21412          X"$0" : 'X\(/\)' \| . 2>/dev/null ||
21413 $as_echo X/"$0" |
21414     sed '/^.*\/\([^/][^/]*\)\/*$/{
21415             s//\1/
21416             q
21417           }
21418           /^X\/\(\/\/\)$/{
21419             s//\1/
21420             q
21421           }
21422           /^X\/\(\/\).*/{
21423             s//\1/
21424             q
21425           }
21426           s/.*/./; q'`
21427
21428 # CDPATH.
21429 $as_unset CDPATH
21430
21431
21432
21433   as_lineno_1=$LINENO
21434   as_lineno_2=$LINENO
21435   test "x$as_lineno_1" != "x$as_lineno_2" &&
21436   test "x`expr $as_lineno_1 + 1`" = "x$as_lineno_2" || {
21437
21438   # Create $as_me.lineno as a copy of $as_myself, but with $LINENO
21439   # uniformly replaced by the line number.  The first 'sed' inserts a
21440   # line-number line after each line using $LINENO; the second 'sed'
21441   # does the real work.  The second script uses 'N' to pair each
21442   # line-number line with the line containing $LINENO, and appends
21443   # trailing '-' during substitution so that $LINENO is not a special
21444   # case at line end.
21445   # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the
21446   # scripts with optimization help from Paolo Bonzini.  Blame Lee
21447   # E. McMahon (1931-1989) for sed's syntax.  :-)
21448   sed -n '
21449     p
21450     /[$]LINENO/=
21451   ' <$as_myself |
21452     sed '
21453       s/[$]LINENO.*/&-/
21454       t lineno
21455       b
21456       :lineno
21457       N
21458       :loop
21459       s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/
21460       t loop
21461       s/-\n.*//
21462     ' >$as_me.lineno &&
21463   chmod +x "$as_me.lineno" ||
21464     { $as_echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2
21465    { (exit 1); exit 1; }; }
21466
21467   # Don't try to exec as it changes $[0], causing all sort of problems
21468   # (the dirname of $[0] is not the place where we might find the
21469   # original and so on.  Autoconf is especially sensitive to this).
21470   . "./$as_me.lineno"
21471   # Exit status is that of the last command.
21472   exit
21473 }
21474
21475
21476 if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
21477   as_dirname=dirname
21478 else
21479   as_dirname=false
21480 fi
21481
21482 ECHO_C= ECHO_N= ECHO_T=
21483 case `echo -n x` in
21484 -n*)
21485   case `echo 'x\c'` in
21486   *c*) ECHO_T=' ';;     # ECHO_T is single tab character.
21487   *)   ECHO_C='\c';;
21488   esac;;
21489 *)
21490   ECHO_N='-n';;
21491 esac
21492 if expr a : '\(a\)' >/dev/null 2>&1 &&
21493    test "X`expr 00001 : '.*\(...\)'`" = X001; then
21494   as_expr=expr
21495 else
21496   as_expr=false
21497 fi
21498
21499 rm -f conf$$ conf$$.exe conf$$.file
21500 if test -d conf$$.dir; then
21501   rm -f conf$$.dir/conf$$.file
21502 else
21503   rm -f conf$$.dir
21504   mkdir conf$$.dir 2>/dev/null
21505 fi
21506 if (echo >conf$$.file) 2>/dev/null; then
21507   if ln -s conf$$.file conf$$ 2>/dev/null; then
21508     as_ln_s='ln -s'
21509     # ... but there are two gotchas:
21510     # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
21511     # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
21512     # In both cases, we have to default to `cp -p'.
21513     ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
21514       as_ln_s='cp -p'
21515   elif ln conf$$.file conf$$ 2>/dev/null; then
21516     as_ln_s=ln
21517   else
21518     as_ln_s='cp -p'
21519   fi
21520 else
21521   as_ln_s='cp -p'
21522 fi
21523 rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
21524 rmdir conf$$.dir 2>/dev/null
21525
21526 if mkdir -p . 2>/dev/null; then
21527   as_mkdir_p=:
21528 else
21529   test -d ./-p && rmdir ./-p
21530   as_mkdir_p=false
21531 fi
21532
21533 if test -x / >/dev/null 2>&1; then
21534   as_test_x='test -x'
21535 else
21536   if ls -dL / >/dev/null 2>&1; then
21537     as_ls_L_option=L
21538   else
21539     as_ls_L_option=
21540   fi
21541   as_test_x='
21542     eval sh -c '\''
21543       if test -d "$1"; then
21544         test -d "$1/.";
21545       else
21546         case $1 in
21547         -*)set "./$1";;
21548         esac;
21549         case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in
21550         ???[sx]*):;;*)false;;esac;fi
21551     '\'' sh
21552   '
21553 fi
21554 as_executable_p=$as_test_x
21555
21556 # Sed expression to map a string onto a valid CPP name.
21557 as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
21558
21559 # Sed expression to map a string onto a valid variable name.
21560 as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
21561
21562
21563 exec 6>&1
21564
21565 # Save the log message, to keep $[0] and so on meaningful, and to
21566 # report actual input values of CONFIG_FILES etc. instead of their
21567 # values after options handling.
21568 ac_log="
21569 This file was extended by $as_me, which was
21570 generated by GNU Autoconf 2.63.  Invocation command line was
21571
21572   CONFIG_FILES    = $CONFIG_FILES
21573   CONFIG_HEADERS  = $CONFIG_HEADERS
21574   CONFIG_LINKS    = $CONFIG_LINKS
21575   CONFIG_COMMANDS = $CONFIG_COMMANDS
21576   $ $0 $@
21577
21578 on `(hostname || uname -n) 2>/dev/null | sed 1q`
21579 "
21580
21581 _ACEOF
21582
21583 case $ac_config_files in *"
21584 "*) set x $ac_config_files; shift; ac_config_files=$*;;
21585 esac
21586
21587 case $ac_config_headers in *"
21588 "*) set x $ac_config_headers; shift; ac_config_headers=$*;;
21589 esac
21590
21591
21592 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
21593 # Files that config.status was made for.
21594 config_files="$ac_config_files"
21595 config_headers="$ac_config_headers"
21596 config_commands="$ac_config_commands"
21597
21598 _ACEOF
21599
21600 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
21601 ac_cs_usage="\
21602 \`$as_me' instantiates files from templates according to the
21603 current configuration.
21604
21605 Usage: $0 [OPTION]... [FILE]...
21606
21607   -h, --help       print this help, then exit
21608   -V, --version    print version number and configuration settings, then exit
21609   -q, --quiet, --silent
21610                    do not print progress messages
21611   -d, --debug      don't remove temporary files
21612       --recheck    update $as_me by reconfiguring in the same conditions
21613       --file=FILE[:TEMPLATE]
21614                    instantiate the configuration file FILE
21615       --header=FILE[:TEMPLATE]
21616                    instantiate the configuration header FILE
21617
21618 Configuration files:
21619 $config_files
21620
21621 Configuration headers:
21622 $config_headers
21623
21624 Configuration commands:
21625 $config_commands
21626
21627 Report bugs to <bug-autoconf@gnu.org>."
21628
21629 _ACEOF
21630 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
21631 ac_cs_version="\\
21632 config.status
21633 configured by $0, generated by GNU Autoconf 2.63,
21634   with options \\"`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`\\"
21635
21636 Copyright (C) 2008 Free Software Foundation, Inc.
21637 This config.status script is free software; the Free Software Foundation
21638 gives unlimited permission to copy, distribute and modify it."
21639
21640 ac_pwd='$ac_pwd'
21641 srcdir='$srcdir'
21642 INSTALL='$INSTALL'
21643 test -n "\$AWK" || AWK=awk
21644 _ACEOF
21645
21646 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
21647 # The default lists apply if the user does not specify any file.
21648 ac_need_defaults=:
21649 while test $# != 0
21650 do
21651   case $1 in
21652   --*=*)
21653     ac_option=`expr "X$1" : 'X\([^=]*\)='`
21654     ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
21655     ac_shift=:
21656     ;;
21657   *)
21658     ac_option=$1
21659     ac_optarg=$2
21660     ac_shift=shift
21661     ;;
21662   esac
21663
21664   case $ac_option in
21665   # Handling of the options.
21666   -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
21667     ac_cs_recheck=: ;;
21668   --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
21669     $as_echo "$ac_cs_version"; exit ;;
21670   --debug | --debu | --deb | --de | --d | -d )
21671     debug=: ;;
21672   --file | --fil | --fi | --f )
21673     $ac_shift
21674     case $ac_optarg in
21675     *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
21676     esac
21677     CONFIG_FILES="$CONFIG_FILES '$ac_optarg'"
21678     ac_need_defaults=false;;
21679   --header | --heade | --head | --hea )
21680     $ac_shift
21681     case $ac_optarg in
21682     *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
21683     esac
21684     CONFIG_HEADERS="$CONFIG_HEADERS '$ac_optarg'"
21685     ac_need_defaults=false;;
21686   --he | --h)
21687     # Conflict between --help and --header
21688     { $as_echo "$as_me: error: ambiguous option: $1
21689 Try \`$0 --help' for more information." >&2
21690    { (exit 1); exit 1; }; };;
21691   --help | --hel | -h )
21692     $as_echo "$ac_cs_usage"; exit ;;
21693   -q | -quiet | --quiet | --quie | --qui | --qu | --q \
21694   | -silent | --silent | --silen | --sile | --sil | --si | --s)
21695     ac_cs_silent=: ;;
21696
21697   # This is an error.
21698   -*) { $as_echo "$as_me: error: unrecognized option: $1
21699 Try \`$0 --help' for more information." >&2
21700    { (exit 1); exit 1; }; } ;;
21701
21702   *) ac_config_targets="$ac_config_targets $1"
21703      ac_need_defaults=false ;;
21704
21705   esac
21706   shift
21707 done
21708
21709 ac_configure_extra_args=
21710
21711 if $ac_cs_silent; then
21712   exec 6>/dev/null
21713   ac_configure_extra_args="$ac_configure_extra_args --silent"
21714 fi
21715
21716 _ACEOF
21717 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
21718 if \$ac_cs_recheck; then
21719   set X '$SHELL' '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
21720   shift
21721   \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6
21722   CONFIG_SHELL='$SHELL'
21723   export CONFIG_SHELL
21724   exec "\$@"
21725 fi
21726
21727 _ACEOF
21728 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
21729 exec 5>>config.log
21730 {
21731   echo
21732   sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
21733 ## Running $as_me. ##
21734 _ASBOX
21735   $as_echo "$ac_log"
21736 } >&5
21737
21738 _ACEOF
21739 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
21740 #
21741 # INIT-COMMANDS
21742 #
21743 INTLTOOL_PERL=${INTLTOOL_PERL}
21744
21745
21746 _ACEOF
21747
21748 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
21749
21750 # Handling of arguments.
21751 for ac_config_target in $ac_config_targets
21752 do
21753   case $ac_config_target in
21754     "config.h") CONFIG_HEADERS="$CONFIG_HEADERS config.h" ;;
21755     "default-1") CONFIG_COMMANDS="$CONFIG_COMMANDS default-1" ;;
21756     "default-2") CONFIG_COMMANDS="$CONFIG_COMMANDS default-2" ;;
21757     "Makefile") CONFIG_FILES="$CONFIG_FILES Makefile" ;;
21758     "utils/Makefile") CONFIG_FILES="$CONFIG_FILES utils/Makefile" ;;
21759     "driver/Makefile") CONFIG_FILES="$CONFIG_FILES driver/Makefile" ;;
21760     "hacks/Makefile") CONFIG_FILES="$CONFIG_FILES hacks/Makefile" ;;
21761     "hacks/glx/Makefile") CONFIG_FILES="$CONFIG_FILES hacks/glx/Makefile" ;;
21762     "po/Makefile.in") CONFIG_FILES="$CONFIG_FILES po/Makefile.in" ;;
21763     "driver/XScreenSaver.ad") CONFIG_FILES="$CONFIG_FILES driver/XScreenSaver.ad" ;;
21764
21765   *) { { $as_echo "$as_me:$LINENO: error: invalid argument: $ac_config_target" >&5
21766 $as_echo "$as_me: error: invalid argument: $ac_config_target" >&2;}
21767    { (exit 1); exit 1; }; };;
21768   esac
21769 done
21770
21771
21772 # If the user did not use the arguments to specify the items to instantiate,
21773 # then the envvar interface is used.  Set only those that are not.
21774 # We use the long form for the default assignment because of an extremely
21775 # bizarre bug on SunOS 4.1.3.
21776 if $ac_need_defaults; then
21777   test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
21778   test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
21779   test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands
21780 fi
21781
21782 # Have a temporary directory for convenience.  Make it in the build tree
21783 # simply because there is no reason against having it here, and in addition,
21784 # creating and moving files from /tmp can sometimes cause problems.
21785 # Hook for its removal unless debugging.
21786 # Note that there is a small window in which the directory will not be cleaned:
21787 # after its creation but before its name has been assigned to `$tmp'.
21788 $debug ||
21789 {
21790   tmp=
21791   trap 'exit_status=$?
21792   { test -z "$tmp" || test ! -d "$tmp" || rm -fr "$tmp"; } && exit $exit_status
21793 ' 0
21794   trap '{ (exit 1); exit 1; }' 1 2 13 15
21795 }
21796 # Create a (secure) tmp directory for tmp files.
21797
21798 {
21799   tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
21800   test -n "$tmp" && test -d "$tmp"
21801 }  ||
21802 {
21803   tmp=./conf$$-$RANDOM
21804   (umask 077 && mkdir "$tmp")
21805 } ||
21806 {
21807    $as_echo "$as_me: cannot create a temporary directory in ." >&2
21808    { (exit 1); exit 1; }
21809 }
21810
21811 # Set up the scripts for CONFIG_FILES section.
21812 # No need to generate them if there are no CONFIG_FILES.
21813 # This happens for instance with `./config.status config.h'.
21814 if test -n "$CONFIG_FILES"; then
21815
21816
21817 ac_cr='\r'
21818 ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null`
21819 if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then
21820   ac_cs_awk_cr='\\r'
21821 else
21822   ac_cs_awk_cr=$ac_cr
21823 fi
21824
21825 echo 'BEGIN {' >"$tmp/subs1.awk" &&
21826 _ACEOF
21827
21828
21829 {
21830   echo "cat >conf$$subs.awk <<_ACEOF" &&
21831   echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' &&
21832   echo "_ACEOF"
21833 } >conf$$subs.sh ||
21834   { { $as_echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5
21835 $as_echo "$as_me: error: could not make $CONFIG_STATUS" >&2;}
21836    { (exit 1); exit 1; }; }
21837 ac_delim_num=`echo "$ac_subst_vars" | grep -c '$'`
21838 ac_delim='%!_!# '
21839 for ac_last_try in false false false false false :; do
21840   . ./conf$$subs.sh ||
21841     { { $as_echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5
21842 $as_echo "$as_me: error: could not make $CONFIG_STATUS" >&2;}
21843    { (exit 1); exit 1; }; }
21844
21845   ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X`
21846   if test $ac_delim_n = $ac_delim_num; then
21847     break
21848   elif $ac_last_try; then
21849     { { $as_echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5
21850 $as_echo "$as_me: error: could not make $CONFIG_STATUS" >&2;}
21851    { (exit 1); exit 1; }; }
21852   else
21853     ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
21854   fi
21855 done
21856 rm -f conf$$subs.sh
21857
21858 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
21859 cat >>"\$tmp/subs1.awk" <<\\_ACAWK &&
21860 _ACEOF
21861 sed -n '
21862 h
21863 s/^/S["/; s/!.*/"]=/
21864 p
21865 g
21866 s/^[^!]*!//
21867 :repl
21868 t repl
21869 s/'"$ac_delim"'$//
21870 t delim
21871 :nl
21872 h
21873 s/\(.\{148\}\).*/\1/
21874 t more1
21875 s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/
21876 p
21877 n
21878 b repl
21879 :more1
21880 s/["\\]/\\&/g; s/^/"/; s/$/"\\/
21881 p
21882 g
21883 s/.\{148\}//
21884 t nl
21885 :delim
21886 h
21887 s/\(.\{148\}\).*/\1/
21888 t more2
21889 s/["\\]/\\&/g; s/^/"/; s/$/"/
21890 p
21891 b
21892 :more2
21893 s/["\\]/\\&/g; s/^/"/; s/$/"\\/
21894 p
21895 g
21896 s/.\{148\}//
21897 t delim
21898 ' <conf$$subs.awk | sed '
21899 /^[^""]/{
21900   N
21901   s/\n//
21902 }
21903 ' >>$CONFIG_STATUS || ac_write_fail=1
21904 rm -f conf$$subs.awk
21905 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
21906 _ACAWK
21907 cat >>"\$tmp/subs1.awk" <<_ACAWK &&
21908   for (key in S) S_is_set[key] = 1
21909   FS = "\a"
21910
21911 }
21912 {
21913   line = $ 0
21914   nfields = split(line, field, "@")
21915   substed = 0
21916   len = length(field[1])
21917   for (i = 2; i < nfields; i++) {
21918     key = field[i]
21919     keylen = length(key)
21920     if (S_is_set[key]) {
21921       value = S[key]
21922       line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3)
21923       len += length(value) + length(field[++i])
21924       substed = 1
21925     } else
21926       len += 1 + keylen
21927   }
21928
21929   print line
21930 }
21931
21932 _ACAWK
21933 _ACEOF
21934 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
21935 if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then
21936   sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g"
21937 else
21938   cat
21939 fi < "$tmp/subs1.awk" > "$tmp/subs.awk" \
21940   || { { $as_echo "$as_me:$LINENO: error: could not setup config files machinery" >&5
21941 $as_echo "$as_me: error: could not setup config files machinery" >&2;}
21942    { (exit 1); exit 1; }; }
21943 _ACEOF
21944
21945 # VPATH may cause trouble with some makes, so we remove $(srcdir),
21946 # ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and
21947 # trailing colons and then remove the whole line if VPATH becomes empty
21948 # (actually we leave an empty line to preserve line numbers).
21949 if test "x$srcdir" = x.; then
21950   ac_vpsub='/^[  ]*VPATH[        ]*=/{
21951 s/:*\$(srcdir):*/:/
21952 s/:*\${srcdir}:*/:/
21953 s/:*@srcdir@:*/:/
21954 s/^\([^=]*=[     ]*\):*/\1/
21955 s/:*$//
21956 s/^[^=]*=[       ]*$//
21957 }'
21958 fi
21959
21960 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
21961 fi # test -n "$CONFIG_FILES"
21962
21963 # Set up the scripts for CONFIG_HEADERS section.
21964 # No need to generate them if there are no CONFIG_HEADERS.
21965 # This happens for instance with `./config.status Makefile'.
21966 if test -n "$CONFIG_HEADERS"; then
21967 cat >"$tmp/defines.awk" <<\_ACAWK ||
21968 BEGIN {
21969 _ACEOF
21970
21971 # Transform confdefs.h into an awk script `defines.awk', embedded as
21972 # here-document in config.status, that substitutes the proper values into
21973 # config.h.in to produce config.h.
21974
21975 # Create a delimiter string that does not exist in confdefs.h, to ease
21976 # handling of long lines.
21977 ac_delim='%!_!# '
21978 for ac_last_try in false false :; do
21979   ac_t=`sed -n "/$ac_delim/p" confdefs.h`
21980   if test -z "$ac_t"; then
21981     break
21982   elif $ac_last_try; then
21983     { { $as_echo "$as_me:$LINENO: error: could not make $CONFIG_HEADERS" >&5
21984 $as_echo "$as_me: error: could not make $CONFIG_HEADERS" >&2;}
21985    { (exit 1); exit 1; }; }
21986   else
21987     ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
21988   fi
21989 done
21990
21991 # For the awk script, D is an array of macro values keyed by name,
21992 # likewise P contains macro parameters if any.  Preserve backslash
21993 # newline sequences.
21994
21995 ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]*
21996 sed -n '
21997 s/.\{148\}/&'"$ac_delim"'/g
21998 t rset
21999 :rset
22000 s/^[     ]*#[    ]*define[       ][      ]*/ /
22001 t def
22002 d
22003 :def
22004 s/\\$//
22005 t bsnl
22006 s/["\\]/\\&/g
22007 s/^ \('"$ac_word_re"'\)\(([^()]*)\)[     ]*\(.*\)/P["\1"]="\2"\
22008 D["\1"]=" \3"/p
22009 s/^ \('"$ac_word_re"'\)[         ]*\(.*\)/D["\1"]=" \2"/p
22010 d
22011 :bsnl
22012 s/["\\]/\\&/g
22013 s/^ \('"$ac_word_re"'\)\(([^()]*)\)[     ]*\(.*\)/P["\1"]="\2"\
22014 D["\1"]=" \3\\\\\\n"\\/p
22015 t cont
22016 s/^ \('"$ac_word_re"'\)[         ]*\(.*\)/D["\1"]=" \2\\\\\\n"\\/p
22017 t cont
22018 d
22019 :cont
22020 n
22021 s/.\{148\}/&'"$ac_delim"'/g
22022 t clear
22023 :clear
22024 s/\\$//
22025 t bsnlc
22026 s/["\\]/\\&/g; s/^/"/; s/$/"/p
22027 d
22028 :bsnlc
22029 s/["\\]/\\&/g; s/^/"/; s/$/\\\\\\n"\\/p
22030 b cont
22031 ' <confdefs.h | sed '
22032 s/'"$ac_delim"'/"\\\
22033 "/g' >>$CONFIG_STATUS || ac_write_fail=1
22034
22035 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
22036   for (key in D) D_is_set[key] = 1
22037   FS = "\a"
22038 }
22039 /^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\$)/ {
22040   line = \$ 0
22041   split(line, arg, " ")
22042   if (arg[1] == "#") {
22043     defundef = arg[2]
22044     mac1 = arg[3]
22045   } else {
22046     defundef = substr(arg[1], 2)
22047     mac1 = arg[2]
22048   }
22049   split(mac1, mac2, "(") #)
22050   macro = mac2[1]
22051   prefix = substr(line, 1, index(line, defundef) - 1)
22052   if (D_is_set[macro]) {
22053     # Preserve the white space surrounding the "#".
22054     print prefix "define", macro P[macro] D[macro]
22055     next
22056   } else {
22057     # Replace #undef with comments.  This is necessary, for example,
22058     # in the case of _POSIX_SOURCE, which is predefined and required
22059     # on some systems where configure will not decide to define it.
22060     if (defundef == "undef") {
22061       print "/*", prefix defundef, macro, "*/"
22062       next
22063     }
22064   }
22065 }
22066 { print }
22067 _ACAWK
22068 _ACEOF
22069 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
22070   { { $as_echo "$as_me:$LINENO: error: could not setup config headers machinery" >&5
22071 $as_echo "$as_me: error: could not setup config headers machinery" >&2;}
22072    { (exit 1); exit 1; }; }
22073 fi # test -n "$CONFIG_HEADERS"
22074
22075
22076 eval set X "  :F $CONFIG_FILES  :H $CONFIG_HEADERS    :C $CONFIG_COMMANDS"
22077 shift
22078 for ac_tag
22079 do
22080   case $ac_tag in
22081   :[FHLC]) ac_mode=$ac_tag; continue;;
22082   esac
22083   case $ac_mode$ac_tag in
22084   :[FHL]*:*);;
22085   :L* | :C*:*) { { $as_echo "$as_me:$LINENO: error: invalid tag $ac_tag" >&5
22086 $as_echo "$as_me: error: invalid tag $ac_tag" >&2;}
22087    { (exit 1); exit 1; }; };;
22088   :[FH]-) ac_tag=-:-;;
22089   :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
22090   esac
22091   ac_save_IFS=$IFS
22092   IFS=:
22093   set x $ac_tag
22094   IFS=$ac_save_IFS
22095   shift
22096   ac_file=$1
22097   shift
22098
22099   case $ac_mode in
22100   :L) ac_source=$1;;
22101   :[FH])
22102     ac_file_inputs=
22103     for ac_f
22104     do
22105       case $ac_f in
22106       -) ac_f="$tmp/stdin";;
22107       *) # Look for the file first in the build tree, then in the source tree
22108          # (if the path is not absolute).  The absolute path cannot be DOS-style,
22109          # because $ac_f cannot contain `:'.
22110          test -f "$ac_f" ||
22111            case $ac_f in
22112            [\\/$]*) false;;
22113            *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
22114            esac ||
22115            { { $as_echo "$as_me:$LINENO: error: cannot find input file: $ac_f" >&5
22116 $as_echo "$as_me: error: cannot find input file: $ac_f" >&2;}
22117    { (exit 1); exit 1; }; };;
22118       esac
22119       case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
22120       ac_file_inputs="$ac_file_inputs '$ac_f'"
22121     done
22122
22123     # Let's still pretend it is `configure' which instantiates (i.e., don't
22124     # use $as_me), people would be surprised to read:
22125     #    /* config.h.  Generated by config.status.  */
22126     configure_input='Generated from '`
22127           $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g'
22128         `' by configure.'
22129     if test x"$ac_file" != x-; then
22130       configure_input="$ac_file.  $configure_input"
22131       { $as_echo "$as_me:$LINENO: creating $ac_file" >&5
22132 $as_echo "$as_me: creating $ac_file" >&6;}
22133     fi
22134     # Neutralize special characters interpreted by sed in replacement strings.
22135     case $configure_input in #(
22136     *\&* | *\|* | *\\* )
22137        ac_sed_conf_input=`$as_echo "$configure_input" |
22138        sed 's/[\\\\&|]/\\\\&/g'`;; #(
22139     *) ac_sed_conf_input=$configure_input;;
22140     esac
22141
22142     case $ac_tag in
22143     *:-:* | *:-) cat >"$tmp/stdin" \
22144       || { { $as_echo "$as_me:$LINENO: error: could not create $ac_file" >&5
22145 $as_echo "$as_me: error: could not create $ac_file" >&2;}
22146    { (exit 1); exit 1; }; } ;;
22147     esac
22148     ;;
22149   esac
22150
22151   ac_dir=`$as_dirname -- "$ac_file" ||
22152 $as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
22153          X"$ac_file" : 'X\(//\)[^/]' \| \
22154          X"$ac_file" : 'X\(//\)$' \| \
22155          X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
22156 $as_echo X"$ac_file" |
22157     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
22158             s//\1/
22159             q
22160           }
22161           /^X\(\/\/\)[^/].*/{
22162             s//\1/
22163             q
22164           }
22165           /^X\(\/\/\)$/{
22166             s//\1/
22167             q
22168           }
22169           /^X\(\/\).*/{
22170             s//\1/
22171             q
22172           }
22173           s/.*/./; q'`
22174   { as_dir="$ac_dir"
22175   case $as_dir in #(
22176   -*) as_dir=./$as_dir;;
22177   esac
22178   test -d "$as_dir" || { $as_mkdir_p && mkdir -p "$as_dir"; } || {
22179     as_dirs=
22180     while :; do
22181       case $as_dir in #(
22182       *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
22183       *) as_qdir=$as_dir;;
22184       esac
22185       as_dirs="'$as_qdir' $as_dirs"
22186       as_dir=`$as_dirname -- "$as_dir" ||
22187 $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
22188          X"$as_dir" : 'X\(//\)[^/]' \| \
22189          X"$as_dir" : 'X\(//\)$' \| \
22190          X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
22191 $as_echo X"$as_dir" |
22192     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
22193             s//\1/
22194             q
22195           }
22196           /^X\(\/\/\)[^/].*/{
22197             s//\1/
22198             q
22199           }
22200           /^X\(\/\/\)$/{
22201             s//\1/
22202             q
22203           }
22204           /^X\(\/\).*/{
22205             s//\1/
22206             q
22207           }
22208           s/.*/./; q'`
22209       test -d "$as_dir" && break
22210     done
22211     test -z "$as_dirs" || eval "mkdir $as_dirs"
22212   } || test -d "$as_dir" || { { $as_echo "$as_me:$LINENO: error: cannot create directory $as_dir" >&5
22213 $as_echo "$as_me: error: cannot create directory $as_dir" >&2;}
22214    { (exit 1); exit 1; }; }; }
22215   ac_builddir=.
22216
22217 case "$ac_dir" in
22218 .) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
22219 *)
22220   ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
22221   # A ".." for each directory in $ac_dir_suffix.
22222   ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
22223   case $ac_top_builddir_sub in
22224   "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
22225   *)  ac_top_build_prefix=$ac_top_builddir_sub/ ;;
22226   esac ;;
22227 esac
22228 ac_abs_top_builddir=$ac_pwd
22229 ac_abs_builddir=$ac_pwd$ac_dir_suffix
22230 # for backward compatibility:
22231 ac_top_builddir=$ac_top_build_prefix
22232
22233 case $srcdir in
22234   .)  # We are building in place.
22235     ac_srcdir=.
22236     ac_top_srcdir=$ac_top_builddir_sub
22237     ac_abs_top_srcdir=$ac_pwd ;;
22238   [\\/]* | ?:[\\/]* )  # Absolute name.
22239     ac_srcdir=$srcdir$ac_dir_suffix;
22240     ac_top_srcdir=$srcdir
22241     ac_abs_top_srcdir=$srcdir ;;
22242   *) # Relative name.
22243     ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
22244     ac_top_srcdir=$ac_top_build_prefix$srcdir
22245     ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
22246 esac
22247 ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
22248
22249
22250   case $ac_mode in
22251   :F)
22252   #
22253   # CONFIG_FILE
22254   #
22255
22256   case $INSTALL in
22257   [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
22258   *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;;
22259   esac
22260 _ACEOF
22261
22262 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
22263 # If the template does not know about datarootdir, expand it.
22264 # FIXME: This hack should be removed a few years after 2.60.
22265 ac_datarootdir_hack=; ac_datarootdir_seen=
22266
22267 ac_sed_dataroot='
22268 /datarootdir/ {
22269   p
22270   q
22271 }
22272 /@datadir@/p
22273 /@docdir@/p
22274 /@infodir@/p
22275 /@localedir@/p
22276 /@mandir@/p
22277 '
22278 case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in
22279 *datarootdir*) ac_datarootdir_seen=yes;;
22280 *@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
22281   { $as_echo "$as_me:$LINENO: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
22282 $as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
22283 _ACEOF
22284 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
22285   ac_datarootdir_hack='
22286   s&@datadir@&$datadir&g
22287   s&@docdir@&$docdir&g
22288   s&@infodir@&$infodir&g
22289   s&@localedir@&$localedir&g
22290   s&@mandir@&$mandir&g
22291     s&\\\${datarootdir}&$datarootdir&g' ;;
22292 esac
22293 _ACEOF
22294
22295 # Neutralize VPATH when `$srcdir' = `.'.
22296 # Shell code in configure.ac might set extrasub.
22297 # FIXME: do we really want to maintain this feature?
22298 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
22299 ac_sed_extra="$ac_vpsub
22300 $extrasub
22301 _ACEOF
22302 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
22303 :t
22304 /@[a-zA-Z_][a-zA-Z_0-9]*@/!b
22305 s|@configure_input@|$ac_sed_conf_input|;t t
22306 s&@top_builddir@&$ac_top_builddir_sub&;t t
22307 s&@top_build_prefix@&$ac_top_build_prefix&;t t
22308 s&@srcdir@&$ac_srcdir&;t t
22309 s&@abs_srcdir@&$ac_abs_srcdir&;t t
22310 s&@top_srcdir@&$ac_top_srcdir&;t t
22311 s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
22312 s&@builddir@&$ac_builddir&;t t
22313 s&@abs_builddir@&$ac_abs_builddir&;t t
22314 s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
22315 s&@INSTALL@&$ac_INSTALL&;t t
22316 $ac_datarootdir_hack
22317 "
22318 eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$tmp/subs.awk" >$tmp/out \
22319   || { { $as_echo "$as_me:$LINENO: error: could not create $ac_file" >&5
22320 $as_echo "$as_me: error: could not create $ac_file" >&2;}
22321    { (exit 1); exit 1; }; }
22322
22323 test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
22324   { ac_out=`sed -n '/\${datarootdir}/p' "$tmp/out"`; test -n "$ac_out"; } &&
22325   { ac_out=`sed -n '/^[  ]*datarootdir[  ]*:*=/p' "$tmp/out"`; test -z "$ac_out"; } &&
22326   { $as_echo "$as_me:$LINENO: WARNING: $ac_file contains a reference to the variable \`datarootdir'
22327 which seems to be undefined.  Please make sure it is defined." >&5
22328 $as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
22329 which seems to be undefined.  Please make sure it is defined." >&2;}
22330
22331   rm -f "$tmp/stdin"
22332   case $ac_file in
22333   -) cat "$tmp/out" && rm -f "$tmp/out";;
22334   *) rm -f "$ac_file" && mv "$tmp/out" "$ac_file";;
22335   esac \
22336   || { { $as_echo "$as_me:$LINENO: error: could not create $ac_file" >&5
22337 $as_echo "$as_me: error: could not create $ac_file" >&2;}
22338    { (exit 1); exit 1; }; }
22339  ;;
22340   :H)
22341   #
22342   # CONFIG_HEADER
22343   #
22344   if test x"$ac_file" != x-; then
22345     {
22346       $as_echo "/* $configure_input  */" \
22347       && eval '$AWK -f "$tmp/defines.awk"' "$ac_file_inputs"
22348     } >"$tmp/config.h" \
22349       || { { $as_echo "$as_me:$LINENO: error: could not create $ac_file" >&5
22350 $as_echo "$as_me: error: could not create $ac_file" >&2;}
22351    { (exit 1); exit 1; }; }
22352     if diff "$ac_file" "$tmp/config.h" >/dev/null 2>&1; then
22353       { $as_echo "$as_me:$LINENO: $ac_file is unchanged" >&5
22354 $as_echo "$as_me: $ac_file is unchanged" >&6;}
22355     else
22356       rm -f "$ac_file"
22357       mv "$tmp/config.h" "$ac_file" \
22358         || { { $as_echo "$as_me:$LINENO: error: could not create $ac_file" >&5
22359 $as_echo "$as_me: error: could not create $ac_file" >&2;}
22360    { (exit 1); exit 1; }; }
22361     fi
22362   else
22363     $as_echo "/* $configure_input  */" \
22364       && eval '$AWK -f "$tmp/defines.awk"' "$ac_file_inputs" \
22365       || { { $as_echo "$as_me:$LINENO: error: could not create -" >&5
22366 $as_echo "$as_me: error: could not create -" >&2;}
22367    { (exit 1); exit 1; }; }
22368   fi
22369  ;;
22370
22371   :C)  { $as_echo "$as_me:$LINENO: executing $ac_file commands" >&5
22372 $as_echo "$as_me: executing $ac_file commands" >&6;}
22373  ;;
22374   esac
22375
22376
22377   case $ac_file$ac_mode in
22378     "default-1":C)
22379
22380 sed -e "s:@INTLTOOL_PERL@:${INTLTOOL_PERL}:;" < ${srcdir}/intltool-extract.in > intltool-extract.out
22381 if cmp -s intltool-extract intltool-extract.out 2>/dev/null; then
22382   rm -f intltool-extract.out
22383 else
22384   mv -f intltool-extract.out intltool-extract
22385 fi
22386 chmod ugo+x intltool-extract
22387 chmod u+w intltool-extract
22388
22389 sed -e "s:@INTLTOOL_PERL@:${INTLTOOL_PERL}:;" < ${srcdir}/intltool-merge.in > intltool-merge.out
22390 if cmp -s intltool-merge intltool-merge.out 2>/dev/null; then
22391   rm -f intltool-merge.out
22392 else
22393   mv -f intltool-merge.out intltool-merge
22394 fi
22395 chmod ugo+x intltool-merge
22396 chmod u+w intltool-merge
22397
22398 sed -e "s:@INTLTOOL_PERL@:${INTLTOOL_PERL}:;" < ${srcdir}/intltool-update.in > intltool-update.out
22399 if cmp -s intltool-update intltool-update.out 2>/dev/null; then
22400   rm -f intltool-update.out
22401 else
22402   mv -f intltool-update.out intltool-update
22403 fi
22404 chmod ugo+x intltool-update
22405 chmod u+w intltool-update
22406
22407  ;;
22408     "default-2":C) case "$CONFIG_FILES" in *po/Makefile.in*)
22409         rm -f po/stamp-it po/stamp-it.tmp
22410         > po/stamp-it.tmp
22411         sed -e "/POTFILES =/r po/POTFILES" po/Makefile.in > po/Makefile
22412         mv po/stamp-it.tmp po/stamp-it
22413       esac ;;
22414
22415   esac
22416 done # for ac_tag
22417
22418
22419 { (exit 0); exit 0; }
22420 _ACEOF
22421 chmod +x $CONFIG_STATUS
22422 ac_clean_files=$ac_clean_files_save
22423
22424 test $ac_write_fail = 0 ||
22425   { { $as_echo "$as_me:$LINENO: error: write failure creating $CONFIG_STATUS" >&5
22426 $as_echo "$as_me: error: write failure creating $CONFIG_STATUS" >&2;}
22427    { (exit 1); exit 1; }; }
22428
22429
22430 # configure is writing to config.log, and then calls config.status.
22431 # config.status does its own redirection, appending to config.log.
22432 # Unfortunately, on DOS this fails, as config.log is still kept open
22433 # by configure, so config.status won't be able to write to it; its
22434 # output is simply discarded.  So we exec the FD to /dev/null,
22435 # effectively closing config.log, so it can be properly (re)opened and
22436 # appended to by config.status.  When coming back to configure, we
22437 # need to make the FD available again.
22438 if test "$no_create" != yes; then
22439   ac_cs_success=:
22440   ac_config_status_args=
22441   test "$silent" = yes &&
22442     ac_config_status_args="$ac_config_status_args --quiet"
22443   exec 5>/dev/null
22444   $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
22445   exec 5>>config.log
22446   # Use ||, not &&, to avoid exiting from the if with $? = 1, which
22447   # would make configure fail if this is the last instruction.
22448   $ac_cs_success || { (exit 1); exit 1; }
22449 fi
22450 if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
22451   { $as_echo "$as_me:$LINENO: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
22452 $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}
22453 fi
22454
22455
22456 ###############################################################################
22457 #
22458 #       Print some warnings at the end.
22459 #
22460 ###############################################################################
22461
22462 warn_prefix_1="    Warning:"
22463 warn_prefix_2="       Note:"
22464 warn_prefix="$warn_prefix_1"
22465
22466 warning=no
22467 warnsep='    #################################################################'
22468
22469 warnpre() {
22470   if test "$warning" = no ; then
22471     echo '' ; echo "$warnsep" ; echo ''
22472     warning=yes
22473   fi
22474 }
22475
22476 warn() {
22477   warnpre
22478   if test "$warning" = long ; then echo '' ; fi
22479   warning=yes
22480   rest="$@"
22481   echo "$warn_prefix $rest"
22482 }
22483
22484 warnL() {
22485   was=$warning
22486   warnpre
22487   warning=yes
22488   if test "$was" != no ; then echo '' ; fi
22489   rest="$@"
22490   echo "$warn_prefix $rest"
22491 }
22492
22493 warn2() {
22494   rest="$@"
22495   echo "             $rest"
22496   warning=long
22497 }
22498
22499 note() {
22500   warn_prefix="$warn_prefix_2"
22501   warn $@
22502   warn_prefix="$warn_prefix_1"
22503 }
22504
22505 noteL() {
22506   warn_prefix="$warn_prefix_2"
22507   warnL $@
22508   warn_prefix="$warn_prefix_1"
22509 }
22510
22511
22512 if test "$with_sgi_req" = yes -a "$have_sgi" = no ; then
22513   warn 'The SGI saver extension was requested, but was not found.'
22514 fi
22515
22516 if test "$with_xidle_req" = yes -a "$have_xidle" = no ; then
22517   warn 'The XIdle extension was requested, but was not found.'
22518 fi
22519
22520 if test "$with_xshm_req" = yes -a "$have_xshm" = no ; then
22521   warn 'The XSHM extension was requested, but was not found.'
22522 fi
22523
22524 if test "$with_xdbe_req" = yes -a "$have_xdbe" = no ; then
22525   warn 'The DOUBLE-BUFFER extension was requested, but was not found.'
22526 fi
22527
22528 if test "$with_sgivc_req" = yes -a "$have_sgivc" = no ; then
22529   warn 'The SGI-VIDEO-CONTROL extension was requested, but was not found.'
22530 fi
22531
22532 if test "$with_dpms_req" = yes -a "$have_dpms" = no ; then
22533   warn 'The DPMS extension was requested, but was not found.'
22534 fi
22535
22536 if test "$with_xinerama_req" = yes -a "$have_xinerama" = no ; then
22537   warn 'The Xinerama extension was requested, but was not found.'
22538 fi
22539
22540 if test "$with_xf86vmode_req" = yes -a "$have_xf86vmode" = no ; then
22541   warn 'The XF86VMODE extension was requested, but was not found.'
22542 fi
22543
22544 if test "$with_randr_req" = yes -a "$have_randr" = no ; then
22545   warn 'The RANDR extension was requested, but was not found.'
22546 fi
22547
22548 if test "$with_proc_interrupts_req" = yes -a "$have_proc_interrupts" = no; then
22549   warn "Checking of /proc/interrupts was requested, but it's bogus."
22550 fi
22551
22552 if test "$pkg_config" = false ; then
22553   warnL 'The "pkg-config" program was not found.  Without that,'
22554   warn2 "detection of the various GTK libraries won't work."
22555 else
22556   pkgerr=`$pkg_config --list-all 2>&1 >/dev/null`
22557   if test "x$pkgerr" != "x" ; then
22558     warnL 'The "pkg-config" program produces errors.  This often causes'
22559     warn2 "detection of the various GTK libraries to malfunction."
22560     warn2 "The errors are:"
22561     echo ''
22562     echo "$pkgerr" | sed 's/^/             > /g'
22563   fi
22564 fi
22565
22566 if test "$gtk_halfassed" != no ; then
22567   warnL "GTK version $gtk_halfassed was found, but at least one supporting"
22568   warn2 "library ($gtk_halfassed_lib) was not, so GTK can't be used."
22569   warn2 "Perhaps some of the development packages are not installed?"
22570   if test "$have_gtk" = yes ; then
22571     v="$ac_gtk_version_string"
22572     warn2 "GTK $v is also installed, so it will be used instead."
22573     warn2 "Please read the above output and the \`config.log' file"
22574     warn2 "for more details."
22575   fi
22576 fi
22577
22578 motif_warn2() {
22579   warn2 'Though the Motif front-end to xscreensaver is still'
22580   warn2 'maintained, it is no longer being updated with new'
22581   warn2 'features: all new development on the xscreensaver-demo'
22582   warn2 'program is happening in the GTK version, and not in the'
22583   warn2 'Motif version.  It is recommended that you build against'
22584   warn2 'GTK instead of Motif.  See <http://www.gtk.org/>.'
22585 }
22586
22587 if test "$have_motif" = no -a "$have_gtk" = no; then
22588
22589   if test "$with_motif" = yes; then
22590     warnL "Neither the GTK nor Motif libraries were found; the"
22591     warn2 "\`xscreensaver-demo' program requires one of these."
22592     echo ''
22593     motif_warn2
22594   else
22595     warnL "The GTK libraries do not seem to be available; the"
22596     warn2 "\`xscreensaver-demo' program requires them."
22597 #   echo ''
22598 #   warn2 'You can use Motif or Lesstif instead of GTK (use the'
22599 #   warn2 "\`--with-motif' option) but that is NOT recommended."
22600 #   motif_warn2
22601   fi
22602
22603 elif test "$with_motif_req" = yes -a "$have_motif" = no ; then
22604   warnL "Use of Motif was requested, but it wasn't found;"
22605   warn2 "Gtk will be used instead."
22606
22607 elif test "$jurassic_gtk" = yes ; then
22608
22609   pref_gtk=2.0
22610
22611   v="$ac_gtk_version_string"
22612   if test "$with_gtk_req" = yes -a "$ac_gtk_version" = "unknown" ; then
22613     warnL "Use of Gtk was requested, but its version number is unknown;"
22614   elif test "$with_gtk_req" = yes ; then
22615     warnL "Use of Gtk was requested, but it is version $v;"
22616   else
22617     warnL "Gtk was found on this system, but it is version $v;"
22618   fi
22619
22620   warn2 "Gtk $pref_gtk or newer is required."
22621
22622 elif test "$with_gtk_req" = yes -a "$have_gtk" = no ; then
22623   warnL "Use of Gtk was requested, but it wasn't found."
22624 fi
22625
22626
22627 if test "$have_gtk" = yes -a "$have_gdk_pixbuf" = no ; then
22628   warn  "GTK is being used, but the GDK-Pixbuf library and/or"
22629   warn2 "headers were not found.  That can't be good.  Please"
22630   warn2 "install the GDK-Pixbuf development kit and re-configure."
22631 fi
22632
22633 if test "$have_motif" = yes -a "$have_lesstif" = yes ; then
22634
22635   preferred_lesstif=0.92
22636
22637   if test "$lesstif_version" = unknown; then
22638     warnL "Unable to determine the LessTif version number!"
22639     warn2 "Make sure you are using version $preferred_lesstif or newer."
22640     warn2 "See <http://www.lesstif.org/>."
22641
22642   elif test \! $lesstif_version -gt 82; then
22643     warnL "LessTif version $lesstif_version_string is being used."
22644     warn2 "LessTif versions 0.82 and earlier are too buggy to"
22645     warn2 "use with XScreenSaver; it is strongly recommended"
22646     warn2 "that you upgrade to at least version $preferred_lesstif!"
22647     warn2 "See <http://www.lesstif.org/>."
22648   fi
22649 fi
22650
22651
22652 if test "$have_motif" = yes -a "$have_gtk" = no ; then
22653   warn  'Motif is being used, and GTK is not.'
22654   echo  ''
22655   motif_warn2
22656 fi
22657
22658
22659 if test "$with_xpm_req" = yes -a "$have_xpm" = no; then
22660   warnL 'Use of XPM was requested, but it was not found.'
22661 fi
22662
22663 if test "$with_gdk_pixbuf_req" = yes  -a "$have_gdk_pixbuf" = no; then
22664   warnL 'Use of GDK-Pixbuf was requested, but it was not found.'
22665 fi
22666
22667 if test "$have_gdk_pixbuf" = no -o "$gdk_pixbuf_halfassed" = yes || \
22668    test "$have_gdk_pixbuf" = no -a "$have_xpm" = no ; then
22669
22670   if test "$with_gdk_pixbuf_req" = yes ; then
22671     true
22672   elif test "$with_gdk_pixbuf_req" = no ; then
22673     warnL 'The GDK-Pixbuf library is not being used.'
22674   else
22675     warnL 'The GDK-Pixbuf library was not found.'
22676   fi
22677
22678   if test "$with_xpm_req" = yes -o "$have_xpm" = yes ; then
22679     true
22680   elif test "$with_xpm_req" = no ; then
22681     warnL 'The XPM library is not being used.'
22682   else
22683     warnL 'The XPM library was not found.'
22684   fi
22685
22686   if test "$have_gdk_pixbuf" = no -a "$have_xpm" = yes ; then
22687     warn2 'The XPM library is being used instead.'
22688   fi
22689
22690   if test "$gdk_pixbuf_halfassed" = yes ; then
22691     echo ''
22692     warn2 'More specifically, we found the headers, but not the'
22693     warn2 'libraries; so either GDK-Pixbuf is half-installed on this'
22694     warn2 "system, or something else went wrong.  The \`config.log'"
22695     warn2 'file might contain some clues.'
22696   fi
22697
22698   echo ''
22699   warn2 'Some of the demos will not use images as much as they could.'
22700   warn2 'You should consider installing GDK-Pixbuf and re-running'
22701   warn2 'configure.  (GDK-Pixbuf is recommended over XPM, as it'
22702   warn2 'provides support for more image formats.)'
22703 fi
22704
22705
22706 if test "$have_jpeg" = no ; then
22707   if test "$with_jpeg_req" = yes ; then
22708     warnL 'Use of libjpeg was requested, but it was not found.'
22709   elif test "$with_jpeg_req" = no ; then
22710     noteL 'The JPEG library is not being used.'
22711   else
22712     noteL 'The JPEG library was not found.'
22713   fi
22714
22715   if test "$jpeg_halfassed" = yes ; then
22716     echo ''
22717     warn2 'More specifically, we found the headers, but not the'
22718     warn2 'library; so either JPEG is half-installed on this'
22719     warn2 "system, or something else went wrong.  The \`config.log'"
22720     warn2 'file might contain some clues.'
22721     echo ''
22722   fi
22723
22724   if test "$have_gdk_pixbuf" = no ; then
22725     warn2 "This means that it won't be possible for the image-manipulating"
22726     warn2 "display modes to load files from disk; and it also means that"
22727     warn2 "the \`webcollage' program will be much slower."
22728   else
22729     warn2 "This means the \`webcollage' program will be much slower."
22730   fi
22731 fi
22732
22733
22734 if test "$have_gl" = yes -a "$ac_have_mesa_gl" = yes ; then
22735   preferred_mesagl=3.4
22736   mgv="$ac_mesagl_version_string"
22737   pgl="$preferred_mesagl"
22738
22739   if test "$ac_mesagl_version" = unknown; then
22740     true
22741     # warnL "Unable to determine the MesaGL version number!"
22742     # warn2 "Make sure you are using version $preferred_mesagl or newer."
22743
22744   elif test \! "$ac_mesagl_version" -gt 2006; then
22745     warnL "MesaGL version number is $mgv --"
22746     warn2 "MesaGL 2.6 and earlier have a security bug.  It is strongly"
22747     warn2 "recommended that you upgrade to at least version $preferred_mesagl."
22748
22749   elif test \! "$ac_mesagl_version" -gt 3003; then
22750     warnL "MesaGL version number is $mgv --"
22751     warn2 "MesaGL 3.3 and earlier have some bugs; it is recommended"
22752     warn2 "that you upgrade to $pgl or newer."
22753   fi
22754 fi
22755
22756 if test "$have_gl" = no ; then
22757   if test "$with_gl_req" = yes ; then
22758     warnL 'Use of GL was requested, but it was not found.'
22759   elif test "$with_gl_req" = no ; then
22760     noteL 'The OpenGL 3D library is not being used.'
22761   else
22762     noteL 'The OpenGL 3D library was not found.'
22763   fi
22764
22765   if test "$gl_halfassed" = yes ; then
22766     echo ''
22767     warn2 'More specifically, we found the headers, but not the'
22768     warn2 'libraries; so either GL is half-installed on this'
22769     warn2 "system, or something else went wrong.  The \`config.log'"
22770     warn2 'file might contain some clues.'
22771   fi
22772
22773   echo ''
22774   warn2 'Those demos which use 3D will not be built or installed.'
22775   warn2 'You might want to consider installing OpenGL and'
22776   warn2 "re-running configure.  If your vendor doesn't ship"
22777   warn2 'their own implementation of OpenGL, you can get a free'
22778   warn2 'version at <http://www.mesa3d.org/>.  For general OpenGL'
22779   warn2 'info, see <http://www.opengl.org/>.'
22780
22781 fi
22782
22783
22784 if test "$have_gl" = yes -a "$have_gle" = no ; then
22785
22786  # nobody cares about this; don't print the warning unless it was
22787  # requested and not found, or halfway-found.
22788  if test "$with_gle_req" = yes -o "$gle_halfassed" = yes ; then
22789
22790   if test "$with_gle_req" = yes ; then
22791     noteL 'Use of the GLE (GL Extrusion) library was requested, but'
22792     warn2 'it was not found (though the OpenGL library was found, and'
22793     warn2 'is being used.)'
22794   elif test "$with_gle_req" = no ; then
22795     noteL 'The OpenGL Library is being used, but the GLE (GL Extrusion)'
22796     warn2 'library is not.'
22797   else
22798     noteL 'The OpenGL Library was found, but the GLE (GL Extrusion)'
22799     warn2 'was not.'
22800   fi
22801
22802   if test "$gle_halfassed" = yes ; then
22803     echo ''
22804     warn2 'More specifically, we found the headers, but not the'
22805     warn2 'libraries; so either GLE is half-installed on this'
22806     warn2 "system, or something else went wrong.  The \`config.log'"
22807     warn2 'file might contain some clues.'
22808   fi
22809
22810   echo ''
22811   warn2 'Some of the OpenGL (3D) demos (those that depend on GLE)'
22812   warn2 'will not be built or installed.  You might want to consider'
22813   warn2 'installing GLE and re-running configure.  You can find the'
22814   warn2 'GLE library at <http://www.linas.org/gle/>.  For general'
22815   warn2 'OpenGL info, see <http://www.opengl.org/>.'
22816
22817  fi
22818 fi
22819
22820
22821 if test "$with_readdisplay_req" = yes -a "$have_readdisplay" = no ; then
22822   warn 'Use of XReadDisplay was requested, but it was not found.'
22823 fi
22824
22825 if test "$with_kerberos_req" = yes -a "$have_kerberos" = no ; then
22826   warn 'Use of Kerberos was requested, but it was not found.'
22827 fi
22828
22829 if test "$with_pam_req" = yes -a "$have_pam" = no ; then
22830   warn 'Use of PAM was requested, but it was not found.'
22831 fi
22832
22833 if test "$with_shadow_req" = yes -a "$have_shadow" = no ; then
22834   warn 'Use of shadow passwords was requested, but they were not found.'
22835 fi
22836
22837 if test "$ac_macosx" = yes ; then
22838   if test "$enable_locking" = yes ; then
22839     warn  "You have specified --enable-locking on MacOS X."
22840     warn2 "THIS DOES NOT WORK!  Don't do this!"
22841   fi
22842 fi
22843
22844
22845 # You are in a twisty maze of namespaces and syntaxes, all alike.
22846 # Fuck the skull of Unix.
22847 #
22848 bindir=`eval eval eval eval eval eval eval echo $bindir`
22849 HACKDIR=`eval eval eval eval eval eval eval echo $HACKDIR`
22850 HACK_CONF_DIR=`eval eval eval eval eval eval eval echo $HACK_CONF_DIR`
22851
22852 # canonicalize slashes.
22853 bindir=`echo  "${bindir}"              | sed 's@/$@@;s@//*@/@g'`
22854 HACKDIR=`echo "${HACKDIR}"             | sed 's@/$@@;s@//*@/@g'`
22855 HACK_CONF_DIR=`echo "${HACK_CONF_DIR}" | sed 's@/$@@;s@//*@/@g'`
22856
22857
22858 # Sanity check the hackdir
22859 for bad_choice in xscreensaver xscreensaver-demo xscreensaver-command ; do
22860   if test "${HACKDIR}" = "${bindir}/${bad_choice}" ; then
22861     echo ""
22862     { { $as_echo "$as_me:$LINENO: error: \"--with-hackdir=${bindir}/${bad_choice}\" won't work.
22863                    There will be an executable installed with that name, so
22864                    that can't be the name of a directory as well.  Please
22865                    re-configure with a different directory name." >&5
22866 $as_echo "$as_me: error: \"--with-hackdir=${bindir}/${bad_choice}\" won't work.
22867                    There will be an executable installed with that name, so
22868                    that can't be the name of a directory as well.  Please
22869                    re-configure with a different directory name." >&2;}
22870    { (exit 1); exit 1; }; }
22871   fi
22872 done
22873
22874
22875 do_dir_warning=no
22876
22877 # Now let's warn if there's a previous RPM version already installed.
22878 # But don't bother with this test if we are currently *building* an RPM.
22879
22880 if test -z "$RPM_PACKAGE_VERSION" ; then
22881
22882   rpmnames="xscreensaver xscreensaver-base xscreensaver-extras"
22883
22884   # M4 sucks!!
22885
22886   rpmv=`(rpm -qv $rpmnames) 2>/dev/null | \
22887         sed -n 's/^[-a-z]*-\([0-9][0-9]*[.][0-9][0-9a-z]*\)-.*$/\1/p' | \
22888         head -1`
22889
22890
22891   if test \! -z "$rpmv" ; then
22892     rpmbdir=`rpm -ql $rpmnames | sed -n 's@^\(.*\)/xscreensaver-demo$@\1@p'`
22893     rpmhdir=`rpm -ql $rpmnames | sed -n 's@^\(.*\)/popsquares$@\1@p'`
22894
22895     warning=no
22896     warnL "There is already an installed RPM of xscreensaver $rpmv"
22897     warn2 'on this system.  You might want to remove it ("rpm -ve")'
22898     warn2 'before running "make install" in this directory.'
22899     echo ""
22900     warn2 "Alternately, you could build this version of xscreensaver"
22901     warn2 'as an RPM, and then install that.  An "xscreensaver.spec"'
22902     warn2 'file is included.  Try "rpmbuild -v -ba xscreensaver.spec".'
22903     warn2 "See the RPM documentation for more info."
22904     echo ""
22905
22906     if test "$rpmbdir" = "$rpmhdir" ; then
22907       warn2 "The RPM version was installed in $rpmbdir/."
22908       do_dir_warning=yes
22909     else
22910       warn2 "The RPM version was installed in $rpmbdir/,"
22911       warn2 "with demos in $rpmhdir/."
22912     fi
22913   fi
22914 fi
22915
22916 # Also warn if there's a Debian package installed.
22917 #
22918 debnames="xscreensaver xscreensaver-data xscreensaver-data-extra"
22919 debv=''
22920 for dpkg in $debnames ; do
22921   if test -z "$debv"; then
22922     debv=`dpkg -s $dpkg 2>/dev/null | sed -n 's/^Version: \(.*\)$/\1/p'`
22923   fi
22924 done
22925
22926 if test \! -z "$debv" ; then
22927   debbdir=`dpkg -L $debnames 2>/dev/null | \
22928             sed -n 's@^\(.*/bin/\)xscreensaver$@\1@p'`
22929   debhdir=`dpkg -L $debnames 2>/dev/null | \
22930             sed -n 's@^\(.*/\)popsquares$@\1@p'`
22931   if test -z "$debbdir" ; then debbdir='???'; fi
22932   if test -z "$debhdir" ; then debhdir='???'; fi
22933
22934   warning=no
22935   warnL "There is already an installed dpkg of xscreensaver"
22936   warn2 "version \"$debv\" on this system."
22937   echo ""
22938   warn2 "The dpkg was installed in $debbdir,"
22939   warn2 "with demos in $debhdir."
22940 fi
22941
22942
22943 if test "${bindir}" = "${HACKDIR}" ; then
22944   do_dir_warning=yes
22945 fi
22946
22947 if test "$do_dir_warning" = yes; then
22948   echo ""
22949   echo "$warnsep"
22950   echo ""
22951   echo '      When you run "make install", the "xscreensaver",'
22952   echo '      "xscreensaver-demo", and "xscreensaver-command" executables'
22953   echo "      will be installed in ${bindir}/."
22954   echo ""
22955   echo "      The various graphics demos (190+ different executables) will"
22956   echo "      be installed in ${HACKDIR}/."
22957   echo ""
22958   echo "      If you would prefer the demos to be installed elsewhere,"
22959   echo "      you should re-run configure with the --with-hackdir=DIR"
22960   echo "      option.  For more information, run \`./configure --help'."
22961   warning=yes
22962 fi
22963
22964 if test "$warning" != no; then
22965   echo '' ; echo "$warnsep" ; echo ''
22966 fi
22967
22968 if test "$do_dir_warning" = no; then
22969   if test "$warning" = no; then
22970     echo ''
22971   fi
22972   echo "User programs will be installed in ${bindir}/"
22973   echo "Screen savers will be installed in ${HACKDIR}/"
22974   echo "Configuration dialogs will be installed in ${HACK_CONF_DIR}/"
22975   echo "System-wide default settings will be installed in ${APPDEFAULTS}/"
22976   echo ''
22977 fi