http://www.jwz.org/xscreensaver/xscreensaver-5.11.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_sgi_ext
815 with_xidle_ext
816 with_sgivc_ext
817 with_dpms_ext
818 with_xinerama_ext
819 with_xf86vmode_ext
820 with_xf86gamma_ext
821 with_randr_ext
822 with_proc_interrupts
823 enable_locking
824 enable_root_passwd
825 with_pam
826 with_pam_service_name
827 with_kerberos
828 with_shadow
829 with_passwd_helper
830 with_login_manager
831 with_gtk
832 with_motif
833 with_gl
834 with_gle
835 with_pixbuf
836 with_xpm
837 with_jpeg
838 with_xshm_ext
839 with_xdbe_ext
840 with_readdisplay
841 with_image_directory
842 with_text_file
843 with_browser
844 with_setuid_hacks
845 '
846       ac_precious_vars='build_alias
847 host_alias
848 target_alias
849 CC
850 CFLAGS
851 LDFLAGS
852 LIBS
853 CPPFLAGS
854 CPP
855 XMKMF'
856
857
858 # Initialize some variables set by options.
859 ac_init_help=
860 ac_init_version=false
861 ac_unrecognized_opts=
862 ac_unrecognized_sep=
863 # The variables have the same names as the options, with
864 # dashes changed to underlines.
865 cache_file=/dev/null
866 exec_prefix=NONE
867 no_create=
868 no_recursion=
869 prefix=NONE
870 program_prefix=NONE
871 program_suffix=NONE
872 program_transform_name=s,x,x,
873 silent=
874 site=
875 srcdir=
876 verbose=
877 x_includes=NONE
878 x_libraries=NONE
879
880 # Installation directory options.
881 # These are left unexpanded so users can "make install exec_prefix=/foo"
882 # and all the variables that are supposed to be based on exec_prefix
883 # by default will actually change.
884 # Use braces instead of parens because sh, perl, etc. also accept them.
885 # (The list follows the same order as the GNU Coding Standards.)
886 bindir='${exec_prefix}/bin'
887 sbindir='${exec_prefix}/sbin'
888 libexecdir='${exec_prefix}/libexec'
889 datarootdir='${prefix}/share'
890 datadir='${datarootdir}'
891 sysconfdir='${prefix}/etc'
892 sharedstatedir='${prefix}/com'
893 localstatedir='${prefix}/var'
894 includedir='${prefix}/include'
895 oldincludedir='/usr/include'
896 docdir='${datarootdir}/doc/${PACKAGE}'
897 infodir='${datarootdir}/info'
898 htmldir='${docdir}'
899 dvidir='${docdir}'
900 pdfdir='${docdir}'
901 psdir='${docdir}'
902 libdir='${exec_prefix}/lib'
903 localedir='${datarootdir}/locale'
904 mandir='${datarootdir}/man'
905
906 ac_prev=
907 ac_dashdash=
908 for ac_option
909 do
910   # If the previous option needs an argument, assign it.
911   if test -n "$ac_prev"; then
912     eval $ac_prev=\$ac_option
913     ac_prev=
914     continue
915   fi
916
917   case $ac_option in
918   *=*)  ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
919   *)    ac_optarg=yes ;;
920   esac
921
922   # Accept the important Cygnus configure options, so we can diagnose typos.
923
924   case $ac_dashdash$ac_option in
925   --)
926     ac_dashdash=yes ;;
927
928   -bindir | --bindir | --bindi | --bind | --bin | --bi)
929     ac_prev=bindir ;;
930   -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
931     bindir=$ac_optarg ;;
932
933   -build | --build | --buil | --bui | --bu)
934     ac_prev=build_alias ;;
935   -build=* | --build=* | --buil=* | --bui=* | --bu=*)
936     build_alias=$ac_optarg ;;
937
938   -cache-file | --cache-file | --cache-fil | --cache-fi \
939   | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
940     ac_prev=cache_file ;;
941   -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
942   | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
943     cache_file=$ac_optarg ;;
944
945   --config-cache | -C)
946     cache_file=config.cache ;;
947
948   -datadir | --datadir | --datadi | --datad)
949     ac_prev=datadir ;;
950   -datadir=* | --datadir=* | --datadi=* | --datad=*)
951     datadir=$ac_optarg ;;
952
953   -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
954   | --dataroo | --dataro | --datar)
955     ac_prev=datarootdir ;;
956   -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
957   | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
958     datarootdir=$ac_optarg ;;
959
960   -disable-* | --disable-*)
961     ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
962     # Reject names that are not valid shell variable names.
963     expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
964       { $as_echo "$as_me: error: invalid feature name: $ac_useropt" >&2
965    { (exit 1); exit 1; }; }
966     ac_useropt_orig=$ac_useropt
967     ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
968     case $ac_user_opts in
969       *"
970 "enable_$ac_useropt"
971 "*) ;;
972       *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig"
973          ac_unrecognized_sep=', ';;
974     esac
975     eval enable_$ac_useropt=no ;;
976
977   -docdir | --docdir | --docdi | --doc | --do)
978     ac_prev=docdir ;;
979   -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*)
980     docdir=$ac_optarg ;;
981
982   -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv)
983     ac_prev=dvidir ;;
984   -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*)
985     dvidir=$ac_optarg ;;
986
987   -enable-* | --enable-*)
988     ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
989     # Reject names that are not valid shell variable names.
990     expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
991       { $as_echo "$as_me: error: invalid feature name: $ac_useropt" >&2
992    { (exit 1); exit 1; }; }
993     ac_useropt_orig=$ac_useropt
994     ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
995     case $ac_user_opts in
996       *"
997 "enable_$ac_useropt"
998 "*) ;;
999       *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig"
1000          ac_unrecognized_sep=', ';;
1001     esac
1002     eval enable_$ac_useropt=\$ac_optarg ;;
1003
1004   -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
1005   | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
1006   | --exec | --exe | --ex)
1007     ac_prev=exec_prefix ;;
1008   -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
1009   | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
1010   | --exec=* | --exe=* | --ex=*)
1011     exec_prefix=$ac_optarg ;;
1012
1013   -gas | --gas | --ga | --g)
1014     # Obsolete; use --with-gas.
1015     with_gas=yes ;;
1016
1017   -help | --help | --hel | --he | -h)
1018     ac_init_help=long ;;
1019   -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
1020     ac_init_help=recursive ;;
1021   -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
1022     ac_init_help=short ;;
1023
1024   -host | --host | --hos | --ho)
1025     ac_prev=host_alias ;;
1026   -host=* | --host=* | --hos=* | --ho=*)
1027     host_alias=$ac_optarg ;;
1028
1029   -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht)
1030     ac_prev=htmldir ;;
1031   -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \
1032   | --ht=*)
1033     htmldir=$ac_optarg ;;
1034
1035   -includedir | --includedir | --includedi | --included | --include \
1036   | --includ | --inclu | --incl | --inc)
1037     ac_prev=includedir ;;
1038   -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
1039   | --includ=* | --inclu=* | --incl=* | --inc=*)
1040     includedir=$ac_optarg ;;
1041
1042   -infodir | --infodir | --infodi | --infod | --info | --inf)
1043     ac_prev=infodir ;;
1044   -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
1045     infodir=$ac_optarg ;;
1046
1047   -libdir | --libdir | --libdi | --libd)
1048     ac_prev=libdir ;;
1049   -libdir=* | --libdir=* | --libdi=* | --libd=*)
1050     libdir=$ac_optarg ;;
1051
1052   -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
1053   | --libexe | --libex | --libe)
1054     ac_prev=libexecdir ;;
1055   -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
1056   | --libexe=* | --libex=* | --libe=*)
1057     libexecdir=$ac_optarg ;;
1058
1059   -localedir | --localedir | --localedi | --localed | --locale)
1060     ac_prev=localedir ;;
1061   -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*)
1062     localedir=$ac_optarg ;;
1063
1064   -localstatedir | --localstatedir | --localstatedi | --localstated \
1065   | --localstate | --localstat | --localsta | --localst | --locals)
1066     ac_prev=localstatedir ;;
1067   -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
1068   | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*)
1069     localstatedir=$ac_optarg ;;
1070
1071   -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
1072     ac_prev=mandir ;;
1073   -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
1074     mandir=$ac_optarg ;;
1075
1076   -nfp | --nfp | --nf)
1077     # Obsolete; use --without-fp.
1078     with_fp=no ;;
1079
1080   -no-create | --no-create | --no-creat | --no-crea | --no-cre \
1081   | --no-cr | --no-c | -n)
1082     no_create=yes ;;
1083
1084   -no-recursion | --no-recursion | --no-recursio | --no-recursi \
1085   | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
1086     no_recursion=yes ;;
1087
1088   -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
1089   | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
1090   | --oldin | --oldi | --old | --ol | --o)
1091     ac_prev=oldincludedir ;;
1092   -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
1093   | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
1094   | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
1095     oldincludedir=$ac_optarg ;;
1096
1097   -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
1098     ac_prev=prefix ;;
1099   -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
1100     prefix=$ac_optarg ;;
1101
1102   -program-prefix | --program-prefix | --program-prefi | --program-pref \
1103   | --program-pre | --program-pr | --program-p)
1104     ac_prev=program_prefix ;;
1105   -program-prefix=* | --program-prefix=* | --program-prefi=* \
1106   | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
1107     program_prefix=$ac_optarg ;;
1108
1109   -program-suffix | --program-suffix | --program-suffi | --program-suff \
1110   | --program-suf | --program-su | --program-s)
1111     ac_prev=program_suffix ;;
1112   -program-suffix=* | --program-suffix=* | --program-suffi=* \
1113   | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
1114     program_suffix=$ac_optarg ;;
1115
1116   -program-transform-name | --program-transform-name \
1117   | --program-transform-nam | --program-transform-na \
1118   | --program-transform-n | --program-transform- \
1119   | --program-transform | --program-transfor \
1120   | --program-transfo | --program-transf \
1121   | --program-trans | --program-tran \
1122   | --progr-tra | --program-tr | --program-t)
1123     ac_prev=program_transform_name ;;
1124   -program-transform-name=* | --program-transform-name=* \
1125   | --program-transform-nam=* | --program-transform-na=* \
1126   | --program-transform-n=* | --program-transform-=* \
1127   | --program-transform=* | --program-transfor=* \
1128   | --program-transfo=* | --program-transf=* \
1129   | --program-trans=* | --program-tran=* \
1130   | --progr-tra=* | --program-tr=* | --program-t=*)
1131     program_transform_name=$ac_optarg ;;
1132
1133   -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd)
1134     ac_prev=pdfdir ;;
1135   -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*)
1136     pdfdir=$ac_optarg ;;
1137
1138   -psdir | --psdir | --psdi | --psd | --ps)
1139     ac_prev=psdir ;;
1140   -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*)
1141     psdir=$ac_optarg ;;
1142
1143   -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1144   | -silent | --silent | --silen | --sile | --sil)
1145     silent=yes ;;
1146
1147   -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
1148     ac_prev=sbindir ;;
1149   -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
1150   | --sbi=* | --sb=*)
1151     sbindir=$ac_optarg ;;
1152
1153   -sharedstatedir | --sharedstatedir | --sharedstatedi \
1154   | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
1155   | --sharedst | --shareds | --shared | --share | --shar \
1156   | --sha | --sh)
1157     ac_prev=sharedstatedir ;;
1158   -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
1159   | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
1160   | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
1161   | --sha=* | --sh=*)
1162     sharedstatedir=$ac_optarg ;;
1163
1164   -site | --site | --sit)
1165     ac_prev=site ;;
1166   -site=* | --site=* | --sit=*)
1167     site=$ac_optarg ;;
1168
1169   -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
1170     ac_prev=srcdir ;;
1171   -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
1172     srcdir=$ac_optarg ;;
1173
1174   -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
1175   | --syscon | --sysco | --sysc | --sys | --sy)
1176     ac_prev=sysconfdir ;;
1177   -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
1178   | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
1179     sysconfdir=$ac_optarg ;;
1180
1181   -target | --target | --targe | --targ | --tar | --ta | --t)
1182     ac_prev=target_alias ;;
1183   -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
1184     target_alias=$ac_optarg ;;
1185
1186   -v | -verbose | --verbose | --verbos | --verbo | --verb)
1187     verbose=yes ;;
1188
1189   -version | --version | --versio | --versi | --vers | -V)
1190     ac_init_version=: ;;
1191
1192   -with-* | --with-*)
1193     ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
1194     # Reject names that are not valid shell variable names.
1195     expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1196       { $as_echo "$as_me: error: invalid package name: $ac_useropt" >&2
1197    { (exit 1); exit 1; }; }
1198     ac_useropt_orig=$ac_useropt
1199     ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1200     case $ac_user_opts in
1201       *"
1202 "with_$ac_useropt"
1203 "*) ;;
1204       *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig"
1205          ac_unrecognized_sep=', ';;
1206     esac
1207     eval with_$ac_useropt=\$ac_optarg ;;
1208
1209   -without-* | --without-*)
1210     ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'`
1211     # Reject names that are not valid shell variable names.
1212     expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1213       { $as_echo "$as_me: error: invalid package name: $ac_useropt" >&2
1214    { (exit 1); exit 1; }; }
1215     ac_useropt_orig=$ac_useropt
1216     ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1217     case $ac_user_opts in
1218       *"
1219 "with_$ac_useropt"
1220 "*) ;;
1221       *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig"
1222          ac_unrecognized_sep=', ';;
1223     esac
1224     eval with_$ac_useropt=no ;;
1225
1226   --x)
1227     # Obsolete; use --with-x.
1228     with_x=yes ;;
1229
1230   -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
1231   | --x-incl | --x-inc | --x-in | --x-i)
1232     ac_prev=x_includes ;;
1233   -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
1234   | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
1235     x_includes=$ac_optarg ;;
1236
1237   -x-libraries | --x-libraries | --x-librarie | --x-librari \
1238   | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
1239     ac_prev=x_libraries ;;
1240   -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
1241   | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
1242     x_libraries=$ac_optarg ;;
1243
1244   -*) { $as_echo "$as_me: error: unrecognized option: $ac_option
1245 Try \`$0 --help' for more information." >&2
1246    { (exit 1); exit 1; }; }
1247     ;;
1248
1249   *=*)
1250     ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
1251     # Reject names that are not valid shell variable names.
1252     expr "x$ac_envvar" : ".*[^_$as_cr_alnum]" >/dev/null &&
1253       { $as_echo "$as_me: error: invalid variable name: $ac_envvar" >&2
1254    { (exit 1); exit 1; }; }
1255     eval $ac_envvar=\$ac_optarg
1256     export $ac_envvar ;;
1257
1258   *)
1259     # FIXME: should be removed in autoconf 3.0.
1260     $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2
1261     expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
1262       $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2
1263     : ${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}
1264     ;;
1265
1266   esac
1267 done
1268
1269 if test -n "$ac_prev"; then
1270   ac_option=--`echo $ac_prev | sed 's/_/-/g'`
1271   { $as_echo "$as_me: error: missing argument to $ac_option" >&2
1272    { (exit 1); exit 1; }; }
1273 fi
1274
1275 if test -n "$ac_unrecognized_opts"; then
1276   case $enable_option_checking in
1277     no) ;;
1278     fatal) { $as_echo "$as_me: error: unrecognized options: $ac_unrecognized_opts" >&2
1279    { (exit 1); exit 1; }; } ;;
1280     *)     $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;;
1281   esac
1282 fi
1283
1284 # Check all directory arguments for consistency.
1285 for ac_var in   exec_prefix prefix bindir sbindir libexecdir datarootdir \
1286                 datadir sysconfdir sharedstatedir localstatedir includedir \
1287                 oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
1288                 libdir localedir mandir
1289 do
1290   eval ac_val=\$$ac_var
1291   # Remove trailing slashes.
1292   case $ac_val in
1293     */ )
1294       ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'`
1295       eval $ac_var=\$ac_val;;
1296   esac
1297   # Be sure to have absolute directory names.
1298   case $ac_val in
1299     [\\/$]* | ?:[\\/]* )  continue;;
1300     NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
1301   esac
1302   { $as_echo "$as_me: error: expected an absolute directory name for --$ac_var: $ac_val" >&2
1303    { (exit 1); exit 1; }; }
1304 done
1305
1306 # There might be people who depend on the old broken behavior: `$host'
1307 # used to hold the argument of --host etc.
1308 # FIXME: To remove some day.
1309 build=$build_alias
1310 host=$host_alias
1311 target=$target_alias
1312
1313 # FIXME: To remove some day.
1314 if test "x$host_alias" != x; then
1315   if test "x$build_alias" = x; then
1316     cross_compiling=maybe
1317     $as_echo "$as_me: WARNING: If you wanted to set the --build type, don't use --host.
1318     If a cross compiler is detected then cross compile mode will be used." >&2
1319   elif test "x$build_alias" != "x$host_alias"; then
1320     cross_compiling=yes
1321   fi
1322 fi
1323
1324 ac_tool_prefix=
1325 test -n "$host_alias" && ac_tool_prefix=$host_alias-
1326
1327 test "$silent" = yes && exec 6>/dev/null
1328
1329
1330 ac_pwd=`pwd` && test -n "$ac_pwd" &&
1331 ac_ls_di=`ls -di .` &&
1332 ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` ||
1333   { $as_echo "$as_me: error: working directory cannot be determined" >&2
1334    { (exit 1); exit 1; }; }
1335 test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
1336   { $as_echo "$as_me: error: pwd does not report name of working directory" >&2
1337    { (exit 1); exit 1; }; }
1338
1339
1340 # Find the source files, if location was not specified.
1341 if test -z "$srcdir"; then
1342   ac_srcdir_defaulted=yes
1343   # Try the directory containing this script, then the parent directory.
1344   ac_confdir=`$as_dirname -- "$as_myself" ||
1345 $as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
1346          X"$as_myself" : 'X\(//\)[^/]' \| \
1347          X"$as_myself" : 'X\(//\)$' \| \
1348          X"$as_myself" : 'X\(/\)' \| . 2>/dev/null ||
1349 $as_echo X"$as_myself" |
1350     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
1351             s//\1/
1352             q
1353           }
1354           /^X\(\/\/\)[^/].*/{
1355             s//\1/
1356             q
1357           }
1358           /^X\(\/\/\)$/{
1359             s//\1/
1360             q
1361           }
1362           /^X\(\/\).*/{
1363             s//\1/
1364             q
1365           }
1366           s/.*/./; q'`
1367   srcdir=$ac_confdir
1368   if test ! -r "$srcdir/$ac_unique_file"; then
1369     srcdir=..
1370   fi
1371 else
1372   ac_srcdir_defaulted=no
1373 fi
1374 if test ! -r "$srcdir/$ac_unique_file"; then
1375   test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
1376   { $as_echo "$as_me: error: cannot find sources ($ac_unique_file) in $srcdir" >&2
1377    { (exit 1); exit 1; }; }
1378 fi
1379 ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work"
1380 ac_abs_confdir=`(
1381         cd "$srcdir" && test -r "./$ac_unique_file" || { $as_echo "$as_me: error: $ac_msg" >&2
1382    { (exit 1); exit 1; }; }
1383         pwd)`
1384 # When building in place, set srcdir=.
1385 if test "$ac_abs_confdir" = "$ac_pwd"; then
1386   srcdir=.
1387 fi
1388 # Remove unnecessary trailing slashes from srcdir.
1389 # Double slashes in file names in object file debugging info
1390 # mess up M-x gdb in Emacs.
1391 case $srcdir in
1392 */) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;;
1393 esac
1394 for ac_var in $ac_precious_vars; do
1395   eval ac_env_${ac_var}_set=\${${ac_var}+set}
1396   eval ac_env_${ac_var}_value=\$${ac_var}
1397   eval ac_cv_env_${ac_var}_set=\${${ac_var}+set}
1398   eval ac_cv_env_${ac_var}_value=\$${ac_var}
1399 done
1400
1401 #
1402 # Report the --help message.
1403 #
1404 if test "$ac_init_help" = "long"; then
1405   # Omit some internal or obsolete options to make the list less imposing.
1406   # This message is too long to be a string in the A/UX 3.1 sh.
1407   cat <<_ACEOF
1408 \`configure' configures this package to adapt to many kinds of systems.
1409
1410 Usage: $0 [OPTION]... [VAR=VALUE]...
1411
1412 To assign environment variables (e.g., CC, CFLAGS...), specify them as
1413 VAR=VALUE.  See below for descriptions of some of the useful variables.
1414
1415 Defaults for the options are specified in brackets.
1416
1417
1418 Configuration:
1419
1420   -h, --help              display this help and exit
1421       --help=short        display options specific to this package
1422       --help=recursive    display the short help of all the included packages
1423   -V, --version           display version information and exit
1424   -q, --quiet, --silent   do not print \`checking...' messages
1425       --cache-file=FILE   cache test results in FILE [disabled]
1426   -C, --config-cache      alias for \`--cache-file=config.cache'
1427   -n, --no-create         do not create output files
1428       --srcdir=DIR        find the sources in DIR [configure dir or \`..']
1429
1430 Installation directories:
1431   --prefix=PREFIX         install architecture-independent files in PREFIX
1432                           [$ac_default_prefix]
1433   --exec-prefix=EPREFIX   install architecture-dependent files in EPREFIX
1434                           [PREFIX]
1435
1436 By default, \`make install' will install all the files in
1437 \`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc.  You can specify
1438 an installation prefix other than \`$ac_default_prefix' using \`--prefix',
1439 for instance \`--prefix=\$HOME'.
1440
1441 For better control, use the options below.
1442
1443 Fine tuning of the installation directories:
1444   --bindir=DIR            user executables [EPREFIX/bin]
1445   --libexecdir=DIR        program executables [EPREFIX/libexec]
1446   --libdir=DIR            object code libraries [EPREFIX/lib]
1447   --includedir=DIR        C header files [PREFIX/include]
1448   --x-includes=DIR        X include files are in DIR
1449   --x-libraries=DIR       X library files are in DIR
1450   --datarootdir=DIR       read-only arch.-independent data root [PREFIX/share]
1451   --datadir=DIR           read-only architecture-independent data [DATAROOTDIR]
1452   --localedir=DIR         locale-dependent data [DATAROOTDIR/locale]
1453   --mandir=DIR            man documentation [DATAROOTDIR/man]
1454   --docdir=DIR            documentation root [DATAROOTDIR/doc/PACKAGE]
1455   --htmldir=DIR           html documentation [DOCDIR]
1456   --dvidir=DIR            dvi documentation [DOCDIR]
1457   --pdfdir=DIR            pdf documentation [DOCDIR]
1458   --psdir=DIR             ps documentation [DOCDIR]
1459 _ACEOF
1460
1461   cat <<\_ACEOF
1462
1463 X features:
1464   --x-includes=DIR    X include files are in DIR
1465   --x-libraries=DIR   X library files are in DIR
1466
1467 System types:
1468   --build=BUILD     configure for building on BUILD [guessed]
1469   --host=HOST       cross-compile to build programs to run on HOST [BUILD]
1470 _ACEOF
1471 fi
1472
1473 if test -n "$ac_init_help"; then
1474
1475   cat <<\_ACEOF
1476
1477 Optional Features:
1478   --disable-option-checking  ignore unrecognized --enable/--with options
1479   --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)
1480   --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
1481
1482 Screen locking options:
1483   --enable-locking        Compile in support for locking the display.
1484   --disable-locking       Do not allow locking at all.
1485
1486   --enable-root-passwd        Allow root passwd to unlock screen.
1487   --disable-root-passwd       Do not allow that.
1488
1489 Optional Packages:
1490   --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
1491   --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
1492
1493
1494 Installation options:
1495   --with-hackdir=DIR      Where to install the hundreds of demo executables.
1496                           Default: `PREFIX/libexec/xscreensaver/'
1497   --with-configdir=DIR    Where to install the data files that describe each
1498                           of the display modes to the GUI.
1499                           Default: `PREFIX/share/xscreensaver/config/'
1500   --with-x-app-defaults=DIR
1501                            Where to install xscreensaver configuration file.
1502
1503 Except where noted, all of the --with options below can also take a
1504 directory argument: for example, `--with-motif=/opt/Motif'.  That would
1505 cause /opt/Motif/include/ to be added to the -I list, and /opt/Motif/lib/
1506 to be added to the -L list, assuming those directories exist.
1507
1508 By default, support for each of these options will be built in, if the
1509 relevant library routines exist.  At run time, they will then be used
1510 only if the X server being used supports them.  Each --with option has
1511 a corresponding --without option, to override building support for them
1512 at all.
1513
1514 Screen blanking and idle-detection options:
1515
1516   --with-sgi-ext          Include support for the SGI SCREEN_SAVER extension.
1517   --with-xidle-ext        Include support for the XIDLE extension.
1518   --with-sgivc-ext        Include support for the SGI-VIDEO-CONTROL extension.
1519   --with-dpms-ext         Include support for the DPMS extension.
1520   --with-xinerama-ext     Include support for the XINERAMA extension.
1521   --with-xf86vmode-ext    Include support for XFree86 virtual screens.
1522   --with-xf86gamma-ext    Include support for XFree86 gamma fading.
1523   --with-randr-ext        Include support for the X Resize+Rotate extension.
1524   --with-proc-interrupts  Include support for consulting the /proc/interrupts
1525                           file to notice keyboard activity.
1526   --with-pam              Include support for PAM (Pluggable Auth Modules.)
1527   --with-pam-service-name=NAME
1528                           NAME is the name of the PAM service that
1529                           xscreensaver will authenticate as.
1530   --with-kerberos         Include support for Kerberos authentication.
1531   --with-shadow           Include support for shadow password authentication.
1532   --with-passwd-helper    Include support for an external password
1533                           verification helper program.
1534   --with-login-manager    Put a "New Login" button on the unlock dialog that
1535                           runs a login manager such as gdmflexiserver.
1536
1537 User interface options:
1538
1539   --with-gtk              Use the Gtk toolkit for the user interface.
1540   --with-motif            Use the Motif toolkit for the user interface
1541                           (not recommended.)
1542
1543 Graphics options:
1544
1545   --with-gl               Build those demos which depend on OpenGL.
1546   --with-gle              Build those demos which depend on GLE
1547                           (the OpenGL "extrusion" library.)
1548   --with-pixbuf           Include support for the GDK-Pixbuf library in some
1549                           demos, which will make it possible for them to read
1550                           GIF, JPEG, and PNG files as well.
1551   --with-xpm              Include support for XPM files in some demos.
1552                           (Not needed if Pixbuf is used.)
1553   --with-jpeg             Include support for the JPEG library.
1554   --with-xshm-ext         Include support for the Shared Memory extension.
1555   --with-xdbe-ext         Include support for the DOUBLE-BUFFER extension.
1556   --with-readdisplay      Include support for the XReadDisplay extension.
1557   --with-image-directory=DIR  By default, some demos may display random images
1558                           from this directory.
1559   --with-text-file=FILE   By default, some demos may display this file.
1560   --with-browser=BROWSER   Specify the browser to show help URL.
1561   --with-setuid-hacks     Allow some demos to be installed `setuid root'
1562                           (which is needed in order to ping other hosts.)
1563
1564
1565 Some influential environment variables:
1566   CC          C compiler command
1567   CFLAGS      C compiler flags
1568   LDFLAGS     linker flags, e.g. -L<lib dir> if you have libraries in a
1569               nonstandard directory <lib dir>
1570   LIBS        libraries to pass to the linker, e.g. -l<library>
1571   CPPFLAGS    C/C++/Objective C preprocessor flags, e.g. -I<include dir> if
1572               you have headers in a nonstandard directory <include dir>
1573   CPP         C preprocessor
1574   XMKMF       Path to xmkmf, Makefile generator for X Window System
1575
1576 Use these variables to override the choices made by `configure' or to help
1577 it to find libraries and programs with nonstandard names/locations.
1578
1579 _ACEOF
1580 ac_status=$?
1581 fi
1582
1583 if test "$ac_init_help" = "recursive"; then
1584   # If there are subdirs, report their specific --help.
1585   for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
1586     test -d "$ac_dir" ||
1587       { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } ||
1588       continue
1589     ac_builddir=.
1590
1591 case "$ac_dir" in
1592 .) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
1593 *)
1594   ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
1595   # A ".." for each directory in $ac_dir_suffix.
1596   ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
1597   case $ac_top_builddir_sub in
1598   "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
1599   *)  ac_top_build_prefix=$ac_top_builddir_sub/ ;;
1600   esac ;;
1601 esac
1602 ac_abs_top_builddir=$ac_pwd
1603 ac_abs_builddir=$ac_pwd$ac_dir_suffix
1604 # for backward compatibility:
1605 ac_top_builddir=$ac_top_build_prefix
1606
1607 case $srcdir in
1608   .)  # We are building in place.
1609     ac_srcdir=.
1610     ac_top_srcdir=$ac_top_builddir_sub
1611     ac_abs_top_srcdir=$ac_pwd ;;
1612   [\\/]* | ?:[\\/]* )  # Absolute name.
1613     ac_srcdir=$srcdir$ac_dir_suffix;
1614     ac_top_srcdir=$srcdir
1615     ac_abs_top_srcdir=$srcdir ;;
1616   *) # Relative name.
1617     ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
1618     ac_top_srcdir=$ac_top_build_prefix$srcdir
1619     ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
1620 esac
1621 ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
1622
1623     cd "$ac_dir" || { ac_status=$?; continue; }
1624     # Check for guested configure.
1625     if test -f "$ac_srcdir/configure.gnu"; then
1626       echo &&
1627       $SHELL "$ac_srcdir/configure.gnu" --help=recursive
1628     elif test -f "$ac_srcdir/configure"; then
1629       echo &&
1630       $SHELL "$ac_srcdir/configure" --help=recursive
1631     else
1632       $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
1633     fi || ac_status=$?
1634     cd "$ac_pwd" || { ac_status=$?; break; }
1635   done
1636 fi
1637
1638 test -n "$ac_init_help" && exit $ac_status
1639 if $ac_init_version; then
1640   cat <<\_ACEOF
1641 configure
1642 generated by GNU Autoconf 2.63
1643
1644 Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001,
1645 2002, 2003, 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc.
1646 This configure script is free software; the Free Software Foundation
1647 gives unlimited permission to copy, distribute and modify it.
1648 _ACEOF
1649   exit
1650 fi
1651 cat >config.log <<_ACEOF
1652 This file contains any messages produced by compilers while
1653 running configure, to aid debugging if configure makes a mistake.
1654
1655 It was created by $as_me, which was
1656 generated by GNU Autoconf 2.63.  Invocation command line was
1657
1658   $ $0 $@
1659
1660 _ACEOF
1661 exec 5>>config.log
1662 {
1663 cat <<_ASUNAME
1664 ## --------- ##
1665 ## Platform. ##
1666 ## --------- ##
1667
1668 hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
1669 uname -m = `(uname -m) 2>/dev/null || echo unknown`
1670 uname -r = `(uname -r) 2>/dev/null || echo unknown`
1671 uname -s = `(uname -s) 2>/dev/null || echo unknown`
1672 uname -v = `(uname -v) 2>/dev/null || echo unknown`
1673
1674 /usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
1675 /bin/uname -X     = `(/bin/uname -X) 2>/dev/null     || echo unknown`
1676
1677 /bin/arch              = `(/bin/arch) 2>/dev/null              || echo unknown`
1678 /usr/bin/arch -k       = `(/usr/bin/arch -k) 2>/dev/null       || echo unknown`
1679 /usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
1680 /usr/bin/hostinfo      = `(/usr/bin/hostinfo) 2>/dev/null      || echo unknown`
1681 /bin/machine           = `(/bin/machine) 2>/dev/null           || echo unknown`
1682 /usr/bin/oslevel       = `(/usr/bin/oslevel) 2>/dev/null       || echo unknown`
1683 /bin/universe          = `(/bin/universe) 2>/dev/null          || echo unknown`
1684
1685 _ASUNAME
1686
1687 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1688 for as_dir in $PATH
1689 do
1690   IFS=$as_save_IFS
1691   test -z "$as_dir" && as_dir=.
1692   $as_echo "PATH: $as_dir"
1693 done
1694 IFS=$as_save_IFS
1695
1696 } >&5
1697
1698 cat >&5 <<_ACEOF
1699
1700
1701 ## ----------- ##
1702 ## Core tests. ##
1703 ## ----------- ##
1704
1705 _ACEOF
1706
1707
1708 # Keep a trace of the command line.
1709 # Strip out --no-create and --no-recursion so they do not pile up.
1710 # Strip out --silent because we don't want to record it for future runs.
1711 # Also quote any args containing shell meta-characters.
1712 # Make two passes to allow for proper duplicate-argument suppression.
1713 ac_configure_args=
1714 ac_configure_args0=
1715 ac_configure_args1=
1716 ac_must_keep_next=false
1717 for ac_pass in 1 2
1718 do
1719   for ac_arg
1720   do
1721     case $ac_arg in
1722     -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
1723     -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1724     | -silent | --silent | --silen | --sile | --sil)
1725       continue ;;
1726     *\'*)
1727       ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
1728     esac
1729     case $ac_pass in
1730     1) ac_configure_args0="$ac_configure_args0 '$ac_arg'" ;;
1731     2)
1732       ac_configure_args1="$ac_configure_args1 '$ac_arg'"
1733       if test $ac_must_keep_next = true; then
1734         ac_must_keep_next=false # Got value, back to normal.
1735       else
1736         case $ac_arg in
1737           *=* | --config-cache | -C | -disable-* | --disable-* \
1738           | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
1739           | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
1740           | -with-* | --with-* | -without-* | --without-* | --x)
1741             case "$ac_configure_args0 " in
1742               "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
1743             esac
1744             ;;
1745           -* ) ac_must_keep_next=true ;;
1746         esac
1747       fi
1748       ac_configure_args="$ac_configure_args '$ac_arg'"
1749       ;;
1750     esac
1751   done
1752 done
1753 $as_unset ac_configure_args0 || test "${ac_configure_args0+set}" != set || { ac_configure_args0=; export ac_configure_args0; }
1754 $as_unset ac_configure_args1 || test "${ac_configure_args1+set}" != set || { ac_configure_args1=; export ac_configure_args1; }
1755
1756 # When interrupted or exit'd, cleanup temporary files, and complete
1757 # config.log.  We remove comments because anyway the quotes in there
1758 # would cause problems or look ugly.
1759 # WARNING: Use '\'' to represent an apostrophe within the trap.
1760 # WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug.
1761 trap 'exit_status=$?
1762   # Save into config.log some information that might help in debugging.
1763   {
1764     echo
1765
1766     cat <<\_ASBOX
1767 ## ---------------- ##
1768 ## Cache variables. ##
1769 ## ---------------- ##
1770 _ASBOX
1771     echo
1772     # The following way of writing the cache mishandles newlines in values,
1773 (
1774   for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do
1775     eval ac_val=\$$ac_var
1776     case $ac_val in #(
1777     *${as_nl}*)
1778       case $ac_var in #(
1779       *_cv_*) { $as_echo "$as_me:$LINENO: WARNING: cache variable $ac_var contains a newline" >&5
1780 $as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
1781       esac
1782       case $ac_var in #(
1783       _ | IFS | as_nl) ;; #(
1784       BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
1785       *) $as_unset $ac_var ;;
1786       esac ;;
1787     esac
1788   done
1789   (set) 2>&1 |
1790     case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #(
1791     *${as_nl}ac_space=\ *)
1792       sed -n \
1793         "s/'\''/'\''\\\\'\'''\''/g;
1794           s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p"
1795       ;; #(
1796     *)
1797       sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
1798       ;;
1799     esac |
1800     sort
1801 )
1802     echo
1803
1804     cat <<\_ASBOX
1805 ## ----------------- ##
1806 ## Output variables. ##
1807 ## ----------------- ##
1808 _ASBOX
1809     echo
1810     for ac_var in $ac_subst_vars
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
1820     if test -n "$ac_subst_files"; then
1821       cat <<\_ASBOX
1822 ## ------------------- ##
1823 ## File substitutions. ##
1824 ## ------------------- ##
1825 _ASBOX
1826       echo
1827       for ac_var in $ac_subst_files
1828       do
1829         eval ac_val=\$$ac_var
1830         case $ac_val in
1831         *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
1832         esac
1833         $as_echo "$ac_var='\''$ac_val'\''"
1834       done | sort
1835       echo
1836     fi
1837
1838     if test -s confdefs.h; then
1839       cat <<\_ASBOX
1840 ## ----------- ##
1841 ## confdefs.h. ##
1842 ## ----------- ##
1843 _ASBOX
1844       echo
1845       cat confdefs.h
1846       echo
1847     fi
1848     test "$ac_signal" != 0 &&
1849       $as_echo "$as_me: caught signal $ac_signal"
1850     $as_echo "$as_me: exit $exit_status"
1851   } >&5
1852   rm -f core *.core core.conftest.* &&
1853     rm -f -r conftest* confdefs* conf$$* $ac_clean_files &&
1854     exit $exit_status
1855 ' 0
1856 for ac_signal in 1 2 13 15; do
1857   trap 'ac_signal='$ac_signal'; { (exit 1); exit 1; }' $ac_signal
1858 done
1859 ac_signal=0
1860
1861 # confdefs.h avoids OS command line length limits that DEFS can exceed.
1862 rm -f -r conftest* confdefs.h
1863
1864 # Predefined preprocessor variables.
1865
1866 cat >>confdefs.h <<_ACEOF
1867 #define PACKAGE_NAME "$PACKAGE_NAME"
1868 _ACEOF
1869
1870
1871 cat >>confdefs.h <<_ACEOF
1872 #define PACKAGE_TARNAME "$PACKAGE_TARNAME"
1873 _ACEOF
1874
1875
1876 cat >>confdefs.h <<_ACEOF
1877 #define PACKAGE_VERSION "$PACKAGE_VERSION"
1878 _ACEOF
1879
1880
1881 cat >>confdefs.h <<_ACEOF
1882 #define PACKAGE_STRING "$PACKAGE_STRING"
1883 _ACEOF
1884
1885
1886 cat >>confdefs.h <<_ACEOF
1887 #define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
1888 _ACEOF
1889
1890
1891 # Let the site file select an alternate cache file if it wants to.
1892 # Prefer an explicitly selected file to automatically selected ones.
1893 ac_site_file1=NONE
1894 ac_site_file2=NONE
1895 if test -n "$CONFIG_SITE"; then
1896   ac_site_file1=$CONFIG_SITE
1897 elif test "x$prefix" != xNONE; then
1898   ac_site_file1=$prefix/share/config.site
1899   ac_site_file2=$prefix/etc/config.site
1900 else
1901   ac_site_file1=$ac_default_prefix/share/config.site
1902   ac_site_file2=$ac_default_prefix/etc/config.site
1903 fi
1904 for ac_site_file in "$ac_site_file1" "$ac_site_file2"
1905 do
1906   test "x$ac_site_file" = xNONE && continue
1907   if test -r "$ac_site_file"; then
1908     { $as_echo "$as_me:$LINENO: loading site script $ac_site_file" >&5
1909 $as_echo "$as_me: loading site script $ac_site_file" >&6;}
1910     sed 's/^/| /' "$ac_site_file" >&5
1911     . "$ac_site_file"
1912   fi
1913 done
1914
1915 if test -r "$cache_file"; then
1916   # Some versions of bash will fail to source /dev/null (special
1917   # files actually), so we avoid doing that.
1918   if test -f "$cache_file"; then
1919     { $as_echo "$as_me:$LINENO: loading cache $cache_file" >&5
1920 $as_echo "$as_me: loading cache $cache_file" >&6;}
1921     case $cache_file in
1922       [\\/]* | ?:[\\/]* ) . "$cache_file";;
1923       *)                      . "./$cache_file";;
1924     esac
1925   fi
1926 else
1927   { $as_echo "$as_me:$LINENO: creating cache $cache_file" >&5
1928 $as_echo "$as_me: creating cache $cache_file" >&6;}
1929   >$cache_file
1930 fi
1931
1932 # Check that the precious variables saved in the cache have kept the same
1933 # value.
1934 ac_cache_corrupted=false
1935 for ac_var in $ac_precious_vars; do
1936   eval ac_old_set=\$ac_cv_env_${ac_var}_set
1937   eval ac_new_set=\$ac_env_${ac_var}_set
1938   eval ac_old_val=\$ac_cv_env_${ac_var}_value
1939   eval ac_new_val=\$ac_env_${ac_var}_value
1940   case $ac_old_set,$ac_new_set in
1941     set,)
1942       { $as_echo "$as_me:$LINENO: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
1943 $as_echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
1944       ac_cache_corrupted=: ;;
1945     ,set)
1946       { $as_echo "$as_me:$LINENO: error: \`$ac_var' was not set in the previous run" >&5
1947 $as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
1948       ac_cache_corrupted=: ;;
1949     ,);;
1950     *)
1951       if test "x$ac_old_val" != "x$ac_new_val"; then
1952         # differences in whitespace do not lead to failure.
1953         ac_old_val_w=`echo x $ac_old_val`
1954         ac_new_val_w=`echo x $ac_new_val`
1955         if test "$ac_old_val_w" != "$ac_new_val_w"; then
1956           { $as_echo "$as_me:$LINENO: error: \`$ac_var' has changed since the previous run:" >&5
1957 $as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
1958           ac_cache_corrupted=:
1959         else
1960           { $as_echo "$as_me:$LINENO: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5
1961 $as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;}
1962           eval $ac_var=\$ac_old_val
1963         fi
1964         { $as_echo "$as_me:$LINENO:   former value:  \`$ac_old_val'" >&5
1965 $as_echo "$as_me:   former value:  \`$ac_old_val'" >&2;}
1966         { $as_echo "$as_me:$LINENO:   current value: \`$ac_new_val'" >&5
1967 $as_echo "$as_me:   current value: \`$ac_new_val'" >&2;}
1968       fi;;
1969   esac
1970   # Pass precious variables to config.status.
1971   if test "$ac_new_set" = set; then
1972     case $ac_new_val in
1973     *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
1974     *) ac_arg=$ac_var=$ac_new_val ;;
1975     esac
1976     case " $ac_configure_args " in
1977       *" '$ac_arg' "*) ;; # Avoid dups.  Use of quotes ensures accuracy.
1978       *) ac_configure_args="$ac_configure_args '$ac_arg'" ;;
1979     esac
1980   fi
1981 done
1982 if $ac_cache_corrupted; then
1983   { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5
1984 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
1985   { $as_echo "$as_me:$LINENO: error: changes in the environment can compromise the build" >&5
1986 $as_echo "$as_me: error: changes in the environment can compromise the build" >&2;}
1987   { { $as_echo "$as_me:$LINENO: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&5
1988 $as_echo "$as_me: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&2;}
1989    { (exit 1); exit 1; }; }
1990 fi
1991
1992
1993
1994
1995
1996
1997
1998
1999
2000
2001
2002
2003
2004
2005
2006
2007
2008 ac_ext=c
2009 ac_cpp='$CPP $CPPFLAGS'
2010 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2011 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2012 ac_compiler_gnu=$ac_cv_c_compiler_gnu
2013
2014
2015 ac_config_headers="$ac_config_headers config.h"
2016
2017
2018 echo "current directory: `pwd`"
2019 echo "command line was: $0 $@"
2020
2021 ###############################################################################
2022 #
2023 #       Autoheader stuff
2024 #
2025 ###############################################################################
2026
2027
2028
2029
2030
2031
2032
2033
2034
2035
2036
2037
2038
2039
2040
2041
2042
2043
2044
2045
2046
2047
2048
2049
2050
2051
2052
2053
2054
2055
2056
2057
2058
2059
2060
2061
2062
2063
2064
2065
2066
2067
2068
2069
2070
2071
2072
2073
2074
2075
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 # After checking to see that --srcdir is correct (which AC_INIT does)
2201 # check for some random other files that come later in the tar file,
2202 # to make sure everything is here.
2203 #
2204 for d in driver utils hacks hacks/glx ; do
2205   f=$srcdir/$d/Makefile.in
2206   if test \! -r $f ; then
2207     echo ""
2208     echo "ERROR: The package is incomplete: $f does not exist."
2209     echo "       This probably means that your download was truncated."
2210     echo ""
2211     exit 1
2212   fi
2213 done
2214
2215 ###############################################################################
2216 #
2217 #       Function to figure out how to run the compiler.
2218 #
2219 ###############################################################################
2220
2221
2222
2223
2224 ###############################################################################
2225 #
2226 #       Check for availability of various gcc command-line options.
2227 #
2228 ###############################################################################
2229
2230
2231
2232
2233
2234
2235
2236 # Need to disable Objective C extensions in ANSI C on MacOS X to work
2237 # around an Apple-specific gcc bug.
2238 #
2239
2240
2241 ###############################################################################
2242 #
2243 #       Function to figure out how to disable // comments in ANSI C code.
2244 #
2245 #       (With recent gcc, this is done with "-std=c89".  With older gcc, this
2246 #       is done by passing "-lang-c89" to cpp, by passing "-Wp,-lang-c89" to
2247 #       gcc.  Old gcc doesn't support -std, and new gcc doesn't support -lang.
2248 #       so much for compatibility!)
2249 #
2250 #       UPDATE: apparently there is NO WAY to tell gcc 3.2.2 to require that
2251 #       declarations preceed statements, without resorting to "-pedantic".
2252 #       This means that there is no way to get gcc3 to issue warnings that
2253 #       ensure that your code complies with the ANSI/ISO C89 standard, without
2254 #       also drowning in totally useless warnings.  Thank you master may I
2255 #       have another.
2256 #
2257 #       So, I give up, let's just use -pedantic.
2258 #
2259 ###############################################################################
2260
2261
2262
2263
2264
2265
2266 ###############################################################################
2267 #
2268 #       Function to figure out how to create directory trees.
2269 #
2270 ###############################################################################
2271
2272
2273
2274
2275 ###############################################################################
2276 #
2277 #       Function to check whether gettimeofday() exists, and how to call it.
2278 #       This may define HAVE_GETTIMEOFDAY and GETTIMEOFDAY_TWO_ARGS.
2279 #
2280 ###############################################################################
2281
2282
2283
2284
2285 ###############################################################################
2286 #
2287 #       Function to find perl5 (defines PERL and PERL_VERSION.)
2288 #
2289 ###############################################################################
2290
2291 # M4 sucks!!  perl sucks too!!
2292
2293 perl_version_cmd='print $]'
2294
2295
2296
2297
2298
2299 ###############################################################################
2300 #
2301 #       Function to demand "bc".  Losers.
2302 #
2303 ###############################################################################
2304
2305
2306
2307 ###############################################################################
2308 #
2309 #       Functions to check how to do ICMP PING requests.
2310 #
2311 ###############################################################################
2312
2313
2314
2315
2316
2317
2318 ###############################################################################
2319 #
2320 #       Functions to check for various X11 crap.
2321 #
2322 ###############################################################################
2323
2324 # Try and find the app-defaults directory.
2325 # It sucks that autoconf doesn't do this already...
2326 #
2327
2328
2329 ###############################################################################
2330 #
2331 #       Handle the --with-x-app-defaults option HERE
2332 #
2333 ###############################################################################
2334
2335
2336 # Check whether --with-x-app-defaults was given.
2337 if test "${with_x_app_defaults+set}" = set; then
2338   withval=$with_x_app_defaults; ac_cv_x_app_defaults="$withval"
2339 else
2340   eval ac_x_app_defaults="$withval"
2341 fi
2342
2343
2344
2345
2346
2347
2348
2349
2350
2351
2352
2353 # Random special-cases for X on certain pathological OSes.
2354 # You know who you are.
2355 #
2356
2357
2358
2359
2360 ###############################################################################
2361 #
2362 #       Some utility functions to make checking for X things easier.
2363 #
2364 ###############################################################################
2365
2366 # Like AC_CHECK_HEADER, but it uses the already-computed -I directories.
2367 #
2368
2369
2370 # Like AC_EGREP_HEADER, but it uses the already-computed -I directories.
2371 #
2372
2373
2374 # Like AC_TRY_COMPILE, but it uses the already-computed -I directories.
2375 #
2376
2377
2378
2379 # Like AC_CHECK_LIB, but it uses the already-computed -I and -L directories.
2380 # Use this sparingly; it probably doesn't work very well on X programs.
2381 #
2382
2383
2384 # Like AC_TRY_RUN, but it uses the already-computed -I directories.
2385 # (But not the -L directories!)
2386 #
2387
2388
2389
2390
2391 # Usage: HANDLE_X_PATH_ARG([variable_name],
2392 #                          [--command-line-option],
2393 #                          [descriptive string])
2394 #
2395 # All of the --with options take three forms:
2396 #
2397 #   --with-foo (or --with-foo=yes)
2398 #   --without-foo (or --with-foo=no)
2399 #   --with-foo=/DIR
2400 #
2401 # This function, HANDLE_X_PATH_ARG, deals with the /DIR case.  When it sees
2402 # a directory (string beginning with a slash) it checks to see whether
2403 # /DIR/include and /DIR/lib exist, and adds them to $X_CFLAGS and $X_LIBS
2404 # as appropriate.
2405 #
2406
2407
2408
2409
2410 ###############################################################################
2411 ###############################################################################
2412 #
2413 #       End of function definitions.  Now start actually executing stuff.
2414 #
2415 ###############################################################################
2416 ###############################################################################
2417
2418 # WTF!  autoconf emits this *way* too late.  Do it earlier.
2419 test "x$prefix" = xNONE && prefix=$ac_default_prefix
2420 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
2421
2422
2423 # random compiler setup
2424 ac_aux_dir=
2425 for ac_dir in "$srcdir" "$srcdir/.." "$srcdir/../.."; do
2426   if test -f "$ac_dir/install-sh"; then
2427     ac_aux_dir=$ac_dir
2428     ac_install_sh="$ac_aux_dir/install-sh -c"
2429     break
2430   elif test -f "$ac_dir/install.sh"; then
2431     ac_aux_dir=$ac_dir
2432     ac_install_sh="$ac_aux_dir/install.sh -c"
2433     break
2434   elif test -f "$ac_dir/shtool"; then
2435     ac_aux_dir=$ac_dir
2436     ac_install_sh="$ac_aux_dir/shtool install -c"
2437     break
2438   fi
2439 done
2440 if test -z "$ac_aux_dir"; then
2441   { { $as_echo "$as_me:$LINENO: error: cannot find install-sh or install.sh in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" >&5
2442 $as_echo "$as_me: error: cannot find install-sh or install.sh in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" >&2;}
2443    { (exit 1); exit 1; }; }
2444 fi
2445
2446 # These three variables are undocumented and unsupported,
2447 # and are intended to be withdrawn in a future Autoconf release.
2448 # They can cause serious problems if a builder's source tree is in a directory
2449 # whose full name contains unusual characters.
2450 ac_config_guess="$SHELL $ac_aux_dir/config.guess"  # Please don't use this var.
2451 ac_config_sub="$SHELL $ac_aux_dir/config.sub"  # Please don't use this var.
2452 ac_configure="$SHELL $ac_aux_dir/configure"  # Please don't use this var.
2453
2454
2455 # Make sure we can run config.sub.
2456 $SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 ||
2457   { { $as_echo "$as_me:$LINENO: error: cannot run $SHELL $ac_aux_dir/config.sub" >&5
2458 $as_echo "$as_me: error: cannot run $SHELL $ac_aux_dir/config.sub" >&2;}
2459    { (exit 1); exit 1; }; }
2460
2461 { $as_echo "$as_me:$LINENO: checking build system type" >&5
2462 $as_echo_n "checking build system type... " >&6; }
2463 if test "${ac_cv_build+set}" = set; then
2464   $as_echo_n "(cached) " >&6
2465 else
2466   ac_build_alias=$build_alias
2467 test "x$ac_build_alias" = x &&
2468   ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"`
2469 test "x$ac_build_alias" = x &&
2470   { { $as_echo "$as_me:$LINENO: error: cannot guess build type; you must specify one" >&5
2471 $as_echo "$as_me: error: cannot guess build type; you must specify one" >&2;}
2472    { (exit 1); exit 1; }; }
2473 ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` ||
2474   { { $as_echo "$as_me:$LINENO: error: $SHELL $ac_aux_dir/config.sub $ac_build_alias failed" >&5
2475 $as_echo "$as_me: error: $SHELL $ac_aux_dir/config.sub $ac_build_alias failed" >&2;}
2476    { (exit 1); exit 1; }; }
2477
2478 fi
2479 { $as_echo "$as_me:$LINENO: result: $ac_cv_build" >&5
2480 $as_echo "$ac_cv_build" >&6; }
2481 case $ac_cv_build in
2482 *-*-*) ;;
2483 *) { { $as_echo "$as_me:$LINENO: error: invalid value of canonical build" >&5
2484 $as_echo "$as_me: error: invalid value of canonical build" >&2;}
2485    { (exit 1); exit 1; }; };;
2486 esac
2487 build=$ac_cv_build
2488 ac_save_IFS=$IFS; IFS='-'
2489 set x $ac_cv_build
2490 shift
2491 build_cpu=$1
2492 build_vendor=$2
2493 shift; shift
2494 # Remember, the first character of IFS is used to create $*,
2495 # except with old shells:
2496 build_os=$*
2497 IFS=$ac_save_IFS
2498 case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac
2499
2500
2501 { $as_echo "$as_me:$LINENO: checking host system type" >&5
2502 $as_echo_n "checking host system type... " >&6; }
2503 if test "${ac_cv_host+set}" = set; then
2504   $as_echo_n "(cached) " >&6
2505 else
2506   if test "x$host_alias" = x; then
2507   ac_cv_host=$ac_cv_build
2508 else
2509   ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` ||
2510     { { $as_echo "$as_me:$LINENO: error: $SHELL $ac_aux_dir/config.sub $host_alias failed" >&5
2511 $as_echo "$as_me: error: $SHELL $ac_aux_dir/config.sub $host_alias failed" >&2;}
2512    { (exit 1); exit 1; }; }
2513 fi
2514
2515 fi
2516 { $as_echo "$as_me:$LINENO: result: $ac_cv_host" >&5
2517 $as_echo "$ac_cv_host" >&6; }
2518 case $ac_cv_host in
2519 *-*-*) ;;
2520 *) { { $as_echo "$as_me:$LINENO: error: invalid value of canonical host" >&5
2521 $as_echo "$as_me: error: invalid value of canonical host" >&2;}
2522    { (exit 1); exit 1; }; };;
2523 esac
2524 host=$ac_cv_host
2525 ac_save_IFS=$IFS; IFS='-'
2526 set x $ac_cv_host
2527 shift
2528 host_cpu=$1
2529 host_vendor=$2
2530 shift; shift
2531 # Remember, the first character of IFS is used to create $*,
2532 # except with old shells:
2533 host_os=$*
2534 IFS=$ac_save_IFS
2535 case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac
2536
2537
2538
2539 ac_ext=c
2540 ac_cpp='$CPP $CPPFLAGS'
2541 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2542 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2543 ac_compiler_gnu=$ac_cv_c_compiler_gnu
2544 if test -n "$ac_tool_prefix"; then
2545   # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
2546 set dummy ${ac_tool_prefix}gcc; ac_word=$2
2547 { $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
2548 $as_echo_n "checking for $ac_word... " >&6; }
2549 if test "${ac_cv_prog_CC+set}" = set; then
2550   $as_echo_n "(cached) " >&6
2551 else
2552   if test -n "$CC"; then
2553   ac_cv_prog_CC="$CC" # Let the user override the test.
2554 else
2555 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2556 for as_dir in $PATH
2557 do
2558   IFS=$as_save_IFS
2559   test -z "$as_dir" && as_dir=.
2560   for ac_exec_ext in '' $ac_executable_extensions; do
2561   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
2562     ac_cv_prog_CC="${ac_tool_prefix}gcc"
2563     $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
2564     break 2
2565   fi
2566 done
2567 done
2568 IFS=$as_save_IFS
2569
2570 fi
2571 fi
2572 CC=$ac_cv_prog_CC
2573 if test -n "$CC"; then
2574   { $as_echo "$as_me:$LINENO: result: $CC" >&5
2575 $as_echo "$CC" >&6; }
2576 else
2577   { $as_echo "$as_me:$LINENO: result: no" >&5
2578 $as_echo "no" >&6; }
2579 fi
2580
2581
2582 fi
2583 if test -z "$ac_cv_prog_CC"; then
2584   ac_ct_CC=$CC
2585   # Extract the first word of "gcc", so it can be a program name with args.
2586 set dummy gcc; ac_word=$2
2587 { $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
2588 $as_echo_n "checking for $ac_word... " >&6; }
2589 if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
2590   $as_echo_n "(cached) " >&6
2591 else
2592   if test -n "$ac_ct_CC"; then
2593   ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
2594 else
2595 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2596 for as_dir in $PATH
2597 do
2598   IFS=$as_save_IFS
2599   test -z "$as_dir" && as_dir=.
2600   for ac_exec_ext in '' $ac_executable_extensions; do
2601   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
2602     ac_cv_prog_ac_ct_CC="gcc"
2603     $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
2604     break 2
2605   fi
2606 done
2607 done
2608 IFS=$as_save_IFS
2609
2610 fi
2611 fi
2612 ac_ct_CC=$ac_cv_prog_ac_ct_CC
2613 if test -n "$ac_ct_CC"; then
2614   { $as_echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
2615 $as_echo "$ac_ct_CC" >&6; }
2616 else
2617   { $as_echo "$as_me:$LINENO: result: no" >&5
2618 $as_echo "no" >&6; }
2619 fi
2620
2621   if test "x$ac_ct_CC" = x; then
2622     CC=""
2623   else
2624     case $cross_compiling:$ac_tool_warned in
2625 yes:)
2626 { $as_echo "$as_me:$LINENO: WARNING: using cross tools not prefixed with host triplet" >&5
2627 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
2628 ac_tool_warned=yes ;;
2629 esac
2630     CC=$ac_ct_CC
2631   fi
2632 else
2633   CC="$ac_cv_prog_CC"
2634 fi
2635
2636 if test -z "$CC"; then
2637           if test -n "$ac_tool_prefix"; then
2638     # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args.
2639 set dummy ${ac_tool_prefix}cc; ac_word=$2
2640 { $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
2641 $as_echo_n "checking for $ac_word... " >&6; }
2642 if test "${ac_cv_prog_CC+set}" = set; then
2643   $as_echo_n "(cached) " >&6
2644 else
2645   if test -n "$CC"; then
2646   ac_cv_prog_CC="$CC" # Let the user override the test.
2647 else
2648 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2649 for as_dir in $PATH
2650 do
2651   IFS=$as_save_IFS
2652   test -z "$as_dir" && as_dir=.
2653   for ac_exec_ext in '' $ac_executable_extensions; do
2654   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
2655     ac_cv_prog_CC="${ac_tool_prefix}cc"
2656     $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
2657     break 2
2658   fi
2659 done
2660 done
2661 IFS=$as_save_IFS
2662
2663 fi
2664 fi
2665 CC=$ac_cv_prog_CC
2666 if test -n "$CC"; then
2667   { $as_echo "$as_me:$LINENO: result: $CC" >&5
2668 $as_echo "$CC" >&6; }
2669 else
2670   { $as_echo "$as_me:$LINENO: result: no" >&5
2671 $as_echo "no" >&6; }
2672 fi
2673
2674
2675   fi
2676 fi
2677 if test -z "$CC"; then
2678   # Extract the first word of "cc", so it can be a program name with args.
2679 set dummy cc; ac_word=$2
2680 { $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
2681 $as_echo_n "checking for $ac_word... " >&6; }
2682 if test "${ac_cv_prog_CC+set}" = set; then
2683   $as_echo_n "(cached) " >&6
2684 else
2685   if test -n "$CC"; then
2686   ac_cv_prog_CC="$CC" # Let the user override the test.
2687 else
2688   ac_prog_rejected=no
2689 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2690 for as_dir in $PATH
2691 do
2692   IFS=$as_save_IFS
2693   test -z "$as_dir" && as_dir=.
2694   for ac_exec_ext in '' $ac_executable_extensions; do
2695   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
2696     if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
2697        ac_prog_rejected=yes
2698        continue
2699      fi
2700     ac_cv_prog_CC="cc"
2701     $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
2702     break 2
2703   fi
2704 done
2705 done
2706 IFS=$as_save_IFS
2707
2708 if test $ac_prog_rejected = yes; then
2709   # We found a bogon in the path, so make sure we never use it.
2710   set dummy $ac_cv_prog_CC
2711   shift
2712   if test $# != 0; then
2713     # We chose a different compiler from the bogus one.
2714     # However, it has the same basename, so the bogon will be chosen
2715     # first if we set CC to just the basename; use the full file name.
2716     shift
2717     ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@"
2718   fi
2719 fi
2720 fi
2721 fi
2722 CC=$ac_cv_prog_CC
2723 if test -n "$CC"; then
2724   { $as_echo "$as_me:$LINENO: result: $CC" >&5
2725 $as_echo "$CC" >&6; }
2726 else
2727   { $as_echo "$as_me:$LINENO: result: no" >&5
2728 $as_echo "no" >&6; }
2729 fi
2730
2731
2732 fi
2733 if test -z "$CC"; then
2734   if test -n "$ac_tool_prefix"; then
2735   for ac_prog in cl.exe
2736   do
2737     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
2738 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
2739 { $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
2740 $as_echo_n "checking for $ac_word... " >&6; }
2741 if test "${ac_cv_prog_CC+set}" = set; then
2742   $as_echo_n "(cached) " >&6
2743 else
2744   if test -n "$CC"; then
2745   ac_cv_prog_CC="$CC" # Let the user override the test.
2746 else
2747 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2748 for as_dir in $PATH
2749 do
2750   IFS=$as_save_IFS
2751   test -z "$as_dir" && as_dir=.
2752   for ac_exec_ext in '' $ac_executable_extensions; do
2753   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
2754     ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
2755     $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
2756     break 2
2757   fi
2758 done
2759 done
2760 IFS=$as_save_IFS
2761
2762 fi
2763 fi
2764 CC=$ac_cv_prog_CC
2765 if test -n "$CC"; then
2766   { $as_echo "$as_me:$LINENO: result: $CC" >&5
2767 $as_echo "$CC" >&6; }
2768 else
2769   { $as_echo "$as_me:$LINENO: result: no" >&5
2770 $as_echo "no" >&6; }
2771 fi
2772
2773
2774     test -n "$CC" && break
2775   done
2776 fi
2777 if test -z "$CC"; then
2778   ac_ct_CC=$CC
2779   for ac_prog in cl.exe
2780 do
2781   # Extract the first word of "$ac_prog", so it can be a program name with args.
2782 set dummy $ac_prog; ac_word=$2
2783 { $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
2784 $as_echo_n "checking for $ac_word... " >&6; }
2785 if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
2786   $as_echo_n "(cached) " >&6
2787 else
2788   if test -n "$ac_ct_CC"; then
2789   ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
2790 else
2791 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2792 for as_dir in $PATH
2793 do
2794   IFS=$as_save_IFS
2795   test -z "$as_dir" && as_dir=.
2796   for ac_exec_ext in '' $ac_executable_extensions; do
2797   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
2798     ac_cv_prog_ac_ct_CC="$ac_prog"
2799     $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
2800     break 2
2801   fi
2802 done
2803 done
2804 IFS=$as_save_IFS
2805
2806 fi
2807 fi
2808 ac_ct_CC=$ac_cv_prog_ac_ct_CC
2809 if test -n "$ac_ct_CC"; then
2810   { $as_echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
2811 $as_echo "$ac_ct_CC" >&6; }
2812 else
2813   { $as_echo "$as_me:$LINENO: result: no" >&5
2814 $as_echo "no" >&6; }
2815 fi
2816
2817
2818   test -n "$ac_ct_CC" && break
2819 done
2820
2821   if test "x$ac_ct_CC" = x; then
2822     CC=""
2823   else
2824     case $cross_compiling:$ac_tool_warned in
2825 yes:)
2826 { $as_echo "$as_me:$LINENO: WARNING: using cross tools not prefixed with host triplet" >&5
2827 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
2828 ac_tool_warned=yes ;;
2829 esac
2830     CC=$ac_ct_CC
2831   fi
2832 fi
2833
2834 fi
2835
2836
2837 test -z "$CC" && { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5
2838 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2839 { { $as_echo "$as_me:$LINENO: error: no acceptable C compiler found in \$PATH
2840 See \`config.log' for more details." >&5
2841 $as_echo "$as_me: error: no acceptable C compiler found in \$PATH
2842 See \`config.log' for more details." >&2;}
2843    { (exit 1); exit 1; }; }; }
2844
2845 # Provide some information about the compiler.
2846 $as_echo "$as_me:$LINENO: checking for C compiler version" >&5
2847 set X $ac_compile
2848 ac_compiler=$2
2849 { (ac_try="$ac_compiler --version >&5"
2850 case "(($ac_try" in
2851   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2852   *) ac_try_echo=$ac_try;;
2853 esac
2854 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
2855 $as_echo "$ac_try_echo") >&5
2856   (eval "$ac_compiler --version >&5") 2>&5
2857   ac_status=$?
2858   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
2859   (exit $ac_status); }
2860 { (ac_try="$ac_compiler -v >&5"
2861 case "(($ac_try" in
2862   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2863   *) ac_try_echo=$ac_try;;
2864 esac
2865 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
2866 $as_echo "$ac_try_echo") >&5
2867   (eval "$ac_compiler -v >&5") 2>&5
2868   ac_status=$?
2869   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
2870   (exit $ac_status); }
2871 { (ac_try="$ac_compiler -V >&5"
2872 case "(($ac_try" in
2873   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2874   *) ac_try_echo=$ac_try;;
2875 esac
2876 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
2877 $as_echo "$ac_try_echo") >&5
2878   (eval "$ac_compiler -V >&5") 2>&5
2879   ac_status=$?
2880   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
2881   (exit $ac_status); }
2882
2883 cat >conftest.$ac_ext <<_ACEOF
2884 /* confdefs.h.  */
2885 _ACEOF
2886 cat confdefs.h >>conftest.$ac_ext
2887 cat >>conftest.$ac_ext <<_ACEOF
2888 /* end confdefs.h.  */
2889
2890 int
2891 main ()
2892 {
2893
2894   ;
2895   return 0;
2896 }
2897 _ACEOF
2898 ac_clean_files_save=$ac_clean_files
2899 ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out"
2900 # Try to create an executable without -o first, disregard a.out.
2901 # It will help us diagnose broken compilers, and finding out an intuition
2902 # of exeext.
2903 { $as_echo "$as_me:$LINENO: checking for C compiler default output file name" >&5
2904 $as_echo_n "checking for C compiler default output file name... " >&6; }
2905 ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
2906
2907 # The possible output files:
2908 ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*"
2909
2910 ac_rmfiles=
2911 for ac_file in $ac_files
2912 do
2913   case $ac_file in
2914     *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
2915     * ) ac_rmfiles="$ac_rmfiles $ac_file";;
2916   esac
2917 done
2918 rm -f $ac_rmfiles
2919
2920 if { (ac_try="$ac_link_default"
2921 case "(($ac_try" in
2922   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2923   *) ac_try_echo=$ac_try;;
2924 esac
2925 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
2926 $as_echo "$ac_try_echo") >&5
2927   (eval "$ac_link_default") 2>&5
2928   ac_status=$?
2929   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
2930   (exit $ac_status); }; then
2931   # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
2932 # So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
2933 # in a Makefile.  We should not override ac_cv_exeext if it was cached,
2934 # so that the user can short-circuit this test for compilers unknown to
2935 # Autoconf.
2936 for ac_file in $ac_files ''
2937 do
2938   test -f "$ac_file" || continue
2939   case $ac_file in
2940     *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj )
2941         ;;
2942     [ab].out )
2943         # We found the default executable, but exeext='' is most
2944         # certainly right.
2945         break;;
2946     *.* )
2947         if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no;
2948         then :; else
2949            ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
2950         fi
2951         # We set ac_cv_exeext here because the later test for it is not
2952         # safe: cross compilers may not add the suffix if given an `-o'
2953         # argument, so we may need to know it at that point already.
2954         # Even if this section looks crufty: it has the advantage of
2955         # actually working.
2956         break;;
2957     * )
2958         break;;
2959   esac
2960 done
2961 test "$ac_cv_exeext" = no && ac_cv_exeext=
2962
2963 else
2964   ac_file=''
2965 fi
2966
2967 { $as_echo "$as_me:$LINENO: result: $ac_file" >&5
2968 $as_echo "$ac_file" >&6; }
2969 if test -z "$ac_file"; then
2970   $as_echo "$as_me: failed program was:" >&5
2971 sed 's/^/| /' conftest.$ac_ext >&5
2972
2973 { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5
2974 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2975 { { $as_echo "$as_me:$LINENO: error: C compiler cannot create executables
2976 See \`config.log' for more details." >&5
2977 $as_echo "$as_me: error: C compiler cannot create executables
2978 See \`config.log' for more details." >&2;}
2979    { (exit 77); exit 77; }; }; }
2980 fi
2981
2982 ac_exeext=$ac_cv_exeext
2983
2984 # Check that the compiler produces executables we can run.  If not, either
2985 # the compiler is broken, or we cross compile.
2986 { $as_echo "$as_me:$LINENO: checking whether the C compiler works" >&5
2987 $as_echo_n "checking whether the C compiler works... " >&6; }
2988 # FIXME: These cross compiler hacks should be removed for Autoconf 3.0
2989 # If not cross compiling, check that we can run a simple program.
2990 if test "$cross_compiling" != yes; then
2991   if { ac_try='./$ac_file'
2992   { (case "(($ac_try" in
2993   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2994   *) ac_try_echo=$ac_try;;
2995 esac
2996 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
2997 $as_echo "$ac_try_echo") >&5
2998   (eval "$ac_try") 2>&5
2999   ac_status=$?
3000   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
3001   (exit $ac_status); }; }; then
3002     cross_compiling=no
3003   else
3004     if test "$cross_compiling" = maybe; then
3005         cross_compiling=yes
3006     else
3007         { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5
3008 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3009 { { $as_echo "$as_me:$LINENO: error: cannot run C compiled programs.
3010 If you meant to cross compile, use \`--host'.
3011 See \`config.log' for more details." >&5
3012 $as_echo "$as_me: error: cannot run C compiled programs.
3013 If you meant to cross compile, use \`--host'.
3014 See \`config.log' for more details." >&2;}
3015    { (exit 1); exit 1; }; }; }
3016     fi
3017   fi
3018 fi
3019 { $as_echo "$as_me:$LINENO: result: yes" >&5
3020 $as_echo "yes" >&6; }
3021
3022 rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out
3023 ac_clean_files=$ac_clean_files_save
3024 # Check that the compiler produces executables we can run.  If not, either
3025 # the compiler is broken, or we cross compile.
3026 { $as_echo "$as_me:$LINENO: checking whether we are cross compiling" >&5
3027 $as_echo_n "checking whether we are cross compiling... " >&6; }
3028 { $as_echo "$as_me:$LINENO: result: $cross_compiling" >&5
3029 $as_echo "$cross_compiling" >&6; }
3030
3031 { $as_echo "$as_me:$LINENO: checking for suffix of executables" >&5
3032 $as_echo_n "checking for suffix of executables... " >&6; }
3033 if { (ac_try="$ac_link"
3034 case "(($ac_try" in
3035   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3036   *) ac_try_echo=$ac_try;;
3037 esac
3038 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
3039 $as_echo "$ac_try_echo") >&5
3040   (eval "$ac_link") 2>&5
3041   ac_status=$?
3042   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
3043   (exit $ac_status); }; then
3044   # If both `conftest.exe' and `conftest' are `present' (well, observable)
3045 # catch `conftest.exe'.  For instance with Cygwin, `ls conftest' will
3046 # work properly (i.e., refer to `conftest.exe'), while it won't with
3047 # `rm'.
3048 for ac_file in conftest.exe conftest conftest.*; do
3049   test -f "$ac_file" || continue
3050   case $ac_file in
3051     *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
3052     *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
3053           break;;
3054     * ) break;;
3055   esac
3056 done
3057 else
3058   { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5
3059 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3060 { { $as_echo "$as_me:$LINENO: error: cannot compute suffix of executables: cannot compile and link
3061 See \`config.log' for more details." >&5
3062 $as_echo "$as_me: error: cannot compute suffix of executables: cannot compile and link
3063 See \`config.log' for more details." >&2;}
3064    { (exit 1); exit 1; }; }; }
3065 fi
3066
3067 rm -rf conftest$ac_cv_exeext
3068 { $as_echo "$as_me:$LINENO: result: $ac_cv_exeext" >&5
3069 $as_echo "$ac_cv_exeext" >&6; }
3070
3071 rm -rf conftest.$ac_ext
3072 EXEEXT=$ac_cv_exeext
3073 ac_exeext=$EXEEXT
3074 { $as_echo "$as_me:$LINENO: checking for suffix of object files" >&5
3075 $as_echo_n "checking for suffix of object files... " >&6; }
3076 if test "${ac_cv_objext+set}" = set; then
3077   $as_echo_n "(cached) " >&6
3078 else
3079   cat >conftest.$ac_ext <<_ACEOF
3080 /* confdefs.h.  */
3081 _ACEOF
3082 cat confdefs.h >>conftest.$ac_ext
3083 cat >>conftest.$ac_ext <<_ACEOF
3084 /* end confdefs.h.  */
3085
3086 int
3087 main ()
3088 {
3089
3090   ;
3091   return 0;
3092 }
3093 _ACEOF
3094 rm -rf conftest.o conftest.obj
3095 if { (ac_try="$ac_compile"
3096 case "(($ac_try" in
3097   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3098   *) ac_try_echo=$ac_try;;
3099 esac
3100 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
3101 $as_echo "$ac_try_echo") >&5
3102   (eval "$ac_compile") 2>&5
3103   ac_status=$?
3104   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
3105   (exit $ac_status); }; then
3106   for ac_file in conftest.o conftest.obj conftest.*; do
3107   test -f "$ac_file" || continue;
3108   case $ac_file in
3109     *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;;
3110     *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
3111        break;;
3112   esac
3113 done
3114 else
3115   $as_echo "$as_me: failed program was:" >&5
3116 sed 's/^/| /' conftest.$ac_ext >&5
3117
3118 { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5
3119 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3120 { { $as_echo "$as_me:$LINENO: error: cannot compute suffix of object files: cannot compile
3121 See \`config.log' for more details." >&5
3122 $as_echo "$as_me: error: cannot compute suffix of object files: cannot compile
3123 See \`config.log' for more details." >&2;}
3124    { (exit 1); exit 1; }; }; }
3125 fi
3126
3127 rm -rf conftest.$ac_cv_objext conftest.$ac_ext
3128 fi
3129 { $as_echo "$as_me:$LINENO: result: $ac_cv_objext" >&5
3130 $as_echo "$ac_cv_objext" >&6; }
3131 OBJEXT=$ac_cv_objext
3132 ac_objext=$OBJEXT
3133 { $as_echo "$as_me:$LINENO: checking whether we are using the GNU C compiler" >&5
3134 $as_echo_n "checking whether we are using the GNU C compiler... " >&6; }
3135 if test "${ac_cv_c_compiler_gnu+set}" = set; then
3136   $as_echo_n "(cached) " >&6
3137 else
3138   cat >conftest.$ac_ext <<_ACEOF
3139 /* confdefs.h.  */
3140 _ACEOF
3141 cat confdefs.h >>conftest.$ac_ext
3142 cat >>conftest.$ac_ext <<_ACEOF
3143 /* end confdefs.h.  */
3144
3145 int
3146 main ()
3147 {
3148 #ifndef __GNUC__
3149        choke me
3150 #endif
3151
3152   ;
3153   return 0;
3154 }
3155 _ACEOF
3156 rm -rf conftest.$ac_objext
3157 if { (ac_try="$ac_compile"
3158 case "(($ac_try" in
3159   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3160   *) ac_try_echo=$ac_try;;
3161 esac
3162 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
3163 $as_echo "$ac_try_echo") >&5
3164   (eval "$ac_compile") 2>conftest.er1
3165   ac_status=$?
3166   grep -v '^ *+' conftest.er1 >conftest.err
3167   rm -rf conftest.er1
3168   cat conftest.err >&5
3169   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
3170   (exit $ac_status); } && {
3171          test -z "$ac_c_werror_flag" ||
3172          test ! -s conftest.err
3173        } && test -s conftest.$ac_objext; then
3174   ac_compiler_gnu=yes
3175 else
3176   $as_echo "$as_me: failed program was:" >&5
3177 sed 's/^/| /' conftest.$ac_ext >&5
3178
3179         ac_compiler_gnu=no
3180 fi
3181
3182 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3183 ac_cv_c_compiler_gnu=$ac_compiler_gnu
3184
3185 fi
3186 { $as_echo "$as_me:$LINENO: result: $ac_cv_c_compiler_gnu" >&5
3187 $as_echo "$ac_cv_c_compiler_gnu" >&6; }
3188 if test $ac_compiler_gnu = yes; then
3189   GCC=yes
3190 else
3191   GCC=
3192 fi
3193 ac_test_CFLAGS=${CFLAGS+set}
3194 ac_save_CFLAGS=$CFLAGS
3195 { $as_echo "$as_me:$LINENO: checking whether $CC accepts -g" >&5
3196 $as_echo_n "checking whether $CC accepts -g... " >&6; }
3197 if test "${ac_cv_prog_cc_g+set}" = set; then
3198   $as_echo_n "(cached) " >&6
3199 else
3200   ac_save_c_werror_flag=$ac_c_werror_flag
3201    ac_c_werror_flag=yes
3202    ac_cv_prog_cc_g=no
3203    CFLAGS="-g"
3204    cat >conftest.$ac_ext <<_ACEOF
3205 /* confdefs.h.  */
3206 _ACEOF
3207 cat confdefs.h >>conftest.$ac_ext
3208 cat >>conftest.$ac_ext <<_ACEOF
3209 /* end confdefs.h.  */
3210
3211 int
3212 main ()
3213 {
3214
3215   ;
3216   return 0;
3217 }
3218 _ACEOF
3219 rm -rf conftest.$ac_objext
3220 if { (ac_try="$ac_compile"
3221 case "(($ac_try" in
3222   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3223   *) ac_try_echo=$ac_try;;
3224 esac
3225 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
3226 $as_echo "$ac_try_echo") >&5
3227   (eval "$ac_compile") 2>conftest.er1
3228   ac_status=$?
3229   grep -v '^ *+' conftest.er1 >conftest.err
3230   rm -rf conftest.er1
3231   cat conftest.err >&5
3232   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
3233   (exit $ac_status); } && {
3234          test -z "$ac_c_werror_flag" ||
3235          test ! -s conftest.err
3236        } && test -s conftest.$ac_objext; then
3237   ac_cv_prog_cc_g=yes
3238 else
3239   $as_echo "$as_me: failed program was:" >&5
3240 sed 's/^/| /' conftest.$ac_ext >&5
3241
3242         CFLAGS=""
3243       cat >conftest.$ac_ext <<_ACEOF
3244 /* confdefs.h.  */
3245 _ACEOF
3246 cat confdefs.h >>conftest.$ac_ext
3247 cat >>conftest.$ac_ext <<_ACEOF
3248 /* end confdefs.h.  */
3249
3250 int
3251 main ()
3252 {
3253
3254   ;
3255   return 0;
3256 }
3257 _ACEOF
3258 rm -rf conftest.$ac_objext
3259 if { (ac_try="$ac_compile"
3260 case "(($ac_try" in
3261   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3262   *) ac_try_echo=$ac_try;;
3263 esac
3264 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
3265 $as_echo "$ac_try_echo") >&5
3266   (eval "$ac_compile") 2>conftest.er1
3267   ac_status=$?
3268   grep -v '^ *+' conftest.er1 >conftest.err
3269   rm -rf conftest.er1
3270   cat conftest.err >&5
3271   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
3272   (exit $ac_status); } && {
3273          test -z "$ac_c_werror_flag" ||
3274          test ! -s conftest.err
3275        } && test -s conftest.$ac_objext; then
3276   :
3277 else
3278   $as_echo "$as_me: failed program was:" >&5
3279 sed 's/^/| /' conftest.$ac_ext >&5
3280
3281         ac_c_werror_flag=$ac_save_c_werror_flag
3282          CFLAGS="-g"
3283          cat >conftest.$ac_ext <<_ACEOF
3284 /* confdefs.h.  */
3285 _ACEOF
3286 cat confdefs.h >>conftest.$ac_ext
3287 cat >>conftest.$ac_ext <<_ACEOF
3288 /* end confdefs.h.  */
3289
3290 int
3291 main ()
3292 {
3293
3294   ;
3295   return 0;
3296 }
3297 _ACEOF
3298 rm -rf conftest.$ac_objext
3299 if { (ac_try="$ac_compile"
3300 case "(($ac_try" in
3301   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3302   *) ac_try_echo=$ac_try;;
3303 esac
3304 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
3305 $as_echo "$ac_try_echo") >&5
3306   (eval "$ac_compile") 2>conftest.er1
3307   ac_status=$?
3308   grep -v '^ *+' conftest.er1 >conftest.err
3309   rm -rf conftest.er1
3310   cat conftest.err >&5
3311   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
3312   (exit $ac_status); } && {
3313          test -z "$ac_c_werror_flag" ||
3314          test ! -s conftest.err
3315        } && test -s conftest.$ac_objext; then
3316   ac_cv_prog_cc_g=yes
3317 else
3318   $as_echo "$as_me: failed program was:" >&5
3319 sed 's/^/| /' conftest.$ac_ext >&5
3320
3321
3322 fi
3323
3324 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3325 fi
3326
3327 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3328 fi
3329
3330 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3331    ac_c_werror_flag=$ac_save_c_werror_flag
3332 fi
3333 { $as_echo "$as_me:$LINENO: result: $ac_cv_prog_cc_g" >&5
3334 $as_echo "$ac_cv_prog_cc_g" >&6; }
3335 if test "$ac_test_CFLAGS" = set; then
3336   CFLAGS=$ac_save_CFLAGS
3337 elif test $ac_cv_prog_cc_g = yes; then
3338   if test "$GCC" = yes; then
3339     CFLAGS="-g -O2"
3340   else
3341     CFLAGS="-g"
3342   fi
3343 else
3344   if test "$GCC" = yes; then
3345     CFLAGS="-O2"
3346   else
3347     CFLAGS=
3348   fi
3349 fi
3350 { $as_echo "$as_me:$LINENO: checking for $CC option to accept ISO C89" >&5
3351 $as_echo_n "checking for $CC option to accept ISO C89... " >&6; }
3352 if test "${ac_cv_prog_cc_c89+set}" = set; then
3353   $as_echo_n "(cached) " >&6
3354 else
3355   ac_cv_prog_cc_c89=no
3356 ac_save_CC=$CC
3357 cat >conftest.$ac_ext <<_ACEOF
3358 /* confdefs.h.  */
3359 _ACEOF
3360 cat confdefs.h >>conftest.$ac_ext
3361 cat >>conftest.$ac_ext <<_ACEOF
3362 /* end confdefs.h.  */
3363 #include <stdarg.h>
3364 #include <stdio.h>
3365 #include <sys/types.h>
3366 #include <sys/stat.h>
3367 /* Most of the following tests are stolen from RCS 5.7's src/conf.sh.  */
3368 struct buf { int x; };
3369 FILE * (*rcsopen) (struct buf *, struct stat *, int);
3370 static char *e (p, i)
3371      char **p;
3372      int i;
3373 {
3374   return p[i];
3375 }
3376 static char *f (char * (*g) (char **, int), char **p, ...)
3377 {
3378   char *s;
3379   va_list v;
3380   va_start (v,p);
3381   s = g (p, va_arg (v,int));
3382   va_end (v);
3383   return s;
3384 }
3385
3386 /* OSF 4.0 Compaq cc is some sort of almost-ANSI by default.  It has
3387    function prototypes and stuff, but not '\xHH' hex character constants.
3388    These don't provoke an error unfortunately, instead are silently treated
3389    as 'x'.  The following induces an error, until -std is added to get
3390    proper ANSI mode.  Curiously '\x00'!='x' always comes out true, for an
3391    array size at least.  It's necessary to write '\x00'==0 to get something
3392    that's true only with -std.  */
3393 int osf4_cc_array ['\x00' == 0 ? 1 : -1];
3394
3395 /* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
3396    inside strings and character constants.  */
3397 #define FOO(x) 'x'
3398 int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
3399
3400 int test (int i, double x);
3401 struct s1 {int (*f) (int a);};
3402 struct s2 {int (*f) (double a);};
3403 int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
3404 int argc;
3405 char **argv;
3406 int
3407 main ()
3408 {
3409 return f (e, argv, 0) != argv[0]  ||  f (e, argv, 1) != argv[1];
3410   ;
3411   return 0;
3412 }
3413 _ACEOF
3414 for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
3415         -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
3416 do
3417   CC="$ac_save_CC $ac_arg"
3418   rm -rf conftest.$ac_objext
3419 if { (ac_try="$ac_compile"
3420 case "(($ac_try" in
3421   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3422   *) ac_try_echo=$ac_try;;
3423 esac
3424 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
3425 $as_echo "$ac_try_echo") >&5
3426   (eval "$ac_compile") 2>conftest.er1
3427   ac_status=$?
3428   grep -v '^ *+' conftest.er1 >conftest.err
3429   rm -rf conftest.er1
3430   cat conftest.err >&5
3431   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
3432   (exit $ac_status); } && {
3433          test -z "$ac_c_werror_flag" ||
3434          test ! -s conftest.err
3435        } && test -s conftest.$ac_objext; then
3436   ac_cv_prog_cc_c89=$ac_arg
3437 else
3438   $as_echo "$as_me: failed program was:" >&5
3439 sed 's/^/| /' conftest.$ac_ext >&5
3440
3441
3442 fi
3443
3444 rm -f core conftest.err conftest.$ac_objext
3445   test "x$ac_cv_prog_cc_c89" != "xno" && break
3446 done
3447 rm -rf conftest.$ac_ext
3448 CC=$ac_save_CC
3449
3450 fi
3451 # AC_CACHE_VAL
3452 case "x$ac_cv_prog_cc_c89" in
3453   x)
3454     { $as_echo "$as_me:$LINENO: result: none needed" >&5
3455 $as_echo "none needed" >&6; } ;;
3456   xno)
3457     { $as_echo "$as_me:$LINENO: result: unsupported" >&5
3458 $as_echo "unsupported" >&6; } ;;
3459   *)
3460     CC="$CC $ac_cv_prog_cc_c89"
3461     { $as_echo "$as_me:$LINENO: result: $ac_cv_prog_cc_c89" >&5
3462 $as_echo "$ac_cv_prog_cc_c89" >&6; } ;;
3463 esac
3464
3465
3466 ac_ext=c
3467 ac_cpp='$CPP $CPPFLAGS'
3468 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3469 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3470 ac_compiler_gnu=$ac_cv_c_compiler_gnu
3471
3472
3473   if test -z "$GCC"; then
3474     # not using GCC
3475     { $as_echo "$as_me:$LINENO: checking how to request ANSI compilation" >&5
3476 $as_echo_n "checking how to request ANSI compilation... " >&6; }
3477     case "$host" in
3478       *-hpux* )
3479         { $as_echo "$as_me:$LINENO: result: HPUX: adding -Ae" >&5
3480 $as_echo "HPUX: adding -Ae" >&6; }
3481         CC="$CC -Ae"
3482       ;;
3483       *-aix* )
3484         { $as_echo "$as_me:$LINENO: result: AIX: adding -qlanglvl=ansi -qhalt=e" >&5
3485 $as_echo "AIX: adding -qlanglvl=ansi -qhalt=e" >&6; }
3486         CC="$CC -qlanglvl=ansi -qhalt=e"
3487       ;;
3488       *-dec-* )
3489         { $as_echo "$as_me:$LINENO: result: DEC: adding -std1 -ieee" >&5
3490 $as_echo "DEC: adding -std1 -ieee" >&6; }
3491         CC="$CC -std1"
3492       ;;
3493       *)
3494         { $as_echo "$as_me:$LINENO: result: no idea" >&5
3495 $as_echo "no idea" >&6; }
3496       ;;
3497     esac
3498   else
3499     # using GCC
3500     case "$host" in
3501       *-solaris*)
3502         { $as_echo "$as_me:$LINENO: result: Solaris: adding -D__EXTENSIONS__" >&5
3503 $as_echo "Solaris: adding -D__EXTENSIONS__" >&6; }
3504         CC="$CC -D__EXTENSIONS__"
3505       ;;
3506     esac
3507   fi
3508
3509   OBJCC="$CC"
3510
3511   { $as_echo "$as_me:$LINENO: checking whether the compiler works on ANSI C" >&5
3512 $as_echo_n "checking whether the compiler works on ANSI C... " >&6; }
3513   if test "$cross_compiling" = yes; then
3514   { { $as_echo "$as_me:$LINENO: error: Couldn't build even a trivial ANSI C program: check CC." >&5
3515 $as_echo "$as_me: error: Couldn't build even a trivial ANSI C program: check CC." >&2;}
3516    { (exit 1); exit 1; }; }
3517 else
3518   cat >conftest.$ac_ext <<_ACEOF
3519 /* confdefs.h.  */
3520 _ACEOF
3521 cat confdefs.h >>conftest.$ac_ext
3522 cat >>conftest.$ac_ext <<_ACEOF
3523 /* end confdefs.h.  */
3524  main(int ac, char **av) { return 0; }
3525 _ACEOF
3526 rm -rf conftest$ac_exeext
3527 if { (ac_try="$ac_link"
3528 case "(($ac_try" in
3529   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3530   *) ac_try_echo=$ac_try;;
3531 esac
3532 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
3533 $as_echo "$ac_try_echo") >&5
3534   (eval "$ac_link") 2>&5
3535   ac_status=$?
3536   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
3537   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
3538   { (case "(($ac_try" in
3539   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3540   *) ac_try_echo=$ac_try;;
3541 esac
3542 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
3543 $as_echo "$ac_try_echo") >&5
3544   (eval "$ac_try") 2>&5
3545   ac_status=$?
3546   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
3547   (exit $ac_status); }; }; then
3548   { $as_echo "$as_me:$LINENO: result: yes" >&5
3549 $as_echo "yes" >&6; }
3550 else
3551   $as_echo "$as_me: program exited with status $ac_status" >&5
3552 $as_echo "$as_me: failed program was:" >&5
3553 sed 's/^/| /' conftest.$ac_ext >&5
3554
3555 ( exit $ac_status )
3556 { $as_echo "$as_me:$LINENO: result: no" >&5
3557 $as_echo "no" >&6; }
3558      { { $as_echo "$as_me:$LINENO: error: Couldn't build even a trivial ANSI C program: check CC." >&5
3559 $as_echo "$as_me: error: Couldn't build even a trivial ANSI C program: check CC." >&2;}
3560    { (exit 1); exit 1; }; }
3561 fi
3562 rm -rf conftest.dSYM
3563 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
3564 fi
3565
3566
3567
3568   if test -n "$GCC"; then
3569     { $as_echo "$as_me:$LINENO: result: Turning on gcc compiler warnings." >&5
3570 $as_echo "Turning on gcc compiler warnings." >&6; }
3571     CC="$CC -pedantic -Wall -Wstrict-prototypes -Wnested-externs -Wmissing-prototypes"
3572     OBJCC="$OBJCC -Wall"
3573     # As of gcc 3.4, we have "-Wdeclaration-after-statement"
3574     # and so perhaps now we can do without -pedantic?
3575   else
3576     case "$host" in
3577       *-irix5* |*-irix6.0-3* )
3578         { $as_echo "$as_me:$LINENO: result: Turning on SGI compiler warnings." >&5
3579 $as_echo "Turning on SGI compiler warnings." >&6; }
3580         CC="$CC -fullwarn -use_readonly_const -rdata_shared -g3"
3581       ;;
3582 #     *-dec-osf* )
3583 #       if test -z "$GCC"; then
3584 #         AC_MSG_RESULT(Turning on DEC C compiler warnings.)
3585 #         CC="$CC -migrate -w0 -verbose -warnprotos"
3586 #       fi
3587 #     ;;
3588     esac
3589   fi
3590
3591 if test -n "$GCC"; then
3592    { $as_echo "$as_me:$LINENO: checking whether gcc accepts -Wno-overlength-strings" >&5
3593 $as_echo_n "checking whether gcc accepts -Wno-overlength-strings... " >&6; }
3594 if test "${ac_cv_gcc_accepts_no_overlength+set}" = set; then
3595   $as_echo_n "(cached) " >&6
3596 else
3597   rm -rf conftest.$ac_ext
3598      touch conftest.$ac_ext
3599      if ( ( gcc -c -Wno-overlength-strings conftest.$ac_ext -o/dev/null >/dev/null ) 2>&1 | \
3600           grep unrecognized >/dev/null ); then
3601        ac_cv_gcc_accepts_no_overlength=no
3602      else
3603        ac_cv_gcc_accepts_no_overlength=yes
3604        CC="$CC -Wno-overlength-strings"
3605      fi
3606 fi
3607 { $as_echo "$as_me:$LINENO: result: $ac_cv_gcc_accepts_no_overlength" >&5
3608 $as_echo "$ac_cv_gcc_accepts_no_overlength" >&6; }
3609    ac_gcc_accepts_no_overlength="$ac_cv_gcc_accepts_no_overlength"
3610   fi
3611
3612 if test -n "$GCC"; then
3613    { $as_echo "$as_me:$LINENO: checking whether gcc accepts -Wdeclaration-after-statement" >&5
3614 $as_echo_n "checking whether gcc accepts -Wdeclaration-after-statement... " >&6; }
3615 if test "${ac_cv_gcc_accepts_no_decl_after+set}" = set; then
3616   $as_echo_n "(cached) " >&6
3617 else
3618   rm -rf conftest.$ac_ext
3619      touch conftest.$ac_ext
3620      if ( ( gcc -c -Wdeclaration-after-statement conftest.$ac_ext -o/dev/null >/dev/null ) 2>&1 | \
3621           grep unrecognized >/dev/null ); then
3622        ac_cv_gcc_accepts_no_decl_after=no
3623      else
3624        ac_cv_gcc_accepts_no_decl_after=yes
3625        CC="$CC -Wdeclaration-after-statement"
3626      fi
3627 fi
3628 { $as_echo "$as_me:$LINENO: result: $ac_cv_gcc_accepts_no_decl_after" >&5
3629 $as_echo "$ac_cv_gcc_accepts_no_decl_after" >&6; }
3630    ac_gcc_accepts_no_decl_after="$ac_cv_gcc_accepts_no_decl_after"
3631   fi
3632
3633 if test -n "$GCC"; then
3634    { $as_echo "$as_me:$LINENO: checking whether gcc accepts -no-cpp-precomp" >&5
3635 $as_echo_n "checking whether gcc accepts -no-cpp-precomp... " >&6; }
3636 if test "${ac_cv_gcc_accepts_no_cpp_precomp+set}" = set; then
3637   $as_echo_n "(cached) " >&6
3638 else
3639   rm -rf conftest.$ac_ext
3640      touch conftest.$ac_ext
3641      if ( ( gcc -c -no-cpp-precomp conftest.$ac_ext -o/dev/null >/dev/null ) 2>&1 | \
3642           grep unrecognized >/dev/null ); then
3643        ac_cv_gcc_accepts_no_cpp_precomp=no
3644      else
3645        ac_cv_gcc_accepts_no_cpp_precomp=yes
3646        CC="$CC -no-cpp-precomp"
3647      fi
3648 fi
3649 { $as_echo "$as_me:$LINENO: result: $ac_cv_gcc_accepts_no_cpp_precomp" >&5
3650 $as_echo "$ac_cv_gcc_accepts_no_cpp_precomp" >&6; }
3651    ac_gcc_accepts_no_cpp_precomp="$ac_cv_gcc_accepts_no_cpp_precomp"
3652   fi
3653
3654 if test -n "$GCC"; then
3655
3656   case "$host" in
3657     *-darwin* )
3658       # Fucking Apple let // comments sneak into OpenGL headers, so
3659       # we *must* allow // comments when compiling on Mac OS 10.6!  FUCK!
3660     ;;
3661    *)
3662      if test -n "$GCC"; then
3663    { $as_echo "$as_me:$LINENO: checking whether gcc accepts -std=c89" >&5
3664 $as_echo_n "checking whether gcc accepts -std=c89... " >&6; }
3665 if test "${ac_cv_gcc_accepts_std+set}" = set; then
3666   $as_echo_n "(cached) " >&6
3667 else
3668   rm -rf conftest.$ac_ext
3669      touch conftest.$ac_ext
3670      if ( ( gcc -c -std=c89 conftest.$ac_ext -o/dev/null >/dev/null ) 2>&1 | \
3671           grep unrecognized >/dev/null ); then
3672        ac_cv_gcc_accepts_std=no
3673      else
3674        ac_cv_gcc_accepts_std=yes
3675        CC="$CC -std=c89"
3676      fi
3677 fi
3678 { $as_echo "$as_me:$LINENO: result: $ac_cv_gcc_accepts_std" >&5
3679 $as_echo "$ac_cv_gcc_accepts_std" >&6; }
3680    ac_gcc_accepts_std="$ac_cv_gcc_accepts_std"
3681   fi
3682
3683    ;;
3684   esac
3685
3686    { $as_echo "$as_me:$LINENO: result: Disabling C++ comments in ANSI C code." >&5
3687 $as_echo "Disabling C++ comments in ANSI C code." >&6; }
3688    #
3689    # The reason that // comments are banned from xscreensaver is that gcc is
3690    # basically the only compiler in the world that supports them in C code.
3691    # All other vendors support them only in their C++ compilers, not in their
3692    # ANSI C compilers.  This means that it's a portability problem: every time
3693    # these comments have snuck into the xscreensaver source code, I've gotten
3694    # complaints about it the next day.  So we turn off support for them in gcc
3695    # as well to prevent them from accidentially slipping in.
3696    #
3697    if test "$ac_gcc_accepts_std" = yes ; then
3698      #
3699      # -std=c89 defines __STRICT_ANSI__, which we don't want.
3700      # (That appears to be the only additional preprocessor symbol
3701      # it defines, in addition to the syntax changes it makes.)
3702      #
3703      # -std=gnu89 is no good, because // comments were a GNU extension
3704      # before they were in the ANSI C 99 spec...  (gcc 2.96 permits //
3705      # with -std=gnu89 but not with -std=c89.)
3706      #
3707      # $CC already contains "-std=c89" via AC_GCC_ACCEPTS_STD
3708      CC="$CC -U__STRICT_ANSI__"
3709 #   else
3710 #     # The old way:
3711 #     CC="$CC -Wp,-lang-c89"
3712    fi
3713   fi
3714
3715 ac_ext=c
3716 ac_cpp='$CPP $CPPFLAGS'
3717 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3718 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3719 ac_compiler_gnu=$ac_cv_c_compiler_gnu
3720 { $as_echo "$as_me:$LINENO: checking how to run the C preprocessor" >&5
3721 $as_echo_n "checking how to run the C preprocessor... " >&6; }
3722 # On Suns, sometimes $CPP names a directory.
3723 if test -n "$CPP" && test -d "$CPP"; then
3724   CPP=
3725 fi
3726 if test -z "$CPP"; then
3727   if test "${ac_cv_prog_CPP+set}" = set; then
3728   $as_echo_n "(cached) " >&6
3729 else
3730       # Double quotes because CPP needs to be expanded
3731     for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
3732     do
3733       ac_preproc_ok=false
3734 for ac_c_preproc_warn_flag in '' yes
3735 do
3736   # Use a header file that comes with gcc, so configuring glibc
3737   # with a fresh cross-compiler works.
3738   # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
3739   # <limits.h> exists even on freestanding compilers.
3740   # On the NeXT, cc -E runs the code through the compiler's parser,
3741   # not just through cpp. "Syntax error" is here to catch this case.
3742   cat >conftest.$ac_ext <<_ACEOF
3743 /* confdefs.h.  */
3744 _ACEOF
3745 cat confdefs.h >>conftest.$ac_ext
3746 cat >>conftest.$ac_ext <<_ACEOF
3747 /* end confdefs.h.  */
3748 #ifdef __STDC__
3749 # include <limits.h>
3750 #else
3751 # include <assert.h>
3752 #endif
3753                      Syntax error
3754 _ACEOF
3755 if { (ac_try="$ac_cpp conftest.$ac_ext"
3756 case "(($ac_try" in
3757   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3758   *) ac_try_echo=$ac_try;;
3759 esac
3760 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
3761 $as_echo "$ac_try_echo") >&5
3762   (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
3763   ac_status=$?
3764   grep -v '^ *+' conftest.er1 >conftest.err
3765   rm -rf conftest.er1
3766   cat conftest.err >&5
3767   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
3768   (exit $ac_status); } >/dev/null && {
3769          test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
3770          test ! -s conftest.err
3771        }; then
3772   :
3773 else
3774   $as_echo "$as_me: failed program was:" >&5
3775 sed 's/^/| /' conftest.$ac_ext >&5
3776
3777   # Broken: fails on valid input.
3778 continue
3779 fi
3780
3781 rm -rf conftest.err conftest.$ac_ext
3782
3783   # OK, works on sane cases.  Now check whether nonexistent headers
3784   # can be detected and how.
3785   cat >conftest.$ac_ext <<_ACEOF
3786 /* confdefs.h.  */
3787 _ACEOF
3788 cat confdefs.h >>conftest.$ac_ext
3789 cat >>conftest.$ac_ext <<_ACEOF
3790 /* end confdefs.h.  */
3791 #include <ac_nonexistent.h>
3792 _ACEOF
3793 if { (ac_try="$ac_cpp conftest.$ac_ext"
3794 case "(($ac_try" in
3795   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3796   *) ac_try_echo=$ac_try;;
3797 esac
3798 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
3799 $as_echo "$ac_try_echo") >&5
3800   (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
3801   ac_status=$?
3802   grep -v '^ *+' conftest.er1 >conftest.err
3803   rm -rf conftest.er1
3804   cat conftest.err >&5
3805   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
3806   (exit $ac_status); } >/dev/null && {
3807          test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
3808          test ! -s conftest.err
3809        }; then
3810   # Broken: success on invalid input.
3811 continue
3812 else
3813   $as_echo "$as_me: failed program was:" >&5
3814 sed 's/^/| /' conftest.$ac_ext >&5
3815
3816   # Passes both tests.
3817 ac_preproc_ok=:
3818 break
3819 fi
3820
3821 rm -rf conftest.err conftest.$ac_ext
3822
3823 done
3824 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
3825 rm -rf conftest.err conftest.$ac_ext
3826 if $ac_preproc_ok; then
3827   break
3828 fi
3829
3830     done
3831     ac_cv_prog_CPP=$CPP
3832
3833 fi
3834   CPP=$ac_cv_prog_CPP
3835 else
3836   ac_cv_prog_CPP=$CPP
3837 fi
3838 { $as_echo "$as_me:$LINENO: result: $CPP" >&5
3839 $as_echo "$CPP" >&6; }
3840 ac_preproc_ok=false
3841 for ac_c_preproc_warn_flag in '' yes
3842 do
3843   # Use a header file that comes with gcc, so configuring glibc
3844   # with a fresh cross-compiler works.
3845   # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
3846   # <limits.h> exists even on freestanding compilers.
3847   # On the NeXT, cc -E runs the code through the compiler's parser,
3848   # not just through cpp. "Syntax error" is here to catch this case.
3849   cat >conftest.$ac_ext <<_ACEOF
3850 /* confdefs.h.  */
3851 _ACEOF
3852 cat confdefs.h >>conftest.$ac_ext
3853 cat >>conftest.$ac_ext <<_ACEOF
3854 /* end confdefs.h.  */
3855 #ifdef __STDC__
3856 # include <limits.h>
3857 #else
3858 # include <assert.h>
3859 #endif
3860                      Syntax error
3861 _ACEOF
3862 if { (ac_try="$ac_cpp conftest.$ac_ext"
3863 case "(($ac_try" in
3864   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3865   *) ac_try_echo=$ac_try;;
3866 esac
3867 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
3868 $as_echo "$ac_try_echo") >&5
3869   (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
3870   ac_status=$?
3871   grep -v '^ *+' conftest.er1 >conftest.err
3872   rm -rf conftest.er1
3873   cat conftest.err >&5
3874   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
3875   (exit $ac_status); } >/dev/null && {
3876          test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
3877          test ! -s conftest.err
3878        }; then
3879   :
3880 else
3881   $as_echo "$as_me: failed program was:" >&5
3882 sed 's/^/| /' conftest.$ac_ext >&5
3883
3884   # Broken: fails on valid input.
3885 continue
3886 fi
3887
3888 rm -rf conftest.err conftest.$ac_ext
3889
3890   # OK, works on sane cases.  Now check whether nonexistent headers
3891   # can be detected and how.
3892   cat >conftest.$ac_ext <<_ACEOF
3893 /* confdefs.h.  */
3894 _ACEOF
3895 cat confdefs.h >>conftest.$ac_ext
3896 cat >>conftest.$ac_ext <<_ACEOF
3897 /* end confdefs.h.  */
3898 #include <ac_nonexistent.h>
3899 _ACEOF
3900 if { (ac_try="$ac_cpp conftest.$ac_ext"
3901 case "(($ac_try" in
3902   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3903   *) ac_try_echo=$ac_try;;
3904 esac
3905 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
3906 $as_echo "$ac_try_echo") >&5
3907   (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
3908   ac_status=$?
3909   grep -v '^ *+' conftest.er1 >conftest.err
3910   rm -rf conftest.er1
3911   cat conftest.err >&5
3912   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
3913   (exit $ac_status); } >/dev/null && {
3914          test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
3915          test ! -s conftest.err
3916        }; then
3917   # Broken: success on invalid input.
3918 continue
3919 else
3920   $as_echo "$as_me: failed program was:" >&5
3921 sed 's/^/| /' conftest.$ac_ext >&5
3922
3923   # Passes both tests.
3924 ac_preproc_ok=:
3925 break
3926 fi
3927
3928 rm -rf conftest.err conftest.$ac_ext
3929
3930 done
3931 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
3932 rm -rf conftest.err conftest.$ac_ext
3933 if $ac_preproc_ok; then
3934   :
3935 else
3936   { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5
3937 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3938 { { $as_echo "$as_me:$LINENO: error: C preprocessor \"$CPP\" fails sanity check
3939 See \`config.log' for more details." >&5
3940 $as_echo "$as_me: error: C preprocessor \"$CPP\" fails sanity check
3941 See \`config.log' for more details." >&2;}
3942    { (exit 1); exit 1; }; }; }
3943 fi
3944
3945 ac_ext=c
3946 ac_cpp='$CPP $CPPFLAGS'
3947 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3948 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3949 ac_compiler_gnu=$ac_cv_c_compiler_gnu
3950
3951 { $as_echo "$as_me:$LINENO: checking for an ANSI C-conforming const" >&5
3952 $as_echo_n "checking for an ANSI C-conforming const... " >&6; }
3953 if test "${ac_cv_c_const+set}" = set; then
3954   $as_echo_n "(cached) " >&6
3955 else
3956   cat >conftest.$ac_ext <<_ACEOF
3957 /* confdefs.h.  */
3958 _ACEOF
3959 cat confdefs.h >>conftest.$ac_ext
3960 cat >>conftest.$ac_ext <<_ACEOF
3961 /* end confdefs.h.  */
3962
3963 int
3964 main ()
3965 {
3966 /* FIXME: Include the comments suggested by Paul. */
3967 #ifndef __cplusplus
3968   /* Ultrix mips cc rejects this.  */
3969   typedef int charset[2];
3970   const charset cs;
3971   /* SunOS 4.1.1 cc rejects this.  */
3972   char const *const *pcpcc;
3973   char **ppc;
3974   /* NEC SVR4.0.2 mips cc rejects this.  */
3975   struct point {int x, y;};
3976   static struct point const zero = {0,0};
3977   /* AIX XL C 1.02.0.0 rejects this.
3978      It does not let you subtract one const X* pointer from another in
3979      an arm of an if-expression whose if-part is not a constant
3980      expression */
3981   const char *g = "string";
3982   pcpcc = &g + (g ? g-g : 0);
3983   /* HPUX 7.0 cc rejects these. */
3984   ++pcpcc;
3985   ppc = (char**) pcpcc;
3986   pcpcc = (char const *const *) ppc;
3987   { /* SCO 3.2v4 cc rejects this.  */
3988     char *t;
3989     char const *s = 0 ? (char *) 0 : (char const *) 0;
3990
3991     *t++ = 0;
3992     if (s) return 0;
3993   }
3994   { /* Someone thinks the Sun supposedly-ANSI compiler will reject this.  */
3995     int x[] = {25, 17};
3996     const int *foo = &x[0];
3997     ++foo;
3998   }
3999   { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
4000     typedef const int *iptr;
4001     iptr p = 0;
4002     ++p;
4003   }
4004   { /* AIX XL C 1.02.0.0 rejects this saying
4005        "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
4006     struct s { int j; const int *ap[3]; };
4007     struct s *b; b->j = 5;
4008   }
4009   { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
4010     const int foo = 10;
4011     if (!foo) return 0;
4012   }
4013   return !cs[0] && !zero.x;
4014 #endif
4015
4016   ;
4017   return 0;
4018 }
4019 _ACEOF
4020 rm -rf conftest.$ac_objext
4021 if { (ac_try="$ac_compile"
4022 case "(($ac_try" in
4023   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4024   *) ac_try_echo=$ac_try;;
4025 esac
4026 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
4027 $as_echo "$ac_try_echo") >&5
4028   (eval "$ac_compile") 2>conftest.er1
4029   ac_status=$?
4030   grep -v '^ *+' conftest.er1 >conftest.err
4031   rm -rf conftest.er1
4032   cat conftest.err >&5
4033   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
4034   (exit $ac_status); } && {
4035          test -z "$ac_c_werror_flag" ||
4036          test ! -s conftest.err
4037        } && test -s conftest.$ac_objext; then
4038   ac_cv_c_const=yes
4039 else
4040   $as_echo "$as_me: failed program was:" >&5
4041 sed 's/^/| /' conftest.$ac_ext >&5
4042
4043         ac_cv_c_const=no
4044 fi
4045
4046 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4047 fi
4048 { $as_echo "$as_me:$LINENO: result: $ac_cv_c_const" >&5
4049 $as_echo "$ac_cv_c_const" >&6; }
4050 if test $ac_cv_c_const = no; then
4051
4052 cat >>confdefs.h <<\_ACEOF
4053 #define const /**/
4054 _ACEOF
4055
4056 fi
4057
4058 { $as_echo "$as_me:$LINENO: checking for inline" >&5
4059 $as_echo_n "checking for inline... " >&6; }
4060 if test "${ac_cv_c_inline+set}" = set; then
4061   $as_echo_n "(cached) " >&6
4062 else
4063   ac_cv_c_inline=no
4064 for ac_kw in inline __inline__ __inline; do
4065   cat >conftest.$ac_ext <<_ACEOF
4066 /* confdefs.h.  */
4067 _ACEOF
4068 cat confdefs.h >>conftest.$ac_ext
4069 cat >>conftest.$ac_ext <<_ACEOF
4070 /* end confdefs.h.  */
4071 #ifndef __cplusplus
4072 typedef int foo_t;
4073 static $ac_kw foo_t static_foo () {return 0; }
4074 $ac_kw foo_t foo () {return 0; }
4075 #endif
4076
4077 _ACEOF
4078 rm -rf conftest.$ac_objext
4079 if { (ac_try="$ac_compile"
4080 case "(($ac_try" in
4081   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4082   *) ac_try_echo=$ac_try;;
4083 esac
4084 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
4085 $as_echo "$ac_try_echo") >&5
4086   (eval "$ac_compile") 2>conftest.er1
4087   ac_status=$?
4088   grep -v '^ *+' conftest.er1 >conftest.err
4089   rm -rf conftest.er1
4090   cat conftest.err >&5
4091   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
4092   (exit $ac_status); } && {
4093          test -z "$ac_c_werror_flag" ||
4094          test ! -s conftest.err
4095        } && test -s conftest.$ac_objext; then
4096   ac_cv_c_inline=$ac_kw
4097 else
4098   $as_echo "$as_me: failed program was:" >&5
4099 sed 's/^/| /' conftest.$ac_ext >&5
4100
4101
4102 fi
4103
4104 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4105   test "$ac_cv_c_inline" != no && break
4106 done
4107
4108 fi
4109 { $as_echo "$as_me:$LINENO: result: $ac_cv_c_inline" >&5
4110 $as_echo "$ac_cv_c_inline" >&6; }
4111
4112
4113 case $ac_cv_c_inline in
4114   inline | yes) ;;
4115   *)
4116     case $ac_cv_c_inline in
4117       no) ac_val=;;
4118       *) ac_val=$ac_cv_c_inline;;
4119     esac
4120     cat >>confdefs.h <<_ACEOF
4121 #ifndef __cplusplus
4122 #define inline $ac_val
4123 #endif
4124 _ACEOF
4125     ;;
4126 esac
4127
4128
4129 ac_bc_result=`echo 6+9 | bc 2>/dev/null`
4130   { $as_echo "$as_me:$LINENO: checking for bc" >&5
4131 $as_echo_n "checking for bc... " >&6; }
4132   if test "$ac_bc_result" = "15" ; then
4133     { $as_echo "$as_me:$LINENO: result: yes" >&5
4134 $as_echo "yes" >&6; }
4135   else
4136     { $as_echo "$as_me:$LINENO: result: no" >&5
4137 $as_echo "no" >&6; }
4138     echo ''
4139     { { $as_echo "$as_me:$LINENO: error: Your system doesn't have \"bc\", which has been a standard
4140                   part of Unix since the 1970s.  Come back when your vendor
4141                   has grown a clue." >&5
4142 $as_echo "$as_me: error: Your system doesn't have \"bc\", which has been a standard
4143                   part of Unix since the 1970s.  Come back when your vendor
4144                   has grown a clue." >&2;}
4145    { (exit 1); exit 1; }; }
4146   fi
4147
4148
4149 # stuff for Makefiles
4150 # Find a good install program.  We prefer a C program (faster),
4151 # so one script is as good as another.  But avoid the broken or
4152 # incompatible versions:
4153 # SysV /etc/install, /usr/sbin/install
4154 # SunOS /usr/etc/install
4155 # IRIX /sbin/install
4156 # AIX /bin/install
4157 # AmigaOS /C/install, which installs bootblocks on floppy discs
4158 # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
4159 # AFS /usr/afsws/bin/install, which mishandles nonexistent args
4160 # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
4161 # OS/2's system install, which has a completely different semantic
4162 # ./install, which can be erroneously created by make from ./install.sh.
4163 # Reject install programs that cannot install multiple files.
4164 { $as_echo "$as_me:$LINENO: checking for a BSD-compatible install" >&5
4165 $as_echo_n "checking for a BSD-compatible install... " >&6; }
4166 if test -z "$INSTALL"; then
4167 if test "${ac_cv_path_install+set}" = set; then
4168   $as_echo_n "(cached) " >&6
4169 else
4170   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4171 for as_dir in $PATH
4172 do
4173   IFS=$as_save_IFS
4174   test -z "$as_dir" && as_dir=.
4175   # Account for people who put trailing slashes in PATH elements.
4176 case $as_dir/ in
4177   ./ | .// | /cC/* | \
4178   /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \
4179   ?:\\/os2\\/install\\/* | ?:\\/OS2\\/INSTALL\\/* | \
4180   /usr/ucb/* ) ;;
4181   *)
4182     # OSF1 and SCO ODT 3.0 have their own names for install.
4183     # Don't use installbsd from OSF since it installs stuff as root
4184     # by default.
4185     for ac_prog in ginstall scoinst install; do
4186       for ac_exec_ext in '' $ac_executable_extensions; do
4187         if { test -f "$as_dir/$ac_prog$ac_exec_ext" && $as_test_x "$as_dir/$ac_prog$ac_exec_ext"; }; then
4188           if test $ac_prog = install &&
4189             grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
4190             # AIX install.  It has an incompatible calling convention.
4191             :
4192           elif test $ac_prog = install &&
4193             grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
4194             # program-specific install script used by HP pwplus--don't use.
4195             :
4196           else
4197             rm -rf conftest.one conftest.two conftest.dir
4198             echo one > conftest.one
4199             echo two > conftest.two
4200             mkdir conftest.dir
4201             if "$as_dir/$ac_prog$ac_exec_ext" -c conftest.one conftest.two "`pwd`/conftest.dir" &&
4202               test -s conftest.one && test -s conftest.two &&
4203               test -s conftest.dir/conftest.one &&
4204               test -s conftest.dir/conftest.two
4205             then
4206               ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c"
4207               break 3
4208             fi
4209           fi
4210         fi
4211       done
4212     done
4213     ;;
4214 esac
4215
4216 done
4217 IFS=$as_save_IFS
4218
4219 rm -rf conftest.one conftest.two conftest.dir
4220
4221 fi
4222   if test "${ac_cv_path_install+set}" = set; then
4223     INSTALL=$ac_cv_path_install
4224   else
4225     # As a last resort, use the slow shell script.  Don't cache a
4226     # value for INSTALL within a source directory, because that will
4227     # break other packages using the cache if that directory is
4228     # removed, or if the value is a relative name.
4229     INSTALL=$ac_install_sh
4230   fi
4231 fi
4232 { $as_echo "$as_me:$LINENO: result: $INSTALL" >&5
4233 $as_echo "$INSTALL" >&6; }
4234
4235 # Use test -z because SunOS4 sh mishandles braces in ${var-val}.
4236 # It thinks the first close brace ends the variable substitution.
4237 test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
4238
4239 test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
4240
4241 test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
4242
4243 { $as_echo "$as_me:$LINENO: checking whether \"\${INSTALL} -d\" creates intermediate directories" >&5
4244 $as_echo_n "checking whether \"\${INSTALL} -d\" creates intermediate directories... " >&6; }
4245 if test "${ac_cv_install_d_creates_dirs+set}" = set; then
4246   $as_echo_n "(cached) " >&6
4247 else
4248   ac_cv_install_d_creates_dirs=no
4249      rm -rf conftestdir
4250      if mkdir conftestdir; then
4251        cd conftestdir 2>/dev/null
4252        ${INSTALL} -d `pwd`/dir1/dir2 >/dev/null 2>&1
4253        if test -d dir1/dir2/. ; then
4254          ac_cv_install_d_creates_dirs=yes
4255        fi
4256        cd .. 2>/dev/null
4257        rm -rf conftestdir
4258      fi
4259
4260 fi
4261 { $as_echo "$as_me:$LINENO: result: $ac_cv_install_d_creates_dirs" >&5
4262 $as_echo "$ac_cv_install_d_creates_dirs" >&6; }
4263
4264   if test "$ac_cv_install_d_creates_dirs" = no ; then
4265     { $as_echo "$as_me:$LINENO: checking whether \"mkdir -p\" creates intermediate directories" >&5
4266 $as_echo_n "checking whether \"mkdir -p\" creates intermediate directories... " >&6; }
4267 if test "${ac_cv_mkdir_p_creates_dirs+set}" = set; then
4268   $as_echo_n "(cached) " >&6
4269 else
4270   ac_cv_mkdir_p_creates_dirs=no
4271        rm -rf conftestdir
4272        if mkdir conftestdir; then
4273          cd conftestdir 2>/dev/null
4274          mkdir -p dir1/dir2 >/dev/null 2>&1
4275          if test -d dir1/dir2/. ; then
4276            ac_cv_mkdir_p_creates_dirs=yes
4277          fi
4278          cd .. 2>/dev/null
4279          rm -rf conftestdir
4280        fi
4281
4282 fi
4283 { $as_echo "$as_me:$LINENO: result: $ac_cv_mkdir_p_creates_dirs" >&5
4284 $as_echo "$ac_cv_mkdir_p_creates_dirs" >&6; }
4285   fi
4286
4287   if test "$ac_cv_install_d_creates_dirs" = yes ; then
4288     INSTALL_DIRS='${INSTALL} -d'
4289   elif test "$ac_cv_mkdir_p_creates_dirs" = yes ; then
4290     INSTALL_DIRS='mkdir -p'
4291   else
4292     # any other ideas?
4293     INSTALL_DIRS='${INSTALL} -d'
4294   fi
4295
4296 { $as_echo "$as_me:$LINENO: checking whether ${MAKE-make} sets \$(MAKE)" >&5
4297 $as_echo_n "checking whether ${MAKE-make} sets \$(MAKE)... " >&6; }
4298 set x ${MAKE-make}
4299 ac_make=`$as_echo "$2" | sed 's/+/p/g; s/[^a-zA-Z0-9_]/_/g'`
4300 if { as_var=ac_cv_prog_make_${ac_make}_set; eval "test \"\${$as_var+set}\" = set"; }; then
4301   $as_echo_n "(cached) " >&6
4302 else
4303   cat >conftest.make <<\_ACEOF
4304 SHELL = /bin/sh
4305 all:
4306         @echo '@@@%%%=$(MAKE)=@@@%%%'
4307 _ACEOF
4308 # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
4309 case `${MAKE-make} -f conftest.make 2>/dev/null` in
4310   *@@@%%%=?*=@@@%%%*)
4311     eval ac_cv_prog_make_${ac_make}_set=yes;;
4312   *)
4313     eval ac_cv_prog_make_${ac_make}_set=no;;
4314 esac
4315 rm -rf conftest.make
4316 fi
4317 if eval test \$ac_cv_prog_make_${ac_make}_set = yes; then
4318   { $as_echo "$as_me:$LINENO: result: yes" >&5
4319 $as_echo "yes" >&6; }
4320   SET_MAKE=
4321 else
4322   { $as_echo "$as_me:$LINENO: result: no" >&5
4323 $as_echo "no" >&6; }
4324   SET_MAKE="MAKE=${MAKE-make}"
4325 fi
4326
4327
4328 # By default, autoconf sets INSTALL_SCRIPT to '${INSTALL_PROGRAM}'.
4329 # That's wrong: it should be set to '${INSTALL}', so that one can
4330 # implement the "install-strip" target properly (strip executables,
4331 # but do not try to strip scripts.)
4332 #
4333 INSTALL_SCRIPT='${INSTALL}'
4334
4335 # random libc stuff
4336
4337 { $as_echo "$as_me:$LINENO: checking for grep that handles long lines and -e" >&5
4338 $as_echo_n "checking for grep that handles long lines and -e... " >&6; }
4339 if test "${ac_cv_path_GREP+set}" = set; then
4340   $as_echo_n "(cached) " >&6
4341 else
4342   if test -z "$GREP"; then
4343   ac_path_GREP_found=false
4344   # Loop through the user's path and test for each of PROGNAME-LIST
4345   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4346 for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
4347 do
4348   IFS=$as_save_IFS
4349   test -z "$as_dir" && as_dir=.
4350   for ac_prog in grep ggrep; do
4351     for ac_exec_ext in '' $ac_executable_extensions; do
4352       ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
4353       { test -f "$ac_path_GREP" && $as_test_x "$ac_path_GREP"; } || continue
4354 # Check for GNU ac_path_GREP and select it if it is found.
4355   # Check for GNU $ac_path_GREP
4356 case `"$ac_path_GREP" --version 2>&1` in
4357 *GNU*)
4358   ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
4359 *)
4360   ac_count=0
4361   $as_echo_n 0123456789 >"conftest.in"
4362   while :
4363   do
4364     cat "conftest.in" "conftest.in" >"conftest.tmp"
4365     mv "conftest.tmp" "conftest.in"
4366     cp "conftest.in" "conftest.nl"
4367     $as_echo 'GREP' >> "conftest.nl"
4368     "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
4369     diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
4370     ac_count=`expr $ac_count + 1`
4371     if test $ac_count -gt ${ac_path_GREP_max-0}; then
4372       # Best one so far, save it but keep looking for a better one
4373       ac_cv_path_GREP="$ac_path_GREP"
4374       ac_path_GREP_max=$ac_count
4375     fi
4376     # 10*(2^10) chars as input seems more than enough
4377     test $ac_count -gt 10 && break
4378   done
4379   rm -rf conftest.in conftest.tmp conftest.nl conftest.out;;
4380 esac
4381
4382       $ac_path_GREP_found && break 3
4383     done
4384   done
4385 done
4386 IFS=$as_save_IFS
4387   if test -z "$ac_cv_path_GREP"; then
4388     { { $as_echo "$as_me:$LINENO: error: no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&5
4389 $as_echo "$as_me: error: no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&2;}
4390    { (exit 1); exit 1; }; }
4391   fi
4392 else
4393   ac_cv_path_GREP=$GREP
4394 fi
4395
4396 fi
4397 { $as_echo "$as_me:$LINENO: result: $ac_cv_path_GREP" >&5
4398 $as_echo "$ac_cv_path_GREP" >&6; }
4399  GREP="$ac_cv_path_GREP"
4400
4401
4402 { $as_echo "$as_me:$LINENO: checking for egrep" >&5
4403 $as_echo_n "checking for egrep... " >&6; }
4404 if test "${ac_cv_path_EGREP+set}" = set; then
4405   $as_echo_n "(cached) " >&6
4406 else
4407   if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
4408    then ac_cv_path_EGREP="$GREP -E"
4409    else
4410      if test -z "$EGREP"; then
4411   ac_path_EGREP_found=false
4412   # Loop through the user's path and test for each of PROGNAME-LIST
4413   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4414 for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
4415 do
4416   IFS=$as_save_IFS
4417   test -z "$as_dir" && as_dir=.
4418   for ac_prog in egrep; do
4419     for ac_exec_ext in '' $ac_executable_extensions; do
4420       ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
4421       { test -f "$ac_path_EGREP" && $as_test_x "$ac_path_EGREP"; } || continue
4422 # Check for GNU ac_path_EGREP and select it if it is found.
4423   # Check for GNU $ac_path_EGREP
4424 case `"$ac_path_EGREP" --version 2>&1` in
4425 *GNU*)
4426   ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
4427 *)
4428   ac_count=0
4429   $as_echo_n 0123456789 >"conftest.in"
4430   while :
4431   do
4432     cat "conftest.in" "conftest.in" >"conftest.tmp"
4433     mv "conftest.tmp" "conftest.in"
4434     cp "conftest.in" "conftest.nl"
4435     $as_echo 'EGREP' >> "conftest.nl"
4436     "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
4437     diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
4438     ac_count=`expr $ac_count + 1`
4439     if test $ac_count -gt ${ac_path_EGREP_max-0}; then
4440       # Best one so far, save it but keep looking for a better one
4441       ac_cv_path_EGREP="$ac_path_EGREP"
4442       ac_path_EGREP_max=$ac_count
4443     fi
4444     # 10*(2^10) chars as input seems more than enough
4445     test $ac_count -gt 10 && break
4446   done
4447   rm -rf conftest.in conftest.tmp conftest.nl conftest.out;;
4448 esac
4449
4450       $ac_path_EGREP_found && break 3
4451     done
4452   done
4453 done
4454 IFS=$as_save_IFS
4455   if test -z "$ac_cv_path_EGREP"; then
4456     { { $as_echo "$as_me:$LINENO: error: no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&5
4457 $as_echo "$as_me: error: no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&2;}
4458    { (exit 1); exit 1; }; }
4459   fi
4460 else
4461   ac_cv_path_EGREP=$EGREP
4462 fi
4463
4464    fi
4465 fi
4466 { $as_echo "$as_me:$LINENO: result: $ac_cv_path_EGREP" >&5
4467 $as_echo "$ac_cv_path_EGREP" >&6; }
4468  EGREP="$ac_cv_path_EGREP"
4469
4470
4471 { $as_echo "$as_me:$LINENO: checking for ANSI C header files" >&5
4472 $as_echo_n "checking for ANSI C header files... " >&6; }
4473 if test "${ac_cv_header_stdc+set}" = set; then
4474   $as_echo_n "(cached) " >&6
4475 else
4476   cat >conftest.$ac_ext <<_ACEOF
4477 /* confdefs.h.  */
4478 _ACEOF
4479 cat confdefs.h >>conftest.$ac_ext
4480 cat >>conftest.$ac_ext <<_ACEOF
4481 /* end confdefs.h.  */
4482 #include <stdlib.h>
4483 #include <stdarg.h>
4484 #include <string.h>
4485 #include <float.h>
4486
4487 int
4488 main ()
4489 {
4490
4491   ;
4492   return 0;
4493 }
4494 _ACEOF
4495 rm -rf conftest.$ac_objext
4496 if { (ac_try="$ac_compile"
4497 case "(($ac_try" in
4498   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4499   *) ac_try_echo=$ac_try;;
4500 esac
4501 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
4502 $as_echo "$ac_try_echo") >&5
4503   (eval "$ac_compile") 2>conftest.er1
4504   ac_status=$?
4505   grep -v '^ *+' conftest.er1 >conftest.err
4506   rm -rf conftest.er1
4507   cat conftest.err >&5
4508   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
4509   (exit $ac_status); } && {
4510          test -z "$ac_c_werror_flag" ||
4511          test ! -s conftest.err
4512        } && test -s conftest.$ac_objext; then
4513   ac_cv_header_stdc=yes
4514 else
4515   $as_echo "$as_me: failed program was:" >&5
4516 sed 's/^/| /' conftest.$ac_ext >&5
4517
4518         ac_cv_header_stdc=no
4519 fi
4520
4521 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4522
4523 if test $ac_cv_header_stdc = yes; then
4524   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
4525   cat >conftest.$ac_ext <<_ACEOF
4526 /* confdefs.h.  */
4527 _ACEOF
4528 cat confdefs.h >>conftest.$ac_ext
4529 cat >>conftest.$ac_ext <<_ACEOF
4530 /* end confdefs.h.  */
4531 #include <string.h>
4532
4533 _ACEOF
4534 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4535   $EGREP "memchr" >/dev/null 2>&1; then
4536   :
4537 else
4538   ac_cv_header_stdc=no
4539 fi
4540 rm -rf conftest*
4541
4542 fi
4543
4544 if test $ac_cv_header_stdc = yes; then
4545   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
4546   cat >conftest.$ac_ext <<_ACEOF
4547 /* confdefs.h.  */
4548 _ACEOF
4549 cat confdefs.h >>conftest.$ac_ext
4550 cat >>conftest.$ac_ext <<_ACEOF
4551 /* end confdefs.h.  */
4552 #include <stdlib.h>
4553
4554 _ACEOF
4555 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4556   $EGREP "free" >/dev/null 2>&1; then
4557   :
4558 else
4559   ac_cv_header_stdc=no
4560 fi
4561 rm -rf conftest*
4562
4563 fi
4564
4565 if test $ac_cv_header_stdc = yes; then
4566   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
4567   if test "$cross_compiling" = yes; then
4568   :
4569 else
4570   cat >conftest.$ac_ext <<_ACEOF
4571 /* confdefs.h.  */
4572 _ACEOF
4573 cat confdefs.h >>conftest.$ac_ext
4574 cat >>conftest.$ac_ext <<_ACEOF
4575 /* end confdefs.h.  */
4576 #include <ctype.h>
4577 #include <stdlib.h>
4578 #if ((' ' & 0x0FF) == 0x020)
4579 # define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
4580 # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
4581 #else
4582 # define ISLOWER(c) \
4583                    (('a' <= (c) && (c) <= 'i') \
4584                      || ('j' <= (c) && (c) <= 'r') \
4585                      || ('s' <= (c) && (c) <= 'z'))
4586 # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
4587 #endif
4588
4589 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
4590 int
4591 main ()
4592 {
4593   int i;
4594   for (i = 0; i < 256; i++)
4595     if (XOR (islower (i), ISLOWER (i))
4596         || toupper (i) != TOUPPER (i))
4597       return 2;
4598   return 0;
4599 }
4600 _ACEOF
4601 rm -rf conftest$ac_exeext
4602 if { (ac_try="$ac_link"
4603 case "(($ac_try" in
4604   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4605   *) ac_try_echo=$ac_try;;
4606 esac
4607 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
4608 $as_echo "$ac_try_echo") >&5
4609   (eval "$ac_link") 2>&5
4610   ac_status=$?
4611   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
4612   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
4613   { (case "(($ac_try" in
4614   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4615   *) ac_try_echo=$ac_try;;
4616 esac
4617 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
4618 $as_echo "$ac_try_echo") >&5
4619   (eval "$ac_try") 2>&5
4620   ac_status=$?
4621   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
4622   (exit $ac_status); }; }; then
4623   :
4624 else
4625   $as_echo "$as_me: program exited with status $ac_status" >&5
4626 $as_echo "$as_me: failed program was:" >&5
4627 sed 's/^/| /' conftest.$ac_ext >&5
4628
4629 ( exit $ac_status )
4630 ac_cv_header_stdc=no
4631 fi
4632 rm -rf conftest.dSYM
4633 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
4634 fi
4635
4636
4637 fi
4638 fi
4639 { $as_echo "$as_me:$LINENO: result: $ac_cv_header_stdc" >&5
4640 $as_echo "$ac_cv_header_stdc" >&6; }
4641 if test $ac_cv_header_stdc = yes; then
4642
4643 cat >>confdefs.h <<\_ACEOF
4644 #define STDC_HEADERS 1
4645 _ACEOF
4646
4647 fi
4648
4649 # On IRIX 5.3, sys/types and inttypes.h are conflicting.
4650
4651
4652
4653
4654
4655
4656
4657
4658
4659 for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
4660                   inttypes.h stdint.h unistd.h
4661 do
4662 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
4663 { $as_echo "$as_me:$LINENO: checking for $ac_header" >&5
4664 $as_echo_n "checking for $ac_header... " >&6; }
4665 if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
4666   $as_echo_n "(cached) " >&6
4667 else
4668   cat >conftest.$ac_ext <<_ACEOF
4669 /* confdefs.h.  */
4670 _ACEOF
4671 cat confdefs.h >>conftest.$ac_ext
4672 cat >>conftest.$ac_ext <<_ACEOF
4673 /* end confdefs.h.  */
4674 $ac_includes_default
4675
4676 #include <$ac_header>
4677 _ACEOF
4678 rm -rf conftest.$ac_objext
4679 if { (ac_try="$ac_compile"
4680 case "(($ac_try" in
4681   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4682   *) ac_try_echo=$ac_try;;
4683 esac
4684 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
4685 $as_echo "$ac_try_echo") >&5
4686   (eval "$ac_compile") 2>conftest.er1
4687   ac_status=$?
4688   grep -v '^ *+' conftest.er1 >conftest.err
4689   rm -rf conftest.er1
4690   cat conftest.err >&5
4691   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
4692   (exit $ac_status); } && {
4693          test -z "$ac_c_werror_flag" ||
4694          test ! -s conftest.err
4695        } && test -s conftest.$ac_objext; then
4696   eval "$as_ac_Header=yes"
4697 else
4698   $as_echo "$as_me: failed program was:" >&5
4699 sed 's/^/| /' conftest.$ac_ext >&5
4700
4701         eval "$as_ac_Header=no"
4702 fi
4703
4704 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4705 fi
4706 ac_res=`eval 'as_val=${'$as_ac_Header'}
4707                  $as_echo "$as_val"'`
4708                { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
4709 $as_echo "$ac_res" >&6; }
4710 as_val=`eval 'as_val=${'$as_ac_Header'}
4711                  $as_echo "$as_val"'`
4712    if test "x$as_val" = x""yes; then
4713   cat >>confdefs.h <<_ACEOF
4714 #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
4715 _ACEOF
4716
4717 fi
4718
4719 done
4720
4721
4722
4723 for ac_header in unistd.h
4724 do
4725 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
4726 if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
4727   { $as_echo "$as_me:$LINENO: checking for $ac_header" >&5
4728 $as_echo_n "checking for $ac_header... " >&6; }
4729 if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
4730   $as_echo_n "(cached) " >&6
4731 fi
4732 ac_res=`eval 'as_val=${'$as_ac_Header'}
4733                  $as_echo "$as_val"'`
4734                { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
4735 $as_echo "$ac_res" >&6; }
4736 else
4737   # Is the header compilable?
4738 { $as_echo "$as_me:$LINENO: checking $ac_header usability" >&5
4739 $as_echo_n "checking $ac_header usability... " >&6; }
4740 cat >conftest.$ac_ext <<_ACEOF
4741 /* confdefs.h.  */
4742 _ACEOF
4743 cat confdefs.h >>conftest.$ac_ext
4744 cat >>conftest.$ac_ext <<_ACEOF
4745 /* end confdefs.h.  */
4746 $ac_includes_default
4747 #include <$ac_header>
4748 _ACEOF
4749 rm -rf conftest.$ac_objext
4750 if { (ac_try="$ac_compile"
4751 case "(($ac_try" in
4752   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4753   *) ac_try_echo=$ac_try;;
4754 esac
4755 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
4756 $as_echo "$ac_try_echo") >&5
4757   (eval "$ac_compile") 2>conftest.er1
4758   ac_status=$?
4759   grep -v '^ *+' conftest.er1 >conftest.err
4760   rm -rf conftest.er1
4761   cat conftest.err >&5
4762   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
4763   (exit $ac_status); } && {
4764          test -z "$ac_c_werror_flag" ||
4765          test ! -s conftest.err
4766        } && test -s conftest.$ac_objext; then
4767   ac_header_compiler=yes
4768 else
4769   $as_echo "$as_me: failed program was:" >&5
4770 sed 's/^/| /' conftest.$ac_ext >&5
4771
4772         ac_header_compiler=no
4773 fi
4774
4775 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4776 { $as_echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
4777 $as_echo "$ac_header_compiler" >&6; }
4778
4779 # Is the header present?
4780 { $as_echo "$as_me:$LINENO: checking $ac_header presence" >&5
4781 $as_echo_n "checking $ac_header presence... " >&6; }
4782 cat >conftest.$ac_ext <<_ACEOF
4783 /* confdefs.h.  */
4784 _ACEOF
4785 cat confdefs.h >>conftest.$ac_ext
4786 cat >>conftest.$ac_ext <<_ACEOF
4787 /* end confdefs.h.  */
4788 #include <$ac_header>
4789 _ACEOF
4790 if { (ac_try="$ac_cpp conftest.$ac_ext"
4791 case "(($ac_try" in
4792   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4793   *) ac_try_echo=$ac_try;;
4794 esac
4795 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
4796 $as_echo "$ac_try_echo") >&5
4797   (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
4798   ac_status=$?
4799   grep -v '^ *+' conftest.er1 >conftest.err
4800   rm -rf conftest.er1
4801   cat conftest.err >&5
4802   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
4803   (exit $ac_status); } >/dev/null && {
4804          test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
4805          test ! -s conftest.err
4806        }; then
4807   ac_header_preproc=yes
4808 else
4809   $as_echo "$as_me: failed program was:" >&5
4810 sed 's/^/| /' conftest.$ac_ext >&5
4811
4812   ac_header_preproc=no
4813 fi
4814
4815 rm -rf conftest.err conftest.$ac_ext
4816 { $as_echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
4817 $as_echo "$ac_header_preproc" >&6; }
4818
4819 # So?  What about this header?
4820 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
4821   yes:no: )
4822     { $as_echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
4823 $as_echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
4824     { $as_echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
4825 $as_echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
4826     ac_header_preproc=yes
4827     ;;
4828   no:yes:* )
4829     { $as_echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
4830 $as_echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
4831     { $as_echo "$as_me:$LINENO: WARNING: $ac_header:     check for missing prerequisite headers?" >&5
4832 $as_echo "$as_me: WARNING: $ac_header:     check for missing prerequisite headers?" >&2;}
4833     { $as_echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
4834 $as_echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
4835     { $as_echo "$as_me:$LINENO: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&5
4836 $as_echo "$as_me: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&2;}
4837     { $as_echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
4838 $as_echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
4839     { $as_echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
4840 $as_echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
4841
4842     ;;
4843 esac
4844 { $as_echo "$as_me:$LINENO: checking for $ac_header" >&5
4845 $as_echo_n "checking for $ac_header... " >&6; }
4846 if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
4847   $as_echo_n "(cached) " >&6
4848 else
4849   eval "$as_ac_Header=\$ac_header_preproc"
4850 fi
4851 ac_res=`eval 'as_val=${'$as_ac_Header'}
4852                  $as_echo "$as_val"'`
4853                { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
4854 $as_echo "$ac_res" >&6; }
4855
4856 fi
4857 as_val=`eval 'as_val=${'$as_ac_Header'}
4858                  $as_echo "$as_val"'`
4859    if test "x$as_val" = x""yes; then
4860   cat >>confdefs.h <<_ACEOF
4861 #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
4862 _ACEOF
4863
4864 fi
4865
4866 done
4867
4868 { $as_echo "$as_me:$LINENO: checking for mode_t" >&5
4869 $as_echo_n "checking for mode_t... " >&6; }
4870 if test "${ac_cv_type_mode_t+set}" = set; then
4871   $as_echo_n "(cached) " >&6
4872 else
4873   ac_cv_type_mode_t=no
4874 cat >conftest.$ac_ext <<_ACEOF
4875 /* confdefs.h.  */
4876 _ACEOF
4877 cat confdefs.h >>conftest.$ac_ext
4878 cat >>conftest.$ac_ext <<_ACEOF
4879 /* end confdefs.h.  */
4880 $ac_includes_default
4881 int
4882 main ()
4883 {
4884 if (sizeof (mode_t))
4885        return 0;
4886   ;
4887   return 0;
4888 }
4889 _ACEOF
4890 rm -rf conftest.$ac_objext
4891 if { (ac_try="$ac_compile"
4892 case "(($ac_try" in
4893   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4894   *) ac_try_echo=$ac_try;;
4895 esac
4896 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
4897 $as_echo "$ac_try_echo") >&5
4898   (eval "$ac_compile") 2>conftest.er1
4899   ac_status=$?
4900   grep -v '^ *+' conftest.er1 >conftest.err
4901   rm -rf conftest.er1
4902   cat conftest.err >&5
4903   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
4904   (exit $ac_status); } && {
4905          test -z "$ac_c_werror_flag" ||
4906          test ! -s conftest.err
4907        } && test -s conftest.$ac_objext; then
4908   cat >conftest.$ac_ext <<_ACEOF
4909 /* confdefs.h.  */
4910 _ACEOF
4911 cat confdefs.h >>conftest.$ac_ext
4912 cat >>conftest.$ac_ext <<_ACEOF
4913 /* end confdefs.h.  */
4914 $ac_includes_default
4915 int
4916 main ()
4917 {
4918 if (sizeof ((mode_t)))
4919           return 0;
4920   ;
4921   return 0;
4922 }
4923 _ACEOF
4924 rm -rf conftest.$ac_objext
4925 if { (ac_try="$ac_compile"
4926 case "(($ac_try" in
4927   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4928   *) ac_try_echo=$ac_try;;
4929 esac
4930 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
4931 $as_echo "$ac_try_echo") >&5
4932   (eval "$ac_compile") 2>conftest.er1
4933   ac_status=$?
4934   grep -v '^ *+' conftest.er1 >conftest.err
4935   rm -rf conftest.er1
4936   cat conftest.err >&5
4937   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
4938   (exit $ac_status); } && {
4939          test -z "$ac_c_werror_flag" ||
4940          test ! -s conftest.err
4941        } && test -s conftest.$ac_objext; then
4942   :
4943 else
4944   $as_echo "$as_me: failed program was:" >&5
4945 sed 's/^/| /' conftest.$ac_ext >&5
4946
4947         ac_cv_type_mode_t=yes
4948 fi
4949
4950 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4951 else
4952   $as_echo "$as_me: failed program was:" >&5
4953 sed 's/^/| /' conftest.$ac_ext >&5
4954
4955
4956 fi
4957
4958 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4959 fi
4960 { $as_echo "$as_me:$LINENO: result: $ac_cv_type_mode_t" >&5
4961 $as_echo "$ac_cv_type_mode_t" >&6; }
4962 if test "x$ac_cv_type_mode_t" = x""yes; then
4963   :
4964 else
4965
4966 cat >>confdefs.h <<_ACEOF
4967 #define mode_t int
4968 _ACEOF
4969
4970 fi
4971
4972 { $as_echo "$as_me:$LINENO: checking for pid_t" >&5
4973 $as_echo_n "checking for pid_t... " >&6; }
4974 if test "${ac_cv_type_pid_t+set}" = set; then
4975   $as_echo_n "(cached) " >&6
4976 else
4977   ac_cv_type_pid_t=no
4978 cat >conftest.$ac_ext <<_ACEOF
4979 /* confdefs.h.  */
4980 _ACEOF
4981 cat confdefs.h >>conftest.$ac_ext
4982 cat >>conftest.$ac_ext <<_ACEOF
4983 /* end confdefs.h.  */
4984 $ac_includes_default
4985 int
4986 main ()
4987 {
4988 if (sizeof (pid_t))
4989        return 0;
4990   ;
4991   return 0;
4992 }
4993 _ACEOF
4994 rm -rf conftest.$ac_objext
4995 if { (ac_try="$ac_compile"
4996 case "(($ac_try" in
4997   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4998   *) ac_try_echo=$ac_try;;
4999 esac
5000 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
5001 $as_echo "$ac_try_echo") >&5
5002   (eval "$ac_compile") 2>conftest.er1
5003   ac_status=$?
5004   grep -v '^ *+' conftest.er1 >conftest.err
5005   rm -rf conftest.er1
5006   cat conftest.err >&5
5007   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
5008   (exit $ac_status); } && {
5009          test -z "$ac_c_werror_flag" ||
5010          test ! -s conftest.err
5011        } && test -s conftest.$ac_objext; then
5012   cat >conftest.$ac_ext <<_ACEOF
5013 /* confdefs.h.  */
5014 _ACEOF
5015 cat confdefs.h >>conftest.$ac_ext
5016 cat >>conftest.$ac_ext <<_ACEOF
5017 /* end confdefs.h.  */
5018 $ac_includes_default
5019 int
5020 main ()
5021 {
5022 if (sizeof ((pid_t)))
5023           return 0;
5024   ;
5025   return 0;
5026 }
5027 _ACEOF
5028 rm -rf conftest.$ac_objext
5029 if { (ac_try="$ac_compile"
5030 case "(($ac_try" in
5031   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5032   *) ac_try_echo=$ac_try;;
5033 esac
5034 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
5035 $as_echo "$ac_try_echo") >&5
5036   (eval "$ac_compile") 2>conftest.er1
5037   ac_status=$?
5038   grep -v '^ *+' conftest.er1 >conftest.err
5039   rm -rf conftest.er1
5040   cat conftest.err >&5
5041   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
5042   (exit $ac_status); } && {
5043          test -z "$ac_c_werror_flag" ||
5044          test ! -s conftest.err
5045        } && test -s conftest.$ac_objext; then
5046   :
5047 else
5048   $as_echo "$as_me: failed program was:" >&5
5049 sed 's/^/| /' conftest.$ac_ext >&5
5050
5051         ac_cv_type_pid_t=yes
5052 fi
5053
5054 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5055 else
5056   $as_echo "$as_me: failed program was:" >&5
5057 sed 's/^/| /' conftest.$ac_ext >&5
5058
5059
5060 fi
5061
5062 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5063 fi
5064 { $as_echo "$as_me:$LINENO: result: $ac_cv_type_pid_t" >&5
5065 $as_echo "$ac_cv_type_pid_t" >&6; }
5066 if test "x$ac_cv_type_pid_t" = x""yes; then
5067   :
5068 else
5069
5070 cat >>confdefs.h <<_ACEOF
5071 #define pid_t int
5072 _ACEOF
5073
5074 fi
5075
5076 { $as_echo "$as_me:$LINENO: checking for size_t" >&5
5077 $as_echo_n "checking for size_t... " >&6; }
5078 if test "${ac_cv_type_size_t+set}" = set; then
5079   $as_echo_n "(cached) " >&6
5080 else
5081   ac_cv_type_size_t=no
5082 cat >conftest.$ac_ext <<_ACEOF
5083 /* confdefs.h.  */
5084 _ACEOF
5085 cat confdefs.h >>conftest.$ac_ext
5086 cat >>conftest.$ac_ext <<_ACEOF
5087 /* end confdefs.h.  */
5088 $ac_includes_default
5089 int
5090 main ()
5091 {
5092 if (sizeof (size_t))
5093        return 0;
5094   ;
5095   return 0;
5096 }
5097 _ACEOF
5098 rm -rf conftest.$ac_objext
5099 if { (ac_try="$ac_compile"
5100 case "(($ac_try" in
5101   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5102   *) ac_try_echo=$ac_try;;
5103 esac
5104 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
5105 $as_echo "$ac_try_echo") >&5
5106   (eval "$ac_compile") 2>conftest.er1
5107   ac_status=$?
5108   grep -v '^ *+' conftest.er1 >conftest.err
5109   rm -rf conftest.er1
5110   cat conftest.err >&5
5111   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
5112   (exit $ac_status); } && {
5113          test -z "$ac_c_werror_flag" ||
5114          test ! -s conftest.err
5115        } && test -s conftest.$ac_objext; then
5116   cat >conftest.$ac_ext <<_ACEOF
5117 /* confdefs.h.  */
5118 _ACEOF
5119 cat confdefs.h >>conftest.$ac_ext
5120 cat >>conftest.$ac_ext <<_ACEOF
5121 /* end confdefs.h.  */
5122 $ac_includes_default
5123 int
5124 main ()
5125 {
5126 if (sizeof ((size_t)))
5127           return 0;
5128   ;
5129   return 0;
5130 }
5131 _ACEOF
5132 rm -rf conftest.$ac_objext
5133 if { (ac_try="$ac_compile"
5134 case "(($ac_try" in
5135   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5136   *) ac_try_echo=$ac_try;;
5137 esac
5138 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
5139 $as_echo "$ac_try_echo") >&5
5140   (eval "$ac_compile") 2>conftest.er1
5141   ac_status=$?
5142   grep -v '^ *+' conftest.er1 >conftest.err
5143   rm -rf conftest.er1
5144   cat conftest.err >&5
5145   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
5146   (exit $ac_status); } && {
5147          test -z "$ac_c_werror_flag" ||
5148          test ! -s conftest.err
5149        } && test -s conftest.$ac_objext; then
5150   :
5151 else
5152   $as_echo "$as_me: failed program was:" >&5
5153 sed 's/^/| /' conftest.$ac_ext >&5
5154
5155         ac_cv_type_size_t=yes
5156 fi
5157
5158 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5159 else
5160   $as_echo "$as_me: failed program was:" >&5
5161 sed 's/^/| /' conftest.$ac_ext >&5
5162
5163
5164 fi
5165
5166 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5167 fi
5168 { $as_echo "$as_me:$LINENO: result: $ac_cv_type_size_t" >&5
5169 $as_echo "$ac_cv_type_size_t" >&6; }
5170 if test "x$ac_cv_type_size_t" = x""yes; then
5171   :
5172 else
5173
5174 cat >>confdefs.h <<_ACEOF
5175 #define size_t unsigned int
5176 _ACEOF
5177
5178 fi
5179
5180 { $as_echo "$as_me:$LINENO: checking return type of signal handlers" >&5
5181 $as_echo_n "checking return type of signal handlers... " >&6; }
5182 if test "${ac_cv_type_signal+set}" = set; then
5183   $as_echo_n "(cached) " >&6
5184 else
5185   cat >conftest.$ac_ext <<_ACEOF
5186 /* confdefs.h.  */
5187 _ACEOF
5188 cat confdefs.h >>conftest.$ac_ext
5189 cat >>conftest.$ac_ext <<_ACEOF
5190 /* end confdefs.h.  */
5191 #include <sys/types.h>
5192 #include <signal.h>
5193
5194 int
5195 main ()
5196 {
5197 return *(signal (0, 0)) (0) == 1;
5198   ;
5199   return 0;
5200 }
5201 _ACEOF
5202 rm -rf conftest.$ac_objext
5203 if { (ac_try="$ac_compile"
5204 case "(($ac_try" in
5205   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5206   *) ac_try_echo=$ac_try;;
5207 esac
5208 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
5209 $as_echo "$ac_try_echo") >&5
5210   (eval "$ac_compile") 2>conftest.er1
5211   ac_status=$?
5212   grep -v '^ *+' conftest.er1 >conftest.err
5213   rm -rf conftest.er1
5214   cat conftest.err >&5
5215   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
5216   (exit $ac_status); } && {
5217          test -z "$ac_c_werror_flag" ||
5218          test ! -s conftest.err
5219        } && test -s conftest.$ac_objext; then
5220   ac_cv_type_signal=int
5221 else
5222   $as_echo "$as_me: failed program was:" >&5
5223 sed 's/^/| /' conftest.$ac_ext >&5
5224
5225         ac_cv_type_signal=void
5226 fi
5227
5228 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5229 fi
5230 { $as_echo "$as_me:$LINENO: result: $ac_cv_type_signal" >&5
5231 $as_echo "$ac_cv_type_signal" >&6; }
5232
5233 cat >>confdefs.h <<_ACEOF
5234 #define RETSIGTYPE $ac_cv_type_signal
5235 _ACEOF
5236
5237
5238 { $as_echo "$as_me:$LINENO: checking whether time.h and sys/time.h may both be included" >&5
5239 $as_echo_n "checking whether time.h and sys/time.h may both be included... " >&6; }
5240 if test "${ac_cv_header_time+set}" = set; then
5241   $as_echo_n "(cached) " >&6
5242 else
5243   cat >conftest.$ac_ext <<_ACEOF
5244 /* confdefs.h.  */
5245 _ACEOF
5246 cat confdefs.h >>conftest.$ac_ext
5247 cat >>conftest.$ac_ext <<_ACEOF
5248 /* end confdefs.h.  */
5249 #include <sys/types.h>
5250 #include <sys/time.h>
5251 #include <time.h>
5252
5253 int
5254 main ()
5255 {
5256 if ((struct tm *) 0)
5257 return 0;
5258   ;
5259   return 0;
5260 }
5261 _ACEOF
5262 rm -rf conftest.$ac_objext
5263 if { (ac_try="$ac_compile"
5264 case "(($ac_try" in
5265   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5266   *) ac_try_echo=$ac_try;;
5267 esac
5268 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
5269 $as_echo "$ac_try_echo") >&5
5270   (eval "$ac_compile") 2>conftest.er1
5271   ac_status=$?
5272   grep -v '^ *+' conftest.er1 >conftest.err
5273   rm -rf conftest.er1
5274   cat conftest.err >&5
5275   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
5276   (exit $ac_status); } && {
5277          test -z "$ac_c_werror_flag" ||
5278          test ! -s conftest.err
5279        } && test -s conftest.$ac_objext; then
5280   ac_cv_header_time=yes
5281 else
5282   $as_echo "$as_me: failed program was:" >&5
5283 sed 's/^/| /' conftest.$ac_ext >&5
5284
5285         ac_cv_header_time=no
5286 fi
5287
5288 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5289 fi
5290 { $as_echo "$as_me:$LINENO: result: $ac_cv_header_time" >&5
5291 $as_echo "$ac_cv_header_time" >&6; }
5292 if test $ac_cv_header_time = yes; then
5293
5294 cat >>confdefs.h <<\_ACEOF
5295 #define TIME_WITH_SYS_TIME 1
5296 _ACEOF
5297
5298 fi
5299
5300 { $as_echo "$as_me:$LINENO: checking for sys/wait.h that is POSIX.1 compatible" >&5
5301 $as_echo_n "checking for sys/wait.h that is POSIX.1 compatible... " >&6; }
5302 if test "${ac_cv_header_sys_wait_h+set}" = set; then
5303   $as_echo_n "(cached) " >&6
5304 else
5305   cat >conftest.$ac_ext <<_ACEOF
5306 /* confdefs.h.  */
5307 _ACEOF
5308 cat confdefs.h >>conftest.$ac_ext
5309 cat >>conftest.$ac_ext <<_ACEOF
5310 /* end confdefs.h.  */
5311 #include <sys/types.h>
5312 #include <sys/wait.h>
5313 #ifndef WEXITSTATUS
5314 # define WEXITSTATUS(stat_val) ((unsigned int) (stat_val) >> 8)
5315 #endif
5316 #ifndef WIFEXITED
5317 # define WIFEXITED(stat_val) (((stat_val) & 255) == 0)
5318 #endif
5319
5320 int
5321 main ()
5322 {
5323   int s;
5324   wait (&s);
5325   s = WIFEXITED (s) ? WEXITSTATUS (s) : 1;
5326   ;
5327   return 0;
5328 }
5329 _ACEOF
5330 rm -rf conftest.$ac_objext
5331 if { (ac_try="$ac_compile"
5332 case "(($ac_try" in
5333   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5334   *) ac_try_echo=$ac_try;;
5335 esac
5336 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
5337 $as_echo "$ac_try_echo") >&5
5338   (eval "$ac_compile") 2>conftest.er1
5339   ac_status=$?
5340   grep -v '^ *+' conftest.er1 >conftest.err
5341   rm -rf conftest.er1
5342   cat conftest.err >&5
5343   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
5344   (exit $ac_status); } && {
5345          test -z "$ac_c_werror_flag" ||
5346          test ! -s conftest.err
5347        } && test -s conftest.$ac_objext; then
5348   ac_cv_header_sys_wait_h=yes
5349 else
5350   $as_echo "$as_me: failed program was:" >&5
5351 sed 's/^/| /' conftest.$ac_ext >&5
5352
5353         ac_cv_header_sys_wait_h=no
5354 fi
5355
5356 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5357 fi
5358 { $as_echo "$as_me:$LINENO: result: $ac_cv_header_sys_wait_h" >&5
5359 $as_echo "$ac_cv_header_sys_wait_h" >&6; }
5360 if test $ac_cv_header_sys_wait_h = yes; then
5361
5362 cat >>confdefs.h <<\_ACEOF
5363 #define HAVE_SYS_WAIT_H 1
5364 _ACEOF
5365
5366 fi
5367
5368
5369
5370
5371
5372
5373 ac_header_dirent=no
5374 for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h; do
5375   as_ac_Header=`$as_echo "ac_cv_header_dirent_$ac_hdr" | $as_tr_sh`
5376 { $as_echo "$as_me:$LINENO: checking for $ac_hdr that defines DIR" >&5
5377 $as_echo_n "checking for $ac_hdr that defines DIR... " >&6; }
5378 if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
5379   $as_echo_n "(cached) " >&6
5380 else
5381   cat >conftest.$ac_ext <<_ACEOF
5382 /* confdefs.h.  */
5383 _ACEOF
5384 cat confdefs.h >>conftest.$ac_ext
5385 cat >>conftest.$ac_ext <<_ACEOF
5386 /* end confdefs.h.  */
5387 #include <sys/types.h>
5388 #include <$ac_hdr>
5389
5390 int
5391 main ()
5392 {
5393 if ((DIR *) 0)
5394 return 0;
5395   ;
5396   return 0;
5397 }
5398 _ACEOF
5399 rm -rf conftest.$ac_objext
5400 if { (ac_try="$ac_compile"
5401 case "(($ac_try" in
5402   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5403   *) ac_try_echo=$ac_try;;
5404 esac
5405 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
5406 $as_echo "$ac_try_echo") >&5
5407   (eval "$ac_compile") 2>conftest.er1
5408   ac_status=$?
5409   grep -v '^ *+' conftest.er1 >conftest.err
5410   rm -rf conftest.er1
5411   cat conftest.err >&5
5412   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
5413   (exit $ac_status); } && {
5414          test -z "$ac_c_werror_flag" ||
5415          test ! -s conftest.err
5416        } && test -s conftest.$ac_objext; then
5417   eval "$as_ac_Header=yes"
5418 else
5419   $as_echo "$as_me: failed program was:" >&5
5420 sed 's/^/| /' conftest.$ac_ext >&5
5421
5422         eval "$as_ac_Header=no"
5423 fi
5424
5425 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5426 fi
5427 ac_res=`eval 'as_val=${'$as_ac_Header'}
5428                  $as_echo "$as_val"'`
5429                { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
5430 $as_echo "$ac_res" >&6; }
5431 as_val=`eval 'as_val=${'$as_ac_Header'}
5432                  $as_echo "$as_val"'`
5433    if test "x$as_val" = x""yes; then
5434   cat >>confdefs.h <<_ACEOF
5435 #define `$as_echo "HAVE_$ac_hdr" | $as_tr_cpp` 1
5436 _ACEOF
5437
5438 ac_header_dirent=$ac_hdr; break
5439 fi
5440
5441 done
5442 # Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
5443 if test $ac_header_dirent = dirent.h; then
5444   { $as_echo "$as_me:$LINENO: checking for library containing opendir" >&5
5445 $as_echo_n "checking for library containing opendir... " >&6; }
5446 if test "${ac_cv_search_opendir+set}" = set; then
5447   $as_echo_n "(cached) " >&6
5448 else
5449   ac_func_search_save_LIBS=$LIBS
5450 cat >conftest.$ac_ext <<_ACEOF
5451 /* confdefs.h.  */
5452 _ACEOF
5453 cat confdefs.h >>conftest.$ac_ext
5454 cat >>conftest.$ac_ext <<_ACEOF
5455 /* end confdefs.h.  */
5456
5457 /* Override any GCC internal prototype to avoid an error.
5458    Use char because int might match the return type of a GCC
5459    builtin and then its argument prototype would still apply.  */
5460 #ifdef __cplusplus
5461 extern "C"
5462 #endif
5463 char opendir ();
5464 int
5465 main ()
5466 {
5467 return opendir ();
5468   ;
5469   return 0;
5470 }
5471 _ACEOF
5472 for ac_lib in '' dir; do
5473   if test -z "$ac_lib"; then
5474     ac_res="none required"
5475   else
5476     ac_res=-l$ac_lib
5477     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
5478   fi
5479   rm -rf conftest.$ac_objext conftest$ac_exeext
5480 if { (ac_try="$ac_link"
5481 case "(($ac_try" in
5482   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5483   *) ac_try_echo=$ac_try;;
5484 esac
5485 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
5486 $as_echo "$ac_try_echo") >&5
5487   (eval "$ac_link") 2>conftest.er1
5488   ac_status=$?
5489   grep -v '^ *+' conftest.er1 >conftest.err
5490   rm -rf conftest.er1
5491   cat conftest.err >&5
5492   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
5493   (exit $ac_status); } && {
5494          test -z "$ac_c_werror_flag" ||
5495          test ! -s conftest.err
5496        } && test -s conftest$ac_exeext && {
5497          test "$cross_compiling" = yes ||
5498          $as_test_x conftest$ac_exeext
5499        }; then
5500   ac_cv_search_opendir=$ac_res
5501 else
5502   $as_echo "$as_me: failed program was:" >&5
5503 sed 's/^/| /' conftest.$ac_ext >&5
5504
5505
5506 fi
5507
5508 rm -rf conftest.dSYM
5509 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
5510       conftest$ac_exeext
5511   if test "${ac_cv_search_opendir+set}" = set; then
5512   break
5513 fi
5514 done
5515 if test "${ac_cv_search_opendir+set}" = set; then
5516   :
5517 else
5518   ac_cv_search_opendir=no
5519 fi
5520 rm conftest.$ac_ext
5521 LIBS=$ac_func_search_save_LIBS
5522 fi
5523 { $as_echo "$as_me:$LINENO: result: $ac_cv_search_opendir" >&5
5524 $as_echo "$ac_cv_search_opendir" >&6; }
5525 ac_res=$ac_cv_search_opendir
5526 if test "$ac_res" != no; then
5527   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
5528
5529 fi
5530
5531 else
5532   { $as_echo "$as_me:$LINENO: checking for library containing opendir" >&5
5533 $as_echo_n "checking for library containing opendir... " >&6; }
5534 if test "${ac_cv_search_opendir+set}" = set; then
5535   $as_echo_n "(cached) " >&6
5536 else
5537   ac_func_search_save_LIBS=$LIBS
5538 cat >conftest.$ac_ext <<_ACEOF
5539 /* confdefs.h.  */
5540 _ACEOF
5541 cat confdefs.h >>conftest.$ac_ext
5542 cat >>conftest.$ac_ext <<_ACEOF
5543 /* end confdefs.h.  */
5544
5545 /* Override any GCC internal prototype to avoid an error.
5546    Use char because int might match the return type of a GCC
5547    builtin and then its argument prototype would still apply.  */
5548 #ifdef __cplusplus
5549 extern "C"
5550 #endif
5551 char opendir ();
5552 int
5553 main ()
5554 {
5555 return opendir ();
5556   ;
5557   return 0;
5558 }
5559 _ACEOF
5560 for ac_lib in '' x; do
5561   if test -z "$ac_lib"; then
5562     ac_res="none required"
5563   else
5564     ac_res=-l$ac_lib
5565     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
5566   fi
5567   rm -rf conftest.$ac_objext conftest$ac_exeext
5568 if { (ac_try="$ac_link"
5569 case "(($ac_try" in
5570   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5571   *) ac_try_echo=$ac_try;;
5572 esac
5573 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
5574 $as_echo "$ac_try_echo") >&5
5575   (eval "$ac_link") 2>conftest.er1
5576   ac_status=$?
5577   grep -v '^ *+' conftest.er1 >conftest.err
5578   rm -rf conftest.er1
5579   cat conftest.err >&5
5580   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
5581   (exit $ac_status); } && {
5582          test -z "$ac_c_werror_flag" ||
5583          test ! -s conftest.err
5584        } && test -s conftest$ac_exeext && {
5585          test "$cross_compiling" = yes ||
5586          $as_test_x conftest$ac_exeext
5587        }; then
5588   ac_cv_search_opendir=$ac_res
5589 else
5590   $as_echo "$as_me: failed program was:" >&5
5591 sed 's/^/| /' conftest.$ac_ext >&5
5592
5593
5594 fi
5595
5596 rm -rf conftest.dSYM
5597 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
5598       conftest$ac_exeext
5599   if test "${ac_cv_search_opendir+set}" = set; then
5600   break
5601 fi
5602 done
5603 if test "${ac_cv_search_opendir+set}" = set; then
5604   :
5605 else
5606   ac_cv_search_opendir=no
5607 fi
5608 rm conftest.$ac_ext
5609 LIBS=$ac_func_search_save_LIBS
5610 fi
5611 { $as_echo "$as_me:$LINENO: result: $ac_cv_search_opendir" >&5
5612 $as_echo "$ac_cv_search_opendir" >&6; }
5613 ac_res=$ac_cv_search_opendir
5614 if test "$ac_res" != no; then
5615   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
5616
5617 fi
5618
5619 fi
5620
5621 { $as_echo "$as_me:$LINENO: checking how to call gettimeofday" >&5
5622 $as_echo_n "checking how to call gettimeofday... " >&6; }
5623   if test "${ac_cv_gettimeofday_args+set}" = set; then
5624   $as_echo_n "(cached) " >&6
5625 else
5626   cat >conftest.$ac_ext <<_ACEOF
5627 /* confdefs.h.  */
5628 _ACEOF
5629 cat confdefs.h >>conftest.$ac_ext
5630 cat >>conftest.$ac_ext <<_ACEOF
5631 /* end confdefs.h.  */
5632 #include <stdlib.h>
5633                     #include <sys/time.h>
5634 int
5635 main ()
5636 {
5637 struct timeval tv; struct timezone tzp;
5638                     gettimeofday(&tv, &tzp);
5639   ;
5640   return 0;
5641 }
5642 _ACEOF
5643 rm -rf conftest.$ac_objext
5644 if { (ac_try="$ac_compile"
5645 case "(($ac_try" in
5646   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5647   *) ac_try_echo=$ac_try;;
5648 esac
5649 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
5650 $as_echo "$ac_try_echo") >&5
5651   (eval "$ac_compile") 2>conftest.er1
5652   ac_status=$?
5653   grep -v '^ *+' conftest.er1 >conftest.err
5654   rm -rf conftest.er1
5655   cat conftest.err >&5
5656   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
5657   (exit $ac_status); } && {
5658          test -z "$ac_c_werror_flag" ||
5659          test ! -s conftest.err
5660        } && test -s conftest.$ac_objext; then
5661   ac_gettimeofday_args=2
5662 else
5663   $as_echo "$as_me: failed program was:" >&5
5664 sed 's/^/| /' conftest.$ac_ext >&5
5665
5666         cat >conftest.$ac_ext <<_ACEOF
5667 /* confdefs.h.  */
5668 _ACEOF
5669 cat confdefs.h >>conftest.$ac_ext
5670 cat >>conftest.$ac_ext <<_ACEOF
5671 /* end confdefs.h.  */
5672 #include <stdlib.h>
5673                                     #include <sys/time.h>
5674 int
5675 main ()
5676 {
5677 struct timeval tv; gettimeofday(&tv);
5678   ;
5679   return 0;
5680 }
5681 _ACEOF
5682 rm -rf conftest.$ac_objext
5683 if { (ac_try="$ac_compile"
5684 case "(($ac_try" in
5685   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5686   *) ac_try_echo=$ac_try;;
5687 esac
5688 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
5689 $as_echo "$ac_try_echo") >&5
5690   (eval "$ac_compile") 2>conftest.er1
5691   ac_status=$?
5692   grep -v '^ *+' conftest.er1 >conftest.err
5693   rm -rf conftest.er1
5694   cat conftest.err >&5
5695   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
5696   (exit $ac_status); } && {
5697          test -z "$ac_c_werror_flag" ||
5698          test ! -s conftest.err
5699        } && test -s conftest.$ac_objext; then
5700   ac_gettimeofday_args=1
5701 else
5702   $as_echo "$as_me: failed program was:" >&5
5703 sed 's/^/| /' conftest.$ac_ext >&5
5704
5705         ac_gettimeofday_args=0
5706 fi
5707
5708 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5709 fi
5710
5711 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5712     ac_cv_gettimeofday_args=$ac_gettimeofday_args
5713 fi
5714
5715   ac_gettimeofday_args=$ac_cv_gettimeofday_args
5716   if test "$ac_gettimeofday_args" = 1 ; then
5717     cat >>confdefs.h <<\_ACEOF
5718 #define HAVE_GETTIMEOFDAY 1
5719 _ACEOF
5720
5721     { $as_echo "$as_me:$LINENO: result: one argument" >&5
5722 $as_echo "one argument" >&6; }
5723   elif test "$ac_gettimeofday_args" = 2 ; then
5724     cat >>confdefs.h <<\_ACEOF
5725 #define HAVE_GETTIMEOFDAY 1
5726 _ACEOF
5727
5728     cat >>confdefs.h <<\_ACEOF
5729 #define GETTIMEOFDAY_TWO_ARGS 1
5730 _ACEOF
5731
5732     { $as_echo "$as_me:$LINENO: result: two arguments" >&5
5733 $as_echo "two arguments" >&6; }
5734   else
5735     { $as_echo "$as_me:$LINENO: result: unknown" >&5
5736 $as_echo "unknown" >&6; }
5737   fi
5738
5739
5740
5741
5742
5743
5744
5745
5746
5747
5748 for ac_func in select fcntl uname nice setpriority getcwd getwd putenv sbrk
5749 do
5750 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
5751 { $as_echo "$as_me:$LINENO: checking for $ac_func" >&5
5752 $as_echo_n "checking for $ac_func... " >&6; }
5753 if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
5754   $as_echo_n "(cached) " >&6
5755 else
5756   cat >conftest.$ac_ext <<_ACEOF
5757 /* confdefs.h.  */
5758 _ACEOF
5759 cat confdefs.h >>conftest.$ac_ext
5760 cat >>conftest.$ac_ext <<_ACEOF
5761 /* end confdefs.h.  */
5762 /* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
5763    For example, HP-UX 11i <limits.h> declares gettimeofday.  */
5764 #define $ac_func innocuous_$ac_func
5765
5766 /* System header to define __stub macros and hopefully few prototypes,
5767     which can conflict with char $ac_func (); below.
5768     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
5769     <limits.h> exists even on freestanding compilers.  */
5770
5771 #ifdef __STDC__
5772 # include <limits.h>
5773 #else
5774 # include <assert.h>
5775 #endif
5776
5777 #undef $ac_func
5778
5779 /* Override any GCC internal prototype to avoid an error.
5780    Use char because int might match the return type of a GCC
5781    builtin and then its argument prototype would still apply.  */
5782 #ifdef __cplusplus
5783 extern "C"
5784 #endif
5785 char $ac_func ();
5786 /* The GNU C library defines this for functions which it implements
5787     to always fail with ENOSYS.  Some functions are actually named
5788     something starting with __ and the normal name is an alias.  */
5789 #if defined __stub_$ac_func || defined __stub___$ac_func
5790 choke me
5791 #endif
5792
5793 int
5794 main ()
5795 {
5796 return $ac_func ();
5797   ;
5798   return 0;
5799 }
5800 _ACEOF
5801 rm -rf conftest.$ac_objext conftest$ac_exeext
5802 if { (ac_try="$ac_link"
5803 case "(($ac_try" in
5804   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5805   *) ac_try_echo=$ac_try;;
5806 esac
5807 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
5808 $as_echo "$ac_try_echo") >&5
5809   (eval "$ac_link") 2>conftest.er1
5810   ac_status=$?
5811   grep -v '^ *+' conftest.er1 >conftest.err
5812   rm -rf conftest.er1
5813   cat conftest.err >&5
5814   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
5815   (exit $ac_status); } && {
5816          test -z "$ac_c_werror_flag" ||
5817          test ! -s conftest.err
5818        } && test -s conftest$ac_exeext && {
5819          test "$cross_compiling" = yes ||
5820          $as_test_x conftest$ac_exeext
5821        }; then
5822   eval "$as_ac_var=yes"
5823 else
5824   $as_echo "$as_me: failed program was:" >&5
5825 sed 's/^/| /' conftest.$ac_ext >&5
5826
5827         eval "$as_ac_var=no"
5828 fi
5829
5830 rm -rf conftest.dSYM
5831 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
5832       conftest$ac_exeext conftest.$ac_ext
5833 fi
5834 ac_res=`eval 'as_val=${'$as_ac_var'}
5835                  $as_echo "$as_val"'`
5836                { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
5837 $as_echo "$ac_res" >&6; }
5838 as_val=`eval 'as_val=${'$as_ac_var'}
5839                  $as_echo "$as_val"'`
5840    if test "x$as_val" = x""yes; then
5841   cat >>confdefs.h <<_ACEOF
5842 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
5843 _ACEOF
5844
5845 fi
5846 done
5847
5848
5849
5850
5851
5852 for ac_func in sigaction syslog realpath setrlimit
5853 do
5854 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
5855 { $as_echo "$as_me:$LINENO: checking for $ac_func" >&5
5856 $as_echo_n "checking for $ac_func... " >&6; }
5857 if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
5858   $as_echo_n "(cached) " >&6
5859 else
5860   cat >conftest.$ac_ext <<_ACEOF
5861 /* confdefs.h.  */
5862 _ACEOF
5863 cat confdefs.h >>conftest.$ac_ext
5864 cat >>conftest.$ac_ext <<_ACEOF
5865 /* end confdefs.h.  */
5866 /* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
5867    For example, HP-UX 11i <limits.h> declares gettimeofday.  */
5868 #define $ac_func innocuous_$ac_func
5869
5870 /* System header to define __stub macros and hopefully few prototypes,
5871     which can conflict with char $ac_func (); below.
5872     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
5873     <limits.h> exists even on freestanding compilers.  */
5874
5875 #ifdef __STDC__
5876 # include <limits.h>
5877 #else
5878 # include <assert.h>
5879 #endif
5880
5881 #undef $ac_func
5882
5883 /* Override any GCC internal prototype to avoid an error.
5884    Use char because int might match the return type of a GCC
5885    builtin and then its argument prototype would still apply.  */
5886 #ifdef __cplusplus
5887 extern "C"
5888 #endif
5889 char $ac_func ();
5890 /* The GNU C library defines this for functions which it implements
5891     to always fail with ENOSYS.  Some functions are actually named
5892     something starting with __ and the normal name is an alias.  */
5893 #if defined __stub_$ac_func || defined __stub___$ac_func
5894 choke me
5895 #endif
5896
5897 int
5898 main ()
5899 {
5900 return $ac_func ();
5901   ;
5902   return 0;
5903 }
5904 _ACEOF
5905 rm -rf conftest.$ac_objext conftest$ac_exeext
5906 if { (ac_try="$ac_link"
5907 case "(($ac_try" in
5908   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5909   *) ac_try_echo=$ac_try;;
5910 esac
5911 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
5912 $as_echo "$ac_try_echo") >&5
5913   (eval "$ac_link") 2>conftest.er1
5914   ac_status=$?
5915   grep -v '^ *+' conftest.er1 >conftest.err
5916   rm -rf conftest.er1
5917   cat conftest.err >&5
5918   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
5919   (exit $ac_status); } && {
5920          test -z "$ac_c_werror_flag" ||
5921          test ! -s conftest.err
5922        } && test -s conftest$ac_exeext && {
5923          test "$cross_compiling" = yes ||
5924          $as_test_x conftest$ac_exeext
5925        }; then
5926   eval "$as_ac_var=yes"
5927 else
5928   $as_echo "$as_me: failed program was:" >&5
5929 sed 's/^/| /' conftest.$ac_ext >&5
5930
5931         eval "$as_ac_var=no"
5932 fi
5933
5934 rm -rf conftest.dSYM
5935 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
5936       conftest$ac_exeext conftest.$ac_ext
5937 fi
5938 ac_res=`eval 'as_val=${'$as_ac_var'}
5939                  $as_echo "$as_val"'`
5940                { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
5941 $as_echo "$ac_res" >&6; }
5942 as_val=`eval 'as_val=${'$as_ac_var'}
5943                  $as_echo "$as_val"'`
5944    if test "x$as_val" = x""yes; then
5945   cat >>confdefs.h <<_ACEOF
5946 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
5947 _ACEOF
5948
5949 fi
5950 done
5951
5952
5953 for ac_func in setlocale
5954 do
5955 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
5956 { $as_echo "$as_me:$LINENO: checking for $ac_func" >&5
5957 $as_echo_n "checking for $ac_func... " >&6; }
5958 if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
5959   $as_echo_n "(cached) " >&6
5960 else
5961   cat >conftest.$ac_ext <<_ACEOF
5962 /* confdefs.h.  */
5963 _ACEOF
5964 cat confdefs.h >>conftest.$ac_ext
5965 cat >>conftest.$ac_ext <<_ACEOF
5966 /* end confdefs.h.  */
5967 /* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
5968    For example, HP-UX 11i <limits.h> declares gettimeofday.  */
5969 #define $ac_func innocuous_$ac_func
5970
5971 /* System header to define __stub macros and hopefully few prototypes,
5972     which can conflict with char $ac_func (); below.
5973     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
5974     <limits.h> exists even on freestanding compilers.  */
5975
5976 #ifdef __STDC__
5977 # include <limits.h>
5978 #else
5979 # include <assert.h>
5980 #endif
5981
5982 #undef $ac_func
5983
5984 /* Override any GCC internal prototype to avoid an error.
5985    Use char because int might match the return type of a GCC
5986    builtin and then its argument prototype would still apply.  */
5987 #ifdef __cplusplus
5988 extern "C"
5989 #endif
5990 char $ac_func ();
5991 /* The GNU C library defines this for functions which it implements
5992     to always fail with ENOSYS.  Some functions are actually named
5993     something starting with __ and the normal name is an alias.  */
5994 #if defined __stub_$ac_func || defined __stub___$ac_func
5995 choke me
5996 #endif
5997
5998 int
5999 main ()
6000 {
6001 return $ac_func ();
6002   ;
6003   return 0;
6004 }
6005 _ACEOF
6006 rm -rf conftest.$ac_objext conftest$ac_exeext
6007 if { (ac_try="$ac_link"
6008 case "(($ac_try" in
6009   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6010   *) ac_try_echo=$ac_try;;
6011 esac
6012 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
6013 $as_echo "$ac_try_echo") >&5
6014   (eval "$ac_link") 2>conftest.er1
6015   ac_status=$?
6016   grep -v '^ *+' conftest.er1 >conftest.err
6017   rm -rf conftest.er1
6018   cat conftest.err >&5
6019   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
6020   (exit $ac_status); } && {
6021          test -z "$ac_c_werror_flag" ||
6022          test ! -s conftest.err
6023        } && test -s conftest$ac_exeext && {
6024          test "$cross_compiling" = yes ||
6025          $as_test_x conftest$ac_exeext
6026        }; then
6027   eval "$as_ac_var=yes"
6028 else
6029   $as_echo "$as_me: failed program was:" >&5
6030 sed 's/^/| /' conftest.$ac_ext >&5
6031
6032         eval "$as_ac_var=no"
6033 fi
6034
6035 rm -rf conftest.dSYM
6036 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
6037       conftest$ac_exeext conftest.$ac_ext
6038 fi
6039 ac_res=`eval 'as_val=${'$as_ac_var'}
6040                  $as_echo "$as_val"'`
6041                { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
6042 $as_echo "$ac_res" >&6; }
6043 as_val=`eval 'as_val=${'$as_ac_var'}
6044                  $as_echo "$as_val"'`
6045    if test "x$as_val" = x""yes; then
6046   cat >>confdefs.h <<_ACEOF
6047 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
6048 _ACEOF
6049
6050 fi
6051 done
6052
6053 { $as_echo "$as_me:$LINENO: checking for struct icmp" >&5
6054 $as_echo_n "checking for struct icmp... " >&6; }
6055 if test "${ac_cv_have_icmp+set}" = set; then
6056   $as_echo_n "(cached) " >&6
6057 else
6058   cat >conftest.$ac_ext <<_ACEOF
6059 /* confdefs.h.  */
6060 _ACEOF
6061 cat confdefs.h >>conftest.$ac_ext
6062 cat >>conftest.$ac_ext <<_ACEOF
6063 /* end confdefs.h.  */
6064 #include <stdlib.h>
6065                    #include <stdio.h>
6066                    #include <math.h>
6067                    #include <unistd.h>
6068                    #include <limits.h>
6069                    #include <signal.h>
6070                    #include <fcntl.h>
6071                    #include <sys/types.h>
6072                    #include <sys/time.h>
6073                    #include <sys/ipc.h>
6074                    #include <sys/shm.h>
6075                    #include <sys/socket.h>
6076                    #include <netinet/in_systm.h>
6077                    #include <netinet/in.h>
6078                    #include <netinet/ip.h>
6079                    #include <netinet/ip_icmp.h>
6080                    #include <netinet/udp.h>
6081                    #include <arpa/inet.h>
6082                    #include <netdb.h>
6083 int
6084 main ()
6085 {
6086 struct icmp i;
6087                    struct sockaddr s;
6088                    struct sockaddr_in si;
6089                    struct ip ip;
6090                    i.icmp_type = ICMP_ECHO;
6091                    i.icmp_code = 0;
6092                    i.icmp_cksum = 0;
6093                    i.icmp_id = 0;
6094                    i.icmp_seq = 0;
6095                    si.sin_family = AF_INET;
6096                    #if defined(__DECC) || defined(_IP_VHL)
6097                    ip.ip_vhl = 0;
6098                    #else
6099                    ip.ip_hl = 0;
6100                    #endif
6101
6102   ;
6103   return 0;
6104 }
6105 _ACEOF
6106 rm -rf conftest.$ac_objext
6107 if { (ac_try="$ac_compile"
6108 case "(($ac_try" in
6109   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6110   *) ac_try_echo=$ac_try;;
6111 esac
6112 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
6113 $as_echo "$ac_try_echo") >&5
6114   (eval "$ac_compile") 2>conftest.er1
6115   ac_status=$?
6116   grep -v '^ *+' conftest.er1 >conftest.err
6117   rm -rf conftest.er1
6118   cat conftest.err >&5
6119   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
6120   (exit $ac_status); } && {
6121          test -z "$ac_c_werror_flag" ||
6122          test ! -s conftest.err
6123        } && test -s conftest.$ac_objext; then
6124   ac_cv_have_icmp=yes
6125 else
6126   $as_echo "$as_me: failed program was:" >&5
6127 sed 's/^/| /' conftest.$ac_ext >&5
6128
6129         ac_cv_have_icmp=no
6130 fi
6131
6132 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6133 fi
6134 { $as_echo "$as_me:$LINENO: result: $ac_cv_have_icmp" >&5
6135 $as_echo "$ac_cv_have_icmp" >&6; }
6136  if test "$ac_cv_have_icmp" = yes ; then
6137    cat >>confdefs.h <<\_ACEOF
6138 #define HAVE_ICMP 1
6139 _ACEOF
6140
6141  fi
6142 { $as_echo "$as_me:$LINENO: checking for struct icmphdr" >&5
6143 $as_echo_n "checking for struct icmphdr... " >&6; }
6144 if test "${ac_cv_have_icmphdr+set}" = set; then
6145   $as_echo_n "(cached) " >&6
6146 else
6147   cat >conftest.$ac_ext <<_ACEOF
6148 /* confdefs.h.  */
6149 _ACEOF
6150 cat confdefs.h >>conftest.$ac_ext
6151 cat >>conftest.$ac_ext <<_ACEOF
6152 /* end confdefs.h.  */
6153 #include <stdlib.h>
6154                    #include <stdio.h>
6155                    #include <math.h>
6156                    #include <unistd.h>
6157                    #include <limits.h>
6158                    #include <signal.h>
6159                    #include <fcntl.h>
6160                    #include <sys/types.h>
6161                    #include <sys/time.h>
6162                    #include <sys/ipc.h>
6163                    #include <sys/shm.h>
6164                    #include <sys/socket.h>
6165                    #include <netinet/in_systm.h>
6166                    #include <netinet/in.h>
6167                    #include <netinet/ip.h>
6168                    #include <netinet/ip_icmp.h>
6169                    #include <netinet/udp.h>
6170                    #include <arpa/inet.h>
6171                    #include <netdb.h>
6172 int
6173 main ()
6174 {
6175 struct icmphdr i;
6176                    struct sockaddr s;
6177                    struct sockaddr_in si;
6178                    struct ip ip;
6179                    i.type = ICMP_ECHO;
6180                    i.code = 0;
6181                    i.checksum = 0;
6182                    i.un.echo.id = 0;
6183                    i.un.echo.sequence = 0;
6184                    si.sin_family = AF_INET;
6185                    ip.ip_hl = 0;
6186   ;
6187   return 0;
6188 }
6189 _ACEOF
6190 rm -rf conftest.$ac_objext
6191 if { (ac_try="$ac_compile"
6192 case "(($ac_try" in
6193   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6194   *) ac_try_echo=$ac_try;;
6195 esac
6196 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
6197 $as_echo "$ac_try_echo") >&5
6198   (eval "$ac_compile") 2>conftest.er1
6199   ac_status=$?
6200   grep -v '^ *+' conftest.er1 >conftest.err
6201   rm -rf conftest.er1
6202   cat conftest.err >&5
6203   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
6204   (exit $ac_status); } && {
6205          test -z "$ac_c_werror_flag" ||
6206          test ! -s conftest.err
6207        } && test -s conftest.$ac_objext; then
6208   ac_cv_have_icmphdr=yes
6209 else
6210   $as_echo "$as_me: failed program was:" >&5
6211 sed 's/^/| /' conftest.$ac_ext >&5
6212
6213         ac_cv_have_icmphdr=no
6214 fi
6215
6216 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6217 fi
6218 { $as_echo "$as_me:$LINENO: result: $ac_cv_have_icmphdr" >&5
6219 $as_echo "$ac_cv_have_icmphdr" >&6; }
6220  if test "$ac_cv_have_icmphdr" = yes ; then
6221    cat >>confdefs.h <<\_ACEOF
6222 #define HAVE_ICMPHDR 1
6223 _ACEOF
6224
6225  fi
6226
6227
6228 for ac_header in crypt.h sys/select.h
6229 do
6230 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
6231 if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
6232   { $as_echo "$as_me:$LINENO: checking for $ac_header" >&5
6233 $as_echo_n "checking for $ac_header... " >&6; }
6234 if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
6235   $as_echo_n "(cached) " >&6
6236 fi
6237 ac_res=`eval 'as_val=${'$as_ac_Header'}
6238                  $as_echo "$as_val"'`
6239                { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
6240 $as_echo "$ac_res" >&6; }
6241 else
6242   # Is the header compilable?
6243 { $as_echo "$as_me:$LINENO: checking $ac_header usability" >&5
6244 $as_echo_n "checking $ac_header usability... " >&6; }
6245 cat >conftest.$ac_ext <<_ACEOF
6246 /* confdefs.h.  */
6247 _ACEOF
6248 cat confdefs.h >>conftest.$ac_ext
6249 cat >>conftest.$ac_ext <<_ACEOF
6250 /* end confdefs.h.  */
6251 $ac_includes_default
6252 #include <$ac_header>
6253 _ACEOF
6254 rm -rf conftest.$ac_objext
6255 if { (ac_try="$ac_compile"
6256 case "(($ac_try" in
6257   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6258   *) ac_try_echo=$ac_try;;
6259 esac
6260 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
6261 $as_echo "$ac_try_echo") >&5
6262   (eval "$ac_compile") 2>conftest.er1
6263   ac_status=$?
6264   grep -v '^ *+' conftest.er1 >conftest.err
6265   rm -rf conftest.er1
6266   cat conftest.err >&5
6267   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
6268   (exit $ac_status); } && {
6269          test -z "$ac_c_werror_flag" ||
6270          test ! -s conftest.err
6271        } && test -s conftest.$ac_objext; then
6272   ac_header_compiler=yes
6273 else
6274   $as_echo "$as_me: failed program was:" >&5
6275 sed 's/^/| /' conftest.$ac_ext >&5
6276
6277         ac_header_compiler=no
6278 fi
6279
6280 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6281 { $as_echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
6282 $as_echo "$ac_header_compiler" >&6; }
6283
6284 # Is the header present?
6285 { $as_echo "$as_me:$LINENO: checking $ac_header presence" >&5
6286 $as_echo_n "checking $ac_header presence... " >&6; }
6287 cat >conftest.$ac_ext <<_ACEOF
6288 /* confdefs.h.  */
6289 _ACEOF
6290 cat confdefs.h >>conftest.$ac_ext
6291 cat >>conftest.$ac_ext <<_ACEOF
6292 /* end confdefs.h.  */
6293 #include <$ac_header>
6294 _ACEOF
6295 if { (ac_try="$ac_cpp conftest.$ac_ext"
6296 case "(($ac_try" in
6297   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6298   *) ac_try_echo=$ac_try;;
6299 esac
6300 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
6301 $as_echo "$ac_try_echo") >&5
6302   (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
6303   ac_status=$?
6304   grep -v '^ *+' conftest.er1 >conftest.err
6305   rm -rf conftest.er1
6306   cat conftest.err >&5
6307   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
6308   (exit $ac_status); } >/dev/null && {
6309          test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
6310          test ! -s conftest.err
6311        }; then
6312   ac_header_preproc=yes
6313 else
6314   $as_echo "$as_me: failed program was:" >&5
6315 sed 's/^/| /' conftest.$ac_ext >&5
6316
6317   ac_header_preproc=no
6318 fi
6319
6320 rm -rf conftest.err conftest.$ac_ext
6321 { $as_echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
6322 $as_echo "$ac_header_preproc" >&6; }
6323
6324 # So?  What about this header?
6325 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
6326   yes:no: )
6327     { $as_echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
6328 $as_echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
6329     { $as_echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
6330 $as_echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
6331     ac_header_preproc=yes
6332     ;;
6333   no:yes:* )
6334     { $as_echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
6335 $as_echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
6336     { $as_echo "$as_me:$LINENO: WARNING: $ac_header:     check for missing prerequisite headers?" >&5
6337 $as_echo "$as_me: WARNING: $ac_header:     check for missing prerequisite headers?" >&2;}
6338     { $as_echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
6339 $as_echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
6340     { $as_echo "$as_me:$LINENO: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&5
6341 $as_echo "$as_me: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&2;}
6342     { $as_echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
6343 $as_echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
6344     { $as_echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
6345 $as_echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
6346
6347     ;;
6348 esac
6349 { $as_echo "$as_me:$LINENO: checking for $ac_header" >&5
6350 $as_echo_n "checking for $ac_header... " >&6; }
6351 if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
6352   $as_echo_n "(cached) " >&6
6353 else
6354   eval "$as_ac_Header=\$ac_header_preproc"
6355 fi
6356 ac_res=`eval 'as_val=${'$as_ac_Header'}
6357                  $as_echo "$as_val"'`
6358                { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
6359 $as_echo "$ac_res" >&6; }
6360
6361 fi
6362 as_val=`eval 'as_val=${'$as_ac_Header'}
6363                  $as_echo "$as_val"'`
6364    if test "x$as_val" = x""yes; then
6365   cat >>confdefs.h <<_ACEOF
6366 #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
6367 _ACEOF
6368
6369 fi
6370
6371 done
6372
6373 for ac_prog in perl5 perl
6374 do
6375   # Extract the first word of "$ac_prog", so it can be a program name with args.
6376 set dummy $ac_prog; ac_word=$2
6377 { $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
6378 $as_echo_n "checking for $ac_word... " >&6; }
6379 if test "${ac_cv_path_PERL+set}" = set; then
6380   $as_echo_n "(cached) " >&6
6381 else
6382   case $PERL in
6383   [\\/]* | ?:[\\/]*)
6384   ac_cv_path_PERL="$PERL" # Let the user override the test with a path.
6385   ;;
6386   *)
6387   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6388 for as_dir in $PATH
6389 do
6390   IFS=$as_save_IFS
6391   test -z "$as_dir" && as_dir=.
6392   for ac_exec_ext in '' $ac_executable_extensions; do
6393   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
6394     ac_cv_path_PERL="$as_dir/$ac_word$ac_exec_ext"
6395     $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
6396     break 2
6397   fi
6398 done
6399 done
6400 IFS=$as_save_IFS
6401
6402   ;;
6403 esac
6404 fi
6405 PERL=$ac_cv_path_PERL
6406 if test -n "$PERL"; then
6407   { $as_echo "$as_me:$LINENO: result: $PERL" >&5
6408 $as_echo "$PERL" >&6; }
6409 else
6410   { $as_echo "$as_me:$LINENO: result: no" >&5
6411 $as_echo "no" >&6; }
6412 fi
6413
6414
6415   test -n "$PERL" && break
6416 done
6417
6418   if test -z "$PERL" ; then
6419     PERL_VERSION=0
6420   else
6421     { $as_echo "$as_me:$LINENO: checking perl version" >&5
6422 $as_echo_n "checking perl version... " >&6; }
6423 if test "${ac_cv_perl_version+set}" = set; then
6424   $as_echo_n "(cached) " >&6
6425 else
6426   ac_cv_perl_version=`$PERL -e "$perl_version_cmd"`
6427 fi
6428 { $as_echo "$as_me:$LINENO: result: $ac_cv_perl_version" >&5
6429 $as_echo "$ac_cv_perl_version" >&6; }
6430     PERL_VERSION=$ac_cv_perl_version
6431   fi
6432
6433
6434 if test -z "$PERL" ; then
6435   # don't let it be blank...
6436   PERL=/usr/bin/perl
6437 fi
6438
6439 { $as_echo "$as_me:$LINENO: checking for X" >&5
6440 $as_echo_n "checking for X... " >&6; }
6441
6442
6443 # Check whether --with-x was given.
6444 if test "${with_x+set}" = set; then
6445   withval=$with_x;
6446 fi
6447
6448 # $have_x is `yes', `no', `disabled', or empty when we do not yet know.
6449 if test "x$with_x" = xno; then
6450   # The user explicitly disabled X.
6451   have_x=disabled
6452 else
6453   case $x_includes,$x_libraries in #(
6454     *\'*) { { $as_echo "$as_me:$LINENO: error: cannot use X directory names containing '" >&5
6455 $as_echo "$as_me: error: cannot use X directory names containing '" >&2;}
6456    { (exit 1); exit 1; }; };; #(
6457     *,NONE | NONE,*) if test "${ac_cv_have_x+set}" = set; then
6458   $as_echo_n "(cached) " >&6
6459 else
6460   # One or both of the vars are not set, and there is no cached value.
6461 ac_x_includes=no ac_x_libraries=no
6462 rm -f -r conftest.dir
6463 if mkdir conftest.dir; then
6464   cd conftest.dir
6465   cat >Imakefile <<'_ACEOF'
6466 incroot:
6467         @echo incroot='${INCROOT}'
6468 usrlibdir:
6469         @echo usrlibdir='${USRLIBDIR}'
6470 libdir:
6471         @echo libdir='${LIBDIR}'
6472 _ACEOF
6473   if (export CC; ${XMKMF-xmkmf}) >/dev/null 2>/dev/null && test -f Makefile; then
6474     # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
6475     for ac_var in incroot usrlibdir libdir; do
6476       eval "ac_im_$ac_var=\`\${MAKE-make} $ac_var 2>/dev/null | sed -n 's/^$ac_var=//p'\`"
6477     done
6478     # Open Windows xmkmf reportedly sets LIBDIR instead of USRLIBDIR.
6479     for ac_extension in a so sl dylib la dll; do
6480       if test ! -f "$ac_im_usrlibdir/libX11.$ac_extension" &&
6481          test -f "$ac_im_libdir/libX11.$ac_extension"; then
6482         ac_im_usrlibdir=$ac_im_libdir; break
6483       fi
6484     done
6485     # Screen out bogus values from the imake configuration.  They are
6486     # bogus both because they are the default anyway, and because
6487     # using them would break gcc on systems where it needs fixed includes.
6488     case $ac_im_incroot in
6489         /usr/include) ac_x_includes= ;;
6490         *) test -f "$ac_im_incroot/X11/Xos.h" && ac_x_includes=$ac_im_incroot;;
6491     esac
6492     case $ac_im_usrlibdir in
6493         /usr/lib | /usr/lib64 | /lib | /lib64) ;;
6494         *) test -d "$ac_im_usrlibdir" && ac_x_libraries=$ac_im_usrlibdir ;;
6495     esac
6496   fi
6497   cd ..
6498   rm -f -r conftest.dir
6499 fi
6500
6501 # Standard set of common directories for X headers.
6502 # Check X11 before X11Rn because it is often a symlink to the current release.
6503 ac_x_header_dirs='
6504 /usr/X11/include
6505 /usr/X11R6/include
6506 /usr/X11R5/include
6507 /usr/X11R4/include
6508
6509 /usr/include/X11
6510 /usr/include/X11R6
6511 /usr/include/X11R5
6512 /usr/include/X11R4
6513
6514 /usr/local/X11/include
6515 /usr/local/X11R6/include
6516 /usr/local/X11R5/include
6517 /usr/local/X11R4/include
6518
6519 /usr/local/include/X11
6520 /usr/local/include/X11R6
6521 /usr/local/include/X11R5
6522 /usr/local/include/X11R4
6523
6524 /usr/X386/include
6525 /usr/x386/include
6526 /usr/XFree86/include/X11
6527
6528 /usr/include
6529 /usr/local/include
6530 /usr/unsupported/include
6531 /usr/athena/include
6532 /usr/local/x11r5/include
6533 /usr/lpp/Xamples/include
6534
6535 /usr/openwin/include
6536 /usr/openwin/share/include'
6537
6538 if test "$ac_x_includes" = no; then
6539   # Guess where to find include files, by looking for Xlib.h.
6540   # First, try using that file with no special directory specified.
6541   cat >conftest.$ac_ext <<_ACEOF
6542 /* confdefs.h.  */
6543 _ACEOF
6544 cat confdefs.h >>conftest.$ac_ext
6545 cat >>conftest.$ac_ext <<_ACEOF
6546 /* end confdefs.h.  */
6547 #include <X11/Xlib.h>
6548 _ACEOF
6549 if { (ac_try="$ac_cpp conftest.$ac_ext"
6550 case "(($ac_try" in
6551   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6552   *) ac_try_echo=$ac_try;;
6553 esac
6554 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
6555 $as_echo "$ac_try_echo") >&5
6556   (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
6557   ac_status=$?
6558   grep -v '^ *+' conftest.er1 >conftest.err
6559   rm -rf conftest.er1
6560   cat conftest.err >&5
6561   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
6562   (exit $ac_status); } >/dev/null && {
6563          test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
6564          test ! -s conftest.err
6565        }; then
6566   # We can compile using X headers with no special include directory.
6567 ac_x_includes=
6568 else
6569   $as_echo "$as_me: failed program was:" >&5
6570 sed 's/^/| /' conftest.$ac_ext >&5
6571
6572   for ac_dir in $ac_x_header_dirs; do
6573   if test -r "$ac_dir/X11/Xlib.h"; then
6574     ac_x_includes=$ac_dir
6575     break
6576   fi
6577 done
6578 fi
6579
6580 rm -rf conftest.err conftest.$ac_ext
6581 fi # $ac_x_includes = no
6582
6583 if test "$ac_x_libraries" = no; then
6584   # Check for the libraries.
6585   # See if we find them without any special options.
6586   # Don't add to $LIBS permanently.
6587   ac_save_LIBS=$LIBS
6588   LIBS="-lX11 $LIBS"
6589   cat >conftest.$ac_ext <<_ACEOF
6590 /* confdefs.h.  */
6591 _ACEOF
6592 cat confdefs.h >>conftest.$ac_ext
6593 cat >>conftest.$ac_ext <<_ACEOF
6594 /* end confdefs.h.  */
6595 #include <X11/Xlib.h>
6596 int
6597 main ()
6598 {
6599 XrmInitialize ()
6600   ;
6601   return 0;
6602 }
6603 _ACEOF
6604 rm -rf conftest.$ac_objext conftest$ac_exeext
6605 if { (ac_try="$ac_link"
6606 case "(($ac_try" in
6607   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6608   *) ac_try_echo=$ac_try;;
6609 esac
6610 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
6611 $as_echo "$ac_try_echo") >&5
6612   (eval "$ac_link") 2>conftest.er1
6613   ac_status=$?
6614   grep -v '^ *+' conftest.er1 >conftest.err
6615   rm -rf conftest.er1
6616   cat conftest.err >&5
6617   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
6618   (exit $ac_status); } && {
6619          test -z "$ac_c_werror_flag" ||
6620          test ! -s conftest.err
6621        } && test -s conftest$ac_exeext && {
6622          test "$cross_compiling" = yes ||
6623          $as_test_x conftest$ac_exeext
6624        }; then
6625   LIBS=$ac_save_LIBS
6626 # We can link X programs with no special library path.
6627 ac_x_libraries=
6628 else
6629   $as_echo "$as_me: failed program was:" >&5
6630 sed 's/^/| /' conftest.$ac_ext >&5
6631
6632         LIBS=$ac_save_LIBS
6633 for ac_dir in `$as_echo "$ac_x_includes $ac_x_header_dirs" | sed s/include/lib/g`
6634 do
6635   # Don't even attempt the hair of trying to link an X program!
6636   for ac_extension in a so sl dylib la dll; do
6637     if test -r "$ac_dir/libX11.$ac_extension"; then
6638       ac_x_libraries=$ac_dir
6639       break 2
6640     fi
6641   done
6642 done
6643 fi
6644
6645 rm -rf conftest.dSYM
6646 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
6647       conftest$ac_exeext conftest.$ac_ext
6648 fi # $ac_x_libraries = no
6649
6650 case $ac_x_includes,$ac_x_libraries in #(
6651   no,* | *,no | *\'*)
6652     # Didn't find X, or a directory has "'" in its name.
6653     ac_cv_have_x="have_x=no";; #(
6654   *)
6655     # Record where we found X for the cache.
6656     ac_cv_have_x="have_x=yes\
6657         ac_x_includes='$ac_x_includes'\
6658         ac_x_libraries='$ac_x_libraries'"
6659 esac
6660 fi
6661 ;; #(
6662     *) have_x=yes;;
6663   esac
6664   eval "$ac_cv_have_x"
6665 fi # $with_x != no
6666
6667 if test "$have_x" != yes; then
6668   { $as_echo "$as_me:$LINENO: result: $have_x" >&5
6669 $as_echo "$have_x" >&6; }
6670   no_x=yes
6671 else
6672   # If each of the values was on the command line, it overrides each guess.
6673   test "x$x_includes" = xNONE && x_includes=$ac_x_includes
6674   test "x$x_libraries" = xNONE && x_libraries=$ac_x_libraries
6675   # Update the cache value to reflect the command line values.
6676   ac_cv_have_x="have_x=yes\
6677         ac_x_includes='$x_includes'\
6678         ac_x_libraries='$x_libraries'"
6679   { $as_echo "$as_me:$LINENO: result: libraries $x_libraries, headers $x_includes" >&5
6680 $as_echo "libraries $x_libraries, headers $x_includes" >&6; }
6681 fi
6682
6683 if test "$no_x" = yes; then
6684   # Not all programs may use this symbol, but it does not hurt to define it.
6685
6686 cat >>confdefs.h <<\_ACEOF
6687 #define X_DISPLAY_MISSING 1
6688 _ACEOF
6689
6690   X_CFLAGS= X_PRE_LIBS= X_LIBS= X_EXTRA_LIBS=
6691 else
6692   if test -n "$x_includes"; then
6693     X_CFLAGS="$X_CFLAGS -I$x_includes"
6694   fi
6695
6696   # It would also be nice to do this for all -L options, not just this one.
6697   if test -n "$x_libraries"; then
6698     X_LIBS="$X_LIBS -L$x_libraries"
6699     # For Solaris; some versions of Sun CC require a space after -R and
6700     # others require no space.  Words are not sufficient . . . .
6701     { $as_echo "$as_me:$LINENO: checking whether -R must be followed by a space" >&5
6702 $as_echo_n "checking whether -R must be followed by a space... " >&6; }
6703     ac_xsave_LIBS=$LIBS; LIBS="$LIBS -R$x_libraries"
6704     ac_xsave_c_werror_flag=$ac_c_werror_flag
6705     ac_c_werror_flag=yes
6706     cat >conftest.$ac_ext <<_ACEOF
6707 /* confdefs.h.  */
6708 _ACEOF
6709 cat confdefs.h >>conftest.$ac_ext
6710 cat >>conftest.$ac_ext <<_ACEOF
6711 /* end confdefs.h.  */
6712
6713 int
6714 main ()
6715 {
6716
6717   ;
6718   return 0;
6719 }
6720 _ACEOF
6721 rm -rf conftest.$ac_objext conftest$ac_exeext
6722 if { (ac_try="$ac_link"
6723 case "(($ac_try" in
6724   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6725   *) ac_try_echo=$ac_try;;
6726 esac
6727 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
6728 $as_echo "$ac_try_echo") >&5
6729   (eval "$ac_link") 2>conftest.er1
6730   ac_status=$?
6731   grep -v '^ *+' conftest.er1 >conftest.err
6732   rm -rf conftest.er1
6733   cat conftest.err >&5
6734   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
6735   (exit $ac_status); } && {
6736          test -z "$ac_c_werror_flag" ||
6737          test ! -s conftest.err
6738        } && test -s conftest$ac_exeext && {
6739          test "$cross_compiling" = yes ||
6740          $as_test_x conftest$ac_exeext
6741        }; then
6742   { $as_echo "$as_me:$LINENO: result: no" >&5
6743 $as_echo "no" >&6; }
6744        X_LIBS="$X_LIBS -R$x_libraries"
6745 else
6746   $as_echo "$as_me: failed program was:" >&5
6747 sed 's/^/| /' conftest.$ac_ext >&5
6748
6749         LIBS="$ac_xsave_LIBS -R $x_libraries"
6750        cat >conftest.$ac_ext <<_ACEOF
6751 /* confdefs.h.  */
6752 _ACEOF
6753 cat confdefs.h >>conftest.$ac_ext
6754 cat >>conftest.$ac_ext <<_ACEOF
6755 /* end confdefs.h.  */
6756
6757 int
6758 main ()
6759 {
6760
6761   ;
6762   return 0;
6763 }
6764 _ACEOF
6765 rm -rf conftest.$ac_objext conftest$ac_exeext
6766 if { (ac_try="$ac_link"
6767 case "(($ac_try" in
6768   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6769   *) ac_try_echo=$ac_try;;
6770 esac
6771 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
6772 $as_echo "$ac_try_echo") >&5
6773   (eval "$ac_link") 2>conftest.er1
6774   ac_status=$?
6775   grep -v '^ *+' conftest.er1 >conftest.err
6776   rm -rf conftest.er1
6777   cat conftest.err >&5
6778   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
6779   (exit $ac_status); } && {
6780          test -z "$ac_c_werror_flag" ||
6781          test ! -s conftest.err
6782        } && test -s conftest$ac_exeext && {
6783          test "$cross_compiling" = yes ||
6784          $as_test_x conftest$ac_exeext
6785        }; then
6786   { $as_echo "$as_me:$LINENO: result: yes" >&5
6787 $as_echo "yes" >&6; }
6788           X_LIBS="$X_LIBS -R $x_libraries"
6789 else
6790   $as_echo "$as_me: failed program was:" >&5
6791 sed 's/^/| /' conftest.$ac_ext >&5
6792
6793         { $as_echo "$as_me:$LINENO: result: neither works" >&5
6794 $as_echo "neither works" >&6; }
6795 fi
6796
6797 rm -rf conftest.dSYM
6798 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
6799       conftest$ac_exeext conftest.$ac_ext
6800 fi
6801
6802 rm -rf conftest.dSYM
6803 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
6804       conftest$ac_exeext conftest.$ac_ext
6805     ac_c_werror_flag=$ac_xsave_c_werror_flag
6806     LIBS=$ac_xsave_LIBS
6807   fi
6808
6809   # Check for system-dependent libraries X programs must link with.
6810   # Do this before checking for the system-independent R6 libraries
6811   # (-lICE), since we may need -lsocket or whatever for X linking.
6812
6813   if test "$ISC" = yes; then
6814     X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl_s -linet"
6815   else
6816     # Martyn Johnson says this is needed for Ultrix, if the X
6817     # libraries were built with DECnet support.  And Karl Berry says
6818     # the Alpha needs dnet_stub (dnet does not exist).
6819     ac_xsave_LIBS="$LIBS"; LIBS="$LIBS $X_LIBS -lX11"
6820     cat >conftest.$ac_ext <<_ACEOF
6821 /* confdefs.h.  */
6822 _ACEOF
6823 cat confdefs.h >>conftest.$ac_ext
6824 cat >>conftest.$ac_ext <<_ACEOF
6825 /* end confdefs.h.  */
6826
6827 /* Override any GCC internal prototype to avoid an error.
6828    Use char because int might match the return type of a GCC
6829    builtin and then its argument prototype would still apply.  */
6830 #ifdef __cplusplus
6831 extern "C"
6832 #endif
6833 char XOpenDisplay ();
6834 int
6835 main ()
6836 {
6837 return XOpenDisplay ();
6838   ;
6839   return 0;
6840 }
6841 _ACEOF
6842 rm -rf conftest.$ac_objext conftest$ac_exeext
6843 if { (ac_try="$ac_link"
6844 case "(($ac_try" in
6845   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6846   *) ac_try_echo=$ac_try;;
6847 esac
6848 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
6849 $as_echo "$ac_try_echo") >&5
6850   (eval "$ac_link") 2>conftest.er1
6851   ac_status=$?
6852   grep -v '^ *+' conftest.er1 >conftest.err
6853   rm -rf conftest.er1
6854   cat conftest.err >&5
6855   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
6856   (exit $ac_status); } && {
6857          test -z "$ac_c_werror_flag" ||
6858          test ! -s conftest.err
6859        } && test -s conftest$ac_exeext && {
6860          test "$cross_compiling" = yes ||
6861          $as_test_x conftest$ac_exeext
6862        }; then
6863   :
6864 else
6865   $as_echo "$as_me: failed program was:" >&5
6866 sed 's/^/| /' conftest.$ac_ext >&5
6867
6868         { $as_echo "$as_me:$LINENO: checking for dnet_ntoa in -ldnet" >&5
6869 $as_echo_n "checking for dnet_ntoa in -ldnet... " >&6; }
6870 if test "${ac_cv_lib_dnet_dnet_ntoa+set}" = set; then
6871   $as_echo_n "(cached) " >&6
6872 else
6873   ac_check_lib_save_LIBS=$LIBS
6874 LIBS="-ldnet  $LIBS"
6875 cat >conftest.$ac_ext <<_ACEOF
6876 /* confdefs.h.  */
6877 _ACEOF
6878 cat confdefs.h >>conftest.$ac_ext
6879 cat >>conftest.$ac_ext <<_ACEOF
6880 /* end confdefs.h.  */
6881
6882 /* Override any GCC internal prototype to avoid an error.
6883    Use char because int might match the return type of a GCC
6884    builtin and then its argument prototype would still apply.  */
6885 #ifdef __cplusplus
6886 extern "C"
6887 #endif
6888 char dnet_ntoa ();
6889 int
6890 main ()
6891 {
6892 return dnet_ntoa ();
6893   ;
6894   return 0;
6895 }
6896 _ACEOF
6897 rm -rf conftest.$ac_objext conftest$ac_exeext
6898 if { (ac_try="$ac_link"
6899 case "(($ac_try" in
6900   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6901   *) ac_try_echo=$ac_try;;
6902 esac
6903 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
6904 $as_echo "$ac_try_echo") >&5
6905   (eval "$ac_link") 2>conftest.er1
6906   ac_status=$?
6907   grep -v '^ *+' conftest.er1 >conftest.err
6908   rm -rf conftest.er1
6909   cat conftest.err >&5
6910   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
6911   (exit $ac_status); } && {
6912          test -z "$ac_c_werror_flag" ||
6913          test ! -s conftest.err
6914        } && test -s conftest$ac_exeext && {
6915          test "$cross_compiling" = yes ||
6916          $as_test_x conftest$ac_exeext
6917        }; then
6918   ac_cv_lib_dnet_dnet_ntoa=yes
6919 else
6920   $as_echo "$as_me: failed program was:" >&5
6921 sed 's/^/| /' conftest.$ac_ext >&5
6922
6923         ac_cv_lib_dnet_dnet_ntoa=no
6924 fi
6925
6926 rm -rf conftest.dSYM
6927 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
6928       conftest$ac_exeext conftest.$ac_ext
6929 LIBS=$ac_check_lib_save_LIBS
6930 fi
6931 { $as_echo "$as_me:$LINENO: result: $ac_cv_lib_dnet_dnet_ntoa" >&5
6932 $as_echo "$ac_cv_lib_dnet_dnet_ntoa" >&6; }
6933 if test "x$ac_cv_lib_dnet_dnet_ntoa" = x""yes; then
6934   X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet"
6935 fi
6936
6937     if test $ac_cv_lib_dnet_dnet_ntoa = no; then
6938       { $as_echo "$as_me:$LINENO: checking for dnet_ntoa in -ldnet_stub" >&5
6939 $as_echo_n "checking for dnet_ntoa in -ldnet_stub... " >&6; }
6940 if test "${ac_cv_lib_dnet_stub_dnet_ntoa+set}" = set; then
6941   $as_echo_n "(cached) " >&6
6942 else
6943   ac_check_lib_save_LIBS=$LIBS
6944 LIBS="-ldnet_stub  $LIBS"
6945 cat >conftest.$ac_ext <<_ACEOF
6946 /* confdefs.h.  */
6947 _ACEOF
6948 cat confdefs.h >>conftest.$ac_ext
6949 cat >>conftest.$ac_ext <<_ACEOF
6950 /* end confdefs.h.  */
6951
6952 /* Override any GCC internal prototype to avoid an error.
6953    Use char because int might match the return type of a GCC
6954    builtin and then its argument prototype would still apply.  */
6955 #ifdef __cplusplus
6956 extern "C"
6957 #endif
6958 char dnet_ntoa ();
6959 int
6960 main ()
6961 {
6962 return dnet_ntoa ();
6963   ;
6964   return 0;
6965 }
6966 _ACEOF
6967 rm -rf conftest.$ac_objext conftest$ac_exeext
6968 if { (ac_try="$ac_link"
6969 case "(($ac_try" in
6970   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6971   *) ac_try_echo=$ac_try;;
6972 esac
6973 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
6974 $as_echo "$ac_try_echo") >&5
6975   (eval "$ac_link") 2>conftest.er1
6976   ac_status=$?
6977   grep -v '^ *+' conftest.er1 >conftest.err
6978   rm -rf conftest.er1
6979   cat conftest.err >&5
6980   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
6981   (exit $ac_status); } && {
6982          test -z "$ac_c_werror_flag" ||
6983          test ! -s conftest.err
6984        } && test -s conftest$ac_exeext && {
6985          test "$cross_compiling" = yes ||
6986          $as_test_x conftest$ac_exeext
6987        }; then
6988   ac_cv_lib_dnet_stub_dnet_ntoa=yes
6989 else
6990   $as_echo "$as_me: failed program was:" >&5
6991 sed 's/^/| /' conftest.$ac_ext >&5
6992
6993         ac_cv_lib_dnet_stub_dnet_ntoa=no
6994 fi
6995
6996 rm -rf conftest.dSYM
6997 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
6998       conftest$ac_exeext conftest.$ac_ext
6999 LIBS=$ac_check_lib_save_LIBS
7000 fi
7001 { $as_echo "$as_me:$LINENO: result: $ac_cv_lib_dnet_stub_dnet_ntoa" >&5
7002 $as_echo "$ac_cv_lib_dnet_stub_dnet_ntoa" >&6; }
7003 if test "x$ac_cv_lib_dnet_stub_dnet_ntoa" = x""yes; then
7004   X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet_stub"
7005 fi
7006
7007     fi
7008 fi
7009
7010 rm -rf conftest.dSYM
7011 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
7012       conftest$ac_exeext conftest.$ac_ext
7013     LIBS="$ac_xsave_LIBS"
7014
7015     # msh@cis.ufl.edu says -lnsl (and -lsocket) are needed for his 386/AT,
7016     # to get the SysV transport functions.
7017     # Chad R. Larson says the Pyramis MIS-ES running DC/OSx (SVR4)
7018     # needs -lnsl.
7019     # The nsl library prevents programs from opening the X display
7020     # on Irix 5.2, according to T.E. Dickey.
7021     # The functions gethostbyname, getservbyname, and inet_addr are
7022     # in -lbsd on LynxOS 3.0.1/i386, according to Lars Hecking.
7023     { $as_echo "$as_me:$LINENO: checking for gethostbyname" >&5
7024 $as_echo_n "checking for gethostbyname... " >&6; }
7025 if test "${ac_cv_func_gethostbyname+set}" = set; then
7026   $as_echo_n "(cached) " >&6
7027 else
7028   cat >conftest.$ac_ext <<_ACEOF
7029 /* confdefs.h.  */
7030 _ACEOF
7031 cat confdefs.h >>conftest.$ac_ext
7032 cat >>conftest.$ac_ext <<_ACEOF
7033 /* end confdefs.h.  */
7034 /* Define gethostbyname to an innocuous variant, in case <limits.h> declares gethostbyname.
7035    For example, HP-UX 11i <limits.h> declares gettimeofday.  */
7036 #define gethostbyname innocuous_gethostbyname
7037
7038 /* System header to define __stub macros and hopefully few prototypes,
7039     which can conflict with char gethostbyname (); below.
7040     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
7041     <limits.h> exists even on freestanding compilers.  */
7042
7043 #ifdef __STDC__
7044 # include <limits.h>
7045 #else
7046 # include <assert.h>
7047 #endif
7048
7049 #undef gethostbyname
7050
7051 /* Override any GCC internal prototype to avoid an error.
7052    Use char because int might match the return type of a GCC
7053    builtin and then its argument prototype would still apply.  */
7054 #ifdef __cplusplus
7055 extern "C"
7056 #endif
7057 char gethostbyname ();
7058 /* The GNU C library defines this for functions which it implements
7059     to always fail with ENOSYS.  Some functions are actually named
7060     something starting with __ and the normal name is an alias.  */
7061 #if defined __stub_gethostbyname || defined __stub___gethostbyname
7062 choke me
7063 #endif
7064
7065 int
7066 main ()
7067 {
7068 return gethostbyname ();
7069   ;
7070   return 0;
7071 }
7072 _ACEOF
7073 rm -rf conftest.$ac_objext conftest$ac_exeext
7074 if { (ac_try="$ac_link"
7075 case "(($ac_try" in
7076   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7077   *) ac_try_echo=$ac_try;;
7078 esac
7079 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
7080 $as_echo "$ac_try_echo") >&5
7081   (eval "$ac_link") 2>conftest.er1
7082   ac_status=$?
7083   grep -v '^ *+' conftest.er1 >conftest.err
7084   rm -rf conftest.er1
7085   cat conftest.err >&5
7086   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
7087   (exit $ac_status); } && {
7088          test -z "$ac_c_werror_flag" ||
7089          test ! -s conftest.err
7090        } && test -s conftest$ac_exeext && {
7091          test "$cross_compiling" = yes ||
7092          $as_test_x conftest$ac_exeext
7093        }; then
7094   ac_cv_func_gethostbyname=yes
7095 else
7096   $as_echo "$as_me: failed program was:" >&5
7097 sed 's/^/| /' conftest.$ac_ext >&5
7098
7099         ac_cv_func_gethostbyname=no
7100 fi
7101
7102 rm -rf conftest.dSYM
7103 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
7104       conftest$ac_exeext conftest.$ac_ext
7105 fi
7106 { $as_echo "$as_me:$LINENO: result: $ac_cv_func_gethostbyname" >&5
7107 $as_echo "$ac_cv_func_gethostbyname" >&6; }
7108
7109     if test $ac_cv_func_gethostbyname = no; then
7110       { $as_echo "$as_me:$LINENO: checking for gethostbyname in -lnsl" >&5
7111 $as_echo_n "checking for gethostbyname in -lnsl... " >&6; }
7112 if test "${ac_cv_lib_nsl_gethostbyname+set}" = set; then
7113   $as_echo_n "(cached) " >&6
7114 else
7115   ac_check_lib_save_LIBS=$LIBS
7116 LIBS="-lnsl  $LIBS"
7117 cat >conftest.$ac_ext <<_ACEOF
7118 /* confdefs.h.  */
7119 _ACEOF
7120 cat confdefs.h >>conftest.$ac_ext
7121 cat >>conftest.$ac_ext <<_ACEOF
7122 /* end confdefs.h.  */
7123
7124 /* Override any GCC internal prototype to avoid an error.
7125    Use char because int might match the return type of a GCC
7126    builtin and then its argument prototype would still apply.  */
7127 #ifdef __cplusplus
7128 extern "C"
7129 #endif
7130 char gethostbyname ();
7131 int
7132 main ()
7133 {
7134 return gethostbyname ();
7135   ;
7136   return 0;
7137 }
7138 _ACEOF
7139 rm -rf conftest.$ac_objext conftest$ac_exeext
7140 if { (ac_try="$ac_link"
7141 case "(($ac_try" in
7142   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7143   *) ac_try_echo=$ac_try;;
7144 esac
7145 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
7146 $as_echo "$ac_try_echo") >&5
7147   (eval "$ac_link") 2>conftest.er1
7148   ac_status=$?
7149   grep -v '^ *+' conftest.er1 >conftest.err
7150   rm -rf conftest.er1
7151   cat conftest.err >&5
7152   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
7153   (exit $ac_status); } && {
7154          test -z "$ac_c_werror_flag" ||
7155          test ! -s conftest.err
7156        } && test -s conftest$ac_exeext && {
7157          test "$cross_compiling" = yes ||
7158          $as_test_x conftest$ac_exeext
7159        }; then
7160   ac_cv_lib_nsl_gethostbyname=yes
7161 else
7162   $as_echo "$as_me: failed program was:" >&5
7163 sed 's/^/| /' conftest.$ac_ext >&5
7164
7165         ac_cv_lib_nsl_gethostbyname=no
7166 fi
7167
7168 rm -rf conftest.dSYM
7169 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
7170       conftest$ac_exeext conftest.$ac_ext
7171 LIBS=$ac_check_lib_save_LIBS
7172 fi
7173 { $as_echo "$as_me:$LINENO: result: $ac_cv_lib_nsl_gethostbyname" >&5
7174 $as_echo "$ac_cv_lib_nsl_gethostbyname" >&6; }
7175 if test "x$ac_cv_lib_nsl_gethostbyname" = x""yes; then
7176   X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl"
7177 fi
7178
7179       if test $ac_cv_lib_nsl_gethostbyname = no; then
7180         { $as_echo "$as_me:$LINENO: checking for gethostbyname in -lbsd" >&5
7181 $as_echo_n "checking for gethostbyname in -lbsd... " >&6; }
7182 if test "${ac_cv_lib_bsd_gethostbyname+set}" = set; then
7183   $as_echo_n "(cached) " >&6
7184 else
7185   ac_check_lib_save_LIBS=$LIBS
7186 LIBS="-lbsd  $LIBS"
7187 cat >conftest.$ac_ext <<_ACEOF
7188 /* confdefs.h.  */
7189 _ACEOF
7190 cat confdefs.h >>conftest.$ac_ext
7191 cat >>conftest.$ac_ext <<_ACEOF
7192 /* end confdefs.h.  */
7193
7194 /* Override any GCC internal prototype to avoid an error.
7195    Use char because int might match the return type of a GCC
7196    builtin and then its argument prototype would still apply.  */
7197 #ifdef __cplusplus
7198 extern "C"
7199 #endif
7200 char gethostbyname ();
7201 int
7202 main ()
7203 {
7204 return gethostbyname ();
7205   ;
7206   return 0;
7207 }
7208 _ACEOF
7209 rm -rf conftest.$ac_objext conftest$ac_exeext
7210 if { (ac_try="$ac_link"
7211 case "(($ac_try" in
7212   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7213   *) ac_try_echo=$ac_try;;
7214 esac
7215 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
7216 $as_echo "$ac_try_echo") >&5
7217   (eval "$ac_link") 2>conftest.er1
7218   ac_status=$?
7219   grep -v '^ *+' conftest.er1 >conftest.err
7220   rm -rf conftest.er1
7221   cat conftest.err >&5
7222   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
7223   (exit $ac_status); } && {
7224          test -z "$ac_c_werror_flag" ||
7225          test ! -s conftest.err
7226        } && test -s conftest$ac_exeext && {
7227          test "$cross_compiling" = yes ||
7228          $as_test_x conftest$ac_exeext
7229        }; then
7230   ac_cv_lib_bsd_gethostbyname=yes
7231 else
7232   $as_echo "$as_me: failed program was:" >&5
7233 sed 's/^/| /' conftest.$ac_ext >&5
7234
7235         ac_cv_lib_bsd_gethostbyname=no
7236 fi
7237
7238 rm -rf conftest.dSYM
7239 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
7240       conftest$ac_exeext conftest.$ac_ext
7241 LIBS=$ac_check_lib_save_LIBS
7242 fi
7243 { $as_echo "$as_me:$LINENO: result: $ac_cv_lib_bsd_gethostbyname" >&5
7244 $as_echo "$ac_cv_lib_bsd_gethostbyname" >&6; }
7245 if test "x$ac_cv_lib_bsd_gethostbyname" = x""yes; then
7246   X_EXTRA_LIBS="$X_EXTRA_LIBS -lbsd"
7247 fi
7248
7249       fi
7250     fi
7251
7252     # lieder@skyler.mavd.honeywell.com says without -lsocket,
7253     # socket/setsockopt and other routines are undefined under SCO ODT
7254     # 2.0.  But -lsocket is broken on IRIX 5.2 (and is not necessary
7255     # on later versions), says Simon Leinen: it contains gethostby*
7256     # variants that don't use the name server (or something).  -lsocket
7257     # must be given before -lnsl if both are needed.  We assume that
7258     # if connect needs -lnsl, so does gethostbyname.
7259     { $as_echo "$as_me:$LINENO: checking for connect" >&5
7260 $as_echo_n "checking for connect... " >&6; }
7261 if test "${ac_cv_func_connect+set}" = set; then
7262   $as_echo_n "(cached) " >&6
7263 else
7264   cat >conftest.$ac_ext <<_ACEOF
7265 /* confdefs.h.  */
7266 _ACEOF
7267 cat confdefs.h >>conftest.$ac_ext
7268 cat >>conftest.$ac_ext <<_ACEOF
7269 /* end confdefs.h.  */
7270 /* Define connect to an innocuous variant, in case <limits.h> declares connect.
7271    For example, HP-UX 11i <limits.h> declares gettimeofday.  */
7272 #define connect innocuous_connect
7273
7274 /* System header to define __stub macros and hopefully few prototypes,
7275     which can conflict with char connect (); below.
7276     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
7277     <limits.h> exists even on freestanding compilers.  */
7278
7279 #ifdef __STDC__
7280 # include <limits.h>
7281 #else
7282 # include <assert.h>
7283 #endif
7284
7285 #undef connect
7286
7287 /* Override any GCC internal prototype to avoid an error.
7288    Use char because int might match the return type of a GCC
7289    builtin and then its argument prototype would still apply.  */
7290 #ifdef __cplusplus
7291 extern "C"
7292 #endif
7293 char connect ();
7294 /* The GNU C library defines this for functions which it implements
7295     to always fail with ENOSYS.  Some functions are actually named
7296     something starting with __ and the normal name is an alias.  */
7297 #if defined __stub_connect || defined __stub___connect
7298 choke me
7299 #endif
7300
7301 int
7302 main ()
7303 {
7304 return connect ();
7305   ;
7306   return 0;
7307 }
7308 _ACEOF
7309 rm -rf conftest.$ac_objext conftest$ac_exeext
7310 if { (ac_try="$ac_link"
7311 case "(($ac_try" in
7312   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7313   *) ac_try_echo=$ac_try;;
7314 esac
7315 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
7316 $as_echo "$ac_try_echo") >&5
7317   (eval "$ac_link") 2>conftest.er1
7318   ac_status=$?
7319   grep -v '^ *+' conftest.er1 >conftest.err
7320   rm -rf conftest.er1
7321   cat conftest.err >&5
7322   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
7323   (exit $ac_status); } && {
7324          test -z "$ac_c_werror_flag" ||
7325          test ! -s conftest.err
7326        } && test -s conftest$ac_exeext && {
7327          test "$cross_compiling" = yes ||
7328          $as_test_x conftest$ac_exeext
7329        }; then
7330   ac_cv_func_connect=yes
7331 else
7332   $as_echo "$as_me: failed program was:" >&5
7333 sed 's/^/| /' conftest.$ac_ext >&5
7334
7335         ac_cv_func_connect=no
7336 fi
7337
7338 rm -rf conftest.dSYM
7339 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
7340       conftest$ac_exeext conftest.$ac_ext
7341 fi
7342 { $as_echo "$as_me:$LINENO: result: $ac_cv_func_connect" >&5
7343 $as_echo "$ac_cv_func_connect" >&6; }
7344
7345     if test $ac_cv_func_connect = no; then
7346       { $as_echo "$as_me:$LINENO: checking for connect in -lsocket" >&5
7347 $as_echo_n "checking for connect in -lsocket... " >&6; }
7348 if test "${ac_cv_lib_socket_connect+set}" = set; then
7349   $as_echo_n "(cached) " >&6
7350 else
7351   ac_check_lib_save_LIBS=$LIBS
7352 LIBS="-lsocket $X_EXTRA_LIBS $LIBS"
7353 cat >conftest.$ac_ext <<_ACEOF
7354 /* confdefs.h.  */
7355 _ACEOF
7356 cat confdefs.h >>conftest.$ac_ext
7357 cat >>conftest.$ac_ext <<_ACEOF
7358 /* end confdefs.h.  */
7359
7360 /* Override any GCC internal prototype to avoid an error.
7361    Use char because int might match the return type of a GCC
7362    builtin and then its argument prototype would still apply.  */
7363 #ifdef __cplusplus
7364 extern "C"
7365 #endif
7366 char connect ();
7367 int
7368 main ()
7369 {
7370 return connect ();
7371   ;
7372   return 0;
7373 }
7374 _ACEOF
7375 rm -rf conftest.$ac_objext conftest$ac_exeext
7376 if { (ac_try="$ac_link"
7377 case "(($ac_try" in
7378   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7379   *) ac_try_echo=$ac_try;;
7380 esac
7381 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
7382 $as_echo "$ac_try_echo") >&5
7383   (eval "$ac_link") 2>conftest.er1
7384   ac_status=$?
7385   grep -v '^ *+' conftest.er1 >conftest.err
7386   rm -rf conftest.er1
7387   cat conftest.err >&5
7388   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
7389   (exit $ac_status); } && {
7390          test -z "$ac_c_werror_flag" ||
7391          test ! -s conftest.err
7392        } && test -s conftest$ac_exeext && {
7393          test "$cross_compiling" = yes ||
7394          $as_test_x conftest$ac_exeext
7395        }; then
7396   ac_cv_lib_socket_connect=yes
7397 else
7398   $as_echo "$as_me: failed program was:" >&5
7399 sed 's/^/| /' conftest.$ac_ext >&5
7400
7401         ac_cv_lib_socket_connect=no
7402 fi
7403
7404 rm -rf conftest.dSYM
7405 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
7406       conftest$ac_exeext conftest.$ac_ext
7407 LIBS=$ac_check_lib_save_LIBS
7408 fi
7409 { $as_echo "$as_me:$LINENO: result: $ac_cv_lib_socket_connect" >&5
7410 $as_echo "$ac_cv_lib_socket_connect" >&6; }
7411 if test "x$ac_cv_lib_socket_connect" = x""yes; then
7412   X_EXTRA_LIBS="-lsocket $X_EXTRA_LIBS"
7413 fi
7414
7415     fi
7416
7417     # Guillermo Gomez says -lposix is necessary on A/UX.
7418     { $as_echo "$as_me:$LINENO: checking for remove" >&5
7419 $as_echo_n "checking for remove... " >&6; }
7420 if test "${ac_cv_func_remove+set}" = set; then
7421   $as_echo_n "(cached) " >&6
7422 else
7423   cat >conftest.$ac_ext <<_ACEOF
7424 /* confdefs.h.  */
7425 _ACEOF
7426 cat confdefs.h >>conftest.$ac_ext
7427 cat >>conftest.$ac_ext <<_ACEOF
7428 /* end confdefs.h.  */
7429 /* Define remove to an innocuous variant, in case <limits.h> declares remove.
7430    For example, HP-UX 11i <limits.h> declares gettimeofday.  */
7431 #define remove innocuous_remove
7432
7433 /* System header to define __stub macros and hopefully few prototypes,
7434     which can conflict with char remove (); below.
7435     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
7436     <limits.h> exists even on freestanding compilers.  */
7437
7438 #ifdef __STDC__
7439 # include <limits.h>
7440 #else
7441 # include <assert.h>
7442 #endif
7443
7444 #undef remove
7445
7446 /* Override any GCC internal prototype to avoid an error.
7447    Use char because int might match the return type of a GCC
7448    builtin and then its argument prototype would still apply.  */
7449 #ifdef __cplusplus
7450 extern "C"
7451 #endif
7452 char remove ();
7453 /* The GNU C library defines this for functions which it implements
7454     to always fail with ENOSYS.  Some functions are actually named
7455     something starting with __ and the normal name is an alias.  */
7456 #if defined __stub_remove || defined __stub___remove
7457 choke me
7458 #endif
7459
7460 int
7461 main ()
7462 {
7463 return remove ();
7464   ;
7465   return 0;
7466 }
7467 _ACEOF
7468 rm -rf conftest.$ac_objext conftest$ac_exeext
7469 if { (ac_try="$ac_link"
7470 case "(($ac_try" in
7471   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7472   *) ac_try_echo=$ac_try;;
7473 esac
7474 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
7475 $as_echo "$ac_try_echo") >&5
7476   (eval "$ac_link") 2>conftest.er1
7477   ac_status=$?
7478   grep -v '^ *+' conftest.er1 >conftest.err
7479   rm -rf conftest.er1
7480   cat conftest.err >&5
7481   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
7482   (exit $ac_status); } && {
7483          test -z "$ac_c_werror_flag" ||
7484          test ! -s conftest.err
7485        } && test -s conftest$ac_exeext && {
7486          test "$cross_compiling" = yes ||
7487          $as_test_x conftest$ac_exeext
7488        }; then
7489   ac_cv_func_remove=yes
7490 else
7491   $as_echo "$as_me: failed program was:" >&5
7492 sed 's/^/| /' conftest.$ac_ext >&5
7493
7494         ac_cv_func_remove=no
7495 fi
7496
7497 rm -rf conftest.dSYM
7498 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
7499       conftest$ac_exeext conftest.$ac_ext
7500 fi
7501 { $as_echo "$as_me:$LINENO: result: $ac_cv_func_remove" >&5
7502 $as_echo "$ac_cv_func_remove" >&6; }
7503
7504     if test $ac_cv_func_remove = no; then
7505       { $as_echo "$as_me:$LINENO: checking for remove in -lposix" >&5
7506 $as_echo_n "checking for remove in -lposix... " >&6; }
7507 if test "${ac_cv_lib_posix_remove+set}" = set; then
7508   $as_echo_n "(cached) " >&6
7509 else
7510   ac_check_lib_save_LIBS=$LIBS
7511 LIBS="-lposix  $LIBS"
7512 cat >conftest.$ac_ext <<_ACEOF
7513 /* confdefs.h.  */
7514 _ACEOF
7515 cat confdefs.h >>conftest.$ac_ext
7516 cat >>conftest.$ac_ext <<_ACEOF
7517 /* end confdefs.h.  */
7518
7519 /* Override any GCC internal prototype to avoid an error.
7520    Use char because int might match the return type of a GCC
7521    builtin and then its argument prototype would still apply.  */
7522 #ifdef __cplusplus
7523 extern "C"
7524 #endif
7525 char remove ();
7526 int
7527 main ()
7528 {
7529 return remove ();
7530   ;
7531   return 0;
7532 }
7533 _ACEOF
7534 rm -rf conftest.$ac_objext conftest$ac_exeext
7535 if { (ac_try="$ac_link"
7536 case "(($ac_try" in
7537   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7538   *) ac_try_echo=$ac_try;;
7539 esac
7540 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
7541 $as_echo "$ac_try_echo") >&5
7542   (eval "$ac_link") 2>conftest.er1
7543   ac_status=$?
7544   grep -v '^ *+' conftest.er1 >conftest.err
7545   rm -rf conftest.er1
7546   cat conftest.err >&5
7547   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
7548   (exit $ac_status); } && {
7549          test -z "$ac_c_werror_flag" ||
7550          test ! -s conftest.err
7551        } && test -s conftest$ac_exeext && {
7552          test "$cross_compiling" = yes ||
7553          $as_test_x conftest$ac_exeext
7554        }; then
7555   ac_cv_lib_posix_remove=yes
7556 else
7557   $as_echo "$as_me: failed program was:" >&5
7558 sed 's/^/| /' conftest.$ac_ext >&5
7559
7560         ac_cv_lib_posix_remove=no
7561 fi
7562
7563 rm -rf conftest.dSYM
7564 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
7565       conftest$ac_exeext conftest.$ac_ext
7566 LIBS=$ac_check_lib_save_LIBS
7567 fi
7568 { $as_echo "$as_me:$LINENO: result: $ac_cv_lib_posix_remove" >&5
7569 $as_echo "$ac_cv_lib_posix_remove" >&6; }
7570 if test "x$ac_cv_lib_posix_remove" = x""yes; then
7571   X_EXTRA_LIBS="$X_EXTRA_LIBS -lposix"
7572 fi
7573
7574     fi
7575
7576     # BSDI BSD/OS 2.1 needs -lipc for XOpenDisplay.
7577     { $as_echo "$as_me:$LINENO: checking for shmat" >&5
7578 $as_echo_n "checking for shmat... " >&6; }
7579 if test "${ac_cv_func_shmat+set}" = set; then
7580   $as_echo_n "(cached) " >&6
7581 else
7582   cat >conftest.$ac_ext <<_ACEOF
7583 /* confdefs.h.  */
7584 _ACEOF
7585 cat confdefs.h >>conftest.$ac_ext
7586 cat >>conftest.$ac_ext <<_ACEOF
7587 /* end confdefs.h.  */
7588 /* Define shmat to an innocuous variant, in case <limits.h> declares shmat.
7589    For example, HP-UX 11i <limits.h> declares gettimeofday.  */
7590 #define shmat innocuous_shmat
7591
7592 /* System header to define __stub macros and hopefully few prototypes,
7593     which can conflict with char shmat (); below.
7594     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
7595     <limits.h> exists even on freestanding compilers.  */
7596
7597 #ifdef __STDC__
7598 # include <limits.h>
7599 #else
7600 # include <assert.h>
7601 #endif
7602
7603 #undef shmat
7604
7605 /* Override any GCC internal prototype to avoid an error.
7606    Use char because int might match the return type of a GCC
7607    builtin and then its argument prototype would still apply.  */
7608 #ifdef __cplusplus
7609 extern "C"
7610 #endif
7611 char shmat ();
7612 /* The GNU C library defines this for functions which it implements
7613     to always fail with ENOSYS.  Some functions are actually named
7614     something starting with __ and the normal name is an alias.  */
7615 #if defined __stub_shmat || defined __stub___shmat
7616 choke me
7617 #endif
7618
7619 int
7620 main ()
7621 {
7622 return shmat ();
7623   ;
7624   return 0;
7625 }
7626 _ACEOF
7627 rm -rf conftest.$ac_objext conftest$ac_exeext
7628 if { (ac_try="$ac_link"
7629 case "(($ac_try" in
7630   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7631   *) ac_try_echo=$ac_try;;
7632 esac
7633 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
7634 $as_echo "$ac_try_echo") >&5
7635   (eval "$ac_link") 2>conftest.er1
7636   ac_status=$?
7637   grep -v '^ *+' conftest.er1 >conftest.err
7638   rm -rf conftest.er1
7639   cat conftest.err >&5
7640   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
7641   (exit $ac_status); } && {
7642          test -z "$ac_c_werror_flag" ||
7643          test ! -s conftest.err
7644        } && test -s conftest$ac_exeext && {
7645          test "$cross_compiling" = yes ||
7646          $as_test_x conftest$ac_exeext
7647        }; then
7648   ac_cv_func_shmat=yes
7649 else
7650   $as_echo "$as_me: failed program was:" >&5
7651 sed 's/^/| /' conftest.$ac_ext >&5
7652
7653         ac_cv_func_shmat=no
7654 fi
7655
7656 rm -rf conftest.dSYM
7657 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
7658       conftest$ac_exeext conftest.$ac_ext
7659 fi
7660 { $as_echo "$as_me:$LINENO: result: $ac_cv_func_shmat" >&5
7661 $as_echo "$ac_cv_func_shmat" >&6; }
7662
7663     if test $ac_cv_func_shmat = no; then
7664       { $as_echo "$as_me:$LINENO: checking for shmat in -lipc" >&5
7665 $as_echo_n "checking for shmat in -lipc... " >&6; }
7666 if test "${ac_cv_lib_ipc_shmat+set}" = set; then
7667   $as_echo_n "(cached) " >&6
7668 else
7669   ac_check_lib_save_LIBS=$LIBS
7670 LIBS="-lipc  $LIBS"
7671 cat >conftest.$ac_ext <<_ACEOF
7672 /* confdefs.h.  */
7673 _ACEOF
7674 cat confdefs.h >>conftest.$ac_ext
7675 cat >>conftest.$ac_ext <<_ACEOF
7676 /* end confdefs.h.  */
7677
7678 /* Override any GCC internal prototype to avoid an error.
7679    Use char because int might match the return type of a GCC
7680    builtin and then its argument prototype would still apply.  */
7681 #ifdef __cplusplus
7682 extern "C"
7683 #endif
7684 char shmat ();
7685 int
7686 main ()
7687 {
7688 return shmat ();
7689   ;
7690   return 0;
7691 }
7692 _ACEOF
7693 rm -rf conftest.$ac_objext conftest$ac_exeext
7694 if { (ac_try="$ac_link"
7695 case "(($ac_try" in
7696   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7697   *) ac_try_echo=$ac_try;;
7698 esac
7699 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
7700 $as_echo "$ac_try_echo") >&5
7701   (eval "$ac_link") 2>conftest.er1
7702   ac_status=$?
7703   grep -v '^ *+' conftest.er1 >conftest.err
7704   rm -rf conftest.er1
7705   cat conftest.err >&5
7706   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
7707   (exit $ac_status); } && {
7708          test -z "$ac_c_werror_flag" ||
7709          test ! -s conftest.err
7710        } && test -s conftest$ac_exeext && {
7711          test "$cross_compiling" = yes ||
7712          $as_test_x conftest$ac_exeext
7713        }; then
7714   ac_cv_lib_ipc_shmat=yes
7715 else
7716   $as_echo "$as_me: failed program was:" >&5
7717 sed 's/^/| /' conftest.$ac_ext >&5
7718
7719         ac_cv_lib_ipc_shmat=no
7720 fi
7721
7722 rm -rf conftest.dSYM
7723 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
7724       conftest$ac_exeext conftest.$ac_ext
7725 LIBS=$ac_check_lib_save_LIBS
7726 fi
7727 { $as_echo "$as_me:$LINENO: result: $ac_cv_lib_ipc_shmat" >&5
7728 $as_echo "$ac_cv_lib_ipc_shmat" >&6; }
7729 if test "x$ac_cv_lib_ipc_shmat" = x""yes; then
7730   X_EXTRA_LIBS="$X_EXTRA_LIBS -lipc"
7731 fi
7732
7733     fi
7734   fi
7735
7736   # Check for libraries that X11R6 Xt/Xaw programs need.
7737   ac_save_LDFLAGS=$LDFLAGS
7738   test -n "$x_libraries" && LDFLAGS="$LDFLAGS -L$x_libraries"
7739   # SM needs ICE to (dynamically) link under SunOS 4.x (so we have to
7740   # check for ICE first), but we must link in the order -lSM -lICE or
7741   # we get undefined symbols.  So assume we have SM if we have ICE.
7742   # These have to be linked with before -lX11, unlike the other
7743   # libraries we check for below, so use a different variable.
7744   # John Interrante, Karl Berry
7745   { $as_echo "$as_me:$LINENO: checking for IceConnectionNumber in -lICE" >&5
7746 $as_echo_n "checking for IceConnectionNumber in -lICE... " >&6; }
7747 if test "${ac_cv_lib_ICE_IceConnectionNumber+set}" = set; then
7748   $as_echo_n "(cached) " >&6
7749 else
7750   ac_check_lib_save_LIBS=$LIBS
7751 LIBS="-lICE $X_EXTRA_LIBS $LIBS"
7752 cat >conftest.$ac_ext <<_ACEOF
7753 /* confdefs.h.  */
7754 _ACEOF
7755 cat confdefs.h >>conftest.$ac_ext
7756 cat >>conftest.$ac_ext <<_ACEOF
7757 /* end confdefs.h.  */
7758
7759 /* Override any GCC internal prototype to avoid an error.
7760    Use char because int might match the return type of a GCC
7761    builtin and then its argument prototype would still apply.  */
7762 #ifdef __cplusplus
7763 extern "C"
7764 #endif
7765 char IceConnectionNumber ();
7766 int
7767 main ()
7768 {
7769 return IceConnectionNumber ();
7770   ;
7771   return 0;
7772 }
7773 _ACEOF
7774 rm -rf conftest.$ac_objext conftest$ac_exeext
7775 if { (ac_try="$ac_link"
7776 case "(($ac_try" in
7777   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7778   *) ac_try_echo=$ac_try;;
7779 esac
7780 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
7781 $as_echo "$ac_try_echo") >&5
7782   (eval "$ac_link") 2>conftest.er1
7783   ac_status=$?
7784   grep -v '^ *+' conftest.er1 >conftest.err
7785   rm -rf conftest.er1
7786   cat conftest.err >&5
7787   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
7788   (exit $ac_status); } && {
7789          test -z "$ac_c_werror_flag" ||
7790          test ! -s conftest.err
7791        } && test -s conftest$ac_exeext && {
7792          test "$cross_compiling" = yes ||
7793          $as_test_x conftest$ac_exeext
7794        }; then
7795   ac_cv_lib_ICE_IceConnectionNumber=yes
7796 else
7797   $as_echo "$as_me: failed program was:" >&5
7798 sed 's/^/| /' conftest.$ac_ext >&5
7799
7800         ac_cv_lib_ICE_IceConnectionNumber=no
7801 fi
7802
7803 rm -rf conftest.dSYM
7804 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
7805       conftest$ac_exeext conftest.$ac_ext
7806 LIBS=$ac_check_lib_save_LIBS
7807 fi
7808 { $as_echo "$as_me:$LINENO: result: $ac_cv_lib_ICE_IceConnectionNumber" >&5
7809 $as_echo "$ac_cv_lib_ICE_IceConnectionNumber" >&6; }
7810 if test "x$ac_cv_lib_ICE_IceConnectionNumber" = x""yes; then
7811   X_PRE_LIBS="$X_PRE_LIBS -lSM -lICE"
7812 fi
7813
7814   LDFLAGS=$ac_save_LDFLAGS
7815
7816 fi
7817
7818
7819 if test "$have_x" != yes; then
7820   { { $as_echo "$as_me:$LINENO: error: Couldn't find X11 headers/libs.  Try \`$0 --help'." >&5
7821 $as_echo "$as_me: error: Couldn't find X11 headers/libs.  Try \`$0 --help'." >&2;}
7822    { (exit 1); exit 1; }; }
7823 fi
7824
7825
7826     { $as_echo "$as_me:$LINENO: checking for X app-defaults directory" >&5
7827 $as_echo_n "checking for X app-defaults directory... " >&6; }
7828 if test "${ac_cv_x_app_defaults+set}" = set; then
7829   $as_echo_n "(cached) " >&6
7830 else
7831
7832   rm -fr conftestdir
7833   if mkdir conftestdir; then
7834     cd conftestdir 2>/dev/null
7835     # Make sure to not put "make" in the Imakefile rules, since we grep it out.
7836     cat > Imakefile <<'EOF'
7837 acfindx:
7838         @echo 'ac_x_app_defaults="${XAPPLOADDIR}"'
7839 EOF
7840     if (xmkmf) >/dev/null 2>&1 && test -f Makefile; then
7841       # GNU make sometimes prints "make[1]: Entering...", which'd confuse us.
7842       eval `${MAKE-make} acfindx 2>/dev/null | grep -v make`
7843     fi
7844     cd .. 2>/dev/null
7845     rm -fr conftestdir
7846   fi
7847       if test x"$ac_x_app_defaults" = x; then
7848
7849   # Look for the directory under a standard set of common directories.
7850   # Check X11 before X11Rn because it's often a symlink to the current release.
7851   for ac_dir in                                 \
7852     /usr/X11/lib/app-defaults                   \
7853     /usr/X11R6/lib/app-defaults                 \
7854     /usr/X11R6/lib/X11/app-defaults             \
7855     /usr/X11R5/lib/app-defaults                 \
7856     /usr/X11R5/lib/X11/app-defaults             \
7857     /usr/X11R4/lib/app-defaults                 \
7858     /usr/X11R4/lib/X11/app-defaults             \
7859                                                 \
7860     /usr/lib/X11/app-defaults                   \
7861     /usr/lib/X11R6/app-defaults                 \
7862     /usr/lib/X11R5/app-defaults                 \
7863     /usr/lib/X11R4/app-defaults                 \
7864                                                 \
7865     /usr/local/X11/lib/app-defaults             \
7866     /usr/local/X11R6/lib/app-defaults           \
7867     /usr/local/X11R5/lib/app-defaults           \
7868     /usr/local/X11R4/lib/app-defaults           \
7869                                                 \
7870     /usr/local/lib/X11/app-defaults             \
7871     /usr/local/lib/X11R6/app-defaults           \
7872     /usr/local/lib/X11R6/X11/app-defaults       \
7873     /usr/local/lib/X11R5/app-defaults           \
7874     /usr/local/lib/X11R5/X11/app-defaults       \
7875     /usr/local/lib/X11R4/app-defaults           \
7876     /usr/local/lib/X11R4/X11/app-defaults       \
7877                                                 \
7878     /usr/X386/lib/X11/app-defaults              \
7879     /usr/x386/lib/X11/app-defaults              \
7880     /usr/XFree86/lib/X11/app-defaults           \
7881                                                 \
7882     /usr/lib/X11/app-defaults                   \
7883     /usr/local/lib/X11/app-defaults             \
7884     /usr/unsupported/lib/X11/app-defaults       \
7885     /usr/athena/lib/X11/app-defaults            \
7886     /usr/local/x11r5/lib/X11/app-defaults       \
7887     /usr/lpp/Xamples/lib/X11/app-defaults       \
7888     /lib/usr/lib/X11/app-defaults               \
7889                                                 \
7890     /usr/openwin/lib/app-defaults               \
7891     /usr/openwin/lib/X11/app-defaults           \
7892     /usr/openwin/share/lib/app-defaults         \
7893     /usr/openwin/share/lib/X11/app-defaults     \
7894                                                 \
7895     /X11R6/lib/app-defaults                     \
7896     /X11R5/lib/app-defaults                     \
7897     /X11R4/lib/app-defaults                     \
7898     ; \
7899   do
7900     if test -d "$ac_dir"; then
7901       ac_x_app_defaults=$ac_dir
7902       break
7903     fi
7904   done
7905
7906       fi
7907       if test x"$ac_x_app_defaults" = x; then
7908         ac_cv_x_app_defaults="/usr/lib/X11/app-defaults"
7909       else
7910         # Record where we found app-defaults for the cache.
7911         ac_cv_x_app_defaults="$ac_x_app_defaults"
7912       fi
7913 fi
7914 { $as_echo "$as_me:$LINENO: result: $ac_cv_x_app_defaults" >&5
7915 $as_echo "$ac_cv_x_app_defaults" >&6; }
7916     eval ac_x_app_defaults="$ac_cv_x_app_defaults"
7917 case "$host" in
7918     *-hpux*)
7919
7920       # The following arcana was gleaned from conversations with
7921       # Eric Schwartz <erics@col.hp.com>:
7922       #
7923       # On HPUX 10.x, the parts of X that HP considers "standard" live in
7924       # /usr/{include,lib}/X11R6/.  The parts that HP doesn't consider
7925       # "standard", notably, Xaw and Xmu, live in /usr/contrib/X11R6/.
7926       # Yet /usr/contrib/X11R6/ comes preinstalled on all HPUX systems.
7927       # Also, there are symlinks from /usr/include/ and /usr/lib/ into
7928       # /usr/{include,lib}/X11R6/, so that (if you don't use Xmu at all)
7929       # you don't need any -I or -L arguments.
7930       #
7931       # On HPUX 9.x, /usr/{include,lib}/X11R5/ and /usr/contrib/X11R5/
7932       # are the same division as 10.x.  However, there are no symlinks to
7933       # the X stuff from /usr/include/ and /usr/lib/, so -I and -L
7934       # arguments are always necessary.
7935       #
7936       # However, X11R6 was available on HPUX 9.x as a patch: if that
7937       # patch was installed, then all of X11R6 went in to
7938       # /usr/contrib/X11R6/ (there was no /usr/{include,lib}/X11R6/.)
7939       #
7940       # HPUX 8.x was the same as 9.x, but was X11R4 instead (I don't know
7941       # whether R5 was available as a patch; R6 undoubtedly was not.)
7942       #
7943       # So.  We try and use the highest numbered pair of
7944       # /usr/{include,lib}/X11R?/ and /usr/contrib/X11R?/{include,lib}/
7945       # that are available.  We do not mix and match different versions
7946       # of X.
7947       #
7948       # Question I still don't know the answer to: (do you?)
7949       #
7950       #   * On HPUX 9.x, where /usr/include/X11R5/ was standard, and
7951       #     /usr/contrib/X11R6/ could be installed as a patch, what was in
7952       #     that contrib directory?  Did it contain so-called "standard"
7953       #     X11R6, or did it include Xaw and Xmu as well?  If the former,
7954       #     where did one find Xaw and Xmu on 9.x R6 systems?  Would this
7955       #     be a situation where one had to reach into the R5 headers and
7956       #     libs to find Xmu?  That is, must both R6 and R5 directories
7957       #     be on the -I and -L lists in that case?
7958       #
7959       for version in X11R6 X11R5 X11R4 ; do
7960         # if either pair of directories exists...
7961         if test -d /usr/include/$version || test -d /usr/contrib/$version/include
7962         then
7963            # if contrib exists, use it...
7964            if test -d /usr/contrib/$version/include ; then
7965              X_CFLAGS="$X_CFLAGS -I/usr/contrib/$version/include"
7966              X_LIBS="$X_LIBS -L/usr/contrib/$version/lib"
7967            fi
7968            # if the "standard" one exists, use it.
7969            if test -d /usr/include/$version ; then
7970              X_CFLAGS="$X_CFLAGS -I/usr/include/$version"
7971              X_LIBS="$X_LIBS -L/usr/lib/$version"
7972            fi
7973            # since at least one of the pair exists, go no farther.
7974            break
7975         fi
7976       done
7977
7978       # Now find Motif.  Thanks for not making xmkmf find this by
7979       # default, you losers.
7980       #
7981       if test -d /usr/include/Motif2.1 ; then
7982         X_CFLAGS="$X_CFLAGS -I/usr/include/Motif2.1"
7983         X_LIBS="$X_LIBS -L/usr/lib/Motif2.1"
7984       elif test -d /usr/include/Motif1.2 ; then
7985         X_CFLAGS="$X_CFLAGS -I/usr/include/Motif1.2"
7986         X_LIBS="$X_LIBS -L/usr/lib/Motif1.2"
7987       elif test -d /usr/include/Motif1.1 ; then
7988         X_CFLAGS="$X_CFLAGS -I/usr/include/Motif1.1"
7989         X_LIBS="$X_LIBS -L/usr/lib/Motif1.1"
7990       fi
7991
7992       # Now let's check for the pseudo-standard locations for OpenGL and XPM.
7993       #
7994       if test -d /opt/graphics/OpenGL/include ; then
7995         # HP-UX 10.20 puts it here
7996         X_CFLAGS="-I/opt/graphics/OpenGL/include $X_CFLAGS"
7997         X_LIBS="-L/opt/graphics/OpenGL/lib $X_LIBS"
7998       elif test -d /opt/Mesa/lib ; then
7999         X_CFLAGS="-I/opt/Mesa/include $X_CFLAGS"
8000         X_LIBS="-L/opt/Mesa/lib $X_LIBS"
8001       fi
8002
8003
8004       if test -d /opt/xpm/lib/X11 ; then
8005         X_CFLAGS="-I/opt/xpm/include $X_CFLAGS"
8006         X_LIBS="-L/opt/xpm/lib/X11 $X_LIBS"
8007       fi
8008
8009       # On HPUX, default to installing in /opt/xscreensaver/ instead of
8010       # in /usr/local/, unless there is already an xscreensaver in
8011       # /usr/local/bin/.  This can be overridden with the --prefix arg
8012       # to configure.  I'm not sure this is the right thing to do, but
8013       # Richard Lloyd says so...
8014       #
8015       if test \! -x /usr/local/bin/xscreensaver ; then
8016         ac_default_prefix=/opt/xscreensaver
8017       fi
8018
8019     ;;
8020     *-solaris*)
8021
8022       # Thanks for not making xmkmf find this by default, pinheads.
8023       # And thanks for moving things around again, too.  Is this
8024       # really the standard location now?  What happened to the
8025       # joke that this kind of thing went in /opt?
8026       # cthomp says "answer: CDE (Common Disorganized Environment)"
8027       #
8028       if test -f /usr/dt/include/Xm/Xm.h ; then
8029         X_CFLAGS="$X_CFLAGS -I/usr/dt/include"
8030         MOTIF_LIBS="$MOTIF_LIBS -L/usr/dt/lib -R/usr/dt/lib"
8031
8032         # Some versions of Slowlaris Motif require -lgen.  But not all.  Why?
8033         { $as_echo "$as_me:$LINENO: checking for regcmp in -lgen" >&5
8034 $as_echo_n "checking for regcmp in -lgen... " >&6; }
8035 if test "${ac_cv_lib_gen_regcmp+set}" = set; then
8036   $as_echo_n "(cached) " >&6
8037 else
8038   ac_check_lib_save_LIBS=$LIBS
8039 LIBS="-lgen  $LIBS"
8040 cat >conftest.$ac_ext <<_ACEOF
8041 /* confdefs.h.  */
8042 _ACEOF
8043 cat confdefs.h >>conftest.$ac_ext
8044 cat >>conftest.$ac_ext <<_ACEOF
8045 /* end confdefs.h.  */
8046
8047 /* Override any GCC internal prototype to avoid an error.
8048    Use char because int might match the return type of a GCC
8049    builtin and then its argument prototype would still apply.  */
8050 #ifdef __cplusplus
8051 extern "C"
8052 #endif
8053 char regcmp ();
8054 int
8055 main ()
8056 {
8057 return regcmp ();
8058   ;
8059   return 0;
8060 }
8061 _ACEOF
8062 rm -rf conftest.$ac_objext conftest$ac_exeext
8063 if { (ac_try="$ac_link"
8064 case "(($ac_try" in
8065   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8066   *) ac_try_echo=$ac_try;;
8067 esac
8068 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
8069 $as_echo "$ac_try_echo") >&5
8070   (eval "$ac_link") 2>conftest.er1
8071   ac_status=$?
8072   grep -v '^ *+' conftest.er1 >conftest.err
8073   rm -rf conftest.er1
8074   cat conftest.err >&5
8075   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
8076   (exit $ac_status); } && {
8077          test -z "$ac_c_werror_flag" ||
8078          test ! -s conftest.err
8079        } && test -s conftest$ac_exeext && {
8080          test "$cross_compiling" = yes ||
8081          $as_test_x conftest$ac_exeext
8082        }; then
8083   ac_cv_lib_gen_regcmp=yes
8084 else
8085   $as_echo "$as_me: failed program was:" >&5
8086 sed 's/^/| /' conftest.$ac_ext >&5
8087
8088         ac_cv_lib_gen_regcmp=no
8089 fi
8090
8091 rm -rf conftest.dSYM
8092 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
8093       conftest$ac_exeext conftest.$ac_ext
8094 LIBS=$ac_check_lib_save_LIBS
8095 fi
8096 { $as_echo "$as_me:$LINENO: result: $ac_cv_lib_gen_regcmp" >&5
8097 $as_echo "$ac_cv_lib_gen_regcmp" >&6; }
8098 if test "x$ac_cv_lib_gen_regcmp" = x""yes; then
8099   MOTIF_LIBS="$MOTIF_LIBS -lgen"
8100 fi
8101
8102       fi
8103
8104     ;;
8105     *-darwin*)
8106
8107       # On MacOS X (10.x with "fink"), many things are under /sw/.
8108       #
8109       if test -d /sw/include ; then
8110         X_CFLAGS="-I/sw/include $X_CFLAGS"
8111         X_LIBS="-L/sw/lib $X_LIBS"
8112       fi
8113     ;;
8114   esac
8115 { $as_echo "$as_me:$LINENO: checking for XPointer" >&5
8116 $as_echo_n "checking for XPointer... " >&6; }
8117 if test "${ac_cv_xpointer+set}" = set; then
8118   $as_echo_n "(cached) " >&6
8119 else
8120
8121   ac_save_CPPFLAGS="$CPPFLAGS"
8122   if test \! -z "$includedir" ; then
8123     CPPFLAGS="$CPPFLAGS -I$includedir"
8124   fi
8125   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
8126   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
8127   cat >conftest.$ac_ext <<_ACEOF
8128 /* confdefs.h.  */
8129 _ACEOF
8130 cat confdefs.h >>conftest.$ac_ext
8131 cat >>conftest.$ac_ext <<_ACEOF
8132 /* end confdefs.h.  */
8133 #include <X11/Xlib.h>
8134 int
8135 main ()
8136 {
8137 XPointer foo = (XPointer) 0;
8138   ;
8139   return 0;
8140 }
8141 _ACEOF
8142 rm -rf conftest.$ac_objext
8143 if { (ac_try="$ac_compile"
8144 case "(($ac_try" in
8145   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8146   *) ac_try_echo=$ac_try;;
8147 esac
8148 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
8149 $as_echo "$ac_try_echo") >&5
8150   (eval "$ac_compile") 2>conftest.er1
8151   ac_status=$?
8152   grep -v '^ *+' conftest.er1 >conftest.err
8153   rm -rf conftest.er1
8154   cat conftest.err >&5
8155   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
8156   (exit $ac_status); } && {
8157          test -z "$ac_c_werror_flag" ||
8158          test ! -s conftest.err
8159        } && test -s conftest.$ac_objext; then
8160   ac_cv_xpointer=yes
8161 else
8162   $as_echo "$as_me: failed program was:" >&5
8163 sed 's/^/| /' conftest.$ac_ext >&5
8164
8165         ac_cv_xpointer=no
8166 fi
8167
8168 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
8169   CPPFLAGS="$ac_save_CPPFLAGS"
8170 fi
8171 { $as_echo "$as_me:$LINENO: result: $ac_cv_xpointer" >&5
8172 $as_echo "$ac_cv_xpointer" >&6; }
8173   if test "$ac_cv_xpointer" != yes; then
8174    cat >>confdefs.h <<\_ACEOF
8175 #define XPointer char*
8176 _ACEOF
8177
8178   fi
8179
8180 { $as_echo "$as_me:$LINENO: checking whether this is MacOS X" >&5
8181 $as_echo_n "checking whether this is MacOS X... " >&6; }
8182   ac_macosx=no
8183   case "$host" in
8184     *-apple-darwin* )
8185       ac_macosx=yes
8186     ;;
8187   esac
8188 { $as_echo "$as_me:$LINENO: result: $ac_macosx" >&5
8189 $as_echo "$ac_macosx" >&6; }
8190
8191
8192 ###############################################################################
8193 #
8194 #       Gettext support
8195 #
8196 ###############################################################################
8197
8198
8199
8200 if test -n ""; then
8201     { $as_echo "$as_me:$LINENO: checking for intltool >= " >&5
8202 $as_echo_n "checking for intltool >= ... " >&6; }
8203
8204     INTLTOOL_REQUIRED_VERSION_AS_INT=`echo  | awk -F. '{ printf "%d", $1 * 100 + $2; }'`
8205     INTLTOOL_APPLIED_VERSION=`awk -F\" '/\\$VERSION / { printf $2; }'  < intltool-update.in`
8206
8207     INTLTOOL_APPLIED_VERSION_AS_INT=`awk -F\" '/\\$VERSION / { split($2, VERSION, "."); printf "%d\n", VERSION[1] * 100 + VERSION[2];}' < intltool-update.in`
8208
8209
8210     if test "$INTLTOOL_APPLIED_VERSION_AS_INT" -ge "$INTLTOOL_REQUIRED_VERSION_AS_INT"; then
8211         { $as_echo "$as_me:$LINENO: result: $INTLTOOL_APPLIED_VERSION found" >&5
8212 $as_echo "$INTLTOOL_APPLIED_VERSION found" >&6; }
8213     else
8214         { $as_echo "$as_me:$LINENO: result: $INTLTOOL_APPLIED_VERSION found. Your intltool is too old.  You need intltool  or later." >&5
8215 $as_echo "$INTLTOOL_APPLIED_VERSION found. Your intltool is too old.  You need intltool  or later." >&6; }
8216         exit 1
8217     fi
8218 fi
8219
8220   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'
8221 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'
8222      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'
8223       INTLTOOL_OAF_RULE='%.oaf:       %.oaf.in       $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; $(INTLTOOL_MERGE) $(top_srcdir)/po $< $@ -o -p'
8224      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'
8225    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'
8226     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'
8227 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'
8228        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'
8229       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'
8230     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'
8231
8232
8233
8234
8235
8236
8237
8238
8239
8240
8241
8242
8243
8244 # Use the tools built into the package, not the ones that are installed.
8245
8246 INTLTOOL_EXTRACT='$(top_builddir)/intltool-extract'
8247 INTLTOOL_MERGE='$(top_builddir)/intltool-merge'
8248 INTLTOOL_UPDATE='$(top_builddir)/intltool-update'
8249
8250
8251
8252
8253
8254 # Extract the first word of "perl", so it can be a program name with args.
8255 set dummy perl; ac_word=$2
8256 { $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
8257 $as_echo_n "checking for $ac_word... " >&6; }
8258 if test "${ac_cv_path_INTLTOOL_PERL+set}" = set; then
8259   $as_echo_n "(cached) " >&6
8260 else
8261   case $INTLTOOL_PERL in
8262   [\\/]* | ?:[\\/]*)
8263   ac_cv_path_INTLTOOL_PERL="$INTLTOOL_PERL" # Let the user override the test with a path.
8264   ;;
8265   *)
8266   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8267 for as_dir in $PATH
8268 do
8269   IFS=$as_save_IFS
8270   test -z "$as_dir" && as_dir=.
8271   for ac_exec_ext in '' $ac_executable_extensions; do
8272   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
8273     ac_cv_path_INTLTOOL_PERL="$as_dir/$ac_word$ac_exec_ext"
8274     $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
8275     break 2
8276   fi
8277 done
8278 done
8279 IFS=$as_save_IFS
8280
8281   ;;
8282 esac
8283 fi
8284 INTLTOOL_PERL=$ac_cv_path_INTLTOOL_PERL
8285 if test -n "$INTLTOOL_PERL"; then
8286   { $as_echo "$as_me:$LINENO: result: $INTLTOOL_PERL" >&5
8287 $as_echo "$INTLTOOL_PERL" >&6; }
8288 else
8289   { $as_echo "$as_me:$LINENO: result: no" >&5
8290 $as_echo "no" >&6; }
8291 fi
8292
8293
8294 if test -z "$INTLTOOL_PERL"; then
8295    { { $as_echo "$as_me:$LINENO: error: perl not found; required for intltool" >&5
8296 $as_echo "$as_me: error: perl not found; required for intltool" >&2;}
8297    { (exit 1); exit 1; }; }
8298 fi
8299 if test -z "`$INTLTOOL_PERL -v | fgrep '5.' 2> /dev/null`"; then
8300    { { $as_echo "$as_me:$LINENO: error: perl 5.x required for intltool" >&5
8301 $as_echo "$as_me: error: perl 5.x required for intltool" >&2;}
8302    { (exit 1); exit 1; }; }
8303 fi
8304
8305 # Remove file type tags (using []) from po/POTFILES.
8306
8307
8308
8309
8310
8311
8312
8313 # Manually sed perl in so people don't have to put the intltool scripts in AC_OUTPUT.
8314
8315 ac_config_commands="$ac_config_commands default-1"
8316
8317
8318
8319 GETTEXT_PACKAGE=xscreensaver
8320
8321 cat >>confdefs.h <<_ACEOF
8322 #define GETTEXT_PACKAGE "$GETTEXT_PACKAGE"
8323 _ACEOF
8324
8325
8326 cat >>confdefs.h <<_ACEOF
8327 #define PACKAGE "$GETTEXT_PACKAGE"
8328 _ACEOF
8329
8330
8331
8332 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"
8333 if test -n "$ac_tool_prefix"; then
8334   # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
8335 set dummy ${ac_tool_prefix}ranlib; ac_word=$2
8336 { $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
8337 $as_echo_n "checking for $ac_word... " >&6; }
8338 if test "${ac_cv_prog_RANLIB+set}" = set; then
8339   $as_echo_n "(cached) " >&6
8340 else
8341   if test -n "$RANLIB"; then
8342   ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
8343 else
8344 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8345 for as_dir in $PATH
8346 do
8347   IFS=$as_save_IFS
8348   test -z "$as_dir" && as_dir=.
8349   for ac_exec_ext in '' $ac_executable_extensions; do
8350   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
8351     ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
8352     $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
8353     break 2
8354   fi
8355 done
8356 done
8357 IFS=$as_save_IFS
8358
8359 fi
8360 fi
8361 RANLIB=$ac_cv_prog_RANLIB
8362 if test -n "$RANLIB"; then
8363   { $as_echo "$as_me:$LINENO: result: $RANLIB" >&5
8364 $as_echo "$RANLIB" >&6; }
8365 else
8366   { $as_echo "$as_me:$LINENO: result: no" >&5
8367 $as_echo "no" >&6; }
8368 fi
8369
8370
8371 fi
8372 if test -z "$ac_cv_prog_RANLIB"; then
8373   ac_ct_RANLIB=$RANLIB
8374   # Extract the first word of "ranlib", so it can be a program name with args.
8375 set dummy ranlib; ac_word=$2
8376 { $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
8377 $as_echo_n "checking for $ac_word... " >&6; }
8378 if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then
8379   $as_echo_n "(cached) " >&6
8380 else
8381   if test -n "$ac_ct_RANLIB"; then
8382   ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
8383 else
8384 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8385 for as_dir in $PATH
8386 do
8387   IFS=$as_save_IFS
8388   test -z "$as_dir" && as_dir=.
8389   for ac_exec_ext in '' $ac_executable_extensions; do
8390   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
8391     ac_cv_prog_ac_ct_RANLIB="ranlib"
8392     $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
8393     break 2
8394   fi
8395 done
8396 done
8397 IFS=$as_save_IFS
8398
8399 fi
8400 fi
8401 ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
8402 if test -n "$ac_ct_RANLIB"; then
8403   { $as_echo "$as_me:$LINENO: result: $ac_ct_RANLIB" >&5
8404 $as_echo "$ac_ct_RANLIB" >&6; }
8405 else
8406   { $as_echo "$as_me:$LINENO: result: no" >&5
8407 $as_echo "no" >&6; }
8408 fi
8409
8410   if test "x$ac_ct_RANLIB" = x; then
8411     RANLIB=":"
8412   else
8413     case $cross_compiling:$ac_tool_warned in
8414 yes:)
8415 { $as_echo "$as_me:$LINENO: WARNING: using cross tools not prefixed with host triplet" >&5
8416 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
8417 ac_tool_warned=yes ;;
8418 esac
8419     RANLIB=$ac_ct_RANLIB
8420   fi
8421 else
8422   RANLIB="$ac_cv_prog_RANLIB"
8423 fi
8424
8425 { $as_echo "$as_me:$LINENO: checking for off_t" >&5
8426 $as_echo_n "checking for off_t... " >&6; }
8427 if test "${ac_cv_type_off_t+set}" = set; then
8428   $as_echo_n "(cached) " >&6
8429 else
8430   ac_cv_type_off_t=no
8431 cat >conftest.$ac_ext <<_ACEOF
8432 /* confdefs.h.  */
8433 _ACEOF
8434 cat confdefs.h >>conftest.$ac_ext
8435 cat >>conftest.$ac_ext <<_ACEOF
8436 /* end confdefs.h.  */
8437 $ac_includes_default
8438 int
8439 main ()
8440 {
8441 if (sizeof (off_t))
8442        return 0;
8443   ;
8444   return 0;
8445 }
8446 _ACEOF
8447 rm -rf conftest.$ac_objext
8448 if { (ac_try="$ac_compile"
8449 case "(($ac_try" in
8450   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8451   *) ac_try_echo=$ac_try;;
8452 esac
8453 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
8454 $as_echo "$ac_try_echo") >&5
8455   (eval "$ac_compile") 2>conftest.er1
8456   ac_status=$?
8457   grep -v '^ *+' conftest.er1 >conftest.err
8458   rm -rf conftest.er1
8459   cat conftest.err >&5
8460   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
8461   (exit $ac_status); } && {
8462          test -z "$ac_c_werror_flag" ||
8463          test ! -s conftest.err
8464        } && test -s conftest.$ac_objext; then
8465   cat >conftest.$ac_ext <<_ACEOF
8466 /* confdefs.h.  */
8467 _ACEOF
8468 cat confdefs.h >>conftest.$ac_ext
8469 cat >>conftest.$ac_ext <<_ACEOF
8470 /* end confdefs.h.  */
8471 $ac_includes_default
8472 int
8473 main ()
8474 {
8475 if (sizeof ((off_t)))
8476           return 0;
8477   ;
8478   return 0;
8479 }
8480 _ACEOF
8481 rm -rf conftest.$ac_objext
8482 if { (ac_try="$ac_compile"
8483 case "(($ac_try" in
8484   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8485   *) ac_try_echo=$ac_try;;
8486 esac
8487 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
8488 $as_echo "$ac_try_echo") >&5
8489   (eval "$ac_compile") 2>conftest.er1
8490   ac_status=$?
8491   grep -v '^ *+' conftest.er1 >conftest.err
8492   rm -rf conftest.er1
8493   cat conftest.err >&5
8494   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
8495   (exit $ac_status); } && {
8496          test -z "$ac_c_werror_flag" ||
8497          test ! -s conftest.err
8498        } && test -s conftest.$ac_objext; then
8499   :
8500 else
8501   $as_echo "$as_me: failed program was:" >&5
8502 sed 's/^/| /' conftest.$ac_ext >&5
8503
8504         ac_cv_type_off_t=yes
8505 fi
8506
8507 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
8508 else
8509   $as_echo "$as_me: failed program was:" >&5
8510 sed 's/^/| /' conftest.$ac_ext >&5
8511
8512
8513 fi
8514
8515 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
8516 fi
8517 { $as_echo "$as_me:$LINENO: result: $ac_cv_type_off_t" >&5
8518 $as_echo "$ac_cv_type_off_t" >&6; }
8519 if test "x$ac_cv_type_off_t" = x""yes; then
8520   :
8521 else
8522
8523 cat >>confdefs.h <<_ACEOF
8524 #define off_t long int
8525 _ACEOF
8526
8527 fi
8528
8529 # The Ultrix 4.2 mips builtin alloca declared by alloca.h only works
8530 # for constant arguments.  Useless!
8531 { $as_echo "$as_me:$LINENO: checking for working alloca.h" >&5
8532 $as_echo_n "checking for working alloca.h... " >&6; }
8533 if test "${ac_cv_working_alloca_h+set}" = set; then
8534   $as_echo_n "(cached) " >&6
8535 else
8536   cat >conftest.$ac_ext <<_ACEOF
8537 /* confdefs.h.  */
8538 _ACEOF
8539 cat confdefs.h >>conftest.$ac_ext
8540 cat >>conftest.$ac_ext <<_ACEOF
8541 /* end confdefs.h.  */
8542 #include <alloca.h>
8543 int
8544 main ()
8545 {
8546 char *p = (char *) alloca (2 * sizeof (int));
8547                           if (p) return 0;
8548   ;
8549   return 0;
8550 }
8551 _ACEOF
8552 rm -rf conftest.$ac_objext conftest$ac_exeext
8553 if { (ac_try="$ac_link"
8554 case "(($ac_try" in
8555   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8556   *) ac_try_echo=$ac_try;;
8557 esac
8558 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
8559 $as_echo "$ac_try_echo") >&5
8560   (eval "$ac_link") 2>conftest.er1
8561   ac_status=$?
8562   grep -v '^ *+' conftest.er1 >conftest.err
8563   rm -rf conftest.er1
8564   cat conftest.err >&5
8565   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
8566   (exit $ac_status); } && {
8567          test -z "$ac_c_werror_flag" ||
8568          test ! -s conftest.err
8569        } && test -s conftest$ac_exeext && {
8570          test "$cross_compiling" = yes ||
8571          $as_test_x conftest$ac_exeext
8572        }; then
8573   ac_cv_working_alloca_h=yes
8574 else
8575   $as_echo "$as_me: failed program was:" >&5
8576 sed 's/^/| /' conftest.$ac_ext >&5
8577
8578         ac_cv_working_alloca_h=no
8579 fi
8580
8581 rm -rf conftest.dSYM
8582 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
8583       conftest$ac_exeext conftest.$ac_ext
8584 fi
8585 { $as_echo "$as_me:$LINENO: result: $ac_cv_working_alloca_h" >&5
8586 $as_echo "$ac_cv_working_alloca_h" >&6; }
8587 if test $ac_cv_working_alloca_h = yes; then
8588
8589 cat >>confdefs.h <<\_ACEOF
8590 #define HAVE_ALLOCA_H 1
8591 _ACEOF
8592
8593 fi
8594
8595 { $as_echo "$as_me:$LINENO: checking for alloca" >&5
8596 $as_echo_n "checking for alloca... " >&6; }
8597 if test "${ac_cv_func_alloca_works+set}" = set; then
8598   $as_echo_n "(cached) " >&6
8599 else
8600   cat >conftest.$ac_ext <<_ACEOF
8601 /* confdefs.h.  */
8602 _ACEOF
8603 cat confdefs.h >>conftest.$ac_ext
8604 cat >>conftest.$ac_ext <<_ACEOF
8605 /* end confdefs.h.  */
8606 #ifdef __GNUC__
8607 # define alloca __builtin_alloca
8608 #else
8609 # ifdef _MSC_VER
8610 #  include <malloc.h>
8611 #  define alloca _alloca
8612 # else
8613 #  ifdef HAVE_ALLOCA_H
8614 #   include <alloca.h>
8615 #  else
8616 #   ifdef _AIX
8617  #pragma alloca
8618 #   else
8619 #    ifndef alloca /* predefined by HP cc +Olibcalls */
8620 char *alloca ();
8621 #    endif
8622 #   endif
8623 #  endif
8624 # endif
8625 #endif
8626
8627 int
8628 main ()
8629 {
8630 char *p = (char *) alloca (1);
8631                                     if (p) return 0;
8632   ;
8633   return 0;
8634 }
8635 _ACEOF
8636 rm -rf conftest.$ac_objext conftest$ac_exeext
8637 if { (ac_try="$ac_link"
8638 case "(($ac_try" in
8639   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8640   *) ac_try_echo=$ac_try;;
8641 esac
8642 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
8643 $as_echo "$ac_try_echo") >&5
8644   (eval "$ac_link") 2>conftest.er1
8645   ac_status=$?
8646   grep -v '^ *+' conftest.er1 >conftest.err
8647   rm -rf conftest.er1
8648   cat conftest.err >&5
8649   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
8650   (exit $ac_status); } && {
8651          test -z "$ac_c_werror_flag" ||
8652          test ! -s conftest.err
8653        } && test -s conftest$ac_exeext && {
8654          test "$cross_compiling" = yes ||
8655          $as_test_x conftest$ac_exeext
8656        }; then
8657   ac_cv_func_alloca_works=yes
8658 else
8659   $as_echo "$as_me: failed program was:" >&5
8660 sed 's/^/| /' conftest.$ac_ext >&5
8661
8662         ac_cv_func_alloca_works=no
8663 fi
8664
8665 rm -rf conftest.dSYM
8666 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
8667       conftest$ac_exeext conftest.$ac_ext
8668 fi
8669 { $as_echo "$as_me:$LINENO: result: $ac_cv_func_alloca_works" >&5
8670 $as_echo "$ac_cv_func_alloca_works" >&6; }
8671
8672 if test $ac_cv_func_alloca_works = yes; then
8673
8674 cat >>confdefs.h <<\_ACEOF
8675 #define HAVE_ALLOCA 1
8676 _ACEOF
8677
8678 else
8679   # The SVR3 libPW and SVR4 libucb both contain incompatible functions
8680 # that cause trouble.  Some versions do not even contain alloca or
8681 # contain a buggy version.  If you still want to use their alloca,
8682 # use ar to extract alloca.o from them instead of compiling alloca.c.
8683
8684 ALLOCA=\${LIBOBJDIR}alloca.$ac_objext
8685
8686 cat >>confdefs.h <<\_ACEOF
8687 #define C_ALLOCA 1
8688 _ACEOF
8689
8690
8691 { $as_echo "$as_me:$LINENO: checking whether \`alloca.c' needs Cray hooks" >&5
8692 $as_echo_n "checking whether \`alloca.c' needs Cray hooks... " >&6; }
8693 if test "${ac_cv_os_cray+set}" = set; then
8694   $as_echo_n "(cached) " >&6
8695 else
8696   cat >conftest.$ac_ext <<_ACEOF
8697 /* confdefs.h.  */
8698 _ACEOF
8699 cat confdefs.h >>conftest.$ac_ext
8700 cat >>conftest.$ac_ext <<_ACEOF
8701 /* end confdefs.h.  */
8702 #if defined CRAY && ! defined CRAY2
8703 webecray
8704 #else
8705 wenotbecray
8706 #endif
8707
8708 _ACEOF
8709 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
8710   $EGREP "webecray" >/dev/null 2>&1; then
8711   ac_cv_os_cray=yes
8712 else
8713   ac_cv_os_cray=no
8714 fi
8715 rm -rf conftest*
8716
8717 fi
8718 { $as_echo "$as_me:$LINENO: result: $ac_cv_os_cray" >&5
8719 $as_echo "$ac_cv_os_cray" >&6; }
8720 if test $ac_cv_os_cray = yes; then
8721   for ac_func in _getb67 GETB67 getb67; do
8722     as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
8723 { $as_echo "$as_me:$LINENO: checking for $ac_func" >&5
8724 $as_echo_n "checking for $ac_func... " >&6; }
8725 if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
8726   $as_echo_n "(cached) " >&6
8727 else
8728   cat >conftest.$ac_ext <<_ACEOF
8729 /* confdefs.h.  */
8730 _ACEOF
8731 cat confdefs.h >>conftest.$ac_ext
8732 cat >>conftest.$ac_ext <<_ACEOF
8733 /* end confdefs.h.  */
8734 /* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
8735    For example, HP-UX 11i <limits.h> declares gettimeofday.  */
8736 #define $ac_func innocuous_$ac_func
8737
8738 /* System header to define __stub macros and hopefully few prototypes,
8739     which can conflict with char $ac_func (); below.
8740     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
8741     <limits.h> exists even on freestanding compilers.  */
8742
8743 #ifdef __STDC__
8744 # include <limits.h>
8745 #else
8746 # include <assert.h>
8747 #endif
8748
8749 #undef $ac_func
8750
8751 /* Override any GCC internal prototype to avoid an error.
8752    Use char because int might match the return type of a GCC
8753    builtin and then its argument prototype would still apply.  */
8754 #ifdef __cplusplus
8755 extern "C"
8756 #endif
8757 char $ac_func ();
8758 /* The GNU C library defines this for functions which it implements
8759     to always fail with ENOSYS.  Some functions are actually named
8760     something starting with __ and the normal name is an alias.  */
8761 #if defined __stub_$ac_func || defined __stub___$ac_func
8762 choke me
8763 #endif
8764
8765 int
8766 main ()
8767 {
8768 return $ac_func ();
8769   ;
8770   return 0;
8771 }
8772 _ACEOF
8773 rm -rf conftest.$ac_objext conftest$ac_exeext
8774 if { (ac_try="$ac_link"
8775 case "(($ac_try" in
8776   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8777   *) ac_try_echo=$ac_try;;
8778 esac
8779 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
8780 $as_echo "$ac_try_echo") >&5
8781   (eval "$ac_link") 2>conftest.er1
8782   ac_status=$?
8783   grep -v '^ *+' conftest.er1 >conftest.err
8784   rm -rf conftest.er1
8785   cat conftest.err >&5
8786   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
8787   (exit $ac_status); } && {
8788          test -z "$ac_c_werror_flag" ||
8789          test ! -s conftest.err
8790        } && test -s conftest$ac_exeext && {
8791          test "$cross_compiling" = yes ||
8792          $as_test_x conftest$ac_exeext
8793        }; then
8794   eval "$as_ac_var=yes"
8795 else
8796   $as_echo "$as_me: failed program was:" >&5
8797 sed 's/^/| /' conftest.$ac_ext >&5
8798
8799         eval "$as_ac_var=no"
8800 fi
8801
8802 rm -rf conftest.dSYM
8803 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
8804       conftest$ac_exeext conftest.$ac_ext
8805 fi
8806 ac_res=`eval 'as_val=${'$as_ac_var'}
8807                  $as_echo "$as_val"'`
8808                { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
8809 $as_echo "$ac_res" >&6; }
8810 as_val=`eval 'as_val=${'$as_ac_var'}
8811                  $as_echo "$as_val"'`
8812    if test "x$as_val" = x""yes; then
8813
8814 cat >>confdefs.h <<_ACEOF
8815 #define CRAY_STACKSEG_END $ac_func
8816 _ACEOF
8817
8818     break
8819 fi
8820
8821   done
8822 fi
8823
8824 { $as_echo "$as_me:$LINENO: checking stack direction for C alloca" >&5
8825 $as_echo_n "checking stack direction for C alloca... " >&6; }
8826 if test "${ac_cv_c_stack_direction+set}" = set; then
8827   $as_echo_n "(cached) " >&6
8828 else
8829   if test "$cross_compiling" = yes; then
8830   ac_cv_c_stack_direction=0
8831 else
8832   cat >conftest.$ac_ext <<_ACEOF
8833 /* confdefs.h.  */
8834 _ACEOF
8835 cat confdefs.h >>conftest.$ac_ext
8836 cat >>conftest.$ac_ext <<_ACEOF
8837 /* end confdefs.h.  */
8838 $ac_includes_default
8839 int
8840 find_stack_direction ()
8841 {
8842   static char *addr = 0;
8843   auto char dummy;
8844   if (addr == 0)
8845     {
8846       addr = &dummy;
8847       return find_stack_direction ();
8848     }
8849   else
8850     return (&dummy > addr) ? 1 : -1;
8851 }
8852
8853 int
8854 main ()
8855 {
8856   return find_stack_direction () < 0;
8857 }
8858 _ACEOF
8859 rm -rf conftest$ac_exeext
8860 if { (ac_try="$ac_link"
8861 case "(($ac_try" in
8862   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8863   *) ac_try_echo=$ac_try;;
8864 esac
8865 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
8866 $as_echo "$ac_try_echo") >&5
8867   (eval "$ac_link") 2>&5
8868   ac_status=$?
8869   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
8870   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
8871   { (case "(($ac_try" in
8872   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8873   *) ac_try_echo=$ac_try;;
8874 esac
8875 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
8876 $as_echo "$ac_try_echo") >&5
8877   (eval "$ac_try") 2>&5
8878   ac_status=$?
8879   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
8880   (exit $ac_status); }; }; then
8881   ac_cv_c_stack_direction=1
8882 else
8883   $as_echo "$as_me: program exited with status $ac_status" >&5
8884 $as_echo "$as_me: failed program was:" >&5
8885 sed 's/^/| /' conftest.$ac_ext >&5
8886
8887 ( exit $ac_status )
8888 ac_cv_c_stack_direction=-1
8889 fi
8890 rm -rf conftest.dSYM
8891 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
8892 fi
8893
8894
8895 fi
8896 { $as_echo "$as_me:$LINENO: result: $ac_cv_c_stack_direction" >&5
8897 $as_echo "$ac_cv_c_stack_direction" >&6; }
8898
8899 cat >>confdefs.h <<_ACEOF
8900 #define STACK_DIRECTION $ac_cv_c_stack_direction
8901 _ACEOF
8902
8903
8904 fi
8905
8906
8907
8908 for ac_header in stdlib.h unistd.h
8909 do
8910 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
8911 if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
8912   { $as_echo "$as_me:$LINENO: checking for $ac_header" >&5
8913 $as_echo_n "checking for $ac_header... " >&6; }
8914 if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
8915   $as_echo_n "(cached) " >&6
8916 fi
8917 ac_res=`eval 'as_val=${'$as_ac_Header'}
8918                  $as_echo "$as_val"'`
8919                { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
8920 $as_echo "$ac_res" >&6; }
8921 else
8922   # Is the header compilable?
8923 { $as_echo "$as_me:$LINENO: checking $ac_header usability" >&5
8924 $as_echo_n "checking $ac_header usability... " >&6; }
8925 cat >conftest.$ac_ext <<_ACEOF
8926 /* confdefs.h.  */
8927 _ACEOF
8928 cat confdefs.h >>conftest.$ac_ext
8929 cat >>conftest.$ac_ext <<_ACEOF
8930 /* end confdefs.h.  */
8931 $ac_includes_default
8932 #include <$ac_header>
8933 _ACEOF
8934 rm -rf conftest.$ac_objext
8935 if { (ac_try="$ac_compile"
8936 case "(($ac_try" in
8937   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8938   *) ac_try_echo=$ac_try;;
8939 esac
8940 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
8941 $as_echo "$ac_try_echo") >&5
8942   (eval "$ac_compile") 2>conftest.er1
8943   ac_status=$?
8944   grep -v '^ *+' conftest.er1 >conftest.err
8945   rm -rf conftest.er1
8946   cat conftest.err >&5
8947   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
8948   (exit $ac_status); } && {
8949          test -z "$ac_c_werror_flag" ||
8950          test ! -s conftest.err
8951        } && test -s conftest.$ac_objext; then
8952   ac_header_compiler=yes
8953 else
8954   $as_echo "$as_me: failed program was:" >&5
8955 sed 's/^/| /' conftest.$ac_ext >&5
8956
8957         ac_header_compiler=no
8958 fi
8959
8960 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
8961 { $as_echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
8962 $as_echo "$ac_header_compiler" >&6; }
8963
8964 # Is the header present?
8965 { $as_echo "$as_me:$LINENO: checking $ac_header presence" >&5
8966 $as_echo_n "checking $ac_header presence... " >&6; }
8967 cat >conftest.$ac_ext <<_ACEOF
8968 /* confdefs.h.  */
8969 _ACEOF
8970 cat confdefs.h >>conftest.$ac_ext
8971 cat >>conftest.$ac_ext <<_ACEOF
8972 /* end confdefs.h.  */
8973 #include <$ac_header>
8974 _ACEOF
8975 if { (ac_try="$ac_cpp conftest.$ac_ext"
8976 case "(($ac_try" in
8977   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8978   *) ac_try_echo=$ac_try;;
8979 esac
8980 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
8981 $as_echo "$ac_try_echo") >&5
8982   (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
8983   ac_status=$?
8984   grep -v '^ *+' conftest.er1 >conftest.err
8985   rm -rf conftest.er1
8986   cat conftest.err >&5
8987   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
8988   (exit $ac_status); } >/dev/null && {
8989          test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
8990          test ! -s conftest.err
8991        }; then
8992   ac_header_preproc=yes
8993 else
8994   $as_echo "$as_me: failed program was:" >&5
8995 sed 's/^/| /' conftest.$ac_ext >&5
8996
8997   ac_header_preproc=no
8998 fi
8999
9000 rm -rf conftest.err conftest.$ac_ext
9001 { $as_echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
9002 $as_echo "$ac_header_preproc" >&6; }
9003
9004 # So?  What about this header?
9005 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
9006   yes:no: )
9007     { $as_echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
9008 $as_echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
9009     { $as_echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
9010 $as_echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
9011     ac_header_preproc=yes
9012     ;;
9013   no:yes:* )
9014     { $as_echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
9015 $as_echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
9016     { $as_echo "$as_me:$LINENO: WARNING: $ac_header:     check for missing prerequisite headers?" >&5
9017 $as_echo "$as_me: WARNING: $ac_header:     check for missing prerequisite headers?" >&2;}
9018     { $as_echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
9019 $as_echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
9020     { $as_echo "$as_me:$LINENO: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&5
9021 $as_echo "$as_me: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&2;}
9022     { $as_echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
9023 $as_echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
9024     { $as_echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
9025 $as_echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
9026
9027     ;;
9028 esac
9029 { $as_echo "$as_me:$LINENO: checking for $ac_header" >&5
9030 $as_echo_n "checking for $ac_header... " >&6; }
9031 if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
9032   $as_echo_n "(cached) " >&6
9033 else
9034   eval "$as_ac_Header=\$ac_header_preproc"
9035 fi
9036 ac_res=`eval 'as_val=${'$as_ac_Header'}
9037                  $as_echo "$as_val"'`
9038                { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
9039 $as_echo "$ac_res" >&6; }
9040
9041 fi
9042 as_val=`eval 'as_val=${'$as_ac_Header'}
9043                  $as_echo "$as_val"'`
9044    if test "x$as_val" = x""yes; then
9045   cat >>confdefs.h <<_ACEOF
9046 #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
9047 _ACEOF
9048
9049 fi
9050
9051 done
9052
9053
9054 for ac_func in getpagesize
9055 do
9056 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
9057 { $as_echo "$as_me:$LINENO: checking for $ac_func" >&5
9058 $as_echo_n "checking for $ac_func... " >&6; }
9059 if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
9060   $as_echo_n "(cached) " >&6
9061 else
9062   cat >conftest.$ac_ext <<_ACEOF
9063 /* confdefs.h.  */
9064 _ACEOF
9065 cat confdefs.h >>conftest.$ac_ext
9066 cat >>conftest.$ac_ext <<_ACEOF
9067 /* end confdefs.h.  */
9068 /* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
9069    For example, HP-UX 11i <limits.h> declares gettimeofday.  */
9070 #define $ac_func innocuous_$ac_func
9071
9072 /* System header to define __stub macros and hopefully few prototypes,
9073     which can conflict with char $ac_func (); below.
9074     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
9075     <limits.h> exists even on freestanding compilers.  */
9076
9077 #ifdef __STDC__
9078 # include <limits.h>
9079 #else
9080 # include <assert.h>
9081 #endif
9082
9083 #undef $ac_func
9084
9085 /* Override any GCC internal prototype to avoid an error.
9086    Use char because int might match the return type of a GCC
9087    builtin and then its argument prototype would still apply.  */
9088 #ifdef __cplusplus
9089 extern "C"
9090 #endif
9091 char $ac_func ();
9092 /* The GNU C library defines this for functions which it implements
9093     to always fail with ENOSYS.  Some functions are actually named
9094     something starting with __ and the normal name is an alias.  */
9095 #if defined __stub_$ac_func || defined __stub___$ac_func
9096 choke me
9097 #endif
9098
9099 int
9100 main ()
9101 {
9102 return $ac_func ();
9103   ;
9104   return 0;
9105 }
9106 _ACEOF
9107 rm -rf conftest.$ac_objext conftest$ac_exeext
9108 if { (ac_try="$ac_link"
9109 case "(($ac_try" in
9110   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9111   *) ac_try_echo=$ac_try;;
9112 esac
9113 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
9114 $as_echo "$ac_try_echo") >&5
9115   (eval "$ac_link") 2>conftest.er1
9116   ac_status=$?
9117   grep -v '^ *+' conftest.er1 >conftest.err
9118   rm -rf conftest.er1
9119   cat conftest.err >&5
9120   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
9121   (exit $ac_status); } && {
9122          test -z "$ac_c_werror_flag" ||
9123          test ! -s conftest.err
9124        } && test -s conftest$ac_exeext && {
9125          test "$cross_compiling" = yes ||
9126          $as_test_x conftest$ac_exeext
9127        }; then
9128   eval "$as_ac_var=yes"
9129 else
9130   $as_echo "$as_me: failed program was:" >&5
9131 sed 's/^/| /' conftest.$ac_ext >&5
9132
9133         eval "$as_ac_var=no"
9134 fi
9135
9136 rm -rf conftest.dSYM
9137 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
9138       conftest$ac_exeext conftest.$ac_ext
9139 fi
9140 ac_res=`eval 'as_val=${'$as_ac_var'}
9141                  $as_echo "$as_val"'`
9142                { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
9143 $as_echo "$ac_res" >&6; }
9144 as_val=`eval 'as_val=${'$as_ac_var'}
9145                  $as_echo "$as_val"'`
9146    if test "x$as_val" = x""yes; then
9147   cat >>confdefs.h <<_ACEOF
9148 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
9149 _ACEOF
9150
9151 fi
9152 done
9153
9154 { $as_echo "$as_me:$LINENO: checking for working mmap" >&5
9155 $as_echo_n "checking for working mmap... " >&6; }
9156 if test "${ac_cv_func_mmap_fixed_mapped+set}" = set; then
9157   $as_echo_n "(cached) " >&6
9158 else
9159   if test "$cross_compiling" = yes; then
9160   ac_cv_func_mmap_fixed_mapped=no
9161 else
9162   cat >conftest.$ac_ext <<_ACEOF
9163 /* confdefs.h.  */
9164 _ACEOF
9165 cat confdefs.h >>conftest.$ac_ext
9166 cat >>conftest.$ac_ext <<_ACEOF
9167 /* end confdefs.h.  */
9168 $ac_includes_default
9169 /* malloc might have been renamed as rpl_malloc. */
9170 #undef malloc
9171
9172 /* Thanks to Mike Haertel and Jim Avera for this test.
9173    Here is a matrix of mmap possibilities:
9174         mmap private not fixed
9175         mmap private fixed at somewhere currently unmapped
9176         mmap private fixed at somewhere already mapped
9177         mmap shared not fixed
9178         mmap shared fixed at somewhere currently unmapped
9179         mmap shared fixed at somewhere already mapped
9180    For private mappings, we should verify that changes cannot be read()
9181    back from the file, nor mmap's back from the file at a different
9182    address.  (There have been systems where private was not correctly
9183    implemented like the infamous i386 svr4.0, and systems where the
9184    VM page cache was not coherent with the file system buffer cache
9185    like early versions of FreeBSD and possibly contemporary NetBSD.)
9186    For shared mappings, we should conversely verify that changes get
9187    propagated back to all the places they're supposed to be.
9188
9189    Grep wants private fixed already mapped.
9190    The main things grep needs to know about mmap are:
9191    * does it exist and is it safe to write into the mmap'd area
9192    * how to use it (BSD variants)  */
9193
9194 #include <fcntl.h>
9195 #include <sys/mman.h>
9196
9197 #if !defined STDC_HEADERS && !defined HAVE_STDLIB_H
9198 char *malloc ();
9199 #endif
9200
9201 /* This mess was copied from the GNU getpagesize.h.  */
9202 #ifndef HAVE_GETPAGESIZE
9203 /* Assume that all systems that can run configure have sys/param.h.  */
9204 # ifndef HAVE_SYS_PARAM_H
9205 #  define HAVE_SYS_PARAM_H 1
9206 # endif
9207
9208 # ifdef _SC_PAGESIZE
9209 #  define getpagesize() sysconf(_SC_PAGESIZE)
9210 # else /* no _SC_PAGESIZE */
9211 #  ifdef HAVE_SYS_PARAM_H
9212 #   include <sys/param.h>
9213 #   ifdef EXEC_PAGESIZE
9214 #    define getpagesize() EXEC_PAGESIZE
9215 #   else /* no EXEC_PAGESIZE */
9216 #    ifdef NBPG
9217 #     define getpagesize() NBPG * CLSIZE
9218 #     ifndef CLSIZE
9219 #      define CLSIZE 1
9220 #     endif /* no CLSIZE */
9221 #    else /* no NBPG */
9222 #     ifdef NBPC
9223 #      define getpagesize() NBPC
9224 #     else /* no NBPC */
9225 #      ifdef PAGESIZE
9226 #       define getpagesize() PAGESIZE
9227 #      endif /* PAGESIZE */
9228 #     endif /* no NBPC */
9229 #    endif /* no NBPG */
9230 #   endif /* no EXEC_PAGESIZE */
9231 #  else /* no HAVE_SYS_PARAM_H */
9232 #   define getpagesize() 8192   /* punt totally */
9233 #  endif /* no HAVE_SYS_PARAM_H */
9234 # endif /* no _SC_PAGESIZE */
9235
9236 #endif /* no HAVE_GETPAGESIZE */
9237
9238 int
9239 main ()
9240 {
9241   char *data, *data2, *data3;
9242   int i, pagesize;
9243   int fd;
9244
9245   pagesize = getpagesize ();
9246
9247   /* First, make a file with some known garbage in it. */
9248   data = (char *) malloc (pagesize);
9249   if (!data)
9250     return 1;
9251   for (i = 0; i < pagesize; ++i)
9252     *(data + i) = rand ();
9253   umask (0);
9254   fd = creat ("conftest.mmap", 0600);
9255   if (fd < 0)
9256     return 1;
9257   if (write (fd, data, pagesize) != pagesize)
9258     return 1;
9259   close (fd);
9260
9261   /* Next, try to mmap the file at a fixed address which already has
9262      something else allocated at it.  If we can, also make sure that
9263      we see the same garbage.  */
9264   fd = open ("conftest.mmap", O_RDWR);
9265   if (fd < 0)
9266     return 1;
9267   data2 = (char *) malloc (2 * pagesize);
9268   if (!data2)
9269     return 1;
9270   data2 += (pagesize - ((long int) data2 & (pagesize - 1))) & (pagesize - 1);
9271   if (data2 != mmap (data2, pagesize, PROT_READ | PROT_WRITE,
9272                      MAP_PRIVATE | MAP_FIXED, fd, 0L))
9273     return 1;
9274   for (i = 0; i < pagesize; ++i)
9275     if (*(data + i) != *(data2 + i))
9276       return 1;
9277
9278   /* Finally, make sure that changes to the mapped area do not
9279      percolate back to the file as seen by read().  (This is a bug on
9280      some variants of i386 svr4.0.)  */
9281   for (i = 0; i < pagesize; ++i)
9282     *(data2 + i) = *(data2 + i) + 1;
9283   data3 = (char *) malloc (pagesize);
9284   if (!data3)
9285     return 1;
9286   if (read (fd, data3, pagesize) != pagesize)
9287     return 1;
9288   for (i = 0; i < pagesize; ++i)
9289     if (*(data + i) != *(data3 + i))
9290       return 1;
9291   close (fd);
9292   return 0;
9293 }
9294 _ACEOF
9295 rm -rf conftest$ac_exeext
9296 if { (ac_try="$ac_link"
9297 case "(($ac_try" in
9298   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9299   *) ac_try_echo=$ac_try;;
9300 esac
9301 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
9302 $as_echo "$ac_try_echo") >&5
9303   (eval "$ac_link") 2>&5
9304   ac_status=$?
9305   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
9306   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
9307   { (case "(($ac_try" in
9308   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9309   *) ac_try_echo=$ac_try;;
9310 esac
9311 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
9312 $as_echo "$ac_try_echo") >&5
9313   (eval "$ac_try") 2>&5
9314   ac_status=$?
9315   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
9316   (exit $ac_status); }; }; then
9317   ac_cv_func_mmap_fixed_mapped=yes
9318 else
9319   $as_echo "$as_me: program exited with status $ac_status" >&5
9320 $as_echo "$as_me: failed program was:" >&5
9321 sed 's/^/| /' conftest.$ac_ext >&5
9322
9323 ( exit $ac_status )
9324 ac_cv_func_mmap_fixed_mapped=no
9325 fi
9326 rm -rf conftest.dSYM
9327 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
9328 fi
9329
9330
9331 fi
9332 { $as_echo "$as_me:$LINENO: result: $ac_cv_func_mmap_fixed_mapped" >&5
9333 $as_echo "$ac_cv_func_mmap_fixed_mapped" >&6; }
9334 if test $ac_cv_func_mmap_fixed_mapped = yes; then
9335
9336 cat >>confdefs.h <<\_ACEOF
9337 #define HAVE_MMAP 1
9338 _ACEOF
9339
9340 fi
9341 rm -rf conftest.mmap
9342
9343
9344
9345
9346
9347
9348
9349
9350
9351
9352 for ac_header in argz.h limits.h locale.h nl_types.h malloc.h string.h \
9353 unistd.h sys/param.h
9354 do
9355 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
9356 if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
9357   { $as_echo "$as_me:$LINENO: checking for $ac_header" >&5
9358 $as_echo_n "checking for $ac_header... " >&6; }
9359 if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
9360   $as_echo_n "(cached) " >&6
9361 fi
9362 ac_res=`eval 'as_val=${'$as_ac_Header'}
9363                  $as_echo "$as_val"'`
9364                { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
9365 $as_echo "$ac_res" >&6; }
9366 else
9367   # Is the header compilable?
9368 { $as_echo "$as_me:$LINENO: checking $ac_header usability" >&5
9369 $as_echo_n "checking $ac_header usability... " >&6; }
9370 cat >conftest.$ac_ext <<_ACEOF
9371 /* confdefs.h.  */
9372 _ACEOF
9373 cat confdefs.h >>conftest.$ac_ext
9374 cat >>conftest.$ac_ext <<_ACEOF
9375 /* end confdefs.h.  */
9376 $ac_includes_default
9377 #include <$ac_header>
9378 _ACEOF
9379 rm -rf conftest.$ac_objext
9380 if { (ac_try="$ac_compile"
9381 case "(($ac_try" in
9382   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9383   *) ac_try_echo=$ac_try;;
9384 esac
9385 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
9386 $as_echo "$ac_try_echo") >&5
9387   (eval "$ac_compile") 2>conftest.er1
9388   ac_status=$?
9389   grep -v '^ *+' conftest.er1 >conftest.err
9390   rm -rf conftest.er1
9391   cat conftest.err >&5
9392   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
9393   (exit $ac_status); } && {
9394          test -z "$ac_c_werror_flag" ||
9395          test ! -s conftest.err
9396        } && test -s conftest.$ac_objext; then
9397   ac_header_compiler=yes
9398 else
9399   $as_echo "$as_me: failed program was:" >&5
9400 sed 's/^/| /' conftest.$ac_ext >&5
9401
9402         ac_header_compiler=no
9403 fi
9404
9405 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9406 { $as_echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
9407 $as_echo "$ac_header_compiler" >&6; }
9408
9409 # Is the header present?
9410 { $as_echo "$as_me:$LINENO: checking $ac_header presence" >&5
9411 $as_echo_n "checking $ac_header presence... " >&6; }
9412 cat >conftest.$ac_ext <<_ACEOF
9413 /* confdefs.h.  */
9414 _ACEOF
9415 cat confdefs.h >>conftest.$ac_ext
9416 cat >>conftest.$ac_ext <<_ACEOF
9417 /* end confdefs.h.  */
9418 #include <$ac_header>
9419 _ACEOF
9420 if { (ac_try="$ac_cpp conftest.$ac_ext"
9421 case "(($ac_try" in
9422   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9423   *) ac_try_echo=$ac_try;;
9424 esac
9425 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
9426 $as_echo "$ac_try_echo") >&5
9427   (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
9428   ac_status=$?
9429   grep -v '^ *+' conftest.er1 >conftest.err
9430   rm -rf conftest.er1
9431   cat conftest.err >&5
9432   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
9433   (exit $ac_status); } >/dev/null && {
9434          test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
9435          test ! -s conftest.err
9436        }; then
9437   ac_header_preproc=yes
9438 else
9439   $as_echo "$as_me: failed program was:" >&5
9440 sed 's/^/| /' conftest.$ac_ext >&5
9441
9442   ac_header_preproc=no
9443 fi
9444
9445 rm -rf conftest.err conftest.$ac_ext
9446 { $as_echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
9447 $as_echo "$ac_header_preproc" >&6; }
9448
9449 # So?  What about this header?
9450 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
9451   yes:no: )
9452     { $as_echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
9453 $as_echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
9454     { $as_echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
9455 $as_echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
9456     ac_header_preproc=yes
9457     ;;
9458   no:yes:* )
9459     { $as_echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
9460 $as_echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
9461     { $as_echo "$as_me:$LINENO: WARNING: $ac_header:     check for missing prerequisite headers?" >&5
9462 $as_echo "$as_me: WARNING: $ac_header:     check for missing prerequisite headers?" >&2;}
9463     { $as_echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
9464 $as_echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
9465     { $as_echo "$as_me:$LINENO: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&5
9466 $as_echo "$as_me: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&2;}
9467     { $as_echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
9468 $as_echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
9469     { $as_echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
9470 $as_echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
9471
9472     ;;
9473 esac
9474 { $as_echo "$as_me:$LINENO: checking for $ac_header" >&5
9475 $as_echo_n "checking for $ac_header... " >&6; }
9476 if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
9477   $as_echo_n "(cached) " >&6
9478 else
9479   eval "$as_ac_Header=\$ac_header_preproc"
9480 fi
9481 ac_res=`eval 'as_val=${'$as_ac_Header'}
9482                  $as_echo "$as_val"'`
9483                { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
9484 $as_echo "$ac_res" >&6; }
9485
9486 fi
9487 as_val=`eval 'as_val=${'$as_ac_Header'}
9488                  $as_echo "$as_val"'`
9489    if test "x$as_val" = x""yes; then
9490   cat >>confdefs.h <<_ACEOF
9491 #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
9492 _ACEOF
9493
9494 fi
9495
9496 done
9497
9498
9499
9500
9501
9502
9503
9504
9505
9506
9507
9508
9509 for ac_func in getcwd munmap putenv setenv setlocale strchr strcasecmp \
9510 strdup __argz_count __argz_stringify __argz_next
9511 do
9512 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
9513 { $as_echo "$as_me:$LINENO: checking for $ac_func" >&5
9514 $as_echo_n "checking for $ac_func... " >&6; }
9515 if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
9516   $as_echo_n "(cached) " >&6
9517 else
9518   cat >conftest.$ac_ext <<_ACEOF
9519 /* confdefs.h.  */
9520 _ACEOF
9521 cat confdefs.h >>conftest.$ac_ext
9522 cat >>conftest.$ac_ext <<_ACEOF
9523 /* end confdefs.h.  */
9524 /* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
9525    For example, HP-UX 11i <limits.h> declares gettimeofday.  */
9526 #define $ac_func innocuous_$ac_func
9527
9528 /* System header to define __stub macros and hopefully few prototypes,
9529     which can conflict with char $ac_func (); below.
9530     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
9531     <limits.h> exists even on freestanding compilers.  */
9532
9533 #ifdef __STDC__
9534 # include <limits.h>
9535 #else
9536 # include <assert.h>
9537 #endif
9538
9539 #undef $ac_func
9540
9541 /* Override any GCC internal prototype to avoid an error.
9542    Use char because int might match the return type of a GCC
9543    builtin and then its argument prototype would still apply.  */
9544 #ifdef __cplusplus
9545 extern "C"
9546 #endif
9547 char $ac_func ();
9548 /* The GNU C library defines this for functions which it implements
9549     to always fail with ENOSYS.  Some functions are actually named
9550     something starting with __ and the normal name is an alias.  */
9551 #if defined __stub_$ac_func || defined __stub___$ac_func
9552 choke me
9553 #endif
9554
9555 int
9556 main ()
9557 {
9558 return $ac_func ();
9559   ;
9560   return 0;
9561 }
9562 _ACEOF
9563 rm -rf conftest.$ac_objext conftest$ac_exeext
9564 if { (ac_try="$ac_link"
9565 case "(($ac_try" in
9566   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9567   *) ac_try_echo=$ac_try;;
9568 esac
9569 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
9570 $as_echo "$ac_try_echo") >&5
9571   (eval "$ac_link") 2>conftest.er1
9572   ac_status=$?
9573   grep -v '^ *+' conftest.er1 >conftest.err
9574   rm -rf conftest.er1
9575   cat conftest.err >&5
9576   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
9577   (exit $ac_status); } && {
9578          test -z "$ac_c_werror_flag" ||
9579          test ! -s conftest.err
9580        } && test -s conftest$ac_exeext && {
9581          test "$cross_compiling" = yes ||
9582          $as_test_x conftest$ac_exeext
9583        }; then
9584   eval "$as_ac_var=yes"
9585 else
9586   $as_echo "$as_me: failed program was:" >&5
9587 sed 's/^/| /' conftest.$ac_ext >&5
9588
9589         eval "$as_ac_var=no"
9590 fi
9591
9592 rm -rf conftest.dSYM
9593 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
9594       conftest$ac_exeext conftest.$ac_ext
9595 fi
9596 ac_res=`eval 'as_val=${'$as_ac_var'}
9597                  $as_echo "$as_val"'`
9598                { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
9599 $as_echo "$ac_res" >&6; }
9600 as_val=`eval 'as_val=${'$as_ac_var'}
9601                  $as_echo "$as_val"'`
9602    if test "x$as_val" = x""yes; then
9603   cat >>confdefs.h <<_ACEOF
9604 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
9605 _ACEOF
9606
9607 fi
9608 done
9609
9610
9611    if test $ac_cv_header_locale_h = yes; then
9612     { $as_echo "$as_me:$LINENO: checking for LC_MESSAGES" >&5
9613 $as_echo_n "checking for LC_MESSAGES... " >&6; }
9614 if test "${am_cv_val_LC_MESSAGES+set}" = set; then
9615   $as_echo_n "(cached) " >&6
9616 else
9617   cat >conftest.$ac_ext <<_ACEOF
9618 /* confdefs.h.  */
9619 _ACEOF
9620 cat confdefs.h >>conftest.$ac_ext
9621 cat >>conftest.$ac_ext <<_ACEOF
9622 /* end confdefs.h.  */
9623 #include <locale.h>
9624 int
9625 main ()
9626 {
9627 return LC_MESSAGES
9628   ;
9629   return 0;
9630 }
9631 _ACEOF
9632 rm -rf conftest.$ac_objext conftest$ac_exeext
9633 if { (ac_try="$ac_link"
9634 case "(($ac_try" in
9635   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9636   *) ac_try_echo=$ac_try;;
9637 esac
9638 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
9639 $as_echo "$ac_try_echo") >&5
9640   (eval "$ac_link") 2>conftest.er1
9641   ac_status=$?
9642   grep -v '^ *+' conftest.er1 >conftest.err
9643   rm -rf conftest.er1
9644   cat conftest.err >&5
9645   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
9646   (exit $ac_status); } && {
9647          test -z "$ac_c_werror_flag" ||
9648          test ! -s conftest.err
9649        } && test -s conftest$ac_exeext && {
9650          test "$cross_compiling" = yes ||
9651          $as_test_x conftest$ac_exeext
9652        }; then
9653   am_cv_val_LC_MESSAGES=yes
9654 else
9655   $as_echo "$as_me: failed program was:" >&5
9656 sed 's/^/| /' conftest.$ac_ext >&5
9657
9658         am_cv_val_LC_MESSAGES=no
9659 fi
9660
9661 rm -rf conftest.dSYM
9662 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
9663       conftest$ac_exeext conftest.$ac_ext
9664 fi
9665 { $as_echo "$as_me:$LINENO: result: $am_cv_val_LC_MESSAGES" >&5
9666 $as_echo "$am_cv_val_LC_MESSAGES" >&6; }
9667     if test $am_cv_val_LC_MESSAGES = yes; then
9668
9669 cat >>confdefs.h <<\_ACEOF
9670 #define HAVE_LC_MESSAGES 1
9671 _ACEOF
9672
9673     fi
9674   fi
9675      USE_NLS=yes
9676
9677
9678         nls_cv_force_use_gnu_gettext="no"
9679
9680     nls_cv_use_gnu_gettext="$nls_cv_force_use_gnu_gettext"
9681     if test "$nls_cv_force_use_gnu_gettext" != "yes"; then
9682                               nls_cv_header_intl=
9683       nls_cv_header_libgt=
9684       CATOBJEXT=NONE
9685
9686       if test "${ac_cv_header_libintl_h+set}" = set; then
9687   { $as_echo "$as_me:$LINENO: checking for libintl.h" >&5
9688 $as_echo_n "checking for libintl.h... " >&6; }
9689 if test "${ac_cv_header_libintl_h+set}" = set; then
9690   $as_echo_n "(cached) " >&6
9691 fi
9692 { $as_echo "$as_me:$LINENO: result: $ac_cv_header_libintl_h" >&5
9693 $as_echo "$ac_cv_header_libintl_h" >&6; }
9694 else
9695   # Is the header compilable?
9696 { $as_echo "$as_me:$LINENO: checking libintl.h usability" >&5
9697 $as_echo_n "checking libintl.h usability... " >&6; }
9698 cat >conftest.$ac_ext <<_ACEOF
9699 /* confdefs.h.  */
9700 _ACEOF
9701 cat confdefs.h >>conftest.$ac_ext
9702 cat >>conftest.$ac_ext <<_ACEOF
9703 /* end confdefs.h.  */
9704 $ac_includes_default
9705 #include <libintl.h>
9706 _ACEOF
9707 rm -rf conftest.$ac_objext
9708 if { (ac_try="$ac_compile"
9709 case "(($ac_try" in
9710   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9711   *) ac_try_echo=$ac_try;;
9712 esac
9713 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
9714 $as_echo "$ac_try_echo") >&5
9715   (eval "$ac_compile") 2>conftest.er1
9716   ac_status=$?
9717   grep -v '^ *+' conftest.er1 >conftest.err
9718   rm -rf conftest.er1
9719   cat conftest.err >&5
9720   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
9721   (exit $ac_status); } && {
9722          test -z "$ac_c_werror_flag" ||
9723          test ! -s conftest.err
9724        } && test -s conftest.$ac_objext; then
9725   ac_header_compiler=yes
9726 else
9727   $as_echo "$as_me: failed program was:" >&5
9728 sed 's/^/| /' conftest.$ac_ext >&5
9729
9730         ac_header_compiler=no
9731 fi
9732
9733 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9734 { $as_echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
9735 $as_echo "$ac_header_compiler" >&6; }
9736
9737 # Is the header present?
9738 { $as_echo "$as_me:$LINENO: checking libintl.h presence" >&5
9739 $as_echo_n "checking libintl.h presence... " >&6; }
9740 cat >conftest.$ac_ext <<_ACEOF
9741 /* confdefs.h.  */
9742 _ACEOF
9743 cat confdefs.h >>conftest.$ac_ext
9744 cat >>conftest.$ac_ext <<_ACEOF
9745 /* end confdefs.h.  */
9746 #include <libintl.h>
9747 _ACEOF
9748 if { (ac_try="$ac_cpp conftest.$ac_ext"
9749 case "(($ac_try" in
9750   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9751   *) ac_try_echo=$ac_try;;
9752 esac
9753 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
9754 $as_echo "$ac_try_echo") >&5
9755   (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
9756   ac_status=$?
9757   grep -v '^ *+' conftest.er1 >conftest.err
9758   rm -rf conftest.er1
9759   cat conftest.err >&5
9760   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
9761   (exit $ac_status); } >/dev/null && {
9762          test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
9763          test ! -s conftest.err
9764        }; then
9765   ac_header_preproc=yes
9766 else
9767   $as_echo "$as_me: failed program was:" >&5
9768 sed 's/^/| /' conftest.$ac_ext >&5
9769
9770   ac_header_preproc=no
9771 fi
9772
9773 rm -rf conftest.err conftest.$ac_ext
9774 { $as_echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
9775 $as_echo "$ac_header_preproc" >&6; }
9776
9777 # So?  What about this header?
9778 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
9779   yes:no: )
9780     { $as_echo "$as_me:$LINENO: WARNING: libintl.h: accepted by the compiler, rejected by the preprocessor!" >&5
9781 $as_echo "$as_me: WARNING: libintl.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
9782     { $as_echo "$as_me:$LINENO: WARNING: libintl.h: proceeding with the compiler's result" >&5
9783 $as_echo "$as_me: WARNING: libintl.h: proceeding with the compiler's result" >&2;}
9784     ac_header_preproc=yes
9785     ;;
9786   no:yes:* )
9787     { $as_echo "$as_me:$LINENO: WARNING: libintl.h: present but cannot be compiled" >&5
9788 $as_echo "$as_me: WARNING: libintl.h: present but cannot be compiled" >&2;}
9789     { $as_echo "$as_me:$LINENO: WARNING: libintl.h:     check for missing prerequisite headers?" >&5
9790 $as_echo "$as_me: WARNING: libintl.h:     check for missing prerequisite headers?" >&2;}
9791     { $as_echo "$as_me:$LINENO: WARNING: libintl.h: see the Autoconf documentation" >&5
9792 $as_echo "$as_me: WARNING: libintl.h: see the Autoconf documentation" >&2;}
9793     { $as_echo "$as_me:$LINENO: WARNING: libintl.h:     section \"Present But Cannot Be Compiled\"" >&5
9794 $as_echo "$as_me: WARNING: libintl.h:     section \"Present But Cannot Be Compiled\"" >&2;}
9795     { $as_echo "$as_me:$LINENO: WARNING: libintl.h: proceeding with the preprocessor's result" >&5
9796 $as_echo "$as_me: WARNING: libintl.h: proceeding with the preprocessor's result" >&2;}
9797     { $as_echo "$as_me:$LINENO: WARNING: libintl.h: in the future, the compiler will take precedence" >&5
9798 $as_echo "$as_me: WARNING: libintl.h: in the future, the compiler will take precedence" >&2;}
9799
9800     ;;
9801 esac
9802 { $as_echo "$as_me:$LINENO: checking for libintl.h" >&5
9803 $as_echo_n "checking for libintl.h... " >&6; }
9804 if test "${ac_cv_header_libintl_h+set}" = set; then
9805   $as_echo_n "(cached) " >&6
9806 else
9807   ac_cv_header_libintl_h=$ac_header_preproc
9808 fi
9809 { $as_echo "$as_me:$LINENO: result: $ac_cv_header_libintl_h" >&5
9810 $as_echo "$ac_cv_header_libintl_h" >&6; }
9811
9812 fi
9813 if test "x$ac_cv_header_libintl_h" = x""yes; then
9814   { $as_echo "$as_me:$LINENO: checking for dgettext in libc" >&5
9815 $as_echo_n "checking for dgettext in libc... " >&6; }
9816 if test "${gt_cv_func_dgettext_libc+set}" = set; then
9817   $as_echo_n "(cached) " >&6
9818 else
9819   cat >conftest.$ac_ext <<_ACEOF
9820 /* confdefs.h.  */
9821 _ACEOF
9822 cat confdefs.h >>conftest.$ac_ext
9823 cat >>conftest.$ac_ext <<_ACEOF
9824 /* end confdefs.h.  */
9825 #include <libintl.h>
9826 int
9827 main ()
9828 {
9829 return (int) dgettext ("","")
9830   ;
9831   return 0;
9832 }
9833 _ACEOF
9834 rm -rf conftest.$ac_objext conftest$ac_exeext
9835 if { (ac_try="$ac_link"
9836 case "(($ac_try" in
9837   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9838   *) ac_try_echo=$ac_try;;
9839 esac
9840 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
9841 $as_echo "$ac_try_echo") >&5
9842   (eval "$ac_link") 2>conftest.er1
9843   ac_status=$?
9844   grep -v '^ *+' conftest.er1 >conftest.err
9845   rm -rf conftest.er1
9846   cat conftest.err >&5
9847   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
9848   (exit $ac_status); } && {
9849          test -z "$ac_c_werror_flag" ||
9850          test ! -s conftest.err
9851        } && test -s conftest$ac_exeext && {
9852          test "$cross_compiling" = yes ||
9853          $as_test_x conftest$ac_exeext
9854        }; then
9855   gt_cv_func_dgettext_libc=yes
9856 else
9857   $as_echo "$as_me: failed program was:" >&5
9858 sed 's/^/| /' conftest.$ac_ext >&5
9859
9860         gt_cv_func_dgettext_libc=no
9861 fi
9862
9863 rm -rf conftest.dSYM
9864 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
9865       conftest$ac_exeext conftest.$ac_ext
9866 fi
9867 { $as_echo "$as_me:$LINENO: result: $gt_cv_func_dgettext_libc" >&5
9868 $as_echo "$gt_cv_func_dgettext_libc" >&6; }
9869
9870           if test "$gt_cv_func_dgettext_libc" != "yes"; then
9871             { $as_echo "$as_me:$LINENO: checking for bindtextdomain in -lintl" >&5
9872 $as_echo_n "checking for bindtextdomain in -lintl... " >&6; }
9873 if test "${ac_cv_lib_intl_bindtextdomain+set}" = set; then
9874   $as_echo_n "(cached) " >&6
9875 else
9876   ac_check_lib_save_LIBS=$LIBS
9877 LIBS="-lintl  $LIBS"
9878 cat >conftest.$ac_ext <<_ACEOF
9879 /* confdefs.h.  */
9880 _ACEOF
9881 cat confdefs.h >>conftest.$ac_ext
9882 cat >>conftest.$ac_ext <<_ACEOF
9883 /* end confdefs.h.  */
9884
9885 /* Override any GCC internal prototype to avoid an error.
9886    Use char because int might match the return type of a GCC
9887    builtin and then its argument prototype would still apply.  */
9888 #ifdef __cplusplus
9889 extern "C"
9890 #endif
9891 char bindtextdomain ();
9892 int
9893 main ()
9894 {
9895 return bindtextdomain ();
9896   ;
9897   return 0;
9898 }
9899 _ACEOF
9900 rm -rf conftest.$ac_objext conftest$ac_exeext
9901 if { (ac_try="$ac_link"
9902 case "(($ac_try" in
9903   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9904   *) ac_try_echo=$ac_try;;
9905 esac
9906 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
9907 $as_echo "$ac_try_echo") >&5
9908   (eval "$ac_link") 2>conftest.er1
9909   ac_status=$?
9910   grep -v '^ *+' conftest.er1 >conftest.err
9911   rm -rf conftest.er1
9912   cat conftest.err >&5
9913   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
9914   (exit $ac_status); } && {
9915          test -z "$ac_c_werror_flag" ||
9916          test ! -s conftest.err
9917        } && test -s conftest$ac_exeext && {
9918          test "$cross_compiling" = yes ||
9919          $as_test_x conftest$ac_exeext
9920        }; then
9921   ac_cv_lib_intl_bindtextdomain=yes
9922 else
9923   $as_echo "$as_me: failed program was:" >&5
9924 sed 's/^/| /' conftest.$ac_ext >&5
9925
9926         ac_cv_lib_intl_bindtextdomain=no
9927 fi
9928
9929 rm -rf conftest.dSYM
9930 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
9931       conftest$ac_exeext conftest.$ac_ext
9932 LIBS=$ac_check_lib_save_LIBS
9933 fi
9934 { $as_echo "$as_me:$LINENO: result: $ac_cv_lib_intl_bindtextdomain" >&5
9935 $as_echo "$ac_cv_lib_intl_bindtextdomain" >&6; }
9936 if test "x$ac_cv_lib_intl_bindtextdomain" = x""yes; then
9937   { $as_echo "$as_me:$LINENO: checking for dgettext in libintl" >&5
9938 $as_echo_n "checking for dgettext in libintl... " >&6; }
9939 if test "${gt_cv_func_dgettext_libintl+set}" = set; then
9940   $as_echo_n "(cached) " >&6
9941 else
9942   { $as_echo "$as_me:$LINENO: checking for dgettext in -lintl" >&5
9943 $as_echo_n "checking for dgettext in -lintl... " >&6; }
9944 if test "${ac_cv_lib_intl_dgettext+set}" = set; then
9945   $as_echo_n "(cached) " >&6
9946 else
9947   ac_check_lib_save_LIBS=$LIBS
9948 LIBS="-lintl  $LIBS"
9949 cat >conftest.$ac_ext <<_ACEOF
9950 /* confdefs.h.  */
9951 _ACEOF
9952 cat confdefs.h >>conftest.$ac_ext
9953 cat >>conftest.$ac_ext <<_ACEOF
9954 /* end confdefs.h.  */
9955
9956 /* Override any GCC internal prototype to avoid an error.
9957    Use char because int might match the return type of a GCC
9958    builtin and then its argument prototype would still apply.  */
9959 #ifdef __cplusplus
9960 extern "C"
9961 #endif
9962 char dgettext ();
9963 int
9964 main ()
9965 {
9966 return dgettext ();
9967   ;
9968   return 0;
9969 }
9970 _ACEOF
9971 rm -rf conftest.$ac_objext conftest$ac_exeext
9972 if { (ac_try="$ac_link"
9973 case "(($ac_try" in
9974   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9975   *) ac_try_echo=$ac_try;;
9976 esac
9977 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
9978 $as_echo "$ac_try_echo") >&5
9979   (eval "$ac_link") 2>conftest.er1
9980   ac_status=$?
9981   grep -v '^ *+' conftest.er1 >conftest.err
9982   rm -rf conftest.er1
9983   cat conftest.err >&5
9984   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
9985   (exit $ac_status); } && {
9986          test -z "$ac_c_werror_flag" ||
9987          test ! -s conftest.err
9988        } && test -s conftest$ac_exeext && {
9989          test "$cross_compiling" = yes ||
9990          $as_test_x conftest$ac_exeext
9991        }; then
9992   ac_cv_lib_intl_dgettext=yes
9993 else
9994   $as_echo "$as_me: failed program was:" >&5
9995 sed 's/^/| /' conftest.$ac_ext >&5
9996
9997         ac_cv_lib_intl_dgettext=no
9998 fi
9999
10000 rm -rf conftest.dSYM
10001 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
10002       conftest$ac_exeext conftest.$ac_ext
10003 LIBS=$ac_check_lib_save_LIBS
10004 fi
10005 { $as_echo "$as_me:$LINENO: result: $ac_cv_lib_intl_dgettext" >&5
10006 $as_echo "$ac_cv_lib_intl_dgettext" >&6; }
10007 if test "x$ac_cv_lib_intl_dgettext" = x""yes; then
10008   gt_cv_func_dgettext_libintl=yes
10009 else
10010   gt_cv_func_dgettext_libintl=no
10011 fi
10012
10013 fi
10014 { $as_echo "$as_me:$LINENO: result: $gt_cv_func_dgettext_libintl" >&5
10015 $as_echo "$gt_cv_func_dgettext_libintl" >&6; }
10016 fi
10017
10018           fi
10019
10020           if test "$gt_cv_func_dgettext_libintl" = "yes"; then
10021             LIBS="$LIBS -lintl";
10022           fi
10023
10024           if test "$gt_cv_func_dgettext_libc" = "yes" \
10025             || test "$gt_cv_func_dgettext_libintl" = "yes"; then
10026
10027 cat >>confdefs.h <<\_ACEOF
10028 #define HAVE_GETTEXT 1
10029 _ACEOF
10030
10031             # Extract the first word of "msgfmt", so it can be a program name with args.
10032 set dummy msgfmt; ac_word=$2
10033 { $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
10034 $as_echo_n "checking for $ac_word... " >&6; }
10035 if test "${ac_cv_path_MSGFMT+set}" = set; then
10036   $as_echo_n "(cached) " >&6
10037 else
10038   case "$MSGFMT" in
10039   /*)
10040   ac_cv_path_MSGFMT="$MSGFMT" # Let the user override the test with a path.
10041   ;;
10042   *)
10043   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
10044   for ac_dir in $PATH; do
10045     test -z "$ac_dir" && ac_dir=.
10046     if test -f $ac_dir/$ac_word; then
10047       if test -z "`$ac_dir/$ac_word -h 2>&1 | grep 'dv '`"; then
10048         ac_cv_path_MSGFMT="$ac_dir/$ac_word"
10049         break
10050       fi
10051     fi
10052   done
10053   IFS="$ac_save_ifs"
10054   test -z "$ac_cv_path_MSGFMT" && ac_cv_path_MSGFMT="no"
10055   ;;
10056 esac
10057 fi
10058 MSGFMT="$ac_cv_path_MSGFMT"
10059 if test -n "$MSGFMT"; then
10060   { $as_echo "$as_me:$LINENO: result: $MSGFMT" >&5
10061 $as_echo "$MSGFMT" >&6; }
10062 else
10063   { $as_echo "$as_me:$LINENO: result: no" >&5
10064 $as_echo "no" >&6; }
10065 fi
10066             if test "$MSGFMT" != "no"; then
10067
10068 for ac_func in dcgettext
10069 do
10070 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
10071 { $as_echo "$as_me:$LINENO: checking for $ac_func" >&5
10072 $as_echo_n "checking for $ac_func... " >&6; }
10073 if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
10074   $as_echo_n "(cached) " >&6
10075 else
10076   cat >conftest.$ac_ext <<_ACEOF
10077 /* confdefs.h.  */
10078 _ACEOF
10079 cat confdefs.h >>conftest.$ac_ext
10080 cat >>conftest.$ac_ext <<_ACEOF
10081 /* end confdefs.h.  */
10082 /* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
10083    For example, HP-UX 11i <limits.h> declares gettimeofday.  */
10084 #define $ac_func innocuous_$ac_func
10085
10086 /* System header to define __stub macros and hopefully few prototypes,
10087     which can conflict with char $ac_func (); below.
10088     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
10089     <limits.h> exists even on freestanding compilers.  */
10090
10091 #ifdef __STDC__
10092 # include <limits.h>
10093 #else
10094 # include <assert.h>
10095 #endif
10096
10097 #undef $ac_func
10098
10099 /* Override any GCC internal prototype to avoid an error.
10100    Use char because int might match the return type of a GCC
10101    builtin and then its argument prototype would still apply.  */
10102 #ifdef __cplusplus
10103 extern "C"
10104 #endif
10105 char $ac_func ();
10106 /* The GNU C library defines this for functions which it implements
10107     to always fail with ENOSYS.  Some functions are actually named
10108     something starting with __ and the normal name is an alias.  */
10109 #if defined __stub_$ac_func || defined __stub___$ac_func
10110 choke me
10111 #endif
10112
10113 int
10114 main ()
10115 {
10116 return $ac_func ();
10117   ;
10118   return 0;
10119 }
10120 _ACEOF
10121 rm -rf conftest.$ac_objext conftest$ac_exeext
10122 if { (ac_try="$ac_link"
10123 case "(($ac_try" in
10124   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10125   *) ac_try_echo=$ac_try;;
10126 esac
10127 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
10128 $as_echo "$ac_try_echo") >&5
10129   (eval "$ac_link") 2>conftest.er1
10130   ac_status=$?
10131   grep -v '^ *+' conftest.er1 >conftest.err
10132   rm -rf conftest.er1
10133   cat conftest.err >&5
10134   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
10135   (exit $ac_status); } && {
10136          test -z "$ac_c_werror_flag" ||
10137          test ! -s conftest.err
10138        } && test -s conftest$ac_exeext && {
10139          test "$cross_compiling" = yes ||
10140          $as_test_x conftest$ac_exeext
10141        }; then
10142   eval "$as_ac_var=yes"
10143 else
10144   $as_echo "$as_me: failed program was:" >&5
10145 sed 's/^/| /' conftest.$ac_ext >&5
10146
10147         eval "$as_ac_var=no"
10148 fi
10149
10150 rm -rf conftest.dSYM
10151 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
10152       conftest$ac_exeext conftest.$ac_ext
10153 fi
10154 ac_res=`eval 'as_val=${'$as_ac_var'}
10155                  $as_echo "$as_val"'`
10156                { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
10157 $as_echo "$ac_res" >&6; }
10158 as_val=`eval 'as_val=${'$as_ac_var'}
10159                  $as_echo "$as_val"'`
10160    if test "x$as_val" = x""yes; then
10161   cat >>confdefs.h <<_ACEOF
10162 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
10163 _ACEOF
10164
10165 fi
10166 done
10167
10168               # Extract the first word of "gmsgfmt", so it can be a program name with args.
10169 set dummy gmsgfmt; ac_word=$2
10170 { $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
10171 $as_echo_n "checking for $ac_word... " >&6; }
10172 if test "${ac_cv_path_GMSGFMT+set}" = set; then
10173   $as_echo_n "(cached) " >&6
10174 else
10175   case $GMSGFMT in
10176   [\\/]* | ?:[\\/]*)
10177   ac_cv_path_GMSGFMT="$GMSGFMT" # Let the user override the test with a path.
10178   ;;
10179   *)
10180   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10181 for as_dir in $PATH
10182 do
10183   IFS=$as_save_IFS
10184   test -z "$as_dir" && as_dir=.
10185   for ac_exec_ext in '' $ac_executable_extensions; do
10186   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
10187     ac_cv_path_GMSGFMT="$as_dir/$ac_word$ac_exec_ext"
10188     $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
10189     break 2
10190   fi
10191 done
10192 done
10193 IFS=$as_save_IFS
10194
10195   test -z "$ac_cv_path_GMSGFMT" && ac_cv_path_GMSGFMT="$MSGFMT"
10196   ;;
10197 esac
10198 fi
10199 GMSGFMT=$ac_cv_path_GMSGFMT
10200 if test -n "$GMSGFMT"; then
10201   { $as_echo "$as_me:$LINENO: result: $GMSGFMT" >&5
10202 $as_echo "$GMSGFMT" >&6; }
10203 else
10204   { $as_echo "$as_me:$LINENO: result: no" >&5
10205 $as_echo "no" >&6; }
10206 fi
10207
10208
10209               # Extract the first word of "xgettext", so it can be a program name with args.
10210 set dummy xgettext; ac_word=$2
10211 { $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
10212 $as_echo_n "checking for $ac_word... " >&6; }
10213 if test "${ac_cv_path_XGETTEXT+set}" = set; then
10214   $as_echo_n "(cached) " >&6
10215 else
10216   case "$XGETTEXT" in
10217   /*)
10218   ac_cv_path_XGETTEXT="$XGETTEXT" # Let the user override the test with a path.
10219   ;;
10220   *)
10221   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
10222   for ac_dir in $PATH; do
10223     test -z "$ac_dir" && ac_dir=.
10224     if test -f $ac_dir/$ac_word; then
10225       if test -z "`$ac_dir/$ac_word -h 2>&1 | grep '(HELP)'`"; then
10226         ac_cv_path_XGETTEXT="$ac_dir/$ac_word"
10227         break
10228       fi
10229     fi
10230   done
10231   IFS="$ac_save_ifs"
10232   test -z "$ac_cv_path_XGETTEXT" && ac_cv_path_XGETTEXT=":"
10233   ;;
10234 esac
10235 fi
10236 XGETTEXT="$ac_cv_path_XGETTEXT"
10237 if test -n "$XGETTEXT"; then
10238   { $as_echo "$as_me:$LINENO: result: $XGETTEXT" >&5
10239 $as_echo "$XGETTEXT" >&6; }
10240 else
10241   { $as_echo "$as_me:$LINENO: result: no" >&5
10242 $as_echo "no" >&6; }
10243 fi
10244
10245               cat >conftest.$ac_ext <<_ACEOF
10246 /* confdefs.h.  */
10247 _ACEOF
10248 cat confdefs.h >>conftest.$ac_ext
10249 cat >>conftest.$ac_ext <<_ACEOF
10250 /* end confdefs.h.  */
10251
10252 int
10253 main ()
10254 {
10255 extern int _nl_msg_cat_cntr;
10256                              return _nl_msg_cat_cntr
10257   ;
10258   return 0;
10259 }
10260 _ACEOF
10261 rm -rf conftest.$ac_objext conftest$ac_exeext
10262 if { (ac_try="$ac_link"
10263 case "(($ac_try" in
10264   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10265   *) ac_try_echo=$ac_try;;
10266 esac
10267 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
10268 $as_echo "$ac_try_echo") >&5
10269   (eval "$ac_link") 2>conftest.er1
10270   ac_status=$?
10271   grep -v '^ *+' conftest.er1 >conftest.err
10272   rm -rf conftest.er1
10273   cat conftest.err >&5
10274   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
10275   (exit $ac_status); } && {
10276          test -z "$ac_c_werror_flag" ||
10277          test ! -s conftest.err
10278        } && test -s conftest$ac_exeext && {
10279          test "$cross_compiling" = yes ||
10280          $as_test_x conftest$ac_exeext
10281        }; then
10282   CATOBJEXT=.gmo
10283                  DATADIRNAME=share
10284 else
10285   $as_echo "$as_me: failed program was:" >&5
10286 sed 's/^/| /' conftest.$ac_ext >&5
10287
10288         CATOBJEXT=.mo
10289                  DATADIRNAME=lib
10290 fi
10291
10292 rm -rf conftest.dSYM
10293 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
10294       conftest$ac_exeext conftest.$ac_ext
10295               INSTOBJEXT=.mo
10296             fi
10297           fi
10298
10299           # Added by Martin Baulig 12/15/98 for libc5 systems
10300           if test "$gt_cv_func_dgettext_libc" != "yes" \
10301             && test "$gt_cv_func_dgettext_libintl" = "yes"; then
10302             INTLLIBS=-lintl
10303             LIBS=`echo $LIBS | sed -e 's/-lintl//'`
10304           fi
10305
10306 fi
10307
10308
10309
10310       if test "$CATOBJEXT" = "NONE"; then
10311                         nls_cv_use_gnu_gettext=yes
10312       fi
10313     fi
10314
10315     if test "$nls_cv_use_gnu_gettext" != "yes"; then
10316
10317 cat >>confdefs.h <<\_ACEOF
10318 #define ENABLE_NLS 1
10319 _ACEOF
10320
10321     else
10322             CATOBJEXT=
10323     fi
10324
10325         if test "$XGETTEXT" != ":"; then
10326                   if $XGETTEXT --omit-header /dev/null 2> /dev/null; then
10327         : ;
10328       else
10329         { $as_echo "$as_me:$LINENO: result: found xgettext program is not GNU xgettext; ignore it" >&5
10330 $as_echo "found xgettext program is not GNU xgettext; ignore it" >&6; }
10331         XGETTEXT=":"
10332       fi
10333     fi
10334
10335     # We need to process the po/ directory.
10336     POSUB=po
10337
10338     ac_config_commands="$ac_config_commands default-2"
10339
10340
10341                 for lang in $ALL_LINGUAS; do
10342       GMOFILES="$GMOFILES $lang.gmo"
10343       POFILES="$POFILES $lang.po"
10344     done
10345
10346
10347
10348
10349
10350
10351
10352
10353
10354
10355
10356
10357
10358    if test "x$CATOBJEXT" != "x"; then
10359      if test "x$ALL_LINGUAS" = "x"; then
10360        LINGUAS=
10361      else
10362        { $as_echo "$as_me:$LINENO: checking for catalogs to be installed" >&5
10363 $as_echo_n "checking for catalogs to be installed... " >&6; }
10364        NEW_LINGUAS=
10365        for lang in ${LINGUAS=$ALL_LINGUAS}; do
10366          case "$ALL_LINGUAS" in
10367           *$lang*) NEW_LINGUAS="$NEW_LINGUAS $lang" ;;
10368          esac
10369        done
10370        LINGUAS=$NEW_LINGUAS
10371        { $as_echo "$as_me:$LINENO: result: $LINGUAS" >&5
10372 $as_echo "$LINGUAS" >&6; }
10373      fi
10374
10375           if test -n "$LINGUAS"; then
10376        for lang in $LINGUAS; do CATALOGS="$CATALOGS $lang$CATOBJEXT"; done
10377      fi
10378    fi
10379
10380             test -d po || mkdir po
10381    if test "$CATOBJEXT" = ".cat"; then
10382      if test "${ac_cv_header_linux_version_h+set}" = set; then
10383   { $as_echo "$as_me:$LINENO: checking for linux/version.h" >&5
10384 $as_echo_n "checking for linux/version.h... " >&6; }
10385 if test "${ac_cv_header_linux_version_h+set}" = set; then
10386   $as_echo_n "(cached) " >&6
10387 fi
10388 { $as_echo "$as_me:$LINENO: result: $ac_cv_header_linux_version_h" >&5
10389 $as_echo "$ac_cv_header_linux_version_h" >&6; }
10390 else
10391   # Is the header compilable?
10392 { $as_echo "$as_me:$LINENO: checking linux/version.h usability" >&5
10393 $as_echo_n "checking linux/version.h usability... " >&6; }
10394 cat >conftest.$ac_ext <<_ACEOF
10395 /* confdefs.h.  */
10396 _ACEOF
10397 cat confdefs.h >>conftest.$ac_ext
10398 cat >>conftest.$ac_ext <<_ACEOF
10399 /* end confdefs.h.  */
10400 $ac_includes_default
10401 #include <linux/version.h>
10402 _ACEOF
10403 rm -rf conftest.$ac_objext
10404 if { (ac_try="$ac_compile"
10405 case "(($ac_try" in
10406   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10407   *) ac_try_echo=$ac_try;;
10408 esac
10409 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
10410 $as_echo "$ac_try_echo") >&5
10411   (eval "$ac_compile") 2>conftest.er1
10412   ac_status=$?
10413   grep -v '^ *+' conftest.er1 >conftest.err
10414   rm -rf conftest.er1
10415   cat conftest.err >&5
10416   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
10417   (exit $ac_status); } && {
10418          test -z "$ac_c_werror_flag" ||
10419          test ! -s conftest.err
10420        } && test -s conftest.$ac_objext; then
10421   ac_header_compiler=yes
10422 else
10423   $as_echo "$as_me: failed program was:" >&5
10424 sed 's/^/| /' conftest.$ac_ext >&5
10425
10426         ac_header_compiler=no
10427 fi
10428
10429 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10430 { $as_echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
10431 $as_echo "$ac_header_compiler" >&6; }
10432
10433 # Is the header present?
10434 { $as_echo "$as_me:$LINENO: checking linux/version.h presence" >&5
10435 $as_echo_n "checking linux/version.h presence... " >&6; }
10436 cat >conftest.$ac_ext <<_ACEOF
10437 /* confdefs.h.  */
10438 _ACEOF
10439 cat confdefs.h >>conftest.$ac_ext
10440 cat >>conftest.$ac_ext <<_ACEOF
10441 /* end confdefs.h.  */
10442 #include <linux/version.h>
10443 _ACEOF
10444 if { (ac_try="$ac_cpp conftest.$ac_ext"
10445 case "(($ac_try" in
10446   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10447   *) ac_try_echo=$ac_try;;
10448 esac
10449 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
10450 $as_echo "$ac_try_echo") >&5
10451   (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
10452   ac_status=$?
10453   grep -v '^ *+' conftest.er1 >conftest.err
10454   rm -rf conftest.er1
10455   cat conftest.err >&5
10456   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
10457   (exit $ac_status); } >/dev/null && {
10458          test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
10459          test ! -s conftest.err
10460        }; then
10461   ac_header_preproc=yes
10462 else
10463   $as_echo "$as_me: failed program was:" >&5
10464 sed 's/^/| /' conftest.$ac_ext >&5
10465
10466   ac_header_preproc=no
10467 fi
10468
10469 rm -rf conftest.err conftest.$ac_ext
10470 { $as_echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
10471 $as_echo "$ac_header_preproc" >&6; }
10472
10473 # So?  What about this header?
10474 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
10475   yes:no: )
10476     { $as_echo "$as_me:$LINENO: WARNING: linux/version.h: accepted by the compiler, rejected by the preprocessor!" >&5
10477 $as_echo "$as_me: WARNING: linux/version.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
10478     { $as_echo "$as_me:$LINENO: WARNING: linux/version.h: proceeding with the compiler's result" >&5
10479 $as_echo "$as_me: WARNING: linux/version.h: proceeding with the compiler's result" >&2;}
10480     ac_header_preproc=yes
10481     ;;
10482   no:yes:* )
10483     { $as_echo "$as_me:$LINENO: WARNING: linux/version.h: present but cannot be compiled" >&5
10484 $as_echo "$as_me: WARNING: linux/version.h: present but cannot be compiled" >&2;}
10485     { $as_echo "$as_me:$LINENO: WARNING: linux/version.h:     check for missing prerequisite headers?" >&5
10486 $as_echo "$as_me: WARNING: linux/version.h:     check for missing prerequisite headers?" >&2;}
10487     { $as_echo "$as_me:$LINENO: WARNING: linux/version.h: see the Autoconf documentation" >&5
10488 $as_echo "$as_me: WARNING: linux/version.h: see the Autoconf documentation" >&2;}
10489     { $as_echo "$as_me:$LINENO: WARNING: linux/version.h:     section \"Present But Cannot Be Compiled\"" >&5
10490 $as_echo "$as_me: WARNING: linux/version.h:     section \"Present But Cannot Be Compiled\"" >&2;}
10491     { $as_echo "$as_me:$LINENO: WARNING: linux/version.h: proceeding with the preprocessor's result" >&5
10492 $as_echo "$as_me: WARNING: linux/version.h: proceeding with the preprocessor's result" >&2;}
10493     { $as_echo "$as_me:$LINENO: WARNING: linux/version.h: in the future, the compiler will take precedence" >&5
10494 $as_echo "$as_me: WARNING: linux/version.h: in the future, the compiler will take precedence" >&2;}
10495
10496     ;;
10497 esac
10498 { $as_echo "$as_me:$LINENO: checking for linux/version.h" >&5
10499 $as_echo_n "checking for linux/version.h... " >&6; }
10500 if test "${ac_cv_header_linux_version_h+set}" = set; then
10501   $as_echo_n "(cached) " >&6
10502 else
10503   ac_cv_header_linux_version_h=$ac_header_preproc
10504 fi
10505 { $as_echo "$as_me:$LINENO: result: $ac_cv_header_linux_version_h" >&5
10506 $as_echo "$ac_cv_header_linux_version_h" >&6; }
10507
10508 fi
10509 if test "x$ac_cv_header_linux_version_h" = x""yes; then
10510   msgformat=linux
10511 else
10512   msgformat=xopen
10513 fi
10514
10515
10516
10517                sed -e '/^#/d' $srcdir/po/$msgformat-msg.sed > po/po2msg.sed
10518    fi
10519
10520             MKINSTALLDIRS=
10521 #
10522 # jwz: fuck this!  it puts hardcoded pathnames into the generated Makefiles!
10523 #
10524 #   if test -n "$ac_aux_dir"; then
10525 #     MKINSTALLDIRS="$ac_aux_dir/mkinstalldirs"
10526 #   fi
10527    if test -z "$MKINSTALLDIRS"; then
10528      MKINSTALLDIRS="\$(top_srcdir)/mkinstalldirs"
10529    fi
10530
10531    # jwz: you know what, screw it.  Let's just use the version that I
10532    # already computed in configure.in, instead of this version that came
10533    # with the i18n crud, ok?
10534    MKINSTALLDIRS="$INSTALL_DIRS"
10535
10536
10537
10538
10539          test -d po || mkdir po
10540    if test "x$srcdir" != "x."; then
10541      if test "x`echo $srcdir | sed 's@/.*@@'`" = "x"; then
10542        posrcprefix="$srcdir/"
10543      else
10544        posrcprefix="../$srcdir/"
10545      fi
10546    else
10547      posrcprefix="../"
10548    fi
10549    rm -f po/POTFILES
10550    sed -e "/^#/d" -e "/^\$/d" -e "s,.*, $posrcprefix& \\\\," -e "\$s/\(.*\) \\\\/\1/" \
10551         < $srcdir/po/POTFILES.in > po/POTFILES
10552
10553 MKINSTALLDIRS="$INSTALL_DIRS"
10554
10555
10556 ###############################################################################
10557 #
10558 #       Check for -lXmu (some fucked up vendors don't ship it...)
10559 #
10560 ###############################################################################
10561
10562 have_xmu=no
10563
10564   ac_save_CPPFLAGS="$CPPFLAGS"
10565   if test \! -z "$includedir" ; then
10566     CPPFLAGS="$CPPFLAGS -I$includedir"
10567   fi
10568   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
10569   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
10570   { $as_echo "$as_me:$LINENO: checking for X11/Xmu/Error.h" >&5
10571 $as_echo_n "checking for X11/Xmu/Error.h... " >&6; }
10572 if test "${ac_cv_header_X11_Xmu_Error_h+set}" = set; then
10573   $as_echo_n "(cached) " >&6
10574 else
10575   cat >conftest.$ac_ext <<_ACEOF
10576 /* confdefs.h.  */
10577 _ACEOF
10578 cat confdefs.h >>conftest.$ac_ext
10579 cat >>conftest.$ac_ext <<_ACEOF
10580 /* end confdefs.h.  */
10581 #include <stdlib.h>
10582                    #include <stdio.h>
10583                    #include <X11/Intrinsic.h>
10584
10585 #include <X11/Xmu/Error.h>
10586 _ACEOF
10587 rm -rf conftest.$ac_objext
10588 if { (ac_try="$ac_compile"
10589 case "(($ac_try" in
10590   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10591   *) ac_try_echo=$ac_try;;
10592 esac
10593 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
10594 $as_echo "$ac_try_echo") >&5
10595   (eval "$ac_compile") 2>conftest.er1
10596   ac_status=$?
10597   grep -v '^ *+' conftest.er1 >conftest.err
10598   rm -rf conftest.er1
10599   cat conftest.err >&5
10600   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
10601   (exit $ac_status); } && {
10602          test -z "$ac_c_werror_flag" ||
10603          test ! -s conftest.err
10604        } && test -s conftest.$ac_objext; then
10605   ac_cv_header_X11_Xmu_Error_h=yes
10606 else
10607   $as_echo "$as_me: failed program was:" >&5
10608 sed 's/^/| /' conftest.$ac_ext >&5
10609
10610         ac_cv_header_X11_Xmu_Error_h=no
10611 fi
10612
10613 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10614 fi
10615 { $as_echo "$as_me:$LINENO: result: $ac_cv_header_X11_Xmu_Error_h" >&5
10616 $as_echo "$ac_cv_header_X11_Xmu_Error_h" >&6; }
10617 if test "x$ac_cv_header_X11_Xmu_Error_h" = x""yes; then
10618   have_xmu=yes
10619 fi
10620
10621
10622   CPPFLAGS="$ac_save_CPPFLAGS"
10623 if test "$have_xmu" = no ; then
10624   XMU_SRCS='$(UTILS_SRC)/xmu.c'
10625   XMU_OBJS='$(UTILS_BIN)/xmu.o'
10626   XMU_LIBS=''
10627 else
10628   XMU_SRCS=''
10629   XMU_OBJS=''
10630   XMU_LIBS='-lXmu'
10631   cat >>confdefs.h <<\_ACEOF
10632 #define HAVE_XMU 1
10633 _ACEOF
10634
10635 fi
10636
10637
10638 ###############################################################################
10639 #
10640 #       Check for the SunOS 4.1.x _get_wmShellWidgetClass bug.
10641 #       See comp.windows.x FAQ question 124.  The right fix is to
10642 #       get OpenWindows 3.0 patches 100512-02 and 100573-03.
10643 #
10644 ###############################################################################
10645
10646 if test "$have_xmu" = yes ; then
10647   case "$host" in
10648     *-sunos4*)
10649     { $as_echo "$as_me:$LINENO: checking for the SunOS 4.1.x _get_wmShellWidgetClass bug" >&5
10650 $as_echo_n "checking for the SunOS 4.1.x _get_wmShellWidgetClass bug... " >&6; }
10651 if test "${ac_cv_sunos_xmu_bug+set}" = set; then
10652   $as_echo_n "(cached) " >&6
10653 else
10654   ac_save_LDFLAGS="$LDFLAGS"
10655                     if test \! -z "$x_libraries" ; then
10656                       LDFLAGS="$LDFLAGS -L$x_libraries"
10657                     fi
10658                     # Note: this trick never works!  (Generally.)
10659                     # We're only getting away with using AC_TRY_LINK
10660                     # with X libraries because we know it's SunOS.
10661                     LDFLAGS="$LDFLAGS -lXmu -lXt -lX11 -lXext -lm"
10662                     cat >conftest.$ac_ext <<_ACEOF
10663 /* confdefs.h.  */
10664 _ACEOF
10665 cat confdefs.h >>conftest.$ac_ext
10666 cat >>conftest.$ac_ext <<_ACEOF
10667 /* end confdefs.h.  */
10668
10669 int
10670 main ()
10671 {
10672
10673   ;
10674   return 0;
10675 }
10676 _ACEOF
10677 rm -rf conftest.$ac_objext conftest$ac_exeext
10678 if { (ac_try="$ac_link"
10679 case "(($ac_try" in
10680   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10681   *) ac_try_echo=$ac_try;;
10682 esac
10683 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
10684 $as_echo "$ac_try_echo") >&5
10685   (eval "$ac_link") 2>conftest.er1
10686   ac_status=$?
10687   grep -v '^ *+' conftest.er1 >conftest.err
10688   rm -rf conftest.er1
10689   cat conftest.err >&5
10690   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
10691   (exit $ac_status); } && {
10692          test -z "$ac_c_werror_flag" ||
10693          test ! -s conftest.err
10694        } && test -s conftest$ac_exeext && {
10695          test "$cross_compiling" = yes ||
10696          $as_test_x conftest$ac_exeext
10697        }; then
10698   ac_cv_sunos_xmu_bug=no
10699 else
10700   $as_echo "$as_me: failed program was:" >&5
10701 sed 's/^/| /' conftest.$ac_ext >&5
10702
10703         ac_cv_sunos_xmu_bug=yes
10704 fi
10705
10706 rm -rf conftest.dSYM
10707 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
10708       conftest$ac_exeext conftest.$ac_ext
10709                     LDFLAGS="$ac_save_LDFLAGS"
10710 fi
10711 { $as_echo "$as_me:$LINENO: result: $ac_cv_sunos_xmu_bug" >&5
10712 $as_echo "$ac_cv_sunos_xmu_bug" >&6; }
10713     if test "$ac_cv_sunos_xmu_bug" = yes ; then
10714       { $as_echo "$as_me:$LINENO: checking whether the compiler understands -static" >&5
10715 $as_echo_n "checking whether the compiler understands -static... " >&6; }
10716 if test "${ac_cv_ld_static+set}" = set; then
10717   $as_echo_n "(cached) " >&6
10718 else
10719   ac_save_LDFLAGS="$LDFLAGS"
10720                       LDFLAGS="$LDFLAGS -static"
10721                       cat >conftest.$ac_ext <<_ACEOF
10722 /* confdefs.h.  */
10723 _ACEOF
10724 cat confdefs.h >>conftest.$ac_ext
10725 cat >>conftest.$ac_ext <<_ACEOF
10726 /* end confdefs.h.  */
10727
10728 int
10729 main ()
10730 {
10731
10732   ;
10733   return 0;
10734 }
10735 _ACEOF
10736 rm -rf conftest.$ac_objext conftest$ac_exeext
10737 if { (ac_try="$ac_link"
10738 case "(($ac_try" in
10739   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10740   *) ac_try_echo=$ac_try;;
10741 esac
10742 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
10743 $as_echo "$ac_try_echo") >&5
10744   (eval "$ac_link") 2>conftest.er1
10745   ac_status=$?
10746   grep -v '^ *+' conftest.er1 >conftest.err
10747   rm -rf conftest.er1
10748   cat conftest.err >&5
10749   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
10750   (exit $ac_status); } && {
10751          test -z "$ac_c_werror_flag" ||
10752          test ! -s conftest.err
10753        } && test -s conftest$ac_exeext && {
10754          test "$cross_compiling" = yes ||
10755          $as_test_x conftest$ac_exeext
10756        }; then
10757   ac_cv_ld_static=yes
10758 else
10759   $as_echo "$as_me: failed program was:" >&5
10760 sed 's/^/| /' conftest.$ac_ext >&5
10761
10762         ac_cv_ld_static=no
10763 fi
10764
10765 rm -rf conftest.dSYM
10766 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
10767       conftest$ac_exeext conftest.$ac_ext
10768                     LDFLAGS="$ac_save_LDFLAGS"
10769 fi
10770 { $as_echo "$as_me:$LINENO: result: $ac_cv_ld_static" >&5
10771 $as_echo "$ac_cv_ld_static" >&6; }
10772       if test "$ac_cv_ld_static" = yes ; then
10773         LDFLAGS="$LDFLAGS -static"
10774       else
10775         LDFLAGS="$LDFLAGS -Bstatic"
10776       fi
10777     fi
10778     ;;
10779   esac
10780 fi
10781
10782
10783 ###############################################################################
10784 #
10785 #       Handle the --with-hackdir option
10786 #
10787 ###############################################################################
10788
10789 have_hackdir=yes
10790 with_hackdir_req=unspecified
10791
10792 # Check whether --with-hackdir was given.
10793 if test "${with_hackdir+set}" = set; then
10794   withval=$with_hackdir; with_hackdir="$withval"; with_hackdir_req="$withval"
10795 else
10796   with_hackdir=yes
10797 fi
10798
10799
10800 if test x"$with_hackdir" = xyes; then
10801   HACKDIR='${libexecdir}/xscreensaver'
10802 elif test x"$with_hackdir" = xno; then
10803   HACKDIR='${bindir}'
10804 else
10805   HACKDIR=$with_hackdir
10806 fi
10807
10808 # canonicalize slashes.
10809 HACKDIR=`echo "${HACKDIR}" | sed 's@/$@@;s@//*@/@g'`
10810
10811 # Expand HACKDIR as HACKDIR_FULL
10812 HACKDIR_FULL=`eval eval eval eval eval eval eval eval eval echo $HACKDIR`
10813
10814 # This option used to be called --enable-subdir; make sure that is no longer
10815 # used, since configure brain-damagedly ignores unknown --enable options.
10816
10817 obsolete_enable=
10818 # Check whether --enable-subdir was given.
10819 if test "${enable_subdir+set}" = set; then
10820   enableval=$enable_subdir; obsolete_enable=yes
10821 fi
10822
10823 if test -n "$obsolete_enable"; then
10824   echo "error: the --enable-subdir option has been replaced with"
10825   echo "       the new --with-hackdir option; see \`configure --help'"
10826   echo "       for more information."
10827   exit 1
10828 fi
10829
10830
10831 ###############################################################################
10832 #
10833 #       Handle the --with-configdir option
10834 #       Help for --with-x-app-defaults option added..
10835 #
10836 ###############################################################################
10837
10838 have_configdir=yes
10839 with_configdir_req=unspecified
10840
10841 # Check whether --with-configdir was given.
10842 if test "${with_configdir+set}" = set; then
10843   withval=$with_configdir; with_configdir="$withval"; with_configdir_req="$withval"
10844 else
10845   with_configdir=yes
10846 fi
10847
10848
10849 if test x"$with_configdir" = xyes; then
10850   HACK_CONF_DIR='${datadir}/xscreensaver/config'
10851 elif test x"$with_configdir" = xno; then
10852   echo "error: must be yes, or a pathname: --with-configdir=$with_configdir"
10853   exit 1
10854 else
10855   # there must be a better way than this...
10856   if test -z "`echo $with_configdir | sed 's@^/.*@@'`" ; then
10857     # absolute path
10858     HACK_CONF_DIR=$with_configdir
10859   else
10860     # relative path
10861     HACK_CONF_DIR="\${exec_prefix}$with_configdir"
10862   fi
10863 fi
10864
10865
10866
10867
10868 ###############################################################################
10869 #
10870 #       Check for the SGI SCREEN_SAVER server extension.
10871 #
10872 ###############################################################################
10873
10874 have_sgi=no
10875 with_sgi_req=unspecified
10876
10877 # Check whether --with-sgi-ext was given.
10878 if test "${with_sgi_ext+set}" = set; then
10879   withval=$with_sgi_ext; with_sgi="$withval"; with_sgi_req="$withval"
10880 else
10881   with_sgi=yes
10882 fi
10883
10884
10885
10886    case "$with_sgi" in
10887     yes) ;;
10888     no)  ;;
10889
10890     /*)
10891      { $as_echo "$as_me:$LINENO: checking for SGI SCREEN_SAVER headers" >&5
10892 $as_echo_n "checking for SGI SCREEN_SAVER headers... " >&6; }
10893      d=$with_sgi/include
10894      if test -d $d; then
10895        X_CFLAGS="-I$d $X_CFLAGS"
10896        { $as_echo "$as_me:$LINENO: result: $d" >&5
10897 $as_echo "$d" >&6; }
10898      else
10899        { $as_echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
10900 $as_echo "not found ($d: no such directory)" >&6; }
10901      fi
10902
10903      { $as_echo "$as_me:$LINENO: checking for SGI SCREEN_SAVER libs" >&5
10904 $as_echo_n "checking for SGI SCREEN_SAVER libs... " >&6; }
10905      d=$with_sgi/lib
10906      if test -d $d; then
10907        X_LIBS="-L$d $X_LIBS"
10908        { $as_echo "$as_me:$LINENO: result: $d" >&5
10909 $as_echo "$d" >&6; }
10910      else
10911        { $as_echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
10912 $as_echo "not found ($d: no such directory)" >&6; }
10913      fi
10914
10915      # replace the directory string with "yes".
10916      with_sgi_req="yes"
10917      with_sgi=$with_sgi_req
10918      ;;
10919
10920     *)
10921      echo ""
10922      echo "error: argument to --with-sgi-ext must be \"yes\", \"no\", or a directory."
10923      echo "       If it is a directory, then \`DIR/include' will be added to"
10924      echo "       the -I list, and \`DIR/lib' will be added to the -L list."
10925      exit 1
10926      ;;
10927    esac
10928
10929
10930 if test "$with_sgi" = yes; then
10931
10932   ac_save_CPPFLAGS="$CPPFLAGS"
10933   if test \! -z "$includedir" ; then
10934     CPPFLAGS="$CPPFLAGS -I$includedir"
10935   fi
10936   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
10937   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
10938   { $as_echo "$as_me:$LINENO: checking for X11/extensions/XScreenSaver.h" >&5
10939 $as_echo_n "checking for X11/extensions/XScreenSaver.h... " >&6; }
10940 if test "${ac_cv_header_X11_extensions_XScreenSaver_h+set}" = set; then
10941   $as_echo_n "(cached) " >&6
10942 else
10943   cat >conftest.$ac_ext <<_ACEOF
10944 /* confdefs.h.  */
10945 _ACEOF
10946 cat confdefs.h >>conftest.$ac_ext
10947 cat >>conftest.$ac_ext <<_ACEOF
10948 /* end confdefs.h.  */
10949 #include <X11/Xlib.h>
10950
10951 #include <X11/extensions/XScreenSaver.h>
10952 _ACEOF
10953 rm -rf conftest.$ac_objext
10954 if { (ac_try="$ac_compile"
10955 case "(($ac_try" in
10956   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10957   *) ac_try_echo=$ac_try;;
10958 esac
10959 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
10960 $as_echo "$ac_try_echo") >&5
10961   (eval "$ac_compile") 2>conftest.er1
10962   ac_status=$?
10963   grep -v '^ *+' conftest.er1 >conftest.err
10964   rm -rf conftest.er1
10965   cat conftest.err >&5
10966   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
10967   (exit $ac_status); } && {
10968          test -z "$ac_c_werror_flag" ||
10969          test ! -s conftest.err
10970        } && test -s conftest.$ac_objext; then
10971   ac_cv_header_X11_extensions_XScreenSaver_h=yes
10972 else
10973   $as_echo "$as_me: failed program was:" >&5
10974 sed 's/^/| /' conftest.$ac_ext >&5
10975
10976         ac_cv_header_X11_extensions_XScreenSaver_h=no
10977 fi
10978
10979 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10980 fi
10981 { $as_echo "$as_me:$LINENO: result: $ac_cv_header_X11_extensions_XScreenSaver_h" >&5
10982 $as_echo "$ac_cv_header_X11_extensions_XScreenSaver_h" >&6; }
10983 if test "x$ac_cv_header_X11_extensions_XScreenSaver_h" = x""yes; then
10984   have_sgi=yes
10985                      cat >>confdefs.h <<\_ACEOF
10986 #define HAVE_SGI_SAVER_EXTENSION 1
10987 _ACEOF
10988
10989 fi
10990
10991
10992   CPPFLAGS="$ac_save_CPPFLAGS"
10993
10994 elif test "$with_sgi" != no; then
10995   echo "error: must be yes or no: --with-sgi-ext=$with_sgi"
10996   exit 1
10997 fi
10998
10999
11000 ###############################################################################
11001 #
11002 #       Check for the XIDLE server extension.
11003 #
11004 ###############################################################################
11005
11006 have_xidle=no
11007 with_xidle_req=unspecified
11008
11009 # Check whether --with-xidle-ext was given.
11010 if test "${with_xidle_ext+set}" = set; then
11011   withval=$with_xidle_ext; with_xidle="$withval"; with_xidle_req="$withval"
11012 else
11013   with_xidle=yes
11014 fi
11015
11016
11017
11018    case "$with_xidle" in
11019     yes) ;;
11020     no)  ;;
11021
11022     /*)
11023      { $as_echo "$as_me:$LINENO: checking for XIDLE headers" >&5
11024 $as_echo_n "checking for XIDLE headers... " >&6; }
11025      d=$with_xidle/include
11026      if test -d $d; then
11027        X_CFLAGS="-I$d $X_CFLAGS"
11028        { $as_echo "$as_me:$LINENO: result: $d" >&5
11029 $as_echo "$d" >&6; }
11030      else
11031        { $as_echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
11032 $as_echo "not found ($d: no such directory)" >&6; }
11033      fi
11034
11035      { $as_echo "$as_me:$LINENO: checking for XIDLE libs" >&5
11036 $as_echo_n "checking for XIDLE libs... " >&6; }
11037      d=$with_xidle/lib
11038      if test -d $d; then
11039        X_LIBS="-L$d $X_LIBS"
11040        { $as_echo "$as_me:$LINENO: result: $d" >&5
11041 $as_echo "$d" >&6; }
11042      else
11043        { $as_echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
11044 $as_echo "not found ($d: no such directory)" >&6; }
11045      fi
11046
11047      # replace the directory string with "yes".
11048      with_xidle_req="yes"
11049      with_xidle=$with_xidle_req
11050      ;;
11051
11052     *)
11053      echo ""
11054      echo "error: argument to --with-xidle-ext must be \"yes\", \"no\", or a directory."
11055      echo "       If it is a directory, then \`DIR/include' will be added to"
11056      echo "       the -I list, and \`DIR/lib' will be added to the -L list."
11057      exit 1
11058      ;;
11059    esac
11060
11061
11062 if test "$with_xidle" = yes; then
11063
11064   ac_save_CPPFLAGS="$CPPFLAGS"
11065   if test \! -z "$includedir" ; then
11066     CPPFLAGS="$CPPFLAGS -I$includedir"
11067   fi
11068   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
11069   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
11070   { $as_echo "$as_me:$LINENO: checking for X11/extensions/xidle.h" >&5
11071 $as_echo_n "checking for X11/extensions/xidle.h... " >&6; }
11072 if test "${ac_cv_header_X11_extensions_xidle_h+set}" = set; then
11073   $as_echo_n "(cached) " >&6
11074 else
11075   cat >conftest.$ac_ext <<_ACEOF
11076 /* confdefs.h.  */
11077 _ACEOF
11078 cat confdefs.h >>conftest.$ac_ext
11079 cat >>conftest.$ac_ext <<_ACEOF
11080 /* end confdefs.h.  */
11081 #include <X11/Xlib.h>
11082
11083 #include <X11/extensions/xidle.h>
11084 _ACEOF
11085 rm -rf conftest.$ac_objext
11086 if { (ac_try="$ac_compile"
11087 case "(($ac_try" in
11088   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11089   *) ac_try_echo=$ac_try;;
11090 esac
11091 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
11092 $as_echo "$ac_try_echo") >&5
11093   (eval "$ac_compile") 2>conftest.er1
11094   ac_status=$?
11095   grep -v '^ *+' conftest.er1 >conftest.err
11096   rm -rf conftest.er1
11097   cat conftest.err >&5
11098   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
11099   (exit $ac_status); } && {
11100          test -z "$ac_c_werror_flag" ||
11101          test ! -s conftest.err
11102        } && test -s conftest.$ac_objext; then
11103   ac_cv_header_X11_extensions_xidle_h=yes
11104 else
11105   $as_echo "$as_me: failed program was:" >&5
11106 sed 's/^/| /' conftest.$ac_ext >&5
11107
11108         ac_cv_header_X11_extensions_xidle_h=no
11109 fi
11110
11111 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11112 fi
11113 { $as_echo "$as_me:$LINENO: result: $ac_cv_header_X11_extensions_xidle_h" >&5
11114 $as_echo "$ac_cv_header_X11_extensions_xidle_h" >&6; }
11115 if test "x$ac_cv_header_X11_extensions_xidle_h" = x""yes; then
11116   have_xidle=yes
11117                      cat >>confdefs.h <<\_ACEOF
11118 #define HAVE_XIDLE_EXTENSION 1
11119 _ACEOF
11120
11121 fi
11122
11123
11124   CPPFLAGS="$ac_save_CPPFLAGS"
11125 elif test "$with_xidle" != no; then
11126   echo "error: must be yes or no: --with-xidle-ext=$with_xidle"
11127   exit 1
11128 fi
11129
11130
11131 ###############################################################################
11132 #
11133 #       Check for the SGI-VIDEO-CONTROL server extension.
11134 #
11135 ###############################################################################
11136
11137 have_sgivc=no
11138 with_sgivc_req=unspecified
11139
11140 # Check whether --with-sgivc-ext was given.
11141 if test "${with_sgivc_ext+set}" = set; then
11142   withval=$with_sgivc_ext; with_sgivc="$withval"; with_sgivc_req="$withval"
11143 else
11144   with_sgivc=yes
11145 fi
11146
11147
11148
11149    case "$with_sgivc" in
11150     yes) ;;
11151     no)  ;;
11152
11153     /*)
11154      { $as_echo "$as_me:$LINENO: checking for SGI-VIDEO-CONTROL headers" >&5
11155 $as_echo_n "checking for SGI-VIDEO-CONTROL headers... " >&6; }
11156      d=$with_sgivc/include
11157      if test -d $d; then
11158        X_CFLAGS="-I$d $X_CFLAGS"
11159        { $as_echo "$as_me:$LINENO: result: $d" >&5
11160 $as_echo "$d" >&6; }
11161      else
11162        { $as_echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
11163 $as_echo "not found ($d: no such directory)" >&6; }
11164      fi
11165
11166      { $as_echo "$as_me:$LINENO: checking for SGI-VIDEO-CONTROL libs" >&5
11167 $as_echo_n "checking for SGI-VIDEO-CONTROL libs... " >&6; }
11168      d=$with_sgivc/lib
11169      if test -d $d; then
11170        X_LIBS="-L$d $X_LIBS"
11171        { $as_echo "$as_me:$LINENO: result: $d" >&5
11172 $as_echo "$d" >&6; }
11173      else
11174        { $as_echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
11175 $as_echo "not found ($d: no such directory)" >&6; }
11176      fi
11177
11178      # replace the directory string with "yes".
11179      with_sgivc_req="yes"
11180      with_sgivc=$with_sgivc_req
11181      ;;
11182
11183     *)
11184      echo ""
11185      echo "error: argument to --with-sgivc-ext must be \"yes\", \"no\", or a directory."
11186      echo "       If it is a directory, then \`DIR/include' will be added to"
11187      echo "       the -I list, and \`DIR/lib' will be added to the -L list."
11188      exit 1
11189      ;;
11190    esac
11191
11192
11193 if test "$with_sgivc" = yes; then
11194
11195   # first check for XSGIvc.h
11196
11197   ac_save_CPPFLAGS="$CPPFLAGS"
11198   if test \! -z "$includedir" ; then
11199     CPPFLAGS="$CPPFLAGS -I$includedir"
11200   fi
11201   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
11202   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
11203   { $as_echo "$as_me:$LINENO: checking for X11/extensions/XSGIvc.h" >&5
11204 $as_echo_n "checking for X11/extensions/XSGIvc.h... " >&6; }
11205 if test "${ac_cv_header_X11_extensions_XSGIvc_h+set}" = set; then
11206   $as_echo_n "(cached) " >&6
11207 else
11208   cat >conftest.$ac_ext <<_ACEOF
11209 /* confdefs.h.  */
11210 _ACEOF
11211 cat confdefs.h >>conftest.$ac_ext
11212 cat >>conftest.$ac_ext <<_ACEOF
11213 /* end confdefs.h.  */
11214 #include <X11/Xlib.h>
11215
11216 #include <X11/extensions/XSGIvc.h>
11217 _ACEOF
11218 rm -rf conftest.$ac_objext
11219 if { (ac_try="$ac_compile"
11220 case "(($ac_try" in
11221   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11222   *) ac_try_echo=$ac_try;;
11223 esac
11224 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
11225 $as_echo "$ac_try_echo") >&5
11226   (eval "$ac_compile") 2>conftest.er1
11227   ac_status=$?
11228   grep -v '^ *+' conftest.er1 >conftest.err
11229   rm -rf conftest.er1
11230   cat conftest.err >&5
11231   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
11232   (exit $ac_status); } && {
11233          test -z "$ac_c_werror_flag" ||
11234          test ! -s conftest.err
11235        } && test -s conftest.$ac_objext; then
11236   ac_cv_header_X11_extensions_XSGIvc_h=yes
11237 else
11238   $as_echo "$as_me: failed program was:" >&5
11239 sed 's/^/| /' conftest.$ac_ext >&5
11240
11241         ac_cv_header_X11_extensions_XSGIvc_h=no
11242 fi
11243
11244 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11245 fi
11246 { $as_echo "$as_me:$LINENO: result: $ac_cv_header_X11_extensions_XSGIvc_h" >&5
11247 $as_echo "$ac_cv_header_X11_extensions_XSGIvc_h" >&6; }
11248 if test "x$ac_cv_header_X11_extensions_XSGIvc_h" = x""yes; then
11249   have_sgivc=yes
11250 fi
11251
11252
11253   CPPFLAGS="$ac_save_CPPFLAGS"
11254
11255   # if that succeeded, then check for the -lXsgivc
11256   if test "$have_sgivc" = yes; then
11257     have_sgivc=no
11258
11259   ac_save_CPPFLAGS="$CPPFLAGS"
11260   ac_save_LDFLAGS="$LDFLAGS"
11261 #  ac_save_LIBS="$LIBS"
11262
11263   if test \! -z "$includedir" ; then
11264     CPPFLAGS="$CPPFLAGS -I$includedir"
11265   fi
11266   # note: $X_CFLAGS includes $x_includes
11267   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
11268
11269   if test \! -z "$libdir" ; then
11270     LDFLAGS="$LDFLAGS -L$libdir"
11271   fi
11272   # note: $X_LIBS includes $x_libraries
11273   LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
11274
11275   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
11276   LDFLAGS=`eval eval eval eval eval eval eval eval eval echo $LDFLAGS`
11277   { $as_echo "$as_me:$LINENO: checking for XSGIvcQueryGammaMap in -lXsgivc" >&5
11278 $as_echo_n "checking for XSGIvcQueryGammaMap in -lXsgivc... " >&6; }
11279 if test "${ac_cv_lib_Xsgivc_XSGIvcQueryGammaMap+set}" = set; then
11280   $as_echo_n "(cached) " >&6
11281 else
11282   ac_check_lib_save_LIBS=$LIBS
11283 LIBS="-lXsgivc -lXext -lX11 $LIBS"
11284 cat >conftest.$ac_ext <<_ACEOF
11285 /* confdefs.h.  */
11286 _ACEOF
11287 cat confdefs.h >>conftest.$ac_ext
11288 cat >>conftest.$ac_ext <<_ACEOF
11289 /* end confdefs.h.  */
11290
11291 /* Override any GCC internal prototype to avoid an error.
11292    Use char because int might match the return type of a GCC
11293    builtin and then its argument prototype would still apply.  */
11294 #ifdef __cplusplus
11295 extern "C"
11296 #endif
11297 char XSGIvcQueryGammaMap ();
11298 int
11299 main ()
11300 {
11301 return XSGIvcQueryGammaMap ();
11302   ;
11303   return 0;
11304 }
11305 _ACEOF
11306 rm -rf conftest.$ac_objext conftest$ac_exeext
11307 if { (ac_try="$ac_link"
11308 case "(($ac_try" in
11309   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11310   *) ac_try_echo=$ac_try;;
11311 esac
11312 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
11313 $as_echo "$ac_try_echo") >&5
11314   (eval "$ac_link") 2>conftest.er1
11315   ac_status=$?
11316   grep -v '^ *+' conftest.er1 >conftest.err
11317   rm -rf conftest.er1
11318   cat conftest.err >&5
11319   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
11320   (exit $ac_status); } && {
11321          test -z "$ac_c_werror_flag" ||
11322          test ! -s conftest.err
11323        } && test -s conftest$ac_exeext && {
11324          test "$cross_compiling" = yes ||
11325          $as_test_x conftest$ac_exeext
11326        }; then
11327   ac_cv_lib_Xsgivc_XSGIvcQueryGammaMap=yes
11328 else
11329   $as_echo "$as_me: failed program was:" >&5
11330 sed 's/^/| /' conftest.$ac_ext >&5
11331
11332         ac_cv_lib_Xsgivc_XSGIvcQueryGammaMap=no
11333 fi
11334
11335 rm -rf conftest.dSYM
11336 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
11337       conftest$ac_exeext conftest.$ac_ext
11338 LIBS=$ac_check_lib_save_LIBS
11339 fi
11340 { $as_echo "$as_me:$LINENO: result: $ac_cv_lib_Xsgivc_XSGIvcQueryGammaMap" >&5
11341 $as_echo "$ac_cv_lib_Xsgivc_XSGIvcQueryGammaMap" >&6; }
11342 if test "x$ac_cv_lib_Xsgivc_XSGIvcQueryGammaMap" = x""yes; then
11343   have_sgivc=yes; SAVER_LIBS="$SAVER_LIBS -lXsgivc"
11344 else
11345   true
11346 fi
11347
11348   CPPFLAGS="$ac_save_CPPFLAGS"
11349   LDFLAGS="$ac_save_LDFLAGS"
11350 #  LIBS="$ac_save_LIBS"
11351
11352   fi
11353
11354   # if that succeeded, then we've really got it.
11355   if test "$have_sgivc" = yes; then
11356     cat >>confdefs.h <<\_ACEOF
11357 #define HAVE_SGI_VC_EXTENSION 1
11358 _ACEOF
11359
11360   fi
11361
11362 elif test "$with_sgivc" != no; then
11363   echo "error: must be yes or no: --with-sgivc-ext=$with_sgivc"
11364   exit 1
11365 fi
11366
11367
11368 ###############################################################################
11369 #
11370 #       Check for the DPMS server extension.
11371 #
11372 ###############################################################################
11373
11374 have_dpms=no
11375 with_dpms_req=unspecified
11376
11377 # Check whether --with-dpms-ext was given.
11378 if test "${with_dpms_ext+set}" = set; then
11379   withval=$with_dpms_ext; with_dpms="$withval"; with_dpms_req="$withval"
11380 else
11381   with_dpms=yes
11382 fi
11383
11384
11385
11386    case "$with_dpms" in
11387     yes) ;;
11388     no)  ;;
11389
11390     /*)
11391      { $as_echo "$as_me:$LINENO: checking for DPMS headers" >&5
11392 $as_echo_n "checking for DPMS headers... " >&6; }
11393      d=$with_dpms/include
11394      if test -d $d; then
11395        X_CFLAGS="-I$d $X_CFLAGS"
11396        { $as_echo "$as_me:$LINENO: result: $d" >&5
11397 $as_echo "$d" >&6; }
11398      else
11399        { $as_echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
11400 $as_echo "not found ($d: no such directory)" >&6; }
11401      fi
11402
11403      { $as_echo "$as_me:$LINENO: checking for DPMS libs" >&5
11404 $as_echo_n "checking for DPMS libs... " >&6; }
11405      d=$with_dpms/lib
11406      if test -d $d; then
11407        X_LIBS="-L$d $X_LIBS"
11408        { $as_echo "$as_me:$LINENO: result: $d" >&5
11409 $as_echo "$d" >&6; }
11410      else
11411        { $as_echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
11412 $as_echo "not found ($d: no such directory)" >&6; }
11413      fi
11414
11415      # replace the directory string with "yes".
11416      with_dpms_req="yes"
11417      with_dpms=$with_dpms_req
11418      ;;
11419
11420     *)
11421      echo ""
11422      echo "error: argument to --with-dpms-ext must be \"yes\", \"no\", or a directory."
11423      echo "       If it is a directory, then \`DIR/include' will be added to"
11424      echo "       the -I list, and \`DIR/lib' will be added to the -L list."
11425      exit 1
11426      ;;
11427    esac
11428
11429
11430 if test "$with_dpms" = yes; then
11431
11432   # first check for dpms.h
11433
11434   ac_save_CPPFLAGS="$CPPFLAGS"
11435   if test \! -z "$includedir" ; then
11436     CPPFLAGS="$CPPFLAGS -I$includedir"
11437   fi
11438   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
11439   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
11440   { $as_echo "$as_me:$LINENO: checking for X11/extensions/dpms.h" >&5
11441 $as_echo_n "checking for X11/extensions/dpms.h... " >&6; }
11442 if test "${ac_cv_header_X11_extensions_dpms_h+set}" = set; then
11443   $as_echo_n "(cached) " >&6
11444 else
11445   cat >conftest.$ac_ext <<_ACEOF
11446 /* confdefs.h.  */
11447 _ACEOF
11448 cat confdefs.h >>conftest.$ac_ext
11449 cat >>conftest.$ac_ext <<_ACEOF
11450 /* end confdefs.h.  */
11451 #include <X11/Xlib.h>
11452                      #include <X11/Xmd.h>
11453
11454 #include <X11/extensions/dpms.h>
11455 _ACEOF
11456 rm -rf conftest.$ac_objext
11457 if { (ac_try="$ac_compile"
11458 case "(($ac_try" in
11459   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11460   *) ac_try_echo=$ac_try;;
11461 esac
11462 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
11463 $as_echo "$ac_try_echo") >&5
11464   (eval "$ac_compile") 2>conftest.er1
11465   ac_status=$?
11466   grep -v '^ *+' conftest.er1 >conftest.err
11467   rm -rf conftest.er1
11468   cat conftest.err >&5
11469   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
11470   (exit $ac_status); } && {
11471          test -z "$ac_c_werror_flag" ||
11472          test ! -s conftest.err
11473        } && test -s conftest.$ac_objext; then
11474   ac_cv_header_X11_extensions_dpms_h=yes
11475 else
11476   $as_echo "$as_me: failed program was:" >&5
11477 sed 's/^/| /' conftest.$ac_ext >&5
11478
11479         ac_cv_header_X11_extensions_dpms_h=no
11480 fi
11481
11482 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11483 fi
11484 { $as_echo "$as_me:$LINENO: result: $ac_cv_header_X11_extensions_dpms_h" >&5
11485 $as_echo "$ac_cv_header_X11_extensions_dpms_h" >&6; }
11486 if test "x$ac_cv_header_X11_extensions_dpms_h" = x""yes; then
11487   have_dpms=yes
11488 fi
11489
11490
11491   CPPFLAGS="$ac_save_CPPFLAGS"
11492
11493   # if that succeeded, then check for the DPMS code in the libraries
11494   if test "$have_dpms" = yes; then
11495
11496     # first look in -lXext (this is where it is with XFree86 4.0)
11497     have_dpms=no
11498
11499   ac_save_CPPFLAGS="$CPPFLAGS"
11500   ac_save_LDFLAGS="$LDFLAGS"
11501 #  ac_save_LIBS="$LIBS"
11502
11503   if test \! -z "$includedir" ; then
11504     CPPFLAGS="$CPPFLAGS -I$includedir"
11505   fi
11506   # note: $X_CFLAGS includes $x_includes
11507   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
11508
11509   if test \! -z "$libdir" ; then
11510     LDFLAGS="$LDFLAGS -L$libdir"
11511   fi
11512   # note: $X_LIBS includes $x_libraries
11513   LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
11514
11515   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
11516   LDFLAGS=`eval eval eval eval eval eval eval eval eval echo $LDFLAGS`
11517   { $as_echo "$as_me:$LINENO: checking for DPMSInfo in -lXext" >&5
11518 $as_echo_n "checking for DPMSInfo in -lXext... " >&6; }
11519 if test "${ac_cv_lib_Xext_DPMSInfo+set}" = set; then
11520   $as_echo_n "(cached) " >&6
11521 else
11522   ac_check_lib_save_LIBS=$LIBS
11523 LIBS="-lXext -lXext -lX11 $LIBS"
11524 cat >conftest.$ac_ext <<_ACEOF
11525 /* confdefs.h.  */
11526 _ACEOF
11527 cat confdefs.h >>conftest.$ac_ext
11528 cat >>conftest.$ac_ext <<_ACEOF
11529 /* end confdefs.h.  */
11530
11531 /* Override any GCC internal prototype to avoid an error.
11532    Use char because int might match the return type of a GCC
11533    builtin and then its argument prototype would still apply.  */
11534 #ifdef __cplusplus
11535 extern "C"
11536 #endif
11537 char DPMSInfo ();
11538 int
11539 main ()
11540 {
11541 return DPMSInfo ();
11542   ;
11543   return 0;
11544 }
11545 _ACEOF
11546 rm -rf conftest.$ac_objext conftest$ac_exeext
11547 if { (ac_try="$ac_link"
11548 case "(($ac_try" in
11549   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11550   *) ac_try_echo=$ac_try;;
11551 esac
11552 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
11553 $as_echo "$ac_try_echo") >&5
11554   (eval "$ac_link") 2>conftest.er1
11555   ac_status=$?
11556   grep -v '^ *+' conftest.er1 >conftest.err
11557   rm -rf conftest.er1
11558   cat conftest.err >&5
11559   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
11560   (exit $ac_status); } && {
11561          test -z "$ac_c_werror_flag" ||
11562          test ! -s conftest.err
11563        } && test -s conftest$ac_exeext && {
11564          test "$cross_compiling" = yes ||
11565          $as_test_x conftest$ac_exeext
11566        }; then
11567   ac_cv_lib_Xext_DPMSInfo=yes
11568 else
11569   $as_echo "$as_me: failed program was:" >&5
11570 sed 's/^/| /' conftest.$ac_ext >&5
11571
11572         ac_cv_lib_Xext_DPMSInfo=no
11573 fi
11574
11575 rm -rf conftest.dSYM
11576 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
11577       conftest$ac_exeext conftest.$ac_ext
11578 LIBS=$ac_check_lib_save_LIBS
11579 fi
11580 { $as_echo "$as_me:$LINENO: result: $ac_cv_lib_Xext_DPMSInfo" >&5
11581 $as_echo "$ac_cv_lib_Xext_DPMSInfo" >&6; }
11582 if test "x$ac_cv_lib_Xext_DPMSInfo" = x""yes; then
11583   have_dpms=yes
11584 else
11585   true
11586 fi
11587
11588   CPPFLAGS="$ac_save_CPPFLAGS"
11589   LDFLAGS="$ac_save_LDFLAGS"
11590 #  LIBS="$ac_save_LIBS"
11591
11592
11593     # if that failed, look in -lXdpms (this is where it was in XFree86 3.x)
11594     if test "$have_dpms" = no; then
11595
11596   ac_save_CPPFLAGS="$CPPFLAGS"
11597   ac_save_LDFLAGS="$LDFLAGS"
11598 #  ac_save_LIBS="$LIBS"
11599
11600   if test \! -z "$includedir" ; then
11601     CPPFLAGS="$CPPFLAGS -I$includedir"
11602   fi
11603   # note: $X_CFLAGS includes $x_includes
11604   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
11605
11606   if test \! -z "$libdir" ; then
11607     LDFLAGS="$LDFLAGS -L$libdir"
11608   fi
11609   # note: $X_LIBS includes $x_libraries
11610   LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
11611
11612   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
11613   LDFLAGS=`eval eval eval eval eval eval eval eval eval echo $LDFLAGS`
11614   { $as_echo "$as_me:$LINENO: checking for DPMSInfo in -lXdpms" >&5
11615 $as_echo_n "checking for DPMSInfo in -lXdpms... " >&6; }
11616 if test "${ac_cv_lib_Xdpms_DPMSInfo+set}" = set; then
11617   $as_echo_n "(cached) " >&6
11618 else
11619   ac_check_lib_save_LIBS=$LIBS
11620 LIBS="-lXdpms -lXext -lX11 $LIBS"
11621 cat >conftest.$ac_ext <<_ACEOF
11622 /* confdefs.h.  */
11623 _ACEOF
11624 cat confdefs.h >>conftest.$ac_ext
11625 cat >>conftest.$ac_ext <<_ACEOF
11626 /* end confdefs.h.  */
11627
11628 /* Override any GCC internal prototype to avoid an error.
11629    Use char because int might match the return type of a GCC
11630    builtin and then its argument prototype would still apply.  */
11631 #ifdef __cplusplus
11632 extern "C"
11633 #endif
11634 char DPMSInfo ();
11635 int
11636 main ()
11637 {
11638 return DPMSInfo ();
11639   ;
11640   return 0;
11641 }
11642 _ACEOF
11643 rm -rf conftest.$ac_objext conftest$ac_exeext
11644 if { (ac_try="$ac_link"
11645 case "(($ac_try" in
11646   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11647   *) ac_try_echo=$ac_try;;
11648 esac
11649 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
11650 $as_echo "$ac_try_echo") >&5
11651   (eval "$ac_link") 2>conftest.er1
11652   ac_status=$?
11653   grep -v '^ *+' conftest.er1 >conftest.err
11654   rm -rf conftest.er1
11655   cat conftest.err >&5
11656   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
11657   (exit $ac_status); } && {
11658          test -z "$ac_c_werror_flag" ||
11659          test ! -s conftest.err
11660        } && test -s conftest$ac_exeext && {
11661          test "$cross_compiling" = yes ||
11662          $as_test_x conftest$ac_exeext
11663        }; then
11664   ac_cv_lib_Xdpms_DPMSInfo=yes
11665 else
11666   $as_echo "$as_me: failed program was:" >&5
11667 sed 's/^/| /' conftest.$ac_ext >&5
11668
11669         ac_cv_lib_Xdpms_DPMSInfo=no
11670 fi
11671
11672 rm -rf conftest.dSYM
11673 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
11674       conftest$ac_exeext conftest.$ac_ext
11675 LIBS=$ac_check_lib_save_LIBS
11676 fi
11677 { $as_echo "$as_me:$LINENO: result: $ac_cv_lib_Xdpms_DPMSInfo" >&5
11678 $as_echo "$ac_cv_lib_Xdpms_DPMSInfo" >&6; }
11679 if test "x$ac_cv_lib_Xdpms_DPMSInfo" = x""yes; then
11680   have_dpms=yes; XDPMS_LIBS="-lXdpms"
11681 else
11682   true
11683 fi
11684
11685   CPPFLAGS="$ac_save_CPPFLAGS"
11686   LDFLAGS="$ac_save_LDFLAGS"
11687 #  LIBS="$ac_save_LIBS"
11688
11689     fi
11690   fi
11691
11692
11693   # if that succeeded, then we've really got it.
11694   if test "$have_dpms" = yes; then
11695     cat >>confdefs.h <<\_ACEOF
11696 #define HAVE_DPMS_EXTENSION 1
11697 _ACEOF
11698
11699   fi
11700
11701 elif test "$with_dpms" != no; then
11702   echo "error: must be yes or no: --with-dpms-ext=$with_dpms"
11703   exit 1
11704 fi
11705
11706
11707 ###############################################################################
11708 #
11709 #       Check for the XINERAMA server extension.
11710 #
11711 ###############################################################################
11712
11713 have_xinerama=no
11714 with_xinerama_req=unspecified
11715
11716 # Check whether --with-xinerama-ext was given.
11717 if test "${with_xinerama_ext+set}" = set; then
11718   withval=$with_xinerama_ext; with_xinerama="$withval"; with_xinerama_req="$withval"
11719 else
11720   with_xinerama=yes
11721 fi
11722
11723
11724
11725    case "$with_xinerama" in
11726     yes) ;;
11727     no)  ;;
11728
11729     /*)
11730      { $as_echo "$as_me:$LINENO: checking for XINERAMA headers" >&5
11731 $as_echo_n "checking for XINERAMA headers... " >&6; }
11732      d=$with_xinerama/include
11733      if test -d $d; then
11734        X_CFLAGS="-I$d $X_CFLAGS"
11735        { $as_echo "$as_me:$LINENO: result: $d" >&5
11736 $as_echo "$d" >&6; }
11737      else
11738        { $as_echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
11739 $as_echo "not found ($d: no such directory)" >&6; }
11740      fi
11741
11742      { $as_echo "$as_me:$LINENO: checking for XINERAMA libs" >&5
11743 $as_echo_n "checking for XINERAMA libs... " >&6; }
11744      d=$with_xinerama/lib
11745      if test -d $d; then
11746        X_LIBS="-L$d $X_LIBS"
11747        { $as_echo "$as_me:$LINENO: result: $d" >&5
11748 $as_echo "$d" >&6; }
11749      else
11750        { $as_echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
11751 $as_echo "not found ($d: no such directory)" >&6; }
11752      fi
11753
11754      # replace the directory string with "yes".
11755      with_xinerama_req="yes"
11756      with_xinerama=$with_xinerama_req
11757      ;;
11758
11759     *)
11760      echo ""
11761      echo "error: argument to --with-xinerama-ext must be \"yes\", \"no\", or a directory."
11762      echo "       If it is a directory, then \`DIR/include' will be added to"
11763      echo "       the -I list, and \`DIR/lib' will be added to the -L list."
11764      exit 1
11765      ;;
11766    esac
11767
11768
11769 if test "$with_xinerama" = yes; then
11770
11771   # first check for Xinerama.h
11772
11773   ac_save_CPPFLAGS="$CPPFLAGS"
11774   if test \! -z "$includedir" ; then
11775     CPPFLAGS="$CPPFLAGS -I$includedir"
11776   fi
11777   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
11778   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
11779   { $as_echo "$as_me:$LINENO: checking for X11/extensions/Xinerama.h" >&5
11780 $as_echo_n "checking for X11/extensions/Xinerama.h... " >&6; }
11781 if test "${ac_cv_header_X11_extensions_Xinerama_h+set}" = set; then
11782   $as_echo_n "(cached) " >&6
11783 else
11784   cat >conftest.$ac_ext <<_ACEOF
11785 /* confdefs.h.  */
11786 _ACEOF
11787 cat confdefs.h >>conftest.$ac_ext
11788 cat >>conftest.$ac_ext <<_ACEOF
11789 /* end confdefs.h.  */
11790 #include <X11/Xlib.h>
11791
11792 #include <X11/extensions/Xinerama.h>
11793 _ACEOF
11794 rm -rf conftest.$ac_objext
11795 if { (ac_try="$ac_compile"
11796 case "(($ac_try" in
11797   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11798   *) ac_try_echo=$ac_try;;
11799 esac
11800 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
11801 $as_echo "$ac_try_echo") >&5
11802   (eval "$ac_compile") 2>conftest.er1
11803   ac_status=$?
11804   grep -v '^ *+' conftest.er1 >conftest.err
11805   rm -rf conftest.er1
11806   cat conftest.err >&5
11807   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
11808   (exit $ac_status); } && {
11809          test -z "$ac_c_werror_flag" ||
11810          test ! -s conftest.err
11811        } && test -s conftest.$ac_objext; then
11812   ac_cv_header_X11_extensions_Xinerama_h=yes
11813 else
11814   $as_echo "$as_me: failed program was:" >&5
11815 sed 's/^/| /' conftest.$ac_ext >&5
11816
11817         ac_cv_header_X11_extensions_Xinerama_h=no
11818 fi
11819
11820 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11821 fi
11822 { $as_echo "$as_me:$LINENO: result: $ac_cv_header_X11_extensions_Xinerama_h" >&5
11823 $as_echo "$ac_cv_header_X11_extensions_Xinerama_h" >&6; }
11824 if test "x$ac_cv_header_X11_extensions_Xinerama_h" = x""yes; then
11825   have_xinerama=yes
11826 fi
11827
11828
11829   CPPFLAGS="$ac_save_CPPFLAGS"
11830
11831   # if that succeeded, then check for the XINERAMA code in the libraries
11832   if test "$have_xinerama" = yes; then
11833
11834     # first look in -lXext
11835     have_xinerama=no
11836
11837   ac_save_CPPFLAGS="$CPPFLAGS"
11838   ac_save_LDFLAGS="$LDFLAGS"
11839 #  ac_save_LIBS="$LIBS"
11840
11841   if test \! -z "$includedir" ; then
11842     CPPFLAGS="$CPPFLAGS -I$includedir"
11843   fi
11844   # note: $X_CFLAGS includes $x_includes
11845   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
11846
11847   if test \! -z "$libdir" ; then
11848     LDFLAGS="$LDFLAGS -L$libdir"
11849   fi
11850   # note: $X_LIBS includes $x_libraries
11851   LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
11852
11853   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
11854   LDFLAGS=`eval eval eval eval eval eval eval eval eval echo $LDFLAGS`
11855   { $as_echo "$as_me:$LINENO: checking for XineramaQueryScreens in -lXext" >&5
11856 $as_echo_n "checking for XineramaQueryScreens in -lXext... " >&6; }
11857 if test "${ac_cv_lib_Xext_XineramaQueryScreens+set}" = set; then
11858   $as_echo_n "(cached) " >&6
11859 else
11860   ac_check_lib_save_LIBS=$LIBS
11861 LIBS="-lXext -lXext -lX11 $LIBS"
11862 cat >conftest.$ac_ext <<_ACEOF
11863 /* confdefs.h.  */
11864 _ACEOF
11865 cat confdefs.h >>conftest.$ac_ext
11866 cat >>conftest.$ac_ext <<_ACEOF
11867 /* end confdefs.h.  */
11868
11869 /* Override any GCC internal prototype to avoid an error.
11870    Use char because int might match the return type of a GCC
11871    builtin and then its argument prototype would still apply.  */
11872 #ifdef __cplusplus
11873 extern "C"
11874 #endif
11875 char XineramaQueryScreens ();
11876 int
11877 main ()
11878 {
11879 return XineramaQueryScreens ();
11880   ;
11881   return 0;
11882 }
11883 _ACEOF
11884 rm -rf conftest.$ac_objext conftest$ac_exeext
11885 if { (ac_try="$ac_link"
11886 case "(($ac_try" in
11887   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11888   *) ac_try_echo=$ac_try;;
11889 esac
11890 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
11891 $as_echo "$ac_try_echo") >&5
11892   (eval "$ac_link") 2>conftest.er1
11893   ac_status=$?
11894   grep -v '^ *+' conftest.er1 >conftest.err
11895   rm -rf conftest.er1
11896   cat conftest.err >&5
11897   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
11898   (exit $ac_status); } && {
11899          test -z "$ac_c_werror_flag" ||
11900          test ! -s conftest.err
11901        } && test -s conftest$ac_exeext && {
11902          test "$cross_compiling" = yes ||
11903          $as_test_x conftest$ac_exeext
11904        }; then
11905   ac_cv_lib_Xext_XineramaQueryScreens=yes
11906 else
11907   $as_echo "$as_me: failed program was:" >&5
11908 sed 's/^/| /' conftest.$ac_ext >&5
11909
11910         ac_cv_lib_Xext_XineramaQueryScreens=no
11911 fi
11912
11913 rm -rf conftest.dSYM
11914 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
11915       conftest$ac_exeext conftest.$ac_ext
11916 LIBS=$ac_check_lib_save_LIBS
11917 fi
11918 { $as_echo "$as_me:$LINENO: result: $ac_cv_lib_Xext_XineramaQueryScreens" >&5
11919 $as_echo "$ac_cv_lib_Xext_XineramaQueryScreens" >&6; }
11920 if test "x$ac_cv_lib_Xext_XineramaQueryScreens" = x""yes; then
11921   have_xinerama=yes
11922 else
11923   true
11924 fi
11925
11926   CPPFLAGS="$ac_save_CPPFLAGS"
11927   LDFLAGS="$ac_save_LDFLAGS"
11928 #  LIBS="$ac_save_LIBS"
11929
11930
11931     # if that failed, look in -lXinerama (this is where it is in XFree86 4.1.)
11932     if test "$have_xinerama" = no; then
11933
11934   ac_save_CPPFLAGS="$CPPFLAGS"
11935   ac_save_LDFLAGS="$LDFLAGS"
11936 #  ac_save_LIBS="$LIBS"
11937
11938   if test \! -z "$includedir" ; then
11939     CPPFLAGS="$CPPFLAGS -I$includedir"
11940   fi
11941   # note: $X_CFLAGS includes $x_includes
11942   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
11943
11944   if test \! -z "$libdir" ; then
11945     LDFLAGS="$LDFLAGS -L$libdir"
11946   fi
11947   # note: $X_LIBS includes $x_libraries
11948   LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
11949
11950   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
11951   LDFLAGS=`eval eval eval eval eval eval eval eval eval echo $LDFLAGS`
11952   { $as_echo "$as_me:$LINENO: checking for XineramaQueryScreens in -lXinerama" >&5
11953 $as_echo_n "checking for XineramaQueryScreens in -lXinerama... " >&6; }
11954 if test "${ac_cv_lib_Xinerama_XineramaQueryScreens+set}" = set; then
11955   $as_echo_n "(cached) " >&6
11956 else
11957   ac_check_lib_save_LIBS=$LIBS
11958 LIBS="-lXinerama -lXext -lX11 $LIBS"
11959 cat >conftest.$ac_ext <<_ACEOF
11960 /* confdefs.h.  */
11961 _ACEOF
11962 cat confdefs.h >>conftest.$ac_ext
11963 cat >>conftest.$ac_ext <<_ACEOF
11964 /* end confdefs.h.  */
11965
11966 /* Override any GCC internal prototype to avoid an error.
11967    Use char because int might match the return type of a GCC
11968    builtin and then its argument prototype would still apply.  */
11969 #ifdef __cplusplus
11970 extern "C"
11971 #endif
11972 char XineramaQueryScreens ();
11973 int
11974 main ()
11975 {
11976 return XineramaQueryScreens ();
11977   ;
11978   return 0;
11979 }
11980 _ACEOF
11981 rm -rf conftest.$ac_objext conftest$ac_exeext
11982 if { (ac_try="$ac_link"
11983 case "(($ac_try" in
11984   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11985   *) ac_try_echo=$ac_try;;
11986 esac
11987 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
11988 $as_echo "$ac_try_echo") >&5
11989   (eval "$ac_link") 2>conftest.er1
11990   ac_status=$?
11991   grep -v '^ *+' conftest.er1 >conftest.err
11992   rm -rf conftest.er1
11993   cat conftest.err >&5
11994   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
11995   (exit $ac_status); } && {
11996          test -z "$ac_c_werror_flag" ||
11997          test ! -s conftest.err
11998        } && test -s conftest$ac_exeext && {
11999          test "$cross_compiling" = yes ||
12000          $as_test_x conftest$ac_exeext
12001        }; then
12002   ac_cv_lib_Xinerama_XineramaQueryScreens=yes
12003 else
12004   $as_echo "$as_me: failed program was:" >&5
12005 sed 's/^/| /' conftest.$ac_ext >&5
12006
12007         ac_cv_lib_Xinerama_XineramaQueryScreens=no
12008 fi
12009
12010 rm -rf conftest.dSYM
12011 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
12012       conftest$ac_exeext conftest.$ac_ext
12013 LIBS=$ac_check_lib_save_LIBS
12014 fi
12015 { $as_echo "$as_me:$LINENO: result: $ac_cv_lib_Xinerama_XineramaQueryScreens" >&5
12016 $as_echo "$ac_cv_lib_Xinerama_XineramaQueryScreens" >&6; }
12017 if test "x$ac_cv_lib_Xinerama_XineramaQueryScreens" = x""yes; then
12018   have_xinerama=yes; XINERAMA_LIBS="-lXinerama"
12019 else
12020   true
12021 fi
12022
12023   CPPFLAGS="$ac_save_CPPFLAGS"
12024   LDFLAGS="$ac_save_LDFLAGS"
12025 #  LIBS="$ac_save_LIBS"
12026
12027     fi
12028   fi
12029
12030   # if that succeeded, then we've really got it.
12031   if test "$have_xinerama" = yes; then
12032     cat >>confdefs.h <<\_ACEOF
12033 #define HAVE_XINERAMA 1
12034 _ACEOF
12035
12036   fi
12037
12038 elif test "$with_xinerama" != no; then
12039   echo "error: must be yes or no: --with-xinerama-ext=$with_xinerama"
12040   exit 1
12041 fi
12042
12043
12044 ###############################################################################
12045 #
12046 #       Check for the XF86VMODE server extension (for virtual screens.)
12047 #
12048 ###############################################################################
12049
12050 have_xf86vmode=no
12051 with_xf86vmode_req=unspecified
12052
12053 # Check whether --with-xf86vmode-ext was given.
12054 if test "${with_xf86vmode_ext+set}" = set; then
12055   withval=$with_xf86vmode_ext; with_xf86vmode="$withval"; with_xf86vmode_req="$withval"
12056 else
12057   with_xf86vmode=yes
12058 fi
12059
12060
12061
12062    case "$with_xf86vmode" in
12063     yes) ;;
12064     no)  ;;
12065
12066     /*)
12067      { $as_echo "$as_me:$LINENO: checking for xf86vmode headers" >&5
12068 $as_echo_n "checking for xf86vmode headers... " >&6; }
12069      d=$with_xf86vmode/include
12070      if test -d $d; then
12071        X_CFLAGS="-I$d $X_CFLAGS"
12072        { $as_echo "$as_me:$LINENO: result: $d" >&5
12073 $as_echo "$d" >&6; }
12074      else
12075        { $as_echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
12076 $as_echo "not found ($d: no such directory)" >&6; }
12077      fi
12078
12079      { $as_echo "$as_me:$LINENO: checking for xf86vmode libs" >&5
12080 $as_echo_n "checking for xf86vmode libs... " >&6; }
12081      d=$with_xf86vmode/lib
12082      if test -d $d; then
12083        X_LIBS="-L$d $X_LIBS"
12084        { $as_echo "$as_me:$LINENO: result: $d" >&5
12085 $as_echo "$d" >&6; }
12086      else
12087        { $as_echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
12088 $as_echo "not found ($d: no such directory)" >&6; }
12089      fi
12090
12091      # replace the directory string with "yes".
12092      with_xf86vmode_req="yes"
12093      with_xf86vmode=$with_xf86vmode_req
12094      ;;
12095
12096     *)
12097      echo ""
12098      echo "error: argument to --with-xf86vmode-ext must be \"yes\", \"no\", or a directory."
12099      echo "       If it is a directory, then \`DIR/include' will be added to"
12100      echo "       the -I list, and \`DIR/lib' will be added to the -L list."
12101      exit 1
12102      ;;
12103    esac
12104
12105
12106 VIDMODE_LIBS=""
12107
12108 if test "$with_xf86vmode" = yes; then
12109
12110   # first check for xf86vmode.h
12111
12112   ac_save_CPPFLAGS="$CPPFLAGS"
12113   if test \! -z "$includedir" ; then
12114     CPPFLAGS="$CPPFLAGS -I$includedir"
12115   fi
12116   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
12117   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
12118   { $as_echo "$as_me:$LINENO: checking for X11/extensions/xf86vmode.h" >&5
12119 $as_echo_n "checking for X11/extensions/xf86vmode.h... " >&6; }
12120 if test "${ac_cv_header_X11_extensions_xf86vmode_h+set}" = set; then
12121   $as_echo_n "(cached) " >&6
12122 else
12123   cat >conftest.$ac_ext <<_ACEOF
12124 /* confdefs.h.  */
12125 _ACEOF
12126 cat confdefs.h >>conftest.$ac_ext
12127 cat >>conftest.$ac_ext <<_ACEOF
12128 /* end confdefs.h.  */
12129 #include <X11/Xlib.h>
12130
12131 #include <X11/extensions/xf86vmode.h>
12132 _ACEOF
12133 rm -rf conftest.$ac_objext
12134 if { (ac_try="$ac_compile"
12135 case "(($ac_try" in
12136   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12137   *) ac_try_echo=$ac_try;;
12138 esac
12139 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
12140 $as_echo "$ac_try_echo") >&5
12141   (eval "$ac_compile") 2>conftest.er1
12142   ac_status=$?
12143   grep -v '^ *+' conftest.er1 >conftest.err
12144   rm -rf conftest.er1
12145   cat conftest.err >&5
12146   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
12147   (exit $ac_status); } && {
12148          test -z "$ac_c_werror_flag" ||
12149          test ! -s conftest.err
12150        } && test -s conftest.$ac_objext; then
12151   ac_cv_header_X11_extensions_xf86vmode_h=yes
12152 else
12153   $as_echo "$as_me: failed program was:" >&5
12154 sed 's/^/| /' conftest.$ac_ext >&5
12155
12156         ac_cv_header_X11_extensions_xf86vmode_h=no
12157 fi
12158
12159 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12160 fi
12161 { $as_echo "$as_me:$LINENO: result: $ac_cv_header_X11_extensions_xf86vmode_h" >&5
12162 $as_echo "$ac_cv_header_X11_extensions_xf86vmode_h" >&6; }
12163 if test "x$ac_cv_header_X11_extensions_xf86vmode_h" = x""yes; then
12164   have_xf86vmode=yes
12165 fi
12166
12167
12168   CPPFLAGS="$ac_save_CPPFLAGS"
12169
12170   # if that succeeded, then check for the -lXxf86vm
12171   if test "$have_xf86vmode" = yes; then
12172     have_xf86vmode=no
12173
12174   ac_save_CPPFLAGS="$CPPFLAGS"
12175   ac_save_LDFLAGS="$LDFLAGS"
12176 #  ac_save_LIBS="$LIBS"
12177
12178   if test \! -z "$includedir" ; then
12179     CPPFLAGS="$CPPFLAGS -I$includedir"
12180   fi
12181   # note: $X_CFLAGS includes $x_includes
12182   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
12183
12184   if test \! -z "$libdir" ; then
12185     LDFLAGS="$LDFLAGS -L$libdir"
12186   fi
12187   # note: $X_LIBS includes $x_libraries
12188   LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
12189
12190   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
12191   LDFLAGS=`eval eval eval eval eval eval eval eval eval echo $LDFLAGS`
12192   { $as_echo "$as_me:$LINENO: checking for XF86VidModeGetViewPort in -lXxf86vm" >&5
12193 $as_echo_n "checking for XF86VidModeGetViewPort in -lXxf86vm... " >&6; }
12194 if test "${ac_cv_lib_Xxf86vm_XF86VidModeGetViewPort+set}" = set; then
12195   $as_echo_n "(cached) " >&6
12196 else
12197   ac_check_lib_save_LIBS=$LIBS
12198 LIBS="-lXxf86vm -lXext -lX11 $LIBS"
12199 cat >conftest.$ac_ext <<_ACEOF
12200 /* confdefs.h.  */
12201 _ACEOF
12202 cat confdefs.h >>conftest.$ac_ext
12203 cat >>conftest.$ac_ext <<_ACEOF
12204 /* end confdefs.h.  */
12205
12206 /* Override any GCC internal prototype to avoid an error.
12207    Use char because int might match the return type of a GCC
12208    builtin and then its argument prototype would still apply.  */
12209 #ifdef __cplusplus
12210 extern "C"
12211 #endif
12212 char XF86VidModeGetViewPort ();
12213 int
12214 main ()
12215 {
12216 return XF86VidModeGetViewPort ();
12217   ;
12218   return 0;
12219 }
12220 _ACEOF
12221 rm -rf conftest.$ac_objext conftest$ac_exeext
12222 if { (ac_try="$ac_link"
12223 case "(($ac_try" in
12224   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12225   *) ac_try_echo=$ac_try;;
12226 esac
12227 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
12228 $as_echo "$ac_try_echo") >&5
12229   (eval "$ac_link") 2>conftest.er1
12230   ac_status=$?
12231   grep -v '^ *+' conftest.er1 >conftest.err
12232   rm -rf conftest.er1
12233   cat conftest.err >&5
12234   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
12235   (exit $ac_status); } && {
12236          test -z "$ac_c_werror_flag" ||
12237          test ! -s conftest.err
12238        } && test -s conftest$ac_exeext && {
12239          test "$cross_compiling" = yes ||
12240          $as_test_x conftest$ac_exeext
12241        }; then
12242   ac_cv_lib_Xxf86vm_XF86VidModeGetViewPort=yes
12243 else
12244   $as_echo "$as_me: failed program was:" >&5
12245 sed 's/^/| /' conftest.$ac_ext >&5
12246
12247         ac_cv_lib_Xxf86vm_XF86VidModeGetViewPort=no
12248 fi
12249
12250 rm -rf conftest.dSYM
12251 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
12252       conftest$ac_exeext conftest.$ac_ext
12253 LIBS=$ac_check_lib_save_LIBS
12254 fi
12255 { $as_echo "$as_me:$LINENO: result: $ac_cv_lib_Xxf86vm_XF86VidModeGetViewPort" >&5
12256 $as_echo "$ac_cv_lib_Xxf86vm_XF86VidModeGetViewPort" >&6; }
12257 if test "x$ac_cv_lib_Xxf86vm_XF86VidModeGetViewPort" = x""yes; then
12258   have_xf86vmode=yes;
12259                    VIDMODE_LIBS="-lXxf86vm";
12260                    SAVER_LIBS="$SAVER_LIBS $VIDMODE_LIBS"
12261 else
12262   true
12263 fi
12264
12265   CPPFLAGS="$ac_save_CPPFLAGS"
12266   LDFLAGS="$ac_save_LDFLAGS"
12267 #  LIBS="$ac_save_LIBS"
12268
12269   fi
12270
12271   # if that succeeded, then we've really got it.
12272   if test "$have_xf86vmode" = yes; then
12273     cat >>confdefs.h <<\_ACEOF
12274 #define HAVE_XF86VMODE 1
12275 _ACEOF
12276
12277   fi
12278
12279 elif test "$with_xf86vmode" != no; then
12280   echo "error: must be yes or no: --with-xf86vmode-ext=$with_xf86vmode"
12281   exit 1
12282 fi
12283
12284
12285 ###############################################################################
12286 #
12287 #       Check for the XF86VMODE server extension (for gamma fading.)
12288 #
12289 ###############################################################################
12290
12291 have_xf86gamma=no
12292 have_xf86gamma_ramp=no
12293 with_xf86gamma_req=unspecified
12294
12295 # Check whether --with-xf86gamma-ext was given.
12296 if test "${with_xf86gamma_ext+set}" = set; then
12297   withval=$with_xf86gamma_ext; with_xf86gamma="$withval"; with_xf86gamma_req="$withval"
12298 else
12299   with_xf86gamma=yes
12300 fi
12301
12302
12303
12304    case "$with_xf86gamma" in
12305     yes) ;;
12306     no)  ;;
12307
12308     /*)
12309      { $as_echo "$as_me:$LINENO: checking for xf86gamma headers" >&5
12310 $as_echo_n "checking for xf86gamma headers... " >&6; }
12311      d=$with_xf86gamma/include
12312      if test -d $d; then
12313        X_CFLAGS="-I$d $X_CFLAGS"
12314        { $as_echo "$as_me:$LINENO: result: $d" >&5
12315 $as_echo "$d" >&6; }
12316      else
12317        { $as_echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
12318 $as_echo "not found ($d: no such directory)" >&6; }
12319      fi
12320
12321      { $as_echo "$as_me:$LINENO: checking for xf86gamma libs" >&5
12322 $as_echo_n "checking for xf86gamma libs... " >&6; }
12323      d=$with_xf86gamma/lib
12324      if test -d $d; then
12325        X_LIBS="-L$d $X_LIBS"
12326        { $as_echo "$as_me:$LINENO: result: $d" >&5
12327 $as_echo "$d" >&6; }
12328      else
12329        { $as_echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
12330 $as_echo "not found ($d: no such directory)" >&6; }
12331      fi
12332
12333      # replace the directory string with "yes".
12334      with_xf86gamma_req="yes"
12335      with_xf86gamma=$with_xf86gamma_req
12336      ;;
12337
12338     *)
12339      echo ""
12340      echo "error: argument to --with-xf86gamma-ext must be \"yes\", \"no\", or a directory."
12341      echo "       If it is a directory, then \`DIR/include' will be added to"
12342      echo "       the -I list, and \`DIR/lib' will be added to the -L list."
12343      exit 1
12344      ;;
12345    esac
12346
12347
12348 if test "$with_xf86gamma" = yes; then
12349
12350   # first check for xf86vmode.h, if we haven't already
12351   if test "$have_xf86vmode" = yes; then
12352     have_xf86gamma=yes
12353   else
12354
12355   ac_save_CPPFLAGS="$CPPFLAGS"
12356   if test \! -z "$includedir" ; then
12357     CPPFLAGS="$CPPFLAGS -I$includedir"
12358   fi
12359   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
12360   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
12361   { $as_echo "$as_me:$LINENO: checking for X11/extensions/xf86vmode.h" >&5
12362 $as_echo_n "checking for X11/extensions/xf86vmode.h... " >&6; }
12363 if test "${ac_cv_header_X11_extensions_xf86vmode_h+set}" = set; then
12364   $as_echo_n "(cached) " >&6
12365 else
12366   cat >conftest.$ac_ext <<_ACEOF
12367 /* confdefs.h.  */
12368 _ACEOF
12369 cat confdefs.h >>conftest.$ac_ext
12370 cat >>conftest.$ac_ext <<_ACEOF
12371 /* end confdefs.h.  */
12372 #include <X11/Xlib.h>
12373
12374 #include <X11/extensions/xf86vmode.h>
12375 _ACEOF
12376 rm -rf conftest.$ac_objext
12377 if { (ac_try="$ac_compile"
12378 case "(($ac_try" in
12379   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12380   *) ac_try_echo=$ac_try;;
12381 esac
12382 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
12383 $as_echo "$ac_try_echo") >&5
12384   (eval "$ac_compile") 2>conftest.er1
12385   ac_status=$?
12386   grep -v '^ *+' conftest.er1 >conftest.err
12387   rm -rf conftest.er1
12388   cat conftest.err >&5
12389   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
12390   (exit $ac_status); } && {
12391          test -z "$ac_c_werror_flag" ||
12392          test ! -s conftest.err
12393        } && test -s conftest.$ac_objext; then
12394   ac_cv_header_X11_extensions_xf86vmode_h=yes
12395 else
12396   $as_echo "$as_me: failed program was:" >&5
12397 sed 's/^/| /' conftest.$ac_ext >&5
12398
12399         ac_cv_header_X11_extensions_xf86vmode_h=no
12400 fi
12401
12402 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12403 fi
12404 { $as_echo "$as_me:$LINENO: result: $ac_cv_header_X11_extensions_xf86vmode_h" >&5
12405 $as_echo "$ac_cv_header_X11_extensions_xf86vmode_h" >&6; }
12406 if test "x$ac_cv_header_X11_extensions_xf86vmode_h" = x""yes; then
12407   have_xf86gamma=yes
12408 fi
12409
12410
12411   CPPFLAGS="$ac_save_CPPFLAGS"
12412   fi
12413
12414   # if that succeeded, then check for the -lXxf86vm
12415   if test "$have_xf86gamma" = yes; then
12416     have_xf86gamma=no
12417
12418   ac_save_CPPFLAGS="$CPPFLAGS"
12419   ac_save_LDFLAGS="$LDFLAGS"
12420 #  ac_save_LIBS="$LIBS"
12421
12422   if test \! -z "$includedir" ; then
12423     CPPFLAGS="$CPPFLAGS -I$includedir"
12424   fi
12425   # note: $X_CFLAGS includes $x_includes
12426   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
12427
12428   if test \! -z "$libdir" ; then
12429     LDFLAGS="$LDFLAGS -L$libdir"
12430   fi
12431   # note: $X_LIBS includes $x_libraries
12432   LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
12433
12434   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
12435   LDFLAGS=`eval eval eval eval eval eval eval eval eval echo $LDFLAGS`
12436   { $as_echo "$as_me:$LINENO: checking for XF86VidModeSetGamma in -lXxf86vm" >&5
12437 $as_echo_n "checking for XF86VidModeSetGamma in -lXxf86vm... " >&6; }
12438 if test "${ac_cv_lib_Xxf86vm_XF86VidModeSetGamma+set}" = set; then
12439   $as_echo_n "(cached) " >&6
12440 else
12441   ac_check_lib_save_LIBS=$LIBS
12442 LIBS="-lXxf86vm -lXext -lX11 $LIBS"
12443 cat >conftest.$ac_ext <<_ACEOF
12444 /* confdefs.h.  */
12445 _ACEOF
12446 cat confdefs.h >>conftest.$ac_ext
12447 cat >>conftest.$ac_ext <<_ACEOF
12448 /* end confdefs.h.  */
12449
12450 /* Override any GCC internal prototype to avoid an error.
12451    Use char because int might match the return type of a GCC
12452    builtin and then its argument prototype would still apply.  */
12453 #ifdef __cplusplus
12454 extern "C"
12455 #endif
12456 char XF86VidModeSetGamma ();
12457 int
12458 main ()
12459 {
12460 return XF86VidModeSetGamma ();
12461   ;
12462   return 0;
12463 }
12464 _ACEOF
12465 rm -rf conftest.$ac_objext conftest$ac_exeext
12466 if { (ac_try="$ac_link"
12467 case "(($ac_try" in
12468   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12469   *) ac_try_echo=$ac_try;;
12470 esac
12471 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
12472 $as_echo "$ac_try_echo") >&5
12473   (eval "$ac_link") 2>conftest.er1
12474   ac_status=$?
12475   grep -v '^ *+' conftest.er1 >conftest.err
12476   rm -rf conftest.er1
12477   cat conftest.err >&5
12478   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
12479   (exit $ac_status); } && {
12480          test -z "$ac_c_werror_flag" ||
12481          test ! -s conftest.err
12482        } && test -s conftest$ac_exeext && {
12483          test "$cross_compiling" = yes ||
12484          $as_test_x conftest$ac_exeext
12485        }; then
12486   ac_cv_lib_Xxf86vm_XF86VidModeSetGamma=yes
12487 else
12488   $as_echo "$as_me: failed program was:" >&5
12489 sed 's/^/| /' conftest.$ac_ext >&5
12490
12491         ac_cv_lib_Xxf86vm_XF86VidModeSetGamma=no
12492 fi
12493
12494 rm -rf conftest.dSYM
12495 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
12496       conftest$ac_exeext conftest.$ac_ext
12497 LIBS=$ac_check_lib_save_LIBS
12498 fi
12499 { $as_echo "$as_me:$LINENO: result: $ac_cv_lib_Xxf86vm_XF86VidModeSetGamma" >&5
12500 $as_echo "$ac_cv_lib_Xxf86vm_XF86VidModeSetGamma" >&6; }
12501 if test "x$ac_cv_lib_Xxf86vm_XF86VidModeSetGamma" = x""yes; then
12502   have_xf86gamma=yes
12503 else
12504   true
12505 fi
12506
12507   CPPFLAGS="$ac_save_CPPFLAGS"
12508   LDFLAGS="$ac_save_LDFLAGS"
12509 #  LIBS="$ac_save_LIBS"
12510
12511   fi
12512
12513   # check for the Ramp versions of the functions too.
12514   if test "$have_xf86gamma" = yes; then
12515     have_xf86gamma_ramp=no
12516
12517   ac_save_CPPFLAGS="$CPPFLAGS"
12518   ac_save_LDFLAGS="$LDFLAGS"
12519 #  ac_save_LIBS="$LIBS"
12520
12521   if test \! -z "$includedir" ; then
12522     CPPFLAGS="$CPPFLAGS -I$includedir"
12523   fi
12524   # note: $X_CFLAGS includes $x_includes
12525   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
12526
12527   if test \! -z "$libdir" ; then
12528     LDFLAGS="$LDFLAGS -L$libdir"
12529   fi
12530   # note: $X_LIBS includes $x_libraries
12531   LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
12532
12533   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
12534   LDFLAGS=`eval eval eval eval eval eval eval eval eval echo $LDFLAGS`
12535   { $as_echo "$as_me:$LINENO: checking for XF86VidModeSetGammaRamp in -lXxf86vm" >&5
12536 $as_echo_n "checking for XF86VidModeSetGammaRamp in -lXxf86vm... " >&6; }
12537 if test "${ac_cv_lib_Xxf86vm_XF86VidModeSetGammaRamp+set}" = set; then
12538   $as_echo_n "(cached) " >&6
12539 else
12540   ac_check_lib_save_LIBS=$LIBS
12541 LIBS="-lXxf86vm -lXext -lX11 $LIBS"
12542 cat >conftest.$ac_ext <<_ACEOF
12543 /* confdefs.h.  */
12544 _ACEOF
12545 cat confdefs.h >>conftest.$ac_ext
12546 cat >>conftest.$ac_ext <<_ACEOF
12547 /* end confdefs.h.  */
12548
12549 /* Override any GCC internal prototype to avoid an error.
12550    Use char because int might match the return type of a GCC
12551    builtin and then its argument prototype would still apply.  */
12552 #ifdef __cplusplus
12553 extern "C"
12554 #endif
12555 char XF86VidModeSetGammaRamp ();
12556 int
12557 main ()
12558 {
12559 return XF86VidModeSetGammaRamp ();
12560   ;
12561   return 0;
12562 }
12563 _ACEOF
12564 rm -rf conftest.$ac_objext conftest$ac_exeext
12565 if { (ac_try="$ac_link"
12566 case "(($ac_try" in
12567   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12568   *) ac_try_echo=$ac_try;;
12569 esac
12570 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
12571 $as_echo "$ac_try_echo") >&5
12572   (eval "$ac_link") 2>conftest.er1
12573   ac_status=$?
12574   grep -v '^ *+' conftest.er1 >conftest.err
12575   rm -rf conftest.er1
12576   cat conftest.err >&5
12577   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
12578   (exit $ac_status); } && {
12579          test -z "$ac_c_werror_flag" ||
12580          test ! -s conftest.err
12581        } && test -s conftest$ac_exeext && {
12582          test "$cross_compiling" = yes ||
12583          $as_test_x conftest$ac_exeext
12584        }; then
12585   ac_cv_lib_Xxf86vm_XF86VidModeSetGammaRamp=yes
12586 else
12587   $as_echo "$as_me: failed program was:" >&5
12588 sed 's/^/| /' conftest.$ac_ext >&5
12589
12590         ac_cv_lib_Xxf86vm_XF86VidModeSetGammaRamp=no
12591 fi
12592
12593 rm -rf conftest.dSYM
12594 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
12595       conftest$ac_exeext conftest.$ac_ext
12596 LIBS=$ac_check_lib_save_LIBS
12597 fi
12598 { $as_echo "$as_me:$LINENO: result: $ac_cv_lib_Xxf86vm_XF86VidModeSetGammaRamp" >&5
12599 $as_echo "$ac_cv_lib_Xxf86vm_XF86VidModeSetGammaRamp" >&6; }
12600 if test "x$ac_cv_lib_Xxf86vm_XF86VidModeSetGammaRamp" = x""yes; then
12601   have_xf86gamma_ramp=yes
12602 else
12603   true
12604 fi
12605
12606   CPPFLAGS="$ac_save_CPPFLAGS"
12607   LDFLAGS="$ac_save_LDFLAGS"
12608 #  LIBS="$ac_save_LIBS"
12609
12610   fi
12611
12612   # if those tests succeeded, then we've really got the functions.
12613   if test "$have_xf86gamma" = yes; then
12614     cat >>confdefs.h <<\_ACEOF
12615 #define HAVE_XF86VMODE_GAMMA 1
12616 _ACEOF
12617
12618   fi
12619
12620   if test "$have_xf86gamma_ramp" = yes; then
12621     cat >>confdefs.h <<\_ACEOF
12622 #define HAVE_XF86VMODE_GAMMA_RAMP 1
12623 _ACEOF
12624
12625   fi
12626
12627   # pull in the lib, if we haven't already
12628   if test "$have_xf86gamma" = yes -a "$have_xf86vmode" = no; then
12629     SAVER_LIBS="$SAVER_LIBS -lXxf86vm"
12630   fi
12631
12632 elif test "$with_xf86gamma" != no; then
12633   echo "error: must be yes or no: --with-xf86gamma-ext=$with_xf86vmode"
12634   exit 1
12635 fi
12636
12637
12638 ###############################################################################
12639 #
12640 #       Check for the RANDR (Resize and Rotate) server extension.
12641 #
12642 #       We need this to detect when the resolution of the desktop
12643 #       has changed out from under us (this is a newer, different
12644 #       mechanism than the XF86VMODE virtual viewports.)
12645 #
12646 ###############################################################################
12647
12648 have_randr=no
12649 with_randr_req=unspecified
12650
12651 # Check whether --with-randr-ext was given.
12652 if test "${with_randr_ext+set}" = set; then
12653   withval=$with_randr_ext; with_randr="$withval"; with_randr_req="$withval"
12654 else
12655   with_randr=yes
12656 fi
12657
12658
12659
12660    case "$with_randr" in
12661     yes) ;;
12662     no)  ;;
12663
12664     /*)
12665      { $as_echo "$as_me:$LINENO: checking for RANDR headers" >&5
12666 $as_echo_n "checking for RANDR headers... " >&6; }
12667      d=$with_randr/include
12668      if test -d $d; then
12669        X_CFLAGS="-I$d $X_CFLAGS"
12670        { $as_echo "$as_me:$LINENO: result: $d" >&5
12671 $as_echo "$d" >&6; }
12672      else
12673        { $as_echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
12674 $as_echo "not found ($d: no such directory)" >&6; }
12675      fi
12676
12677      { $as_echo "$as_me:$LINENO: checking for RANDR libs" >&5
12678 $as_echo_n "checking for RANDR libs... " >&6; }
12679      d=$with_randr/lib
12680      if test -d $d; then
12681        X_LIBS="-L$d $X_LIBS"
12682        { $as_echo "$as_me:$LINENO: result: $d" >&5
12683 $as_echo "$d" >&6; }
12684      else
12685        { $as_echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
12686 $as_echo "not found ($d: no such directory)" >&6; }
12687      fi
12688
12689      # replace the directory string with "yes".
12690      with_randr_req="yes"
12691      with_randr=$with_randr_req
12692      ;;
12693
12694     *)
12695      echo ""
12696      echo "error: argument to --with-randr-ext must be \"yes\", \"no\", or a directory."
12697      echo "       If it is a directory, then \`DIR/include' will be added to"
12698      echo "       the -I list, and \`DIR/lib' will be added to the -L list."
12699      exit 1
12700      ;;
12701    esac
12702
12703
12704 if test "$with_randr" = yes; then
12705
12706   # first check for Xrandr.h
12707
12708   ac_save_CPPFLAGS="$CPPFLAGS"
12709   if test \! -z "$includedir" ; then
12710     CPPFLAGS="$CPPFLAGS -I$includedir"
12711   fi
12712   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
12713   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
12714   { $as_echo "$as_me:$LINENO: checking for X11/extensions/Xrandr.h" >&5
12715 $as_echo_n "checking for X11/extensions/Xrandr.h... " >&6; }
12716 if test "${ac_cv_header_X11_extensions_Xrandr_h+set}" = set; then
12717   $as_echo_n "(cached) " >&6
12718 else
12719   cat >conftest.$ac_ext <<_ACEOF
12720 /* confdefs.h.  */
12721 _ACEOF
12722 cat confdefs.h >>conftest.$ac_ext
12723 cat >>conftest.$ac_ext <<_ACEOF
12724 /* end confdefs.h.  */
12725 #include <X11/Xlib.h>
12726
12727 #include <X11/extensions/Xrandr.h>
12728 _ACEOF
12729 rm -rf conftest.$ac_objext
12730 if { (ac_try="$ac_compile"
12731 case "(($ac_try" in
12732   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12733   *) ac_try_echo=$ac_try;;
12734 esac
12735 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
12736 $as_echo "$ac_try_echo") >&5
12737   (eval "$ac_compile") 2>conftest.er1
12738   ac_status=$?
12739   grep -v '^ *+' conftest.er1 >conftest.err
12740   rm -rf conftest.er1
12741   cat conftest.err >&5
12742   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
12743   (exit $ac_status); } && {
12744          test -z "$ac_c_werror_flag" ||
12745          test ! -s conftest.err
12746        } && test -s conftest.$ac_objext; then
12747   ac_cv_header_X11_extensions_Xrandr_h=yes
12748 else
12749   $as_echo "$as_me: failed program was:" >&5
12750 sed 's/^/| /' conftest.$ac_ext >&5
12751
12752         ac_cv_header_X11_extensions_Xrandr_h=no
12753 fi
12754
12755 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12756 fi
12757 { $as_echo "$as_me:$LINENO: result: $ac_cv_header_X11_extensions_Xrandr_h" >&5
12758 $as_echo "$ac_cv_header_X11_extensions_Xrandr_h" >&6; }
12759 if test "x$ac_cv_header_X11_extensions_Xrandr_h" = x""yes; then
12760   have_randr=yes
12761 fi
12762
12763
12764   CPPFLAGS="$ac_save_CPPFLAGS"
12765
12766   # if that succeeded, then check for the XRR code in the libraries
12767   if test "$have_randr" = yes; then
12768
12769     # RANDR probably needs -lXrender
12770     xrender_libs=
12771
12772   ac_save_CPPFLAGS="$CPPFLAGS"
12773   ac_save_LDFLAGS="$LDFLAGS"
12774 #  ac_save_LIBS="$LIBS"
12775
12776   if test \! -z "$includedir" ; then
12777     CPPFLAGS="$CPPFLAGS -I$includedir"
12778   fi
12779   # note: $X_CFLAGS includes $x_includes
12780   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
12781
12782   if test \! -z "$libdir" ; then
12783     LDFLAGS="$LDFLAGS -L$libdir"
12784   fi
12785   # note: $X_LIBS includes $x_libraries
12786   LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
12787
12788   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
12789   LDFLAGS=`eval eval eval eval eval eval eval eval eval echo $LDFLAGS`
12790   { $as_echo "$as_me:$LINENO: checking for XRenderSetSubpixelOrder in -lXrender" >&5
12791 $as_echo_n "checking for XRenderSetSubpixelOrder in -lXrender... " >&6; }
12792 if test "${ac_cv_lib_Xrender_XRenderSetSubpixelOrder+set}" = set; then
12793   $as_echo_n "(cached) " >&6
12794 else
12795   ac_check_lib_save_LIBS=$LIBS
12796 LIBS="-lXrender -lXext -lX11 $LIBS"
12797 cat >conftest.$ac_ext <<_ACEOF
12798 /* confdefs.h.  */
12799 _ACEOF
12800 cat confdefs.h >>conftest.$ac_ext
12801 cat >>conftest.$ac_ext <<_ACEOF
12802 /* end confdefs.h.  */
12803
12804 /* Override any GCC internal prototype to avoid an error.
12805    Use char because int might match the return type of a GCC
12806    builtin and then its argument prototype would still apply.  */
12807 #ifdef __cplusplus
12808 extern "C"
12809 #endif
12810 char XRenderSetSubpixelOrder ();
12811 int
12812 main ()
12813 {
12814 return XRenderSetSubpixelOrder ();
12815   ;
12816   return 0;
12817 }
12818 _ACEOF
12819 rm -rf conftest.$ac_objext conftest$ac_exeext
12820 if { (ac_try="$ac_link"
12821 case "(($ac_try" in
12822   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12823   *) ac_try_echo=$ac_try;;
12824 esac
12825 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
12826 $as_echo "$ac_try_echo") >&5
12827   (eval "$ac_link") 2>conftest.er1
12828   ac_status=$?
12829   grep -v '^ *+' conftest.er1 >conftest.err
12830   rm -rf conftest.er1
12831   cat conftest.err >&5
12832   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
12833   (exit $ac_status); } && {
12834          test -z "$ac_c_werror_flag" ||
12835          test ! -s conftest.err
12836        } && test -s conftest$ac_exeext && {
12837          test "$cross_compiling" = yes ||
12838          $as_test_x conftest$ac_exeext
12839        }; then
12840   ac_cv_lib_Xrender_XRenderSetSubpixelOrder=yes
12841 else
12842   $as_echo "$as_me: failed program was:" >&5
12843 sed 's/^/| /' conftest.$ac_ext >&5
12844
12845         ac_cv_lib_Xrender_XRenderSetSubpixelOrder=no
12846 fi
12847
12848 rm -rf conftest.dSYM
12849 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
12850       conftest$ac_exeext conftest.$ac_ext
12851 LIBS=$ac_check_lib_save_LIBS
12852 fi
12853 { $as_echo "$as_me:$LINENO: result: $ac_cv_lib_Xrender_XRenderSetSubpixelOrder" >&5
12854 $as_echo "$ac_cv_lib_Xrender_XRenderSetSubpixelOrder" >&6; }
12855 if test "x$ac_cv_lib_Xrender_XRenderSetSubpixelOrder" = x""yes; then
12856   xrender_libs="-lXrender"
12857 else
12858   true
12859 fi
12860
12861   CPPFLAGS="$ac_save_CPPFLAGS"
12862   LDFLAGS="$ac_save_LDFLAGS"
12863 #  LIBS="$ac_save_LIBS"
12864
12865
12866     # first look for RANDR in -lXext
12867     have_randr=no
12868
12869   ac_save_CPPFLAGS="$CPPFLAGS"
12870   ac_save_LDFLAGS="$LDFLAGS"
12871 #  ac_save_LIBS="$LIBS"
12872
12873   if test \! -z "$includedir" ; then
12874     CPPFLAGS="$CPPFLAGS -I$includedir"
12875   fi
12876   # note: $X_CFLAGS includes $x_includes
12877   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
12878
12879   if test \! -z "$libdir" ; then
12880     LDFLAGS="$LDFLAGS -L$libdir"
12881   fi
12882   # note: $X_LIBS includes $x_libraries
12883   LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
12884
12885   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
12886   LDFLAGS=`eval eval eval eval eval eval eval eval eval echo $LDFLAGS`
12887   { $as_echo "$as_me:$LINENO: checking for XRRGetScreenInfo in -lXext" >&5
12888 $as_echo_n "checking for XRRGetScreenInfo in -lXext... " >&6; }
12889 if test "${ac_cv_lib_Xext_XRRGetScreenInfo+set}" = set; then
12890   $as_echo_n "(cached) " >&6
12891 else
12892   ac_check_lib_save_LIBS=$LIBS
12893 LIBS="-lXext $xrender_libs -lXext -lX11 $LIBS"
12894 cat >conftest.$ac_ext <<_ACEOF
12895 /* confdefs.h.  */
12896 _ACEOF
12897 cat confdefs.h >>conftest.$ac_ext
12898 cat >>conftest.$ac_ext <<_ACEOF
12899 /* end confdefs.h.  */
12900
12901 /* Override any GCC internal prototype to avoid an error.
12902    Use char because int might match the return type of a GCC
12903    builtin and then its argument prototype would still apply.  */
12904 #ifdef __cplusplus
12905 extern "C"
12906 #endif
12907 char XRRGetScreenInfo ();
12908 int
12909 main ()
12910 {
12911 return XRRGetScreenInfo ();
12912   ;
12913   return 0;
12914 }
12915 _ACEOF
12916 rm -rf conftest.$ac_objext conftest$ac_exeext
12917 if { (ac_try="$ac_link"
12918 case "(($ac_try" in
12919   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12920   *) ac_try_echo=$ac_try;;
12921 esac
12922 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
12923 $as_echo "$ac_try_echo") >&5
12924   (eval "$ac_link") 2>conftest.er1
12925   ac_status=$?
12926   grep -v '^ *+' conftest.er1 >conftest.err
12927   rm -rf conftest.er1
12928   cat conftest.err >&5
12929   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
12930   (exit $ac_status); } && {
12931          test -z "$ac_c_werror_flag" ||
12932          test ! -s conftest.err
12933        } && test -s conftest$ac_exeext && {
12934          test "$cross_compiling" = yes ||
12935          $as_test_x conftest$ac_exeext
12936        }; then
12937   ac_cv_lib_Xext_XRRGetScreenInfo=yes
12938 else
12939   $as_echo "$as_me: failed program was:" >&5
12940 sed 's/^/| /' conftest.$ac_ext >&5
12941
12942         ac_cv_lib_Xext_XRRGetScreenInfo=no
12943 fi
12944
12945 rm -rf conftest.dSYM
12946 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
12947       conftest$ac_exeext conftest.$ac_ext
12948 LIBS=$ac_check_lib_save_LIBS
12949 fi
12950 { $as_echo "$as_me:$LINENO: result: $ac_cv_lib_Xext_XRRGetScreenInfo" >&5
12951 $as_echo "$ac_cv_lib_Xext_XRRGetScreenInfo" >&6; }
12952 if test "x$ac_cv_lib_Xext_XRRGetScreenInfo" = x""yes; then
12953   have_randr=yes; SAVER_LIBS="$SAVER_LIBS $xrender_libs"
12954 else
12955   true
12956 fi
12957
12958   CPPFLAGS="$ac_save_CPPFLAGS"
12959   LDFLAGS="$ac_save_LDFLAGS"
12960 #  LIBS="$ac_save_LIBS"
12961
12962
12963     # if that failed, look in -lXrandr
12964     if test "$have_randr" = no; then
12965
12966   ac_save_CPPFLAGS="$CPPFLAGS"
12967   ac_save_LDFLAGS="$LDFLAGS"
12968 #  ac_save_LIBS="$LIBS"
12969
12970   if test \! -z "$includedir" ; then
12971     CPPFLAGS="$CPPFLAGS -I$includedir"
12972   fi
12973   # note: $X_CFLAGS includes $x_includes
12974   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
12975
12976   if test \! -z "$libdir" ; then
12977     LDFLAGS="$LDFLAGS -L$libdir"
12978   fi
12979   # note: $X_LIBS includes $x_libraries
12980   LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
12981
12982   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
12983   LDFLAGS=`eval eval eval eval eval eval eval eval eval echo $LDFLAGS`
12984   { $as_echo "$as_me:$LINENO: checking for XRRGetScreenInfo in -lXrandr" >&5
12985 $as_echo_n "checking for XRRGetScreenInfo in -lXrandr... " >&6; }
12986 if test "${ac_cv_lib_Xrandr_XRRGetScreenInfo+set}" = set; then
12987   $as_echo_n "(cached) " >&6
12988 else
12989   ac_check_lib_save_LIBS=$LIBS
12990 LIBS="-lXrandr $xrender_libs -lXext -lX11 $LIBS"
12991 cat >conftest.$ac_ext <<_ACEOF
12992 /* confdefs.h.  */
12993 _ACEOF
12994 cat confdefs.h >>conftest.$ac_ext
12995 cat >>conftest.$ac_ext <<_ACEOF
12996 /* end confdefs.h.  */
12997
12998 /* Override any GCC internal prototype to avoid an error.
12999    Use char because int might match the return type of a GCC
13000    builtin and then its argument prototype would still apply.  */
13001 #ifdef __cplusplus
13002 extern "C"
13003 #endif
13004 char XRRGetScreenInfo ();
13005 int
13006 main ()
13007 {
13008 return XRRGetScreenInfo ();
13009   ;
13010   return 0;
13011 }
13012 _ACEOF
13013 rm -rf conftest.$ac_objext conftest$ac_exeext
13014 if { (ac_try="$ac_link"
13015 case "(($ac_try" in
13016   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13017   *) ac_try_echo=$ac_try;;
13018 esac
13019 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
13020 $as_echo "$ac_try_echo") >&5
13021   (eval "$ac_link") 2>conftest.er1
13022   ac_status=$?
13023   grep -v '^ *+' conftest.er1 >conftest.err
13024   rm -rf conftest.er1
13025   cat conftest.err >&5
13026   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
13027   (exit $ac_status); } && {
13028          test -z "$ac_c_werror_flag" ||
13029          test ! -s conftest.err
13030        } && test -s conftest$ac_exeext && {
13031          test "$cross_compiling" = yes ||
13032          $as_test_x conftest$ac_exeext
13033        }; then
13034   ac_cv_lib_Xrandr_XRRGetScreenInfo=yes
13035 else
13036   $as_echo "$as_me: failed program was:" >&5
13037 sed 's/^/| /' conftest.$ac_ext >&5
13038
13039         ac_cv_lib_Xrandr_XRRGetScreenInfo=no
13040 fi
13041
13042 rm -rf conftest.dSYM
13043 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
13044       conftest$ac_exeext conftest.$ac_ext
13045 LIBS=$ac_check_lib_save_LIBS
13046 fi
13047 { $as_echo "$as_me:$LINENO: result: $ac_cv_lib_Xrandr_XRRGetScreenInfo" >&5
13048 $as_echo "$ac_cv_lib_Xrandr_XRRGetScreenInfo" >&6; }
13049 if test "x$ac_cv_lib_Xrandr_XRRGetScreenInfo" = x""yes; then
13050   have_randr=yes; SAVER_LIBS="$SAVER_LIBS -lXrandr $xrender_libs"
13051 else
13052   true
13053 fi
13054
13055   CPPFLAGS="$ac_save_CPPFLAGS"
13056   LDFLAGS="$ac_save_LDFLAGS"
13057 #  LIBS="$ac_save_LIBS"
13058
13059     fi
13060   fi
13061
13062   # if that succeeded, then we've really got it.
13063   if test "$have_randr" = yes; then
13064     cat >>confdefs.h <<\_ACEOF
13065 #define HAVE_RANDR 1
13066 _ACEOF
13067
13068
13069     # Now check for version 1.2 in the same libs.
13070     # Try to compile, since on MacOS 10.5.7, headers are older than libs!
13071     { $as_echo "$as_me:$LINENO: checking for XRRGetScreenResources" >&5
13072 $as_echo_n "checking for XRRGetScreenResources... " >&6; }
13073 if test "${ac_cv_randr_12+set}" = set; then
13074   $as_echo_n "(cached) " >&6
13075 else
13076   ac_cv_randr_12=no
13077
13078   ac_save_CPPFLAGS="$CPPFLAGS"
13079   if test \! -z "$includedir" ; then
13080     CPPFLAGS="$CPPFLAGS -I$includedir"
13081   fi
13082   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
13083   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
13084   cat >conftest.$ac_ext <<_ACEOF
13085 /* confdefs.h.  */
13086 _ACEOF
13087 cat confdefs.h >>conftest.$ac_ext
13088 cat >>conftest.$ac_ext <<_ACEOF
13089 /* end confdefs.h.  */
13090 #include <stdlib.h>
13091                          #include <X11/Xlib.h>
13092                          #include <X11/extensions/Xrandr.h>
13093 int
13094 main ()
13095 {
13096 XRRScreenResources *res =
13097                            XRRGetScreenResources (0, 0);
13098   ;
13099   return 0;
13100 }
13101 _ACEOF
13102 rm -rf conftest.$ac_objext
13103 if { (ac_try="$ac_compile"
13104 case "(($ac_try" in
13105   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13106   *) ac_try_echo=$ac_try;;
13107 esac
13108 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
13109 $as_echo "$ac_try_echo") >&5
13110   (eval "$ac_compile") 2>conftest.er1
13111   ac_status=$?
13112   grep -v '^ *+' conftest.er1 >conftest.err
13113   rm -rf conftest.er1
13114   cat conftest.err >&5
13115   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
13116   (exit $ac_status); } && {
13117          test -z "$ac_c_werror_flag" ||
13118          test ! -s conftest.err
13119        } && test -s conftest.$ac_objext; then
13120   ac_cv_randr_12=yes
13121 else
13122   $as_echo "$as_me: failed program was:" >&5
13123 sed 's/^/| /' conftest.$ac_ext >&5
13124
13125         ac_cv_randr_12=no
13126 fi
13127
13128 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13129   CPPFLAGS="$ac_save_CPPFLAGS"
13130 fi
13131 { $as_echo "$as_me:$LINENO: result: $ac_cv_randr_12" >&5
13132 $as_echo "$ac_cv_randr_12" >&6; }
13133     if test "$ac_cv_randr_12" = yes ; then
13134       cat >>confdefs.h <<\_ACEOF
13135 #define HAVE_RANDR_12 1
13136 _ACEOF
13137
13138     fi
13139 #   AC_CHECK_X_LIB(c, XRRGetOutputInfo, [AC_DEFINE(HAVE_RANDR_12)],
13140 #                  [true], $SAVER_LIBS)
13141   fi
13142
13143
13144 elif test "$with_randr" != no; then
13145   echo "error: must be yes or no: --with-randr-ext=$with_randr"
13146   exit 1
13147 fi
13148
13149
13150 ###############################################################################
13151 #
13152 #       Check for XF86MiscSetGrabKeysState (but only bother if we are already
13153 #       using other XF86 stuff.)
13154 #
13155 ###############################################################################
13156
13157 have_xf86miscsetgrabkeysstate=no
13158 if test "$have_xf86gamma" = yes -o "$have_xf86vmode" = yes; then
13159
13160   ac_save_CPPFLAGS="$CPPFLAGS"
13161   ac_save_LDFLAGS="$LDFLAGS"
13162 #  ac_save_LIBS="$LIBS"
13163
13164   if test \! -z "$includedir" ; then
13165     CPPFLAGS="$CPPFLAGS -I$includedir"
13166   fi
13167   # note: $X_CFLAGS includes $x_includes
13168   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
13169
13170   if test \! -z "$libdir" ; then
13171     LDFLAGS="$LDFLAGS -L$libdir"
13172   fi
13173   # note: $X_LIBS includes $x_libraries
13174   LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
13175
13176   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
13177   LDFLAGS=`eval eval eval eval eval eval eval eval eval echo $LDFLAGS`
13178   { $as_echo "$as_me:$LINENO: checking for XF86MiscSetGrabKeysState in -lXxf86misc" >&5
13179 $as_echo_n "checking for XF86MiscSetGrabKeysState in -lXxf86misc... " >&6; }
13180 if test "${ac_cv_lib_Xxf86misc_XF86MiscSetGrabKeysState+set}" = set; then
13181   $as_echo_n "(cached) " >&6
13182 else
13183   ac_check_lib_save_LIBS=$LIBS
13184 LIBS="-lXxf86misc -lXext -lX11 $LIBS"
13185 cat >conftest.$ac_ext <<_ACEOF
13186 /* confdefs.h.  */
13187 _ACEOF
13188 cat confdefs.h >>conftest.$ac_ext
13189 cat >>conftest.$ac_ext <<_ACEOF
13190 /* end confdefs.h.  */
13191
13192 /* Override any GCC internal prototype to avoid an error.
13193    Use char because int might match the return type of a GCC
13194    builtin and then its argument prototype would still apply.  */
13195 #ifdef __cplusplus
13196 extern "C"
13197 #endif
13198 char XF86MiscSetGrabKeysState ();
13199 int
13200 main ()
13201 {
13202 return XF86MiscSetGrabKeysState ();
13203   ;
13204   return 0;
13205 }
13206 _ACEOF
13207 rm -rf conftest.$ac_objext conftest$ac_exeext
13208 if { (ac_try="$ac_link"
13209 case "(($ac_try" in
13210   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13211   *) ac_try_echo=$ac_try;;
13212 esac
13213 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
13214 $as_echo "$ac_try_echo") >&5
13215   (eval "$ac_link") 2>conftest.er1
13216   ac_status=$?
13217   grep -v '^ *+' conftest.er1 >conftest.err
13218   rm -rf conftest.er1
13219   cat conftest.err >&5
13220   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
13221   (exit $ac_status); } && {
13222          test -z "$ac_c_werror_flag" ||
13223          test ! -s conftest.err
13224        } && test -s conftest$ac_exeext && {
13225          test "$cross_compiling" = yes ||
13226          $as_test_x conftest$ac_exeext
13227        }; then
13228   ac_cv_lib_Xxf86misc_XF86MiscSetGrabKeysState=yes
13229 else
13230   $as_echo "$as_me: failed program was:" >&5
13231 sed 's/^/| /' conftest.$ac_ext >&5
13232
13233         ac_cv_lib_Xxf86misc_XF86MiscSetGrabKeysState=no
13234 fi
13235
13236 rm -rf conftest.dSYM
13237 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
13238       conftest$ac_exeext conftest.$ac_ext
13239 LIBS=$ac_check_lib_save_LIBS
13240 fi
13241 { $as_echo "$as_me:$LINENO: result: $ac_cv_lib_Xxf86misc_XF86MiscSetGrabKeysState" >&5
13242 $as_echo "$ac_cv_lib_Xxf86misc_XF86MiscSetGrabKeysState" >&6; }
13243 if test "x$ac_cv_lib_Xxf86misc_XF86MiscSetGrabKeysState" = x""yes; then
13244   have_xf86miscsetgrabkeysstate=yes
13245 else
13246   true
13247 fi
13248
13249   CPPFLAGS="$ac_save_CPPFLAGS"
13250   LDFLAGS="$ac_save_LDFLAGS"
13251 #  LIBS="$ac_save_LIBS"
13252
13253   if test "$have_xf86miscsetgrabkeysstate" = yes ; then
13254     SAVER_LIBS="$SAVER_LIBS -lXxf86misc"
13255     cat >>confdefs.h <<\_ACEOF
13256 #define HAVE_XF86MISCSETGRABKEYSSTATE 1
13257 _ACEOF
13258
13259   fi
13260 fi
13261
13262
13263 ###############################################################################
13264 #
13265 #       Check for HP XHPDisableReset and XHPEnableReset.
13266 #
13267 ###############################################################################
13268
13269 { $as_echo "$as_me:$LINENO: checking for XHPDisableReset in X11/XHPlib.h" >&5
13270 $as_echo_n "checking for XHPDisableReset in X11/XHPlib.h... " >&6; }
13271
13272   ac_save_CPPFLAGS="$CPPFLAGS"
13273   if test \! -z "$includedir" ; then
13274     CPPFLAGS="$CPPFLAGS -I$includedir"
13275   fi
13276   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
13277   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
13278   cat >conftest.$ac_ext <<_ACEOF
13279 /* confdefs.h.  */
13280 _ACEOF
13281 cat confdefs.h >>conftest.$ac_ext
13282 cat >>conftest.$ac_ext <<_ACEOF
13283 /* end confdefs.h.  */
13284 #include <X11/XHPlib.h>
13285
13286 _ACEOF
13287 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
13288   $EGREP "XHPDisableReset" >/dev/null 2>&1; then
13289   cat >>confdefs.h <<\_ACEOF
13290 #define HAVE_XHPDISABLERESET 1
13291 _ACEOF
13292
13293                    SAVER_LIBS="-lXhp11 $SAVER_LIBS"
13294                    { $as_echo "$as_me:$LINENO: result: yes" >&5
13295 $as_echo "yes" >&6; }
13296 else
13297   { $as_echo "$as_me:$LINENO: result: no" >&5
13298 $as_echo "no" >&6; }
13299 fi
13300 rm -rf conftest*
13301
13302   CPPFLAGS="$ac_save_CPPFLAGS"
13303
13304
13305 ###############################################################################
13306 #
13307 #       Check for /proc/interrupts.
13308 #
13309 ###############################################################################
13310
13311 have_proc_interrupts=no
13312 with_proc_interrupts_req=unspecified
13313
13314 # Check whether --with-proc-interrupts was given.
13315 if test "${with_proc_interrupts+set}" = set; then
13316   withval=$with_proc_interrupts; with_proc_interrupts="$withval"; with_proc_interrupts_req="$withval"
13317 else
13318   with_proc_interrupts=yes
13319 fi
13320
13321
13322 if test "$with_proc_interrupts" = yes; then
13323
13324   # Note that we may be building in an environment (e.g. Debian buildd chroot)
13325   # without a proper /proc filesystem. If /proc/interrupts exists, then we'll
13326   # check that it has the bits we need, but otherwise we'll just go on faith.
13327   #
13328   have_proc_interrupts=yes
13329
13330   if test -f /proc/interrupts; then
13331    { $as_echo "$as_me:$LINENO: checking whether /proc/interrupts contains keyboard data" >&5
13332 $as_echo_n "checking whether /proc/interrupts contains keyboard data... " >&6; }
13333 if test "${ac_cv_have_proc_interrupts+set}" = set; then
13334   $as_echo_n "(cached) " >&6
13335 else
13336   ac_cv_have_proc_interrupts=no
13337      if grep 'keyboard\|i8042' /proc/interrupts >/dev/null 2>&1 ; then
13338        ac_cv_have_proc_interrupts=yes
13339      fi
13340
13341 fi
13342 { $as_echo "$as_me:$LINENO: result: $ac_cv_have_proc_interrupts" >&5
13343 $as_echo "$ac_cv_have_proc_interrupts" >&6; }
13344    have_proc_interrupts=$ac_cv_have_proc_interrupts
13345   fi
13346
13347   if test "$have_proc_interrupts" = yes; then
13348     cat >>confdefs.h <<\_ACEOF
13349 #define HAVE_PROC_INTERRUPTS 1
13350 _ACEOF
13351
13352   fi
13353
13354 elif test "$with_proc_interrupts" != no; then
13355   echo "error: must be yes or no: --with-proc-interrupts=$with_proc_interrupts"
13356   exit 1
13357 fi
13358
13359
13360 ###############################################################################
13361 #
13362 #       The --enable-locking option
13363 #
13364 ###############################################################################
13365
13366 # Check whether --enable-locking was given.
13367 if test "${enable_locking+set}" = set; then
13368   enableval=$enable_locking; enable_locking="$enableval"
13369 else
13370   if test "$ac_macosx" = yes; then
13371     # We can't lock on MacOS X, so default to not compiling in support for it.
13372     # But allow --enable-locking to override that, so I can debug Linux locking
13373     # under MacOS X11.
13374     enable_locking=no
13375    else
13376     enable_locking=yes
13377    fi
13378 fi
13379
13380 if test "$enable_locking" = yes; then
13381   true
13382 elif test "$enable_locking" = no; then
13383   cat >>confdefs.h <<\_ACEOF
13384 #define NO_LOCKING 1
13385 _ACEOF
13386
13387 else
13388   echo "error: must be yes or no: --enable-locking=$enable_locking"
13389   exit 1
13390 fi
13391
13392
13393 ###############################################################################
13394 #
13395 #       Whether to allow root password to unblank.
13396 #
13397 ###############################################################################
13398 # Check whether --enable-root-passwd was given.
13399 if test "${enable_root_passwd+set}" = set; then
13400   enableval=$enable_root_passwd; enable_root_passwd="$enableval"
13401 else
13402   enable_root_passwd=yes
13403 fi
13404
13405 if test "$enable_root_passwd" = yes; then
13406   cat >>confdefs.h <<\_ACEOF
13407 #define ALLOW_ROOT_PASSWD 1
13408 _ACEOF
13409
13410   true
13411 elif test "$enable_root_passwd" != no; then
13412   echo "error: must be yes or no: --enable-root-passwd=$enable_root_passwd"
13413   exit 1
13414 fi
13415
13416 ###############################################################################
13417 #
13418 #       Check for PAM.
13419 #
13420 ###############################################################################
13421
13422 case "$host" in
13423   *-solaris*)
13424    # Solaris systems tend to come with PAM misconfigured.
13425    #  Don't build it by default, even if the headers exist.
13426    with_pam_default=no
13427    ;;
13428   *)
13429    # Default to building PAM support on all other systems, if it exists.
13430    with_pam_default=yes
13431   ;;
13432 esac
13433
13434 have_pam=no
13435 with_pam_req=unspecified
13436
13437
13438 # Check whether --with-pam was given.
13439 if test "${with_pam+set}" = set; then
13440   withval=$with_pam; with_pam="$withval"; with_pam_req="$withval"
13441 else
13442   with_pam=$with_pam_default
13443 fi
13444
13445
13446
13447 # Check whether --with-pam_service_name was given.
13448 if test "${with_pam_service_name+set}" = set; then
13449   withval=$with_pam_service_name; pam_service_name="$withval"
13450 else
13451   pam_service_name="xscreensaver"
13452 fi
13453
13454
13455
13456    case "$with_pam" in
13457     yes) ;;
13458     no)  ;;
13459
13460     /*)
13461      { $as_echo "$as_me:$LINENO: checking for PAM headers" >&5
13462 $as_echo_n "checking for PAM headers... " >&6; }
13463      d=$with_pam/include
13464      if test -d $d; then
13465        X_CFLAGS="-I$d $X_CFLAGS"
13466        { $as_echo "$as_me:$LINENO: result: $d" >&5
13467 $as_echo "$d" >&6; }
13468      else
13469        { $as_echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
13470 $as_echo "not found ($d: no such directory)" >&6; }
13471      fi
13472
13473      { $as_echo "$as_me:$LINENO: checking for PAM libs" >&5
13474 $as_echo_n "checking for PAM libs... " >&6; }
13475      d=$with_pam/lib
13476      if test -d $d; then
13477        X_LIBS="-L$d $X_LIBS"
13478        { $as_echo "$as_me:$LINENO: result: $d" >&5
13479 $as_echo "$d" >&6; }
13480      else
13481        { $as_echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
13482 $as_echo "not found ($d: no such directory)" >&6; }
13483      fi
13484
13485      # replace the directory string with "yes".
13486      with_pam_req="yes"
13487      with_pam=$with_pam_req
13488      ;;
13489
13490     *)
13491      echo ""
13492      echo "error: argument to --with-pam must be \"yes\", \"no\", or a directory."
13493      echo "       If it is a directory, then \`DIR/include' will be added to"
13494      echo "       the -I list, and \`DIR/lib' will be added to the -L list."
13495      exit 1
13496      ;;
13497    esac
13498
13499
13500 if test "$enable_locking" = yes -a "$with_pam" = yes; then
13501   { $as_echo "$as_me:$LINENO: checking for PAM" >&5
13502 $as_echo_n "checking for PAM... " >&6; }
13503 if test "${ac_cv_pam+set}" = set; then
13504   $as_echo_n "(cached) " >&6
13505 else
13506
13507   ac_save_CPPFLAGS="$CPPFLAGS"
13508   if test \! -z "$includedir" ; then
13509     CPPFLAGS="$CPPFLAGS -I$includedir"
13510   fi
13511   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
13512   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
13513   cat >conftest.$ac_ext <<_ACEOF
13514 /* confdefs.h.  */
13515 _ACEOF
13516 cat confdefs.h >>conftest.$ac_ext
13517 cat >>conftest.$ac_ext <<_ACEOF
13518 /* end confdefs.h.  */
13519 #include <security/pam_appl.h>
13520 int
13521 main ()
13522 {
13523
13524   ;
13525   return 0;
13526 }
13527 _ACEOF
13528 rm -rf conftest.$ac_objext
13529 if { (ac_try="$ac_compile"
13530 case "(($ac_try" in
13531   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13532   *) ac_try_echo=$ac_try;;
13533 esac
13534 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
13535 $as_echo "$ac_try_echo") >&5
13536   (eval "$ac_compile") 2>conftest.er1
13537   ac_status=$?
13538   grep -v '^ *+' conftest.er1 >conftest.err
13539   rm -rf conftest.er1
13540   cat conftest.err >&5
13541   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
13542   (exit $ac_status); } && {
13543          test -z "$ac_c_werror_flag" ||
13544          test ! -s conftest.err
13545        } && test -s conftest.$ac_objext; then
13546   ac_cv_pam=yes
13547 else
13548   $as_echo "$as_me: failed program was:" >&5
13549 sed 's/^/| /' conftest.$ac_ext >&5
13550
13551         ac_cv_pam=no
13552 fi
13553
13554 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13555   CPPFLAGS="$ac_save_CPPFLAGS"
13556 fi
13557 { $as_echo "$as_me:$LINENO: result: $ac_cv_pam" >&5
13558 $as_echo "$ac_cv_pam" >&6; }
13559   if test "$ac_cv_pam" = yes ; then
13560     have_pam=yes
13561     cat >>confdefs.h <<\_ACEOF
13562 #define HAVE_PAM 1
13563 _ACEOF
13564
13565     cat >>confdefs.h <<_ACEOF
13566 #define PAM_SERVICE_NAME "$pam_service_name"
13567 _ACEOF
13568
13569
13570     PASSWD_LIBS="${PASSWD_LIBS} -lpam"
13571
13572     # libpam typically requires dlopen and dlsym.  On FreeBSD,
13573     # those are in libc.  On Linux and Solaris, they're in libdl.
13574     { $as_echo "$as_me:$LINENO: checking for dlopen in -ldl" >&5
13575 $as_echo_n "checking for dlopen in -ldl... " >&6; }
13576 if test "${ac_cv_lib_dl_dlopen+set}" = set; then
13577   $as_echo_n "(cached) " >&6
13578 else
13579   ac_check_lib_save_LIBS=$LIBS
13580 LIBS="-ldl  $LIBS"
13581 cat >conftest.$ac_ext <<_ACEOF
13582 /* confdefs.h.  */
13583 _ACEOF
13584 cat confdefs.h >>conftest.$ac_ext
13585 cat >>conftest.$ac_ext <<_ACEOF
13586 /* end confdefs.h.  */
13587
13588 /* Override any GCC internal prototype to avoid an error.
13589    Use char because int might match the return type of a GCC
13590    builtin and then its argument prototype would still apply.  */
13591 #ifdef __cplusplus
13592 extern "C"
13593 #endif
13594 char dlopen ();
13595 int
13596 main ()
13597 {
13598 return dlopen ();
13599   ;
13600   return 0;
13601 }
13602 _ACEOF
13603 rm -rf conftest.$ac_objext conftest$ac_exeext
13604 if { (ac_try="$ac_link"
13605 case "(($ac_try" in
13606   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13607   *) ac_try_echo=$ac_try;;
13608 esac
13609 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
13610 $as_echo "$ac_try_echo") >&5
13611   (eval "$ac_link") 2>conftest.er1
13612   ac_status=$?
13613   grep -v '^ *+' conftest.er1 >conftest.err
13614   rm -rf conftest.er1
13615   cat conftest.err >&5
13616   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
13617   (exit $ac_status); } && {
13618          test -z "$ac_c_werror_flag" ||
13619          test ! -s conftest.err
13620        } && test -s conftest$ac_exeext && {
13621          test "$cross_compiling" = yes ||
13622          $as_test_x conftest$ac_exeext
13623        }; then
13624   ac_cv_lib_dl_dlopen=yes
13625 else
13626   $as_echo "$as_me: failed program was:" >&5
13627 sed 's/^/| /' conftest.$ac_ext >&5
13628
13629         ac_cv_lib_dl_dlopen=no
13630 fi
13631
13632 rm -rf conftest.dSYM
13633 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
13634       conftest$ac_exeext conftest.$ac_ext
13635 LIBS=$ac_check_lib_save_LIBS
13636 fi
13637 { $as_echo "$as_me:$LINENO: result: $ac_cv_lib_dl_dlopen" >&5
13638 $as_echo "$ac_cv_lib_dl_dlopen" >&6; }
13639 if test "x$ac_cv_lib_dl_dlopen" = x""yes; then
13640   PASSWD_LIBS="${PASSWD_LIBS} -ldl"
13641 fi
13642
13643
13644     # On Linux, sigtimedwait() is in libc; on Solaris, it's in librt.
13645     have_timedwait=no
13646     { $as_echo "$as_me:$LINENO: checking for sigtimedwait in -lc" >&5
13647 $as_echo_n "checking for sigtimedwait in -lc... " >&6; }
13648 if test "${ac_cv_lib_c_sigtimedwait+set}" = set; then
13649   $as_echo_n "(cached) " >&6
13650 else
13651   ac_check_lib_save_LIBS=$LIBS
13652 LIBS="-lc  $LIBS"
13653 cat >conftest.$ac_ext <<_ACEOF
13654 /* confdefs.h.  */
13655 _ACEOF
13656 cat confdefs.h >>conftest.$ac_ext
13657 cat >>conftest.$ac_ext <<_ACEOF
13658 /* end confdefs.h.  */
13659
13660 /* Override any GCC internal prototype to avoid an error.
13661    Use char because int might match the return type of a GCC
13662    builtin and then its argument prototype would still apply.  */
13663 #ifdef __cplusplus
13664 extern "C"
13665 #endif
13666 char sigtimedwait ();
13667 int
13668 main ()
13669 {
13670 return sigtimedwait ();
13671   ;
13672   return 0;
13673 }
13674 _ACEOF
13675 rm -rf conftest.$ac_objext conftest$ac_exeext
13676 if { (ac_try="$ac_link"
13677 case "(($ac_try" in
13678   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13679   *) ac_try_echo=$ac_try;;
13680 esac
13681 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
13682 $as_echo "$ac_try_echo") >&5
13683   (eval "$ac_link") 2>conftest.er1
13684   ac_status=$?
13685   grep -v '^ *+' conftest.er1 >conftest.err
13686   rm -rf conftest.er1
13687   cat conftest.err >&5
13688   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
13689   (exit $ac_status); } && {
13690          test -z "$ac_c_werror_flag" ||
13691          test ! -s conftest.err
13692        } && test -s conftest$ac_exeext && {
13693          test "$cross_compiling" = yes ||
13694          $as_test_x conftest$ac_exeext
13695        }; then
13696   ac_cv_lib_c_sigtimedwait=yes
13697 else
13698   $as_echo "$as_me: failed program was:" >&5
13699 sed 's/^/| /' conftest.$ac_ext >&5
13700
13701         ac_cv_lib_c_sigtimedwait=no
13702 fi
13703
13704 rm -rf conftest.dSYM
13705 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
13706       conftest$ac_exeext conftest.$ac_ext
13707 LIBS=$ac_check_lib_save_LIBS
13708 fi
13709 { $as_echo "$as_me:$LINENO: result: $ac_cv_lib_c_sigtimedwait" >&5
13710 $as_echo "$ac_cv_lib_c_sigtimedwait" >&6; }
13711 if test "x$ac_cv_lib_c_sigtimedwait" = x""yes; then
13712   have_timedwait=yes
13713                   cat >>confdefs.h <<\_ACEOF
13714 #define HAVE_SIGTIMEDWAIT 1
13715 _ACEOF
13716
13717 fi
13718
13719     if test "$have_timedwait" = no ; then
13720       { $as_echo "$as_me:$LINENO: checking for sigtimedwait in -lrt" >&5
13721 $as_echo_n "checking for sigtimedwait in -lrt... " >&6; }
13722 if test "${ac_cv_lib_rt_sigtimedwait+set}" = set; then
13723   $as_echo_n "(cached) " >&6
13724 else
13725   ac_check_lib_save_LIBS=$LIBS
13726 LIBS="-lrt  $LIBS"
13727 cat >conftest.$ac_ext <<_ACEOF
13728 /* confdefs.h.  */
13729 _ACEOF
13730 cat confdefs.h >>conftest.$ac_ext
13731 cat >>conftest.$ac_ext <<_ACEOF
13732 /* end confdefs.h.  */
13733
13734 /* Override any GCC internal prototype to avoid an error.
13735    Use char because int might match the return type of a GCC
13736    builtin and then its argument prototype would still apply.  */
13737 #ifdef __cplusplus
13738 extern "C"
13739 #endif
13740 char sigtimedwait ();
13741 int
13742 main ()
13743 {
13744 return sigtimedwait ();
13745   ;
13746   return 0;
13747 }
13748 _ACEOF
13749 rm -rf conftest.$ac_objext conftest$ac_exeext
13750 if { (ac_try="$ac_link"
13751 case "(($ac_try" in
13752   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13753   *) ac_try_echo=$ac_try;;
13754 esac
13755 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
13756 $as_echo "$ac_try_echo") >&5
13757   (eval "$ac_link") 2>conftest.er1
13758   ac_status=$?
13759   grep -v '^ *+' conftest.er1 >conftest.err
13760   rm -rf conftest.er1
13761   cat conftest.err >&5
13762   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
13763   (exit $ac_status); } && {
13764          test -z "$ac_c_werror_flag" ||
13765          test ! -s conftest.err
13766        } && test -s conftest$ac_exeext && {
13767          test "$cross_compiling" = yes ||
13768          $as_test_x conftest$ac_exeext
13769        }; then
13770   ac_cv_lib_rt_sigtimedwait=yes
13771 else
13772   $as_echo "$as_me: failed program was:" >&5
13773 sed 's/^/| /' conftest.$ac_ext >&5
13774
13775         ac_cv_lib_rt_sigtimedwait=no
13776 fi
13777
13778 rm -rf conftest.dSYM
13779 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
13780       conftest$ac_exeext conftest.$ac_ext
13781 LIBS=$ac_check_lib_save_LIBS
13782 fi
13783 { $as_echo "$as_me:$LINENO: result: $ac_cv_lib_rt_sigtimedwait" >&5
13784 $as_echo "$ac_cv_lib_rt_sigtimedwait" >&6; }
13785 if test "x$ac_cv_lib_rt_sigtimedwait" = x""yes; then
13786   have_timedwait=yes
13787                                       cat >>confdefs.h <<\_ACEOF
13788 #define HAVE_SIGTIMEDWAIT 1
13789 _ACEOF
13790
13791                                       PASSWD_LIBS="${PASSWD_LIBS} -lrt"
13792 fi
13793
13794     fi
13795
13796     { $as_echo "$as_me:$LINENO: checking how to call pam_strerror" >&5
13797 $as_echo_n "checking how to call pam_strerror... " >&6; }
13798     if test "${ac_cv_pam_strerror_args+set}" = set; then
13799   $as_echo_n "(cached) " >&6
13800 else
13801
13802   ac_save_CPPFLAGS="$CPPFLAGS"
13803   if test \! -z "$includedir" ; then
13804     CPPFLAGS="$CPPFLAGS -I$includedir"
13805   fi
13806   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
13807   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
13808   cat >conftest.$ac_ext <<_ACEOF
13809 /* confdefs.h.  */
13810 _ACEOF
13811 cat confdefs.h >>conftest.$ac_ext
13812 cat >>conftest.$ac_ext <<_ACEOF
13813 /* end confdefs.h.  */
13814 #include <stdio.h>
13815                         #include <stdlib.h>
13816                         #include <security/pam_appl.h>
13817 int
13818 main ()
13819 {
13820 pam_handle_t *pamh = 0;
13821                         char *s = pam_strerror(pamh, PAM_SUCCESS);
13822   ;
13823   return 0;
13824 }
13825 _ACEOF
13826 rm -rf conftest.$ac_objext
13827 if { (ac_try="$ac_compile"
13828 case "(($ac_try" in
13829   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13830   *) ac_try_echo=$ac_try;;
13831 esac
13832 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
13833 $as_echo "$ac_try_echo") >&5
13834   (eval "$ac_compile") 2>conftest.er1
13835   ac_status=$?
13836   grep -v '^ *+' conftest.er1 >conftest.err
13837   rm -rf conftest.er1
13838   cat conftest.err >&5
13839   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
13840   (exit $ac_status); } && {
13841          test -z "$ac_c_werror_flag" ||
13842          test ! -s conftest.err
13843        } && test -s conftest.$ac_objext; then
13844   ac_pam_strerror_args=2
13845 else
13846   $as_echo "$as_me: failed program was:" >&5
13847 sed 's/^/| /' conftest.$ac_ext >&5
13848
13849
13850   ac_save_CPPFLAGS="$CPPFLAGS"
13851   if test \! -z "$includedir" ; then
13852     CPPFLAGS="$CPPFLAGS -I$includedir"
13853   fi
13854   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
13855   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
13856   cat >conftest.$ac_ext <<_ACEOF
13857 /* confdefs.h.  */
13858 _ACEOF
13859 cat confdefs.h >>conftest.$ac_ext
13860 cat >>conftest.$ac_ext <<_ACEOF
13861 /* end confdefs.h.  */
13862 #include <stdio.h>
13863                                           #include <stdlib.h>
13864                                           #include <security/pam_appl.h>
13865 int
13866 main ()
13867 {
13868 char *s =
13869                                            pam_strerror(PAM_SUCCESS);
13870   ;
13871   return 0;
13872 }
13873 _ACEOF
13874 rm -rf conftest.$ac_objext
13875 if { (ac_try="$ac_compile"
13876 case "(($ac_try" in
13877   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13878   *) ac_try_echo=$ac_try;;
13879 esac
13880 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
13881 $as_echo "$ac_try_echo") >&5
13882   (eval "$ac_compile") 2>conftest.er1
13883   ac_status=$?
13884   grep -v '^ *+' conftest.er1 >conftest.err
13885   rm -rf conftest.er1
13886   cat conftest.err >&5
13887   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
13888   (exit $ac_status); } && {
13889          test -z "$ac_c_werror_flag" ||
13890          test ! -s conftest.err
13891        } && test -s conftest.$ac_objext; then
13892   ac_pam_strerror_args=1
13893 else
13894   $as_echo "$as_me: failed program was:" >&5
13895 sed 's/^/| /' conftest.$ac_ext >&5
13896
13897         ac_pam_strerror_args=0
13898 fi
13899
13900 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13901   CPPFLAGS="$ac_save_CPPFLAGS"
13902 fi
13903
13904 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13905   CPPFLAGS="$ac_save_CPPFLAGS"
13906       ac_cv_pam_strerror_args=$ac_pam_strerror_args
13907 fi
13908
13909     ac_pam_strerror_args=$ac_cv_pam_strerror_args
13910     if test "$ac_pam_strerror_args" = 1 ; then
13911       { $as_echo "$as_me:$LINENO: result: one argument" >&5
13912 $as_echo "one argument" >&6; }
13913     elif test "$ac_pam_strerror_args" = 2 ; then
13914       cat >>confdefs.h <<\_ACEOF
13915 #define PAM_STRERROR_TWO_ARGS 1
13916 _ACEOF
13917
13918       { $as_echo "$as_me:$LINENO: result: two arguments" >&5
13919 $as_echo "two arguments" >&6; }
13920     else
13921       { $as_echo "$as_me:$LINENO: result: unknown" >&5
13922 $as_echo "unknown" >&6; }
13923     fi
13924
13925 # Check pam_fail_delay
13926     { $as_echo "$as_me:$LINENO: checking pam_fail_delay in -lpam" >&5
13927 $as_echo_n "checking pam_fail_delay in -lpam... " >&6; }
13928     if test "${ac_cv_pam_fail_delay+set}" = set; then
13929   $as_echo_n "(cached) " >&6
13930 else
13931   ac_save_LDFLAGS="$LDFLAGS"
13932       LDFLAGS="-lpam"
13933       cat >conftest.$ac_ext <<_ACEOF
13934 /* confdefs.h.  */
13935 _ACEOF
13936 cat confdefs.h >>conftest.$ac_ext
13937 cat >>conftest.$ac_ext <<_ACEOF
13938 /* end confdefs.h.  */
13939 #include <security/pam_appl.h>
13940 int
13941 main ()
13942 {
13943 pam_handle_t *pamh = 0;
13944                    unsigned int usec = 1;
13945                    int status = pam_fail_delay (pamh, usec);
13946   ;
13947   return 0;
13948 }
13949 _ACEOF
13950 rm -rf conftest.$ac_objext conftest$ac_exeext
13951 if { (ac_try="$ac_link"
13952 case "(($ac_try" in
13953   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13954   *) ac_try_echo=$ac_try;;
13955 esac
13956 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
13957 $as_echo "$ac_try_echo") >&5
13958   (eval "$ac_link") 2>conftest.er1
13959   ac_status=$?
13960   grep -v '^ *+' conftest.er1 >conftest.err
13961   rm -rf conftest.er1
13962   cat conftest.err >&5
13963   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
13964   (exit $ac_status); } && {
13965          test -z "$ac_c_werror_flag" ||
13966          test ! -s conftest.err
13967        } && test -s conftest$ac_exeext && {
13968          test "$cross_compiling" = yes ||
13969          $as_test_x conftest$ac_exeext
13970        }; then
13971   ac_pam_fail_delay=yes
13972 else
13973   $as_echo "$as_me: failed program was:" >&5
13974 sed 's/^/| /' conftest.$ac_ext >&5
13975
13976         ac_pam_fail_delay=no
13977 fi
13978
13979 rm -rf conftest.dSYM
13980 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
13981       conftest$ac_exeext conftest.$ac_ext
13982       ac_cv_pam_fail_delay=$ac_pam_fail_delay,
13983       LDFLAGS=$ac_save_LDFLAGS
13984 fi
13985
13986
13987       if test "$ac_pam_fail_delay" = yes ; then
13988         { $as_echo "$as_me:$LINENO: result: yes" >&5
13989 $as_echo "yes" >&6; }
13990         cat >>confdefs.h <<\_ACEOF
13991 #define HAVE_PAM_FAIL_DELAY 1
13992 _ACEOF
13993
13994       else
13995         { $as_echo "$as_me:$LINENO: result: no" >&5
13996 $as_echo "no" >&6; }
13997       fi
13998
13999   fi
14000 fi
14001
14002
14003 ###############################################################################
14004 #
14005 #       Check for Kerberos.
14006 #
14007 ###############################################################################
14008
14009 have_kerberos=no
14010 have_kerberos5=no
14011 with_kerberos_req=unspecified
14012
14013
14014 # Check whether --with-kerberos was given.
14015 if test "${with_kerberos+set}" = set; then
14016   withval=$with_kerberos; with_kerberos="$withval"; with_kerberos_req="$withval"
14017 else
14018   with_kerberos=yes
14019 fi
14020
14021
14022
14023    case "$with_kerberos" in
14024     yes) ;;
14025     no)  ;;
14026
14027     /*)
14028      { $as_echo "$as_me:$LINENO: checking for Kerberos headers" >&5
14029 $as_echo_n "checking for Kerberos headers... " >&6; }
14030      d=$with_kerberos/include
14031      if test -d $d; then
14032        X_CFLAGS="-I$d $X_CFLAGS"
14033        { $as_echo "$as_me:$LINENO: result: $d" >&5
14034 $as_echo "$d" >&6; }
14035      else
14036        { $as_echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
14037 $as_echo "not found ($d: no such directory)" >&6; }
14038      fi
14039
14040      { $as_echo "$as_me:$LINENO: checking for Kerberos libs" >&5
14041 $as_echo_n "checking for Kerberos libs... " >&6; }
14042      d=$with_kerberos/lib
14043      if test -d $d; then
14044        X_LIBS="-L$d $X_LIBS"
14045        { $as_echo "$as_me:$LINENO: result: $d" >&5
14046 $as_echo "$d" >&6; }
14047      else
14048        { $as_echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
14049 $as_echo "not found ($d: no such directory)" >&6; }
14050      fi
14051
14052      # replace the directory string with "yes".
14053      with_kerberos_req="yes"
14054      with_kerberos=$with_kerberos_req
14055      ;;
14056
14057     *)
14058      echo ""
14059      echo "error: argument to --with-kerberos must be \"yes\", \"no\", or a directory."
14060      echo "       If it is a directory, then \`DIR/include' will be added to"
14061      echo "       the -I list, and \`DIR/lib' will be added to the -L list."
14062      exit 1
14063      ;;
14064    esac
14065
14066
14067 if test "$enable_locking" = yes -a "$with_kerberos" = yes; then
14068   { $as_echo "$as_me:$LINENO: checking for Kerberos 4" >&5
14069 $as_echo_n "checking for Kerberos 4... " >&6; }
14070 if test "${ac_cv_kerberos+set}" = set; then
14071   $as_echo_n "(cached) " >&6
14072 else
14073
14074   ac_save_CPPFLAGS="$CPPFLAGS"
14075   if test \! -z "$includedir" ; then
14076     CPPFLAGS="$CPPFLAGS -I$includedir"
14077   fi
14078   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
14079   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
14080   cat >conftest.$ac_ext <<_ACEOF
14081 /* confdefs.h.  */
14082 _ACEOF
14083 cat confdefs.h >>conftest.$ac_ext
14084 cat >>conftest.$ac_ext <<_ACEOF
14085 /* end confdefs.h.  */
14086 #include <krb.h>
14087 int
14088 main ()
14089 {
14090
14091   ;
14092   return 0;
14093 }
14094 _ACEOF
14095 rm -rf conftest.$ac_objext
14096 if { (ac_try="$ac_compile"
14097 case "(($ac_try" in
14098   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14099   *) ac_try_echo=$ac_try;;
14100 esac
14101 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
14102 $as_echo "$ac_try_echo") >&5
14103   (eval "$ac_compile") 2>conftest.er1
14104   ac_status=$?
14105   grep -v '^ *+' conftest.er1 >conftest.err
14106   rm -rf conftest.er1
14107   cat conftest.err >&5
14108   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
14109   (exit $ac_status); } && {
14110          test -z "$ac_c_werror_flag" ||
14111          test ! -s conftest.err
14112        } && test -s conftest.$ac_objext; then
14113   ac_cv_kerberos=yes
14114 else
14115   $as_echo "$as_me: failed program was:" >&5
14116 sed 's/^/| /' conftest.$ac_ext >&5
14117
14118         ac_cv_kerberos=no
14119 fi
14120
14121 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14122   CPPFLAGS="$ac_save_CPPFLAGS"
14123 fi
14124 { $as_echo "$as_me:$LINENO: result: $ac_cv_kerberos" >&5
14125 $as_echo "$ac_cv_kerberos" >&6; }
14126   { $as_echo "$as_me:$LINENO: checking for Kerberos 5" >&5
14127 $as_echo_n "checking for Kerberos 5... " >&6; }
14128 if test "${ac_cv_kerberos5+set}" = set; then
14129   $as_echo_n "(cached) " >&6
14130 else
14131
14132   ac_save_CPPFLAGS="$CPPFLAGS"
14133   if test \! -z "$includedir" ; then
14134     CPPFLAGS="$CPPFLAGS -I$includedir"
14135   fi
14136   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
14137   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
14138   cat >conftest.$ac_ext <<_ACEOF
14139 /* confdefs.h.  */
14140 _ACEOF
14141 cat confdefs.h >>conftest.$ac_ext
14142 cat >>conftest.$ac_ext <<_ACEOF
14143 /* end confdefs.h.  */
14144 #include <kerberosIV/krb.h>
14145 int
14146 main ()
14147 {
14148
14149   ;
14150   return 0;
14151 }
14152 _ACEOF
14153 rm -rf conftest.$ac_objext
14154 if { (ac_try="$ac_compile"
14155 case "(($ac_try" in
14156   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14157   *) ac_try_echo=$ac_try;;
14158 esac
14159 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
14160 $as_echo "$ac_try_echo") >&5
14161   (eval "$ac_compile") 2>conftest.er1
14162   ac_status=$?
14163   grep -v '^ *+' conftest.er1 >conftest.err
14164   rm -rf conftest.er1
14165   cat conftest.err >&5
14166   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
14167   (exit $ac_status); } && {
14168          test -z "$ac_c_werror_flag" ||
14169          test ! -s conftest.err
14170        } && test -s conftest.$ac_objext; then
14171   ac_cv_kerberos5=yes
14172 else
14173   $as_echo "$as_me: failed program was:" >&5
14174 sed 's/^/| /' conftest.$ac_ext >&5
14175
14176         ac_cv_kerberos5=no
14177 fi
14178
14179 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14180   CPPFLAGS="$ac_save_CPPFLAGS"
14181 fi
14182 { $as_echo "$as_me:$LINENO: result: $ac_cv_kerberos5" >&5
14183 $as_echo "$ac_cv_kerberos5" >&6; }
14184
14185   if test "$ac_cv_kerberos" = yes ; then
14186     have_kerberos=yes
14187     cat >>confdefs.h <<\_ACEOF
14188 #define HAVE_KERBEROS 1
14189 _ACEOF
14190
14191   fi
14192
14193   if test "$ac_cv_kerberos5" = yes ; then
14194
14195     # Andrew Snare <ajs@pigpond.com> wrote:
14196     #
14197     # You were assuming that if kerberosV (krb5) was found, then kerberosIV
14198     # (krb4) was also available.  This turns out not to be the case with
14199     # mit-krb-1.2.7; apparently backwards-compatibility with KerberosIV
14200     # is optional.
14201     #
14202     # So, disable kerberosV support if libkrb4 can't be found.
14203     # This is not the best solution, but it makes the compile not fail.
14204     #
14205
14206   ac_save_CPPFLAGS="$CPPFLAGS"
14207   ac_save_LDFLAGS="$LDFLAGS"
14208 #  ac_save_LIBS="$LIBS"
14209
14210   if test \! -z "$includedir" ; then
14211     CPPFLAGS="$CPPFLAGS -I$includedir"
14212   fi
14213   # note: $X_CFLAGS includes $x_includes
14214   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
14215
14216   if test \! -z "$libdir" ; then
14217     LDFLAGS="$LDFLAGS -L$libdir"
14218   fi
14219   # note: $X_LIBS includes $x_libraries
14220   LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
14221
14222   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
14223   LDFLAGS=`eval eval eval eval eval eval eval eval eval echo $LDFLAGS`
14224   { $as_echo "$as_me:$LINENO: checking for krb_get_tf_realm in -lkrb4" >&5
14225 $as_echo_n "checking for krb_get_tf_realm in -lkrb4... " >&6; }
14226 if test "${ac_cv_lib_krb4_krb_get_tf_realm+set}" = set; then
14227   $as_echo_n "(cached) " >&6
14228 else
14229   ac_check_lib_save_LIBS=$LIBS
14230 LIBS="-lkrb4  $LIBS"
14231 cat >conftest.$ac_ext <<_ACEOF
14232 /* confdefs.h.  */
14233 _ACEOF
14234 cat confdefs.h >>conftest.$ac_ext
14235 cat >>conftest.$ac_ext <<_ACEOF
14236 /* end confdefs.h.  */
14237
14238 /* Override any GCC internal prototype to avoid an error.
14239    Use char because int might match the return type of a GCC
14240    builtin and then its argument prototype would still apply.  */
14241 #ifdef __cplusplus
14242 extern "C"
14243 #endif
14244 char krb_get_tf_realm ();
14245 int
14246 main ()
14247 {
14248 return krb_get_tf_realm ();
14249   ;
14250   return 0;
14251 }
14252 _ACEOF
14253 rm -rf conftest.$ac_objext conftest$ac_exeext
14254 if { (ac_try="$ac_link"
14255 case "(($ac_try" in
14256   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14257   *) ac_try_echo=$ac_try;;
14258 esac
14259 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
14260 $as_echo "$ac_try_echo") >&5
14261   (eval "$ac_link") 2>conftest.er1
14262   ac_status=$?
14263   grep -v '^ *+' conftest.er1 >conftest.err
14264   rm -rf conftest.er1
14265   cat conftest.err >&5
14266   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
14267   (exit $ac_status); } && {
14268          test -z "$ac_c_werror_flag" ||
14269          test ! -s conftest.err
14270        } && test -s conftest$ac_exeext && {
14271          test "$cross_compiling" = yes ||
14272          $as_test_x conftest$ac_exeext
14273        }; then
14274   ac_cv_lib_krb4_krb_get_tf_realm=yes
14275 else
14276   $as_echo "$as_me: failed program was:" >&5
14277 sed 's/^/| /' conftest.$ac_ext >&5
14278
14279         ac_cv_lib_krb4_krb_get_tf_realm=no
14280 fi
14281
14282 rm -rf conftest.dSYM
14283 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
14284       conftest$ac_exeext conftest.$ac_ext
14285 LIBS=$ac_check_lib_save_LIBS
14286 fi
14287 { $as_echo "$as_me:$LINENO: result: $ac_cv_lib_krb4_krb_get_tf_realm" >&5
14288 $as_echo "$ac_cv_lib_krb4_krb_get_tf_realm" >&6; }
14289 if test "x$ac_cv_lib_krb4_krb_get_tf_realm" = x""yes; then
14290   have_kerberos=yes
14291 else
14292   have_kerberos=no
14293 fi
14294
14295   CPPFLAGS="$ac_save_CPPFLAGS"
14296   LDFLAGS="$ac_save_LDFLAGS"
14297 #  LIBS="$ac_save_LIBS"
14298
14299     if test "$have_kerberos" = yes ; then
14300       have_kerberos5=yes
14301       cat >>confdefs.h <<\_ACEOF
14302 #define HAVE_KERBEROS 1
14303 _ACEOF
14304
14305       cat >>confdefs.h <<\_ACEOF
14306 #define HAVE_KERBEROS5 1
14307 _ACEOF
14308
14309     else
14310       have_kerberos5=no
14311       { $as_echo "$as_me:$LINENO: WARNING: Cannot find compat lib (libkrb4) needed to use Kerberos 5" >&5
14312 $as_echo "$as_me: WARNING: Cannot find compat lib (libkrb4) needed to use Kerberos 5" >&2;}
14313     fi
14314
14315   fi
14316
14317   if test "$have_kerberos5" = yes ; then
14318     # from Matt Knopp <mhat@infocalypse.netlag.com>
14319     # (who got it from amu@mit.edu)
14320
14321     PASSWD_LIBS="$PASSWD_LIBS -lkrb4 -ldes425 -lkrb5 -lk5crypto -lcom_err"
14322
14323     # jwz: MacOS X uses -lkrb5, but not -lcrypt
14324
14325   ac_save_CPPFLAGS="$CPPFLAGS"
14326   ac_save_LDFLAGS="$LDFLAGS"
14327 #  ac_save_LIBS="$LIBS"
14328
14329   if test \! -z "$includedir" ; then
14330     CPPFLAGS="$CPPFLAGS -I$includedir"
14331   fi
14332   # note: $X_CFLAGS includes $x_includes
14333   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
14334
14335   if test \! -z "$libdir" ; then
14336     LDFLAGS="$LDFLAGS -L$libdir"
14337   fi
14338   # note: $X_LIBS includes $x_libraries
14339   LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
14340
14341   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
14342   LDFLAGS=`eval eval eval eval eval eval eval eval eval echo $LDFLAGS`
14343   { $as_echo "$as_me:$LINENO: checking for crypt in -lcrypt" >&5
14344 $as_echo_n "checking for crypt in -lcrypt... " >&6; }
14345 if test "${ac_cv_lib_crypt_crypt+set}" = set; then
14346   $as_echo_n "(cached) " >&6
14347 else
14348   ac_check_lib_save_LIBS=$LIBS
14349 LIBS="-lcrypt  $LIBS"
14350 cat >conftest.$ac_ext <<_ACEOF
14351 /* confdefs.h.  */
14352 _ACEOF
14353 cat confdefs.h >>conftest.$ac_ext
14354 cat >>conftest.$ac_ext <<_ACEOF
14355 /* end confdefs.h.  */
14356
14357 /* Override any GCC internal prototype to avoid an error.
14358    Use char because int might match the return type of a GCC
14359    builtin and then its argument prototype would still apply.  */
14360 #ifdef __cplusplus
14361 extern "C"
14362 #endif
14363 char crypt ();
14364 int
14365 main ()
14366 {
14367 return crypt ();
14368   ;
14369   return 0;
14370 }
14371 _ACEOF
14372 rm -rf conftest.$ac_objext conftest$ac_exeext
14373 if { (ac_try="$ac_link"
14374 case "(($ac_try" in
14375   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14376   *) ac_try_echo=$ac_try;;
14377 esac
14378 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
14379 $as_echo "$ac_try_echo") >&5
14380   (eval "$ac_link") 2>conftest.er1
14381   ac_status=$?
14382   grep -v '^ *+' conftest.er1 >conftest.err
14383   rm -rf conftest.er1
14384   cat conftest.err >&5
14385   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
14386   (exit $ac_status); } && {
14387          test -z "$ac_c_werror_flag" ||
14388          test ! -s conftest.err
14389        } && test -s conftest$ac_exeext && {
14390          test "$cross_compiling" = yes ||
14391          $as_test_x conftest$ac_exeext
14392        }; then
14393   ac_cv_lib_crypt_crypt=yes
14394 else
14395   $as_echo "$as_me: failed program was:" >&5
14396 sed 's/^/| /' conftest.$ac_ext >&5
14397
14398         ac_cv_lib_crypt_crypt=no
14399 fi
14400
14401 rm -rf conftest.dSYM
14402 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
14403       conftest$ac_exeext conftest.$ac_ext
14404 LIBS=$ac_check_lib_save_LIBS
14405 fi
14406 { $as_echo "$as_me:$LINENO: result: $ac_cv_lib_crypt_crypt" >&5
14407 $as_echo "$ac_cv_lib_crypt_crypt" >&6; }
14408 if test "x$ac_cv_lib_crypt_crypt" = x""yes; then
14409   PASSWD_LIBS="$PASSWD_LIBS -lcrypt"
14410 fi
14411
14412   CPPFLAGS="$ac_save_CPPFLAGS"
14413   LDFLAGS="$ac_save_LDFLAGS"
14414 #  LIBS="$ac_save_LIBS"
14415
14416
14417   elif test "$have_kerberos" = yes ; then
14418     # from Tim Showalter <tjs@psaux.com> for FreeBSD 4.2
14419     PASSWD_LIBS="$PASSWD_LIBS -lkrb -ldes -lcom_err"
14420   fi
14421
14422   if test "$have_kerberos" = yes ; then
14423     { $as_echo "$as_me:$LINENO: checking for res_search" >&5
14424 $as_echo_n "checking for res_search... " >&6; }
14425 if test "${ac_cv_func_res_search+set}" = set; then
14426   $as_echo_n "(cached) " >&6
14427 else
14428   cat >conftest.$ac_ext <<_ACEOF
14429 /* confdefs.h.  */
14430 _ACEOF
14431 cat confdefs.h >>conftest.$ac_ext
14432 cat >>conftest.$ac_ext <<_ACEOF
14433 /* end confdefs.h.  */
14434 /* Define res_search to an innocuous variant, in case <limits.h> declares res_search.
14435    For example, HP-UX 11i <limits.h> declares gettimeofday.  */
14436 #define res_search innocuous_res_search
14437
14438 /* System header to define __stub macros and hopefully few prototypes,
14439     which can conflict with char res_search (); below.
14440     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
14441     <limits.h> exists even on freestanding compilers.  */
14442
14443 #ifdef __STDC__
14444 # include <limits.h>
14445 #else
14446 # include <assert.h>
14447 #endif
14448
14449 #undef res_search
14450
14451 /* Override any GCC internal prototype to avoid an error.
14452    Use char because int might match the return type of a GCC
14453    builtin and then its argument prototype would still apply.  */
14454 #ifdef __cplusplus
14455 extern "C"
14456 #endif
14457 char res_search ();
14458 /* The GNU C library defines this for functions which it implements
14459     to always fail with ENOSYS.  Some functions are actually named
14460     something starting with __ and the normal name is an alias.  */
14461 #if defined __stub_res_search || defined __stub___res_search
14462 choke me
14463 #endif
14464
14465 int
14466 main ()
14467 {
14468 return res_search ();
14469   ;
14470   return 0;
14471 }
14472 _ACEOF
14473 rm -rf conftest.$ac_objext conftest$ac_exeext
14474 if { (ac_try="$ac_link"
14475 case "(($ac_try" in
14476   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14477   *) ac_try_echo=$ac_try;;
14478 esac
14479 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
14480 $as_echo "$ac_try_echo") >&5
14481   (eval "$ac_link") 2>conftest.er1
14482   ac_status=$?
14483   grep -v '^ *+' conftest.er1 >conftest.err
14484   rm -rf conftest.er1
14485   cat conftest.err >&5
14486   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
14487   (exit $ac_status); } && {
14488          test -z "$ac_c_werror_flag" ||
14489          test ! -s conftest.err
14490        } && test -s conftest$ac_exeext && {
14491          test "$cross_compiling" = yes ||
14492          $as_test_x conftest$ac_exeext
14493        }; then
14494   ac_cv_func_res_search=yes
14495 else
14496   $as_echo "$as_me: failed program was:" >&5
14497 sed 's/^/| /' conftest.$ac_ext >&5
14498
14499         ac_cv_func_res_search=no
14500 fi
14501
14502 rm -rf conftest.dSYM
14503 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
14504       conftest$ac_exeext conftest.$ac_ext
14505 fi
14506 { $as_echo "$as_me:$LINENO: result: $ac_cv_func_res_search" >&5
14507 $as_echo "$ac_cv_func_res_search" >&6; }
14508 if test "x$ac_cv_func_res_search" = x""yes; then
14509   :
14510 else
14511   { $as_echo "$as_me:$LINENO: checking for res_search in -lresolv" >&5
14512 $as_echo_n "checking for res_search in -lresolv... " >&6; }
14513 if test "${ac_cv_lib_resolv_res_search+set}" = set; then
14514   $as_echo_n "(cached) " >&6
14515 else
14516   ac_check_lib_save_LIBS=$LIBS
14517 LIBS="-lresolv  $LIBS"
14518 cat >conftest.$ac_ext <<_ACEOF
14519 /* confdefs.h.  */
14520 _ACEOF
14521 cat confdefs.h >>conftest.$ac_ext
14522 cat >>conftest.$ac_ext <<_ACEOF
14523 /* end confdefs.h.  */
14524
14525 /* Override any GCC internal prototype to avoid an error.
14526    Use char because int might match the return type of a GCC
14527    builtin and then its argument prototype would still apply.  */
14528 #ifdef __cplusplus
14529 extern "C"
14530 #endif
14531 char res_search ();
14532 int
14533 main ()
14534 {
14535 return res_search ();
14536   ;
14537   return 0;
14538 }
14539 _ACEOF
14540 rm -rf conftest.$ac_objext conftest$ac_exeext
14541 if { (ac_try="$ac_link"
14542 case "(($ac_try" in
14543   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14544   *) ac_try_echo=$ac_try;;
14545 esac
14546 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
14547 $as_echo "$ac_try_echo") >&5
14548   (eval "$ac_link") 2>conftest.er1
14549   ac_status=$?
14550   grep -v '^ *+' conftest.er1 >conftest.err
14551   rm -rf conftest.er1
14552   cat conftest.err >&5
14553   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
14554   (exit $ac_status); } && {
14555          test -z "$ac_c_werror_flag" ||
14556          test ! -s conftest.err
14557        } && test -s conftest$ac_exeext && {
14558          test "$cross_compiling" = yes ||
14559          $as_test_x conftest$ac_exeext
14560        }; then
14561   ac_cv_lib_resolv_res_search=yes
14562 else
14563   $as_echo "$as_me: failed program was:" >&5
14564 sed 's/^/| /' conftest.$ac_ext >&5
14565
14566         ac_cv_lib_resolv_res_search=no
14567 fi
14568
14569 rm -rf conftest.dSYM
14570 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
14571       conftest$ac_exeext conftest.$ac_ext
14572 LIBS=$ac_check_lib_save_LIBS
14573 fi
14574 { $as_echo "$as_me:$LINENO: result: $ac_cv_lib_resolv_res_search" >&5
14575 $as_echo "$ac_cv_lib_resolv_res_search" >&6; }
14576 if test "x$ac_cv_lib_resolv_res_search" = x""yes; then
14577   PASSWD_LIBS="${PASSWD_LIBS} -lresolv"
14578 else
14579   { $as_echo "$as_me:$LINENO: WARNING: Can't find DNS resolver libraries needed for Kerberos" >&5
14580 $as_echo "$as_me: WARNING: Can't find DNS resolver libraries needed for Kerberos" >&2;}
14581
14582 fi
14583
14584 fi
14585
14586   fi
14587 fi
14588
14589
14590 ###############################################################################
14591 #
14592 #       Check for the nine billion variants of shadow passwords...
14593 #
14594 ###############################################################################
14595
14596 need_setuid=no
14597
14598 have_shadow=no
14599 with_shadow_req=unspecified
14600
14601
14602 # Check whether --with-shadow was given.
14603 if test "${with_shadow+set}" = set; then
14604   withval=$with_shadow; with_shadow="$withval"; with_shadow_req="$withval"
14605 else
14606   with_shadow=yes
14607 fi
14608
14609
14610
14611    case "$with_shadow" in
14612     yes) ;;
14613     no)  ;;
14614
14615     /*)
14616      { $as_echo "$as_me:$LINENO: checking for shadow password headers" >&5
14617 $as_echo_n "checking for shadow password headers... " >&6; }
14618      d=$with_shadow/include
14619      if test -d $d; then
14620        X_CFLAGS="-I$d $X_CFLAGS"
14621        { $as_echo "$as_me:$LINENO: result: $d" >&5
14622 $as_echo "$d" >&6; }
14623      else
14624        { $as_echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
14625 $as_echo "not found ($d: no such directory)" >&6; }
14626      fi
14627
14628      { $as_echo "$as_me:$LINENO: checking for shadow password libs" >&5
14629 $as_echo_n "checking for shadow password libs... " >&6; }
14630      d=$with_shadow/lib
14631      if test -d $d; then
14632        X_LIBS="-L$d $X_LIBS"
14633        { $as_echo "$as_me:$LINENO: result: $d" >&5
14634 $as_echo "$d" >&6; }
14635      else
14636        { $as_echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
14637 $as_echo "not found ($d: no such directory)" >&6; }
14638      fi
14639
14640      # replace the directory string with "yes".
14641      with_shadow_req="yes"
14642      with_shadow=$with_shadow_req
14643      ;;
14644
14645     *)
14646      echo ""
14647      echo "error: argument to --with-shadow must be \"yes\", \"no\", or a directory."
14648      echo "       If it is a directory, then \`DIR/include' will be added to"
14649      echo "       the -I list, and \`DIR/lib' will be added to the -L list."
14650      exit 1
14651      ;;
14652    esac
14653
14654
14655 if test "$enable_locking" = no ; then
14656   with_shadow_req=no
14657   with_shadow=no
14658 fi
14659
14660
14661 ###############################################################################
14662 #
14663 #       Check for Sun "adjunct" passwords.
14664 #
14665 ###############################################################################
14666
14667 if test "$with_shadow" = yes ; then
14668   { $as_echo "$as_me:$LINENO: checking for Sun-style shadow passwords" >&5
14669 $as_echo_n "checking for Sun-style shadow passwords... " >&6; }
14670 if test "${ac_cv_sun_adjunct+set}" = set; then
14671   $as_echo_n "(cached) " >&6
14672 else
14673
14674   ac_save_CPPFLAGS="$CPPFLAGS"
14675   if test \! -z "$includedir" ; then
14676     CPPFLAGS="$CPPFLAGS -I$includedir"
14677   fi
14678   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
14679   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
14680   cat >conftest.$ac_ext <<_ACEOF
14681 /* confdefs.h.  */
14682 _ACEOF
14683 cat confdefs.h >>conftest.$ac_ext
14684 cat >>conftest.$ac_ext <<_ACEOF
14685 /* end confdefs.h.  */
14686 #include <stdlib.h>
14687                                     #include <unistd.h>
14688                                     #include <sys/types.h>
14689                                     #include <sys/label.h>
14690                                     #include <sys/audit.h>
14691                                     #include <pwdadj.h>
14692 int
14693 main ()
14694 {
14695 struct passwd_adjunct *p = getpwanam("nobody");
14696                        const char *pw = p->pwa_passwd;
14697   ;
14698   return 0;
14699 }
14700 _ACEOF
14701 rm -rf conftest.$ac_objext
14702 if { (ac_try="$ac_compile"
14703 case "(($ac_try" in
14704   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14705   *) ac_try_echo=$ac_try;;
14706 esac
14707 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
14708 $as_echo "$ac_try_echo") >&5
14709   (eval "$ac_compile") 2>conftest.er1
14710   ac_status=$?
14711   grep -v '^ *+' conftest.er1 >conftest.err
14712   rm -rf conftest.er1
14713   cat conftest.err >&5
14714   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
14715   (exit $ac_status); } && {
14716          test -z "$ac_c_werror_flag" ||
14717          test ! -s conftest.err
14718        } && test -s conftest.$ac_objext; then
14719   ac_cv_sun_adjunct=yes
14720 else
14721   $as_echo "$as_me: failed program was:" >&5
14722 sed 's/^/| /' conftest.$ac_ext >&5
14723
14724         ac_cv_sun_adjunct=no
14725 fi
14726
14727 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14728   CPPFLAGS="$ac_save_CPPFLAGS"
14729 fi
14730 { $as_echo "$as_me:$LINENO: result: $ac_cv_sun_adjunct" >&5
14731 $as_echo "$ac_cv_sun_adjunct" >&6; }
14732   if test "$ac_cv_sun_adjunct" = yes; then
14733     have_shadow_adjunct=yes
14734     have_shadow=yes
14735     need_setuid=yes
14736   fi
14737 fi
14738
14739
14740 ###############################################################################
14741 #
14742 #       Check for DEC and SCO so-called "enhanced" security.
14743 #
14744 ###############################################################################
14745
14746 if test "$with_shadow" = yes ; then
14747   { $as_echo "$as_me:$LINENO: checking for DEC-style shadow passwords" >&5
14748 $as_echo_n "checking for DEC-style shadow passwords... " >&6; }
14749 if test "${ac_cv_enhanced_passwd+set}" = set; then
14750   $as_echo_n "(cached) " >&6
14751 else
14752
14753   ac_save_CPPFLAGS="$CPPFLAGS"
14754   if test \! -z "$includedir" ; then
14755     CPPFLAGS="$CPPFLAGS -I$includedir"
14756   fi
14757   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
14758   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
14759   cat >conftest.$ac_ext <<_ACEOF
14760 /* confdefs.h.  */
14761 _ACEOF
14762 cat confdefs.h >>conftest.$ac_ext
14763 cat >>conftest.$ac_ext <<_ACEOF
14764 /* end confdefs.h.  */
14765 #include <stdlib.h>
14766                                     #include <unistd.h>
14767                                     #include <sys/types.h>
14768                                     #include <pwd.h>
14769                                     #include <sys/security.h>
14770                                     #include <prot.h>
14771 int
14772 main ()
14773 {
14774 struct pr_passwd *p;
14775                        const char *pw;
14776                        set_auth_parameters(0, 0);
14777                        check_auth_parameters();
14778                        p = getprpwnam("nobody");
14779                        pw = p->ufld.fd_encrypt;
14780   ;
14781   return 0;
14782 }
14783 _ACEOF
14784 rm -rf conftest.$ac_objext
14785 if { (ac_try="$ac_compile"
14786 case "(($ac_try" in
14787   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14788   *) ac_try_echo=$ac_try;;
14789 esac
14790 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
14791 $as_echo "$ac_try_echo") >&5
14792   (eval "$ac_compile") 2>conftest.er1
14793   ac_status=$?
14794   grep -v '^ *+' conftest.er1 >conftest.err
14795   rm -rf conftest.er1
14796   cat conftest.err >&5
14797   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
14798   (exit $ac_status); } && {
14799          test -z "$ac_c_werror_flag" ||
14800          test ! -s conftest.err
14801        } && test -s conftest.$ac_objext; then
14802   ac_cv_enhanced_passwd=yes
14803 else
14804   $as_echo "$as_me: failed program was:" >&5
14805 sed 's/^/| /' conftest.$ac_ext >&5
14806
14807         ac_cv_enhanced_passwd=no
14808 fi
14809
14810 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14811   CPPFLAGS="$ac_save_CPPFLAGS"
14812 fi
14813 { $as_echo "$as_me:$LINENO: result: $ac_cv_enhanced_passwd" >&5
14814 $as_echo "$ac_cv_enhanced_passwd" >&6; }
14815   if test $ac_cv_enhanced_passwd = yes; then
14816     have_shadow_enhanced=yes
14817     have_shadow=yes
14818     need_setuid=yes
14819
14820     # On SCO, getprpwnam() is in -lprot (which uses nap() from -lx)
14821     # (I'm told it needs -lcurses too, but I don't understand why.)
14822     # But on DEC, it's in -lsecurity.
14823     #
14824     { $as_echo "$as_me:$LINENO: checking for getprpwnam in -lprot" >&5
14825 $as_echo_n "checking for getprpwnam in -lprot... " >&6; }
14826 if test "${ac_cv_lib_prot_getprpwnam+set}" = set; then
14827   $as_echo_n "(cached) " >&6
14828 else
14829   ac_check_lib_save_LIBS=$LIBS
14830 LIBS="-lprot -lx $LIBS"
14831 cat >conftest.$ac_ext <<_ACEOF
14832 /* confdefs.h.  */
14833 _ACEOF
14834 cat confdefs.h >>conftest.$ac_ext
14835 cat >>conftest.$ac_ext <<_ACEOF
14836 /* end confdefs.h.  */
14837
14838 /* Override any GCC internal prototype to avoid an error.
14839    Use char because int might match the return type of a GCC
14840    builtin and then its argument prototype would still apply.  */
14841 #ifdef __cplusplus
14842 extern "C"
14843 #endif
14844 char getprpwnam ();
14845 int
14846 main ()
14847 {
14848 return getprpwnam ();
14849   ;
14850   return 0;
14851 }
14852 _ACEOF
14853 rm -rf conftest.$ac_objext conftest$ac_exeext
14854 if { (ac_try="$ac_link"
14855 case "(($ac_try" in
14856   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14857   *) ac_try_echo=$ac_try;;
14858 esac
14859 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
14860 $as_echo "$ac_try_echo") >&5
14861   (eval "$ac_link") 2>conftest.er1
14862   ac_status=$?
14863   grep -v '^ *+' conftest.er1 >conftest.err
14864   rm -rf conftest.er1
14865   cat conftest.err >&5
14866   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
14867   (exit $ac_status); } && {
14868          test -z "$ac_c_werror_flag" ||
14869          test ! -s conftest.err
14870        } && test -s conftest$ac_exeext && {
14871          test "$cross_compiling" = yes ||
14872          $as_test_x conftest$ac_exeext
14873        }; then
14874   ac_cv_lib_prot_getprpwnam=yes
14875 else
14876   $as_echo "$as_me: failed program was:" >&5
14877 sed 's/^/| /' conftest.$ac_ext >&5
14878
14879         ac_cv_lib_prot_getprpwnam=no
14880 fi
14881
14882 rm -rf conftest.dSYM
14883 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
14884       conftest$ac_exeext conftest.$ac_ext
14885 LIBS=$ac_check_lib_save_LIBS
14886 fi
14887 { $as_echo "$as_me:$LINENO: result: $ac_cv_lib_prot_getprpwnam" >&5
14888 $as_echo "$ac_cv_lib_prot_getprpwnam" >&6; }
14889 if test "x$ac_cv_lib_prot_getprpwnam" = x""yes; then
14890   PASSWD_LIBS="$PASSWD_LIBS -lprot -lcurses -lx"
14891 else
14892   { $as_echo "$as_me:$LINENO: checking for getprpwnam in -lsecurity" >&5
14893 $as_echo_n "checking for getprpwnam in -lsecurity... " >&6; }
14894 if test "${ac_cv_lib_security_getprpwnam+set}" = set; then
14895   $as_echo_n "(cached) " >&6
14896 else
14897   ac_check_lib_save_LIBS=$LIBS
14898 LIBS="-lsecurity  $LIBS"
14899 cat >conftest.$ac_ext <<_ACEOF
14900 /* confdefs.h.  */
14901 _ACEOF
14902 cat confdefs.h >>conftest.$ac_ext
14903 cat >>conftest.$ac_ext <<_ACEOF
14904 /* end confdefs.h.  */
14905
14906 /* Override any GCC internal prototype to avoid an error.
14907    Use char because int might match the return type of a GCC
14908    builtin and then its argument prototype would still apply.  */
14909 #ifdef __cplusplus
14910 extern "C"
14911 #endif
14912 char getprpwnam ();
14913 int
14914 main ()
14915 {
14916 return getprpwnam ();
14917   ;
14918   return 0;
14919 }
14920 _ACEOF
14921 rm -rf conftest.$ac_objext conftest$ac_exeext
14922 if { (ac_try="$ac_link"
14923 case "(($ac_try" in
14924   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14925   *) ac_try_echo=$ac_try;;
14926 esac
14927 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
14928 $as_echo "$ac_try_echo") >&5
14929   (eval "$ac_link") 2>conftest.er1
14930   ac_status=$?
14931   grep -v '^ *+' conftest.er1 >conftest.err
14932   rm -rf conftest.er1
14933   cat conftest.err >&5
14934   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
14935   (exit $ac_status); } && {
14936          test -z "$ac_c_werror_flag" ||
14937          test ! -s conftest.err
14938        } && test -s conftest$ac_exeext && {
14939          test "$cross_compiling" = yes ||
14940          $as_test_x conftest$ac_exeext
14941        }; then
14942   ac_cv_lib_security_getprpwnam=yes
14943 else
14944   $as_echo "$as_me: failed program was:" >&5
14945 sed 's/^/| /' conftest.$ac_ext >&5
14946
14947         ac_cv_lib_security_getprpwnam=no
14948 fi
14949
14950 rm -rf conftest.dSYM
14951 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
14952       conftest$ac_exeext conftest.$ac_ext
14953 LIBS=$ac_check_lib_save_LIBS
14954 fi
14955 { $as_echo "$as_me:$LINENO: result: $ac_cv_lib_security_getprpwnam" >&5
14956 $as_echo "$ac_cv_lib_security_getprpwnam" >&6; }
14957 if test "x$ac_cv_lib_security_getprpwnam" = x""yes; then
14958   PASSWD_LIBS="$PASSWD_LIBS -lsecurity"
14959 fi
14960
14961 fi
14962
14963   fi
14964 fi
14965
14966 ###############################################################################
14967 #
14968 #       Check for HP's entry in the "Not Invented Here" Sweepstakes.
14969 #
14970 ###############################################################################
14971
14972 if test "$with_shadow" = yes ; then
14973   { $as_echo "$as_me:$LINENO: checking for HP-style shadow passwords" >&5
14974 $as_echo_n "checking for HP-style shadow passwords... " >&6; }
14975 if test "${ac_cv_hpux_passwd+set}" = set; then
14976   $as_echo_n "(cached) " >&6
14977 else
14978
14979   ac_save_CPPFLAGS="$CPPFLAGS"
14980   if test \! -z "$includedir" ; then
14981     CPPFLAGS="$CPPFLAGS -I$includedir"
14982   fi
14983   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
14984   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
14985   cat >conftest.$ac_ext <<_ACEOF
14986 /* confdefs.h.  */
14987 _ACEOF
14988 cat confdefs.h >>conftest.$ac_ext
14989 cat >>conftest.$ac_ext <<_ACEOF
14990 /* end confdefs.h.  */
14991 #include <stdlib.h>
14992                                     #include <unistd.h>
14993                                     #include <sys/types.h>
14994                                     #include <pwd.h>
14995                                     #include <hpsecurity.h>
14996                                     #include <prot.h>
14997 int
14998 main ()
14999 {
15000 struct s_passwd *p = getspwnam("nobody");
15001                        const char *pw = p->pw_passwd;
15002   ;
15003   return 0;
15004 }
15005 _ACEOF
15006 rm -rf conftest.$ac_objext
15007 if { (ac_try="$ac_compile"
15008 case "(($ac_try" in
15009   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15010   *) ac_try_echo=$ac_try;;
15011 esac
15012 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
15013 $as_echo "$ac_try_echo") >&5
15014   (eval "$ac_compile") 2>conftest.er1
15015   ac_status=$?
15016   grep -v '^ *+' conftest.er1 >conftest.err
15017   rm -rf conftest.er1
15018   cat conftest.err >&5
15019   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
15020   (exit $ac_status); } && {
15021          test -z "$ac_c_werror_flag" ||
15022          test ! -s conftest.err
15023        } && test -s conftest.$ac_objext; then
15024   ac_cv_hpux_passwd=yes
15025 else
15026   $as_echo "$as_me: failed program was:" >&5
15027 sed 's/^/| /' conftest.$ac_ext >&5
15028
15029         ac_cv_hpux_passwd=no
15030 fi
15031
15032 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15033   CPPFLAGS="$ac_save_CPPFLAGS"
15034 fi
15035 { $as_echo "$as_me:$LINENO: result: $ac_cv_hpux_passwd" >&5
15036 $as_echo "$ac_cv_hpux_passwd" >&6; }
15037   if test "$ac_cv_hpux_passwd" = yes; then
15038     have_shadow_hpux=yes
15039     have_shadow=yes
15040     need_setuid=yes
15041
15042     # on HPUX, bigcrypt is in -lsec
15043     { $as_echo "$as_me:$LINENO: checking for bigcrypt in -lsec" >&5
15044 $as_echo_n "checking for bigcrypt in -lsec... " >&6; }
15045 if test "${ac_cv_lib_sec_bigcrypt+set}" = set; then
15046   $as_echo_n "(cached) " >&6
15047 else
15048   ac_check_lib_save_LIBS=$LIBS
15049 LIBS="-lsec  $LIBS"
15050 cat >conftest.$ac_ext <<_ACEOF
15051 /* confdefs.h.  */
15052 _ACEOF
15053 cat confdefs.h >>conftest.$ac_ext
15054 cat >>conftest.$ac_ext <<_ACEOF
15055 /* end confdefs.h.  */
15056
15057 /* Override any GCC internal prototype to avoid an error.
15058    Use char because int might match the return type of a GCC
15059    builtin and then its argument prototype would still apply.  */
15060 #ifdef __cplusplus
15061 extern "C"
15062 #endif
15063 char bigcrypt ();
15064 int
15065 main ()
15066 {
15067 return bigcrypt ();
15068   ;
15069   return 0;
15070 }
15071 _ACEOF
15072 rm -rf conftest.$ac_objext conftest$ac_exeext
15073 if { (ac_try="$ac_link"
15074 case "(($ac_try" in
15075   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15076   *) ac_try_echo=$ac_try;;
15077 esac
15078 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
15079 $as_echo "$ac_try_echo") >&5
15080   (eval "$ac_link") 2>conftest.er1
15081   ac_status=$?
15082   grep -v '^ *+' conftest.er1 >conftest.err
15083   rm -rf conftest.er1
15084   cat conftest.err >&5
15085   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
15086   (exit $ac_status); } && {
15087          test -z "$ac_c_werror_flag" ||
15088          test ! -s conftest.err
15089        } && test -s conftest$ac_exeext && {
15090          test "$cross_compiling" = yes ||
15091          $as_test_x conftest$ac_exeext
15092        }; then
15093   ac_cv_lib_sec_bigcrypt=yes
15094 else
15095   $as_echo "$as_me: failed program was:" >&5
15096 sed 's/^/| /' conftest.$ac_ext >&5
15097
15098         ac_cv_lib_sec_bigcrypt=no
15099 fi
15100
15101 rm -rf conftest.dSYM
15102 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
15103       conftest$ac_exeext conftest.$ac_ext
15104 LIBS=$ac_check_lib_save_LIBS
15105 fi
15106 { $as_echo "$as_me:$LINENO: result: $ac_cv_lib_sec_bigcrypt" >&5
15107 $as_echo "$ac_cv_lib_sec_bigcrypt" >&6; }
15108 if test "x$ac_cv_lib_sec_bigcrypt" = x""yes; then
15109   PASSWD_LIBS="$PASSWD_LIBS -lsec"
15110 fi
15111
15112   fi
15113 fi
15114
15115
15116 ###############################################################################
15117 #
15118 #       Check for FreeBSD-style shadow passwords.
15119 #
15120 #       On FreeBSD, getpwnam() and friends work just like on non-shadow-
15121 #       password systems -- except you only get stuff in the pw_passwd field
15122 #       if the running program is setuid.  So, guess that we've got this
15123 #       lossage to contend with if /etc/master.passwd exists, and default to
15124 #       a setuid installation.
15125 #
15126 ###############################################################################
15127
15128 if test "$with_shadow" = yes ; then
15129   { $as_echo "$as_me:$LINENO: checking for FreeBSD-style shadow passwords" >&5
15130 $as_echo_n "checking for FreeBSD-style shadow passwords... " >&6; }
15131 if test "${ac_cv_master_passwd+set}" = set; then
15132   $as_echo_n "(cached) " >&6
15133 else
15134   if test -f /etc/master.passwd ; then
15135                     ac_cv_master_passwd=yes
15136                   else
15137                     ac_cv_master_passwd=no
15138                   fi
15139 fi
15140 { $as_echo "$as_me:$LINENO: result: $ac_cv_master_passwd" >&5
15141 $as_echo "$ac_cv_master_passwd" >&6; }
15142   if test "$ac_cv_master_passwd" = yes; then
15143     need_setuid=yes
15144   fi
15145 fi
15146
15147
15148 ###############################################################################
15149 #
15150 #       Check for traditional (ha!) shadow passwords.
15151 #
15152 ###############################################################################
15153
15154 if test "$with_shadow" = yes ; then
15155   { $as_echo "$as_me:$LINENO: checking for generic shadow passwords" >&5
15156 $as_echo_n "checking for generic shadow passwords... " >&6; }
15157 if test "${ac_cv_shadow+set}" = set; then
15158   $as_echo_n "(cached) " >&6
15159 else
15160
15161   ac_save_CPPFLAGS="$CPPFLAGS"
15162   if test \! -z "$includedir" ; then
15163     CPPFLAGS="$CPPFLAGS -I$includedir"
15164   fi
15165   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
15166   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
15167   cat >conftest.$ac_ext <<_ACEOF
15168 /* confdefs.h.  */
15169 _ACEOF
15170 cat confdefs.h >>conftest.$ac_ext
15171 cat >>conftest.$ac_ext <<_ACEOF
15172 /* end confdefs.h.  */
15173 #include <stdlib.h>
15174                                     #include <unistd.h>
15175                                     #include <sys/types.h>
15176                                     #include <pwd.h>
15177                                     #include <shadow.h>
15178 int
15179 main ()
15180 {
15181 struct spwd *p = getspnam("nobody");
15182                        const char *pw = p->sp_pwdp;
15183   ;
15184   return 0;
15185 }
15186 _ACEOF
15187 rm -rf conftest.$ac_objext
15188 if { (ac_try="$ac_compile"
15189 case "(($ac_try" in
15190   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15191   *) ac_try_echo=$ac_try;;
15192 esac
15193 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
15194 $as_echo "$ac_try_echo") >&5
15195   (eval "$ac_compile") 2>conftest.er1
15196   ac_status=$?
15197   grep -v '^ *+' conftest.er1 >conftest.err
15198   rm -rf conftest.er1
15199   cat conftest.err >&5
15200   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
15201   (exit $ac_status); } && {
15202          test -z "$ac_c_werror_flag" ||
15203          test ! -s conftest.err
15204        } && test -s conftest.$ac_objext; then
15205   ac_cv_shadow=yes
15206 else
15207   $as_echo "$as_me: failed program was:" >&5
15208 sed 's/^/| /' conftest.$ac_ext >&5
15209
15210         ac_cv_shadow=no
15211 fi
15212
15213 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15214   CPPFLAGS="$ac_save_CPPFLAGS"
15215 fi
15216 { $as_echo "$as_me:$LINENO: result: $ac_cv_shadow" >&5
15217 $as_echo "$ac_cv_shadow" >&6; }
15218   if test "$ac_cv_shadow" = yes; then
15219     have_shadow=yes
15220     need_setuid=yes
15221
15222     # On some systems (UnixWare 2.1), getspnam() is in -lgen instead of -lc.
15223     have_getspnam=no
15224     { $as_echo "$as_me:$LINENO: checking for getspnam in -lc" >&5
15225 $as_echo_n "checking for getspnam in -lc... " >&6; }
15226 if test "${ac_cv_lib_c_getspnam+set}" = set; then
15227   $as_echo_n "(cached) " >&6
15228 else
15229   ac_check_lib_save_LIBS=$LIBS
15230 LIBS="-lc  $LIBS"
15231 cat >conftest.$ac_ext <<_ACEOF
15232 /* confdefs.h.  */
15233 _ACEOF
15234 cat confdefs.h >>conftest.$ac_ext
15235 cat >>conftest.$ac_ext <<_ACEOF
15236 /* end confdefs.h.  */
15237
15238 /* Override any GCC internal prototype to avoid an error.
15239    Use char because int might match the return type of a GCC
15240    builtin and then its argument prototype would still apply.  */
15241 #ifdef __cplusplus
15242 extern "C"
15243 #endif
15244 char getspnam ();
15245 int
15246 main ()
15247 {
15248 return getspnam ();
15249   ;
15250   return 0;
15251 }
15252 _ACEOF
15253 rm -rf conftest.$ac_objext conftest$ac_exeext
15254 if { (ac_try="$ac_link"
15255 case "(($ac_try" in
15256   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15257   *) ac_try_echo=$ac_try;;
15258 esac
15259 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
15260 $as_echo "$ac_try_echo") >&5
15261   (eval "$ac_link") 2>conftest.er1
15262   ac_status=$?
15263   grep -v '^ *+' conftest.er1 >conftest.err
15264   rm -rf conftest.er1
15265   cat conftest.err >&5
15266   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
15267   (exit $ac_status); } && {
15268          test -z "$ac_c_werror_flag" ||
15269          test ! -s conftest.err
15270        } && test -s conftest$ac_exeext && {
15271          test "$cross_compiling" = yes ||
15272          $as_test_x conftest$ac_exeext
15273        }; then
15274   ac_cv_lib_c_getspnam=yes
15275 else
15276   $as_echo "$as_me: failed program was:" >&5
15277 sed 's/^/| /' conftest.$ac_ext >&5
15278
15279         ac_cv_lib_c_getspnam=no
15280 fi
15281
15282 rm -rf conftest.dSYM
15283 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
15284       conftest$ac_exeext conftest.$ac_ext
15285 LIBS=$ac_check_lib_save_LIBS
15286 fi
15287 { $as_echo "$as_me:$LINENO: result: $ac_cv_lib_c_getspnam" >&5
15288 $as_echo "$ac_cv_lib_c_getspnam" >&6; }
15289 if test "x$ac_cv_lib_c_getspnam" = x""yes; then
15290   have_getspnam=yes
15291 fi
15292
15293     if test "$have_getspnam" = no ; then
15294       { $as_echo "$as_me:$LINENO: checking for getspnam in -lgen" >&5
15295 $as_echo_n "checking for getspnam in -lgen... " >&6; }
15296 if test "${ac_cv_lib_gen_getspnam+set}" = set; then
15297   $as_echo_n "(cached) " >&6
15298 else
15299   ac_check_lib_save_LIBS=$LIBS
15300 LIBS="-lgen  $LIBS"
15301 cat >conftest.$ac_ext <<_ACEOF
15302 /* confdefs.h.  */
15303 _ACEOF
15304 cat confdefs.h >>conftest.$ac_ext
15305 cat >>conftest.$ac_ext <<_ACEOF
15306 /* end confdefs.h.  */
15307
15308 /* Override any GCC internal prototype to avoid an error.
15309    Use char because int might match the return type of a GCC
15310    builtin and then its argument prototype would still apply.  */
15311 #ifdef __cplusplus
15312 extern "C"
15313 #endif
15314 char getspnam ();
15315 int
15316 main ()
15317 {
15318 return getspnam ();
15319   ;
15320   return 0;
15321 }
15322 _ACEOF
15323 rm -rf conftest.$ac_objext conftest$ac_exeext
15324 if { (ac_try="$ac_link"
15325 case "(($ac_try" in
15326   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15327   *) ac_try_echo=$ac_try;;
15328 esac
15329 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
15330 $as_echo "$ac_try_echo") >&5
15331   (eval "$ac_link") 2>conftest.er1
15332   ac_status=$?
15333   grep -v '^ *+' conftest.er1 >conftest.err
15334   rm -rf conftest.er1
15335   cat conftest.err >&5
15336   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
15337   (exit $ac_status); } && {
15338          test -z "$ac_c_werror_flag" ||
15339          test ! -s conftest.err
15340        } && test -s conftest$ac_exeext && {
15341          test "$cross_compiling" = yes ||
15342          $as_test_x conftest$ac_exeext
15343        }; then
15344   ac_cv_lib_gen_getspnam=yes
15345 else
15346   $as_echo "$as_me: failed program was:" >&5
15347 sed 's/^/| /' conftest.$ac_ext >&5
15348
15349         ac_cv_lib_gen_getspnam=no
15350 fi
15351
15352 rm -rf conftest.dSYM
15353 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
15354       conftest$ac_exeext conftest.$ac_ext
15355 LIBS=$ac_check_lib_save_LIBS
15356 fi
15357 { $as_echo "$as_me:$LINENO: result: $ac_cv_lib_gen_getspnam" >&5
15358 $as_echo "$ac_cv_lib_gen_getspnam" >&6; }
15359 if test "x$ac_cv_lib_gen_getspnam" = x""yes; then
15360   have_getspnam=yes; PASSWD_LIBS="$PASSWD_LIBS -lgen"
15361 fi
15362
15363     fi
15364   fi
15365 fi
15366
15367
15368 ###############################################################################
15369 #
15370 #       Check for other libraries needed for non-shadow passwords.
15371 #
15372 ###############################################################################
15373
15374 if test "$enable_locking" = yes ; then
15375
15376   # On some systems (UnixWare 2.1), crypt() is in -lcrypt instead of -lc.
15377   have_crypt=no
15378   { $as_echo "$as_me:$LINENO: checking for crypt in -lc" >&5
15379 $as_echo_n "checking for crypt in -lc... " >&6; }
15380 if test "${ac_cv_lib_c_crypt+set}" = set; then
15381   $as_echo_n "(cached) " >&6
15382 else
15383   ac_check_lib_save_LIBS=$LIBS
15384 LIBS="-lc  $LIBS"
15385 cat >conftest.$ac_ext <<_ACEOF
15386 /* confdefs.h.  */
15387 _ACEOF
15388 cat confdefs.h >>conftest.$ac_ext
15389 cat >>conftest.$ac_ext <<_ACEOF
15390 /* end confdefs.h.  */
15391
15392 /* Override any GCC internal prototype to avoid an error.
15393    Use char because int might match the return type of a GCC
15394    builtin and then its argument prototype would still apply.  */
15395 #ifdef __cplusplus
15396 extern "C"
15397 #endif
15398 char crypt ();
15399 int
15400 main ()
15401 {
15402 return crypt ();
15403   ;
15404   return 0;
15405 }
15406 _ACEOF
15407 rm -rf conftest.$ac_objext conftest$ac_exeext
15408 if { (ac_try="$ac_link"
15409 case "(($ac_try" in
15410   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15411   *) ac_try_echo=$ac_try;;
15412 esac
15413 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
15414 $as_echo "$ac_try_echo") >&5
15415   (eval "$ac_link") 2>conftest.er1
15416   ac_status=$?
15417   grep -v '^ *+' conftest.er1 >conftest.err
15418   rm -rf conftest.er1
15419   cat conftest.err >&5
15420   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
15421   (exit $ac_status); } && {
15422          test -z "$ac_c_werror_flag" ||
15423          test ! -s conftest.err
15424        } && test -s conftest$ac_exeext && {
15425          test "$cross_compiling" = yes ||
15426          $as_test_x conftest$ac_exeext
15427        }; then
15428   ac_cv_lib_c_crypt=yes
15429 else
15430   $as_echo "$as_me: failed program was:" >&5
15431 sed 's/^/| /' conftest.$ac_ext >&5
15432
15433         ac_cv_lib_c_crypt=no
15434 fi
15435
15436 rm -rf conftest.dSYM
15437 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
15438       conftest$ac_exeext conftest.$ac_ext
15439 LIBS=$ac_check_lib_save_LIBS
15440 fi
15441 { $as_echo "$as_me:$LINENO: result: $ac_cv_lib_c_crypt" >&5
15442 $as_echo "$ac_cv_lib_c_crypt" >&6; }
15443 if test "x$ac_cv_lib_c_crypt" = x""yes; then
15444   have_crypt=yes
15445 fi
15446
15447   if test "$have_crypt" = no ; then
15448     { $as_echo "$as_me:$LINENO: checking for crypt in -lcrypt" >&5
15449 $as_echo_n "checking for crypt in -lcrypt... " >&6; }
15450 if test "${ac_cv_lib_crypt_crypt+set}" = set; then
15451   $as_echo_n "(cached) " >&6
15452 else
15453   ac_check_lib_save_LIBS=$LIBS
15454 LIBS="-lcrypt  $LIBS"
15455 cat >conftest.$ac_ext <<_ACEOF
15456 /* confdefs.h.  */
15457 _ACEOF
15458 cat confdefs.h >>conftest.$ac_ext
15459 cat >>conftest.$ac_ext <<_ACEOF
15460 /* end confdefs.h.  */
15461
15462 /* Override any GCC internal prototype to avoid an error.
15463    Use char because int might match the return type of a GCC
15464    builtin and then its argument prototype would still apply.  */
15465 #ifdef __cplusplus
15466 extern "C"
15467 #endif
15468 char crypt ();
15469 int
15470 main ()
15471 {
15472 return crypt ();
15473   ;
15474   return 0;
15475 }
15476 _ACEOF
15477 rm -rf conftest.$ac_objext conftest$ac_exeext
15478 if { (ac_try="$ac_link"
15479 case "(($ac_try" in
15480   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15481   *) ac_try_echo=$ac_try;;
15482 esac
15483 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
15484 $as_echo "$ac_try_echo") >&5
15485   (eval "$ac_link") 2>conftest.er1
15486   ac_status=$?
15487   grep -v '^ *+' conftest.er1 >conftest.err
15488   rm -rf conftest.er1
15489   cat conftest.err >&5
15490   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
15491   (exit $ac_status); } && {
15492          test -z "$ac_c_werror_flag" ||
15493          test ! -s conftest.err
15494        } && test -s conftest$ac_exeext && {
15495          test "$cross_compiling" = yes ||
15496          $as_test_x conftest$ac_exeext
15497        }; then
15498   ac_cv_lib_crypt_crypt=yes
15499 else
15500   $as_echo "$as_me: failed program was:" >&5
15501 sed 's/^/| /' conftest.$ac_ext >&5
15502
15503         ac_cv_lib_crypt_crypt=no
15504 fi
15505
15506 rm -rf conftest.dSYM
15507 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
15508       conftest$ac_exeext conftest.$ac_ext
15509 LIBS=$ac_check_lib_save_LIBS
15510 fi
15511 { $as_echo "$as_me:$LINENO: result: $ac_cv_lib_crypt_crypt" >&5
15512 $as_echo "$ac_cv_lib_crypt_crypt" >&6; }
15513 if test "x$ac_cv_lib_crypt_crypt" = x""yes; then
15514   have_crypt=yes; PASSWD_LIBS="$PASSWD_LIBS -lcrypt"
15515 fi
15516
15517   fi
15518 fi
15519
15520
15521 # Most of the above shadow mechanisms will have set need_setuid to yes,
15522 # if they were found.  But, on some systems, we need setuid even when
15523 # using plain old vanilla passwords.
15524 #
15525 if test "$enable_locking" = yes ; then
15526   case "$host" in
15527     *-hpux* | *-aix* | *-netbsd* | *-freebsd* | *-openbsd* )
15528       need_setuid=yes
15529     ;;
15530   esac
15531 fi
15532
15533
15534 if test "$have_shadow_adjunct" = yes ; then
15535   cat >>confdefs.h <<\_ACEOF
15536 #define HAVE_ADJUNCT_PASSWD 1
15537 _ACEOF
15538
15539 elif test "$have_shadow_enhanced" = yes ; then
15540   cat >>confdefs.h <<\_ACEOF
15541 #define HAVE_ENHANCED_PASSWD 1
15542 _ACEOF
15543
15544 elif test "$have_shadow_hpux" = yes ; then
15545   cat >>confdefs.h <<\_ACEOF
15546 #define HAVE_HPUX_PASSWD 1
15547 _ACEOF
15548
15549 elif test "$have_shadow" = yes ; then
15550   cat >>confdefs.h <<\_ACEOF
15551 #define HAVE_SHADOW_PASSWD 1
15552 _ACEOF
15553
15554 fi
15555
15556
15557 ###############################################################################
15558 #
15559 #       Check for external password helper
15560 #       On SuSE, instead of having xscreensaver be a setuid program, they
15561 #       fork an external program that takes the password on stdin, and
15562 #       returns true if that password is a valid one.  Then only that
15563 #       smaller program needs to be setuid.
15564 #
15565 #       (Note that this external program is not a GUI: the GUI is still
15566 #       all in xscreensaver itself; the external program just does auth.)
15567 #
15568 ###############################################################################
15569
15570 have_passwd_helper=no
15571 with_passwd_helper_req=unspecified
15572
15573
15574 # Check whether --with-passwd-helper was given.
15575 if test "${with_passwd_helper+set}" = set; then
15576   withval=$with_passwd_helper; with_passwd_helper="$withval"; with_passwd_helper_req="$withval"
15577 else
15578   with_passwd_helper=no
15579 fi
15580
15581 # no HANDLE_X_PATH_ARG for this one
15582
15583 if test "$enable_locking" = no ; then
15584   with_passwd_helper_req=no
15585   with_passwd_helper=no
15586 fi
15587
15588 case "$with_passwd_helper" in
15589   ""|no) : ;;
15590   /*)
15591     cat >>confdefs.h <<_ACEOF
15592 #define PASSWD_HELPER_PROGRAM "$with_passwd_helper"
15593 _ACEOF
15594
15595     have_passwd_helper=yes;;
15596   *)
15597     echo "error: --with-passwd-helper needs full pathname of helper (not '$with_passwd_helper')." >&2
15598     exit 1
15599 esac
15600
15601
15602 ###############################################################################
15603 #
15604 #       Check for a login manager for a "New Login" button on the lock dialog.
15605 #       Usually this will be "/usr/bin/gdmflexiserver".
15606 #
15607 ###############################################################################
15608
15609 have_login_manager=no
15610 with_login_manager_req=unspecified
15611 default_login_manager='gdmflexiserver -ls'
15612
15613
15614 # Check whether --with-login-manager was given.
15615 if test "${with_login_manager+set}" = set; then
15616   withval=$with_login_manager; with_login_manager="$withval"; with_login_manager_req="$withval"
15617 else
15618   with_login_manager=no
15619 fi
15620
15621 # no HANDLE_X_PATH_ARG for this one
15622
15623 if test "$enable_locking" = no ; then
15624   with_login_manager_req=no
15625   with_login_manager=no
15626 fi
15627
15628 if test -n "$with_login_manager_req" ; then
15629   ac_cv_login_manager_program=""
15630
15631  if test "$with_login_manager_req" = "yes" ; then
15632    with_login_manager_req=$default_login_manager
15633  fi
15634
15635   case "$with_login_manager_req" in
15636     no)
15637       with_login_manager=""
15638     ;;
15639     /*)
15640       # absolute path
15641       set dummy $with_login_manager_req ; login_manager_tmp=$2
15642       { $as_echo "$as_me:$LINENO: checking for $login_manager_tmp" >&5
15643 $as_echo_n "checking for $login_manager_tmp... " >&6; }
15644       if test -x "$login_manager_tmp" ; then
15645         { $as_echo "$as_me:$LINENO: result: yes" >&5
15646 $as_echo "yes" >&6; }
15647       else
15648         { $as_echo "$as_me:$LINENO: result: no" >&5
15649 $as_echo "no" >&6; }
15650         with_login_manager=""
15651       fi
15652     ;;
15653     *)
15654       # relative path
15655       set dummy $with_login_manager_req ; login_manager_tmp=$2
15656       # don't cache
15657       unset ac_cv_path_login_manager_tmp
15658       # Extract the first word of "$login_manager_tmp", so it can be a program name with args.
15659 set dummy $login_manager_tmp; ac_word=$2
15660 { $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
15661 $as_echo_n "checking for $ac_word... " >&6; }
15662 if test "${ac_cv_path_login_manager_tmp+set}" = set; then
15663   $as_echo_n "(cached) " >&6
15664 else
15665   case $login_manager_tmp in
15666   [\\/]* | ?:[\\/]*)
15667   ac_cv_path_login_manager_tmp="$login_manager_tmp" # Let the user override the test with a path.
15668   ;;
15669   *)
15670   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
15671 for as_dir in $PATH
15672 do
15673   IFS=$as_save_IFS
15674   test -z "$as_dir" && as_dir=.
15675   for ac_exec_ext in '' $ac_executable_extensions; do
15676   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
15677     ac_cv_path_login_manager_tmp="$as_dir/$ac_word$ac_exec_ext"
15678     $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
15679     break 2
15680   fi
15681 done
15682 done
15683 IFS=$as_save_IFS
15684
15685   ;;
15686 esac
15687 fi
15688 login_manager_tmp=$ac_cv_path_login_manager_tmp
15689 if test -n "$login_manager_tmp"; then
15690   { $as_echo "$as_me:$LINENO: result: $login_manager_tmp" >&5
15691 $as_echo "$login_manager_tmp" >&6; }
15692 else
15693   { $as_echo "$as_me:$LINENO: result: no" >&5
15694 $as_echo "no" >&6; }
15695 fi
15696
15697
15698       if test -z "$login_manager_tmp" ; then
15699         with_login_manager=""
15700       else
15701         with_login_manager="$login_manager_tmp"
15702       fi
15703     ;;
15704   esac
15705   ac_cv_login_manager_program="$with_login_manager"
15706
15707 elif test -n "$ac_cv_login_manager_program"; then
15708   { $as_echo "$as_me:$LINENO: result: checking for login_manager... (cached) $ac_cv_login_manager_program" >&5
15709 $as_echo "checking for login_manager... (cached) $ac_cv_login_manager_program" >&6; }
15710 fi
15711
15712 NEW_LOGIN_COMMAND_P=''
15713 NEW_LOGIN_COMMAND="$ac_cv_login_manager_program"
15714
15715 if test -z "$NEW_LOGIN_COMMAND" ; then
15716   NEW_LOGIN_COMMAND="$default_login_manager"
15717   NEW_LOGIN_COMMAND_P='! '
15718 fi
15719
15720
15721
15722 ###############################################################################
15723 #
15724 #       Check for -lgtk (and Gnome stuff)
15725 #
15726 ###############################################################################
15727
15728 have_gtk=no
15729 with_gtk_req=unspecified
15730
15731 # Check whether --with-gtk was given.
15732 if test "${with_gtk+set}" = set; then
15733   withval=$with_gtk; with_gtk="$withval"; with_gtk_req="$withval"
15734 else
15735   with_gtk=yes
15736 fi
15737
15738
15739 # if --with-gtk=/directory/ was specified, remember that directory so that
15740 # we can also look for the `gtk-config' program in that directory.
15741 case "$with_gtk" in
15742   /*)
15743     gtk_dir="$with_gtk"
15744     ;;
15745   *)
15746     gtk_dir=""
15747     ;;
15748 esac
15749
15750
15751    case "$with_gtk" in
15752     yes) ;;
15753     no)  ;;
15754
15755     /*)
15756      { $as_echo "$as_me:$LINENO: checking for Gtk headers" >&5
15757 $as_echo_n "checking for Gtk headers... " >&6; }
15758      d=$with_gtk/include
15759      if test -d $d; then
15760        X_CFLAGS="-I$d $X_CFLAGS"
15761        { $as_echo "$as_me:$LINENO: result: $d" >&5
15762 $as_echo "$d" >&6; }
15763      else
15764        { $as_echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
15765 $as_echo "not found ($d: no such directory)" >&6; }
15766      fi
15767
15768      { $as_echo "$as_me:$LINENO: checking for Gtk libs" >&5
15769 $as_echo_n "checking for Gtk libs... " >&6; }
15770      d=$with_gtk/lib
15771      if test -d $d; then
15772        X_LIBS="-L$d $X_LIBS"
15773        { $as_echo "$as_me:$LINENO: result: $d" >&5
15774 $as_echo "$d" >&6; }
15775      else
15776        { $as_echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
15777 $as_echo "not found ($d: no such directory)" >&6; }
15778      fi
15779
15780      # replace the directory string with "yes".
15781      with_gtk_req="yes"
15782      with_gtk=$with_gtk_req
15783      ;;
15784
15785     *)
15786      echo ""
15787      echo "error: argument to --with-gtk must be \"yes\", \"no\", or a directory."
15788      echo "       If it is a directory, then \`DIR/include' will be added to"
15789      echo "       the -I list, and \`DIR/lib' will be added to the -L list."
15790      exit 1
15791      ;;
15792    esac
15793
15794
15795 if test "$with_gtk" != yes -a "$with_gtk" != no ; then
15796   echo "error: must be yes or no: --with-gtk=$with_gtk"
15797   exit 1
15798 fi
15799
15800
15801 parse_gtk_version_string() {
15802   # M4 sucks!!
15803
15804   maj=`echo $ac_gtk_version_string | sed -n 's/\..*//p'`
15805   min=`echo $ac_gtk_version_string | sed -n 's/[^.]*\.\([^.]*\).*/\1/p'`
15806
15807   ac_gtk_version=`echo "$maj * 1000 + $min" | bc`
15808   if test -z "$ac_gtk_version"; then
15809     ac_gtk_version=unknown
15810     ac_gtk_version_string=unknown
15811   fi
15812 }
15813
15814 # Find pkg-config... (need this for both gtk and gdk_pixbuf.)
15815 # if the user specified --with-gtk=/foo/ then look there.
15816 #
15817 gtk_path="$PATH"
15818 if test ! -z "$gtk_dir"; then
15819   # canonicalize slashes.
15820   foo=`echo "${gtk_dir}/bin" | sed 's@//*@/@g'`
15821   gtk_path="$foo:$gtk_path"
15822 fi
15823
15824 for ac_prog in pkg-config
15825 do
15826   # Extract the first word of "$ac_prog", so it can be a program name with args.
15827 set dummy $ac_prog; ac_word=$2
15828 { $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
15829 $as_echo_n "checking for $ac_word... " >&6; }
15830 if test "${ac_cv_path_pkg_config+set}" = set; then
15831   $as_echo_n "(cached) " >&6
15832 else
15833   case $pkg_config in
15834   [\\/]* | ?:[\\/]*)
15835   ac_cv_path_pkg_config="$pkg_config" # Let the user override the test with a path.
15836   ;;
15837   *)
15838   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
15839 for as_dir in $gtk_path
15840 do
15841   IFS=$as_save_IFS
15842   test -z "$as_dir" && as_dir=.
15843   for ac_exec_ext in '' $ac_executable_extensions; do
15844   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
15845     ac_cv_path_pkg_config="$as_dir/$ac_word$ac_exec_ext"
15846     $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
15847     break 2
15848   fi
15849 done
15850 done
15851 IFS=$as_save_IFS
15852
15853   ;;
15854 esac
15855 fi
15856 pkg_config=$ac_cv_path_pkg_config
15857 if test -n "$pkg_config"; then
15858   { $as_echo "$as_me:$LINENO: result: $pkg_config" >&5
15859 $as_echo "$pkg_config" >&6; }
15860 else
15861   { $as_echo "$as_me:$LINENO: result: no" >&5
15862 $as_echo "no" >&6; }
15863 fi
15864
15865
15866   test -n "$pkg_config" && break
15867 done
15868
15869
15870 if test -z "$pkg_config" ; then
15871   { $as_echo "$as_me:$LINENO: WARNING: pkg-config not found!" >&5
15872 $as_echo "$as_me: WARNING: pkg-config not found!" >&2;}
15873   pkg_config="false"
15874 fi
15875
15876
15877 # Utility function for running pkg-config-based tests...
15878 #
15879 pkgs=''
15880 pkg_check_version() {
15881   if test "$ok" = yes ; then
15882     req="$1"
15883     min="$2"
15884     { $as_echo "$as_me:$LINENO: checking for $req" >&5
15885 $as_echo_n "checking for $req... " >&6; }
15886     if $pkg_config --exists "$req" ; then
15887       vers=`$pkg_config --modversion "$req"`
15888       if $pkg_config --exists "$req >= $min" ; then
15889         { $as_echo "$as_me:$LINENO: result: $vers" >&5
15890 $as_echo "$vers" >&6; }
15891         pkgs="$pkgs $req"
15892         return 1
15893       else
15894         { $as_echo "$as_me:$LINENO: result: $vers (wanted >= $min)" >&5
15895 $as_echo "$vers (wanted >= $min)" >&6; }
15896         ok=no
15897         return 0
15898       fi
15899     else
15900       { $as_echo "$as_me:$LINENO: result: no" >&5
15901 $as_echo "no" >&6; }
15902       ok=no
15903       return 0
15904     fi
15905   fi
15906 }
15907
15908
15909 jurassic_gtk=no
15910 gtk_halfassed=no
15911
15912 if test "$with_gtk" = yes; then
15913   have_gtk=no
15914
15915   ok="yes"
15916   pkg_check_version            gtk+-2.0  2.0.1  ; ac_gtk_version_string="$vers"
15917   pkg_check_version         gmodule-2.0  2.0.0
15918   pkg_check_version          libxml-2.0  2.4.6
15919   pkg_check_version        libglade-2.0  1.99.0
15920   pkg_check_version      gdk-pixbuf-2.0  2.0.0
15921   pkg_check_version gdk-pixbuf-xlib-2.0  2.0.0
15922   have_gtk="$ok"
15923
15924   if test "$have_gtk" = no; then
15925     if test -n "$ac_gtk_version_string" ; then
15926       gtk_halfassed="$ac_gtk_version_string"
15927       gtk_halfassed_lib="$req"
15928     fi
15929   fi
15930
15931   if test "$have_gtk" = yes; then
15932     parse_gtk_version_string
15933     jurassic_gtk=no
15934   fi
15935
15936   if test "$have_gtk" = yes; then
15937     { $as_echo "$as_me:$LINENO: checking for Gtk includes" >&5
15938 $as_echo_n "checking for Gtk includes... " >&6; }
15939 if test "${ac_cv_gtk_config_cflags+set}" = set; then
15940   $as_echo_n "(cached) " >&6
15941 else
15942   ac_cv_gtk_config_cflags=`$pkg_config --cflags $pkgs`
15943 fi
15944 { $as_echo "$as_me:$LINENO: result: $ac_cv_gtk_config_cflags" >&5
15945 $as_echo "$ac_cv_gtk_config_cflags" >&6; }
15946     { $as_echo "$as_me:$LINENO: checking for Gtk libs" >&5
15947 $as_echo_n "checking for Gtk libs... " >&6; }
15948 if test "${ac_cv_gtk_config_libs+set}" = set; then
15949   $as_echo_n "(cached) " >&6
15950 else
15951   ac_cv_gtk_config_libs=`$pkg_config --libs $pkgs`
15952 fi
15953 { $as_echo "$as_me:$LINENO: result: $ac_cv_gtk_config_libs" >&5
15954 $as_echo "$ac_cv_gtk_config_libs" >&6; }
15955   fi
15956
15957   ac_gtk_config_cflags=$ac_cv_gtk_config_cflags
15958   ac_gtk_config_libs=$ac_cv_gtk_config_libs
15959
15960   GTK_EXTRA_OBJS=""
15961   GTK_DATADIR=""
15962   if test "$have_gtk" = yes; then
15963     GTK_DATADIR=`$pkg_config --variable=prefix gtk+-2.0`
15964     GTK_DATADIR="$GTK_DATADIR/share"
15965   fi
15966
15967   if test "$have_gtk" = yes; then
15968     INCLUDES="$INCLUDES $ac_gtk_config_cflags"
15969     GTK_LIBS="$GTK_LIBS $ac_gtk_config_libs"
15970     cat >>confdefs.h <<\_ACEOF
15971 #define HAVE_GTK 1
15972 _ACEOF
15973
15974     cat >>confdefs.h <<\_ACEOF
15975 #define HAVE_GTK2 1
15976 _ACEOF
15977
15978     cat >>confdefs.h <<\_ACEOF
15979 #define HAVE_XML 1
15980 _ACEOF
15981
15982   fi
15983
15984 fi
15985
15986
15987 # Check for the various Gnome help and URL loading programs.
15988 #
15989 WITH_BROWSER=gnome-open
15990 if test "$have_gtk" = yes; then
15991   for ac_prog in gnome-open
15992 do
15993   # Extract the first word of "$ac_prog", so it can be a program name with args.
15994 set dummy $ac_prog; ac_word=$2
15995 { $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
15996 $as_echo_n "checking for $ac_word... " >&6; }
15997 if test "${ac_cv_prog_gnome_open_program+set}" = set; then
15998   $as_echo_n "(cached) " >&6
15999 else
16000   if test -n "$gnome_open_program"; then
16001   ac_cv_prog_gnome_open_program="$gnome_open_program" # Let the user override the test.
16002 else
16003 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
16004 for as_dir in $PATH
16005 do
16006   IFS=$as_save_IFS
16007   test -z "$as_dir" && as_dir=.
16008   for ac_exec_ext in '' $ac_executable_extensions; do
16009   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
16010     ac_cv_prog_gnome_open_program="$ac_prog"
16011     $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
16012     break 2
16013   fi
16014 done
16015 done
16016 IFS=$as_save_IFS
16017
16018 fi
16019 fi
16020 gnome_open_program=$ac_cv_prog_gnome_open_program
16021 if test -n "$gnome_open_program"; then
16022   { $as_echo "$as_me:$LINENO: result: $gnome_open_program" >&5
16023 $as_echo "$gnome_open_program" >&6; }
16024 else
16025   { $as_echo "$as_me:$LINENO: result: no" >&5
16026 $as_echo "no" >&6; }
16027 fi
16028
16029
16030   test -n "$gnome_open_program" && break
16031 done
16032
16033   for ac_prog in gnome-url-show
16034 do
16035   # Extract the first word of "$ac_prog", so it can be a program name with args.
16036 set dummy $ac_prog; ac_word=$2
16037 { $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
16038 $as_echo_n "checking for $ac_word... " >&6; }
16039 if test "${ac_cv_prog_gnome_url_show_program+set}" = set; then
16040   $as_echo_n "(cached) " >&6
16041 else
16042   if test -n "$gnome_url_show_program"; then
16043   ac_cv_prog_gnome_url_show_program="$gnome_url_show_program" # Let the user override the test.
16044 else
16045 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
16046 for as_dir in $PATH
16047 do
16048   IFS=$as_save_IFS
16049   test -z "$as_dir" && as_dir=.
16050   for ac_exec_ext in '' $ac_executable_extensions; do
16051   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
16052     ac_cv_prog_gnome_url_show_program="$ac_prog"
16053     $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
16054     break 2
16055   fi
16056 done
16057 done
16058 IFS=$as_save_IFS
16059
16060 fi
16061 fi
16062 gnome_url_show_program=$ac_cv_prog_gnome_url_show_program
16063 if test -n "$gnome_url_show_program"; then
16064   { $as_echo "$as_me:$LINENO: result: $gnome_url_show_program" >&5
16065 $as_echo "$gnome_url_show_program" >&6; }
16066 else
16067   { $as_echo "$as_me:$LINENO: result: no" >&5
16068 $as_echo "no" >&6; }
16069 fi
16070
16071
16072   test -n "$gnome_url_show_program" && break
16073 done
16074
16075 fi
16076
16077
16078 ###############################################################################
16079 #
16080 #       Check for -lXm.
16081 #
16082 ###############################################################################
16083
16084 have_motif=no
16085 with_motif_req=unspecified
16086
16087 # Check whether --with-motif was given.
16088 if test "${with_motif+set}" = set; then
16089   withval=$with_motif; with_motif="$withval"; with_motif_req="$withval"
16090 else
16091   with_motif=no
16092 fi
16093
16094
16095
16096    case "$with_motif" in
16097     yes) ;;
16098     no)  ;;
16099
16100     /*)
16101      { $as_echo "$as_me:$LINENO: checking for Motif headers" >&5
16102 $as_echo_n "checking for Motif headers... " >&6; }
16103      d=$with_motif/include
16104      if test -d $d; then
16105        X_CFLAGS="-I$d $X_CFLAGS"
16106        { $as_echo "$as_me:$LINENO: result: $d" >&5
16107 $as_echo "$d" >&6; }
16108      else
16109        { $as_echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
16110 $as_echo "not found ($d: no such directory)" >&6; }
16111      fi
16112
16113      { $as_echo "$as_me:$LINENO: checking for Motif libs" >&5
16114 $as_echo_n "checking for Motif libs... " >&6; }
16115      d=$with_motif/lib
16116      if test -d $d; then
16117        X_LIBS="-L$d $X_LIBS"
16118        { $as_echo "$as_me:$LINENO: result: $d" >&5
16119 $as_echo "$d" >&6; }
16120      else
16121        { $as_echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
16122 $as_echo "not found ($d: no such directory)" >&6; }
16123      fi
16124
16125      # replace the directory string with "yes".
16126      with_motif_req="yes"
16127      with_motif=$with_motif_req
16128      ;;
16129
16130     *)
16131      echo ""
16132      echo "error: argument to --with-motif must be \"yes\", \"no\", or a directory."
16133      echo "       If it is a directory, then \`DIR/include' will be added to"
16134      echo "       the -I list, and \`DIR/lib' will be added to the -L list."
16135      exit 1
16136      ;;
16137    esac
16138
16139
16140 if test "$with_motif" != yes -a "$with_motif" != no ; then
16141   echo "error: must be yes or no: --with-motif=$with_motif"
16142   exit 1
16143 fi
16144
16145 if test "$with_motif" = yes; then
16146   have_motif=no
16147
16148   ac_save_CPPFLAGS="$CPPFLAGS"
16149   if test \! -z "$includedir" ; then
16150     CPPFLAGS="$CPPFLAGS -I$includedir"
16151   fi
16152   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
16153   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
16154   { $as_echo "$as_me:$LINENO: checking for Xm/Xm.h" >&5
16155 $as_echo_n "checking for Xm/Xm.h... " >&6; }
16156 if test "${ac_cv_header_Xm_Xm_h+set}" = set; then
16157   $as_echo_n "(cached) " >&6
16158 else
16159   cat >conftest.$ac_ext <<_ACEOF
16160 /* confdefs.h.  */
16161 _ACEOF
16162 cat confdefs.h >>conftest.$ac_ext
16163 cat >>conftest.$ac_ext <<_ACEOF
16164 /* end confdefs.h.  */
16165 #include <stdlib.h>
16166                      #include <stdio.h>
16167                      #include <X11/Intrinsic.h>
16168
16169 #include <Xm/Xm.h>
16170 _ACEOF
16171 rm -rf conftest.$ac_objext
16172 if { (ac_try="$ac_compile"
16173 case "(($ac_try" in
16174   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16175   *) ac_try_echo=$ac_try;;
16176 esac
16177 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
16178 $as_echo "$ac_try_echo") >&5
16179   (eval "$ac_compile") 2>conftest.er1
16180   ac_status=$?
16181   grep -v '^ *+' conftest.er1 >conftest.err
16182   rm -rf conftest.er1
16183   cat conftest.err >&5
16184   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
16185   (exit $ac_status); } && {
16186          test -z "$ac_c_werror_flag" ||
16187          test ! -s conftest.err
16188        } && test -s conftest.$ac_objext; then
16189   ac_cv_header_Xm_Xm_h=yes
16190 else
16191   $as_echo "$as_me: failed program was:" >&5
16192 sed 's/^/| /' conftest.$ac_ext >&5
16193
16194         ac_cv_header_Xm_Xm_h=no
16195 fi
16196
16197 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16198 fi
16199 { $as_echo "$as_me:$LINENO: result: $ac_cv_header_Xm_Xm_h" >&5
16200 $as_echo "$ac_cv_header_Xm_Xm_h" >&6; }
16201 if test "x$ac_cv_header_Xm_Xm_h" = x""yes; then
16202   have_motif=yes
16203                      cat >>confdefs.h <<\_ACEOF
16204 #define HAVE_MOTIF 1
16205 _ACEOF
16206
16207                      MOTIF_LIBS="$MOTIF_LIBS -lXm"
16208 fi
16209
16210
16211   CPPFLAGS="$ac_save_CPPFLAGS"
16212 fi
16213
16214
16215 if test "$have_motif" = yes; then
16216
16217   ac_save_CPPFLAGS="$CPPFLAGS"
16218   if test \! -z "$includedir" ; then
16219     CPPFLAGS="$CPPFLAGS -I$includedir"
16220   fi
16221   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
16222   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
16223   { $as_echo "$as_me:$LINENO: checking for Xm/ComboBox.h" >&5
16224 $as_echo_n "checking for Xm/ComboBox.h... " >&6; }
16225 if test "${ac_cv_header_Xm_ComboBox_h+set}" = set; then
16226   $as_echo_n "(cached) " >&6
16227 else
16228   cat >conftest.$ac_ext <<_ACEOF
16229 /* confdefs.h.  */
16230 _ACEOF
16231 cat confdefs.h >>conftest.$ac_ext
16232 cat >>conftest.$ac_ext <<_ACEOF
16233 /* end confdefs.h.  */
16234 #include <stdlib.h>
16235                      #include <stdio.h>
16236                      #include <X11/Intrinsic.h>
16237
16238 #include <Xm/ComboBox.h>
16239 _ACEOF
16240 rm -rf conftest.$ac_objext
16241 if { (ac_try="$ac_compile"
16242 case "(($ac_try" in
16243   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16244   *) ac_try_echo=$ac_try;;
16245 esac
16246 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
16247 $as_echo "$ac_try_echo") >&5
16248   (eval "$ac_compile") 2>conftest.er1
16249   ac_status=$?
16250   grep -v '^ *+' conftest.er1 >conftest.err
16251   rm -rf conftest.er1
16252   cat conftest.err >&5
16253   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
16254   (exit $ac_status); } && {
16255          test -z "$ac_c_werror_flag" ||
16256          test ! -s conftest.err
16257        } && test -s conftest.$ac_objext; then
16258   ac_cv_header_Xm_ComboBox_h=yes
16259 else
16260   $as_echo "$as_me: failed program was:" >&5
16261 sed 's/^/| /' conftest.$ac_ext >&5
16262
16263         ac_cv_header_Xm_ComboBox_h=no
16264 fi
16265
16266 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16267 fi
16268 { $as_echo "$as_me:$LINENO: result: $ac_cv_header_Xm_ComboBox_h" >&5
16269 $as_echo "$ac_cv_header_Xm_ComboBox_h" >&6; }
16270 if test "x$ac_cv_header_Xm_ComboBox_h" = x""yes; then
16271   cat >>confdefs.h <<\_ACEOF
16272 #define HAVE_XMCOMBOBOX 1
16273 _ACEOF
16274
16275 fi
16276
16277
16278   CPPFLAGS="$ac_save_CPPFLAGS"
16279 fi
16280
16281
16282 ###############################################################################
16283 #
16284 #       Checking whether Motif is really Lesstif.
16285 #
16286 ###############################################################################
16287
16288 have_lesstif=no
16289 if test "$have_motif" = yes ; then
16290   { $as_echo "$as_me:$LINENO: checking whether Motif is really LessTif" >&5
16291 $as_echo_n "checking whether Motif is really LessTif... " >&6; }
16292 if test "${ac_cv_have_lesstif+set}" = set; then
16293   $as_echo_n "(cached) " >&6
16294 else
16295
16296   ac_save_CPPFLAGS="$CPPFLAGS"
16297   if test \! -z "$includedir" ; then
16298     CPPFLAGS="$CPPFLAGS -I$includedir"
16299   fi
16300   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
16301   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
16302   cat >conftest.$ac_ext <<_ACEOF
16303 /* confdefs.h.  */
16304 _ACEOF
16305 cat confdefs.h >>conftest.$ac_ext
16306 cat >>conftest.$ac_ext <<_ACEOF
16307 /* end confdefs.h.  */
16308 #include <Xm/Xm.h>
16309 int
16310 main ()
16311 {
16312 long vers = LesstifVersion;
16313   ;
16314   return 0;
16315 }
16316 _ACEOF
16317 rm -rf conftest.$ac_objext
16318 if { (ac_try="$ac_compile"
16319 case "(($ac_try" in
16320   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16321   *) ac_try_echo=$ac_try;;
16322 esac
16323 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
16324 $as_echo "$ac_try_echo") >&5
16325   (eval "$ac_compile") 2>conftest.er1
16326   ac_status=$?
16327   grep -v '^ *+' conftest.er1 >conftest.err
16328   rm -rf conftest.er1
16329   cat conftest.err >&5
16330   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
16331   (exit $ac_status); } && {
16332          test -z "$ac_c_werror_flag" ||
16333          test ! -s conftest.err
16334        } && test -s conftest.$ac_objext; then
16335   ac_cv_have_lesstif=yes
16336 else
16337   $as_echo "$as_me: failed program was:" >&5
16338 sed 's/^/| /' conftest.$ac_ext >&5
16339
16340         ac_cv_have_lesstif=no
16341 fi
16342
16343 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16344   CPPFLAGS="$ac_save_CPPFLAGS"
16345 fi
16346 { $as_echo "$as_me:$LINENO: result: $ac_cv_have_lesstif" >&5
16347 $as_echo "$ac_cv_have_lesstif" >&6; }
16348   have_lesstif=$ac_cv_have_lesstif
16349 fi
16350
16351
16352 lesstif_version=unknown
16353 lesstif_version_string=unknown
16354
16355 if test "$have_lesstif" = yes ; then
16356   ltv=unknown
16357   echo unknown > conftest-lt
16358   { $as_echo "$as_me:$LINENO: checking LessTif version number" >&5
16359 $as_echo_n "checking LessTif version number... " >&6; }
16360 if test "${ac_cv_lesstif_version_string+set}" = set; then
16361   $as_echo_n "(cached) " >&6
16362 else
16363
16364   ac_save_CPPFLAGS="$CPPFLAGS"
16365   if test \! -z "$includedir" ; then
16366     CPPFLAGS="$CPPFLAGS -I$includedir"
16367   fi
16368   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
16369   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
16370   if test "$cross_compiling" = yes; then
16371   ac_cv_lesstif_version=unknown
16372                      ac_cv_lesstif_version_string=unknown
16373 else
16374   cat >conftest.$ac_ext <<_ACEOF
16375 /* confdefs.h.  */
16376 _ACEOF
16377 cat confdefs.h >>conftest.$ac_ext
16378 cat >>conftest.$ac_ext <<_ACEOF
16379 /* end confdefs.h.  */
16380 #include <stdio.h>
16381                      #include <Xm/Xm.h>
16382                      int main() {
16383                        FILE *f = fopen("conftest-lt", "w");
16384                        if (!f) exit(1);
16385                        fprintf(f, "%d %d.%d\n", LesstifVersion,
16386                           LESSTIF_VERSION, LESSTIF_REVISION);
16387                        fclose(f);
16388                        exit(0);
16389                      }
16390 _ACEOF
16391 rm -rf conftest$ac_exeext
16392 if { (ac_try="$ac_link"
16393 case "(($ac_try" in
16394   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16395   *) ac_try_echo=$ac_try;;
16396 esac
16397 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
16398 $as_echo "$ac_try_echo") >&5
16399   (eval "$ac_link") 2>&5
16400   ac_status=$?
16401   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
16402   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
16403   { (case "(($ac_try" in
16404   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16405   *) ac_try_echo=$ac_try;;
16406 esac
16407 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
16408 $as_echo "$ac_try_echo") >&5
16409   (eval "$ac_try") 2>&5
16410   ac_status=$?
16411   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
16412   (exit $ac_status); }; }; then
16413   ltv=`cat conftest-lt`
16414                      ac_cv_lesstif_version=`echo $ltv | sed 's/ .*//'`
16415                      ac_cv_lesstif_version_string=`echo $ltv | sed 's/.* //'`
16416 else
16417   $as_echo "$as_me: program exited with status $ac_status" >&5
16418 $as_echo "$as_me: failed program was:" >&5
16419 sed 's/^/| /' conftest.$ac_ext >&5
16420
16421 ( exit $ac_status )
16422 ac_cv_lesstif_version=unknown
16423                      ac_cv_lesstif_version_string=unknown
16424 fi
16425 rm -rf conftest.dSYM
16426 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
16427 fi
16428
16429
16430   CPPFLAGS="$ac_save_CPPFLAGS"
16431 fi
16432 { $as_echo "$as_me:$LINENO: result: $ac_cv_lesstif_version_string" >&5
16433 $as_echo "$ac_cv_lesstif_version_string" >&6; }
16434   rm -rf conftest-lt
16435   lesstif_version=$ac_cv_lesstif_version
16436   lesstif_version_string=$ac_cv_lesstif_version_string
16437
16438 fi
16439
16440
16441 if test "$have_motif" = yes ; then
16442   mtv=unknown
16443   echo unknown > conftest-mt
16444   { $as_echo "$as_me:$LINENO: checking Motif version number" >&5
16445 $as_echo_n "checking Motif version number... " >&6; }
16446 if test "${ac_cv_motif_version_string+set}" = set; then
16447   $as_echo_n "(cached) " >&6
16448 else
16449
16450   ac_save_CPPFLAGS="$CPPFLAGS"
16451   if test \! -z "$includedir" ; then
16452     CPPFLAGS="$CPPFLAGS -I$includedir"
16453   fi
16454   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
16455   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
16456   if test "$cross_compiling" = yes; then
16457   ac_cv_motif_version=unknown
16458                      ac_cv_motif_version_string=unknown
16459 else
16460   cat >conftest.$ac_ext <<_ACEOF
16461 /* confdefs.h.  */
16462 _ACEOF
16463 cat confdefs.h >>conftest.$ac_ext
16464 cat >>conftest.$ac_ext <<_ACEOF
16465 /* end confdefs.h.  */
16466 #include <stdio.h>
16467                      #include <Xm/Xm.h>
16468                      int main() {
16469                        FILE *f = fopen("conftest-mt", "w");
16470                        if (!f) exit(1);
16471                        fprintf(f, "%d %d.%d\n", XmVersion,
16472                           XmVERSION, XmREVISION);
16473                        fclose(f);
16474                        exit(0);
16475                      }
16476 _ACEOF
16477 rm -rf conftest$ac_exeext
16478 if { (ac_try="$ac_link"
16479 case "(($ac_try" in
16480   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16481   *) ac_try_echo=$ac_try;;
16482 esac
16483 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
16484 $as_echo "$ac_try_echo") >&5
16485   (eval "$ac_link") 2>&5
16486   ac_status=$?
16487   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
16488   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
16489   { (case "(($ac_try" in
16490   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16491   *) ac_try_echo=$ac_try;;
16492 esac
16493 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
16494 $as_echo "$ac_try_echo") >&5
16495   (eval "$ac_try") 2>&5
16496   ac_status=$?
16497   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
16498   (exit $ac_status); }; }; then
16499   mtv=`cat conftest-mt`
16500                      ac_cv_motif_version=`echo $mtv | sed 's/ .*//'`
16501                      ac_cv_motif_version_string=`echo $mtv | sed 's/.* //'`
16502 else
16503   $as_echo "$as_me: program exited with status $ac_status" >&5
16504 $as_echo "$as_me: failed program was:" >&5
16505 sed 's/^/| /' conftest.$ac_ext >&5
16506
16507 ( exit $ac_status )
16508 ac_cv_motif_version=unknown
16509                      ac_cv_motif_version_string=unknown
16510 fi
16511 rm -rf conftest.dSYM
16512 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
16513 fi
16514
16515
16516   CPPFLAGS="$ac_save_CPPFLAGS"
16517 fi
16518 { $as_echo "$as_me:$LINENO: result: $ac_cv_motif_version_string" >&5
16519 $as_echo "$ac_cv_motif_version_string" >&6; }
16520   rm -rf conftest-mt
16521   motif_version=$ac_cv_motif_version
16522   motif_version_string=$ac_cv_motif_version_string
16523
16524 fi
16525
16526
16527 ###############################################################################
16528 #
16529 #       Checking whether Motif requires -lXpm.
16530 #
16531 #       If this is Motif 2.x, and we have XPM, then link against XPM as well.
16532 #       The deal is, Motif 2.x requires XPM -- but it's a compilation option
16533 #       of the library whether to build the XPM code into libXm, or whether
16534 #       to rely on an external libXm.  So the only way to tell whether XPM is
16535 #       a link-time requirement is to examine libXm.a, which is very
16536 #       difficult to do in an autoconf script.  So... if it's Motif 2.x, we
16537 #       always link against XPM if the XPM lib exists (and this will be a
16538 #       no-op if libXm happens to already have the XPM code in it.)
16539 #
16540 ###############################################################################
16541
16542 motif_requires_xpm=no
16543 if test "$have_motif" = yes ; then
16544    { $as_echo "$as_me:$LINENO: checking whether Motif requires XPM" >&5
16545 $as_echo_n "checking whether Motif requires XPM... " >&6; }
16546    if test "$motif_version" = "unknown" || test "$motif_version" -ge 2000
16547    then
16548      motif_requires_xpm=yes
16549      { $as_echo "$as_me:$LINENO: result: maybe" >&5
16550 $as_echo "maybe" >&6; }
16551    else
16552      { $as_echo "$as_me:$LINENO: result: no" >&5
16553 $as_echo "no" >&6; }
16554    fi
16555 fi
16556
16557
16558 ###############################################################################
16559 #
16560 #       Checking whether Motif requires -lXp.
16561 #
16562 #       Some versions of Motif (2.1.0, at least) require -lXp, the "X Printing
16563 #       Extension".   Why this extension isn't in -lXext with all the others,
16564 #       I have no idea.
16565 #
16566 ###############################################################################
16567
16568 have_xp_ext=no
16569 if test "$have_motif" = yes ; then
16570    have_xp_ext=no
16571
16572   ac_save_CPPFLAGS="$CPPFLAGS"
16573   ac_save_LDFLAGS="$LDFLAGS"
16574 #  ac_save_LIBS="$LIBS"
16575
16576   if test \! -z "$includedir" ; then
16577     CPPFLAGS="$CPPFLAGS -I$includedir"
16578   fi
16579   # note: $X_CFLAGS includes $x_includes
16580   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
16581
16582   if test \! -z "$libdir" ; then
16583     LDFLAGS="$LDFLAGS -L$libdir"
16584   fi
16585   # note: $X_LIBS includes $x_libraries
16586   LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
16587
16588   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
16589   LDFLAGS=`eval eval eval eval eval eval eval eval eval echo $LDFLAGS`
16590   { $as_echo "$as_me:$LINENO: checking for XpQueryExtension in -lXp" >&5
16591 $as_echo_n "checking for XpQueryExtension in -lXp... " >&6; }
16592 if test "${ac_cv_lib_Xp_XpQueryExtension+set}" = set; then
16593   $as_echo_n "(cached) " >&6
16594 else
16595   ac_check_lib_save_LIBS=$LIBS
16596 LIBS="-lXp -lX11 -lXext -lm $LIBS"
16597 cat >conftest.$ac_ext <<_ACEOF
16598 /* confdefs.h.  */
16599 _ACEOF
16600 cat confdefs.h >>conftest.$ac_ext
16601 cat >>conftest.$ac_ext <<_ACEOF
16602 /* end confdefs.h.  */
16603
16604 /* Override any GCC internal prototype to avoid an error.
16605    Use char because int might match the return type of a GCC
16606    builtin and then its argument prototype would still apply.  */
16607 #ifdef __cplusplus
16608 extern "C"
16609 #endif
16610 char XpQueryExtension ();
16611 int
16612 main ()
16613 {
16614 return XpQueryExtension ();
16615   ;
16616   return 0;
16617 }
16618 _ACEOF
16619 rm -rf conftest.$ac_objext conftest$ac_exeext
16620 if { (ac_try="$ac_link"
16621 case "(($ac_try" in
16622   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16623   *) ac_try_echo=$ac_try;;
16624 esac
16625 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
16626 $as_echo "$ac_try_echo") >&5
16627   (eval "$ac_link") 2>conftest.er1
16628   ac_status=$?
16629   grep -v '^ *+' conftest.er1 >conftest.err
16630   rm -rf conftest.er1
16631   cat conftest.err >&5
16632   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
16633   (exit $ac_status); } && {
16634          test -z "$ac_c_werror_flag" ||
16635          test ! -s conftest.err
16636        } && test -s conftest$ac_exeext && {
16637          test "$cross_compiling" = yes ||
16638          $as_test_x conftest$ac_exeext
16639        }; then
16640   ac_cv_lib_Xp_XpQueryExtension=yes
16641 else
16642   $as_echo "$as_me: failed program was:" >&5
16643 sed 's/^/| /' conftest.$ac_ext >&5
16644
16645         ac_cv_lib_Xp_XpQueryExtension=no
16646 fi
16647
16648 rm -rf conftest.dSYM
16649 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
16650       conftest$ac_exeext conftest.$ac_ext
16651 LIBS=$ac_check_lib_save_LIBS
16652 fi
16653 { $as_echo "$as_me:$LINENO: result: $ac_cv_lib_Xp_XpQueryExtension" >&5
16654 $as_echo "$ac_cv_lib_Xp_XpQueryExtension" >&6; }
16655 if test "x$ac_cv_lib_Xp_XpQueryExtension" = x""yes; then
16656   have_xp_ext=yes; MOTIF_LIBS="$MOTIF_LIBS -lXp"
16657 else
16658   true
16659 fi
16660
16661   CPPFLAGS="$ac_save_CPPFLAGS"
16662   LDFLAGS="$ac_save_LDFLAGS"
16663 #  LIBS="$ac_save_LIBS"
16664
16665 fi
16666
16667
16668 ###############################################################################
16669 #
16670 #       Checking whether Motif requires -lXintl (for _Xsetlocale.)
16671 #
16672 ###############################################################################
16673
16674 have_xintl=no
16675 if test "$have_motif" = yes ; then
16676
16677   ac_save_CPPFLAGS="$CPPFLAGS"
16678   ac_save_LDFLAGS="$LDFLAGS"
16679 #  ac_save_LIBS="$LIBS"
16680
16681   if test \! -z "$includedir" ; then
16682     CPPFLAGS="$CPPFLAGS -I$includedir"
16683   fi
16684   # note: $X_CFLAGS includes $x_includes
16685   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
16686
16687   if test \! -z "$libdir" ; then
16688     LDFLAGS="$LDFLAGS -L$libdir"
16689   fi
16690   # note: $X_LIBS includes $x_libraries
16691   LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
16692
16693   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
16694   LDFLAGS=`eval eval eval eval eval eval eval eval eval echo $LDFLAGS`
16695   { $as_echo "$as_me:$LINENO: checking for _Xsetlocale in -lXintl" >&5
16696 $as_echo_n "checking for _Xsetlocale in -lXintl... " >&6; }
16697 if test "${ac_cv_lib_Xintl__Xsetlocale+set}" = set; then
16698   $as_echo_n "(cached) " >&6
16699 else
16700   ac_check_lib_save_LIBS=$LIBS
16701 LIBS="-lXintl -lX11 -lXext -lm $LIBS"
16702 cat >conftest.$ac_ext <<_ACEOF
16703 /* confdefs.h.  */
16704 _ACEOF
16705 cat confdefs.h >>conftest.$ac_ext
16706 cat >>conftest.$ac_ext <<_ACEOF
16707 /* end confdefs.h.  */
16708
16709 /* Override any GCC internal prototype to avoid an error.
16710    Use char because int might match the return type of a GCC
16711    builtin and then its argument prototype would still apply.  */
16712 #ifdef __cplusplus
16713 extern "C"
16714 #endif
16715 char _Xsetlocale ();
16716 int
16717 main ()
16718 {
16719 return _Xsetlocale ();
16720   ;
16721   return 0;
16722 }
16723 _ACEOF
16724 rm -rf conftest.$ac_objext conftest$ac_exeext
16725 if { (ac_try="$ac_link"
16726 case "(($ac_try" in
16727   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16728   *) ac_try_echo=$ac_try;;
16729 esac
16730 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
16731 $as_echo "$ac_try_echo") >&5
16732   (eval "$ac_link") 2>conftest.er1
16733   ac_status=$?
16734   grep -v '^ *+' conftest.er1 >conftest.err
16735   rm -rf conftest.er1
16736   cat conftest.err >&5
16737   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
16738   (exit $ac_status); } && {
16739          test -z "$ac_c_werror_flag" ||
16740          test ! -s conftest.err
16741        } && test -s conftest$ac_exeext && {
16742          test "$cross_compiling" = yes ||
16743          $as_test_x conftest$ac_exeext
16744        }; then
16745   ac_cv_lib_Xintl__Xsetlocale=yes
16746 else
16747   $as_echo "$as_me: failed program was:" >&5
16748 sed 's/^/| /' conftest.$ac_ext >&5
16749
16750         ac_cv_lib_Xintl__Xsetlocale=no
16751 fi
16752
16753 rm -rf conftest.dSYM
16754 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
16755       conftest$ac_exeext conftest.$ac_ext
16756 LIBS=$ac_check_lib_save_LIBS
16757 fi
16758 { $as_echo "$as_me:$LINENO: result: $ac_cv_lib_Xintl__Xsetlocale" >&5
16759 $as_echo "$ac_cv_lib_Xintl__Xsetlocale" >&6; }
16760 if test "x$ac_cv_lib_Xintl__Xsetlocale" = x""yes; then
16761   have_xintl=yes
16762 else
16763   have_xintl=no
16764 fi
16765
16766   CPPFLAGS="$ac_save_CPPFLAGS"
16767   LDFLAGS="$ac_save_LDFLAGS"
16768 #  LIBS="$ac_save_LIBS"
16769
16770   if test "$have_xintl" = yes; then
16771     MOTIF_LIBS="$MOTIF_LIBS -lXintl"
16772   fi
16773 fi
16774
16775
16776 ###############################################################################
16777 #
16778 #       Check for -lGL or -lMesaGL.
16779 #
16780 ###############################################################################
16781
16782 have_gl=no
16783 ac_have_mesa_gl=no
16784 with_gl_req=unspecified
16785 gl_halfassed=no
16786
16787 # Check whether --with-gl was given.
16788 if test "${with_gl+set}" = set; then
16789   withval=$with_gl; with_gl="$withval"; with_gl_req="$withval"
16790 else
16791   with_gl=yes
16792 fi
16793
16794
16795
16796    case "$with_gl" in
16797     yes) ;;
16798     no)  ;;
16799
16800     /*)
16801      { $as_echo "$as_me:$LINENO: checking for GL headers" >&5
16802 $as_echo_n "checking for GL headers... " >&6; }
16803      d=$with_gl/include
16804      if test -d $d; then
16805        X_CFLAGS="-I$d $X_CFLAGS"
16806        { $as_echo "$as_me:$LINENO: result: $d" >&5
16807 $as_echo "$d" >&6; }
16808      else
16809        { $as_echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
16810 $as_echo "not found ($d: no such directory)" >&6; }
16811      fi
16812
16813      { $as_echo "$as_me:$LINENO: checking for GL libs" >&5
16814 $as_echo_n "checking for GL libs... " >&6; }
16815      d=$with_gl/lib
16816      if test -d $d; then
16817        X_LIBS="-L$d $X_LIBS"
16818        { $as_echo "$as_me:$LINENO: result: $d" >&5
16819 $as_echo "$d" >&6; }
16820      else
16821        { $as_echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
16822 $as_echo "not found ($d: no such directory)" >&6; }
16823      fi
16824
16825      # replace the directory string with "yes".
16826      with_gl_req="yes"
16827      with_gl=$with_gl_req
16828      ;;
16829
16830     *)
16831      echo ""
16832      echo "error: argument to --with-gl must be \"yes\", \"no\", or a directory."
16833      echo "       If it is a directory, then \`DIR/include' will be added to"
16834      echo "       the -I list, and \`DIR/lib' will be added to the -L list."
16835      exit 1
16836      ;;
16837    esac
16838
16839
16840 ac_mesagl_version=unknown
16841 ac_mesagl_version_string=unknown
16842
16843 if test "$with_gl" = yes; then
16844
16845   ac_save_CPPFLAGS="$CPPFLAGS"
16846   if test \! -z "$includedir" ; then
16847     CPPFLAGS="$CPPFLAGS -I$includedir"
16848   fi
16849   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
16850   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
16851   if test "${ac_cv_header_GL_gl_h+set}" = set; then
16852   { $as_echo "$as_me:$LINENO: checking for GL/gl.h" >&5
16853 $as_echo_n "checking for GL/gl.h... " >&6; }
16854 if test "${ac_cv_header_GL_gl_h+set}" = set; then
16855   $as_echo_n "(cached) " >&6
16856 fi
16857 { $as_echo "$as_me:$LINENO: result: $ac_cv_header_GL_gl_h" >&5
16858 $as_echo "$ac_cv_header_GL_gl_h" >&6; }
16859 else
16860   # Is the header compilable?
16861 { $as_echo "$as_me:$LINENO: checking GL/gl.h usability" >&5
16862 $as_echo_n "checking GL/gl.h usability... " >&6; }
16863 cat >conftest.$ac_ext <<_ACEOF
16864 /* confdefs.h.  */
16865 _ACEOF
16866 cat confdefs.h >>conftest.$ac_ext
16867 cat >>conftest.$ac_ext <<_ACEOF
16868 /* end confdefs.h.  */
16869 $ac_includes_default
16870 #include <GL/gl.h>
16871 _ACEOF
16872 rm -rf conftest.$ac_objext
16873 if { (ac_try="$ac_compile"
16874 case "(($ac_try" in
16875   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16876   *) ac_try_echo=$ac_try;;
16877 esac
16878 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
16879 $as_echo "$ac_try_echo") >&5
16880   (eval "$ac_compile") 2>conftest.er1
16881   ac_status=$?
16882   grep -v '^ *+' conftest.er1 >conftest.err
16883   rm -rf conftest.er1
16884   cat conftest.err >&5
16885   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
16886   (exit $ac_status); } && {
16887          test -z "$ac_c_werror_flag" ||
16888          test ! -s conftest.err
16889        } && test -s conftest.$ac_objext; then
16890   ac_header_compiler=yes
16891 else
16892   $as_echo "$as_me: failed program was:" >&5
16893 sed 's/^/| /' conftest.$ac_ext >&5
16894
16895         ac_header_compiler=no
16896 fi
16897
16898 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16899 { $as_echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
16900 $as_echo "$ac_header_compiler" >&6; }
16901
16902 # Is the header present?
16903 { $as_echo "$as_me:$LINENO: checking GL/gl.h presence" >&5
16904 $as_echo_n "checking GL/gl.h presence... " >&6; }
16905 cat >conftest.$ac_ext <<_ACEOF
16906 /* confdefs.h.  */
16907 _ACEOF
16908 cat confdefs.h >>conftest.$ac_ext
16909 cat >>conftest.$ac_ext <<_ACEOF
16910 /* end confdefs.h.  */
16911 #include <GL/gl.h>
16912 _ACEOF
16913 if { (ac_try="$ac_cpp conftest.$ac_ext"
16914 case "(($ac_try" in
16915   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16916   *) ac_try_echo=$ac_try;;
16917 esac
16918 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
16919 $as_echo "$ac_try_echo") >&5
16920   (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
16921   ac_status=$?
16922   grep -v '^ *+' conftest.er1 >conftest.err
16923   rm -rf conftest.er1
16924   cat conftest.err >&5
16925   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
16926   (exit $ac_status); } >/dev/null && {
16927          test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
16928          test ! -s conftest.err
16929        }; then
16930   ac_header_preproc=yes
16931 else
16932   $as_echo "$as_me: failed program was:" >&5
16933 sed 's/^/| /' conftest.$ac_ext >&5
16934
16935   ac_header_preproc=no
16936 fi
16937
16938 rm -rf conftest.err conftest.$ac_ext
16939 { $as_echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
16940 $as_echo "$ac_header_preproc" >&6; }
16941
16942 # So?  What about this header?
16943 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
16944   yes:no: )
16945     { $as_echo "$as_me:$LINENO: WARNING: GL/gl.h: accepted by the compiler, rejected by the preprocessor!" >&5
16946 $as_echo "$as_me: WARNING: GL/gl.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
16947     { $as_echo "$as_me:$LINENO: WARNING: GL/gl.h: proceeding with the compiler's result" >&5
16948 $as_echo "$as_me: WARNING: GL/gl.h: proceeding with the compiler's result" >&2;}
16949     ac_header_preproc=yes
16950     ;;
16951   no:yes:* )
16952     { $as_echo "$as_me:$LINENO: WARNING: GL/gl.h: present but cannot be compiled" >&5
16953 $as_echo "$as_me: WARNING: GL/gl.h: present but cannot be compiled" >&2;}
16954     { $as_echo "$as_me:$LINENO: WARNING: GL/gl.h:     check for missing prerequisite headers?" >&5
16955 $as_echo "$as_me: WARNING: GL/gl.h:     check for missing prerequisite headers?" >&2;}
16956     { $as_echo "$as_me:$LINENO: WARNING: GL/gl.h: see the Autoconf documentation" >&5
16957 $as_echo "$as_me: WARNING: GL/gl.h: see the Autoconf documentation" >&2;}
16958     { $as_echo "$as_me:$LINENO: WARNING: GL/gl.h:     section \"Present But Cannot Be Compiled\"" >&5
16959 $as_echo "$as_me: WARNING: GL/gl.h:     section \"Present But Cannot Be Compiled\"" >&2;}
16960     { $as_echo "$as_me:$LINENO: WARNING: GL/gl.h: proceeding with the preprocessor's result" >&5
16961 $as_echo "$as_me: WARNING: GL/gl.h: proceeding with the preprocessor's result" >&2;}
16962     { $as_echo "$as_me:$LINENO: WARNING: GL/gl.h: in the future, the compiler will take precedence" >&5
16963 $as_echo "$as_me: WARNING: GL/gl.h: in the future, the compiler will take precedence" >&2;}
16964
16965     ;;
16966 esac
16967 { $as_echo "$as_me:$LINENO: checking for GL/gl.h" >&5
16968 $as_echo_n "checking for GL/gl.h... " >&6; }
16969 if test "${ac_cv_header_GL_gl_h+set}" = set; then
16970   $as_echo_n "(cached) " >&6
16971 else
16972   ac_cv_header_GL_gl_h=$ac_header_preproc
16973 fi
16974 { $as_echo "$as_me:$LINENO: result: $ac_cv_header_GL_gl_h" >&5
16975 $as_echo "$ac_cv_header_GL_gl_h" >&6; }
16976
16977 fi
16978 if test "x$ac_cv_header_GL_gl_h" = x""yes; then
16979   have_gl=yes
16980 else
16981   have_gl=no
16982 fi
16983
16984
16985   CPPFLAGS="$ac_save_CPPFLAGS"
16986   if test "$have_gl" = yes ; then
16987
16988   ac_save_CPPFLAGS="$CPPFLAGS"
16989   if test \! -z "$includedir" ; then
16990     CPPFLAGS="$CPPFLAGS -I$includedir"
16991   fi
16992   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
16993   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
16994   { $as_echo "$as_me:$LINENO: checking for GL/glx.h" >&5
16995 $as_echo_n "checking for GL/glx.h... " >&6; }
16996 if test "${ac_cv_header_GL_glx_h+set}" = set; then
16997   $as_echo_n "(cached) " >&6
16998 else
16999   cat >conftest.$ac_ext <<_ACEOF
17000 /* confdefs.h.  */
17001 _ACEOF
17002 cat confdefs.h >>conftest.$ac_ext
17003 cat >>conftest.$ac_ext <<_ACEOF
17004 /* end confdefs.h.  */
17005 #include <GL/gl.h>
17006
17007 #include <GL/glx.h>
17008 _ACEOF
17009 rm -rf conftest.$ac_objext
17010 if { (ac_try="$ac_compile"
17011 case "(($ac_try" in
17012   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17013   *) ac_try_echo=$ac_try;;
17014 esac
17015 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
17016 $as_echo "$ac_try_echo") >&5
17017   (eval "$ac_compile") 2>conftest.er1
17018   ac_status=$?
17019   grep -v '^ *+' conftest.er1 >conftest.err
17020   rm -rf conftest.er1
17021   cat conftest.err >&5
17022   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
17023   (exit $ac_status); } && {
17024          test -z "$ac_c_werror_flag" ||
17025          test ! -s conftest.err
17026        } && test -s conftest.$ac_objext; then
17027   ac_cv_header_GL_glx_h=yes
17028 else
17029   $as_echo "$as_me: failed program was:" >&5
17030 sed 's/^/| /' conftest.$ac_ext >&5
17031
17032         ac_cv_header_GL_glx_h=no
17033 fi
17034
17035 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
17036 fi
17037 { $as_echo "$as_me:$LINENO: result: $ac_cv_header_GL_glx_h" >&5
17038 $as_echo "$ac_cv_header_GL_glx_h" >&6; }
17039 if test "x$ac_cv_header_GL_glx_h" = x""yes; then
17040   have_gl=yes
17041 else
17042   have_gl=no
17043 fi
17044
17045
17046   CPPFLAGS="$ac_save_CPPFLAGS"
17047   fi
17048
17049   # If we have the headers, try and figure out which vendor it's from.
17050   #
17051   if test "$have_gl" = yes ; then
17052
17053     # We need to know whether it's MesaGL so that we know which libraries
17054     # to link against.
17055     #
17056     { $as_echo "$as_me:$LINENO: checking whether GL is really MesaGL" >&5
17057 $as_echo_n "checking whether GL is really MesaGL... " >&6; }
17058 if test "${ac_cv_have_mesa_gl+set}" = set; then
17059   $as_echo_n "(cached) " >&6
17060 else
17061   ac_cv_have_mesa_gl=no
17062        if test "$ac_macosx" = no; then
17063          # WTF! MacOS 10.5.0 ships the Mesa GL headers!
17064          # It's not really Mesa, is it?
17065
17066   ac_save_CPPFLAGS="$CPPFLAGS"
17067   if test \! -z "$includedir" ; then
17068     CPPFLAGS="$CPPFLAGS -I$includedir"
17069   fi
17070   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
17071   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
17072   cat >conftest.$ac_ext <<_ACEOF
17073 /* confdefs.h.  */
17074 _ACEOF
17075 cat confdefs.h >>conftest.$ac_ext
17076 cat >>conftest.$ac_ext <<_ACEOF
17077 /* end confdefs.h.  */
17078 #include <GL/glx.h>
17079
17080 _ACEOF
17081 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
17082   $EGREP "Mesa|MESA" >/dev/null 2>&1; then
17083   ac_cv_have_mesa_gl=yes
17084 fi
17085 rm -rf conftest*
17086
17087   CPPFLAGS="$ac_save_CPPFLAGS"
17088        fi
17089 fi
17090 { $as_echo "$as_me:$LINENO: result: $ac_cv_have_mesa_gl" >&5
17091 $as_echo "$ac_cv_have_mesa_gl" >&6; }
17092     ac_have_mesa_gl=$ac_cv_have_mesa_gl
17093
17094     gl_lib_1=""
17095     GL_LIBS=""
17096
17097     if test "$ac_macosx" = yes; then
17098
17099       # Without these, every link against libGL gets a bunch of useless
17100       # warnings.
17101       #
17102       osx_crud="-bind_at_load -multiply_defined suppress"
17103       { $as_echo "$as_me:$LINENO: result: adding \"$osx_crud\" to GL_LIBS" >&5
17104 $as_echo "adding \"$osx_crud\" to GL_LIBS" >&6; }
17105       GL_LIBS="$GL_LIBS $osx_crud"
17106       unset osx_crud
17107
17108       # New lossage in 10.5.0: without this, we get:
17109       #   ld: cycle in dylib re-exports with /usr/X11/lib/libGL.dylib
17110       #
17111       osx_crud="/System/Library/Frameworks/OpenGL.framework/Versions/A/Libraries/libGL.dylib"
17112       osx_crud="-Wl,-dylib_file,${osx_crud}:${osx_crud}"
17113
17114       { $as_echo "$as_me:$LINENO: result: adding \"$osx_crud\" to GL_LIBS" >&5
17115 $as_echo "adding \"$osx_crud\" to GL_LIBS" >&6; }
17116       GL_LIBS="$GL_LIBS $osx_crud"
17117       unset osx_crud
17118     fi
17119
17120
17121     # Some versions of MesaGL are compiled to require -lpthread.
17122     # So if the Mesa headers exist, and -lpthread exists, then always
17123     # link -lpthread after the Mesa libs (be they named -lGL or -lMesaGL.)
17124     #
17125     if test "$ac_have_mesa_gl" = yes; then
17126       { $as_echo "$as_me:$LINENO: checking for pthread_create in -lpthread" >&5
17127 $as_echo_n "checking for pthread_create in -lpthread... " >&6; }
17128 if test "${ac_cv_lib_pthread_pthread_create+set}" = set; then
17129   $as_echo_n "(cached) " >&6
17130 else
17131   ac_check_lib_save_LIBS=$LIBS
17132 LIBS="-lpthread  $LIBS"
17133 cat >conftest.$ac_ext <<_ACEOF
17134 /* confdefs.h.  */
17135 _ACEOF
17136 cat confdefs.h >>conftest.$ac_ext
17137 cat >>conftest.$ac_ext <<_ACEOF
17138 /* end confdefs.h.  */
17139
17140 /* Override any GCC internal prototype to avoid an error.
17141    Use char because int might match the return type of a GCC
17142    builtin and then its argument prototype would still apply.  */
17143 #ifdef __cplusplus
17144 extern "C"
17145 #endif
17146 char pthread_create ();
17147 int
17148 main ()
17149 {
17150 return pthread_create ();
17151   ;
17152   return 0;
17153 }
17154 _ACEOF
17155 rm -rf conftest.$ac_objext conftest$ac_exeext
17156 if { (ac_try="$ac_link"
17157 case "(($ac_try" in
17158   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17159   *) ac_try_echo=$ac_try;;
17160 esac
17161 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
17162 $as_echo "$ac_try_echo") >&5
17163   (eval "$ac_link") 2>conftest.er1
17164   ac_status=$?
17165   grep -v '^ *+' conftest.er1 >conftest.err
17166   rm -rf conftest.er1
17167   cat conftest.err >&5
17168   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
17169   (exit $ac_status); } && {
17170          test -z "$ac_c_werror_flag" ||
17171          test ! -s conftest.err
17172        } && test -s conftest$ac_exeext && {
17173          test "$cross_compiling" = yes ||
17174          $as_test_x conftest$ac_exeext
17175        }; then
17176   ac_cv_lib_pthread_pthread_create=yes
17177 else
17178   $as_echo "$as_me: failed program was:" >&5
17179 sed 's/^/| /' conftest.$ac_ext >&5
17180
17181         ac_cv_lib_pthread_pthread_create=no
17182 fi
17183
17184 rm -rf conftest.dSYM
17185 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
17186       conftest$ac_exeext conftest.$ac_ext
17187 LIBS=$ac_check_lib_save_LIBS
17188 fi
17189 { $as_echo "$as_me:$LINENO: result: $ac_cv_lib_pthread_pthread_create" >&5
17190 $as_echo "$ac_cv_lib_pthread_pthread_create" >&6; }
17191 if test "x$ac_cv_lib_pthread_pthread_create" = x""yes; then
17192   GL_LIBS="-lpthread"
17193 fi
17194
17195     fi
17196
17197
17198     # If we have Mesa headers, check to see if we can link against -lMesaGL.
17199     # If we don't have Mesa headers, or we don't have -lMesaGL, try -lGL.
17200     # Else, warn that GL is busted.  (We have the headers, but no libs.)
17201     #
17202
17203     if test "$ac_have_mesa_gl" = yes ; then
17204
17205   ac_save_CPPFLAGS="$CPPFLAGS"
17206   ac_save_LDFLAGS="$LDFLAGS"
17207 #  ac_save_LIBS="$LIBS"
17208
17209   if test \! -z "$includedir" ; then
17210     CPPFLAGS="$CPPFLAGS -I$includedir"
17211   fi
17212   # note: $X_CFLAGS includes $x_includes
17213   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
17214
17215   if test \! -z "$libdir" ; then
17216     LDFLAGS="$LDFLAGS -L$libdir"
17217   fi
17218   # note: $X_LIBS includes $x_libraries
17219   LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
17220
17221   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
17222   LDFLAGS=`eval eval eval eval eval eval eval eval eval echo $LDFLAGS`
17223   { $as_echo "$as_me:$LINENO: checking for glXCreateContext in -lMesaGL" >&5
17224 $as_echo_n "checking for glXCreateContext in -lMesaGL... " >&6; }
17225 if test "${ac_cv_lib_MesaGL_glXCreateContext+set}" = set; then
17226   $as_echo_n "(cached) " >&6
17227 else
17228   ac_check_lib_save_LIBS=$LIBS
17229 LIBS="-lMesaGL -lMesaGLU $GL_LIBS -lX11 -lXext $VIDMODE_LIBS -lm $LIBS"
17230 cat >conftest.$ac_ext <<_ACEOF
17231 /* confdefs.h.  */
17232 _ACEOF
17233 cat confdefs.h >>conftest.$ac_ext
17234 cat >>conftest.$ac_ext <<_ACEOF
17235 /* end confdefs.h.  */
17236
17237 /* Override any GCC internal prototype to avoid an error.
17238    Use char because int might match the return type of a GCC
17239    builtin and then its argument prototype would still apply.  */
17240 #ifdef __cplusplus
17241 extern "C"
17242 #endif
17243 char glXCreateContext ();
17244 int
17245 main ()
17246 {
17247 return glXCreateContext ();
17248   ;
17249   return 0;
17250 }
17251 _ACEOF
17252 rm -rf conftest.$ac_objext conftest$ac_exeext
17253 if { (ac_try="$ac_link"
17254 case "(($ac_try" in
17255   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17256   *) ac_try_echo=$ac_try;;
17257 esac
17258 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
17259 $as_echo "$ac_try_echo") >&5
17260   (eval "$ac_link") 2>conftest.er1
17261   ac_status=$?
17262   grep -v '^ *+' conftest.er1 >conftest.err
17263   rm -rf conftest.er1
17264   cat conftest.err >&5
17265   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
17266   (exit $ac_status); } && {
17267          test -z "$ac_c_werror_flag" ||
17268          test ! -s conftest.err
17269        } && test -s conftest$ac_exeext && {
17270          test "$cross_compiling" = yes ||
17271          $as_test_x conftest$ac_exeext
17272        }; then
17273   ac_cv_lib_MesaGL_glXCreateContext=yes
17274 else
17275   $as_echo "$as_me: failed program was:" >&5
17276 sed 's/^/| /' conftest.$ac_ext >&5
17277
17278         ac_cv_lib_MesaGL_glXCreateContext=no
17279 fi
17280
17281 rm -rf conftest.dSYM
17282 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
17283       conftest$ac_exeext conftest.$ac_ext
17284 LIBS=$ac_check_lib_save_LIBS
17285 fi
17286 { $as_echo "$as_me:$LINENO: result: $ac_cv_lib_MesaGL_glXCreateContext" >&5
17287 $as_echo "$ac_cv_lib_MesaGL_glXCreateContext" >&6; }
17288 if test "x$ac_cv_lib_MesaGL_glXCreateContext" = x""yes; then
17289   gl_lib_1="MesaGL"
17290                       GL_LIBS="-lMesaGL -lMesaGLU $VIDMODE_LIBS $GL_LIBS"
17291 fi
17292
17293   CPPFLAGS="$ac_save_CPPFLAGS"
17294   LDFLAGS="$ac_save_LDFLAGS"
17295 #  LIBS="$ac_save_LIBS"
17296
17297     fi
17298
17299     if test "$gl_lib_1" = "" ; then
17300
17301   ac_save_CPPFLAGS="$CPPFLAGS"
17302   ac_save_LDFLAGS="$LDFLAGS"
17303 #  ac_save_LIBS="$LIBS"
17304
17305   if test \! -z "$includedir" ; then
17306     CPPFLAGS="$CPPFLAGS -I$includedir"
17307   fi
17308   # note: $X_CFLAGS includes $x_includes
17309   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
17310
17311   if test \! -z "$libdir" ; then
17312     LDFLAGS="$LDFLAGS -L$libdir"
17313   fi
17314   # note: $X_LIBS includes $x_libraries
17315   LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
17316
17317   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
17318   LDFLAGS=`eval eval eval eval eval eval eval eval eval echo $LDFLAGS`
17319   { $as_echo "$as_me:$LINENO: checking for glXCreateContext in -lGL" >&5
17320 $as_echo_n "checking for glXCreateContext in -lGL... " >&6; }
17321 if test "${ac_cv_lib_GL_glXCreateContext+set}" = set; then
17322   $as_echo_n "(cached) " >&6
17323 else
17324   ac_check_lib_save_LIBS=$LIBS
17325 LIBS="-lGL -lGLU $GL_LIBS -lX11 -lXext $VIDMODE_LIBS -lm $LIBS"
17326 cat >conftest.$ac_ext <<_ACEOF
17327 /* confdefs.h.  */
17328 _ACEOF
17329 cat confdefs.h >>conftest.$ac_ext
17330 cat >>conftest.$ac_ext <<_ACEOF
17331 /* end confdefs.h.  */
17332
17333 /* Override any GCC internal prototype to avoid an error.
17334    Use char because int might match the return type of a GCC
17335    builtin and then its argument prototype would still apply.  */
17336 #ifdef __cplusplus
17337 extern "C"
17338 #endif
17339 char glXCreateContext ();
17340 int
17341 main ()
17342 {
17343 return glXCreateContext ();
17344   ;
17345   return 0;
17346 }
17347 _ACEOF
17348 rm -rf conftest.$ac_objext conftest$ac_exeext
17349 if { (ac_try="$ac_link"
17350 case "(($ac_try" in
17351   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17352   *) ac_try_echo=$ac_try;;
17353 esac
17354 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
17355 $as_echo "$ac_try_echo") >&5
17356   (eval "$ac_link") 2>conftest.er1
17357   ac_status=$?
17358   grep -v '^ *+' conftest.er1 >conftest.err
17359   rm -rf conftest.er1
17360   cat conftest.err >&5
17361   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
17362   (exit $ac_status); } && {
17363          test -z "$ac_c_werror_flag" ||
17364          test ! -s conftest.err
17365        } && test -s conftest$ac_exeext && {
17366          test "$cross_compiling" = yes ||
17367          $as_test_x conftest$ac_exeext
17368        }; then
17369   ac_cv_lib_GL_glXCreateContext=yes
17370 else
17371   $as_echo "$as_me: failed program was:" >&5
17372 sed 's/^/| /' conftest.$ac_ext >&5
17373
17374         ac_cv_lib_GL_glXCreateContext=no
17375 fi
17376
17377 rm -rf conftest.dSYM
17378 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
17379       conftest$ac_exeext conftest.$ac_ext
17380 LIBS=$ac_check_lib_save_LIBS
17381 fi
17382 { $as_echo "$as_me:$LINENO: result: $ac_cv_lib_GL_glXCreateContext" >&5
17383 $as_echo "$ac_cv_lib_GL_glXCreateContext" >&6; }
17384 if test "x$ac_cv_lib_GL_glXCreateContext" = x""yes; then
17385   gl_lib_1="GL"
17386                       GL_LIBS="-lGL -lGLU $VIDMODE_LIBS $GL_LIBS"
17387 fi
17388
17389   CPPFLAGS="$ac_save_CPPFLAGS"
17390   LDFLAGS="$ac_save_LDFLAGS"
17391 #  LIBS="$ac_save_LIBS"
17392
17393     fi
17394
17395     if test "$gl_lib_1" = "" ; then
17396       # we have headers, but no libs -- bail.
17397       have_gl=no
17398       ac_have_mesa_gl=no
17399       gl_halfassed=yes
17400     else
17401       # linking works -- we can build the GL hacks.
17402       cat >>confdefs.h <<\_ACEOF
17403 #define HAVE_GL 1
17404 _ACEOF
17405
17406       if test "$ac_have_mesa_gl" = yes ; then
17407         cat >>confdefs.h <<\_ACEOF
17408 #define HAVE_MESA_GL 1
17409 _ACEOF
17410
17411       fi
17412     fi
17413   fi
17414
17415
17416   # Now that we know we have GL headers and libs, do some more GL testing.
17417   #
17418
17419   if test "$have_gl" = yes ; then
17420     # If it's MesaGL, we'd like to issue a warning if the version number
17421     # is less than or equal to 2.6, because that version had a security bug.
17422     #
17423     if test "$ac_have_mesa_gl" = yes; then
17424
17425       { $as_echo "$as_me:$LINENO: checking MesaGL version number" >&5
17426 $as_echo_n "checking MesaGL version number... " >&6; }
17427 if test "${ac_cv_mesagl_version_string+set}" = set; then
17428   $as_echo_n "(cached) " >&6
17429 else
17430   cat > conftest.$ac_ext <<EOF
17431 #line 17435 "configure"
17432 #include "confdefs.h"
17433 #include <GL/gl.h>
17434 #ifndef MESA_MAJOR_VERSION
17435 # include <GL/xmesa.h>
17436 # ifdef XMESA_MAJOR_VERSION
17437    /* Around Mesa 3.2, they took out the Mesa version number, so instead,
17438       we have to check the XMesa version number (the number of the X protocol
17439       support, which seems to be the same as the Mesa version number.)
17440     */
17441 #  define MESA_MAJOR_VERSION XMESA_MAJOR_VERSION
17442 #  define MESA_MINOR_VERSION XMESA_MINOR_VERSION
17443 # else
17444    /* Oh great.  Some time after 3.4, they took out the xmesa.h header file,
17445       so we have no way of telling what version of Mesa this is at all.
17446       So, we'll guess that the osmesa version (the "offscreen protocol")
17447       is less than or equal to the real mesa version number.  Except that
17448       if OSmesa is 3.3, assume at least Mesa 3.4, since OSmesa was 3.3 in
17449       Mesa 3.4.  And Mesa 3.3 had xmesa.h.  What a complete load of shit!
17450     */
17451 # include <GL/osmesa.h>
17452 #  define MESA_MAJOR_VERSION OSMESA_MAJOR_VERSION
17453 #  define MESA_MINOR_VERSION OSMESA_MINOR_VERSION or newer, probably?
17454 #  if OSMESA_MAJOR_VERSION == 3 && OSMESA_MINOR_VERSION == 3
17455 #   undef MESA_MINOR_VERSION
17456 #   define MESA_MINOR_VERSION 4 or newer, probably?
17457 #  endif
17458 # endif
17459 #endif
17460 configure: MESA_MAJOR_VERSION MESA_MINOR_VERSION
17461 EOF
17462
17463          ac_save_CPPFLAGS="$CPPFLAGS"
17464          if test \! -z "$includedir" ; then
17465            CPPFLAGS="$CPPFLAGS -I$includedir"
17466          fi
17467          CPPFLAGS="$CPPFLAGS $X_CFLAGS"
17468
17469          mglv=`(eval "$ac_cpp conftest.$ac_ext") 2>&5 | grep configure:`
17470
17471          # M4 sucks!!
17472
17473           mglv=`echo "$mglv" | sed -n \
17474              's/^configure: *\([0-9][0-9]*\)  *\([0-9].*\)$/\1.\2/p'`
17475
17476
17477          rm -rf conftest.$ac_ext
17478
17479          CPPFLAGS="$ac_save_CPPFLAGS"
17480
17481          if test "$mglv" = ""; then
17482            ac_mesagl_version=unknown
17483            ac_mesagl_version_string=unknown
17484          else
17485            ac_mesagl_version_string="$mglv"
17486            # M4 sucks!!
17487
17488            maj=`echo "$mglv" | sed -n 's/^\([0-9][0-9]*\)\..*$/\1/p'`
17489            min=`echo "$mglv" | sed -n 's/^.*\.\([0-9][0-9]*\).*$/\1/p'`
17490
17491            ac_mesagl_version=`echo "$maj * 1000 + $min" | bc`
17492            if test -z "$ac_mesagl_version"; then
17493              ac_mesagl_version=unknown
17494              ac_mesagl_version_string=unknown
17495            fi
17496          fi
17497          ac_cv_mesagl_version=$ac_mesagl_version
17498          ac_cv_mesagl_version_string=$ac_mesagl_version_string
17499
17500 fi
17501 { $as_echo "$as_me:$LINENO: result: $ac_cv_mesagl_version_string" >&5
17502 $as_echo "$ac_cv_mesagl_version_string" >&6; }
17503       ac_mesagl_version=$ac_cv_mesagl_version
17504       ac_mesagl_version_string=$ac_cv_mesagl_version_string
17505     fi
17506
17507
17508     # Check for OpenGL 1.1 features.
17509     #
17510
17511   ac_save_CPPFLAGS="$CPPFLAGS"
17512   ac_save_LDFLAGS="$LDFLAGS"
17513 #  ac_save_LIBS="$LIBS"
17514
17515   if test \! -z "$includedir" ; then
17516     CPPFLAGS="$CPPFLAGS -I$includedir"
17517   fi
17518   # note: $X_CFLAGS includes $x_includes
17519   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
17520
17521   if test \! -z "$libdir" ; then
17522     LDFLAGS="$LDFLAGS -L$libdir"
17523   fi
17524   # note: $X_LIBS includes $x_libraries
17525   LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
17526
17527   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
17528   LDFLAGS=`eval eval eval eval eval eval eval eval eval echo $LDFLAGS`
17529   as_ac_Lib=`$as_echo "ac_cv_lib_$gl_lib_1''_glBindTexture" | $as_tr_sh`
17530 { $as_echo "$as_me:$LINENO: checking for glBindTexture in -l$gl_lib_1" >&5
17531 $as_echo_n "checking for glBindTexture in -l$gl_lib_1... " >&6; }
17532 if { as_var=$as_ac_Lib; eval "test \"\${$as_var+set}\" = set"; }; then
17533   $as_echo_n "(cached) " >&6
17534 else
17535   ac_check_lib_save_LIBS=$LIBS
17536 LIBS="-l$gl_lib_1 $GL_LIBS -lX11 -lXext -lm $LIBS"
17537 cat >conftest.$ac_ext <<_ACEOF
17538 /* confdefs.h.  */
17539 _ACEOF
17540 cat confdefs.h >>conftest.$ac_ext
17541 cat >>conftest.$ac_ext <<_ACEOF
17542 /* end confdefs.h.  */
17543
17544 /* Override any GCC internal prototype to avoid an error.
17545    Use char because int might match the return type of a GCC
17546    builtin and then its argument prototype would still apply.  */
17547 #ifdef __cplusplus
17548 extern "C"
17549 #endif
17550 char glBindTexture ();
17551 int
17552 main ()
17553 {
17554 return glBindTexture ();
17555   ;
17556   return 0;
17557 }
17558 _ACEOF
17559 rm -rf conftest.$ac_objext conftest$ac_exeext
17560 if { (ac_try="$ac_link"
17561 case "(($ac_try" in
17562   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17563   *) ac_try_echo=$ac_try;;
17564 esac
17565 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
17566 $as_echo "$ac_try_echo") >&5
17567   (eval "$ac_link") 2>conftest.er1
17568   ac_status=$?
17569   grep -v '^ *+' conftest.er1 >conftest.err
17570   rm -rf conftest.er1
17571   cat conftest.err >&5
17572   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
17573   (exit $ac_status); } && {
17574          test -z "$ac_c_werror_flag" ||
17575          test ! -s conftest.err
17576        } && test -s conftest$ac_exeext && {
17577          test "$cross_compiling" = yes ||
17578          $as_test_x conftest$ac_exeext
17579        }; then
17580   eval "$as_ac_Lib=yes"
17581 else
17582   $as_echo "$as_me: failed program was:" >&5
17583 sed 's/^/| /' conftest.$ac_ext >&5
17584
17585         eval "$as_ac_Lib=no"
17586 fi
17587
17588 rm -rf conftest.dSYM
17589 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
17590       conftest$ac_exeext conftest.$ac_ext
17591 LIBS=$ac_check_lib_save_LIBS
17592 fi
17593 ac_res=`eval 'as_val=${'$as_ac_Lib'}
17594                  $as_echo "$as_val"'`
17595                { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
17596 $as_echo "$ac_res" >&6; }
17597 as_val=`eval 'as_val=${'$as_ac_Lib'}
17598                  $as_echo "$as_val"'`
17599    if test "x$as_val" = x""yes; then
17600   cat >>confdefs.h <<\_ACEOF
17601 #define HAVE_GLBINDTEXTURE 1
17602 _ACEOF
17603
17604 else
17605   true
17606 fi
17607
17608   CPPFLAGS="$ac_save_CPPFLAGS"
17609   LDFLAGS="$ac_save_LDFLAGS"
17610 #  LIBS="$ac_save_LIBS"
17611
17612   fi
17613
17614 elif test "$with_gl" != no; then
17615   echo "error: must be yes or no: --with-gl=$with_gl"
17616   exit 1
17617 fi
17618
17619
17620 ###############################################################################
17621 #
17622 #       Check for -lgle.
17623 #
17624 ###############################################################################
17625
17626 have_gle=no
17627 with_gle_req=unspecified
17628 gle_halfassed=no
17629
17630 # Check whether --with-gle was given.
17631 if test "${with_gle+set}" = set; then
17632   withval=$with_gle; with_gle="$withval"; with_gle_req="$withval"
17633 else
17634   with_gle=yes
17635 fi
17636
17637
17638
17639    case "$with_gle" in
17640     yes) ;;
17641     no)  ;;
17642
17643     /*)
17644      { $as_echo "$as_me:$LINENO: checking for GLE headers" >&5
17645 $as_echo_n "checking for GLE headers... " >&6; }
17646      d=$with_gle/include
17647      if test -d $d; then
17648        X_CFLAGS="-I$d $X_CFLAGS"
17649        { $as_echo "$as_me:$LINENO: result: $d" >&5
17650 $as_echo "$d" >&6; }
17651      else
17652        { $as_echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
17653 $as_echo "not found ($d: no such directory)" >&6; }
17654      fi
17655
17656      { $as_echo "$as_me:$LINENO: checking for GLE libs" >&5
17657 $as_echo_n "checking for GLE libs... " >&6; }
17658      d=$with_gle/lib
17659      if test -d $d; then
17660        X_LIBS="-L$d $X_LIBS"
17661        { $as_echo "$as_me:$LINENO: result: $d" >&5
17662 $as_echo "$d" >&6; }
17663      else
17664        { $as_echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
17665 $as_echo "not found ($d: no such directory)" >&6; }
17666      fi
17667
17668      # replace the directory string with "yes".
17669      with_gle_req="yes"
17670      with_gle=$with_gle_req
17671      ;;
17672
17673     *)
17674      echo ""
17675      echo "error: argument to --with-gle must be \"yes\", \"no\", or a directory."
17676      echo "       If it is a directory, then \`DIR/include' will be added to"
17677      echo "       the -I list, and \`DIR/lib' will be added to the -L list."
17678      exit 1
17679      ;;
17680    esac
17681
17682
17683 GLE_LIBS=""
17684
17685 if test "$have_gl" = no ; then
17686  true
17687 elif test "$with_gle" = yes; then
17688
17689
17690   ac_save_CPPFLAGS="$CPPFLAGS"
17691   if test \! -z "$includedir" ; then
17692     CPPFLAGS="$CPPFLAGS -I$includedir"
17693   fi
17694   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
17695   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
17696   { $as_echo "$as_me:$LINENO: checking for GL/gle.h" >&5
17697 $as_echo_n "checking for GL/gle.h... " >&6; }
17698 if test "${ac_cv_header_GL_gle_h+set}" = set; then
17699   $as_echo_n "(cached) " >&6
17700 else
17701   cat >conftest.$ac_ext <<_ACEOF
17702 /* confdefs.h.  */
17703 _ACEOF
17704 cat confdefs.h >>conftest.$ac_ext
17705 cat >>conftest.$ac_ext <<_ACEOF
17706 /* end confdefs.h.  */
17707 #include <GL/gl.h>
17708
17709 #include <GL/gle.h>
17710 _ACEOF
17711 rm -rf conftest.$ac_objext
17712 if { (ac_try="$ac_compile"
17713 case "(($ac_try" in
17714   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17715   *) ac_try_echo=$ac_try;;
17716 esac
17717 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
17718 $as_echo "$ac_try_echo") >&5
17719   (eval "$ac_compile") 2>conftest.er1
17720   ac_status=$?
17721   grep -v '^ *+' conftest.er1 >conftest.err
17722   rm -rf conftest.er1
17723   cat conftest.err >&5
17724   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
17725   (exit $ac_status); } && {
17726          test -z "$ac_c_werror_flag" ||
17727          test ! -s conftest.err
17728        } && test -s conftest.$ac_objext; then
17729   ac_cv_header_GL_gle_h=yes
17730 else
17731   $as_echo "$as_me: failed program was:" >&5
17732 sed 's/^/| /' conftest.$ac_ext >&5
17733
17734         ac_cv_header_GL_gle_h=no
17735 fi
17736
17737 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
17738 fi
17739 { $as_echo "$as_me:$LINENO: result: $ac_cv_header_GL_gle_h" >&5
17740 $as_echo "$ac_cv_header_GL_gle_h" >&6; }
17741 if test "x$ac_cv_header_GL_gle_h" = x""yes; then
17742   have_gle3=yes
17743 else
17744   have_gle3=no
17745 fi
17746
17747
17748   CPPFLAGS="$ac_save_CPPFLAGS"
17749   if test "$have_gle3" = yes ; then
17750     have_gle=yes;
17751   else
17752
17753   ac_save_CPPFLAGS="$CPPFLAGS"
17754   if test \! -z "$includedir" ; then
17755     CPPFLAGS="$CPPFLAGS -I$includedir"
17756   fi
17757   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
17758   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
17759   { $as_echo "$as_me:$LINENO: checking for GL/gutil.h" >&5
17760 $as_echo_n "checking for GL/gutil.h... " >&6; }
17761 if test "${ac_cv_header_GL_gutil_h+set}" = set; then
17762   $as_echo_n "(cached) " >&6
17763 else
17764   cat >conftest.$ac_ext <<_ACEOF
17765 /* confdefs.h.  */
17766 _ACEOF
17767 cat confdefs.h >>conftest.$ac_ext
17768 cat >>conftest.$ac_ext <<_ACEOF
17769 /* end confdefs.h.  */
17770 #include <GL/gl.h>
17771
17772 #include <GL/gutil.h>
17773 _ACEOF
17774 rm -rf conftest.$ac_objext
17775 if { (ac_try="$ac_compile"
17776 case "(($ac_try" in
17777   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17778   *) ac_try_echo=$ac_try;;
17779 esac
17780 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
17781 $as_echo "$ac_try_echo") >&5
17782   (eval "$ac_compile") 2>conftest.er1
17783   ac_status=$?
17784   grep -v '^ *+' conftest.er1 >conftest.err
17785   rm -rf conftest.er1
17786   cat conftest.err >&5
17787   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
17788   (exit $ac_status); } && {
17789          test -z "$ac_c_werror_flag" ||
17790          test ! -s conftest.err
17791        } && test -s conftest.$ac_objext; then
17792   ac_cv_header_GL_gutil_h=yes
17793 else
17794   $as_echo "$as_me: failed program was:" >&5
17795 sed 's/^/| /' conftest.$ac_ext >&5
17796
17797         ac_cv_header_GL_gutil_h=no
17798 fi
17799
17800 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
17801 fi
17802 { $as_echo "$as_me:$LINENO: result: $ac_cv_header_GL_gutil_h" >&5
17803 $as_echo "$ac_cv_header_GL_gutil_h" >&6; }
17804 if test "x$ac_cv_header_GL_gutil_h" = x""yes; then
17805   have_gle=yes
17806 else
17807   have_gle=no
17808 fi
17809
17810
17811   CPPFLAGS="$ac_save_CPPFLAGS"
17812     if test "$have_gle" = yes ; then
17813
17814   ac_save_CPPFLAGS="$CPPFLAGS"
17815   if test \! -z "$includedir" ; then
17816     CPPFLAGS="$CPPFLAGS -I$includedir"
17817   fi
17818   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
17819   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
17820   { $as_echo "$as_me:$LINENO: checking for GL/tube.h" >&5
17821 $as_echo_n "checking for GL/tube.h... " >&6; }
17822 if test "${ac_cv_header_GL_tube_h+set}" = set; then
17823   $as_echo_n "(cached) " >&6
17824 else
17825   cat >conftest.$ac_ext <<_ACEOF
17826 /* confdefs.h.  */
17827 _ACEOF
17828 cat confdefs.h >>conftest.$ac_ext
17829 cat >>conftest.$ac_ext <<_ACEOF
17830 /* end confdefs.h.  */
17831 #include <GL/gl.h>
17832
17833 #include <GL/tube.h>
17834 _ACEOF
17835 rm -rf conftest.$ac_objext
17836 if { (ac_try="$ac_compile"
17837 case "(($ac_try" in
17838   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17839   *) ac_try_echo=$ac_try;;
17840 esac
17841 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
17842 $as_echo "$ac_try_echo") >&5
17843   (eval "$ac_compile") 2>conftest.er1
17844   ac_status=$?
17845   grep -v '^ *+' conftest.er1 >conftest.err
17846   rm -rf conftest.er1
17847   cat conftest.err >&5
17848   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
17849   (exit $ac_status); } && {
17850          test -z "$ac_c_werror_flag" ||
17851          test ! -s conftest.err
17852        } && test -s conftest.$ac_objext; then
17853   ac_cv_header_GL_tube_h=yes
17854 else
17855   $as_echo "$as_me: failed program was:" >&5
17856 sed 's/^/| /' conftest.$ac_ext >&5
17857
17858         ac_cv_header_GL_tube_h=no
17859 fi
17860
17861 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
17862 fi
17863 { $as_echo "$as_me:$LINENO: result: $ac_cv_header_GL_tube_h" >&5
17864 $as_echo "$ac_cv_header_GL_tube_h" >&6; }
17865 if test "x$ac_cv_header_GL_tube_h" = x""yes; then
17866   have_gle=yes
17867 else
17868   have_gle=no
17869 fi
17870
17871
17872   CPPFLAGS="$ac_save_CPPFLAGS"
17873     fi
17874   fi
17875
17876   if test "$have_gle" = yes ; then
17877     have_gle=no
17878     gle_halfassed=yes
17879
17880   ac_save_CPPFLAGS="$CPPFLAGS"
17881   ac_save_LDFLAGS="$LDFLAGS"
17882 #  ac_save_LIBS="$LIBS"
17883
17884   if test \! -z "$includedir" ; then
17885     CPPFLAGS="$CPPFLAGS -I$includedir"
17886   fi
17887   # note: $X_CFLAGS includes $x_includes
17888   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
17889
17890   if test \! -z "$libdir" ; then
17891     LDFLAGS="$LDFLAGS -L$libdir"
17892   fi
17893   # note: $X_LIBS includes $x_libraries
17894   LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
17895
17896   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
17897   LDFLAGS=`eval eval eval eval eval eval eval eval eval echo $LDFLAGS`
17898   { $as_echo "$as_me:$LINENO: checking for gleCreateGC in -lgle" >&5
17899 $as_echo_n "checking for gleCreateGC in -lgle... " >&6; }
17900 if test "${ac_cv_lib_gle_gleCreateGC+set}" = set; then
17901   $as_echo_n "(cached) " >&6
17902 else
17903   ac_check_lib_save_LIBS=$LIBS
17904 LIBS="-lgle $GL_LIBS -lX11 -lXext -lm $LIBS"
17905 cat >conftest.$ac_ext <<_ACEOF
17906 /* confdefs.h.  */
17907 _ACEOF
17908 cat confdefs.h >>conftest.$ac_ext
17909 cat >>conftest.$ac_ext <<_ACEOF
17910 /* end confdefs.h.  */
17911
17912 /* Override any GCC internal prototype to avoid an error.
17913    Use char because int might match the return type of a GCC
17914    builtin and then its argument prototype would still apply.  */
17915 #ifdef __cplusplus
17916 extern "C"
17917 #endif
17918 char gleCreateGC ();
17919 int
17920 main ()
17921 {
17922 return gleCreateGC ();
17923   ;
17924   return 0;
17925 }
17926 _ACEOF
17927 rm -rf conftest.$ac_objext conftest$ac_exeext
17928 if { (ac_try="$ac_link"
17929 case "(($ac_try" in
17930   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17931   *) ac_try_echo=$ac_try;;
17932 esac
17933 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
17934 $as_echo "$ac_try_echo") >&5
17935   (eval "$ac_link") 2>conftest.er1
17936   ac_status=$?
17937   grep -v '^ *+' conftest.er1 >conftest.err
17938   rm -rf conftest.er1
17939   cat conftest.err >&5
17940   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
17941   (exit $ac_status); } && {
17942          test -z "$ac_c_werror_flag" ||
17943          test ! -s conftest.err
17944        } && test -s conftest$ac_exeext && {
17945          test "$cross_compiling" = yes ||
17946          $as_test_x conftest$ac_exeext
17947        }; then
17948   ac_cv_lib_gle_gleCreateGC=yes
17949 else
17950   $as_echo "$as_me: failed program was:" >&5
17951 sed 's/^/| /' conftest.$ac_ext >&5
17952
17953         ac_cv_lib_gle_gleCreateGC=no
17954 fi
17955
17956 rm -rf conftest.dSYM
17957 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
17958       conftest$ac_exeext conftest.$ac_ext
17959 LIBS=$ac_check_lib_save_LIBS
17960 fi
17961 { $as_echo "$as_me:$LINENO: result: $ac_cv_lib_gle_gleCreateGC" >&5
17962 $as_echo "$ac_cv_lib_gle_gleCreateGC" >&6; }
17963 if test "x$ac_cv_lib_gle_gleCreateGC" = x""yes; then
17964   have_gle=yes; gle_halfassed=no; GLE_LIBS="-lgle"
17965 fi
17966
17967   CPPFLAGS="$ac_save_CPPFLAGS"
17968   LDFLAGS="$ac_save_LDFLAGS"
17969 #  LIBS="$ac_save_LIBS"
17970
17971   fi
17972   if test "$have_gle" = yes ; then
17973     have_gle=no
17974     gle_halfassed=yes
17975
17976     # sometimes the libmatrix stuff is included in libgle.  look there first.
17977 #
17978 # I don't get it.  For some reason, this test passes on SGI, as if
17979 # uview_direction_d() was in libgle -- but it's not, it's in libmatrix.
17980 # Yet the link is succeeding.  Why???
17981 #
17982 #    AC_CHECK_X_LIB(gle, uview_direction_d,
17983 #                   [have_gle=yes; gle_halfassed=no],
17984 #                   [], $GL_LIBS -lX11 -lXext -lm)
17985
17986     # As of GLE 3 this is in libgle, and has changed name to uview_direction!
17987     # *sigh*
17988     if test "$have_gle3" = yes ; then
17989
17990   ac_save_CPPFLAGS="$CPPFLAGS"
17991   ac_save_LDFLAGS="$LDFLAGS"
17992 #  ac_save_LIBS="$LIBS"
17993
17994   if test \! -z "$includedir" ; then
17995     CPPFLAGS="$CPPFLAGS -I$includedir"
17996   fi
17997   # note: $X_CFLAGS includes $x_includes
17998   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
17999
18000   if test \! -z "$libdir" ; then
18001     LDFLAGS="$LDFLAGS -L$libdir"
18002   fi
18003   # note: $X_LIBS includes $x_libraries
18004   LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
18005
18006   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
18007   LDFLAGS=`eval eval eval eval eval eval eval eval eval echo $LDFLAGS`
18008   { $as_echo "$as_me:$LINENO: checking for uview_direction in -lgle" >&5
18009 $as_echo_n "checking for uview_direction in -lgle... " >&6; }
18010 if test "${ac_cv_lib_gle_uview_direction+set}" = set; then
18011   $as_echo_n "(cached) " >&6
18012 else
18013   ac_check_lib_save_LIBS=$LIBS
18014 LIBS="-lgle $GL_LIBS -lX11 -lXext -lm $LIBS"
18015 cat >conftest.$ac_ext <<_ACEOF
18016 /* confdefs.h.  */
18017 _ACEOF
18018 cat confdefs.h >>conftest.$ac_ext
18019 cat >>conftest.$ac_ext <<_ACEOF
18020 /* end confdefs.h.  */
18021
18022 /* Override any GCC internal prototype to avoid an error.
18023    Use char because int might match the return type of a GCC
18024    builtin and then its argument prototype would still apply.  */
18025 #ifdef __cplusplus
18026 extern "C"
18027 #endif
18028 char uview_direction ();
18029 int
18030 main ()
18031 {
18032 return uview_direction ();
18033   ;
18034   return 0;
18035 }
18036 _ACEOF
18037 rm -rf conftest.$ac_objext conftest$ac_exeext
18038 if { (ac_try="$ac_link"
18039 case "(($ac_try" in
18040   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18041   *) ac_try_echo=$ac_try;;
18042 esac
18043 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
18044 $as_echo "$ac_try_echo") >&5
18045   (eval "$ac_link") 2>conftest.er1
18046   ac_status=$?
18047   grep -v '^ *+' conftest.er1 >conftest.err
18048   rm -rf conftest.er1
18049   cat conftest.err >&5
18050   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
18051   (exit $ac_status); } && {
18052          test -z "$ac_c_werror_flag" ||
18053          test ! -s conftest.err
18054        } && test -s conftest$ac_exeext && {
18055          test "$cross_compiling" = yes ||
18056          $as_test_x conftest$ac_exeext
18057        }; then
18058   ac_cv_lib_gle_uview_direction=yes
18059 else
18060   $as_echo "$as_me: failed program was:" >&5
18061 sed 's/^/| /' conftest.$ac_ext >&5
18062
18063         ac_cv_lib_gle_uview_direction=no
18064 fi
18065
18066 rm -rf conftest.dSYM
18067 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
18068       conftest$ac_exeext conftest.$ac_ext
18069 LIBS=$ac_check_lib_save_LIBS
18070 fi
18071 { $as_echo "$as_me:$LINENO: result: $ac_cv_lib_gle_uview_direction" >&5
18072 $as_echo "$ac_cv_lib_gle_uview_direction" >&6; }
18073 if test "x$ac_cv_lib_gle_uview_direction" = x""yes; then
18074   have_gle=yes; gle_halfassed=no
18075 fi
18076
18077   CPPFLAGS="$ac_save_CPPFLAGS"
18078   LDFLAGS="$ac_save_LDFLAGS"
18079 #  LIBS="$ac_save_LIBS"
18080
18081     fi
18082     # if it wasn't in libgle, then look in libmatrix.
18083     if test "$have_gle" = no ; then
18084
18085   ac_save_CPPFLAGS="$CPPFLAGS"
18086   ac_save_LDFLAGS="$LDFLAGS"
18087 #  ac_save_LIBS="$LIBS"
18088
18089   if test \! -z "$includedir" ; then
18090     CPPFLAGS="$CPPFLAGS -I$includedir"
18091   fi
18092   # note: $X_CFLAGS includes $x_includes
18093   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
18094
18095   if test \! -z "$libdir" ; then
18096     LDFLAGS="$LDFLAGS -L$libdir"
18097   fi
18098   # note: $X_LIBS includes $x_libraries
18099   LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
18100
18101   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
18102   LDFLAGS=`eval eval eval eval eval eval eval eval eval echo $LDFLAGS`
18103   { $as_echo "$as_me:$LINENO: checking for uview_direction_d in -lmatrix" >&5
18104 $as_echo_n "checking for uview_direction_d in -lmatrix... " >&6; }
18105 if test "${ac_cv_lib_matrix_uview_direction_d+set}" = set; then
18106   $as_echo_n "(cached) " >&6
18107 else
18108   ac_check_lib_save_LIBS=$LIBS
18109 LIBS="-lmatrix $GL_LIBS -lX11 -lXext -lm $LIBS"
18110 cat >conftest.$ac_ext <<_ACEOF
18111 /* confdefs.h.  */
18112 _ACEOF
18113 cat confdefs.h >>conftest.$ac_ext
18114 cat >>conftest.$ac_ext <<_ACEOF
18115 /* end confdefs.h.  */
18116
18117 /* Override any GCC internal prototype to avoid an error.
18118    Use char because int might match the return type of a GCC
18119    builtin and then its argument prototype would still apply.  */
18120 #ifdef __cplusplus
18121 extern "C"
18122 #endif
18123 char uview_direction_d ();
18124 int
18125 main ()
18126 {
18127 return uview_direction_d ();
18128   ;
18129   return 0;
18130 }
18131 _ACEOF
18132 rm -rf conftest.$ac_objext conftest$ac_exeext
18133 if { (ac_try="$ac_link"
18134 case "(($ac_try" in
18135   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18136   *) ac_try_echo=$ac_try;;
18137 esac
18138 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
18139 $as_echo "$ac_try_echo") >&5
18140   (eval "$ac_link") 2>conftest.er1
18141   ac_status=$?
18142   grep -v '^ *+' conftest.er1 >conftest.err
18143   rm -rf conftest.er1
18144   cat conftest.err >&5
18145   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
18146   (exit $ac_status); } && {
18147          test -z "$ac_c_werror_flag" ||
18148          test ! -s conftest.err
18149        } && test -s conftest$ac_exeext && {
18150          test "$cross_compiling" = yes ||
18151          $as_test_x conftest$ac_exeext
18152        }; then
18153   ac_cv_lib_matrix_uview_direction_d=yes
18154 else
18155   $as_echo "$as_me: failed program was:" >&5
18156 sed 's/^/| /' conftest.$ac_ext >&5
18157
18158         ac_cv_lib_matrix_uview_direction_d=no
18159 fi
18160
18161 rm -rf conftest.dSYM
18162 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
18163       conftest$ac_exeext conftest.$ac_ext
18164 LIBS=$ac_check_lib_save_LIBS
18165 fi
18166 { $as_echo "$as_me:$LINENO: result: $ac_cv_lib_matrix_uview_direction_d" >&5
18167 $as_echo "$ac_cv_lib_matrix_uview_direction_d" >&6; }
18168 if test "x$ac_cv_lib_matrix_uview_direction_d" = x""yes; then
18169   have_gle=yes; gle_halfassed=no;
18170                       GLE_LIBS="$GLE_LIBS -lmatrix"
18171 fi
18172
18173   CPPFLAGS="$ac_save_CPPFLAGS"
18174   LDFLAGS="$ac_save_LDFLAGS"
18175 #  LIBS="$ac_save_LIBS"
18176
18177     fi
18178   fi
18179
18180   if test "$have_gle" = yes ; then
18181     cat >>confdefs.h <<\_ACEOF
18182 #define HAVE_GLE 1
18183 _ACEOF
18184
18185     if test "$have_gle3" = yes ; then
18186       cat >>confdefs.h <<\_ACEOF
18187 #define HAVE_GLE3 1
18188 _ACEOF
18189
18190     fi
18191   fi
18192
18193 elif test "$with_gle" != no; then
18194   echo "error: must be yes or no: --with-gle=$with_gle"
18195   exit 1
18196
18197 fi
18198
18199
18200 ###############################################################################
18201 #
18202 #       Check for -lgdk_pixbuf.
18203 #       These tests are for gdk_pixbuf usage of the hacks,
18204 #       not xscreensaver-demo (thus we have to test again to get
18205 #       the libraries right: don't want to pull in all of GTK
18206 #       for the hacks.)
18207 #
18208 ###############################################################################
18209
18210 have_gdk_pixbuf=no
18211 with_gdk_pixbuf_req=unspecified
18212
18213 # Check whether --with-pixbuf was given.
18214 if test "${with_pixbuf+set}" = set; then
18215   withval=$with_pixbuf; with_gdk_pixbuf="$withval"; with_gdk_pixbuf_req="$withval"
18216 else
18217   with_gdk_pixbuf=yes
18218 fi
18219
18220
18221 # if --with-pixbuf=/directory/ was specified, remember that directory so that
18222 # we can also look for the `gdk-pixbuf-config' program in that directory.
18223 case "$with_gdk_pixbuf" in
18224   /*)
18225     gdk_pixbuf_dir="$with_gdk_pixbuf"
18226     ;;
18227   *)
18228     gdk_pixbuf_dir=""
18229     ;;
18230 esac
18231
18232
18233    case "$with_gdk_pixbuf" in
18234     yes) ;;
18235     no)  ;;
18236
18237     /*)
18238      { $as_echo "$as_me:$LINENO: checking for GDK_PIXBUF headers" >&5
18239 $as_echo_n "checking for GDK_PIXBUF headers... " >&6; }
18240      d=$with_gdk_pixbuf/include
18241      if test -d $d; then
18242        X_CFLAGS="-I$d $X_CFLAGS"
18243        { $as_echo "$as_me:$LINENO: result: $d" >&5
18244 $as_echo "$d" >&6; }
18245      else
18246        { $as_echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
18247 $as_echo "not found ($d: no such directory)" >&6; }
18248      fi
18249
18250      { $as_echo "$as_me:$LINENO: checking for GDK_PIXBUF libs" >&5
18251 $as_echo_n "checking for GDK_PIXBUF libs... " >&6; }
18252      d=$with_gdk_pixbuf/lib
18253      if test -d $d; then
18254        X_LIBS="-L$d $X_LIBS"
18255        { $as_echo "$as_me:$LINENO: result: $d" >&5
18256 $as_echo "$d" >&6; }
18257      else
18258        { $as_echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
18259 $as_echo "not found ($d: no such directory)" >&6; }
18260      fi
18261
18262      # replace the directory string with "yes".
18263      with_gdk_pixbuf_req="yes"
18264      with_gdk_pixbuf=$with_gdk_pixbuf_req
18265      ;;
18266
18267     *)
18268      echo ""
18269      echo "error: argument to --with-pixbuf must be \"yes\", \"no\", or a directory."
18270      echo "       If it is a directory, then \`DIR/include' will be added to"
18271      echo "       the -I list, and \`DIR/lib' will be added to the -L list."
18272      exit 1
18273      ;;
18274    esac
18275
18276
18277 if test "$with_gdk_pixbuf" != yes -a "$with_gdk_pixbuf" != no ; then
18278   echo "error: must be yes or no: --with-pixbuf=$with_gdk_pixbuf"
18279   exit 1
18280 fi
18281
18282 if test "$with_gdk_pixbuf" = yes; then
18283   have_gdk_pixbuf=no
18284
18285   pkgs=''
18286   ok="yes"
18287
18288   pkg_check_version gdk-pixbuf-2.0      2.0.0
18289   pkg_check_version gdk-pixbuf-xlib-2.0 2.0.0
18290   have_gdk_pixbuf="$ok"
18291
18292   if test "$have_gdk_pixbuf" = yes; then
18293     { $as_echo "$as_me:$LINENO: checking for gdk-pixbuf includes" >&5
18294 $as_echo_n "checking for gdk-pixbuf includes... " >&6; }
18295 if test "${ac_cv_gdk_pixbuf_config_cflags+set}" = set; then
18296   $as_echo_n "(cached) " >&6
18297 else
18298   ac_cv_gdk_pixbuf_config_cflags=`$pkg_config --cflags $pkgs`
18299 fi
18300 { $as_echo "$as_me:$LINENO: result: $ac_cv_gdk_pixbuf_config_cflags" >&5
18301 $as_echo "$ac_cv_gdk_pixbuf_config_cflags" >&6; }
18302     { $as_echo "$as_me:$LINENO: checking for gdk-pixbuf libs" >&5
18303 $as_echo_n "checking for gdk-pixbuf libs... " >&6; }
18304 if test "${ac_cv_gdk_pixbuf_config_libs+set}" = set; then
18305   $as_echo_n "(cached) " >&6
18306 else
18307   ac_cv_gdk_pixbuf_config_libs=`$pkg_config --libs $pkgs`
18308 fi
18309 { $as_echo "$as_me:$LINENO: result: $ac_cv_gdk_pixbuf_config_libs" >&5
18310 $as_echo "$ac_cv_gdk_pixbuf_config_libs" >&6; }
18311   fi
18312
18313   ac_gdk_pixbuf_config_cflags=$ac_cv_gdk_pixbuf_config_cflags
18314   ac_gdk_pixbuf_config_libs=$ac_cv_gdk_pixbuf_config_libs
18315
18316
18317   if test "$have_gdk_pixbuf" = yes; then
18318     #
18319     # we appear to have pixbuf; check for headers/libs to be sure.
18320     #
18321     ac_save_gdk_pixbuf_CPPFLAGS="$CPPFLAGS"
18322     CPPFLAGS="$CPPFLAGS $ac_gdk_pixbuf_config_cflags"
18323
18324     have_gdk_pixbuf=no
18325
18326     # check for header A...
18327
18328   ac_save_CPPFLAGS="$CPPFLAGS"
18329   if test \! -z "$includedir" ; then
18330     CPPFLAGS="$CPPFLAGS -I$includedir"
18331   fi
18332   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
18333   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
18334   if test "${ac_cv_header_gdk_pixbuf_gdk_pixbuf_h+set}" = set; then
18335   { $as_echo "$as_me:$LINENO: checking for gdk-pixbuf/gdk-pixbuf.h" >&5
18336 $as_echo_n "checking for gdk-pixbuf/gdk-pixbuf.h... " >&6; }
18337 if test "${ac_cv_header_gdk_pixbuf_gdk_pixbuf_h+set}" = set; then
18338   $as_echo_n "(cached) " >&6
18339 fi
18340 { $as_echo "$as_me:$LINENO: result: $ac_cv_header_gdk_pixbuf_gdk_pixbuf_h" >&5
18341 $as_echo "$ac_cv_header_gdk_pixbuf_gdk_pixbuf_h" >&6; }
18342 else
18343   # Is the header compilable?
18344 { $as_echo "$as_me:$LINENO: checking gdk-pixbuf/gdk-pixbuf.h usability" >&5
18345 $as_echo_n "checking gdk-pixbuf/gdk-pixbuf.h usability... " >&6; }
18346 cat >conftest.$ac_ext <<_ACEOF
18347 /* confdefs.h.  */
18348 _ACEOF
18349 cat confdefs.h >>conftest.$ac_ext
18350 cat >>conftest.$ac_ext <<_ACEOF
18351 /* end confdefs.h.  */
18352 $ac_includes_default
18353 #include <gdk-pixbuf/gdk-pixbuf.h>
18354 _ACEOF
18355 rm -rf conftest.$ac_objext
18356 if { (ac_try="$ac_compile"
18357 case "(($ac_try" in
18358   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18359   *) ac_try_echo=$ac_try;;
18360 esac
18361 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
18362 $as_echo "$ac_try_echo") >&5
18363   (eval "$ac_compile") 2>conftest.er1
18364   ac_status=$?
18365   grep -v '^ *+' conftest.er1 >conftest.err
18366   rm -rf conftest.er1
18367   cat conftest.err >&5
18368   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
18369   (exit $ac_status); } && {
18370          test -z "$ac_c_werror_flag" ||
18371          test ! -s conftest.err
18372        } && test -s conftest.$ac_objext; then
18373   ac_header_compiler=yes
18374 else
18375   $as_echo "$as_me: failed program was:" >&5
18376 sed 's/^/| /' conftest.$ac_ext >&5
18377
18378         ac_header_compiler=no
18379 fi
18380
18381 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
18382 { $as_echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
18383 $as_echo "$ac_header_compiler" >&6; }
18384
18385 # Is the header present?
18386 { $as_echo "$as_me:$LINENO: checking gdk-pixbuf/gdk-pixbuf.h presence" >&5
18387 $as_echo_n "checking gdk-pixbuf/gdk-pixbuf.h presence... " >&6; }
18388 cat >conftest.$ac_ext <<_ACEOF
18389 /* confdefs.h.  */
18390 _ACEOF
18391 cat confdefs.h >>conftest.$ac_ext
18392 cat >>conftest.$ac_ext <<_ACEOF
18393 /* end confdefs.h.  */
18394 #include <gdk-pixbuf/gdk-pixbuf.h>
18395 _ACEOF
18396 if { (ac_try="$ac_cpp conftest.$ac_ext"
18397 case "(($ac_try" in
18398   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18399   *) ac_try_echo=$ac_try;;
18400 esac
18401 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
18402 $as_echo "$ac_try_echo") >&5
18403   (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
18404   ac_status=$?
18405   grep -v '^ *+' conftest.er1 >conftest.err
18406   rm -rf conftest.er1
18407   cat conftest.err >&5
18408   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
18409   (exit $ac_status); } >/dev/null && {
18410          test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
18411          test ! -s conftest.err
18412        }; then
18413   ac_header_preproc=yes
18414 else
18415   $as_echo "$as_me: failed program was:" >&5
18416 sed 's/^/| /' conftest.$ac_ext >&5
18417
18418   ac_header_preproc=no
18419 fi
18420
18421 rm -rf conftest.err conftest.$ac_ext
18422 { $as_echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
18423 $as_echo "$ac_header_preproc" >&6; }
18424
18425 # So?  What about this header?
18426 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
18427   yes:no: )
18428     { $as_echo "$as_me:$LINENO: WARNING: gdk-pixbuf/gdk-pixbuf.h: accepted by the compiler, rejected by the preprocessor!" >&5
18429 $as_echo "$as_me: WARNING: gdk-pixbuf/gdk-pixbuf.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
18430     { $as_echo "$as_me:$LINENO: WARNING: gdk-pixbuf/gdk-pixbuf.h: proceeding with the compiler's result" >&5
18431 $as_echo "$as_me: WARNING: gdk-pixbuf/gdk-pixbuf.h: proceeding with the compiler's result" >&2;}
18432     ac_header_preproc=yes
18433     ;;
18434   no:yes:* )
18435     { $as_echo "$as_me:$LINENO: WARNING: gdk-pixbuf/gdk-pixbuf.h: present but cannot be compiled" >&5
18436 $as_echo "$as_me: WARNING: gdk-pixbuf/gdk-pixbuf.h: present but cannot be compiled" >&2;}
18437     { $as_echo "$as_me:$LINENO: WARNING: gdk-pixbuf/gdk-pixbuf.h:     check for missing prerequisite headers?" >&5
18438 $as_echo "$as_me: WARNING: gdk-pixbuf/gdk-pixbuf.h:     check for missing prerequisite headers?" >&2;}
18439     { $as_echo "$as_me:$LINENO: WARNING: gdk-pixbuf/gdk-pixbuf.h: see the Autoconf documentation" >&5
18440 $as_echo "$as_me: WARNING: gdk-pixbuf/gdk-pixbuf.h: see the Autoconf documentation" >&2;}
18441     { $as_echo "$as_me:$LINENO: WARNING: gdk-pixbuf/gdk-pixbuf.h:     section \"Present But Cannot Be Compiled\"" >&5
18442 $as_echo "$as_me: WARNING: gdk-pixbuf/gdk-pixbuf.h:     section \"Present But Cannot Be Compiled\"" >&2;}
18443     { $as_echo "$as_me:$LINENO: WARNING: gdk-pixbuf/gdk-pixbuf.h: proceeding with the preprocessor's result" >&5
18444 $as_echo "$as_me: WARNING: gdk-pixbuf/gdk-pixbuf.h: proceeding with the preprocessor's result" >&2;}
18445     { $as_echo "$as_me:$LINENO: WARNING: gdk-pixbuf/gdk-pixbuf.h: in the future, the compiler will take precedence" >&5
18446 $as_echo "$as_me: WARNING: gdk-pixbuf/gdk-pixbuf.h: in the future, the compiler will take precedence" >&2;}
18447
18448     ;;
18449 esac
18450 { $as_echo "$as_me:$LINENO: checking for gdk-pixbuf/gdk-pixbuf.h" >&5
18451 $as_echo_n "checking for gdk-pixbuf/gdk-pixbuf.h... " >&6; }
18452 if test "${ac_cv_header_gdk_pixbuf_gdk_pixbuf_h+set}" = set; then
18453   $as_echo_n "(cached) " >&6
18454 else
18455   ac_cv_header_gdk_pixbuf_gdk_pixbuf_h=$ac_header_preproc
18456 fi
18457 { $as_echo "$as_me:$LINENO: result: $ac_cv_header_gdk_pixbuf_gdk_pixbuf_h" >&5
18458 $as_echo "$ac_cv_header_gdk_pixbuf_gdk_pixbuf_h" >&6; }
18459
18460 fi
18461 if test "x$ac_cv_header_gdk_pixbuf_gdk_pixbuf_h" = x""yes; then
18462   have_gdk_pixbuf=yes
18463 fi
18464
18465
18466   CPPFLAGS="$ac_save_CPPFLAGS"
18467
18468     # if that worked, check for header B...
18469     if test "$have_gdk_pixbuf" = yes; then
18470       have_gdk_pixbuf=no
18471       gdk_pixbuf_halfassed=yes
18472
18473   ac_save_CPPFLAGS="$CPPFLAGS"
18474   if test \! -z "$includedir" ; then
18475     CPPFLAGS="$CPPFLAGS -I$includedir"
18476   fi
18477   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
18478   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
18479   if test "${ac_cv_header_gdk_pixbuf_gdk_pixbuf_xlib_h+set}" = set; then
18480   { $as_echo "$as_me:$LINENO: checking for gdk-pixbuf/gdk-pixbuf-xlib.h" >&5
18481 $as_echo_n "checking for gdk-pixbuf/gdk-pixbuf-xlib.h... " >&6; }
18482 if test "${ac_cv_header_gdk_pixbuf_gdk_pixbuf_xlib_h+set}" = set; then
18483   $as_echo_n "(cached) " >&6
18484 fi
18485 { $as_echo "$as_me:$LINENO: result: $ac_cv_header_gdk_pixbuf_gdk_pixbuf_xlib_h" >&5
18486 $as_echo "$ac_cv_header_gdk_pixbuf_gdk_pixbuf_xlib_h" >&6; }
18487 else
18488   # Is the header compilable?
18489 { $as_echo "$as_me:$LINENO: checking gdk-pixbuf/gdk-pixbuf-xlib.h usability" >&5
18490 $as_echo_n "checking gdk-pixbuf/gdk-pixbuf-xlib.h usability... " >&6; }
18491 cat >conftest.$ac_ext <<_ACEOF
18492 /* confdefs.h.  */
18493 _ACEOF
18494 cat confdefs.h >>conftest.$ac_ext
18495 cat >>conftest.$ac_ext <<_ACEOF
18496 /* end confdefs.h.  */
18497 $ac_includes_default
18498 #include <gdk-pixbuf/gdk-pixbuf-xlib.h>
18499 _ACEOF
18500 rm -rf conftest.$ac_objext
18501 if { (ac_try="$ac_compile"
18502 case "(($ac_try" in
18503   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18504   *) ac_try_echo=$ac_try;;
18505 esac
18506 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
18507 $as_echo "$ac_try_echo") >&5
18508   (eval "$ac_compile") 2>conftest.er1
18509   ac_status=$?
18510   grep -v '^ *+' conftest.er1 >conftest.err
18511   rm -rf conftest.er1
18512   cat conftest.err >&5
18513   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
18514   (exit $ac_status); } && {
18515          test -z "$ac_c_werror_flag" ||
18516          test ! -s conftest.err
18517        } && test -s conftest.$ac_objext; then
18518   ac_header_compiler=yes
18519 else
18520   $as_echo "$as_me: failed program was:" >&5
18521 sed 's/^/| /' conftest.$ac_ext >&5
18522
18523         ac_header_compiler=no
18524 fi
18525
18526 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
18527 { $as_echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
18528 $as_echo "$ac_header_compiler" >&6; }
18529
18530 # Is the header present?
18531 { $as_echo "$as_me:$LINENO: checking gdk-pixbuf/gdk-pixbuf-xlib.h presence" >&5
18532 $as_echo_n "checking gdk-pixbuf/gdk-pixbuf-xlib.h presence... " >&6; }
18533 cat >conftest.$ac_ext <<_ACEOF
18534 /* confdefs.h.  */
18535 _ACEOF
18536 cat confdefs.h >>conftest.$ac_ext
18537 cat >>conftest.$ac_ext <<_ACEOF
18538 /* end confdefs.h.  */
18539 #include <gdk-pixbuf/gdk-pixbuf-xlib.h>
18540 _ACEOF
18541 if { (ac_try="$ac_cpp conftest.$ac_ext"
18542 case "(($ac_try" in
18543   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18544   *) ac_try_echo=$ac_try;;
18545 esac
18546 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
18547 $as_echo "$ac_try_echo") >&5
18548   (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
18549   ac_status=$?
18550   grep -v '^ *+' conftest.er1 >conftest.err
18551   rm -rf conftest.er1
18552   cat conftest.err >&5
18553   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
18554   (exit $ac_status); } >/dev/null && {
18555          test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
18556          test ! -s conftest.err
18557        }; then
18558   ac_header_preproc=yes
18559 else
18560   $as_echo "$as_me: failed program was:" >&5
18561 sed 's/^/| /' conftest.$ac_ext >&5
18562
18563   ac_header_preproc=no
18564 fi
18565
18566 rm -rf conftest.err conftest.$ac_ext
18567 { $as_echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
18568 $as_echo "$ac_header_preproc" >&6; }
18569
18570 # So?  What about this header?
18571 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
18572   yes:no: )
18573     { $as_echo "$as_me:$LINENO: WARNING: gdk-pixbuf/gdk-pixbuf-xlib.h: accepted by the compiler, rejected by the preprocessor!" >&5
18574 $as_echo "$as_me: WARNING: gdk-pixbuf/gdk-pixbuf-xlib.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
18575     { $as_echo "$as_me:$LINENO: WARNING: gdk-pixbuf/gdk-pixbuf-xlib.h: proceeding with the compiler's result" >&5
18576 $as_echo "$as_me: WARNING: gdk-pixbuf/gdk-pixbuf-xlib.h: proceeding with the compiler's result" >&2;}
18577     ac_header_preproc=yes
18578     ;;
18579   no:yes:* )
18580     { $as_echo "$as_me:$LINENO: WARNING: gdk-pixbuf/gdk-pixbuf-xlib.h: present but cannot be compiled" >&5
18581 $as_echo "$as_me: WARNING: gdk-pixbuf/gdk-pixbuf-xlib.h: present but cannot be compiled" >&2;}
18582     { $as_echo "$as_me:$LINENO: WARNING: gdk-pixbuf/gdk-pixbuf-xlib.h:     check for missing prerequisite headers?" >&5
18583 $as_echo "$as_me: WARNING: gdk-pixbuf/gdk-pixbuf-xlib.h:     check for missing prerequisite headers?" >&2;}
18584     { $as_echo "$as_me:$LINENO: WARNING: gdk-pixbuf/gdk-pixbuf-xlib.h: see the Autoconf documentation" >&5
18585 $as_echo "$as_me: WARNING: gdk-pixbuf/gdk-pixbuf-xlib.h: see the Autoconf documentation" >&2;}
18586     { $as_echo "$as_me:$LINENO: WARNING: gdk-pixbuf/gdk-pixbuf-xlib.h:     section \"Present But Cannot Be Compiled\"" >&5
18587 $as_echo "$as_me: WARNING: gdk-pixbuf/gdk-pixbuf-xlib.h:     section \"Present But Cannot Be Compiled\"" >&2;}
18588     { $as_echo "$as_me:$LINENO: WARNING: gdk-pixbuf/gdk-pixbuf-xlib.h: proceeding with the preprocessor's result" >&5
18589 $as_echo "$as_me: WARNING: gdk-pixbuf/gdk-pixbuf-xlib.h: proceeding with the preprocessor's result" >&2;}
18590     { $as_echo "$as_me:$LINENO: WARNING: gdk-pixbuf/gdk-pixbuf-xlib.h: in the future, the compiler will take precedence" >&5
18591 $as_echo "$as_me: WARNING: gdk-pixbuf/gdk-pixbuf-xlib.h: in the future, the compiler will take precedence" >&2;}
18592
18593     ;;
18594 esac
18595 { $as_echo "$as_me:$LINENO: checking for gdk-pixbuf/gdk-pixbuf-xlib.h" >&5
18596 $as_echo_n "checking for gdk-pixbuf/gdk-pixbuf-xlib.h... " >&6; }
18597 if test "${ac_cv_header_gdk_pixbuf_gdk_pixbuf_xlib_h+set}" = set; then
18598   $as_echo_n "(cached) " >&6
18599 else
18600   ac_cv_header_gdk_pixbuf_gdk_pixbuf_xlib_h=$ac_header_preproc
18601 fi
18602 { $as_echo "$as_me:$LINENO: result: $ac_cv_header_gdk_pixbuf_gdk_pixbuf_xlib_h" >&5
18603 $as_echo "$ac_cv_header_gdk_pixbuf_gdk_pixbuf_xlib_h" >&6; }
18604
18605 fi
18606 if test "x$ac_cv_header_gdk_pixbuf_gdk_pixbuf_xlib_h" = x""yes; then
18607   have_gdk_pixbuf=yes
18608                          gdk_pixbuf_halfassed=no
18609 fi
18610
18611
18612   CPPFLAGS="$ac_save_CPPFLAGS"
18613
18614       # yay, it has a new name in Gtk 2.x...
18615       if test "$have_gdk_pixbuf" = no; then
18616         have_gdk_pixbuf=no
18617         gdk_pixbuf_halfassed=yes
18618
18619   ac_save_CPPFLAGS="$CPPFLAGS"
18620   if test \! -z "$includedir" ; then
18621     CPPFLAGS="$CPPFLAGS -I$includedir"
18622   fi
18623   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
18624   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
18625   if test "${ac_cv_header_gdk_pixbuf_xlib_gdk_pixbuf_xlib_h+set}" = set; then
18626   { $as_echo "$as_me:$LINENO: checking for gdk-pixbuf-xlib/gdk-pixbuf-xlib.h" >&5
18627 $as_echo_n "checking for gdk-pixbuf-xlib/gdk-pixbuf-xlib.h... " >&6; }
18628 if test "${ac_cv_header_gdk_pixbuf_xlib_gdk_pixbuf_xlib_h+set}" = set; then
18629   $as_echo_n "(cached) " >&6
18630 fi
18631 { $as_echo "$as_me:$LINENO: result: $ac_cv_header_gdk_pixbuf_xlib_gdk_pixbuf_xlib_h" >&5
18632 $as_echo "$ac_cv_header_gdk_pixbuf_xlib_gdk_pixbuf_xlib_h" >&6; }
18633 else
18634   # Is the header compilable?
18635 { $as_echo "$as_me:$LINENO: checking gdk-pixbuf-xlib/gdk-pixbuf-xlib.h usability" >&5
18636 $as_echo_n "checking gdk-pixbuf-xlib/gdk-pixbuf-xlib.h usability... " >&6; }
18637 cat >conftest.$ac_ext <<_ACEOF
18638 /* confdefs.h.  */
18639 _ACEOF
18640 cat confdefs.h >>conftest.$ac_ext
18641 cat >>conftest.$ac_ext <<_ACEOF
18642 /* end confdefs.h.  */
18643 $ac_includes_default
18644 #include <gdk-pixbuf-xlib/gdk-pixbuf-xlib.h>
18645 _ACEOF
18646 rm -rf conftest.$ac_objext
18647 if { (ac_try="$ac_compile"
18648 case "(($ac_try" in
18649   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18650   *) ac_try_echo=$ac_try;;
18651 esac
18652 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
18653 $as_echo "$ac_try_echo") >&5
18654   (eval "$ac_compile") 2>conftest.er1
18655   ac_status=$?
18656   grep -v '^ *+' conftest.er1 >conftest.err
18657   rm -rf conftest.er1
18658   cat conftest.err >&5
18659   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
18660   (exit $ac_status); } && {
18661          test -z "$ac_c_werror_flag" ||
18662          test ! -s conftest.err
18663        } && test -s conftest.$ac_objext; then
18664   ac_header_compiler=yes
18665 else
18666   $as_echo "$as_me: failed program was:" >&5
18667 sed 's/^/| /' conftest.$ac_ext >&5
18668
18669         ac_header_compiler=no
18670 fi
18671
18672 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
18673 { $as_echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
18674 $as_echo "$ac_header_compiler" >&6; }
18675
18676 # Is the header present?
18677 { $as_echo "$as_me:$LINENO: checking gdk-pixbuf-xlib/gdk-pixbuf-xlib.h presence" >&5
18678 $as_echo_n "checking gdk-pixbuf-xlib/gdk-pixbuf-xlib.h presence... " >&6; }
18679 cat >conftest.$ac_ext <<_ACEOF
18680 /* confdefs.h.  */
18681 _ACEOF
18682 cat confdefs.h >>conftest.$ac_ext
18683 cat >>conftest.$ac_ext <<_ACEOF
18684 /* end confdefs.h.  */
18685 #include <gdk-pixbuf-xlib/gdk-pixbuf-xlib.h>
18686 _ACEOF
18687 if { (ac_try="$ac_cpp conftest.$ac_ext"
18688 case "(($ac_try" in
18689   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18690   *) ac_try_echo=$ac_try;;
18691 esac
18692 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
18693 $as_echo "$ac_try_echo") >&5
18694   (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
18695   ac_status=$?
18696   grep -v '^ *+' conftest.er1 >conftest.err
18697   rm -rf conftest.er1
18698   cat conftest.err >&5
18699   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
18700   (exit $ac_status); } >/dev/null && {
18701          test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
18702          test ! -s conftest.err
18703        }; then
18704   ac_header_preproc=yes
18705 else
18706   $as_echo "$as_me: failed program was:" >&5
18707 sed 's/^/| /' conftest.$ac_ext >&5
18708
18709   ac_header_preproc=no
18710 fi
18711
18712 rm -rf conftest.err conftest.$ac_ext
18713 { $as_echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
18714 $as_echo "$ac_header_preproc" >&6; }
18715
18716 # So?  What about this header?
18717 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
18718   yes:no: )
18719     { $as_echo "$as_me:$LINENO: WARNING: gdk-pixbuf-xlib/gdk-pixbuf-xlib.h: accepted by the compiler, rejected by the preprocessor!" >&5
18720 $as_echo "$as_me: WARNING: gdk-pixbuf-xlib/gdk-pixbuf-xlib.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
18721     { $as_echo "$as_me:$LINENO: WARNING: gdk-pixbuf-xlib/gdk-pixbuf-xlib.h: proceeding with the compiler's result" >&5
18722 $as_echo "$as_me: WARNING: gdk-pixbuf-xlib/gdk-pixbuf-xlib.h: proceeding with the compiler's result" >&2;}
18723     ac_header_preproc=yes
18724     ;;
18725   no:yes:* )
18726     { $as_echo "$as_me:$LINENO: WARNING: gdk-pixbuf-xlib/gdk-pixbuf-xlib.h: present but cannot be compiled" >&5
18727 $as_echo "$as_me: WARNING: gdk-pixbuf-xlib/gdk-pixbuf-xlib.h: present but cannot be compiled" >&2;}
18728     { $as_echo "$as_me:$LINENO: WARNING: gdk-pixbuf-xlib/gdk-pixbuf-xlib.h:     check for missing prerequisite headers?" >&5
18729 $as_echo "$as_me: WARNING: gdk-pixbuf-xlib/gdk-pixbuf-xlib.h:     check for missing prerequisite headers?" >&2;}
18730     { $as_echo "$as_me:$LINENO: WARNING: gdk-pixbuf-xlib/gdk-pixbuf-xlib.h: see the Autoconf documentation" >&5
18731 $as_echo "$as_me: WARNING: gdk-pixbuf-xlib/gdk-pixbuf-xlib.h: see the Autoconf documentation" >&2;}
18732     { $as_echo "$as_me:$LINENO: WARNING: gdk-pixbuf-xlib/gdk-pixbuf-xlib.h:     section \"Present But Cannot Be Compiled\"" >&5
18733 $as_echo "$as_me: WARNING: gdk-pixbuf-xlib/gdk-pixbuf-xlib.h:     section \"Present But Cannot Be Compiled\"" >&2;}
18734     { $as_echo "$as_me:$LINENO: WARNING: gdk-pixbuf-xlib/gdk-pixbuf-xlib.h: proceeding with the preprocessor's result" >&5
18735 $as_echo "$as_me: WARNING: gdk-pixbuf-xlib/gdk-pixbuf-xlib.h: proceeding with the preprocessor's result" >&2;}
18736     { $as_echo "$as_me:$LINENO: WARNING: gdk-pixbuf-xlib/gdk-pixbuf-xlib.h: in the future, the compiler will take precedence" >&5
18737 $as_echo "$as_me: WARNING: gdk-pixbuf-xlib/gdk-pixbuf-xlib.h: in the future, the compiler will take precedence" >&2;}
18738
18739     ;;
18740 esac
18741 { $as_echo "$as_me:$LINENO: checking for gdk-pixbuf-xlib/gdk-pixbuf-xlib.h" >&5
18742 $as_echo_n "checking for gdk-pixbuf-xlib/gdk-pixbuf-xlib.h... " >&6; }
18743 if test "${ac_cv_header_gdk_pixbuf_xlib_gdk_pixbuf_xlib_h+set}" = set; then
18744   $as_echo_n "(cached) " >&6
18745 else
18746   ac_cv_header_gdk_pixbuf_xlib_gdk_pixbuf_xlib_h=$ac_header_preproc
18747 fi
18748 { $as_echo "$as_me:$LINENO: result: $ac_cv_header_gdk_pixbuf_xlib_gdk_pixbuf_xlib_h" >&5
18749 $as_echo "$ac_cv_header_gdk_pixbuf_xlib_gdk_pixbuf_xlib_h" >&6; }
18750
18751 fi
18752 if test "x$ac_cv_header_gdk_pixbuf_xlib_gdk_pixbuf_xlib_h" = x""yes; then
18753   have_gdk_pixbuf=yes
18754                            gdk_pixbuf_halfassed=no
18755 fi
18756
18757
18758   CPPFLAGS="$ac_save_CPPFLAGS"
18759       fi
18760     fi
18761     CPPFLAGS="$ac_save_gdk_pixbuf_CPPFLAGS"
18762   fi
18763
18764   if test "$have_gdk_pixbuf" = yes; then
18765     # we have the headers, now check for the libraries
18766     have_gdk_pixbuf=no
18767     gdk_pixbuf_halfassed=yes
18768
18769     { $as_echo "$as_me:$LINENO: result: checking for gdk_pixbuf usability..." >&5
18770 $as_echo "checking for gdk_pixbuf usability..." >&6; }
18771
18772     # library A...
18773
18774   ac_save_CPPFLAGS="$CPPFLAGS"
18775   ac_save_LDFLAGS="$LDFLAGS"
18776 #  ac_save_LIBS="$LIBS"
18777
18778   if test \! -z "$includedir" ; then
18779     CPPFLAGS="$CPPFLAGS -I$includedir"
18780   fi
18781   # note: $X_CFLAGS includes $x_includes
18782   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
18783
18784   if test \! -z "$libdir" ; then
18785     LDFLAGS="$LDFLAGS -L$libdir"
18786   fi
18787   # note: $X_LIBS includes $x_libraries
18788   LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
18789
18790   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
18791   LDFLAGS=`eval eval eval eval eval eval eval eval eval echo $LDFLAGS`
18792   { $as_echo "$as_me:$LINENO: checking for gdk_pixbuf_new_from_file in -lc" >&5
18793 $as_echo_n "checking for gdk_pixbuf_new_from_file in -lc... " >&6; }
18794 if test "${ac_cv_lib_c_gdk_pixbuf_new_from_file+set}" = set; then
18795   $as_echo_n "(cached) " >&6
18796 else
18797   ac_check_lib_save_LIBS=$LIBS
18798 LIBS="-lc $ac_gdk_pixbuf_config_libs -lX11 -lXext -lm $LIBS"
18799 cat >conftest.$ac_ext <<_ACEOF
18800 /* confdefs.h.  */
18801 _ACEOF
18802 cat confdefs.h >>conftest.$ac_ext
18803 cat >>conftest.$ac_ext <<_ACEOF
18804 /* end confdefs.h.  */
18805
18806 /* Override any GCC internal prototype to avoid an error.
18807    Use char because int might match the return type of a GCC
18808    builtin and then its argument prototype would still apply.  */
18809 #ifdef __cplusplus
18810 extern "C"
18811 #endif
18812 char gdk_pixbuf_new_from_file ();
18813 int
18814 main ()
18815 {
18816 return gdk_pixbuf_new_from_file ();
18817   ;
18818   return 0;
18819 }
18820 _ACEOF
18821 rm -rf conftest.$ac_objext conftest$ac_exeext
18822 if { (ac_try="$ac_link"
18823 case "(($ac_try" in
18824   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18825   *) ac_try_echo=$ac_try;;
18826 esac
18827 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
18828 $as_echo "$ac_try_echo") >&5
18829   (eval "$ac_link") 2>conftest.er1
18830   ac_status=$?
18831   grep -v '^ *+' conftest.er1 >conftest.err
18832   rm -rf conftest.er1
18833   cat conftest.err >&5
18834   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
18835   (exit $ac_status); } && {
18836          test -z "$ac_c_werror_flag" ||
18837          test ! -s conftest.err
18838        } && test -s conftest$ac_exeext && {
18839          test "$cross_compiling" = yes ||
18840          $as_test_x conftest$ac_exeext
18841        }; then
18842   ac_cv_lib_c_gdk_pixbuf_new_from_file=yes
18843 else
18844   $as_echo "$as_me: failed program was:" >&5
18845 sed 's/^/| /' conftest.$ac_ext >&5
18846
18847         ac_cv_lib_c_gdk_pixbuf_new_from_file=no
18848 fi
18849
18850 rm -rf conftest.dSYM
18851 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
18852       conftest$ac_exeext conftest.$ac_ext
18853 LIBS=$ac_check_lib_save_LIBS
18854 fi
18855 { $as_echo "$as_me:$LINENO: result: $ac_cv_lib_c_gdk_pixbuf_new_from_file" >&5
18856 $as_echo "$ac_cv_lib_c_gdk_pixbuf_new_from_file" >&6; }
18857 if test "x$ac_cv_lib_c_gdk_pixbuf_new_from_file" = x""yes; then
18858   have_gdk_pixbuf=yes
18859 fi
18860
18861   CPPFLAGS="$ac_save_CPPFLAGS"
18862   LDFLAGS="$ac_save_LDFLAGS"
18863 #  LIBS="$ac_save_LIBS"
18864
18865     # library B...
18866     if test "$have_gdk_pixbuf" = yes; then
18867       have_gdk_pixbuf=no
18868
18869   ac_save_CPPFLAGS="$CPPFLAGS"
18870   ac_save_LDFLAGS="$LDFLAGS"
18871 #  ac_save_LIBS="$LIBS"
18872
18873   if test \! -z "$includedir" ; then
18874     CPPFLAGS="$CPPFLAGS -I$includedir"
18875   fi
18876   # note: $X_CFLAGS includes $x_includes
18877   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
18878
18879   if test \! -z "$libdir" ; then
18880     LDFLAGS="$LDFLAGS -L$libdir"
18881   fi
18882   # note: $X_LIBS includes $x_libraries
18883   LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
18884
18885   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
18886   LDFLAGS=`eval eval eval eval eval eval eval eval eval echo $LDFLAGS`
18887   { $as_echo "$as_me:$LINENO: checking for gdk_pixbuf_xlib_init in -lc" >&5
18888 $as_echo_n "checking for gdk_pixbuf_xlib_init in -lc... " >&6; }
18889 if test "${ac_cv_lib_c_gdk_pixbuf_xlib_init+set}" = set; then
18890   $as_echo_n "(cached) " >&6
18891 else
18892   ac_check_lib_save_LIBS=$LIBS
18893 LIBS="-lc $ac_gdk_pixbuf_config_libs -lX11 -lXext -lm $LIBS"
18894 cat >conftest.$ac_ext <<_ACEOF
18895 /* confdefs.h.  */
18896 _ACEOF
18897 cat confdefs.h >>conftest.$ac_ext
18898 cat >>conftest.$ac_ext <<_ACEOF
18899 /* end confdefs.h.  */
18900
18901 /* Override any GCC internal prototype to avoid an error.
18902    Use char because int might match the return type of a GCC
18903    builtin and then its argument prototype would still apply.  */
18904 #ifdef __cplusplus
18905 extern "C"
18906 #endif
18907 char gdk_pixbuf_xlib_init ();
18908 int
18909 main ()
18910 {
18911 return gdk_pixbuf_xlib_init ();
18912   ;
18913   return 0;
18914 }
18915 _ACEOF
18916 rm -rf conftest.$ac_objext conftest$ac_exeext
18917 if { (ac_try="$ac_link"
18918 case "(($ac_try" in
18919   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18920   *) ac_try_echo=$ac_try;;
18921 esac
18922 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
18923 $as_echo "$ac_try_echo") >&5
18924   (eval "$ac_link") 2>conftest.er1
18925   ac_status=$?
18926   grep -v '^ *+' conftest.er1 >conftest.err
18927   rm -rf conftest.er1
18928   cat conftest.err >&5
18929   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
18930   (exit $ac_status); } && {
18931          test -z "$ac_c_werror_flag" ||
18932          test ! -s conftest.err
18933        } && test -s conftest$ac_exeext && {
18934          test "$cross_compiling" = yes ||
18935          $as_test_x conftest$ac_exeext
18936        }; then
18937   ac_cv_lib_c_gdk_pixbuf_xlib_init=yes
18938 else
18939   $as_echo "$as_me: failed program was:" >&5
18940 sed 's/^/| /' conftest.$ac_ext >&5
18941
18942         ac_cv_lib_c_gdk_pixbuf_xlib_init=no
18943 fi
18944
18945 rm -rf conftest.dSYM
18946 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
18947       conftest$ac_exeext conftest.$ac_ext
18948 LIBS=$ac_check_lib_save_LIBS
18949 fi
18950 { $as_echo "$as_me:$LINENO: result: $ac_cv_lib_c_gdk_pixbuf_xlib_init" >&5
18951 $as_echo "$ac_cv_lib_c_gdk_pixbuf_xlib_init" >&6; }
18952 if test "x$ac_cv_lib_c_gdk_pixbuf_xlib_init" = x""yes; then
18953   have_gdk_pixbuf=yes
18954                       gdk_pixbuf_halfassed=no
18955 fi
18956
18957   CPPFLAGS="$ac_save_CPPFLAGS"
18958   LDFLAGS="$ac_save_LDFLAGS"
18959 #  LIBS="$ac_save_LIBS"
18960
18961     fi
18962   fi
18963
18964   if test "$have_gdk_pixbuf" = yes; then
18965     INCLUDES="$INCLUDES $ac_gdk_pixbuf_config_cflags"
18966     XPM_LIBS="$ac_gdk_pixbuf_config_libs"
18967     cat >>confdefs.h <<\_ACEOF
18968 #define HAVE_GDK_PIXBUF 1
18969 _ACEOF
18970
18971   else
18972     { $as_echo "$as_me:$LINENO: result: checking for gdk_pixbuf usability... no" >&5
18973 $as_echo "checking for gdk_pixbuf usability... no" >&6; }
18974   fi
18975
18976   if test "$have_gdk_pixbuf" = yes; then
18977
18978   ac_save_CPPFLAGS="$CPPFLAGS"
18979   ac_save_LDFLAGS="$LDFLAGS"
18980 #  ac_save_LIBS="$LIBS"
18981
18982   if test \! -z "$includedir" ; then
18983     CPPFLAGS="$CPPFLAGS -I$includedir"
18984   fi
18985   # note: $X_CFLAGS includes $x_includes
18986   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
18987
18988   if test \! -z "$libdir" ; then
18989     LDFLAGS="$LDFLAGS -L$libdir"
18990   fi
18991   # note: $X_LIBS includes $x_libraries
18992   LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
18993
18994   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
18995   LDFLAGS=`eval eval eval eval eval eval eval eval eval echo $LDFLAGS`
18996   { $as_echo "$as_me:$LINENO: checking for gdk_pixbuf_apply_embedded_orientation in -lc" >&5
18997 $as_echo_n "checking for gdk_pixbuf_apply_embedded_orientation in -lc... " >&6; }
18998 if test "${ac_cv_lib_c_gdk_pixbuf_apply_embedded_orientation+set}" = set; then
18999   $as_echo_n "(cached) " >&6
19000 else
19001   ac_check_lib_save_LIBS=$LIBS
19002 LIBS="-lc $ac_gdk_pixbuf_config_libs -lX11 -lXext -lm $LIBS"
19003 cat >conftest.$ac_ext <<_ACEOF
19004 /* confdefs.h.  */
19005 _ACEOF
19006 cat confdefs.h >>conftest.$ac_ext
19007 cat >>conftest.$ac_ext <<_ACEOF
19008 /* end confdefs.h.  */
19009
19010 /* Override any GCC internal prototype to avoid an error.
19011    Use char because int might match the return type of a GCC
19012    builtin and then its argument prototype would still apply.  */
19013 #ifdef __cplusplus
19014 extern "C"
19015 #endif
19016 char gdk_pixbuf_apply_embedded_orientation ();
19017 int
19018 main ()
19019 {
19020 return gdk_pixbuf_apply_embedded_orientation ();
19021   ;
19022   return 0;
19023 }
19024 _ACEOF
19025 rm -rf conftest.$ac_objext conftest$ac_exeext
19026 if { (ac_try="$ac_link"
19027 case "(($ac_try" in
19028   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19029   *) ac_try_echo=$ac_try;;
19030 esac
19031 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
19032 $as_echo "$ac_try_echo") >&5
19033   (eval "$ac_link") 2>conftest.er1
19034   ac_status=$?
19035   grep -v '^ *+' conftest.er1 >conftest.err
19036   rm -rf conftest.er1
19037   cat conftest.err >&5
19038   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
19039   (exit $ac_status); } && {
19040          test -z "$ac_c_werror_flag" ||
19041          test ! -s conftest.err
19042        } && test -s conftest$ac_exeext && {
19043          test "$cross_compiling" = yes ||
19044          $as_test_x conftest$ac_exeext
19045        }; then
19046   ac_cv_lib_c_gdk_pixbuf_apply_embedded_orientation=yes
19047 else
19048   $as_echo "$as_me: failed program was:" >&5
19049 sed 's/^/| /' conftest.$ac_ext >&5
19050
19051         ac_cv_lib_c_gdk_pixbuf_apply_embedded_orientation=no
19052 fi
19053
19054 rm -rf conftest.dSYM
19055 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
19056       conftest$ac_exeext conftest.$ac_ext
19057 LIBS=$ac_check_lib_save_LIBS
19058 fi
19059 { $as_echo "$as_me:$LINENO: result: $ac_cv_lib_c_gdk_pixbuf_apply_embedded_orientation" >&5
19060 $as_echo "$ac_cv_lib_c_gdk_pixbuf_apply_embedded_orientation" >&6; }
19061 if test "x$ac_cv_lib_c_gdk_pixbuf_apply_embedded_orientation" = x""yes; then
19062   cat >>confdefs.h <<\_ACEOF
19063 #define HAVE_GDK_PIXBUF_APPLY_EMBEDDED_ORIENTATION 1
19064 _ACEOF
19065
19066 fi
19067
19068   CPPFLAGS="$ac_save_CPPFLAGS"
19069   LDFLAGS="$ac_save_LDFLAGS"
19070 #  LIBS="$ac_save_LIBS"
19071
19072   fi
19073 fi
19074
19075
19076 ###############################################################################
19077 #
19078 #       Check for -lXpm.
19079 #
19080 ###############################################################################
19081
19082 have_xpm=no
19083 with_xpm_req=unspecified
19084
19085 # Check whether --with-xpm was given.
19086 if test "${with_xpm+set}" = set; then
19087   withval=$with_xpm; with_xpm="$withval"; with_xpm_req="$withval"
19088 else
19089   with_xpm=yes
19090 fi
19091
19092
19093
19094    case "$with_xpm" in
19095     yes) ;;
19096     no)  ;;
19097
19098     /*)
19099      { $as_echo "$as_me:$LINENO: checking for XPM headers" >&5
19100 $as_echo_n "checking for XPM headers... " >&6; }
19101      d=$with_xpm/include
19102      if test -d $d; then
19103        X_CFLAGS="-I$d $X_CFLAGS"
19104        { $as_echo "$as_me:$LINENO: result: $d" >&5
19105 $as_echo "$d" >&6; }
19106      else
19107        { $as_echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
19108 $as_echo "not found ($d: no such directory)" >&6; }
19109      fi
19110
19111      { $as_echo "$as_me:$LINENO: checking for XPM libs" >&5
19112 $as_echo_n "checking for XPM libs... " >&6; }
19113      d=$with_xpm/lib
19114      if test -d $d; then
19115        X_LIBS="-L$d $X_LIBS"
19116        { $as_echo "$as_me:$LINENO: result: $d" >&5
19117 $as_echo "$d" >&6; }
19118      else
19119        { $as_echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
19120 $as_echo "not found ($d: no such directory)" >&6; }
19121      fi
19122
19123      # replace the directory string with "yes".
19124      with_xpm_req="yes"
19125      with_xpm=$with_xpm_req
19126      ;;
19127
19128     *)
19129      echo ""
19130      echo "error: argument to --with-xpm must be \"yes\", \"no\", or a directory."
19131      echo "       If it is a directory, then \`DIR/include' will be added to"
19132      echo "       the -I list, and \`DIR/lib' will be added to the -L list."
19133      exit 1
19134      ;;
19135    esac
19136
19137
19138 if test "$with_xpm" = yes; then
19139
19140   ac_save_CPPFLAGS="$CPPFLAGS"
19141   if test \! -z "$includedir" ; then
19142     CPPFLAGS="$CPPFLAGS -I$includedir"
19143   fi
19144   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
19145   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
19146   { $as_echo "$as_me:$LINENO: checking for X11/xpm.h" >&5
19147 $as_echo_n "checking for X11/xpm.h... " >&6; }
19148 if test "${ac_cv_header_X11_xpm_h+set}" = set; then
19149   $as_echo_n "(cached) " >&6
19150 else
19151   cat >conftest.$ac_ext <<_ACEOF
19152 /* confdefs.h.  */
19153 _ACEOF
19154 cat confdefs.h >>conftest.$ac_ext
19155 cat >>conftest.$ac_ext <<_ACEOF
19156 /* end confdefs.h.  */
19157 #include <X11/Xlib.h>
19158
19159 #include <X11/xpm.h>
19160 _ACEOF
19161 rm -rf conftest.$ac_objext
19162 if { (ac_try="$ac_compile"
19163 case "(($ac_try" in
19164   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19165   *) ac_try_echo=$ac_try;;
19166 esac
19167 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
19168 $as_echo "$ac_try_echo") >&5
19169   (eval "$ac_compile") 2>conftest.er1
19170   ac_status=$?
19171   grep -v '^ *+' conftest.er1 >conftest.err
19172   rm -rf conftest.er1
19173   cat conftest.err >&5
19174   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
19175   (exit $ac_status); } && {
19176          test -z "$ac_c_werror_flag" ||
19177          test ! -s conftest.err
19178        } && test -s conftest.$ac_objext; then
19179   ac_cv_header_X11_xpm_h=yes
19180 else
19181   $as_echo "$as_me: failed program was:" >&5
19182 sed 's/^/| /' conftest.$ac_ext >&5
19183
19184         ac_cv_header_X11_xpm_h=no
19185 fi
19186
19187 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
19188 fi
19189 { $as_echo "$as_me:$LINENO: result: $ac_cv_header_X11_xpm_h" >&5
19190 $as_echo "$ac_cv_header_X11_xpm_h" >&6; }
19191 if test "x$ac_cv_header_X11_xpm_h" = x""yes; then
19192   have_xpm=yes
19193                     cat >>confdefs.h <<\_ACEOF
19194 #define HAVE_XPM 1
19195 _ACEOF
19196
19197                     XPM_LIBS="-lXpm $XPM_LIBS"
19198 fi
19199
19200
19201   CPPFLAGS="$ac_save_CPPFLAGS"
19202 elif test "$with_xpm" != no; then
19203   echo "error: must be yes or no: --with-xpm=$with_xpm"
19204   exit 1
19205 fi
19206
19207 # See comment near $motif_requires_xpm, above.
19208 # Need to do this here, after both Motif and XPM have been checked for.
19209 #
19210 if test "$have_motif" = yes -a "$have_xpm" = yes ; then
19211   if test "$motif_requires_xpm" = yes ; then
19212     MOTIF_LIBS="$MOTIF_LIBS $XPM_LIBS"
19213   fi
19214 fi
19215
19216 if test "$XPM_LIBS" = "" ; then
19217   XPM_LIBS=$(MINIXPM)
19218 fi
19219
19220
19221 ###############################################################################
19222 #
19223 #       Check for -ljpeg
19224 #
19225 ###############################################################################
19226
19227 have_jpeg=no
19228 with_jpeg_req=unspecified
19229 jpeg_halfassed=no
19230
19231 # Check whether --with-jpeg was given.
19232 if test "${with_jpeg+set}" = set; then
19233   withval=$with_jpeg; with_jpeg="$withval"; with_jpeg_req="$withval"
19234 else
19235   with_jpeg=yes
19236 fi
19237
19238
19239
19240    case "$with_jpeg" in
19241     yes) ;;
19242     no)  ;;
19243
19244     /*)
19245      { $as_echo "$as_me:$LINENO: checking for JPEG headers" >&5
19246 $as_echo_n "checking for JPEG headers... " >&6; }
19247      d=$with_jpeg/include
19248      if test -d $d; then
19249        X_CFLAGS="-I$d $X_CFLAGS"
19250        { $as_echo "$as_me:$LINENO: result: $d" >&5
19251 $as_echo "$d" >&6; }
19252      else
19253        { $as_echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
19254 $as_echo "not found ($d: no such directory)" >&6; }
19255      fi
19256
19257      { $as_echo "$as_me:$LINENO: checking for JPEG libs" >&5
19258 $as_echo_n "checking for JPEG libs... " >&6; }
19259      d=$with_jpeg/lib
19260      if test -d $d; then
19261        X_LIBS="-L$d $X_LIBS"
19262        { $as_echo "$as_me:$LINENO: result: $d" >&5
19263 $as_echo "$d" >&6; }
19264      else
19265        { $as_echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
19266 $as_echo "not found ($d: no such directory)" >&6; }
19267      fi
19268
19269      # replace the directory string with "yes".
19270      with_jpeg_req="yes"
19271      with_jpeg=$with_jpeg_req
19272      ;;
19273
19274     *)
19275      echo ""
19276      echo "error: argument to --with-jpeg must be \"yes\", \"no\", or a directory."
19277      echo "       If it is a directory, then \`DIR/include' will be added to"
19278      echo "       the -I list, and \`DIR/lib' will be added to the -L list."
19279      exit 1
19280      ;;
19281    esac
19282
19283
19284 if test "$with_jpeg" != yes -a "$with_jpeg" != no ; then
19285   echo "error: must be yes or no: --with-jpeg=$with_jpeg"
19286   exit 1
19287 fi
19288
19289 if test "$with_jpeg" = yes; then
19290
19291   have_jpeg=no
19292
19293   ac_save_CPPFLAGS="$CPPFLAGS"
19294   if test \! -z "$includedir" ; then
19295     CPPFLAGS="$CPPFLAGS -I$includedir"
19296   fi
19297   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
19298   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
19299   if test "${ac_cv_header_jpeglib_h+set}" = set; then
19300   { $as_echo "$as_me:$LINENO: checking for jpeglib.h" >&5
19301 $as_echo_n "checking for jpeglib.h... " >&6; }
19302 if test "${ac_cv_header_jpeglib_h+set}" = set; then
19303   $as_echo_n "(cached) " >&6
19304 fi
19305 { $as_echo "$as_me:$LINENO: result: $ac_cv_header_jpeglib_h" >&5
19306 $as_echo "$ac_cv_header_jpeglib_h" >&6; }
19307 else
19308   # Is the header compilable?
19309 { $as_echo "$as_me:$LINENO: checking jpeglib.h usability" >&5
19310 $as_echo_n "checking jpeglib.h usability... " >&6; }
19311 cat >conftest.$ac_ext <<_ACEOF
19312 /* confdefs.h.  */
19313 _ACEOF
19314 cat confdefs.h >>conftest.$ac_ext
19315 cat >>conftest.$ac_ext <<_ACEOF
19316 /* end confdefs.h.  */
19317 $ac_includes_default
19318 #include <jpeglib.h>
19319 _ACEOF
19320 rm -rf conftest.$ac_objext
19321 if { (ac_try="$ac_compile"
19322 case "(($ac_try" in
19323   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19324   *) ac_try_echo=$ac_try;;
19325 esac
19326 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
19327 $as_echo "$ac_try_echo") >&5
19328   (eval "$ac_compile") 2>conftest.er1
19329   ac_status=$?
19330   grep -v '^ *+' conftest.er1 >conftest.err
19331   rm -rf conftest.er1
19332   cat conftest.err >&5
19333   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
19334   (exit $ac_status); } && {
19335          test -z "$ac_c_werror_flag" ||
19336          test ! -s conftest.err
19337        } && test -s conftest.$ac_objext; then
19338   ac_header_compiler=yes
19339 else
19340   $as_echo "$as_me: failed program was:" >&5
19341 sed 's/^/| /' conftest.$ac_ext >&5
19342
19343         ac_header_compiler=no
19344 fi
19345
19346 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
19347 { $as_echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
19348 $as_echo "$ac_header_compiler" >&6; }
19349
19350 # Is the header present?
19351 { $as_echo "$as_me:$LINENO: checking jpeglib.h presence" >&5
19352 $as_echo_n "checking jpeglib.h presence... " >&6; }
19353 cat >conftest.$ac_ext <<_ACEOF
19354 /* confdefs.h.  */
19355 _ACEOF
19356 cat confdefs.h >>conftest.$ac_ext
19357 cat >>conftest.$ac_ext <<_ACEOF
19358 /* end confdefs.h.  */
19359 #include <jpeglib.h>
19360 _ACEOF
19361 if { (ac_try="$ac_cpp conftest.$ac_ext"
19362 case "(($ac_try" in
19363   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19364   *) ac_try_echo=$ac_try;;
19365 esac
19366 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
19367 $as_echo "$ac_try_echo") >&5
19368   (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
19369   ac_status=$?
19370   grep -v '^ *+' conftest.er1 >conftest.err
19371   rm -rf conftest.er1
19372   cat conftest.err >&5
19373   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
19374   (exit $ac_status); } >/dev/null && {
19375          test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
19376          test ! -s conftest.err
19377        }; then
19378   ac_header_preproc=yes
19379 else
19380   $as_echo "$as_me: failed program was:" >&5
19381 sed 's/^/| /' conftest.$ac_ext >&5
19382
19383   ac_header_preproc=no
19384 fi
19385
19386 rm -rf conftest.err conftest.$ac_ext
19387 { $as_echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
19388 $as_echo "$ac_header_preproc" >&6; }
19389
19390 # So?  What about this header?
19391 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
19392   yes:no: )
19393     { $as_echo "$as_me:$LINENO: WARNING: jpeglib.h: accepted by the compiler, rejected by the preprocessor!" >&5
19394 $as_echo "$as_me: WARNING: jpeglib.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
19395     { $as_echo "$as_me:$LINENO: WARNING: jpeglib.h: proceeding with the compiler's result" >&5
19396 $as_echo "$as_me: WARNING: jpeglib.h: proceeding with the compiler's result" >&2;}
19397     ac_header_preproc=yes
19398     ;;
19399   no:yes:* )
19400     { $as_echo "$as_me:$LINENO: WARNING: jpeglib.h: present but cannot be compiled" >&5
19401 $as_echo "$as_me: WARNING: jpeglib.h: present but cannot be compiled" >&2;}
19402     { $as_echo "$as_me:$LINENO: WARNING: jpeglib.h:     check for missing prerequisite headers?" >&5
19403 $as_echo "$as_me: WARNING: jpeglib.h:     check for missing prerequisite headers?" >&2;}
19404     { $as_echo "$as_me:$LINENO: WARNING: jpeglib.h: see the Autoconf documentation" >&5
19405 $as_echo "$as_me: WARNING: jpeglib.h: see the Autoconf documentation" >&2;}
19406     { $as_echo "$as_me:$LINENO: WARNING: jpeglib.h:     section \"Present But Cannot Be Compiled\"" >&5
19407 $as_echo "$as_me: WARNING: jpeglib.h:     section \"Present But Cannot Be Compiled\"" >&2;}
19408     { $as_echo "$as_me:$LINENO: WARNING: jpeglib.h: proceeding with the preprocessor's result" >&5
19409 $as_echo "$as_me: WARNING: jpeglib.h: proceeding with the preprocessor's result" >&2;}
19410     { $as_echo "$as_me:$LINENO: WARNING: jpeglib.h: in the future, the compiler will take precedence" >&5
19411 $as_echo "$as_me: WARNING: jpeglib.h: in the future, the compiler will take precedence" >&2;}
19412
19413     ;;
19414 esac
19415 { $as_echo "$as_me:$LINENO: checking for jpeglib.h" >&5
19416 $as_echo_n "checking for jpeglib.h... " >&6; }
19417 if test "${ac_cv_header_jpeglib_h+set}" = set; then
19418   $as_echo_n "(cached) " >&6
19419 else
19420   ac_cv_header_jpeglib_h=$ac_header_preproc
19421 fi
19422 { $as_echo "$as_me:$LINENO: result: $ac_cv_header_jpeglib_h" >&5
19423 $as_echo "$ac_cv_header_jpeglib_h" >&6; }
19424
19425 fi
19426 if test "x$ac_cv_header_jpeglib_h" = x""yes; then
19427   have_jpeg=yes
19428 fi
19429
19430
19431   CPPFLAGS="$ac_save_CPPFLAGS"
19432
19433   if test "$have_jpeg" = yes; then
19434     # we have the header, now check for the library
19435     have_jpeg=no
19436     jpeg_halfassed=yes
19437
19438   ac_save_CPPFLAGS="$CPPFLAGS"
19439   ac_save_LDFLAGS="$LDFLAGS"
19440 #  ac_save_LIBS="$LIBS"
19441
19442   if test \! -z "$includedir" ; then
19443     CPPFLAGS="$CPPFLAGS -I$includedir"
19444   fi
19445   # note: $X_CFLAGS includes $x_includes
19446   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
19447
19448   if test \! -z "$libdir" ; then
19449     LDFLAGS="$LDFLAGS -L$libdir"
19450   fi
19451   # note: $X_LIBS includes $x_libraries
19452   LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
19453
19454   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
19455   LDFLAGS=`eval eval eval eval eval eval eval eval eval echo $LDFLAGS`
19456   { $as_echo "$as_me:$LINENO: checking for jpeg_start_compress in -ljpeg" >&5
19457 $as_echo_n "checking for jpeg_start_compress in -ljpeg... " >&6; }
19458 if test "${ac_cv_lib_jpeg_jpeg_start_compress+set}" = set; then
19459   $as_echo_n "(cached) " >&6
19460 else
19461   ac_check_lib_save_LIBS=$LIBS
19462 LIBS="-ljpeg  $LIBS"
19463 cat >conftest.$ac_ext <<_ACEOF
19464 /* confdefs.h.  */
19465 _ACEOF
19466 cat confdefs.h >>conftest.$ac_ext
19467 cat >>conftest.$ac_ext <<_ACEOF
19468 /* end confdefs.h.  */
19469
19470 /* Override any GCC internal prototype to avoid an error.
19471    Use char because int might match the return type of a GCC
19472    builtin and then its argument prototype would still apply.  */
19473 #ifdef __cplusplus
19474 extern "C"
19475 #endif
19476 char jpeg_start_compress ();
19477 int
19478 main ()
19479 {
19480 return jpeg_start_compress ();
19481   ;
19482   return 0;
19483 }
19484 _ACEOF
19485 rm -rf conftest.$ac_objext conftest$ac_exeext
19486 if { (ac_try="$ac_link"
19487 case "(($ac_try" in
19488   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19489   *) ac_try_echo=$ac_try;;
19490 esac
19491 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
19492 $as_echo "$ac_try_echo") >&5
19493   (eval "$ac_link") 2>conftest.er1
19494   ac_status=$?
19495   grep -v '^ *+' conftest.er1 >conftest.err
19496   rm -rf conftest.er1
19497   cat conftest.err >&5
19498   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
19499   (exit $ac_status); } && {
19500          test -z "$ac_c_werror_flag" ||
19501          test ! -s conftest.err
19502        } && test -s conftest$ac_exeext && {
19503          test "$cross_compiling" = yes ||
19504          $as_test_x conftest$ac_exeext
19505        }; then
19506   ac_cv_lib_jpeg_jpeg_start_compress=yes
19507 else
19508   $as_echo "$as_me: failed program was:" >&5
19509 sed 's/^/| /' conftest.$ac_ext >&5
19510
19511         ac_cv_lib_jpeg_jpeg_start_compress=no
19512 fi
19513
19514 rm -rf conftest.dSYM
19515 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
19516       conftest$ac_exeext conftest.$ac_ext
19517 LIBS=$ac_check_lib_save_LIBS
19518 fi
19519 { $as_echo "$as_me:$LINENO: result: $ac_cv_lib_jpeg_jpeg_start_compress" >&5
19520 $as_echo "$ac_cv_lib_jpeg_jpeg_start_compress" >&6; }
19521 if test "x$ac_cv_lib_jpeg_jpeg_start_compress" = x""yes; then
19522   have_jpeg=yes
19523                     jpeg_halfassed=no
19524                     JPEG_LIBS="-ljpeg"
19525                     cat >>confdefs.h <<\_ACEOF
19526 #define HAVE_JPEGLIB 1
19527 _ACEOF
19528
19529 fi
19530
19531   CPPFLAGS="$ac_save_CPPFLAGS"
19532   LDFLAGS="$ac_save_LDFLAGS"
19533 #  LIBS="$ac_save_LIBS"
19534
19535   fi
19536 fi
19537
19538
19539 ###############################################################################
19540 #
19541 #       Check for pty support: this allows 'phosphor' and 'apple2'
19542 #       to run curses-based programs, or be used as terminal windows.
19543 #
19544 ###############################################################################
19545
19546 PTY_LIBS=
19547
19548
19549 for ac_header in pty.h util.h
19550 do
19551 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
19552 if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
19553   { $as_echo "$as_me:$LINENO: checking for $ac_header" >&5
19554 $as_echo_n "checking for $ac_header... " >&6; }
19555 if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
19556   $as_echo_n "(cached) " >&6
19557 fi
19558 ac_res=`eval 'as_val=${'$as_ac_Header'}
19559                  $as_echo "$as_val"'`
19560                { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
19561 $as_echo "$ac_res" >&6; }
19562 else
19563   # Is the header compilable?
19564 { $as_echo "$as_me:$LINENO: checking $ac_header usability" >&5
19565 $as_echo_n "checking $ac_header usability... " >&6; }
19566 cat >conftest.$ac_ext <<_ACEOF
19567 /* confdefs.h.  */
19568 _ACEOF
19569 cat confdefs.h >>conftest.$ac_ext
19570 cat >>conftest.$ac_ext <<_ACEOF
19571 /* end confdefs.h.  */
19572 $ac_includes_default
19573 #include <$ac_header>
19574 _ACEOF
19575 rm -rf conftest.$ac_objext
19576 if { (ac_try="$ac_compile"
19577 case "(($ac_try" in
19578   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19579   *) ac_try_echo=$ac_try;;
19580 esac
19581 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
19582 $as_echo "$ac_try_echo") >&5
19583   (eval "$ac_compile") 2>conftest.er1
19584   ac_status=$?
19585   grep -v '^ *+' conftest.er1 >conftest.err
19586   rm -rf conftest.er1
19587   cat conftest.err >&5
19588   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
19589   (exit $ac_status); } && {
19590          test -z "$ac_c_werror_flag" ||
19591          test ! -s conftest.err
19592        } && test -s conftest.$ac_objext; then
19593   ac_header_compiler=yes
19594 else
19595   $as_echo "$as_me: failed program was:" >&5
19596 sed 's/^/| /' conftest.$ac_ext >&5
19597
19598         ac_header_compiler=no
19599 fi
19600
19601 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
19602 { $as_echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
19603 $as_echo "$ac_header_compiler" >&6; }
19604
19605 # Is the header present?
19606 { $as_echo "$as_me:$LINENO: checking $ac_header presence" >&5
19607 $as_echo_n "checking $ac_header presence... " >&6; }
19608 cat >conftest.$ac_ext <<_ACEOF
19609 /* confdefs.h.  */
19610 _ACEOF
19611 cat confdefs.h >>conftest.$ac_ext
19612 cat >>conftest.$ac_ext <<_ACEOF
19613 /* end confdefs.h.  */
19614 #include <$ac_header>
19615 _ACEOF
19616 if { (ac_try="$ac_cpp conftest.$ac_ext"
19617 case "(($ac_try" in
19618   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19619   *) ac_try_echo=$ac_try;;
19620 esac
19621 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
19622 $as_echo "$ac_try_echo") >&5
19623   (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
19624   ac_status=$?
19625   grep -v '^ *+' conftest.er1 >conftest.err
19626   rm -rf conftest.er1
19627   cat conftest.err >&5
19628   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
19629   (exit $ac_status); } >/dev/null && {
19630          test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
19631          test ! -s conftest.err
19632        }; then
19633   ac_header_preproc=yes
19634 else
19635   $as_echo "$as_me: failed program was:" >&5
19636 sed 's/^/| /' conftest.$ac_ext >&5
19637
19638   ac_header_preproc=no
19639 fi
19640
19641 rm -rf conftest.err conftest.$ac_ext
19642 { $as_echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
19643 $as_echo "$ac_header_preproc" >&6; }
19644
19645 # So?  What about this header?
19646 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
19647   yes:no: )
19648     { $as_echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
19649 $as_echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
19650     { $as_echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
19651 $as_echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
19652     ac_header_preproc=yes
19653     ;;
19654   no:yes:* )
19655     { $as_echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
19656 $as_echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
19657     { $as_echo "$as_me:$LINENO: WARNING: $ac_header:     check for missing prerequisite headers?" >&5
19658 $as_echo "$as_me: WARNING: $ac_header:     check for missing prerequisite headers?" >&2;}
19659     { $as_echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
19660 $as_echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
19661     { $as_echo "$as_me:$LINENO: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&5
19662 $as_echo "$as_me: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&2;}
19663     { $as_echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
19664 $as_echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
19665     { $as_echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
19666 $as_echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
19667
19668     ;;
19669 esac
19670 { $as_echo "$as_me:$LINENO: checking for $ac_header" >&5
19671 $as_echo_n "checking for $ac_header... " >&6; }
19672 if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
19673   $as_echo_n "(cached) " >&6
19674 else
19675   eval "$as_ac_Header=\$ac_header_preproc"
19676 fi
19677 ac_res=`eval 'as_val=${'$as_ac_Header'}
19678                  $as_echo "$as_val"'`
19679                { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
19680 $as_echo "$ac_res" >&6; }
19681
19682 fi
19683 as_val=`eval 'as_val=${'$as_ac_Header'}
19684                  $as_echo "$as_val"'`
19685    if test "x$as_val" = x""yes; then
19686   cat >>confdefs.h <<_ACEOF
19687 #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
19688 _ACEOF
19689
19690 fi
19691
19692 done
19693
19694
19695   ac_save_CPPFLAGS="$CPPFLAGS"
19696   ac_save_LDFLAGS="$LDFLAGS"
19697 #  ac_save_LIBS="$LIBS"
19698
19699   if test \! -z "$includedir" ; then
19700     CPPFLAGS="$CPPFLAGS -I$includedir"
19701   fi
19702   # note: $X_CFLAGS includes $x_includes
19703   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
19704
19705   if test \! -z "$libdir" ; then
19706     LDFLAGS="$LDFLAGS -L$libdir"
19707   fi
19708   # note: $X_LIBS includes $x_libraries
19709   LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
19710
19711   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
19712   LDFLAGS=`eval eval eval eval eval eval eval eval eval echo $LDFLAGS`
19713   { $as_echo "$as_me:$LINENO: checking for forkpty in -lutil" >&5
19714 $as_echo_n "checking for forkpty in -lutil... " >&6; }
19715 if test "${ac_cv_lib_util_forkpty+set}" = set; then
19716   $as_echo_n "(cached) " >&6
19717 else
19718   ac_check_lib_save_LIBS=$LIBS
19719 LIBS="-lutil  $LIBS"
19720 cat >conftest.$ac_ext <<_ACEOF
19721 /* confdefs.h.  */
19722 _ACEOF
19723 cat confdefs.h >>conftest.$ac_ext
19724 cat >>conftest.$ac_ext <<_ACEOF
19725 /* end confdefs.h.  */
19726
19727 /* Override any GCC internal prototype to avoid an error.
19728    Use char because int might match the return type of a GCC
19729    builtin and then its argument prototype would still apply.  */
19730 #ifdef __cplusplus
19731 extern "C"
19732 #endif
19733 char forkpty ();
19734 int
19735 main ()
19736 {
19737 return forkpty ();
19738   ;
19739   return 0;
19740 }
19741 _ACEOF
19742 rm -rf conftest.$ac_objext conftest$ac_exeext
19743 if { (ac_try="$ac_link"
19744 case "(($ac_try" in
19745   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19746   *) ac_try_echo=$ac_try;;
19747 esac
19748 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
19749 $as_echo "$ac_try_echo") >&5
19750   (eval "$ac_link") 2>conftest.er1
19751   ac_status=$?
19752   grep -v '^ *+' conftest.er1 >conftest.err
19753   rm -rf conftest.er1
19754   cat conftest.err >&5
19755   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
19756   (exit $ac_status); } && {
19757          test -z "$ac_c_werror_flag" ||
19758          test ! -s conftest.err
19759        } && test -s conftest$ac_exeext && {
19760          test "$cross_compiling" = yes ||
19761          $as_test_x conftest$ac_exeext
19762        }; then
19763   ac_cv_lib_util_forkpty=yes
19764 else
19765   $as_echo "$as_me: failed program was:" >&5
19766 sed 's/^/| /' conftest.$ac_ext >&5
19767
19768         ac_cv_lib_util_forkpty=no
19769 fi
19770
19771 rm -rf conftest.dSYM
19772 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
19773       conftest$ac_exeext conftest.$ac_ext
19774 LIBS=$ac_check_lib_save_LIBS
19775 fi
19776 { $as_echo "$as_me:$LINENO: result: $ac_cv_lib_util_forkpty" >&5
19777 $as_echo "$ac_cv_lib_util_forkpty" >&6; }
19778 if test "x$ac_cv_lib_util_forkpty" = x""yes; then
19779   PTY_LIBS="-lutil"
19780                 ac_have_forkpty=yes
19781                 cat >>confdefs.h <<\_ACEOF
19782 #define HAVE_FORKPTY 1
19783 _ACEOF
19784
19785 fi
19786
19787   CPPFLAGS="$ac_save_CPPFLAGS"
19788   LDFLAGS="$ac_save_LDFLAGS"
19789 #  LIBS="$ac_save_LIBS"
19790
19791
19792 if test "$ac_have_forkpty" != yes ; then
19793   # we don't need (or have) -lutil on MacOS 10.4.2...
19794
19795   ac_save_CPPFLAGS="$CPPFLAGS"
19796   ac_save_LDFLAGS="$LDFLAGS"
19797 #  ac_save_LIBS="$LIBS"
19798
19799   if test \! -z "$includedir" ; then
19800     CPPFLAGS="$CPPFLAGS -I$includedir"
19801   fi
19802   # note: $X_CFLAGS includes $x_includes
19803   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
19804
19805   if test \! -z "$libdir" ; then
19806     LDFLAGS="$LDFLAGS -L$libdir"
19807   fi
19808   # note: $X_LIBS includes $x_libraries
19809   LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
19810
19811   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
19812   LDFLAGS=`eval eval eval eval eval eval eval eval eval echo $LDFLAGS`
19813   { $as_echo "$as_me:$LINENO: checking for forkpty in -lc" >&5
19814 $as_echo_n "checking for forkpty in -lc... " >&6; }
19815 if test "${ac_cv_lib_c_forkpty+set}" = set; then
19816   $as_echo_n "(cached) " >&6
19817 else
19818   ac_check_lib_save_LIBS=$LIBS
19819 LIBS="-lc  $LIBS"
19820 cat >conftest.$ac_ext <<_ACEOF
19821 /* confdefs.h.  */
19822 _ACEOF
19823 cat confdefs.h >>conftest.$ac_ext
19824 cat >>conftest.$ac_ext <<_ACEOF
19825 /* end confdefs.h.  */
19826
19827 /* Override any GCC internal prototype to avoid an error.
19828    Use char because int might match the return type of a GCC
19829    builtin and then its argument prototype would still apply.  */
19830 #ifdef __cplusplus
19831 extern "C"
19832 #endif
19833 char forkpty ();
19834 int
19835 main ()
19836 {
19837 return forkpty ();
19838   ;
19839   return 0;
19840 }
19841 _ACEOF
19842 rm -rf conftest.$ac_objext conftest$ac_exeext
19843 if { (ac_try="$ac_link"
19844 case "(($ac_try" in
19845   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19846   *) ac_try_echo=$ac_try;;
19847 esac
19848 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
19849 $as_echo "$ac_try_echo") >&5
19850   (eval "$ac_link") 2>conftest.er1
19851   ac_status=$?
19852   grep -v '^ *+' conftest.er1 >conftest.err
19853   rm -rf conftest.er1
19854   cat conftest.err >&5
19855   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
19856   (exit $ac_status); } && {
19857          test -z "$ac_c_werror_flag" ||
19858          test ! -s conftest.err
19859        } && test -s conftest$ac_exeext && {
19860          test "$cross_compiling" = yes ||
19861          $as_test_x conftest$ac_exeext
19862        }; then
19863   ac_cv_lib_c_forkpty=yes
19864 else
19865   $as_echo "$as_me: failed program was:" >&5
19866 sed 's/^/| /' conftest.$ac_ext >&5
19867
19868         ac_cv_lib_c_forkpty=no
19869 fi
19870
19871 rm -rf conftest.dSYM
19872 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
19873       conftest$ac_exeext conftest.$ac_ext
19874 LIBS=$ac_check_lib_save_LIBS
19875 fi
19876 { $as_echo "$as_me:$LINENO: result: $ac_cv_lib_c_forkpty" >&5
19877 $as_echo "$ac_cv_lib_c_forkpty" >&6; }
19878 if test "x$ac_cv_lib_c_forkpty" = x""yes; then
19879   PTY_LIBS=""
19880                   cat >>confdefs.h <<\_ACEOF
19881 #define HAVE_FORKPTY 1
19882 _ACEOF
19883
19884 fi
19885
19886   CPPFLAGS="$ac_save_CPPFLAGS"
19887   LDFLAGS="$ac_save_LDFLAGS"
19888 #  LIBS="$ac_save_LIBS"
19889
19890 fi
19891
19892 ###############################################################################
19893 #
19894 #       Check for the XSHM server extension.
19895 #
19896 ###############################################################################
19897
19898 have_xshm=no
19899 with_xshm_req=unspecified
19900
19901 # Check whether --with-xshm-ext was given.
19902 if test "${with_xshm_ext+set}" = set; then
19903   withval=$with_xshm_ext; with_xshm="$withval"; with_xshm_req="$withval"
19904 else
19905   with_xshm=yes
19906 fi
19907
19908
19909
19910    case "$with_xshm" in
19911     yes) ;;
19912     no)  ;;
19913
19914     /*)
19915      { $as_echo "$as_me:$LINENO: checking for XSHM headers" >&5
19916 $as_echo_n "checking for XSHM headers... " >&6; }
19917      d=$with_xshm/include
19918      if test -d $d; then
19919        X_CFLAGS="-I$d $X_CFLAGS"
19920        { $as_echo "$as_me:$LINENO: result: $d" >&5
19921 $as_echo "$d" >&6; }
19922      else
19923        { $as_echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
19924 $as_echo "not found ($d: no such directory)" >&6; }
19925      fi
19926
19927      { $as_echo "$as_me:$LINENO: checking for XSHM libs" >&5
19928 $as_echo_n "checking for XSHM libs... " >&6; }
19929      d=$with_xshm/lib
19930      if test -d $d; then
19931        X_LIBS="-L$d $X_LIBS"
19932        { $as_echo "$as_me:$LINENO: result: $d" >&5
19933 $as_echo "$d" >&6; }
19934      else
19935        { $as_echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
19936 $as_echo "not found ($d: no such directory)" >&6; }
19937      fi
19938
19939      # replace the directory string with "yes".
19940      with_xshm_req="yes"
19941      with_xshm=$with_xshm_req
19942      ;;
19943
19944     *)
19945      echo ""
19946      echo "error: argument to --with-xshm-ext must be \"yes\", \"no\", or a directory."
19947      echo "       If it is a directory, then \`DIR/include' will be added to"
19948      echo "       the -I list, and \`DIR/lib' will be added to the -L list."
19949      exit 1
19950      ;;
19951    esac
19952
19953
19954 if test "$with_xshm" = yes; then
19955
19956   # first check for Xshm.h.
19957
19958   ac_save_CPPFLAGS="$CPPFLAGS"
19959   if test \! -z "$includedir" ; then
19960     CPPFLAGS="$CPPFLAGS -I$includedir"
19961   fi
19962   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
19963   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
19964   { $as_echo "$as_me:$LINENO: checking for X11/extensions/XShm.h" >&5
19965 $as_echo_n "checking for X11/extensions/XShm.h... " >&6; }
19966 if test "${ac_cv_header_X11_extensions_XShm_h+set}" = set; then
19967   $as_echo_n "(cached) " >&6
19968 else
19969   cat >conftest.$ac_ext <<_ACEOF
19970 /* confdefs.h.  */
19971 _ACEOF
19972 cat confdefs.h >>conftest.$ac_ext
19973 cat >>conftest.$ac_ext <<_ACEOF
19974 /* end confdefs.h.  */
19975 #include <X11/Xlib.h>
19976
19977 #include <X11/extensions/XShm.h>
19978 _ACEOF
19979 rm -rf conftest.$ac_objext
19980 if { (ac_try="$ac_compile"
19981 case "(($ac_try" in
19982   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19983   *) ac_try_echo=$ac_try;;
19984 esac
19985 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
19986 $as_echo "$ac_try_echo") >&5
19987   (eval "$ac_compile") 2>conftest.er1
19988   ac_status=$?
19989   grep -v '^ *+' conftest.er1 >conftest.err
19990   rm -rf conftest.er1
19991   cat conftest.err >&5
19992   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
19993   (exit $ac_status); } && {
19994          test -z "$ac_c_werror_flag" ||
19995          test ! -s conftest.err
19996        } && test -s conftest.$ac_objext; then
19997   ac_cv_header_X11_extensions_XShm_h=yes
19998 else
19999   $as_echo "$as_me: failed program was:" >&5
20000 sed 's/^/| /' conftest.$ac_ext >&5
20001
20002         ac_cv_header_X11_extensions_XShm_h=no
20003 fi
20004
20005 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
20006 fi
20007 { $as_echo "$as_me:$LINENO: result: $ac_cv_header_X11_extensions_XShm_h" >&5
20008 $as_echo "$ac_cv_header_X11_extensions_XShm_h" >&6; }
20009 if test "x$ac_cv_header_X11_extensions_XShm_h" = x""yes; then
20010   have_xshm=yes
20011 fi
20012
20013
20014   CPPFLAGS="$ac_save_CPPFLAGS"
20015
20016   # if that succeeded, then check for sys/ipc.h.
20017   if test "$have_xshm" = yes; then
20018     have_xshm=no
20019
20020   ac_save_CPPFLAGS="$CPPFLAGS"
20021   if test \! -z "$includedir" ; then
20022     CPPFLAGS="$CPPFLAGS -I$includedir"
20023   fi
20024   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
20025   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
20026   if test "${ac_cv_header_sys_ipc_h+set}" = set; then
20027   { $as_echo "$as_me:$LINENO: checking for sys/ipc.h" >&5
20028 $as_echo_n "checking for sys/ipc.h... " >&6; }
20029 if test "${ac_cv_header_sys_ipc_h+set}" = set; then
20030   $as_echo_n "(cached) " >&6
20031 fi
20032 { $as_echo "$as_me:$LINENO: result: $ac_cv_header_sys_ipc_h" >&5
20033 $as_echo "$ac_cv_header_sys_ipc_h" >&6; }
20034 else
20035   # Is the header compilable?
20036 { $as_echo "$as_me:$LINENO: checking sys/ipc.h usability" >&5
20037 $as_echo_n "checking sys/ipc.h usability... " >&6; }
20038 cat >conftest.$ac_ext <<_ACEOF
20039 /* confdefs.h.  */
20040 _ACEOF
20041 cat confdefs.h >>conftest.$ac_ext
20042 cat >>conftest.$ac_ext <<_ACEOF
20043 /* end confdefs.h.  */
20044 $ac_includes_default
20045 #include <sys/ipc.h>
20046 _ACEOF
20047 rm -rf conftest.$ac_objext
20048 if { (ac_try="$ac_compile"
20049 case "(($ac_try" in
20050   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20051   *) ac_try_echo=$ac_try;;
20052 esac
20053 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
20054 $as_echo "$ac_try_echo") >&5
20055   (eval "$ac_compile") 2>conftest.er1
20056   ac_status=$?
20057   grep -v '^ *+' conftest.er1 >conftest.err
20058   rm -rf conftest.er1
20059   cat conftest.err >&5
20060   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
20061   (exit $ac_status); } && {
20062          test -z "$ac_c_werror_flag" ||
20063          test ! -s conftest.err
20064        } && test -s conftest.$ac_objext; then
20065   ac_header_compiler=yes
20066 else
20067   $as_echo "$as_me: failed program was:" >&5
20068 sed 's/^/| /' conftest.$ac_ext >&5
20069
20070         ac_header_compiler=no
20071 fi
20072
20073 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
20074 { $as_echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
20075 $as_echo "$ac_header_compiler" >&6; }
20076
20077 # Is the header present?
20078 { $as_echo "$as_me:$LINENO: checking sys/ipc.h presence" >&5
20079 $as_echo_n "checking sys/ipc.h presence... " >&6; }
20080 cat >conftest.$ac_ext <<_ACEOF
20081 /* confdefs.h.  */
20082 _ACEOF
20083 cat confdefs.h >>conftest.$ac_ext
20084 cat >>conftest.$ac_ext <<_ACEOF
20085 /* end confdefs.h.  */
20086 #include <sys/ipc.h>
20087 _ACEOF
20088 if { (ac_try="$ac_cpp conftest.$ac_ext"
20089 case "(($ac_try" in
20090   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20091   *) ac_try_echo=$ac_try;;
20092 esac
20093 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
20094 $as_echo "$ac_try_echo") >&5
20095   (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
20096   ac_status=$?
20097   grep -v '^ *+' conftest.er1 >conftest.err
20098   rm -rf conftest.er1
20099   cat conftest.err >&5
20100   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
20101   (exit $ac_status); } >/dev/null && {
20102          test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
20103          test ! -s conftest.err
20104        }; then
20105   ac_header_preproc=yes
20106 else
20107   $as_echo "$as_me: failed program was:" >&5
20108 sed 's/^/| /' conftest.$ac_ext >&5
20109
20110   ac_header_preproc=no
20111 fi
20112
20113 rm -rf conftest.err conftest.$ac_ext
20114 { $as_echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
20115 $as_echo "$ac_header_preproc" >&6; }
20116
20117 # So?  What about this header?
20118 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
20119   yes:no: )
20120     { $as_echo "$as_me:$LINENO: WARNING: sys/ipc.h: accepted by the compiler, rejected by the preprocessor!" >&5
20121 $as_echo "$as_me: WARNING: sys/ipc.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
20122     { $as_echo "$as_me:$LINENO: WARNING: sys/ipc.h: proceeding with the compiler's result" >&5
20123 $as_echo "$as_me: WARNING: sys/ipc.h: proceeding with the compiler's result" >&2;}
20124     ac_header_preproc=yes
20125     ;;
20126   no:yes:* )
20127     { $as_echo "$as_me:$LINENO: WARNING: sys/ipc.h: present but cannot be compiled" >&5
20128 $as_echo "$as_me: WARNING: sys/ipc.h: present but cannot be compiled" >&2;}
20129     { $as_echo "$as_me:$LINENO: WARNING: sys/ipc.h:     check for missing prerequisite headers?" >&5
20130 $as_echo "$as_me: WARNING: sys/ipc.h:     check for missing prerequisite headers?" >&2;}
20131     { $as_echo "$as_me:$LINENO: WARNING: sys/ipc.h: see the Autoconf documentation" >&5
20132 $as_echo "$as_me: WARNING: sys/ipc.h: see the Autoconf documentation" >&2;}
20133     { $as_echo "$as_me:$LINENO: WARNING: sys/ipc.h:     section \"Present But Cannot Be Compiled\"" >&5
20134 $as_echo "$as_me: WARNING: sys/ipc.h:     section \"Present But Cannot Be Compiled\"" >&2;}
20135     { $as_echo "$as_me:$LINENO: WARNING: sys/ipc.h: proceeding with the preprocessor's result" >&5
20136 $as_echo "$as_me: WARNING: sys/ipc.h: proceeding with the preprocessor's result" >&2;}
20137     { $as_echo "$as_me:$LINENO: WARNING: sys/ipc.h: in the future, the compiler will take precedence" >&5
20138 $as_echo "$as_me: WARNING: sys/ipc.h: in the future, the compiler will take precedence" >&2;}
20139
20140     ;;
20141 esac
20142 { $as_echo "$as_me:$LINENO: checking for sys/ipc.h" >&5
20143 $as_echo_n "checking for sys/ipc.h... " >&6; }
20144 if test "${ac_cv_header_sys_ipc_h+set}" = set; then
20145   $as_echo_n "(cached) " >&6
20146 else
20147   ac_cv_header_sys_ipc_h=$ac_header_preproc
20148 fi
20149 { $as_echo "$as_me:$LINENO: result: $ac_cv_header_sys_ipc_h" >&5
20150 $as_echo "$ac_cv_header_sys_ipc_h" >&6; }
20151
20152 fi
20153 if test "x$ac_cv_header_sys_ipc_h" = x""yes; then
20154   have_xshm=yes
20155 fi
20156
20157
20158   CPPFLAGS="$ac_save_CPPFLAGS"
20159   fi
20160
20161   # if that succeeded, then check for sys/shm.h.
20162   if test "$have_xshm" = yes; then
20163     have_xshm=no
20164
20165   ac_save_CPPFLAGS="$CPPFLAGS"
20166   if test \! -z "$includedir" ; then
20167     CPPFLAGS="$CPPFLAGS -I$includedir"
20168   fi
20169   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
20170   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
20171   if test "${ac_cv_header_sys_shm_h+set}" = set; then
20172   { $as_echo "$as_me:$LINENO: checking for sys/shm.h" >&5
20173 $as_echo_n "checking for sys/shm.h... " >&6; }
20174 if test "${ac_cv_header_sys_shm_h+set}" = set; then
20175   $as_echo_n "(cached) " >&6
20176 fi
20177 { $as_echo "$as_me:$LINENO: result: $ac_cv_header_sys_shm_h" >&5
20178 $as_echo "$ac_cv_header_sys_shm_h" >&6; }
20179 else
20180   # Is the header compilable?
20181 { $as_echo "$as_me:$LINENO: checking sys/shm.h usability" >&5
20182 $as_echo_n "checking sys/shm.h usability... " >&6; }
20183 cat >conftest.$ac_ext <<_ACEOF
20184 /* confdefs.h.  */
20185 _ACEOF
20186 cat confdefs.h >>conftest.$ac_ext
20187 cat >>conftest.$ac_ext <<_ACEOF
20188 /* end confdefs.h.  */
20189 $ac_includes_default
20190 #include <sys/shm.h>
20191 _ACEOF
20192 rm -rf conftest.$ac_objext
20193 if { (ac_try="$ac_compile"
20194 case "(($ac_try" in
20195   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20196   *) ac_try_echo=$ac_try;;
20197 esac
20198 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
20199 $as_echo "$ac_try_echo") >&5
20200   (eval "$ac_compile") 2>conftest.er1
20201   ac_status=$?
20202   grep -v '^ *+' conftest.er1 >conftest.err
20203   rm -rf conftest.er1
20204   cat conftest.err >&5
20205   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
20206   (exit $ac_status); } && {
20207          test -z "$ac_c_werror_flag" ||
20208          test ! -s conftest.err
20209        } && test -s conftest.$ac_objext; then
20210   ac_header_compiler=yes
20211 else
20212   $as_echo "$as_me: failed program was:" >&5
20213 sed 's/^/| /' conftest.$ac_ext >&5
20214
20215         ac_header_compiler=no
20216 fi
20217
20218 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
20219 { $as_echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
20220 $as_echo "$ac_header_compiler" >&6; }
20221
20222 # Is the header present?
20223 { $as_echo "$as_me:$LINENO: checking sys/shm.h presence" >&5
20224 $as_echo_n "checking sys/shm.h presence... " >&6; }
20225 cat >conftest.$ac_ext <<_ACEOF
20226 /* confdefs.h.  */
20227 _ACEOF
20228 cat confdefs.h >>conftest.$ac_ext
20229 cat >>conftest.$ac_ext <<_ACEOF
20230 /* end confdefs.h.  */
20231 #include <sys/shm.h>
20232 _ACEOF
20233 if { (ac_try="$ac_cpp conftest.$ac_ext"
20234 case "(($ac_try" in
20235   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20236   *) ac_try_echo=$ac_try;;
20237 esac
20238 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
20239 $as_echo "$ac_try_echo") >&5
20240   (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
20241   ac_status=$?
20242   grep -v '^ *+' conftest.er1 >conftest.err
20243   rm -rf conftest.er1
20244   cat conftest.err >&5
20245   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
20246   (exit $ac_status); } >/dev/null && {
20247          test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
20248          test ! -s conftest.err
20249        }; then
20250   ac_header_preproc=yes
20251 else
20252   $as_echo "$as_me: failed program was:" >&5
20253 sed 's/^/| /' conftest.$ac_ext >&5
20254
20255   ac_header_preproc=no
20256 fi
20257
20258 rm -rf conftest.err conftest.$ac_ext
20259 { $as_echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
20260 $as_echo "$ac_header_preproc" >&6; }
20261
20262 # So?  What about this header?
20263 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
20264   yes:no: )
20265     { $as_echo "$as_me:$LINENO: WARNING: sys/shm.h: accepted by the compiler, rejected by the preprocessor!" >&5
20266 $as_echo "$as_me: WARNING: sys/shm.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
20267     { $as_echo "$as_me:$LINENO: WARNING: sys/shm.h: proceeding with the compiler's result" >&5
20268 $as_echo "$as_me: WARNING: sys/shm.h: proceeding with the compiler's result" >&2;}
20269     ac_header_preproc=yes
20270     ;;
20271   no:yes:* )
20272     { $as_echo "$as_me:$LINENO: WARNING: sys/shm.h: present but cannot be compiled" >&5
20273 $as_echo "$as_me: WARNING: sys/shm.h: present but cannot be compiled" >&2;}
20274     { $as_echo "$as_me:$LINENO: WARNING: sys/shm.h:     check for missing prerequisite headers?" >&5
20275 $as_echo "$as_me: WARNING: sys/shm.h:     check for missing prerequisite headers?" >&2;}
20276     { $as_echo "$as_me:$LINENO: WARNING: sys/shm.h: see the Autoconf documentation" >&5
20277 $as_echo "$as_me: WARNING: sys/shm.h: see the Autoconf documentation" >&2;}
20278     { $as_echo "$as_me:$LINENO: WARNING: sys/shm.h:     section \"Present But Cannot Be Compiled\"" >&5
20279 $as_echo "$as_me: WARNING: sys/shm.h:     section \"Present But Cannot Be Compiled\"" >&2;}
20280     { $as_echo "$as_me:$LINENO: WARNING: sys/shm.h: proceeding with the preprocessor's result" >&5
20281 $as_echo "$as_me: WARNING: sys/shm.h: proceeding with the preprocessor's result" >&2;}
20282     { $as_echo "$as_me:$LINENO: WARNING: sys/shm.h: in the future, the compiler will take precedence" >&5
20283 $as_echo "$as_me: WARNING: sys/shm.h: in the future, the compiler will take precedence" >&2;}
20284
20285     ;;
20286 esac
20287 { $as_echo "$as_me:$LINENO: checking for sys/shm.h" >&5
20288 $as_echo_n "checking for sys/shm.h... " >&6; }
20289 if test "${ac_cv_header_sys_shm_h+set}" = set; then
20290   $as_echo_n "(cached) " >&6
20291 else
20292   ac_cv_header_sys_shm_h=$ac_header_preproc
20293 fi
20294 { $as_echo "$as_me:$LINENO: result: $ac_cv_header_sys_shm_h" >&5
20295 $as_echo "$ac_cv_header_sys_shm_h" >&6; }
20296
20297 fi
20298 if test "x$ac_cv_header_sys_shm_h" = x""yes; then
20299   have_xshm=yes
20300 fi
20301
20302
20303   CPPFLAGS="$ac_save_CPPFLAGS"
20304   fi
20305
20306   # AIX is pathological, as usual: apparently it's normal for the Xshm headers
20307   # to exist, but the library code to not exist.  And even better, the library
20308   # code is in its own library: libXextSam.a.  So, if we're on AIX, and that
20309   # lib doesn't exist, give up.  (This lib gets added to X_EXTRA_LIBS, and
20310   # that's not quite right, but close enough.)
20311   #
20312   case "$host" in
20313     *-aix*)
20314       if  `uname -v` -eq 3 ; then
20315         have_xshm=no
20316
20317   ac_save_CPPFLAGS="$CPPFLAGS"
20318   ac_save_LDFLAGS="$LDFLAGS"
20319 #  ac_save_LIBS="$LIBS"
20320
20321   if test \! -z "$includedir" ; then
20322     CPPFLAGS="$CPPFLAGS -I$includedir"
20323   fi
20324   # note: $X_CFLAGS includes $x_includes
20325   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
20326
20327   if test \! -z "$libdir" ; then
20328     LDFLAGS="$LDFLAGS -L$libdir"
20329   fi
20330   # note: $X_LIBS includes $x_libraries
20331   LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
20332
20333   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
20334   LDFLAGS=`eval eval eval eval eval eval eval eval eval echo $LDFLAGS`
20335   { $as_echo "$as_me:$LINENO: checking for XShmQueryExtension in -lXextSam" >&5
20336 $as_echo_n "checking for XShmQueryExtension in -lXextSam... " >&6; }
20337 if test "${ac_cv_lib_XextSam_XShmQueryExtension+set}" = set; then
20338   $as_echo_n "(cached) " >&6
20339 else
20340   ac_check_lib_save_LIBS=$LIBS
20341 LIBS="-lXextSam -lX11 -lXext -lm $LIBS"
20342 cat >conftest.$ac_ext <<_ACEOF
20343 /* confdefs.h.  */
20344 _ACEOF
20345 cat confdefs.h >>conftest.$ac_ext
20346 cat >>conftest.$ac_ext <<_ACEOF
20347 /* end confdefs.h.  */
20348
20349 /* Override any GCC internal prototype to avoid an error.
20350    Use char because int might match the return type of a GCC
20351    builtin and then its argument prototype would still apply.  */
20352 #ifdef __cplusplus
20353 extern "C"
20354 #endif
20355 char XShmQueryExtension ();
20356 int
20357 main ()
20358 {
20359 return XShmQueryExtension ();
20360   ;
20361   return 0;
20362 }
20363 _ACEOF
20364 rm -rf conftest.$ac_objext conftest$ac_exeext
20365 if { (ac_try="$ac_link"
20366 case "(($ac_try" in
20367   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20368   *) ac_try_echo=$ac_try;;
20369 esac
20370 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
20371 $as_echo "$ac_try_echo") >&5
20372   (eval "$ac_link") 2>conftest.er1
20373   ac_status=$?
20374   grep -v '^ *+' conftest.er1 >conftest.err
20375   rm -rf conftest.er1
20376   cat conftest.err >&5
20377   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
20378   (exit $ac_status); } && {
20379          test -z "$ac_c_werror_flag" ||
20380          test ! -s conftest.err
20381        } && test -s conftest$ac_exeext && {
20382          test "$cross_compiling" = yes ||
20383          $as_test_x conftest$ac_exeext
20384        }; then
20385   ac_cv_lib_XextSam_XShmQueryExtension=yes
20386 else
20387   $as_echo "$as_me: failed program was:" >&5
20388 sed 's/^/| /' conftest.$ac_ext >&5
20389
20390         ac_cv_lib_XextSam_XShmQueryExtension=no
20391 fi
20392
20393 rm -rf conftest.dSYM
20394 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
20395       conftest$ac_exeext conftest.$ac_ext
20396 LIBS=$ac_check_lib_save_LIBS
20397 fi
20398 { $as_echo "$as_me:$LINENO: result: $ac_cv_lib_XextSam_XShmQueryExtension" >&5
20399 $as_echo "$ac_cv_lib_XextSam_XShmQueryExtension" >&6; }
20400 if test "x$ac_cv_lib_XextSam_XShmQueryExtension" = x""yes; then
20401   have_xshm=yes; X_EXTRA_LIBS="$X_EXTRA_LIBS -lXextSam"
20402 else
20403   true
20404 fi
20405
20406   CPPFLAGS="$ac_save_CPPFLAGS"
20407   LDFLAGS="$ac_save_LDFLAGS"
20408 #  LIBS="$ac_save_LIBS"
20409
20410       fi
20411     ;;
20412   esac
20413
20414   # if that succeeded, then we've really got it.
20415   if test "$have_xshm" = yes; then
20416     cat >>confdefs.h <<\_ACEOF
20417 #define HAVE_XSHM_EXTENSION 1
20418 _ACEOF
20419
20420   fi
20421
20422 elif test "$with_xshm" != no; then
20423   echo "error: must be yes or no: --with-xshm-ext=$with_xshm"
20424   exit 1
20425 fi
20426
20427
20428 ###############################################################################
20429 #
20430 #       Check for the DOUBLE-BUFFER server extension.
20431 #
20432 ###############################################################################
20433
20434 have_xdbe=no
20435 with_xdbe_req=unspecified
20436
20437 # Check whether --with-xdbe-ext was given.
20438 if test "${with_xdbe_ext+set}" = set; then
20439   withval=$with_xdbe_ext; with_xdbe="$withval"; with_xdbe_req="$withval"
20440 else
20441   with_xdbe=yes
20442 fi
20443
20444
20445
20446    case "$with_xdbe" in
20447     yes) ;;
20448     no)  ;;
20449
20450     /*)
20451      { $as_echo "$as_me:$LINENO: checking for DOUBLE-BUFFER headers" >&5
20452 $as_echo_n "checking for DOUBLE-BUFFER headers... " >&6; }
20453      d=$with_xdbe/include
20454      if test -d $d; then
20455        X_CFLAGS="-I$d $X_CFLAGS"
20456        { $as_echo "$as_me:$LINENO: result: $d" >&5
20457 $as_echo "$d" >&6; }
20458      else
20459        { $as_echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
20460 $as_echo "not found ($d: no such directory)" >&6; }
20461      fi
20462
20463      { $as_echo "$as_me:$LINENO: checking for DOUBLE-BUFFER libs" >&5
20464 $as_echo_n "checking for DOUBLE-BUFFER libs... " >&6; }
20465      d=$with_xdbe/lib
20466      if test -d $d; then
20467        X_LIBS="-L$d $X_LIBS"
20468        { $as_echo "$as_me:$LINENO: result: $d" >&5
20469 $as_echo "$d" >&6; }
20470      else
20471        { $as_echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
20472 $as_echo "not found ($d: no such directory)" >&6; }
20473      fi
20474
20475      # replace the directory string with "yes".
20476      with_xdbe_req="yes"
20477      with_xdbe=$with_xdbe_req
20478      ;;
20479
20480     *)
20481      echo ""
20482      echo "error: argument to --with-xdbe-ext must be \"yes\", \"no\", or a directory."
20483      echo "       If it is a directory, then \`DIR/include' will be added to"
20484      echo "       the -I list, and \`DIR/lib' will be added to the -L list."
20485      exit 1
20486      ;;
20487    esac
20488
20489
20490 if test "$with_xdbe" = yes; then
20491
20492
20493   ac_save_CPPFLAGS="$CPPFLAGS"
20494   if test \! -z "$includedir" ; then
20495     CPPFLAGS="$CPPFLAGS -I$includedir"
20496   fi
20497   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
20498   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
20499   { $as_echo "$as_me:$LINENO: checking for X11/extensions/Xdbe.h" >&5
20500 $as_echo_n "checking for X11/extensions/Xdbe.h... " >&6; }
20501 if test "${ac_cv_header_X11_extensions_Xdbe_h+set}" = set; then
20502   $as_echo_n "(cached) " >&6
20503 else
20504   cat >conftest.$ac_ext <<_ACEOF
20505 /* confdefs.h.  */
20506 _ACEOF
20507 cat confdefs.h >>conftest.$ac_ext
20508 cat >>conftest.$ac_ext <<_ACEOF
20509 /* end confdefs.h.  */
20510 #include <X11/Xlib.h>
20511
20512 #include <X11/extensions/Xdbe.h>
20513 _ACEOF
20514 rm -rf conftest.$ac_objext
20515 if { (ac_try="$ac_compile"
20516 case "(($ac_try" in
20517   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20518   *) ac_try_echo=$ac_try;;
20519 esac
20520 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
20521 $as_echo "$ac_try_echo") >&5
20522   (eval "$ac_compile") 2>conftest.er1
20523   ac_status=$?
20524   grep -v '^ *+' conftest.er1 >conftest.err
20525   rm -rf conftest.er1
20526   cat conftest.err >&5
20527   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
20528   (exit $ac_status); } && {
20529          test -z "$ac_c_werror_flag" ||
20530          test ! -s conftest.err
20531        } && test -s conftest.$ac_objext; then
20532   ac_cv_header_X11_extensions_Xdbe_h=yes
20533 else
20534   $as_echo "$as_me: failed program was:" >&5
20535 sed 's/^/| /' conftest.$ac_ext >&5
20536
20537         ac_cv_header_X11_extensions_Xdbe_h=no
20538 fi
20539
20540 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
20541 fi
20542 { $as_echo "$as_me:$LINENO: result: $ac_cv_header_X11_extensions_Xdbe_h" >&5
20543 $as_echo "$ac_cv_header_X11_extensions_Xdbe_h" >&6; }
20544 if test "x$ac_cv_header_X11_extensions_Xdbe_h" = x""yes; then
20545   have_xdbe=yes
20546 fi
20547
20548
20549   CPPFLAGS="$ac_save_CPPFLAGS"
20550   if test "$have_xdbe" = yes; then
20551     cat >>confdefs.h <<\_ACEOF
20552 #define HAVE_DOUBLE_BUFFER_EXTENSION 1
20553 _ACEOF
20554
20555   fi
20556
20557 elif test "$with_xdbe" != no; then
20558   echo "error: must be yes or no: --with-xdbe-ext=$with_xshm"
20559   exit 1
20560 fi
20561
20562
20563 ###############################################################################
20564 #
20565 #       Check for the SGI XReadDisplay server extension.
20566 #
20567 #       Note: this has to be down here, rather than up with the other server
20568 #       extension tests, so that the output of `configure --help' is in the
20569 #       right order.  Arrgh!
20570 #
20571 ###############################################################################
20572
20573 have_readdisplay=no
20574 with_readdisplay_req=unspecified
20575
20576 # Check whether --with-readdisplay was given.
20577 if test "${with_readdisplay+set}" = set; then
20578   withval=$with_readdisplay; with_readdisplay="$withval"; with_readdisplay_req="$withval"
20579 else
20580   with_readdisplay=yes
20581 fi
20582
20583
20584
20585    case "$with_readdisplay" in
20586     yes) ;;
20587     no)  ;;
20588
20589     /*)
20590      { $as_echo "$as_me:$LINENO: checking for XReadDisplay headers" >&5
20591 $as_echo_n "checking for XReadDisplay headers... " >&6; }
20592      d=$with_readdisplay/include
20593      if test -d $d; then
20594        X_CFLAGS="-I$d $X_CFLAGS"
20595        { $as_echo "$as_me:$LINENO: result: $d" >&5
20596 $as_echo "$d" >&6; }
20597      else
20598        { $as_echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
20599 $as_echo "not found ($d: no such directory)" >&6; }
20600      fi
20601
20602      { $as_echo "$as_me:$LINENO: checking for XReadDisplay libs" >&5
20603 $as_echo_n "checking for XReadDisplay libs... " >&6; }
20604      d=$with_readdisplay/lib
20605      if test -d $d; then
20606        X_LIBS="-L$d $X_LIBS"
20607        { $as_echo "$as_me:$LINENO: result: $d" >&5
20608 $as_echo "$d" >&6; }
20609      else
20610        { $as_echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
20611 $as_echo "not found ($d: no such directory)" >&6; }
20612      fi
20613
20614      # replace the directory string with "yes".
20615      with_readdisplay_req="yes"
20616      with_readdisplay=$with_readdisplay_req
20617      ;;
20618
20619     *)
20620      echo ""
20621      echo "error: argument to --with-readdisplay must be \"yes\", \"no\", or a directory."
20622      echo "       If it is a directory, then \`DIR/include' will be added to"
20623      echo "       the -I list, and \`DIR/lib' will be added to the -L list."
20624      exit 1
20625      ;;
20626    esac
20627
20628
20629 if test "$with_readdisplay" = yes; then
20630
20631   ac_save_CPPFLAGS="$CPPFLAGS"
20632   if test \! -z "$includedir" ; then
20633     CPPFLAGS="$CPPFLAGS -I$includedir"
20634   fi
20635   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
20636   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
20637   { $as_echo "$as_me:$LINENO: checking for X11/extensions/readdisplay.h" >&5
20638 $as_echo_n "checking for X11/extensions/readdisplay.h... " >&6; }
20639 if test "${ac_cv_header_X11_extensions_readdisplay_h+set}" = set; then
20640   $as_echo_n "(cached) " >&6
20641 else
20642   cat >conftest.$ac_ext <<_ACEOF
20643 /* confdefs.h.  */
20644 _ACEOF
20645 cat confdefs.h >>conftest.$ac_ext
20646 cat >>conftest.$ac_ext <<_ACEOF
20647 /* end confdefs.h.  */
20648 #include <X11/Xlib.h>
20649
20650 #include <X11/extensions/readdisplay.h>
20651 _ACEOF
20652 rm -rf conftest.$ac_objext
20653 if { (ac_try="$ac_compile"
20654 case "(($ac_try" in
20655   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20656   *) ac_try_echo=$ac_try;;
20657 esac
20658 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
20659 $as_echo "$ac_try_echo") >&5
20660   (eval "$ac_compile") 2>conftest.er1
20661   ac_status=$?
20662   grep -v '^ *+' conftest.er1 >conftest.err
20663   rm -rf conftest.er1
20664   cat conftest.err >&5
20665   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
20666   (exit $ac_status); } && {
20667          test -z "$ac_c_werror_flag" ||
20668          test ! -s conftest.err
20669        } && test -s conftest.$ac_objext; then
20670   ac_cv_header_X11_extensions_readdisplay_h=yes
20671 else
20672   $as_echo "$as_me: failed program was:" >&5
20673 sed 's/^/| /' conftest.$ac_ext >&5
20674
20675         ac_cv_header_X11_extensions_readdisplay_h=no
20676 fi
20677
20678 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
20679 fi
20680 { $as_echo "$as_me:$LINENO: result: $ac_cv_header_X11_extensions_readdisplay_h" >&5
20681 $as_echo "$ac_cv_header_X11_extensions_readdisplay_h" >&6; }
20682 if test "x$ac_cv_header_X11_extensions_readdisplay_h" = x""yes; then
20683   cat >>confdefs.h <<\_ACEOF
20684 #define HAVE_READ_DISPLAY_EXTENSION 1
20685 _ACEOF
20686
20687 fi
20688
20689
20690   CPPFLAGS="$ac_save_CPPFLAGS"
20691 elif test "$with_readdisplay" != no; then
20692   echo "error: must be yes or no: --with-readdisplay=$with_readdisplay"
20693   exit 1
20694 fi
20695
20696
20697 ###############################################################################
20698 #
20699 #       Check for a directory full of images to use as the default value
20700 #       of the "imageDirectory" preference.
20701 #
20702 ###############################################################################
20703
20704 have_imagedir=no
20705 with_imagedir_req=unspecified
20706
20707
20708 # Check whether --with-image-directory was given.
20709 if test "${with_image_directory+set}" = set; then
20710   withval=$with_image_directory; with_imagedir="$withval"; with_imagedir_req="$withval"
20711 else
20712   with_imagedir=yes
20713 fi
20714
20715 # no HANDLE_X_PATH_ARG for this one
20716
20717 case "$with_imagedir" in
20718   /*)
20719     # absolute path
20720     { $as_echo "$as_me:$LINENO: checking for image directory $with_imagedir" >&5
20721 $as_echo_n "checking for image directory $with_imagedir... " >&6; }
20722     if test -d "$with_imagedir" ; then
20723       { $as_echo "$as_me:$LINENO: result: yes" >&5
20724 $as_echo "yes" >&6; }
20725     else
20726       { $as_echo "$as_me:$LINENO: result: no" >&5
20727 $as_echo "no" >&6; }
20728       with_imagedir=""
20729     fi
20730   ;;
20731   yes)
20732     with_imagedir=""
20733
20734     #### Could use some more defaults here...
20735     for dd in \
20736       "/usr/share/backgrounds/images/"          \
20737       "/usr/share/wallpapers/"                  \
20738       "/Library/Desktop Pictures/"              \
20739     ; do
20740       if test -z "$with_imagedir"; then
20741         { $as_echo "$as_me:$LINENO: checking for image directory $dd" >&5
20742 $as_echo_n "checking for image directory $dd... " >&6; }
20743         if test -d "$dd" ; then
20744           { $as_echo "$as_me:$LINENO: result: yes" >&5
20745 $as_echo "yes" >&6; }
20746           with_imagedir="$dd"
20747         else
20748           { $as_echo "$as_me:$LINENO: result: no" >&5
20749 $as_echo "no" >&6; }
20750         fi
20751       fi
20752     done
20753
20754   ;;
20755   no)
20756     with_imagedir=""
20757   ;;
20758
20759   *)
20760     echo "error: must be an absolute path: --with-image-directory=$with_imagedir_req"
20761     exit 1
20762   ;;
20763 esac
20764 ac_cv_imagedir="$with_imagedir"
20765
20766 DEFAULT_IMAGES_P='True'
20767 DEFAULT_IMAGE_DIRECTORY="$ac_cv_imagedir"
20768
20769 if test -z "$DEFAULT_IMAGE_DIRECTORY" ; then
20770   DEFAULT_IMAGES_P='False'
20771 fi
20772
20773
20774 ###############################################################################
20775 #
20776 #       Pick a text file to use as the default of the "textFile" preference.
20777 #       Any old file will do, but preferably one that will make interesting
20778 #       shapes when displayed by "starwars" and "fontglide".
20779 #
20780 ###############################################################################
20781
20782 have_textfile=no
20783 with_textfile_req=unspecified
20784
20785
20786 # Check whether --with-text-file was given.
20787 if test "${with_text_file+set}" = set; then
20788   withval=$with_text_file; with_textfile="$withval"; with_textfile_req="$withval"
20789 else
20790   with_textfile=yes
20791 fi
20792
20793 # no HANDLE_X_PATH_ARG for this one
20794
20795 case "$with_textfile" in
20796   /*)
20797     # absolute path
20798     { $as_echo "$as_me:$LINENO: checking for text file $with_textfile" >&5
20799 $as_echo_n "checking for text file $with_textfile... " >&6; }
20800     if test -f "$with_textfile" ; then
20801       { $as_echo "$as_me:$LINENO: result: yes" >&5
20802 $as_echo "yes" >&6; }
20803     else
20804       { $as_echo "$as_me:$LINENO: result: no" >&5
20805 $as_echo "no" >&6; }
20806       with_textfile=""
20807     fi
20808   ;;
20809   yes)
20810     with_textfile=""
20811
20812     #### Could use some more defaults here...
20813     for f in \
20814       "/usr/X11R6/lib/X11/doc/README"              \
20815       "/usr/share/doc/xserver-common/copyright"    \
20816       "/usr/share/doc/xserver-xorg-core/copyright" \
20817       "/usr/X11R6/README"                          \
20818       "/usr/share/doc/debian/debian-manifesto"     \
20819     ; do
20820       if test -z "$with_textfile"; then
20821         { $as_echo "$as_me:$LINENO: checking for text file $f" >&5
20822 $as_echo_n "checking for text file $f... " >&6; }
20823         if test -f "$f" ; then
20824           { $as_echo "$as_me:$LINENO: result: yes" >&5
20825 $as_echo "yes" >&6; }
20826           with_textfile="$f"
20827         else
20828           { $as_echo "$as_me:$LINENO: result: no" >&5
20829 $as_echo "no" >&6; }
20830         fi
20831       fi
20832     done
20833
20834   ;;
20835   no)
20836     with_textfile=""
20837   ;;
20838
20839   *)
20840     echo "error: must be an absolute path: --with-text-file=$with_textfile_req"
20841     exit 1
20842   ;;
20843 esac
20844 ac_cv_textfile="$with_textfile"
20845
20846 DEFAULT_TEXT_FILE="$ac_cv_textfile"
20847
20848
20849 ###############################################################################
20850 #
20851 #       Check the browser to see help URL
20852 #
20853 ###############################################################################
20854
20855 have_browser=no
20856 with_browser_req=unspecified
20857
20858
20859 # Check whether --with-browser was given.
20860 if test "${with_browser+set}" = set; then
20861   withval=$with_browser; with_browser="$withval"; with_browser_req="$withval"
20862 else
20863   with_browser=no
20864 fi
20865
20866 # no HANDLE_X_PATH_ARG for this one
20867
20868 case "$with_browser" in
20869   no )
20870   ;;
20871   * )
20872     WITH_BROWSER=$with_browser
20873     gnome_open_program=$with_browser
20874     { $as_echo "$as_me:$LINENO: checking for browser $with_browser" >&5
20875 $as_echo_n "checking for browser $with_browser... " >&6; }
20876     with_browser_fullpath=`which $with_browser 2>/dev/null`
20877     case $with_browser_fullpath in
20878          /* )
20879                 { $as_echo "$as_me:$LINENO: result: yes" >&5
20880 $as_echo "yes" >&6; }
20881                  have_browser=yes
20882                  ;;
20883         * )
20884                { $as_echo "$as_me:$LINENO: result: no" >&5
20885 $as_echo "no" >&6; }
20886 # Only warning: we don't want to install all packages for the
20887 # dependency of the browser in building stage...
20888                echo "WARNING: browser not found: --with-browser=$with_browser"
20889                ;;
20890     esac
20891   ;;
20892 esac
20893 ac_cv_browser="$with_browser"
20894
20895 ###############################################################################
20896 #
20897 #       Check whether it's ok to install some hacks as setuid (e.g., "sonar")
20898 #       This should be safe, but let's give people the option.
20899 #
20900 ###############################################################################
20901
20902 setuid_hacks_default=no
20903 setuid_hacks="$setuid_hacks_default"
20904
20905 # Check whether --with-setuid-hacks was given.
20906 if test "${with_setuid_hacks+set}" = set; then
20907   withval=$with_setuid_hacks; setuid_hacks="$withval"
20908 else
20909   setuid_hacks="$setuid_hacks_default"
20910 fi
20911
20912
20913
20914    case "$setuid_hacks" in
20915     yes) ;;
20916     no)  ;;
20917
20918     /*)
20919      { $as_echo "$as_me:$LINENO: checking for setuid hacks headers" >&5
20920 $as_echo_n "checking for setuid hacks headers... " >&6; }
20921      d=$setuid_hacks/include
20922      if test -d $d; then
20923        X_CFLAGS="-I$d $X_CFLAGS"
20924        { $as_echo "$as_me:$LINENO: result: $d" >&5
20925 $as_echo "$d" >&6; }
20926      else
20927        { $as_echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
20928 $as_echo "not found ($d: no such directory)" >&6; }
20929      fi
20930
20931      { $as_echo "$as_me:$LINENO: checking for setuid hacks libs" >&5
20932 $as_echo_n "checking for setuid hacks libs... " >&6; }
20933      d=$setuid_hacks/lib
20934      if test -d $d; then
20935        X_LIBS="-L$d $X_LIBS"
20936        { $as_echo "$as_me:$LINENO: result: $d" >&5
20937 $as_echo "$d" >&6; }
20938      else
20939        { $as_echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
20940 $as_echo "not found ($d: no such directory)" >&6; }
20941      fi
20942
20943      # replace the directory string with "yes".
20944      setuid_hacks_req="yes"
20945      setuid_hacks=$setuid_hacks_req
20946      ;;
20947
20948     *)
20949      echo ""
20950      echo "error: argument to --with-setuid-hacks must be \"yes\", \"no\", or a directory."
20951      echo "       If it is a directory, then \`DIR/include' will be added to"
20952      echo "       the -I list, and \`DIR/lib' will be added to the -L list."
20953      exit 1
20954      ;;
20955    esac
20956
20957
20958 if test "$setuid_hacks" = yes; then
20959   true
20960 elif test "$setuid_hacks" != no; then
20961   echo "error: must be yes or no: --with-setuid-hacks=$setuid_hacks"
20962   exit 1
20963 fi
20964
20965
20966 ###############################################################################
20967 #
20968 #       Done testing.  Now, set up the various -I and -L variables,
20969 #       and decide which GUI program to build by default.
20970 #
20971 ###############################################################################
20972
20973 DEPEND=makedepend
20974 DEPEND_FLAGS=
20975 DEPEND_DEFINES=
20976
20977
20978 if test \! -z "$includedir" ; then
20979   INCLUDES="$INCLUDES -I$includedir"
20980 fi
20981
20982 if test \! -z "$libdir" ; then
20983   LDFLAGS="$LDFLAGS -L$libdir"
20984 fi
20985
20986
20987 PREFERRED_DEMO_PROGRAM=''
20988 ALL_DEMO_PROGRAMS=
20989 if test "$have_motif" = yes; then
20990   PREFERRED_DEMO_PROGRAM=xscreensaver-demo-Xm
20991   ALL_DEMO_PROGRAMS="$PREFERRED_DEMO_PROGRAM $ALL_DEMO_PROGRAMS"
20992 fi
20993 if test "$have_gtk" = yes; then
20994   PREFERRED_DEMO_PROGRAM=xscreensaver-demo-Gtk
20995   ALL_DEMO_PROGRAMS="$PREFERRED_DEMO_PROGRAM $ALL_DEMO_PROGRAMS"
20996 fi
20997
20998
20999 if test "$have_kerberos" = yes; then
21000   PASSWD_SRCS="$PASSWD_SRCS \$(KERBEROS_SRCS)"
21001   PASSWD_OBJS="$PASSWD_OBJS \$(KERBEROS_OBJS)"
21002 fi
21003 if test "$have_pam" = yes; then
21004   PASSWD_SRCS="$PASSWD_SRCS \$(PAM_SRCS)"
21005   PASSWD_OBJS="$PASSWD_OBJS \$(PAM_OBJS)"
21006   INSTALL_PAM="install-pam"
21007 fi
21008 if test "$have_passwd_helper" = yes; then
21009   PASSWD_SRCS="$PASSWD_SRCS \$(PWHELPER_SRCS)"
21010   PASSWD_OBJS="$PASSWD_OBJS \$(PWHELPER_OBJS)"
21011 fi
21012   PASSWD_SRCS="$PASSWD_SRCS \$(PWENT_SRCS)"
21013   PASSWD_OBJS="$PASSWD_OBJS \$(PWENT_OBJS)"
21014
21015
21016 if test "$enable_locking" = yes; then
21017   LOCK_SRCS='$(LOCK_SRCS_1) $(PASSWD_SRCS)'
21018   LOCK_OBJS='$(LOCK_OBJS_1) $(PASSWD_OBJS)'
21019 else
21020   LOCK_SRCS='$(NOLOCK_SRCS_1)'
21021   LOCK_OBJS='$(NOLOCK_OBJS_1)'
21022 fi
21023
21024 if test "$ac_macosx" = yes; then
21025   EXES_OSX='$(EXES_OSX)'
21026   SCRIPTS_OSX='$(SCRIPTS_OSX)'
21027   MEN_OSX='$(MEN_OSX)'
21028 else
21029   EXES_OSX=
21030   SCRIPTS_OSX=
21031   MEN_OSX=
21032 fi
21033
21034
21035 INSTALL_SETUID='$(INSTALL_PROGRAM) $(SUID_FLAGS)'
21036
21037 if test "$need_setuid" = yes; then
21038   NEED_SETUID=yes
21039 else
21040   NEED_SETUID=no
21041 fi
21042
21043 if test "$setuid_hacks" = yes; then
21044   SETUID_HACKS=yes
21045 else
21046   SETUID_HACKS=no
21047 fi
21048
21049 tab='   '
21050 if test "$have_gl" = yes; then
21051   GL_EXES='$(GL_EXES)'
21052   SUID_EXES='$(SUID_EXES)'
21053   RETIRED_GL_EXES='$(RETIRED_GL_EXES)'
21054   GL_UTIL_EXES='$(GL_UTIL_EXES)'
21055   GL_MEN='$(GL_MEN)'
21056   GL_KLUDGE=" "
21057 else
21058   GL_KLUDGE="-"
21059 fi
21060
21061 if test "$have_gle" = yes; then
21062   GLE_EXES='$(GLE_EXES)'
21063   GLE_KLUDGE=" "
21064 else
21065   GLE_KLUDGE="-"
21066 fi
21067
21068 if test "$have_jpeg" = yes -a "$have_gdk_pixbuf" = yes; then
21069  JPEG_EXES='$(JPEG_EXES)'
21070 fi
21071
21072
21073 # Another substitution in the XScreenSaver.ad.in file:
21074 #
21075 if test "$gnome_open_program" != ''; then
21076   GNOME24=''
21077   GNOME22='!    '
21078   NOGNOME='!    '
21079 elif test "$gnome_url_show_program" != ''; then
21080   GNOME24='!    '
21081   GNOME22=''
21082   NOGNOME='!    '
21083 else
21084   GNOME24='!    '
21085   GNOME22='!    '
21086   NOGNOME=''
21087 fi
21088
21089
21090 # Set PO_DATADIR to something sensible.
21091 #
21092 { $as_echo "$as_me:$LINENO: checking for locale directory" >&5
21093 $as_echo_n "checking for locale directory... " >&6; }
21094 if test -n "$GTK_DATADIR" ; then
21095   PO_DATADIR="$GTK_DATADIR"
21096 elif test "$have_gtk" = yes; then
21097   PO_DATADIR=`$pkg_config --variable=prefix gtk+-2.0`
21098   PO_DATADIR="$PO_DATADIR/share"
21099 fi
21100
21101 if test -z "$PO_DATADIR" ; then
21102   #
21103   # #### Total fucking kludge --
21104   # Map /build/prefix/usr/X11R6/share/ to /build/prefix/usr/share/
21105   # but of course we need to expand all the nested variables to do that...
21106   #
21107   dd=`eval eval eval eval eval eval eval eval eval eval eval echo $datadir`
21108   PO_DATADIR=`echo $dd | sed 's@/X11R6/@/@'`
21109 fi
21110
21111 { $as_echo "$as_me:$LINENO: result: $PO_DATADIR/locale" >&5
21112 $as_echo "$PO_DATADIR/locale" >&6; }
21113
21114
21115 # canonicalize slashes.
21116 HACK_CONF_DIR=`echo "${HACK_CONF_DIR}" | sed 's@/$@@;s@//*@/@g'`
21117
21118 # gcc 3.0 likes to issue this warning for every file:
21119 #
21120 # cc1: warning: changing search order for system directory "/usr/local/include"
21121 # cc1: warning:   as it has already been specified as a non-system directory
21122 #
21123 # Yay.  We can only avoid that by deleting "-I${prefix}/include" from the list.
21124 # Which *should* be totally redundant, and thus an ok thing to delete?
21125 #
21126 INCLUDES=`echo "$INCLUDES" | sed 's@ -I${prefix}/include@@g;'`
21127
21128
21129 ###############################################################################
21130 #
21131 #       Perform substitutions and write Makefiles.
21132 #
21133 ###############################################################################
21134
21135
21136
21137
21138
21139
21140
21141
21142
21143
21144
21145
21146
21147
21148
21149
21150
21151
21152
21153
21154
21155
21156
21157
21158
21159
21160
21161
21162
21163
21164
21165
21166
21167
21168
21169
21170
21171
21172
21173
21174
21175
21176
21177
21178
21179
21180
21181
21182
21183
21184
21185
21186
21187
21188
21189
21190
21191
21192
21193
21194
21195
21196
21197
21198
21199 APPDEFAULTS=$ac_x_app_defaults
21200
21201
21202
21203
21204
21205
21206
21207 ac_config_files="$ac_config_files Makefile utils/Makefile driver/Makefile hacks/Makefile hacks/glx/Makefile po/Makefile.in driver/XScreenSaver.ad"
21208
21209 cat >confcache <<\_ACEOF
21210 # This file is a shell script that caches the results of configure
21211 # tests run on this system so they can be shared between configure
21212 # scripts and configure runs, see configure's option --config-cache.
21213 # It is not useful on other systems.  If it contains results you don't
21214 # want to keep, you may remove or edit it.
21215 #
21216 # config.status only pays attention to the cache file if you give it
21217 # the --recheck option to rerun configure.
21218 #
21219 # `ac_cv_env_foo' variables (set or unset) will be overridden when
21220 # loading this file, other *unset* `ac_cv_foo' will be assigned the
21221 # following values.
21222
21223 _ACEOF
21224
21225 # The following way of writing the cache mishandles newlines in values,
21226 # but we know of no workaround that is simple, portable, and efficient.
21227 # So, we kill variables containing newlines.
21228 # Ultrix sh set writes to stderr and can't be redirected directly,
21229 # and sets the high bit in the cache file unless we assign to the vars.
21230 (
21231   for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
21232     eval ac_val=\$$ac_var
21233     case $ac_val in #(
21234     *${as_nl}*)
21235       case $ac_var in #(
21236       *_cv_*) { $as_echo "$as_me:$LINENO: WARNING: cache variable $ac_var contains a newline" >&5
21237 $as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
21238       esac
21239       case $ac_var in #(
21240       _ | IFS | as_nl) ;; #(
21241       BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
21242       *) $as_unset $ac_var ;;
21243       esac ;;
21244     esac
21245   done
21246
21247   (set) 2>&1 |
21248     case $as_nl`(ac_space=' '; set) 2>&1` in #(
21249     *${as_nl}ac_space=\ *)
21250       # `set' does not quote correctly, so add quotes (double-quote
21251       # substitution turns \\\\ into \\, and sed turns \\ into \).
21252       sed -n \
21253         "s/'/'\\\\''/g;
21254           s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
21255       ;; #(
21256     *)
21257       # `set' quotes correctly as required by POSIX, so do not add quotes.
21258       sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
21259       ;;
21260     esac |
21261     sort
21262 ) |
21263   sed '
21264      /^ac_cv_env_/b end
21265      t clear
21266      :clear
21267      s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
21268      t end
21269      s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
21270      :end' >>confcache
21271 if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
21272   if test -w "$cache_file"; then
21273     test "x$cache_file" != "x/dev/null" &&
21274       { $as_echo "$as_me:$LINENO: updating cache $cache_file" >&5
21275 $as_echo "$as_me: updating cache $cache_file" >&6;}
21276     cat confcache >$cache_file
21277   else
21278     { $as_echo "$as_me:$LINENO: not updating unwritable cache $cache_file" >&5
21279 $as_echo "$as_me: not updating unwritable cache $cache_file" >&6;}
21280   fi
21281 fi
21282 rm -f confcache
21283
21284 test "x$prefix" = xNONE && prefix=$ac_default_prefix
21285 # Let make expand exec_prefix.
21286 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
21287
21288 DEFS=-DHAVE_CONFIG_H
21289
21290 ac_libobjs=
21291 ac_ltlibobjs=
21292 for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
21293   # 1. Remove the extension, and $U if already installed.
21294   ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
21295   ac_i=`$as_echo "$ac_i" | sed "$ac_script"`
21296   # 2. Prepend LIBOBJDIR.  When used with automake>=1.10 LIBOBJDIR
21297   #    will be set to the directory where LIBOBJS objects are built.
21298   ac_libobjs="$ac_libobjs \${LIBOBJDIR}$ac_i\$U.$ac_objext"
21299   ac_ltlibobjs="$ac_ltlibobjs \${LIBOBJDIR}$ac_i"'$U.lo'
21300 done
21301 LIBOBJS=$ac_libobjs
21302
21303 LTLIBOBJS=$ac_ltlibobjs
21304
21305
21306
21307
21308         mv -f po/POTFILES po/POTFILES.tmp
21309         sed -e 's/\[.*\] *//' < po/POTFILES.tmp > po/POTFILES
21310         rm -f po/POTFILES.tmp
21311
21312
21313
21314 : ${CONFIG_STATUS=./config.status}
21315 ac_write_fail=0
21316 ac_clean_files_save=$ac_clean_files
21317 ac_clean_files="$ac_clean_files $CONFIG_STATUS"
21318 { $as_echo "$as_me:$LINENO: creating $CONFIG_STATUS" >&5
21319 $as_echo "$as_me: creating $CONFIG_STATUS" >&6;}
21320 cat >$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
21321 #! $SHELL
21322 # Generated by $as_me.
21323 # Run this file to recreate the current configuration.
21324 # Compiler output produced by configure, useful for debugging
21325 # configure, is in config.log if it exists.
21326
21327 debug=false
21328 ac_cs_recheck=false
21329 ac_cs_silent=false
21330 SHELL=\${CONFIG_SHELL-$SHELL}
21331 _ACEOF
21332
21333 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
21334 ## --------------------- ##
21335 ## M4sh Initialization.  ##
21336 ## --------------------- ##
21337
21338 # Be more Bourne compatible
21339 DUALCASE=1; export DUALCASE # for MKS sh
21340 if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
21341   emulate sh
21342   NULLCMD=:
21343   # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
21344   # is contrary to our usage.  Disable this feature.
21345   alias -g '${1+"$@"}'='"$@"'
21346   setopt NO_GLOB_SUBST
21347 else
21348   case `(set -o) 2>/dev/null` in
21349   *posix*) set -o posix ;;
21350 esac
21351
21352 fi
21353
21354
21355
21356
21357 # PATH needs CR
21358 # Avoid depending upon Character Ranges.
21359 as_cr_letters='abcdefghijklmnopqrstuvwxyz'
21360 as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
21361 as_cr_Letters=$as_cr_letters$as_cr_LETTERS
21362 as_cr_digits='0123456789'
21363 as_cr_alnum=$as_cr_Letters$as_cr_digits
21364
21365 as_nl='
21366 '
21367 export as_nl
21368 # Printing a long string crashes Solaris 7 /usr/bin/printf.
21369 as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
21370 as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
21371 as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
21372 if (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
21373   as_echo='printf %s\n'
21374   as_echo_n='printf %s'
21375 else
21376   if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
21377     as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
21378     as_echo_n='/usr/ucb/echo -n'
21379   else
21380     as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
21381     as_echo_n_body='eval
21382       arg=$1;
21383       case $arg in
21384       *"$as_nl"*)
21385         expr "X$arg" : "X\\(.*\\)$as_nl";
21386         arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
21387       esac;
21388       expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
21389     '
21390     export as_echo_n_body
21391     as_echo_n='sh -c $as_echo_n_body as_echo'
21392   fi
21393   export as_echo_body
21394   as_echo='sh -c $as_echo_body as_echo'
21395 fi
21396
21397 # The user is always right.
21398 if test "${PATH_SEPARATOR+set}" != set; then
21399   PATH_SEPARATOR=:
21400   (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
21401     (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
21402       PATH_SEPARATOR=';'
21403   }
21404 fi
21405
21406 # Support unset when possible.
21407 if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then
21408   as_unset=unset
21409 else
21410   as_unset=false
21411 fi
21412
21413
21414 # IFS
21415 # We need space, tab and new line, in precisely that order.  Quoting is
21416 # there to prevent editors from complaining about space-tab.
21417 # (If _AS_PATH_WALK were called with IFS unset, it would disable word
21418 # splitting by setting IFS to empty value.)
21419 IFS=" ""        $as_nl"
21420
21421 # Find who we are.  Look in the path if we contain no directory separator.
21422 case $0 in
21423   *[\\/]* ) as_myself=$0 ;;
21424   *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21425 for as_dir in $PATH
21426 do
21427   IFS=$as_save_IFS
21428   test -z "$as_dir" && as_dir=.
21429   test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
21430 done
21431 IFS=$as_save_IFS
21432
21433      ;;
21434 esac
21435 # We did not find ourselves, most probably we were run as `sh COMMAND'
21436 # in which case we are not to be found in the path.
21437 if test "x$as_myself" = x; then
21438   as_myself=$0
21439 fi
21440 if test ! -f "$as_myself"; then
21441   $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
21442   { (exit 1); exit 1; }
21443 fi
21444
21445 # Work around bugs in pre-3.0 UWIN ksh.
21446 for as_var in ENV MAIL MAILPATH
21447 do ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var
21448 done
21449 PS1='$ '
21450 PS2='> '
21451 PS4='+ '
21452
21453 # NLS nuisances.
21454 LC_ALL=C
21455 export LC_ALL
21456 LANGUAGE=C
21457 export LANGUAGE
21458
21459 # Required to use basename.
21460 if expr a : '\(a\)' >/dev/null 2>&1 &&
21461    test "X`expr 00001 : '.*\(...\)'`" = X001; then
21462   as_expr=expr
21463 else
21464   as_expr=false
21465 fi
21466
21467 if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
21468   as_basename=basename
21469 else
21470   as_basename=false
21471 fi
21472
21473
21474 # Name of the executable.
21475 as_me=`$as_basename -- "$0" ||
21476 $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
21477          X"$0" : 'X\(//\)$' \| \
21478          X"$0" : 'X\(/\)' \| . 2>/dev/null ||
21479 $as_echo X/"$0" |
21480     sed '/^.*\/\([^/][^/]*\)\/*$/{
21481             s//\1/
21482             q
21483           }
21484           /^X\/\(\/\/\)$/{
21485             s//\1/
21486             q
21487           }
21488           /^X\/\(\/\).*/{
21489             s//\1/
21490             q
21491           }
21492           s/.*/./; q'`
21493
21494 # CDPATH.
21495 $as_unset CDPATH
21496
21497
21498
21499   as_lineno_1=$LINENO
21500   as_lineno_2=$LINENO
21501   test "x$as_lineno_1" != "x$as_lineno_2" &&
21502   test "x`expr $as_lineno_1 + 1`" = "x$as_lineno_2" || {
21503
21504   # Create $as_me.lineno as a copy of $as_myself, but with $LINENO
21505   # uniformly replaced by the line number.  The first 'sed' inserts a
21506   # line-number line after each line using $LINENO; the second 'sed'
21507   # does the real work.  The second script uses 'N' to pair each
21508   # line-number line with the line containing $LINENO, and appends
21509   # trailing '-' during substitution so that $LINENO is not a special
21510   # case at line end.
21511   # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the
21512   # scripts with optimization help from Paolo Bonzini.  Blame Lee
21513   # E. McMahon (1931-1989) for sed's syntax.  :-)
21514   sed -n '
21515     p
21516     /[$]LINENO/=
21517   ' <$as_myself |
21518     sed '
21519       s/[$]LINENO.*/&-/
21520       t lineno
21521       b
21522       :lineno
21523       N
21524       :loop
21525       s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/
21526       t loop
21527       s/-\n.*//
21528     ' >$as_me.lineno &&
21529   chmod +x "$as_me.lineno" ||
21530     { $as_echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2
21531    { (exit 1); exit 1; }; }
21532
21533   # Don't try to exec as it changes $[0], causing all sort of problems
21534   # (the dirname of $[0] is not the place where we might find the
21535   # original and so on.  Autoconf is especially sensitive to this).
21536   . "./$as_me.lineno"
21537   # Exit status is that of the last command.
21538   exit
21539 }
21540
21541
21542 if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
21543   as_dirname=dirname
21544 else
21545   as_dirname=false
21546 fi
21547
21548 ECHO_C= ECHO_N= ECHO_T=
21549 case `echo -n x` in
21550 -n*)
21551   case `echo 'x\c'` in
21552   *c*) ECHO_T=' ';;     # ECHO_T is single tab character.
21553   *)   ECHO_C='\c';;
21554   esac;;
21555 *)
21556   ECHO_N='-n';;
21557 esac
21558 if expr a : '\(a\)' >/dev/null 2>&1 &&
21559    test "X`expr 00001 : '.*\(...\)'`" = X001; then
21560   as_expr=expr
21561 else
21562   as_expr=false
21563 fi
21564
21565 rm -f conf$$ conf$$.exe conf$$.file
21566 if test -d conf$$.dir; then
21567   rm -f conf$$.dir/conf$$.file
21568 else
21569   rm -f conf$$.dir
21570   mkdir conf$$.dir 2>/dev/null
21571 fi
21572 if (echo >conf$$.file) 2>/dev/null; then
21573   if ln -s conf$$.file conf$$ 2>/dev/null; then
21574     as_ln_s='ln -s'
21575     # ... but there are two gotchas:
21576     # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
21577     # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
21578     # In both cases, we have to default to `cp -p'.
21579     ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
21580       as_ln_s='cp -p'
21581   elif ln conf$$.file conf$$ 2>/dev/null; then
21582     as_ln_s=ln
21583   else
21584     as_ln_s='cp -p'
21585   fi
21586 else
21587   as_ln_s='cp -p'
21588 fi
21589 rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
21590 rmdir conf$$.dir 2>/dev/null
21591
21592 if mkdir -p . 2>/dev/null; then
21593   as_mkdir_p=:
21594 else
21595   test -d ./-p && rmdir ./-p
21596   as_mkdir_p=false
21597 fi
21598
21599 if test -x / >/dev/null 2>&1; then
21600   as_test_x='test -x'
21601 else
21602   if ls -dL / >/dev/null 2>&1; then
21603     as_ls_L_option=L
21604   else
21605     as_ls_L_option=
21606   fi
21607   as_test_x='
21608     eval sh -c '\''
21609       if test -d "$1"; then
21610         test -d "$1/.";
21611       else
21612         case $1 in
21613         -*)set "./$1";;
21614         esac;
21615         case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in
21616         ???[sx]*):;;*)false;;esac;fi
21617     '\'' sh
21618   '
21619 fi
21620 as_executable_p=$as_test_x
21621
21622 # Sed expression to map a string onto a valid CPP name.
21623 as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
21624
21625 # Sed expression to map a string onto a valid variable name.
21626 as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
21627
21628
21629 exec 6>&1
21630
21631 # Save the log message, to keep $[0] and so on meaningful, and to
21632 # report actual input values of CONFIG_FILES etc. instead of their
21633 # values after options handling.
21634 ac_log="
21635 This file was extended by $as_me, which was
21636 generated by GNU Autoconf 2.63.  Invocation command line was
21637
21638   CONFIG_FILES    = $CONFIG_FILES
21639   CONFIG_HEADERS  = $CONFIG_HEADERS
21640   CONFIG_LINKS    = $CONFIG_LINKS
21641   CONFIG_COMMANDS = $CONFIG_COMMANDS
21642   $ $0 $@
21643
21644 on `(hostname || uname -n) 2>/dev/null | sed 1q`
21645 "
21646
21647 _ACEOF
21648
21649 case $ac_config_files in *"
21650 "*) set x $ac_config_files; shift; ac_config_files=$*;;
21651 esac
21652
21653 case $ac_config_headers in *"
21654 "*) set x $ac_config_headers; shift; ac_config_headers=$*;;
21655 esac
21656
21657
21658 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
21659 # Files that config.status was made for.
21660 config_files="$ac_config_files"
21661 config_headers="$ac_config_headers"
21662 config_commands="$ac_config_commands"
21663
21664 _ACEOF
21665
21666 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
21667 ac_cs_usage="\
21668 \`$as_me' instantiates files from templates according to the
21669 current configuration.
21670
21671 Usage: $0 [OPTION]... [FILE]...
21672
21673   -h, --help       print this help, then exit
21674   -V, --version    print version number and configuration settings, then exit
21675   -q, --quiet, --silent
21676                    do not print progress messages
21677   -d, --debug      don't remove temporary files
21678       --recheck    update $as_me by reconfiguring in the same conditions
21679       --file=FILE[:TEMPLATE]
21680                    instantiate the configuration file FILE
21681       --header=FILE[:TEMPLATE]
21682                    instantiate the configuration header FILE
21683
21684 Configuration files:
21685 $config_files
21686
21687 Configuration headers:
21688 $config_headers
21689
21690 Configuration commands:
21691 $config_commands
21692
21693 Report bugs to <bug-autoconf@gnu.org>."
21694
21695 _ACEOF
21696 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
21697 ac_cs_version="\\
21698 config.status
21699 configured by $0, generated by GNU Autoconf 2.63,
21700   with options \\"`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`\\"
21701
21702 Copyright (C) 2008 Free Software Foundation, Inc.
21703 This config.status script is free software; the Free Software Foundation
21704 gives unlimited permission to copy, distribute and modify it."
21705
21706 ac_pwd='$ac_pwd'
21707 srcdir='$srcdir'
21708 INSTALL='$INSTALL'
21709 test -n "\$AWK" || AWK=awk
21710 _ACEOF
21711
21712 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
21713 # The default lists apply if the user does not specify any file.
21714 ac_need_defaults=:
21715 while test $# != 0
21716 do
21717   case $1 in
21718   --*=*)
21719     ac_option=`expr "X$1" : 'X\([^=]*\)='`
21720     ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
21721     ac_shift=:
21722     ;;
21723   *)
21724     ac_option=$1
21725     ac_optarg=$2
21726     ac_shift=shift
21727     ;;
21728   esac
21729
21730   case $ac_option in
21731   # Handling of the options.
21732   -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
21733     ac_cs_recheck=: ;;
21734   --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
21735     $as_echo "$ac_cs_version"; exit ;;
21736   --debug | --debu | --deb | --de | --d | -d )
21737     debug=: ;;
21738   --file | --fil | --fi | --f )
21739     $ac_shift
21740     case $ac_optarg in
21741     *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
21742     esac
21743     CONFIG_FILES="$CONFIG_FILES '$ac_optarg'"
21744     ac_need_defaults=false;;
21745   --header | --heade | --head | --hea )
21746     $ac_shift
21747     case $ac_optarg in
21748     *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
21749     esac
21750     CONFIG_HEADERS="$CONFIG_HEADERS '$ac_optarg'"
21751     ac_need_defaults=false;;
21752   --he | --h)
21753     # Conflict between --help and --header
21754     { $as_echo "$as_me: error: ambiguous option: $1
21755 Try \`$0 --help' for more information." >&2
21756    { (exit 1); exit 1; }; };;
21757   --help | --hel | -h )
21758     $as_echo "$ac_cs_usage"; exit ;;
21759   -q | -quiet | --quiet | --quie | --qui | --qu | --q \
21760   | -silent | --silent | --silen | --sile | --sil | --si | --s)
21761     ac_cs_silent=: ;;
21762
21763   # This is an error.
21764   -*) { $as_echo "$as_me: error: unrecognized option: $1
21765 Try \`$0 --help' for more information." >&2
21766    { (exit 1); exit 1; }; } ;;
21767
21768   *) ac_config_targets="$ac_config_targets $1"
21769      ac_need_defaults=false ;;
21770
21771   esac
21772   shift
21773 done
21774
21775 ac_configure_extra_args=
21776
21777 if $ac_cs_silent; then
21778   exec 6>/dev/null
21779   ac_configure_extra_args="$ac_configure_extra_args --silent"
21780 fi
21781
21782 _ACEOF
21783 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
21784 if \$ac_cs_recheck; then
21785   set X '$SHELL' '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
21786   shift
21787   \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6
21788   CONFIG_SHELL='$SHELL'
21789   export CONFIG_SHELL
21790   exec "\$@"
21791 fi
21792
21793 _ACEOF
21794 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
21795 exec 5>>config.log
21796 {
21797   echo
21798   sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
21799 ## Running $as_me. ##
21800 _ASBOX
21801   $as_echo "$ac_log"
21802 } >&5
21803
21804 _ACEOF
21805 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
21806 #
21807 # INIT-COMMANDS
21808 #
21809 INTLTOOL_PERL=${INTLTOOL_PERL}
21810
21811
21812 _ACEOF
21813
21814 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
21815
21816 # Handling of arguments.
21817 for ac_config_target in $ac_config_targets
21818 do
21819   case $ac_config_target in
21820     "config.h") CONFIG_HEADERS="$CONFIG_HEADERS config.h" ;;
21821     "default-1") CONFIG_COMMANDS="$CONFIG_COMMANDS default-1" ;;
21822     "default-2") CONFIG_COMMANDS="$CONFIG_COMMANDS default-2" ;;
21823     "Makefile") CONFIG_FILES="$CONFIG_FILES Makefile" ;;
21824     "utils/Makefile") CONFIG_FILES="$CONFIG_FILES utils/Makefile" ;;
21825     "driver/Makefile") CONFIG_FILES="$CONFIG_FILES driver/Makefile" ;;
21826     "hacks/Makefile") CONFIG_FILES="$CONFIG_FILES hacks/Makefile" ;;
21827     "hacks/glx/Makefile") CONFIG_FILES="$CONFIG_FILES hacks/glx/Makefile" ;;
21828     "po/Makefile.in") CONFIG_FILES="$CONFIG_FILES po/Makefile.in" ;;
21829     "driver/XScreenSaver.ad") CONFIG_FILES="$CONFIG_FILES driver/XScreenSaver.ad" ;;
21830
21831   *) { { $as_echo "$as_me:$LINENO: error: invalid argument: $ac_config_target" >&5
21832 $as_echo "$as_me: error: invalid argument: $ac_config_target" >&2;}
21833    { (exit 1); exit 1; }; };;
21834   esac
21835 done
21836
21837
21838 # If the user did not use the arguments to specify the items to instantiate,
21839 # then the envvar interface is used.  Set only those that are not.
21840 # We use the long form for the default assignment because of an extremely
21841 # bizarre bug on SunOS 4.1.3.
21842 if $ac_need_defaults; then
21843   test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
21844   test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
21845   test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands
21846 fi
21847
21848 # Have a temporary directory for convenience.  Make it in the build tree
21849 # simply because there is no reason against having it here, and in addition,
21850 # creating and moving files from /tmp can sometimes cause problems.
21851 # Hook for its removal unless debugging.
21852 # Note that there is a small window in which the directory will not be cleaned:
21853 # after its creation but before its name has been assigned to `$tmp'.
21854 $debug ||
21855 {
21856   tmp=
21857   trap 'exit_status=$?
21858   { test -z "$tmp" || test ! -d "$tmp" || rm -fr "$tmp"; } && exit $exit_status
21859 ' 0
21860   trap '{ (exit 1); exit 1; }' 1 2 13 15
21861 }
21862 # Create a (secure) tmp directory for tmp files.
21863
21864 {
21865   tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
21866   test -n "$tmp" && test -d "$tmp"
21867 }  ||
21868 {
21869   tmp=./conf$$-$RANDOM
21870   (umask 077 && mkdir "$tmp")
21871 } ||
21872 {
21873    $as_echo "$as_me: cannot create a temporary directory in ." >&2
21874    { (exit 1); exit 1; }
21875 }
21876
21877 # Set up the scripts for CONFIG_FILES section.
21878 # No need to generate them if there are no CONFIG_FILES.
21879 # This happens for instance with `./config.status config.h'.
21880 if test -n "$CONFIG_FILES"; then
21881
21882
21883 ac_cr='\r'
21884 ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null`
21885 if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then
21886   ac_cs_awk_cr='\\r'
21887 else
21888   ac_cs_awk_cr=$ac_cr
21889 fi
21890
21891 echo 'BEGIN {' >"$tmp/subs1.awk" &&
21892 _ACEOF
21893
21894
21895 {
21896   echo "cat >conf$$subs.awk <<_ACEOF" &&
21897   echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' &&
21898   echo "_ACEOF"
21899 } >conf$$subs.sh ||
21900   { { $as_echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5
21901 $as_echo "$as_me: error: could not make $CONFIG_STATUS" >&2;}
21902    { (exit 1); exit 1; }; }
21903 ac_delim_num=`echo "$ac_subst_vars" | grep -c '$'`
21904 ac_delim='%!_!# '
21905 for ac_last_try in false false false false false :; do
21906   . ./conf$$subs.sh ||
21907     { { $as_echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5
21908 $as_echo "$as_me: error: could not make $CONFIG_STATUS" >&2;}
21909    { (exit 1); exit 1; }; }
21910
21911   ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X`
21912   if test $ac_delim_n = $ac_delim_num; then
21913     break
21914   elif $ac_last_try; then
21915     { { $as_echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5
21916 $as_echo "$as_me: error: could not make $CONFIG_STATUS" >&2;}
21917    { (exit 1); exit 1; }; }
21918   else
21919     ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
21920   fi
21921 done
21922 rm -f conf$$subs.sh
21923
21924 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
21925 cat >>"\$tmp/subs1.awk" <<\\_ACAWK &&
21926 _ACEOF
21927 sed -n '
21928 h
21929 s/^/S["/; s/!.*/"]=/
21930 p
21931 g
21932 s/^[^!]*!//
21933 :repl
21934 t repl
21935 s/'"$ac_delim"'$//
21936 t delim
21937 :nl
21938 h
21939 s/\(.\{148\}\).*/\1/
21940 t more1
21941 s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/
21942 p
21943 n
21944 b repl
21945 :more1
21946 s/["\\]/\\&/g; s/^/"/; s/$/"\\/
21947 p
21948 g
21949 s/.\{148\}//
21950 t nl
21951 :delim
21952 h
21953 s/\(.\{148\}\).*/\1/
21954 t more2
21955 s/["\\]/\\&/g; s/^/"/; s/$/"/
21956 p
21957 b
21958 :more2
21959 s/["\\]/\\&/g; s/^/"/; s/$/"\\/
21960 p
21961 g
21962 s/.\{148\}//
21963 t delim
21964 ' <conf$$subs.awk | sed '
21965 /^[^""]/{
21966   N
21967   s/\n//
21968 }
21969 ' >>$CONFIG_STATUS || ac_write_fail=1
21970 rm -f conf$$subs.awk
21971 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
21972 _ACAWK
21973 cat >>"\$tmp/subs1.awk" <<_ACAWK &&
21974   for (key in S) S_is_set[key] = 1
21975   FS = "\a"
21976
21977 }
21978 {
21979   line = $ 0
21980   nfields = split(line, field, "@")
21981   substed = 0
21982   len = length(field[1])
21983   for (i = 2; i < nfields; i++) {
21984     key = field[i]
21985     keylen = length(key)
21986     if (S_is_set[key]) {
21987       value = S[key]
21988       line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3)
21989       len += length(value) + length(field[++i])
21990       substed = 1
21991     } else
21992       len += 1 + keylen
21993   }
21994
21995   print line
21996 }
21997
21998 _ACAWK
21999 _ACEOF
22000 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
22001 if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then
22002   sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g"
22003 else
22004   cat
22005 fi < "$tmp/subs1.awk" > "$tmp/subs.awk" \
22006   || { { $as_echo "$as_me:$LINENO: error: could not setup config files machinery" >&5
22007 $as_echo "$as_me: error: could not setup config files machinery" >&2;}
22008    { (exit 1); exit 1; }; }
22009 _ACEOF
22010
22011 # VPATH may cause trouble with some makes, so we remove $(srcdir),
22012 # ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and
22013 # trailing colons and then remove the whole line if VPATH becomes empty
22014 # (actually we leave an empty line to preserve line numbers).
22015 if test "x$srcdir" = x.; then
22016   ac_vpsub='/^[  ]*VPATH[        ]*=/{
22017 s/:*\$(srcdir):*/:/
22018 s/:*\${srcdir}:*/:/
22019 s/:*@srcdir@:*/:/
22020 s/^\([^=]*=[     ]*\):*/\1/
22021 s/:*$//
22022 s/^[^=]*=[       ]*$//
22023 }'
22024 fi
22025
22026 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
22027 fi # test -n "$CONFIG_FILES"
22028
22029 # Set up the scripts for CONFIG_HEADERS section.
22030 # No need to generate them if there are no CONFIG_HEADERS.
22031 # This happens for instance with `./config.status Makefile'.
22032 if test -n "$CONFIG_HEADERS"; then
22033 cat >"$tmp/defines.awk" <<\_ACAWK ||
22034 BEGIN {
22035 _ACEOF
22036
22037 # Transform confdefs.h into an awk script `defines.awk', embedded as
22038 # here-document in config.status, that substitutes the proper values into
22039 # config.h.in to produce config.h.
22040
22041 # Create a delimiter string that does not exist in confdefs.h, to ease
22042 # handling of long lines.
22043 ac_delim='%!_!# '
22044 for ac_last_try in false false :; do
22045   ac_t=`sed -n "/$ac_delim/p" confdefs.h`
22046   if test -z "$ac_t"; then
22047     break
22048   elif $ac_last_try; then
22049     { { $as_echo "$as_me:$LINENO: error: could not make $CONFIG_HEADERS" >&5
22050 $as_echo "$as_me: error: could not make $CONFIG_HEADERS" >&2;}
22051    { (exit 1); exit 1; }; }
22052   else
22053     ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
22054   fi
22055 done
22056
22057 # For the awk script, D is an array of macro values keyed by name,
22058 # likewise P contains macro parameters if any.  Preserve backslash
22059 # newline sequences.
22060
22061 ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]*
22062 sed -n '
22063 s/.\{148\}/&'"$ac_delim"'/g
22064 t rset
22065 :rset
22066 s/^[     ]*#[    ]*define[       ][      ]*/ /
22067 t def
22068 d
22069 :def
22070 s/\\$//
22071 t bsnl
22072 s/["\\]/\\&/g
22073 s/^ \('"$ac_word_re"'\)\(([^()]*)\)[     ]*\(.*\)/P["\1"]="\2"\
22074 D["\1"]=" \3"/p
22075 s/^ \('"$ac_word_re"'\)[         ]*\(.*\)/D["\1"]=" \2"/p
22076 d
22077 :bsnl
22078 s/["\\]/\\&/g
22079 s/^ \('"$ac_word_re"'\)\(([^()]*)\)[     ]*\(.*\)/P["\1"]="\2"\
22080 D["\1"]=" \3\\\\\\n"\\/p
22081 t cont
22082 s/^ \('"$ac_word_re"'\)[         ]*\(.*\)/D["\1"]=" \2\\\\\\n"\\/p
22083 t cont
22084 d
22085 :cont
22086 n
22087 s/.\{148\}/&'"$ac_delim"'/g
22088 t clear
22089 :clear
22090 s/\\$//
22091 t bsnlc
22092 s/["\\]/\\&/g; s/^/"/; s/$/"/p
22093 d
22094 :bsnlc
22095 s/["\\]/\\&/g; s/^/"/; s/$/\\\\\\n"\\/p
22096 b cont
22097 ' <confdefs.h | sed '
22098 s/'"$ac_delim"'/"\\\
22099 "/g' >>$CONFIG_STATUS || ac_write_fail=1
22100
22101 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
22102   for (key in D) D_is_set[key] = 1
22103   FS = "\a"
22104 }
22105 /^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\$)/ {
22106   line = \$ 0
22107   split(line, arg, " ")
22108   if (arg[1] == "#") {
22109     defundef = arg[2]
22110     mac1 = arg[3]
22111   } else {
22112     defundef = substr(arg[1], 2)
22113     mac1 = arg[2]
22114   }
22115   split(mac1, mac2, "(") #)
22116   macro = mac2[1]
22117   prefix = substr(line, 1, index(line, defundef) - 1)
22118   if (D_is_set[macro]) {
22119     # Preserve the white space surrounding the "#".
22120     print prefix "define", macro P[macro] D[macro]
22121     next
22122   } else {
22123     # Replace #undef with comments.  This is necessary, for example,
22124     # in the case of _POSIX_SOURCE, which is predefined and required
22125     # on some systems where configure will not decide to define it.
22126     if (defundef == "undef") {
22127       print "/*", prefix defundef, macro, "*/"
22128       next
22129     }
22130   }
22131 }
22132 { print }
22133 _ACAWK
22134 _ACEOF
22135 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
22136   { { $as_echo "$as_me:$LINENO: error: could not setup config headers machinery" >&5
22137 $as_echo "$as_me: error: could not setup config headers machinery" >&2;}
22138    { (exit 1); exit 1; }; }
22139 fi # test -n "$CONFIG_HEADERS"
22140
22141
22142 eval set X "  :F $CONFIG_FILES  :H $CONFIG_HEADERS    :C $CONFIG_COMMANDS"
22143 shift
22144 for ac_tag
22145 do
22146   case $ac_tag in
22147   :[FHLC]) ac_mode=$ac_tag; continue;;
22148   esac
22149   case $ac_mode$ac_tag in
22150   :[FHL]*:*);;
22151   :L* | :C*:*) { { $as_echo "$as_me:$LINENO: error: invalid tag $ac_tag" >&5
22152 $as_echo "$as_me: error: invalid tag $ac_tag" >&2;}
22153    { (exit 1); exit 1; }; };;
22154   :[FH]-) ac_tag=-:-;;
22155   :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
22156   esac
22157   ac_save_IFS=$IFS
22158   IFS=:
22159   set x $ac_tag
22160   IFS=$ac_save_IFS
22161   shift
22162   ac_file=$1
22163   shift
22164
22165   case $ac_mode in
22166   :L) ac_source=$1;;
22167   :[FH])
22168     ac_file_inputs=
22169     for ac_f
22170     do
22171       case $ac_f in
22172       -) ac_f="$tmp/stdin";;
22173       *) # Look for the file first in the build tree, then in the source tree
22174          # (if the path is not absolute).  The absolute path cannot be DOS-style,
22175          # because $ac_f cannot contain `:'.
22176          test -f "$ac_f" ||
22177            case $ac_f in
22178            [\\/$]*) false;;
22179            *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
22180            esac ||
22181            { { $as_echo "$as_me:$LINENO: error: cannot find input file: $ac_f" >&5
22182 $as_echo "$as_me: error: cannot find input file: $ac_f" >&2;}
22183    { (exit 1); exit 1; }; };;
22184       esac
22185       case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
22186       ac_file_inputs="$ac_file_inputs '$ac_f'"
22187     done
22188
22189     # Let's still pretend it is `configure' which instantiates (i.e., don't
22190     # use $as_me), people would be surprised to read:
22191     #    /* config.h.  Generated by config.status.  */
22192     configure_input='Generated from '`
22193           $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g'
22194         `' by configure.'
22195     if test x"$ac_file" != x-; then
22196       configure_input="$ac_file.  $configure_input"
22197       { $as_echo "$as_me:$LINENO: creating $ac_file" >&5
22198 $as_echo "$as_me: creating $ac_file" >&6;}
22199     fi
22200     # Neutralize special characters interpreted by sed in replacement strings.
22201     case $configure_input in #(
22202     *\&* | *\|* | *\\* )
22203        ac_sed_conf_input=`$as_echo "$configure_input" |
22204        sed 's/[\\\\&|]/\\\\&/g'`;; #(
22205     *) ac_sed_conf_input=$configure_input;;
22206     esac
22207
22208     case $ac_tag in
22209     *:-:* | *:-) cat >"$tmp/stdin" \
22210       || { { $as_echo "$as_me:$LINENO: error: could not create $ac_file" >&5
22211 $as_echo "$as_me: error: could not create $ac_file" >&2;}
22212    { (exit 1); exit 1; }; } ;;
22213     esac
22214     ;;
22215   esac
22216
22217   ac_dir=`$as_dirname -- "$ac_file" ||
22218 $as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
22219          X"$ac_file" : 'X\(//\)[^/]' \| \
22220          X"$ac_file" : 'X\(//\)$' \| \
22221          X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
22222 $as_echo X"$ac_file" |
22223     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
22224             s//\1/
22225             q
22226           }
22227           /^X\(\/\/\)[^/].*/{
22228             s//\1/
22229             q
22230           }
22231           /^X\(\/\/\)$/{
22232             s//\1/
22233             q
22234           }
22235           /^X\(\/\).*/{
22236             s//\1/
22237             q
22238           }
22239           s/.*/./; q'`
22240   { as_dir="$ac_dir"
22241   case $as_dir in #(
22242   -*) as_dir=./$as_dir;;
22243   esac
22244   test -d "$as_dir" || { $as_mkdir_p && mkdir -p "$as_dir"; } || {
22245     as_dirs=
22246     while :; do
22247       case $as_dir in #(
22248       *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
22249       *) as_qdir=$as_dir;;
22250       esac
22251       as_dirs="'$as_qdir' $as_dirs"
22252       as_dir=`$as_dirname -- "$as_dir" ||
22253 $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
22254          X"$as_dir" : 'X\(//\)[^/]' \| \
22255          X"$as_dir" : 'X\(//\)$' \| \
22256          X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
22257 $as_echo X"$as_dir" |
22258     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
22259             s//\1/
22260             q
22261           }
22262           /^X\(\/\/\)[^/].*/{
22263             s//\1/
22264             q
22265           }
22266           /^X\(\/\/\)$/{
22267             s//\1/
22268             q
22269           }
22270           /^X\(\/\).*/{
22271             s//\1/
22272             q
22273           }
22274           s/.*/./; q'`
22275       test -d "$as_dir" && break
22276     done
22277     test -z "$as_dirs" || eval "mkdir $as_dirs"
22278   } || test -d "$as_dir" || { { $as_echo "$as_me:$LINENO: error: cannot create directory $as_dir" >&5
22279 $as_echo "$as_me: error: cannot create directory $as_dir" >&2;}
22280    { (exit 1); exit 1; }; }; }
22281   ac_builddir=.
22282
22283 case "$ac_dir" in
22284 .) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
22285 *)
22286   ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
22287   # A ".." for each directory in $ac_dir_suffix.
22288   ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
22289   case $ac_top_builddir_sub in
22290   "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
22291   *)  ac_top_build_prefix=$ac_top_builddir_sub/ ;;
22292   esac ;;
22293 esac
22294 ac_abs_top_builddir=$ac_pwd
22295 ac_abs_builddir=$ac_pwd$ac_dir_suffix
22296 # for backward compatibility:
22297 ac_top_builddir=$ac_top_build_prefix
22298
22299 case $srcdir in
22300   .)  # We are building in place.
22301     ac_srcdir=.
22302     ac_top_srcdir=$ac_top_builddir_sub
22303     ac_abs_top_srcdir=$ac_pwd ;;
22304   [\\/]* | ?:[\\/]* )  # Absolute name.
22305     ac_srcdir=$srcdir$ac_dir_suffix;
22306     ac_top_srcdir=$srcdir
22307     ac_abs_top_srcdir=$srcdir ;;
22308   *) # Relative name.
22309     ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
22310     ac_top_srcdir=$ac_top_build_prefix$srcdir
22311     ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
22312 esac
22313 ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
22314
22315
22316   case $ac_mode in
22317   :F)
22318   #
22319   # CONFIG_FILE
22320   #
22321
22322   case $INSTALL in
22323   [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
22324   *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;;
22325   esac
22326 _ACEOF
22327
22328 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
22329 # If the template does not know about datarootdir, expand it.
22330 # FIXME: This hack should be removed a few years after 2.60.
22331 ac_datarootdir_hack=; ac_datarootdir_seen=
22332
22333 ac_sed_dataroot='
22334 /datarootdir/ {
22335   p
22336   q
22337 }
22338 /@datadir@/p
22339 /@docdir@/p
22340 /@infodir@/p
22341 /@localedir@/p
22342 /@mandir@/p
22343 '
22344 case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in
22345 *datarootdir*) ac_datarootdir_seen=yes;;
22346 *@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
22347   { $as_echo "$as_me:$LINENO: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
22348 $as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
22349 _ACEOF
22350 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
22351   ac_datarootdir_hack='
22352   s&@datadir@&$datadir&g
22353   s&@docdir@&$docdir&g
22354   s&@infodir@&$infodir&g
22355   s&@localedir@&$localedir&g
22356   s&@mandir@&$mandir&g
22357     s&\\\${datarootdir}&$datarootdir&g' ;;
22358 esac
22359 _ACEOF
22360
22361 # Neutralize VPATH when `$srcdir' = `.'.
22362 # Shell code in configure.ac might set extrasub.
22363 # FIXME: do we really want to maintain this feature?
22364 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
22365 ac_sed_extra="$ac_vpsub
22366 $extrasub
22367 _ACEOF
22368 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
22369 :t
22370 /@[a-zA-Z_][a-zA-Z_0-9]*@/!b
22371 s|@configure_input@|$ac_sed_conf_input|;t t
22372 s&@top_builddir@&$ac_top_builddir_sub&;t t
22373 s&@top_build_prefix@&$ac_top_build_prefix&;t t
22374 s&@srcdir@&$ac_srcdir&;t t
22375 s&@abs_srcdir@&$ac_abs_srcdir&;t t
22376 s&@top_srcdir@&$ac_top_srcdir&;t t
22377 s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
22378 s&@builddir@&$ac_builddir&;t t
22379 s&@abs_builddir@&$ac_abs_builddir&;t t
22380 s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
22381 s&@INSTALL@&$ac_INSTALL&;t t
22382 $ac_datarootdir_hack
22383 "
22384 eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$tmp/subs.awk" >$tmp/out \
22385   || { { $as_echo "$as_me:$LINENO: error: could not create $ac_file" >&5
22386 $as_echo "$as_me: error: could not create $ac_file" >&2;}
22387    { (exit 1); exit 1; }; }
22388
22389 test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
22390   { ac_out=`sed -n '/\${datarootdir}/p' "$tmp/out"`; test -n "$ac_out"; } &&
22391   { ac_out=`sed -n '/^[  ]*datarootdir[  ]*:*=/p' "$tmp/out"`; test -z "$ac_out"; } &&
22392   { $as_echo "$as_me:$LINENO: WARNING: $ac_file contains a reference to the variable \`datarootdir'
22393 which seems to be undefined.  Please make sure it is defined." >&5
22394 $as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
22395 which seems to be undefined.  Please make sure it is defined." >&2;}
22396
22397   rm -f "$tmp/stdin"
22398   case $ac_file in
22399   -) cat "$tmp/out" && rm -f "$tmp/out";;
22400   *) rm -f "$ac_file" && mv "$tmp/out" "$ac_file";;
22401   esac \
22402   || { { $as_echo "$as_me:$LINENO: error: could not create $ac_file" >&5
22403 $as_echo "$as_me: error: could not create $ac_file" >&2;}
22404    { (exit 1); exit 1; }; }
22405  ;;
22406   :H)
22407   #
22408   # CONFIG_HEADER
22409   #
22410   if test x"$ac_file" != x-; then
22411     {
22412       $as_echo "/* $configure_input  */" \
22413       && eval '$AWK -f "$tmp/defines.awk"' "$ac_file_inputs"
22414     } >"$tmp/config.h" \
22415       || { { $as_echo "$as_me:$LINENO: error: could not create $ac_file" >&5
22416 $as_echo "$as_me: error: could not create $ac_file" >&2;}
22417    { (exit 1); exit 1; }; }
22418     if diff "$ac_file" "$tmp/config.h" >/dev/null 2>&1; then
22419       { $as_echo "$as_me:$LINENO: $ac_file is unchanged" >&5
22420 $as_echo "$as_me: $ac_file is unchanged" >&6;}
22421     else
22422       rm -f "$ac_file"
22423       mv "$tmp/config.h" "$ac_file" \
22424         || { { $as_echo "$as_me:$LINENO: error: could not create $ac_file" >&5
22425 $as_echo "$as_me: error: could not create $ac_file" >&2;}
22426    { (exit 1); exit 1; }; }
22427     fi
22428   else
22429     $as_echo "/* $configure_input  */" \
22430       && eval '$AWK -f "$tmp/defines.awk"' "$ac_file_inputs" \
22431       || { { $as_echo "$as_me:$LINENO: error: could not create -" >&5
22432 $as_echo "$as_me: error: could not create -" >&2;}
22433    { (exit 1); exit 1; }; }
22434   fi
22435  ;;
22436
22437   :C)  { $as_echo "$as_me:$LINENO: executing $ac_file commands" >&5
22438 $as_echo "$as_me: executing $ac_file commands" >&6;}
22439  ;;
22440   esac
22441
22442
22443   case $ac_file$ac_mode in
22444     "default-1":C)
22445
22446 sed -e "s:@INTLTOOL_PERL@:${INTLTOOL_PERL}:;" < ${srcdir}/intltool-extract.in > intltool-extract.out
22447 if cmp -s intltool-extract intltool-extract.out 2>/dev/null; then
22448   rm -f intltool-extract.out
22449 else
22450   mv -f intltool-extract.out intltool-extract
22451 fi
22452 chmod ugo+x intltool-extract
22453 chmod u+w intltool-extract
22454
22455 sed -e "s:@INTLTOOL_PERL@:${INTLTOOL_PERL}:;" < ${srcdir}/intltool-merge.in > intltool-merge.out
22456 if cmp -s intltool-merge intltool-merge.out 2>/dev/null; then
22457   rm -f intltool-merge.out
22458 else
22459   mv -f intltool-merge.out intltool-merge
22460 fi
22461 chmod ugo+x intltool-merge
22462 chmod u+w intltool-merge
22463
22464 sed -e "s:@INTLTOOL_PERL@:${INTLTOOL_PERL}:;" < ${srcdir}/intltool-update.in > intltool-update.out
22465 if cmp -s intltool-update intltool-update.out 2>/dev/null; then
22466   rm -f intltool-update.out
22467 else
22468   mv -f intltool-update.out intltool-update
22469 fi
22470 chmod ugo+x intltool-update
22471 chmod u+w intltool-update
22472
22473  ;;
22474     "default-2":C) case "$CONFIG_FILES" in *po/Makefile.in*)
22475         rm -f po/stamp-it po/stamp-it.tmp
22476         > po/stamp-it.tmp
22477         sed -e "/POTFILES =/r po/POTFILES" po/Makefile.in > po/Makefile
22478         mv po/stamp-it.tmp po/stamp-it
22479       esac ;;
22480
22481   esac
22482 done # for ac_tag
22483
22484
22485 { (exit 0); exit 0; }
22486 _ACEOF
22487 chmod +x $CONFIG_STATUS
22488 ac_clean_files=$ac_clean_files_save
22489
22490 test $ac_write_fail = 0 ||
22491   { { $as_echo "$as_me:$LINENO: error: write failure creating $CONFIG_STATUS" >&5
22492 $as_echo "$as_me: error: write failure creating $CONFIG_STATUS" >&2;}
22493    { (exit 1); exit 1; }; }
22494
22495
22496 # configure is writing to config.log, and then calls config.status.
22497 # config.status does its own redirection, appending to config.log.
22498 # Unfortunately, on DOS this fails, as config.log is still kept open
22499 # by configure, so config.status won't be able to write to it; its
22500 # output is simply discarded.  So we exec the FD to /dev/null,
22501 # effectively closing config.log, so it can be properly (re)opened and
22502 # appended to by config.status.  When coming back to configure, we
22503 # need to make the FD available again.
22504 if test "$no_create" != yes; then
22505   ac_cs_success=:
22506   ac_config_status_args=
22507   test "$silent" = yes &&
22508     ac_config_status_args="$ac_config_status_args --quiet"
22509   exec 5>/dev/null
22510   $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
22511   exec 5>>config.log
22512   # Use ||, not &&, to avoid exiting from the if with $? = 1, which
22513   # would make configure fail if this is the last instruction.
22514   $ac_cs_success || { (exit 1); exit 1; }
22515 fi
22516 if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
22517   { $as_echo "$as_me:$LINENO: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
22518 $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}
22519 fi
22520
22521
22522 ###############################################################################
22523 #
22524 #       Print some warnings at the end.
22525 #
22526 ###############################################################################
22527
22528 warn_prefix_1="    Warning:"
22529 warn_prefix_2="       Note:"
22530 warn_prefix="$warn_prefix_1"
22531
22532 warning=no
22533 warnsep='    #################################################################'
22534
22535 warnpre() {
22536   if test "$warning" = no ; then
22537     echo '' ; echo "$warnsep" ; echo ''
22538     warning=yes
22539   fi
22540 }
22541
22542 warn() {
22543   warnpre
22544   if test "$warning" = long ; then echo '' ; fi
22545   warning=yes
22546   rest="$@"
22547   echo "$warn_prefix $rest"
22548 }
22549
22550 warnL() {
22551   was=$warning
22552   warnpre
22553   warning=yes
22554   if test "$was" != no ; then echo '' ; fi
22555   rest="$@"
22556   echo "$warn_prefix $rest"
22557 }
22558
22559 warn2() {
22560   rest="$@"
22561   echo "             $rest"
22562   warning=long
22563 }
22564
22565 note() {
22566   warn_prefix="$warn_prefix_2"
22567   warn $@
22568   warn_prefix="$warn_prefix_1"
22569 }
22570
22571 noteL() {
22572   warn_prefix="$warn_prefix_2"
22573   warnL $@
22574   warn_prefix="$warn_prefix_1"
22575 }
22576
22577
22578 if test "$with_sgi_req" = yes -a "$have_sgi" = no ; then
22579   warn 'The SGI saver extension was requested, but was not found.'
22580 fi
22581
22582 if test "$with_xidle_req" = yes -a "$have_xidle" = no ; then
22583   warn 'The XIdle extension was requested, but was not found.'
22584 fi
22585
22586 if test "$with_xshm_req" = yes -a "$have_xshm" = no ; then
22587   warn 'The XSHM extension was requested, but was not found.'
22588 fi
22589
22590 if test "$with_xdbe_req" = yes -a "$have_xdbe" = no ; then
22591   warn 'The DOUBLE-BUFFER extension was requested, but was not found.'
22592 fi
22593
22594 if test "$with_sgivc_req" = yes -a "$have_sgivc" = no ; then
22595   warn 'The SGI-VIDEO-CONTROL extension was requested, but was not found.'
22596 fi
22597
22598 if test "$with_dpms_req" = yes -a "$have_dpms" = no ; then
22599   warn 'The DPMS extension was requested, but was not found.'
22600 fi
22601
22602 if test "$with_xinerama_req" = yes -a "$have_xinerama" = no ; then
22603   warn 'The Xinerama extension was requested, but was not found.'
22604 fi
22605
22606 if test "$with_xf86vmode_req" = yes -a "$have_xf86vmode" = no ; then
22607   warn 'The XF86VMODE extension was requested, but was not found.'
22608 fi
22609
22610 if test "$with_randr_req" = yes -a "$have_randr" = no ; then
22611   warn 'The RANDR extension was requested, but was not found.'
22612 fi
22613
22614 if test "$with_proc_interrupts_req" = yes -a "$have_proc_interrupts" = no; then
22615   warn "Checking of /proc/interrupts was requested, but it's bogus."
22616 fi
22617
22618 if test "$pkg_config" = false ; then
22619   warnL 'The "pkg-config" program was not found.  Without that,'
22620   warn2 "detection of the various GTK libraries won't work."
22621 else
22622   pkgerr=`$pkg_config --list-all 2>&1 >/dev/null`
22623   if test "x$pkgerr" != "x" ; then
22624     warnL 'The "pkg-config" program produces errors.  This often causes'
22625     warn2 "detection of the various GTK libraries to malfunction."
22626     warn2 "The errors are:"
22627     echo ''
22628     echo "$pkgerr" | sed 's/^/             > /g'
22629   fi
22630 fi
22631
22632 if test "$gtk_halfassed" != no ; then
22633   warnL "GTK version $gtk_halfassed was found, but at least one supporting"
22634   warn2 "library ($gtk_halfassed_lib) was not, so GTK can't be used."
22635   warn2 "Perhaps some of the development packages are not installed?"
22636   if test "$have_gtk" = yes ; then
22637     v="$ac_gtk_version_string"
22638     warn2 "GTK $v is also installed, so it will be used instead."
22639     warn2 "Please read the above output and the \`config.log' file"
22640     warn2 "for more details."
22641   fi
22642 fi
22643
22644 motif_warn2() {
22645   warn2 'Though the Motif front-end to xscreensaver is still'
22646   warn2 'maintained, it is no longer being updated with new'
22647   warn2 'features: all new development on the xscreensaver-demo'
22648   warn2 'program is happening in the GTK version, and not in the'
22649   warn2 'Motif version.  It is recommended that you build against'
22650   warn2 'GTK instead of Motif.  See <http://www.gtk.org/>.'
22651 }
22652
22653 if test "$have_motif" = no -a "$have_gtk" = no; then
22654
22655   if test "$with_motif" = yes; then
22656     warnL "Neither the GTK nor Motif libraries were found; the"
22657     warn2 "\`xscreensaver-demo' program requires one of these."
22658     echo ''
22659     motif_warn2
22660   else
22661     warnL "The GTK libraries do not seem to be available; the"
22662     warn2 "\`xscreensaver-demo' program requires them."
22663 #   echo ''
22664 #   warn2 'You can use Motif or Lesstif instead of GTK (use the'
22665 #   warn2 "\`--with-motif' option) but that is NOT recommended."
22666 #   motif_warn2
22667   fi
22668
22669 elif test "$with_motif_req" = yes -a "$have_motif" = no ; then
22670   warnL "Use of Motif was requested, but it wasn't found;"
22671   warn2 "Gtk will be used instead."
22672
22673 elif test "$jurassic_gtk" = yes ; then
22674
22675   pref_gtk=2.0
22676
22677   v="$ac_gtk_version_string"
22678   if test "$with_gtk_req" = yes -a "$ac_gtk_version" = "unknown" ; then
22679     warnL "Use of Gtk was requested, but its version number is unknown;"
22680   elif test "$with_gtk_req" = yes ; then
22681     warnL "Use of Gtk was requested, but it is version $v;"
22682   else
22683     warnL "Gtk was found on this system, but it is version $v;"
22684   fi
22685
22686   warn2 "Gtk $pref_gtk or newer is required."
22687
22688 elif test "$with_gtk_req" = yes -a "$have_gtk" = no ; then
22689   warnL "Use of Gtk was requested, but it wasn't found."
22690 fi
22691
22692
22693 if test "$have_gtk" = yes -a "$have_gdk_pixbuf" = no ; then
22694   warn  "GTK is being used, but the GDK-Pixbuf library and/or"
22695   warn2 "headers were not found.  That can't be good.  Please"
22696   warn2 "install the GDK-Pixbuf development kit and re-configure."
22697 fi
22698
22699 if test "$have_motif" = yes -a "$have_lesstif" = yes ; then
22700
22701   preferred_lesstif=0.92
22702
22703   if test "$lesstif_version" = unknown; then
22704     warnL "Unable to determine the LessTif version number!"
22705     warn2 "Make sure you are using version $preferred_lesstif or newer."
22706     warn2 "See <http://www.lesstif.org/>."
22707
22708   elif test \! $lesstif_version -gt 82; then
22709     warnL "LessTif version $lesstif_version_string is being used."
22710     warn2 "LessTif versions 0.82 and earlier are too buggy to"
22711     warn2 "use with XScreenSaver; it is strongly recommended"
22712     warn2 "that you upgrade to at least version $preferred_lesstif!"
22713     warn2 "See <http://www.lesstif.org/>."
22714   fi
22715 fi
22716
22717
22718 if test "$have_motif" = yes -a "$have_gtk" = no ; then
22719   warn  'Motif is being used, and GTK is not.'
22720   echo  ''
22721   motif_warn2
22722 fi
22723
22724
22725 if test "$with_xpm_req" = yes -a "$have_xpm" = no; then
22726   warnL 'Use of XPM was requested, but it was not found.'
22727 fi
22728
22729 if test "$with_gdk_pixbuf_req" = yes  -a "$have_gdk_pixbuf" = no; then
22730   warnL 'Use of GDK-Pixbuf was requested, but it was not found.'
22731 fi
22732
22733 if test "$have_gdk_pixbuf" = no -o "$gdk_pixbuf_halfassed" = yes || \
22734    test "$have_gdk_pixbuf" = no -a "$have_xpm" = no ; then
22735
22736   if test "$with_gdk_pixbuf_req" = yes ; then
22737     true
22738   elif test "$with_gdk_pixbuf_req" = no ; then
22739     warnL 'The GDK-Pixbuf library is not being used.'
22740   else
22741     warnL 'The GDK-Pixbuf library was not found.'
22742   fi
22743
22744   if test "$with_xpm_req" = yes -o "$have_xpm" = yes ; then
22745     true
22746   elif test "$with_xpm_req" = no ; then
22747     warnL 'The XPM library is not being used.'
22748   else
22749     warnL 'The XPM library was not found.'
22750   fi
22751
22752   if test "$have_gdk_pixbuf" = no -a "$have_xpm" = yes ; then
22753     warn2 'The XPM library is being used instead.'
22754   fi
22755
22756   if test "$gdk_pixbuf_halfassed" = yes ; then
22757     echo ''
22758     warn2 'More specifically, we found the headers, but not the'
22759     warn2 'libraries; so either GDK-Pixbuf is half-installed on this'
22760     warn2 "system, or something else went wrong.  The \`config.log'"
22761     warn2 'file might contain some clues.'
22762   fi
22763
22764   echo ''
22765   warn2 'Some of the demos will not use images as much as they could.'
22766   warn2 'You should consider installing GDK-Pixbuf and re-running'
22767   warn2 'configure.  (GDK-Pixbuf is recommended over XPM, as it'
22768   warn2 'provides support for more image formats.)'
22769 fi
22770
22771
22772 if test "$have_jpeg" = no ; then
22773   if test "$with_jpeg_req" = yes ; then
22774     warnL 'Use of libjpeg was requested, but it was not found.'
22775   elif test "$with_jpeg_req" = no ; then
22776     noteL 'The JPEG library is not being used.'
22777   else
22778     noteL 'The JPEG library was not found.'
22779   fi
22780
22781   if test "$jpeg_halfassed" = yes ; then
22782     echo ''
22783     warn2 'More specifically, we found the headers, but not the'
22784     warn2 'library; so either JPEG is half-installed on this'
22785     warn2 "system, or something else went wrong.  The \`config.log'"
22786     warn2 'file might contain some clues.'
22787     echo ''
22788   fi
22789
22790   if test "$have_gdk_pixbuf" = no ; then
22791     warn2 "This means that it won't be possible for the image-manipulating"
22792     warn2 "display modes to load files from disk; and it also means that"
22793     warn2 "the \`webcollage' program will be much slower."
22794   else
22795     warn2 "This means the \`webcollage' program will be much slower."
22796   fi
22797 fi
22798
22799
22800 if test "$have_gl" = yes -a "$ac_have_mesa_gl" = yes ; then
22801   preferred_mesagl=3.4
22802   mgv="$ac_mesagl_version_string"
22803   pgl="$preferred_mesagl"
22804
22805   if test "$ac_mesagl_version" = unknown; then
22806     true
22807     # warnL "Unable to determine the MesaGL version number!"
22808     # warn2 "Make sure you are using version $preferred_mesagl or newer."
22809
22810   elif test \! "$ac_mesagl_version" -gt 2006; then
22811     warnL "MesaGL version number is $mgv --"
22812     warn2 "MesaGL 2.6 and earlier have a security bug.  It is strongly"
22813     warn2 "recommended that you upgrade to at least version $preferred_mesagl."
22814
22815   elif test \! "$ac_mesagl_version" -gt 3003; then
22816     warnL "MesaGL version number is $mgv --"
22817     warn2 "MesaGL 3.3 and earlier have some bugs; it is recommended"
22818     warn2 "that you upgrade to $pgl or newer."
22819   fi
22820 fi
22821
22822 if test "$have_gl" = no ; then
22823   if test "$with_gl_req" = yes ; then
22824     warnL 'Use of GL was requested, but it was not found.'
22825   elif test "$with_gl_req" = no ; then
22826     noteL 'The OpenGL 3D library is not being used.'
22827   else
22828     noteL 'The OpenGL 3D library was not found.'
22829   fi
22830
22831   if test "$gl_halfassed" = yes ; then
22832     echo ''
22833     warn2 'More specifically, we found the headers, but not the'
22834     warn2 'libraries; so either GL is half-installed on this'
22835     warn2 "system, or something else went wrong.  The \`config.log'"
22836     warn2 'file might contain some clues.'
22837   fi
22838
22839   echo ''
22840   warn2 'Those demos which use 3D will not be built or installed.'
22841   warn2 'You might want to consider installing OpenGL and'
22842   warn2 "re-running configure.  If your vendor doesn't ship"
22843   warn2 'their own implementation of OpenGL, you can get a free'
22844   warn2 'version at <http://www.mesa3d.org/>.  For general OpenGL'
22845   warn2 'info, see <http://www.opengl.org/>.'
22846
22847 fi
22848
22849
22850 if test "$have_gl" = yes -a "$have_gle" = no ; then
22851
22852  # nobody cares about this; don't print the warning unless it was
22853  # requested and not found, or halfway-found.
22854  if test "$with_gle_req" = yes -o "$gle_halfassed" = yes ; then
22855
22856   if test "$with_gle_req" = yes ; then
22857     noteL 'Use of the GLE (GL Extrusion) library was requested, but'
22858     warn2 'it was not found (though the OpenGL library was found, and'
22859     warn2 'is being used.)'
22860   elif test "$with_gle_req" = no ; then
22861     noteL 'The OpenGL Library is being used, but the GLE (GL Extrusion)'
22862     warn2 'library is not.'
22863   else
22864     noteL 'The OpenGL Library was found, but the GLE (GL Extrusion)'
22865     warn2 'was not.'
22866   fi
22867
22868   if test "$gle_halfassed" = yes ; then
22869     echo ''
22870     warn2 'More specifically, we found the headers, but not the'
22871     warn2 'libraries; so either GLE is half-installed on this'
22872     warn2 "system, or something else went wrong.  The \`config.log'"
22873     warn2 'file might contain some clues.'
22874   fi
22875
22876   echo ''
22877   warn2 'Some of the OpenGL (3D) demos (those that depend on GLE)'
22878   warn2 'will not be built or installed.  You might want to consider'
22879   warn2 'installing GLE and re-running configure.  You can find the'
22880   warn2 'GLE library at <http://www.linas.org/gle/>.  For general'
22881   warn2 'OpenGL info, see <http://www.opengl.org/>.'
22882
22883  fi
22884 fi
22885
22886
22887 if test "$with_readdisplay_req" = yes -a "$have_readdisplay" = no ; then
22888   warn 'Use of XReadDisplay was requested, but it was not found.'
22889 fi
22890
22891 if test "$with_kerberos_req" = yes -a "$have_kerberos" = no ; then
22892   warn 'Use of Kerberos was requested, but it was not found.'
22893 fi
22894
22895 if test "$with_pam_req" = yes -a "$have_pam" = no ; then
22896   warn 'Use of PAM was requested, but it was not found.'
22897 fi
22898
22899 if test "$with_shadow_req" = yes -a "$have_shadow" = no ; then
22900   warn 'Use of shadow passwords was requested, but they were not found.'
22901 fi
22902
22903 if test "$ac_macosx" = yes ; then
22904   if test "$enable_locking" = yes ; then
22905     warn  "You have specified --enable-locking on MacOS X."
22906     warn2 "THIS DOES NOT WORK!  Don't do this!"
22907   fi
22908 fi
22909
22910
22911 # You are in a twisty maze of namespaces and syntaxes, all alike.
22912 # Fuck the skull of Unix.
22913 #
22914 bindir=`eval eval eval eval eval eval eval echo $bindir`
22915 HACKDIR=`eval eval eval eval eval eval eval echo $HACKDIR`
22916 HACK_CONF_DIR=`eval eval eval eval eval eval eval echo $HACK_CONF_DIR`
22917
22918 # canonicalize slashes.
22919 bindir=`echo  "${bindir}"              | sed 's@/$@@;s@//*@/@g'`
22920 HACKDIR=`echo "${HACKDIR}"             | sed 's@/$@@;s@//*@/@g'`
22921 HACK_CONF_DIR=`echo "${HACK_CONF_DIR}" | sed 's@/$@@;s@//*@/@g'`
22922
22923
22924 # Sanity check the hackdir
22925 for bad_choice in xscreensaver xscreensaver-demo xscreensaver-command ; do
22926   if test "${HACKDIR}" = "${bindir}/${bad_choice}" ; then
22927     echo ""
22928     { { $as_echo "$as_me:$LINENO: error: \"--with-hackdir=${bindir}/${bad_choice}\" won't work.
22929                    There will be an executable installed with that name, so
22930                    that can't be the name of a directory as well.  Please
22931                    re-configure with a different directory name." >&5
22932 $as_echo "$as_me: error: \"--with-hackdir=${bindir}/${bad_choice}\" won't work.
22933                    There will be an executable installed with that name, so
22934                    that can't be the name of a directory as well.  Please
22935                    re-configure with a different directory name." >&2;}
22936    { (exit 1); exit 1; }; }
22937   fi
22938 done
22939
22940
22941 do_dir_warning=no
22942
22943 # Now let's warn if there's a previous RPM version already installed.
22944 # But don't bother with this test if we are currently *building* an RPM.
22945
22946 if test -z "$RPM_PACKAGE_VERSION" ; then
22947
22948   rpmnames="xscreensaver xscreensaver-base xscreensaver-extras"
22949
22950   # M4 sucks!!
22951
22952   rpmv=`(rpm -qv $rpmnames) 2>/dev/null | \
22953         sed -n 's/^[-a-z]*-\([0-9][0-9]*[.][0-9][0-9a-z]*\)-.*$/\1/p' | \
22954         head -1`
22955
22956
22957   if test \! -z "$rpmv" ; then
22958     rpmbdir=`rpm -ql $rpmnames | sed -n 's@^\(.*\)/xscreensaver-demo$@\1@p'`
22959     rpmhdir=`rpm -ql $rpmnames | sed -n 's@^\(.*\)/popsquares$@\1@p'`
22960
22961     warning=no
22962     warnL "There is already an installed RPM of xscreensaver $rpmv"
22963     warn2 'on this system.  You might want to remove it ("rpm -ve")'
22964     warn2 'before running "make install" in this directory.'
22965     echo ""
22966     warn2 "Alternately, you could build this version of xscreensaver"
22967     warn2 'as an RPM, and then install that.  An "xscreensaver.spec"'
22968     warn2 'file is included.  Try "rpmbuild -v -ba xscreensaver.spec".'
22969     warn2 "See the RPM documentation for more info."
22970     echo ""
22971
22972     if test "$rpmbdir" = "$rpmhdir" ; then
22973       warn2 "The RPM version was installed in $rpmbdir/."
22974       do_dir_warning=yes
22975     else
22976       warn2 "The RPM version was installed in $rpmbdir/,"
22977       warn2 "with demos in $rpmhdir/."
22978     fi
22979   fi
22980 fi
22981
22982 # Also warn if there's a Debian package installed.
22983 #
22984 debnames="xscreensaver xscreensaver-data xscreensaver-data-extra"
22985 debv=''
22986 for dpkg in $debnames ; do
22987   if test -z "$debv"; then
22988     debv=`dpkg -s $dpkg 2>/dev/null | sed -n 's/^Version: \(.*\)$/\1/p'`
22989   fi
22990 done
22991
22992 if test \! -z "$debv" ; then
22993   debbdir=`dpkg -L $debnames 2>/dev/null | \
22994             sed -n 's@^\(.*/bin/\)xscreensaver$@\1@p'`
22995   debhdir=`dpkg -L $debnames 2>/dev/null | \
22996             sed -n 's@^\(.*/\)popsquares$@\1@p'`
22997   if test -z "$debbdir" ; then debbdir='???'; fi
22998   if test -z "$debhdir" ; then debhdir='???'; fi
22999
23000   warning=no
23001   warnL "There is already an installed dpkg of xscreensaver"
23002   warn2 "version \"$debv\" on this system."
23003   echo ""
23004   warn2 "The dpkg was installed in $debbdir,"
23005   warn2 "with demos in $debhdir."
23006 fi
23007
23008
23009 if test "${bindir}" = "${HACKDIR}" ; then
23010   do_dir_warning=yes
23011 fi
23012
23013 if test "$do_dir_warning" = yes; then
23014   echo ""
23015   echo "$warnsep"
23016   echo ""
23017   echo '      When you run "make install", the "xscreensaver",'
23018   echo '      "xscreensaver-demo", and "xscreensaver-command" executables'
23019   echo "      will be installed in ${bindir}/."
23020   echo ""
23021   echo "      The various graphics demos (190+ different executables) will"
23022   echo "      be installed in ${HACKDIR}/."
23023   echo ""
23024   echo "      If you would prefer the demos to be installed elsewhere,"
23025   echo "      you should re-run configure with the --with-hackdir=DIR"
23026   echo "      option.  For more information, run \`./configure --help'."
23027   warning=yes
23028 fi
23029
23030 if test "$warning" != no; then
23031   echo '' ; echo "$warnsep" ; echo ''
23032 fi
23033
23034 if test "$do_dir_warning" = no; then
23035   if test "$warning" = no; then
23036     echo ''
23037   fi
23038   echo "User programs will be installed in ${bindir}/"
23039   echo "Screen savers will be installed in ${HACKDIR}/"
23040   echo "Configuration dialogs will be installed in ${HACK_CONF_DIR}/"
23041   echo "System-wide default settings will be installed in ${APPDEFAULTS}/"
23042   echo ''
23043 fi