http://www.jwz.org/xscreensaver/xscreensaver-5.12.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_xinput_ext
820 with_xf86vmode_ext
821 with_xf86gamma_ext
822 with_randr_ext
823 with_proc_interrupts
824 enable_locking
825 enable_root_passwd
826 with_pam
827 with_pam_service_name
828 with_kerberos
829 with_shadow
830 with_passwd_helper
831 with_login_manager
832 with_gtk
833 with_motif
834 with_gl
835 with_gle
836 with_pixbuf
837 with_xpm
838 with_jpeg
839 with_xshm_ext
840 with_xdbe_ext
841 with_readdisplay
842 with_image_directory
843 with_text_file
844 with_browser
845 with_setuid_hacks
846 '
847       ac_precious_vars='build_alias
848 host_alias
849 target_alias
850 CC
851 CFLAGS
852 LDFLAGS
853 LIBS
854 CPPFLAGS
855 CPP
856 XMKMF'
857
858
859 # Initialize some variables set by options.
860 ac_init_help=
861 ac_init_version=false
862 ac_unrecognized_opts=
863 ac_unrecognized_sep=
864 # The variables have the same names as the options, with
865 # dashes changed to underlines.
866 cache_file=/dev/null
867 exec_prefix=NONE
868 no_create=
869 no_recursion=
870 prefix=NONE
871 program_prefix=NONE
872 program_suffix=NONE
873 program_transform_name=s,x,x,
874 silent=
875 site=
876 srcdir=
877 verbose=
878 x_includes=NONE
879 x_libraries=NONE
880
881 # Installation directory options.
882 # These are left unexpanded so users can "make install exec_prefix=/foo"
883 # and all the variables that are supposed to be based on exec_prefix
884 # by default will actually change.
885 # Use braces instead of parens because sh, perl, etc. also accept them.
886 # (The list follows the same order as the GNU Coding Standards.)
887 bindir='${exec_prefix}/bin'
888 sbindir='${exec_prefix}/sbin'
889 libexecdir='${exec_prefix}/libexec'
890 datarootdir='${prefix}/share'
891 datadir='${datarootdir}'
892 sysconfdir='${prefix}/etc'
893 sharedstatedir='${prefix}/com'
894 localstatedir='${prefix}/var'
895 includedir='${prefix}/include'
896 oldincludedir='/usr/include'
897 docdir='${datarootdir}/doc/${PACKAGE}'
898 infodir='${datarootdir}/info'
899 htmldir='${docdir}'
900 dvidir='${docdir}'
901 pdfdir='${docdir}'
902 psdir='${docdir}'
903 libdir='${exec_prefix}/lib'
904 localedir='${datarootdir}/locale'
905 mandir='${datarootdir}/man'
906
907 ac_prev=
908 ac_dashdash=
909 for ac_option
910 do
911   # If the previous option needs an argument, assign it.
912   if test -n "$ac_prev"; then
913     eval $ac_prev=\$ac_option
914     ac_prev=
915     continue
916   fi
917
918   case $ac_option in
919   *=*)  ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
920   *)    ac_optarg=yes ;;
921   esac
922
923   # Accept the important Cygnus configure options, so we can diagnose typos.
924
925   case $ac_dashdash$ac_option in
926   --)
927     ac_dashdash=yes ;;
928
929   -bindir | --bindir | --bindi | --bind | --bin | --bi)
930     ac_prev=bindir ;;
931   -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
932     bindir=$ac_optarg ;;
933
934   -build | --build | --buil | --bui | --bu)
935     ac_prev=build_alias ;;
936   -build=* | --build=* | --buil=* | --bui=* | --bu=*)
937     build_alias=$ac_optarg ;;
938
939   -cache-file | --cache-file | --cache-fil | --cache-fi \
940   | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
941     ac_prev=cache_file ;;
942   -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
943   | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
944     cache_file=$ac_optarg ;;
945
946   --config-cache | -C)
947     cache_file=config.cache ;;
948
949   -datadir | --datadir | --datadi | --datad)
950     ac_prev=datadir ;;
951   -datadir=* | --datadir=* | --datadi=* | --datad=*)
952     datadir=$ac_optarg ;;
953
954   -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
955   | --dataroo | --dataro | --datar)
956     ac_prev=datarootdir ;;
957   -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
958   | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
959     datarootdir=$ac_optarg ;;
960
961   -disable-* | --disable-*)
962     ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
963     # Reject names that are not valid shell variable names.
964     expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
965       { $as_echo "$as_me: error: invalid feature name: $ac_useropt" >&2
966    { (exit 1); exit 1; }; }
967     ac_useropt_orig=$ac_useropt
968     ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
969     case $ac_user_opts in
970       *"
971 "enable_$ac_useropt"
972 "*) ;;
973       *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig"
974          ac_unrecognized_sep=', ';;
975     esac
976     eval enable_$ac_useropt=no ;;
977
978   -docdir | --docdir | --docdi | --doc | --do)
979     ac_prev=docdir ;;
980   -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*)
981     docdir=$ac_optarg ;;
982
983   -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv)
984     ac_prev=dvidir ;;
985   -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*)
986     dvidir=$ac_optarg ;;
987
988   -enable-* | --enable-*)
989     ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
990     # Reject names that are not valid shell variable names.
991     expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
992       { $as_echo "$as_me: error: invalid feature name: $ac_useropt" >&2
993    { (exit 1); exit 1; }; }
994     ac_useropt_orig=$ac_useropt
995     ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
996     case $ac_user_opts in
997       *"
998 "enable_$ac_useropt"
999 "*) ;;
1000       *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig"
1001          ac_unrecognized_sep=', ';;
1002     esac
1003     eval enable_$ac_useropt=\$ac_optarg ;;
1004
1005   -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
1006   | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
1007   | --exec | --exe | --ex)
1008     ac_prev=exec_prefix ;;
1009   -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
1010   | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
1011   | --exec=* | --exe=* | --ex=*)
1012     exec_prefix=$ac_optarg ;;
1013
1014   -gas | --gas | --ga | --g)
1015     # Obsolete; use --with-gas.
1016     with_gas=yes ;;
1017
1018   -help | --help | --hel | --he | -h)
1019     ac_init_help=long ;;
1020   -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
1021     ac_init_help=recursive ;;
1022   -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
1023     ac_init_help=short ;;
1024
1025   -host | --host | --hos | --ho)
1026     ac_prev=host_alias ;;
1027   -host=* | --host=* | --hos=* | --ho=*)
1028     host_alias=$ac_optarg ;;
1029
1030   -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht)
1031     ac_prev=htmldir ;;
1032   -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \
1033   | --ht=*)
1034     htmldir=$ac_optarg ;;
1035
1036   -includedir | --includedir | --includedi | --included | --include \
1037   | --includ | --inclu | --incl | --inc)
1038     ac_prev=includedir ;;
1039   -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
1040   | --includ=* | --inclu=* | --incl=* | --inc=*)
1041     includedir=$ac_optarg ;;
1042
1043   -infodir | --infodir | --infodi | --infod | --info | --inf)
1044     ac_prev=infodir ;;
1045   -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
1046     infodir=$ac_optarg ;;
1047
1048   -libdir | --libdir | --libdi | --libd)
1049     ac_prev=libdir ;;
1050   -libdir=* | --libdir=* | --libdi=* | --libd=*)
1051     libdir=$ac_optarg ;;
1052
1053   -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
1054   | --libexe | --libex | --libe)
1055     ac_prev=libexecdir ;;
1056   -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
1057   | --libexe=* | --libex=* | --libe=*)
1058     libexecdir=$ac_optarg ;;
1059
1060   -localedir | --localedir | --localedi | --localed | --locale)
1061     ac_prev=localedir ;;
1062   -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*)
1063     localedir=$ac_optarg ;;
1064
1065   -localstatedir | --localstatedir | --localstatedi | --localstated \
1066   | --localstate | --localstat | --localsta | --localst | --locals)
1067     ac_prev=localstatedir ;;
1068   -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
1069   | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*)
1070     localstatedir=$ac_optarg ;;
1071
1072   -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
1073     ac_prev=mandir ;;
1074   -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
1075     mandir=$ac_optarg ;;
1076
1077   -nfp | --nfp | --nf)
1078     # Obsolete; use --without-fp.
1079     with_fp=no ;;
1080
1081   -no-create | --no-create | --no-creat | --no-crea | --no-cre \
1082   | --no-cr | --no-c | -n)
1083     no_create=yes ;;
1084
1085   -no-recursion | --no-recursion | --no-recursio | --no-recursi \
1086   | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
1087     no_recursion=yes ;;
1088
1089   -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
1090   | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
1091   | --oldin | --oldi | --old | --ol | --o)
1092     ac_prev=oldincludedir ;;
1093   -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
1094   | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
1095   | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
1096     oldincludedir=$ac_optarg ;;
1097
1098   -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
1099     ac_prev=prefix ;;
1100   -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
1101     prefix=$ac_optarg ;;
1102
1103   -program-prefix | --program-prefix | --program-prefi | --program-pref \
1104   | --program-pre | --program-pr | --program-p)
1105     ac_prev=program_prefix ;;
1106   -program-prefix=* | --program-prefix=* | --program-prefi=* \
1107   | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
1108     program_prefix=$ac_optarg ;;
1109
1110   -program-suffix | --program-suffix | --program-suffi | --program-suff \
1111   | --program-suf | --program-su | --program-s)
1112     ac_prev=program_suffix ;;
1113   -program-suffix=* | --program-suffix=* | --program-suffi=* \
1114   | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
1115     program_suffix=$ac_optarg ;;
1116
1117   -program-transform-name | --program-transform-name \
1118   | --program-transform-nam | --program-transform-na \
1119   | --program-transform-n | --program-transform- \
1120   | --program-transform | --program-transfor \
1121   | --program-transfo | --program-transf \
1122   | --program-trans | --program-tran \
1123   | --progr-tra | --program-tr | --program-t)
1124     ac_prev=program_transform_name ;;
1125   -program-transform-name=* | --program-transform-name=* \
1126   | --program-transform-nam=* | --program-transform-na=* \
1127   | --program-transform-n=* | --program-transform-=* \
1128   | --program-transform=* | --program-transfor=* \
1129   | --program-transfo=* | --program-transf=* \
1130   | --program-trans=* | --program-tran=* \
1131   | --progr-tra=* | --program-tr=* | --program-t=*)
1132     program_transform_name=$ac_optarg ;;
1133
1134   -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd)
1135     ac_prev=pdfdir ;;
1136   -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*)
1137     pdfdir=$ac_optarg ;;
1138
1139   -psdir | --psdir | --psdi | --psd | --ps)
1140     ac_prev=psdir ;;
1141   -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*)
1142     psdir=$ac_optarg ;;
1143
1144   -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1145   | -silent | --silent | --silen | --sile | --sil)
1146     silent=yes ;;
1147
1148   -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
1149     ac_prev=sbindir ;;
1150   -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
1151   | --sbi=* | --sb=*)
1152     sbindir=$ac_optarg ;;
1153
1154   -sharedstatedir | --sharedstatedir | --sharedstatedi \
1155   | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
1156   | --sharedst | --shareds | --shared | --share | --shar \
1157   | --sha | --sh)
1158     ac_prev=sharedstatedir ;;
1159   -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
1160   | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
1161   | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
1162   | --sha=* | --sh=*)
1163     sharedstatedir=$ac_optarg ;;
1164
1165   -site | --site | --sit)
1166     ac_prev=site ;;
1167   -site=* | --site=* | --sit=*)
1168     site=$ac_optarg ;;
1169
1170   -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
1171     ac_prev=srcdir ;;
1172   -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
1173     srcdir=$ac_optarg ;;
1174
1175   -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
1176   | --syscon | --sysco | --sysc | --sys | --sy)
1177     ac_prev=sysconfdir ;;
1178   -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
1179   | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
1180     sysconfdir=$ac_optarg ;;
1181
1182   -target | --target | --targe | --targ | --tar | --ta | --t)
1183     ac_prev=target_alias ;;
1184   -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
1185     target_alias=$ac_optarg ;;
1186
1187   -v | -verbose | --verbose | --verbos | --verbo | --verb)
1188     verbose=yes ;;
1189
1190   -version | --version | --versio | --versi | --vers | -V)
1191     ac_init_version=: ;;
1192
1193   -with-* | --with-*)
1194     ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
1195     # Reject names that are not valid shell variable names.
1196     expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1197       { $as_echo "$as_me: error: invalid package name: $ac_useropt" >&2
1198    { (exit 1); exit 1; }; }
1199     ac_useropt_orig=$ac_useropt
1200     ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1201     case $ac_user_opts in
1202       *"
1203 "with_$ac_useropt"
1204 "*) ;;
1205       *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig"
1206          ac_unrecognized_sep=', ';;
1207     esac
1208     eval with_$ac_useropt=\$ac_optarg ;;
1209
1210   -without-* | --without-*)
1211     ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'`
1212     # Reject names that are not valid shell variable names.
1213     expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1214       { $as_echo "$as_me: error: invalid package name: $ac_useropt" >&2
1215    { (exit 1); exit 1; }; }
1216     ac_useropt_orig=$ac_useropt
1217     ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1218     case $ac_user_opts in
1219       *"
1220 "with_$ac_useropt"
1221 "*) ;;
1222       *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig"
1223          ac_unrecognized_sep=', ';;
1224     esac
1225     eval with_$ac_useropt=no ;;
1226
1227   --x)
1228     # Obsolete; use --with-x.
1229     with_x=yes ;;
1230
1231   -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
1232   | --x-incl | --x-inc | --x-in | --x-i)
1233     ac_prev=x_includes ;;
1234   -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
1235   | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
1236     x_includes=$ac_optarg ;;
1237
1238   -x-libraries | --x-libraries | --x-librarie | --x-librari \
1239   | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
1240     ac_prev=x_libraries ;;
1241   -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
1242   | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
1243     x_libraries=$ac_optarg ;;
1244
1245   -*) { $as_echo "$as_me: error: unrecognized option: $ac_option
1246 Try \`$0 --help' for more information." >&2
1247    { (exit 1); exit 1; }; }
1248     ;;
1249
1250   *=*)
1251     ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
1252     # Reject names that are not valid shell variable names.
1253     expr "x$ac_envvar" : ".*[^_$as_cr_alnum]" >/dev/null &&
1254       { $as_echo "$as_me: error: invalid variable name: $ac_envvar" >&2
1255    { (exit 1); exit 1; }; }
1256     eval $ac_envvar=\$ac_optarg
1257     export $ac_envvar ;;
1258
1259   *)
1260     # FIXME: should be removed in autoconf 3.0.
1261     $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2
1262     expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
1263       $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2
1264     : ${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}
1265     ;;
1266
1267   esac
1268 done
1269
1270 if test -n "$ac_prev"; then
1271   ac_option=--`echo $ac_prev | sed 's/_/-/g'`
1272   { $as_echo "$as_me: error: missing argument to $ac_option" >&2
1273    { (exit 1); exit 1; }; }
1274 fi
1275
1276 if test -n "$ac_unrecognized_opts"; then
1277   case $enable_option_checking in
1278     no) ;;
1279     fatal) { $as_echo "$as_me: error: unrecognized options: $ac_unrecognized_opts" >&2
1280    { (exit 1); exit 1; }; } ;;
1281     *)     $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;;
1282   esac
1283 fi
1284
1285 # Check all directory arguments for consistency.
1286 for ac_var in   exec_prefix prefix bindir sbindir libexecdir datarootdir \
1287                 datadir sysconfdir sharedstatedir localstatedir includedir \
1288                 oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
1289                 libdir localedir mandir
1290 do
1291   eval ac_val=\$$ac_var
1292   # Remove trailing slashes.
1293   case $ac_val in
1294     */ )
1295       ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'`
1296       eval $ac_var=\$ac_val;;
1297   esac
1298   # Be sure to have absolute directory names.
1299   case $ac_val in
1300     [\\/$]* | ?:[\\/]* )  continue;;
1301     NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
1302   esac
1303   { $as_echo "$as_me: error: expected an absolute directory name for --$ac_var: $ac_val" >&2
1304    { (exit 1); exit 1; }; }
1305 done
1306
1307 # There might be people who depend on the old broken behavior: `$host'
1308 # used to hold the argument of --host etc.
1309 # FIXME: To remove some day.
1310 build=$build_alias
1311 host=$host_alias
1312 target=$target_alias
1313
1314 # FIXME: To remove some day.
1315 if test "x$host_alias" != x; then
1316   if test "x$build_alias" = x; then
1317     cross_compiling=maybe
1318     $as_echo "$as_me: WARNING: If you wanted to set the --build type, don't use --host.
1319     If a cross compiler is detected then cross compile mode will be used." >&2
1320   elif test "x$build_alias" != "x$host_alias"; then
1321     cross_compiling=yes
1322   fi
1323 fi
1324
1325 ac_tool_prefix=
1326 test -n "$host_alias" && ac_tool_prefix=$host_alias-
1327
1328 test "$silent" = yes && exec 6>/dev/null
1329
1330
1331 ac_pwd=`pwd` && test -n "$ac_pwd" &&
1332 ac_ls_di=`ls -di .` &&
1333 ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` ||
1334   { $as_echo "$as_me: error: working directory cannot be determined" >&2
1335    { (exit 1); exit 1; }; }
1336 test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
1337   { $as_echo "$as_me: error: pwd does not report name of working directory" >&2
1338    { (exit 1); exit 1; }; }
1339
1340
1341 # Find the source files, if location was not specified.
1342 if test -z "$srcdir"; then
1343   ac_srcdir_defaulted=yes
1344   # Try the directory containing this script, then the parent directory.
1345   ac_confdir=`$as_dirname -- "$as_myself" ||
1346 $as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
1347          X"$as_myself" : 'X\(//\)[^/]' \| \
1348          X"$as_myself" : 'X\(//\)$' \| \
1349          X"$as_myself" : 'X\(/\)' \| . 2>/dev/null ||
1350 $as_echo X"$as_myself" |
1351     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
1352             s//\1/
1353             q
1354           }
1355           /^X\(\/\/\)[^/].*/{
1356             s//\1/
1357             q
1358           }
1359           /^X\(\/\/\)$/{
1360             s//\1/
1361             q
1362           }
1363           /^X\(\/\).*/{
1364             s//\1/
1365             q
1366           }
1367           s/.*/./; q'`
1368   srcdir=$ac_confdir
1369   if test ! -r "$srcdir/$ac_unique_file"; then
1370     srcdir=..
1371   fi
1372 else
1373   ac_srcdir_defaulted=no
1374 fi
1375 if test ! -r "$srcdir/$ac_unique_file"; then
1376   test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
1377   { $as_echo "$as_me: error: cannot find sources ($ac_unique_file) in $srcdir" >&2
1378    { (exit 1); exit 1; }; }
1379 fi
1380 ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work"
1381 ac_abs_confdir=`(
1382         cd "$srcdir" && test -r "./$ac_unique_file" || { $as_echo "$as_me: error: $ac_msg" >&2
1383    { (exit 1); exit 1; }; }
1384         pwd)`
1385 # When building in place, set srcdir=.
1386 if test "$ac_abs_confdir" = "$ac_pwd"; then
1387   srcdir=.
1388 fi
1389 # Remove unnecessary trailing slashes from srcdir.
1390 # Double slashes in file names in object file debugging info
1391 # mess up M-x gdb in Emacs.
1392 case $srcdir in
1393 */) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;;
1394 esac
1395 for ac_var in $ac_precious_vars; do
1396   eval ac_env_${ac_var}_set=\${${ac_var}+set}
1397   eval ac_env_${ac_var}_value=\$${ac_var}
1398   eval ac_cv_env_${ac_var}_set=\${${ac_var}+set}
1399   eval ac_cv_env_${ac_var}_value=\$${ac_var}
1400 done
1401
1402 #
1403 # Report the --help message.
1404 #
1405 if test "$ac_init_help" = "long"; then
1406   # Omit some internal or obsolete options to make the list less imposing.
1407   # This message is too long to be a string in the A/UX 3.1 sh.
1408   cat <<_ACEOF
1409 \`configure' configures this package to adapt to many kinds of systems.
1410
1411 Usage: $0 [OPTION]... [VAR=VALUE]...
1412
1413 To assign environment variables (e.g., CC, CFLAGS...), specify them as
1414 VAR=VALUE.  See below for descriptions of some of the useful variables.
1415
1416 Defaults for the options are specified in brackets.
1417
1418
1419 Configuration:
1420
1421   -h, --help              display this help and exit
1422       --help=short        display options specific to this package
1423       --help=recursive    display the short help of all the included packages
1424   -V, --version           display version information and exit
1425   -q, --quiet, --silent   do not print \`checking...' messages
1426       --cache-file=FILE   cache test results in FILE [disabled]
1427   -C, --config-cache      alias for \`--cache-file=config.cache'
1428   -n, --no-create         do not create output files
1429       --srcdir=DIR        find the sources in DIR [configure dir or \`..']
1430
1431 Installation directories:
1432   --prefix=PREFIX         install architecture-independent files in PREFIX
1433                           [$ac_default_prefix]
1434   --exec-prefix=EPREFIX   install architecture-dependent files in EPREFIX
1435                           [PREFIX]
1436
1437 By default, \`make install' will install all the files in
1438 \`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc.  You can specify
1439 an installation prefix other than \`$ac_default_prefix' using \`--prefix',
1440 for instance \`--prefix=\$HOME'.
1441
1442 For better control, use the options below.
1443
1444 Fine tuning of the installation directories:
1445   --bindir=DIR            user executables [EPREFIX/bin]
1446   --libexecdir=DIR        program executables [EPREFIX/libexec]
1447   --libdir=DIR            object code libraries [EPREFIX/lib]
1448   --includedir=DIR        C header files [PREFIX/include]
1449   --x-includes=DIR        X include files are in DIR
1450   --x-libraries=DIR       X library files are in DIR
1451   --datarootdir=DIR       read-only arch.-independent data root [PREFIX/share]
1452   --datadir=DIR           read-only architecture-independent data [DATAROOTDIR]
1453   --localedir=DIR         locale-dependent data [DATAROOTDIR/locale]
1454   --mandir=DIR            man documentation [DATAROOTDIR/man]
1455   --docdir=DIR            documentation root [DATAROOTDIR/doc/PACKAGE]
1456   --htmldir=DIR           html documentation [DOCDIR]
1457   --dvidir=DIR            dvi documentation [DOCDIR]
1458   --pdfdir=DIR            pdf documentation [DOCDIR]
1459   --psdir=DIR             ps documentation [DOCDIR]
1460 _ACEOF
1461
1462   cat <<\_ACEOF
1463
1464 X features:
1465   --x-includes=DIR    X include files are in DIR
1466   --x-libraries=DIR   X library files are in DIR
1467
1468 System types:
1469   --build=BUILD     configure for building on BUILD [guessed]
1470   --host=HOST       cross-compile to build programs to run on HOST [BUILD]
1471 _ACEOF
1472 fi
1473
1474 if test -n "$ac_init_help"; then
1475
1476   cat <<\_ACEOF
1477
1478 Optional Features:
1479   --disable-option-checking  ignore unrecognized --enable/--with options
1480   --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)
1481   --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
1482
1483 Screen locking options:
1484   --enable-locking        Compile in support for locking the display.
1485   --disable-locking       Do not allow locking at all.
1486
1487   --enable-root-passwd        Allow root passwd to unlock screen.
1488   --disable-root-passwd       Do not allow that.
1489
1490 Optional Packages:
1491   --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
1492   --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
1493
1494
1495 Installation options:
1496   --with-hackdir=DIR      Where to install the hundreds of demo executables.
1497                           Default: `PREFIX/libexec/xscreensaver/'
1498   --with-configdir=DIR    Where to install the data files that describe each
1499                           of the display modes to the GUI.
1500                           Default: `PREFIX/share/xscreensaver/config/'
1501   --with-x-app-defaults=DIR
1502                            Where to install xscreensaver configuration file.
1503
1504 Except where noted, all of the --with options below can also take a
1505 directory argument: for example, `--with-motif=/opt/Motif'.  That would
1506 cause /opt/Motif/include/ to be added to the -I list, and /opt/Motif/lib/
1507 to be added to the -L list, assuming those directories exist.
1508
1509 By default, support for each of these options will be built in, if the
1510 relevant library routines exist.  At run time, they will then be used
1511 only if the X server being used supports them.  Each --with option has
1512 a corresponding --without option, to override building support for them
1513 at all.
1514
1515 Screen blanking and idle-detection options:
1516
1517   --with-sgi-ext          Include support for the SGI SCREEN_SAVER extension.
1518   --with-xidle-ext        Include support for the XIDLE extension.
1519   --with-sgivc-ext        Include support for the SGI-VIDEO-CONTROL extension.
1520   --with-dpms-ext         Include support for the DPMS extension.
1521   --with-xinerama-ext     Include support for the XINERAMA extension.
1522   --with-xinput-ext     Include support for the XInput extension.
1523   --with-xf86vmode-ext    Include support for XFree86 virtual screens.
1524   --with-xf86gamma-ext    Include support for XFree86 gamma fading.
1525   --with-randr-ext        Include support for the X Resize+Rotate extension.
1526   --with-proc-interrupts  Include support for consulting the /proc/interrupts
1527                           file to notice keyboard activity.
1528   --with-pam              Include support for PAM (Pluggable Auth Modules.)
1529   --with-pam-service-name=NAME
1530                           NAME is the name of the PAM service that
1531                           xscreensaver will authenticate as.
1532   --with-kerberos         Include support for Kerberos authentication.
1533   --with-shadow           Include support for shadow password authentication.
1534   --with-passwd-helper    Include support for an external password
1535                           verification helper program.
1536   --with-login-manager    Put a "New Login" button on the unlock dialog that
1537                           runs a login manager like gdmflexiserver or kdmctl.
1538
1539 User interface options:
1540
1541   --with-gtk              Use the Gtk toolkit for the user interface.
1542   --with-motif            Use the Motif toolkit for the user interface
1543                           (not recommended.)
1544
1545 Graphics options:
1546
1547   --with-gl               Build those demos which depend on OpenGL.
1548   --with-gle              Build those demos which depend on GLE
1549                           (the OpenGL "extrusion" library.)
1550   --with-pixbuf           Include support for the GDK-Pixbuf library in some
1551                           demos, which will make it possible for them to read
1552                           GIF, JPEG, and PNG files as well.
1553   --with-xpm              Include support for XPM files in some demos.
1554                           (Not needed if Pixbuf is used.)
1555   --with-jpeg             Include support for the JPEG library.
1556   --with-xshm-ext         Include support for the Shared Memory extension.
1557   --with-xdbe-ext         Include support for the DOUBLE-BUFFER extension.
1558   --with-readdisplay      Include support for the XReadDisplay extension.
1559   --with-image-directory=DIR  By default, some demos may display random images
1560                           from this directory.
1561   --with-text-file=FILE   By default, some demos may display this file.
1562   --with-browser=BROWSER   Specify the browser to show help URL.
1563   --with-setuid-hacks     Allow some demos to be installed `setuid root'
1564                           (which is needed in order to ping other hosts.)
1565
1566
1567 Some influential environment variables:
1568   CC          C compiler command
1569   CFLAGS      C compiler flags
1570   LDFLAGS     linker flags, e.g. -L<lib dir> if you have libraries in a
1571               nonstandard directory <lib dir>
1572   LIBS        libraries to pass to the linker, e.g. -l<library>
1573   CPPFLAGS    C/C++/Objective C preprocessor flags, e.g. -I<include dir> if
1574               you have headers in a nonstandard directory <include dir>
1575   CPP         C preprocessor
1576   XMKMF       Path to xmkmf, Makefile generator for X Window System
1577
1578 Use these variables to override the choices made by `configure' or to help
1579 it to find libraries and programs with nonstandard names/locations.
1580
1581 _ACEOF
1582 ac_status=$?
1583 fi
1584
1585 if test "$ac_init_help" = "recursive"; then
1586   # If there are subdirs, report their specific --help.
1587   for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
1588     test -d "$ac_dir" ||
1589       { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } ||
1590       continue
1591     ac_builddir=.
1592
1593 case "$ac_dir" in
1594 .) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
1595 *)
1596   ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
1597   # A ".." for each directory in $ac_dir_suffix.
1598   ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
1599   case $ac_top_builddir_sub in
1600   "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
1601   *)  ac_top_build_prefix=$ac_top_builddir_sub/ ;;
1602   esac ;;
1603 esac
1604 ac_abs_top_builddir=$ac_pwd
1605 ac_abs_builddir=$ac_pwd$ac_dir_suffix
1606 # for backward compatibility:
1607 ac_top_builddir=$ac_top_build_prefix
1608
1609 case $srcdir in
1610   .)  # We are building in place.
1611     ac_srcdir=.
1612     ac_top_srcdir=$ac_top_builddir_sub
1613     ac_abs_top_srcdir=$ac_pwd ;;
1614   [\\/]* | ?:[\\/]* )  # Absolute name.
1615     ac_srcdir=$srcdir$ac_dir_suffix;
1616     ac_top_srcdir=$srcdir
1617     ac_abs_top_srcdir=$srcdir ;;
1618   *) # Relative name.
1619     ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
1620     ac_top_srcdir=$ac_top_build_prefix$srcdir
1621     ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
1622 esac
1623 ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
1624
1625     cd "$ac_dir" || { ac_status=$?; continue; }
1626     # Check for guested configure.
1627     if test -f "$ac_srcdir/configure.gnu"; then
1628       echo &&
1629       $SHELL "$ac_srcdir/configure.gnu" --help=recursive
1630     elif test -f "$ac_srcdir/configure"; then
1631       echo &&
1632       $SHELL "$ac_srcdir/configure" --help=recursive
1633     else
1634       $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
1635     fi || ac_status=$?
1636     cd "$ac_pwd" || { ac_status=$?; break; }
1637   done
1638 fi
1639
1640 test -n "$ac_init_help" && exit $ac_status
1641 if $ac_init_version; then
1642   cat <<\_ACEOF
1643 configure
1644 generated by GNU Autoconf 2.63
1645
1646 Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001,
1647 2002, 2003, 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc.
1648 This configure script is free software; the Free Software Foundation
1649 gives unlimited permission to copy, distribute and modify it.
1650 _ACEOF
1651   exit
1652 fi
1653 cat >config.log <<_ACEOF
1654 This file contains any messages produced by compilers while
1655 running configure, to aid debugging if configure makes a mistake.
1656
1657 It was created by $as_me, which was
1658 generated by GNU Autoconf 2.63.  Invocation command line was
1659
1660   $ $0 $@
1661
1662 _ACEOF
1663 exec 5>>config.log
1664 {
1665 cat <<_ASUNAME
1666 ## --------- ##
1667 ## Platform. ##
1668 ## --------- ##
1669
1670 hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
1671 uname -m = `(uname -m) 2>/dev/null || echo unknown`
1672 uname -r = `(uname -r) 2>/dev/null || echo unknown`
1673 uname -s = `(uname -s) 2>/dev/null || echo unknown`
1674 uname -v = `(uname -v) 2>/dev/null || echo unknown`
1675
1676 /usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
1677 /bin/uname -X     = `(/bin/uname -X) 2>/dev/null     || echo unknown`
1678
1679 /bin/arch              = `(/bin/arch) 2>/dev/null              || echo unknown`
1680 /usr/bin/arch -k       = `(/usr/bin/arch -k) 2>/dev/null       || echo unknown`
1681 /usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
1682 /usr/bin/hostinfo      = `(/usr/bin/hostinfo) 2>/dev/null      || echo unknown`
1683 /bin/machine           = `(/bin/machine) 2>/dev/null           || echo unknown`
1684 /usr/bin/oslevel       = `(/usr/bin/oslevel) 2>/dev/null       || echo unknown`
1685 /bin/universe          = `(/bin/universe) 2>/dev/null          || echo unknown`
1686
1687 _ASUNAME
1688
1689 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1690 for as_dir in $PATH
1691 do
1692   IFS=$as_save_IFS
1693   test -z "$as_dir" && as_dir=.
1694   $as_echo "PATH: $as_dir"
1695 done
1696 IFS=$as_save_IFS
1697
1698 } >&5
1699
1700 cat >&5 <<_ACEOF
1701
1702
1703 ## ----------- ##
1704 ## Core tests. ##
1705 ## ----------- ##
1706
1707 _ACEOF
1708
1709
1710 # Keep a trace of the command line.
1711 # Strip out --no-create and --no-recursion so they do not pile up.
1712 # Strip out --silent because we don't want to record it for future runs.
1713 # Also quote any args containing shell meta-characters.
1714 # Make two passes to allow for proper duplicate-argument suppression.
1715 ac_configure_args=
1716 ac_configure_args0=
1717 ac_configure_args1=
1718 ac_must_keep_next=false
1719 for ac_pass in 1 2
1720 do
1721   for ac_arg
1722   do
1723     case $ac_arg in
1724     -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
1725     -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1726     | -silent | --silent | --silen | --sile | --sil)
1727       continue ;;
1728     *\'*)
1729       ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
1730     esac
1731     case $ac_pass in
1732     1) ac_configure_args0="$ac_configure_args0 '$ac_arg'" ;;
1733     2)
1734       ac_configure_args1="$ac_configure_args1 '$ac_arg'"
1735       if test $ac_must_keep_next = true; then
1736         ac_must_keep_next=false # Got value, back to normal.
1737       else
1738         case $ac_arg in
1739           *=* | --config-cache | -C | -disable-* | --disable-* \
1740           | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
1741           | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
1742           | -with-* | --with-* | -without-* | --without-* | --x)
1743             case "$ac_configure_args0 " in
1744               "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
1745             esac
1746             ;;
1747           -* ) ac_must_keep_next=true ;;
1748         esac
1749       fi
1750       ac_configure_args="$ac_configure_args '$ac_arg'"
1751       ;;
1752     esac
1753   done
1754 done
1755 $as_unset ac_configure_args0 || test "${ac_configure_args0+set}" != set || { ac_configure_args0=; export ac_configure_args0; }
1756 $as_unset ac_configure_args1 || test "${ac_configure_args1+set}" != set || { ac_configure_args1=; export ac_configure_args1; }
1757
1758 # When interrupted or exit'd, cleanup temporary files, and complete
1759 # config.log.  We remove comments because anyway the quotes in there
1760 # would cause problems or look ugly.
1761 # WARNING: Use '\'' to represent an apostrophe within the trap.
1762 # WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug.
1763 trap 'exit_status=$?
1764   # Save into config.log some information that might help in debugging.
1765   {
1766     echo
1767
1768     cat <<\_ASBOX
1769 ## ---------------- ##
1770 ## Cache variables. ##
1771 ## ---------------- ##
1772 _ASBOX
1773     echo
1774     # The following way of writing the cache mishandles newlines in values,
1775 (
1776   for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do
1777     eval ac_val=\$$ac_var
1778     case $ac_val in #(
1779     *${as_nl}*)
1780       case $ac_var in #(
1781       *_cv_*) { $as_echo "$as_me:$LINENO: WARNING: cache variable $ac_var contains a newline" >&5
1782 $as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
1783       esac
1784       case $ac_var in #(
1785       _ | IFS | as_nl) ;; #(
1786       BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
1787       *) $as_unset $ac_var ;;
1788       esac ;;
1789     esac
1790   done
1791   (set) 2>&1 |
1792     case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #(
1793     *${as_nl}ac_space=\ *)
1794       sed -n \
1795         "s/'\''/'\''\\\\'\'''\''/g;
1796           s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p"
1797       ;; #(
1798     *)
1799       sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
1800       ;;
1801     esac |
1802     sort
1803 )
1804     echo
1805
1806     cat <<\_ASBOX
1807 ## ----------------- ##
1808 ## Output variables. ##
1809 ## ----------------- ##
1810 _ASBOX
1811     echo
1812     for ac_var in $ac_subst_vars
1813     do
1814       eval ac_val=\$$ac_var
1815       case $ac_val in
1816       *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
1817       esac
1818       $as_echo "$ac_var='\''$ac_val'\''"
1819     done | sort
1820     echo
1821
1822     if test -n "$ac_subst_files"; then
1823       cat <<\_ASBOX
1824 ## ------------------- ##
1825 ## File substitutions. ##
1826 ## ------------------- ##
1827 _ASBOX
1828       echo
1829       for ac_var in $ac_subst_files
1830       do
1831         eval ac_val=\$$ac_var
1832         case $ac_val in
1833         *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
1834         esac
1835         $as_echo "$ac_var='\''$ac_val'\''"
1836       done | sort
1837       echo
1838     fi
1839
1840     if test -s confdefs.h; then
1841       cat <<\_ASBOX
1842 ## ----------- ##
1843 ## confdefs.h. ##
1844 ## ----------- ##
1845 _ASBOX
1846       echo
1847       cat confdefs.h
1848       echo
1849     fi
1850     test "$ac_signal" != 0 &&
1851       $as_echo "$as_me: caught signal $ac_signal"
1852     $as_echo "$as_me: exit $exit_status"
1853   } >&5
1854   rm -f core *.core core.conftest.* &&
1855     rm -f -r conftest* confdefs* conf$$* $ac_clean_files &&
1856     exit $exit_status
1857 ' 0
1858 for ac_signal in 1 2 13 15; do
1859   trap 'ac_signal='$ac_signal'; { (exit 1); exit 1; }' $ac_signal
1860 done
1861 ac_signal=0
1862
1863 # confdefs.h avoids OS command line length limits that DEFS can exceed.
1864 rm -f -r conftest* confdefs.h
1865
1866 # Predefined preprocessor variables.
1867
1868 cat >>confdefs.h <<_ACEOF
1869 #define PACKAGE_NAME "$PACKAGE_NAME"
1870 _ACEOF
1871
1872
1873 cat >>confdefs.h <<_ACEOF
1874 #define PACKAGE_TARNAME "$PACKAGE_TARNAME"
1875 _ACEOF
1876
1877
1878 cat >>confdefs.h <<_ACEOF
1879 #define PACKAGE_VERSION "$PACKAGE_VERSION"
1880 _ACEOF
1881
1882
1883 cat >>confdefs.h <<_ACEOF
1884 #define PACKAGE_STRING "$PACKAGE_STRING"
1885 _ACEOF
1886
1887
1888 cat >>confdefs.h <<_ACEOF
1889 #define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
1890 _ACEOF
1891
1892
1893 # Let the site file select an alternate cache file if it wants to.
1894 # Prefer an explicitly selected file to automatically selected ones.
1895 ac_site_file1=NONE
1896 ac_site_file2=NONE
1897 if test -n "$CONFIG_SITE"; then
1898   ac_site_file1=$CONFIG_SITE
1899 elif test "x$prefix" != xNONE; then
1900   ac_site_file1=$prefix/share/config.site
1901   ac_site_file2=$prefix/etc/config.site
1902 else
1903   ac_site_file1=$ac_default_prefix/share/config.site
1904   ac_site_file2=$ac_default_prefix/etc/config.site
1905 fi
1906 for ac_site_file in "$ac_site_file1" "$ac_site_file2"
1907 do
1908   test "x$ac_site_file" = xNONE && continue
1909   if test -r "$ac_site_file"; then
1910     { $as_echo "$as_me:$LINENO: loading site script $ac_site_file" >&5
1911 $as_echo "$as_me: loading site script $ac_site_file" >&6;}
1912     sed 's/^/| /' "$ac_site_file" >&5
1913     . "$ac_site_file"
1914   fi
1915 done
1916
1917 if test -r "$cache_file"; then
1918   # Some versions of bash will fail to source /dev/null (special
1919   # files actually), so we avoid doing that.
1920   if test -f "$cache_file"; then
1921     { $as_echo "$as_me:$LINENO: loading cache $cache_file" >&5
1922 $as_echo "$as_me: loading cache $cache_file" >&6;}
1923     case $cache_file in
1924       [\\/]* | ?:[\\/]* ) . "$cache_file";;
1925       *)                      . "./$cache_file";;
1926     esac
1927   fi
1928 else
1929   { $as_echo "$as_me:$LINENO: creating cache $cache_file" >&5
1930 $as_echo "$as_me: creating cache $cache_file" >&6;}
1931   >$cache_file
1932 fi
1933
1934 # Check that the precious variables saved in the cache have kept the same
1935 # value.
1936 ac_cache_corrupted=false
1937 for ac_var in $ac_precious_vars; do
1938   eval ac_old_set=\$ac_cv_env_${ac_var}_set
1939   eval ac_new_set=\$ac_env_${ac_var}_set
1940   eval ac_old_val=\$ac_cv_env_${ac_var}_value
1941   eval ac_new_val=\$ac_env_${ac_var}_value
1942   case $ac_old_set,$ac_new_set in
1943     set,)
1944       { $as_echo "$as_me:$LINENO: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
1945 $as_echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
1946       ac_cache_corrupted=: ;;
1947     ,set)
1948       { $as_echo "$as_me:$LINENO: error: \`$ac_var' was not set in the previous run" >&5
1949 $as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
1950       ac_cache_corrupted=: ;;
1951     ,);;
1952     *)
1953       if test "x$ac_old_val" != "x$ac_new_val"; then
1954         # differences in whitespace do not lead to failure.
1955         ac_old_val_w=`echo x $ac_old_val`
1956         ac_new_val_w=`echo x $ac_new_val`
1957         if test "$ac_old_val_w" != "$ac_new_val_w"; then
1958           { $as_echo "$as_me:$LINENO: error: \`$ac_var' has changed since the previous run:" >&5
1959 $as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
1960           ac_cache_corrupted=:
1961         else
1962           { $as_echo "$as_me:$LINENO: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5
1963 $as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;}
1964           eval $ac_var=\$ac_old_val
1965         fi
1966         { $as_echo "$as_me:$LINENO:   former value:  \`$ac_old_val'" >&5
1967 $as_echo "$as_me:   former value:  \`$ac_old_val'" >&2;}
1968         { $as_echo "$as_me:$LINENO:   current value: \`$ac_new_val'" >&5
1969 $as_echo "$as_me:   current value: \`$ac_new_val'" >&2;}
1970       fi;;
1971   esac
1972   # Pass precious variables to config.status.
1973   if test "$ac_new_set" = set; then
1974     case $ac_new_val in
1975     *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
1976     *) ac_arg=$ac_var=$ac_new_val ;;
1977     esac
1978     case " $ac_configure_args " in
1979       *" '$ac_arg' "*) ;; # Avoid dups.  Use of quotes ensures accuracy.
1980       *) ac_configure_args="$ac_configure_args '$ac_arg'" ;;
1981     esac
1982   fi
1983 done
1984 if $ac_cache_corrupted; then
1985   { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5
1986 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
1987   { $as_echo "$as_me:$LINENO: error: changes in the environment can compromise the build" >&5
1988 $as_echo "$as_me: error: changes in the environment can compromise the build" >&2;}
1989   { { $as_echo "$as_me:$LINENO: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&5
1990 $as_echo "$as_me: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&2;}
1991    { (exit 1); exit 1; }; }
1992 fi
1993
1994
1995
1996
1997
1998
1999
2000
2001
2002
2003
2004
2005
2006
2007
2008
2009
2010 ac_ext=c
2011 ac_cpp='$CPP $CPPFLAGS'
2012 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2013 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2014 ac_compiler_gnu=$ac_cv_c_compiler_gnu
2015
2016
2017 ac_config_headers="$ac_config_headers config.h"
2018
2019
2020 echo "current directory: `pwd`"
2021 echo "command line was: $0 $@"
2022
2023 ###############################################################################
2024 #
2025 #       Autoheader stuff
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
2201
2202
2203
2204
2205 # After checking to see that --srcdir is correct (which AC_INIT does)
2206 # check for some random other files that come later in the tar file,
2207 # to make sure everything is here.
2208 #
2209 for d in driver utils hacks hacks/glx ; do
2210   f=$srcdir/$d/Makefile.in
2211   if test \! -r $f ; then
2212     echo ""
2213     echo "ERROR: The package is incomplete: $f does not exist."
2214     echo "       This probably means that your download was truncated."
2215     echo ""
2216     exit 1
2217   fi
2218 done
2219
2220 ###############################################################################
2221 #
2222 #       Function to figure out how to run the compiler.
2223 #
2224 ###############################################################################
2225
2226
2227
2228
2229 ###############################################################################
2230 #
2231 #       Check for availability of various gcc command-line options.
2232 #
2233 ###############################################################################
2234
2235
2236
2237
2238
2239
2240
2241 # Need to disable Objective C extensions in ANSI C on MacOS X to work
2242 # around an Apple-specific gcc bug.
2243 #
2244
2245
2246 ###############################################################################
2247 #
2248 #       Function to figure out how to disable // comments in ANSI C code.
2249 #
2250 #       (With recent gcc, this is done with "-std=c89".  With older gcc, this
2251 #       is done by passing "-lang-c89" to cpp, by passing "-Wp,-lang-c89" to
2252 #       gcc.  Old gcc doesn't support -std, and new gcc doesn't support -lang.
2253 #       so much for compatibility!)
2254 #
2255 #       UPDATE: apparently there is NO WAY to tell gcc 3.2.2 to require that
2256 #       declarations preceed statements, without resorting to "-pedantic".
2257 #       This means that there is no way to get gcc3 to issue warnings that
2258 #       ensure that your code complies with the ANSI/ISO C89 standard, without
2259 #       also drowning in totally useless warnings.  Thank you master may I
2260 #       have another.
2261 #
2262 #       So, I give up, let's just use -pedantic.
2263 #
2264 ###############################################################################
2265
2266
2267
2268
2269
2270
2271 ###############################################################################
2272 #
2273 #       Function to figure out how to create directory trees.
2274 #
2275 ###############################################################################
2276
2277
2278
2279
2280 ###############################################################################
2281 #
2282 #       Function to check whether gettimeofday() exists, and how to call it.
2283 #       This may define HAVE_GETTIMEOFDAY and GETTIMEOFDAY_TWO_ARGS.
2284 #
2285 ###############################################################################
2286
2287
2288
2289
2290 ###############################################################################
2291 #
2292 #       Function to find perl5 (defines PERL and PERL_VERSION.)
2293 #
2294 ###############################################################################
2295
2296 # M4 sucks!!  perl sucks too!!
2297
2298 perl_version_cmd='print $]'
2299
2300
2301
2302
2303
2304 ###############################################################################
2305 #
2306 #       Function to demand "bc".  Losers.
2307 #
2308 ###############################################################################
2309
2310
2311
2312 ###############################################################################
2313 #
2314 #       Functions to check how to do ICMP PING requests.
2315 #
2316 ###############################################################################
2317
2318
2319
2320
2321
2322
2323 ###############################################################################
2324 #
2325 #       Functions to check for various X11 crap.
2326 #
2327 ###############################################################################
2328
2329 # Try and find the app-defaults directory.
2330 # It sucks that autoconf doesn't do this already...
2331 #
2332
2333
2334 ###############################################################################
2335 #
2336 #       Handle the --with-x-app-defaults option HERE
2337 #
2338 ###############################################################################
2339
2340
2341 # Check whether --with-x-app-defaults was given.
2342 if test "${with_x_app_defaults+set}" = set; then
2343   withval=$with_x_app_defaults; ac_cv_x_app_defaults="$withval"
2344 else
2345   eval ac_x_app_defaults="$withval"
2346 fi
2347
2348
2349
2350
2351
2352
2353
2354
2355
2356
2357
2358 # Random special-cases for X on certain pathological OSes.
2359 # You know who you are.
2360 #
2361
2362
2363
2364
2365 ###############################################################################
2366 #
2367 #       Some utility functions to make checking for X things easier.
2368 #
2369 ###############################################################################
2370
2371 # Like AC_CHECK_HEADER, but it uses the already-computed -I directories.
2372 #
2373
2374
2375 # Like AC_EGREP_HEADER, but it uses the already-computed -I directories.
2376 #
2377
2378
2379 # Like AC_TRY_COMPILE, but it uses the already-computed -I directories.
2380 #
2381
2382
2383
2384 # Like AC_CHECK_LIB, but it uses the already-computed -I and -L directories.
2385 # Use this sparingly; it probably doesn't work very well on X programs.
2386 #
2387
2388
2389 # Like AC_TRY_RUN, but it uses the already-computed -I directories.
2390 # (But not the -L directories!)
2391 #
2392
2393
2394
2395
2396 # Usage: HANDLE_X_PATH_ARG([variable_name],
2397 #                          [--command-line-option],
2398 #                          [descriptive string])
2399 #
2400 # All of the --with options take three forms:
2401 #
2402 #   --with-foo (or --with-foo=yes)
2403 #   --without-foo (or --with-foo=no)
2404 #   --with-foo=/DIR
2405 #
2406 # This function, HANDLE_X_PATH_ARG, deals with the /DIR case.  When it sees
2407 # a directory (string beginning with a slash) it checks to see whether
2408 # /DIR/include and /DIR/lib exist, and adds them to $X_CFLAGS and $X_LIBS
2409 # as appropriate.
2410 #
2411
2412
2413
2414
2415 ###############################################################################
2416 ###############################################################################
2417 #
2418 #       End of function definitions.  Now start actually executing stuff.
2419 #
2420 ###############################################################################
2421 ###############################################################################
2422
2423 # WTF!  autoconf emits this *way* too late.  Do it earlier.
2424 test "x$prefix" = xNONE && prefix=$ac_default_prefix
2425 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
2426
2427
2428 # random compiler setup
2429 ac_aux_dir=
2430 for ac_dir in "$srcdir" "$srcdir/.." "$srcdir/../.."; do
2431   if test -f "$ac_dir/install-sh"; then
2432     ac_aux_dir=$ac_dir
2433     ac_install_sh="$ac_aux_dir/install-sh -c"
2434     break
2435   elif test -f "$ac_dir/install.sh"; then
2436     ac_aux_dir=$ac_dir
2437     ac_install_sh="$ac_aux_dir/install.sh -c"
2438     break
2439   elif test -f "$ac_dir/shtool"; then
2440     ac_aux_dir=$ac_dir
2441     ac_install_sh="$ac_aux_dir/shtool install -c"
2442     break
2443   fi
2444 done
2445 if test -z "$ac_aux_dir"; then
2446   { { $as_echo "$as_me:$LINENO: error: cannot find install-sh or install.sh in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" >&5
2447 $as_echo "$as_me: error: cannot find install-sh or install.sh in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" >&2;}
2448    { (exit 1); exit 1; }; }
2449 fi
2450
2451 # These three variables are undocumented and unsupported,
2452 # and are intended to be withdrawn in a future Autoconf release.
2453 # They can cause serious problems if a builder's source tree is in a directory
2454 # whose full name contains unusual characters.
2455 ac_config_guess="$SHELL $ac_aux_dir/config.guess"  # Please don't use this var.
2456 ac_config_sub="$SHELL $ac_aux_dir/config.sub"  # Please don't use this var.
2457 ac_configure="$SHELL $ac_aux_dir/configure"  # Please don't use this var.
2458
2459
2460 # Make sure we can run config.sub.
2461 $SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 ||
2462   { { $as_echo "$as_me:$LINENO: error: cannot run $SHELL $ac_aux_dir/config.sub" >&5
2463 $as_echo "$as_me: error: cannot run $SHELL $ac_aux_dir/config.sub" >&2;}
2464    { (exit 1); exit 1; }; }
2465
2466 { $as_echo "$as_me:$LINENO: checking build system type" >&5
2467 $as_echo_n "checking build system type... " >&6; }
2468 if test "${ac_cv_build+set}" = set; then
2469   $as_echo_n "(cached) " >&6
2470 else
2471   ac_build_alias=$build_alias
2472 test "x$ac_build_alias" = x &&
2473   ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"`
2474 test "x$ac_build_alias" = x &&
2475   { { $as_echo "$as_me:$LINENO: error: cannot guess build type; you must specify one" >&5
2476 $as_echo "$as_me: error: cannot guess build type; you must specify one" >&2;}
2477    { (exit 1); exit 1; }; }
2478 ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` ||
2479   { { $as_echo "$as_me:$LINENO: error: $SHELL $ac_aux_dir/config.sub $ac_build_alias failed" >&5
2480 $as_echo "$as_me: error: $SHELL $ac_aux_dir/config.sub $ac_build_alias failed" >&2;}
2481    { (exit 1); exit 1; }; }
2482
2483 fi
2484 { $as_echo "$as_me:$LINENO: result: $ac_cv_build" >&5
2485 $as_echo "$ac_cv_build" >&6; }
2486 case $ac_cv_build in
2487 *-*-*) ;;
2488 *) { { $as_echo "$as_me:$LINENO: error: invalid value of canonical build" >&5
2489 $as_echo "$as_me: error: invalid value of canonical build" >&2;}
2490    { (exit 1); exit 1; }; };;
2491 esac
2492 build=$ac_cv_build
2493 ac_save_IFS=$IFS; IFS='-'
2494 set x $ac_cv_build
2495 shift
2496 build_cpu=$1
2497 build_vendor=$2
2498 shift; shift
2499 # Remember, the first character of IFS is used to create $*,
2500 # except with old shells:
2501 build_os=$*
2502 IFS=$ac_save_IFS
2503 case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac
2504
2505
2506 { $as_echo "$as_me:$LINENO: checking host system type" >&5
2507 $as_echo_n "checking host system type... " >&6; }
2508 if test "${ac_cv_host+set}" = set; then
2509   $as_echo_n "(cached) " >&6
2510 else
2511   if test "x$host_alias" = x; then
2512   ac_cv_host=$ac_cv_build
2513 else
2514   ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` ||
2515     { { $as_echo "$as_me:$LINENO: error: $SHELL $ac_aux_dir/config.sub $host_alias failed" >&5
2516 $as_echo "$as_me: error: $SHELL $ac_aux_dir/config.sub $host_alias failed" >&2;}
2517    { (exit 1); exit 1; }; }
2518 fi
2519
2520 fi
2521 { $as_echo "$as_me:$LINENO: result: $ac_cv_host" >&5
2522 $as_echo "$ac_cv_host" >&6; }
2523 case $ac_cv_host in
2524 *-*-*) ;;
2525 *) { { $as_echo "$as_me:$LINENO: error: invalid value of canonical host" >&5
2526 $as_echo "$as_me: error: invalid value of canonical host" >&2;}
2527    { (exit 1); exit 1; }; };;
2528 esac
2529 host=$ac_cv_host
2530 ac_save_IFS=$IFS; IFS='-'
2531 set x $ac_cv_host
2532 shift
2533 host_cpu=$1
2534 host_vendor=$2
2535 shift; shift
2536 # Remember, the first character of IFS is used to create $*,
2537 # except with old shells:
2538 host_os=$*
2539 IFS=$ac_save_IFS
2540 case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac
2541
2542
2543
2544 ac_ext=c
2545 ac_cpp='$CPP $CPPFLAGS'
2546 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2547 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2548 ac_compiler_gnu=$ac_cv_c_compiler_gnu
2549 if test -n "$ac_tool_prefix"; then
2550   # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
2551 set dummy ${ac_tool_prefix}gcc; ac_word=$2
2552 { $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
2553 $as_echo_n "checking for $ac_word... " >&6; }
2554 if test "${ac_cv_prog_CC+set}" = set; then
2555   $as_echo_n "(cached) " >&6
2556 else
2557   if test -n "$CC"; then
2558   ac_cv_prog_CC="$CC" # Let the user override the test.
2559 else
2560 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2561 for as_dir in $PATH
2562 do
2563   IFS=$as_save_IFS
2564   test -z "$as_dir" && as_dir=.
2565   for ac_exec_ext in '' $ac_executable_extensions; do
2566   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
2567     ac_cv_prog_CC="${ac_tool_prefix}gcc"
2568     $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
2569     break 2
2570   fi
2571 done
2572 done
2573 IFS=$as_save_IFS
2574
2575 fi
2576 fi
2577 CC=$ac_cv_prog_CC
2578 if test -n "$CC"; then
2579   { $as_echo "$as_me:$LINENO: result: $CC" >&5
2580 $as_echo "$CC" >&6; }
2581 else
2582   { $as_echo "$as_me:$LINENO: result: no" >&5
2583 $as_echo "no" >&6; }
2584 fi
2585
2586
2587 fi
2588 if test -z "$ac_cv_prog_CC"; then
2589   ac_ct_CC=$CC
2590   # Extract the first word of "gcc", so it can be a program name with args.
2591 set dummy gcc; ac_word=$2
2592 { $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
2593 $as_echo_n "checking for $ac_word... " >&6; }
2594 if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
2595   $as_echo_n "(cached) " >&6
2596 else
2597   if test -n "$ac_ct_CC"; then
2598   ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
2599 else
2600 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2601 for as_dir in $PATH
2602 do
2603   IFS=$as_save_IFS
2604   test -z "$as_dir" && as_dir=.
2605   for ac_exec_ext in '' $ac_executable_extensions; do
2606   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
2607     ac_cv_prog_ac_ct_CC="gcc"
2608     $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
2609     break 2
2610   fi
2611 done
2612 done
2613 IFS=$as_save_IFS
2614
2615 fi
2616 fi
2617 ac_ct_CC=$ac_cv_prog_ac_ct_CC
2618 if test -n "$ac_ct_CC"; then
2619   { $as_echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
2620 $as_echo "$ac_ct_CC" >&6; }
2621 else
2622   { $as_echo "$as_me:$LINENO: result: no" >&5
2623 $as_echo "no" >&6; }
2624 fi
2625
2626   if test "x$ac_ct_CC" = x; then
2627     CC=""
2628   else
2629     case $cross_compiling:$ac_tool_warned in
2630 yes:)
2631 { $as_echo "$as_me:$LINENO: WARNING: using cross tools not prefixed with host triplet" >&5
2632 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
2633 ac_tool_warned=yes ;;
2634 esac
2635     CC=$ac_ct_CC
2636   fi
2637 else
2638   CC="$ac_cv_prog_CC"
2639 fi
2640
2641 if test -z "$CC"; then
2642           if test -n "$ac_tool_prefix"; then
2643     # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args.
2644 set dummy ${ac_tool_prefix}cc; ac_word=$2
2645 { $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
2646 $as_echo_n "checking for $ac_word... " >&6; }
2647 if test "${ac_cv_prog_CC+set}" = set; then
2648   $as_echo_n "(cached) " >&6
2649 else
2650   if test -n "$CC"; then
2651   ac_cv_prog_CC="$CC" # Let the user override the test.
2652 else
2653 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2654 for as_dir in $PATH
2655 do
2656   IFS=$as_save_IFS
2657   test -z "$as_dir" && as_dir=.
2658   for ac_exec_ext in '' $ac_executable_extensions; do
2659   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
2660     ac_cv_prog_CC="${ac_tool_prefix}cc"
2661     $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
2662     break 2
2663   fi
2664 done
2665 done
2666 IFS=$as_save_IFS
2667
2668 fi
2669 fi
2670 CC=$ac_cv_prog_CC
2671 if test -n "$CC"; then
2672   { $as_echo "$as_me:$LINENO: result: $CC" >&5
2673 $as_echo "$CC" >&6; }
2674 else
2675   { $as_echo "$as_me:$LINENO: result: no" >&5
2676 $as_echo "no" >&6; }
2677 fi
2678
2679
2680   fi
2681 fi
2682 if test -z "$CC"; then
2683   # Extract the first word of "cc", so it can be a program name with args.
2684 set dummy cc; ac_word=$2
2685 { $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
2686 $as_echo_n "checking for $ac_word... " >&6; }
2687 if test "${ac_cv_prog_CC+set}" = set; then
2688   $as_echo_n "(cached) " >&6
2689 else
2690   if test -n "$CC"; then
2691   ac_cv_prog_CC="$CC" # Let the user override the test.
2692 else
2693   ac_prog_rejected=no
2694 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2695 for as_dir in $PATH
2696 do
2697   IFS=$as_save_IFS
2698   test -z "$as_dir" && as_dir=.
2699   for ac_exec_ext in '' $ac_executable_extensions; do
2700   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
2701     if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
2702        ac_prog_rejected=yes
2703        continue
2704      fi
2705     ac_cv_prog_CC="cc"
2706     $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
2707     break 2
2708   fi
2709 done
2710 done
2711 IFS=$as_save_IFS
2712
2713 if test $ac_prog_rejected = yes; then
2714   # We found a bogon in the path, so make sure we never use it.
2715   set dummy $ac_cv_prog_CC
2716   shift
2717   if test $# != 0; then
2718     # We chose a different compiler from the bogus one.
2719     # However, it has the same basename, so the bogon will be chosen
2720     # first if we set CC to just the basename; use the full file name.
2721     shift
2722     ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@"
2723   fi
2724 fi
2725 fi
2726 fi
2727 CC=$ac_cv_prog_CC
2728 if test -n "$CC"; then
2729   { $as_echo "$as_me:$LINENO: result: $CC" >&5
2730 $as_echo "$CC" >&6; }
2731 else
2732   { $as_echo "$as_me:$LINENO: result: no" >&5
2733 $as_echo "no" >&6; }
2734 fi
2735
2736
2737 fi
2738 if test -z "$CC"; then
2739   if test -n "$ac_tool_prefix"; then
2740   for ac_prog in cl.exe
2741   do
2742     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
2743 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
2744 { $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
2745 $as_echo_n "checking for $ac_word... " >&6; }
2746 if test "${ac_cv_prog_CC+set}" = set; then
2747   $as_echo_n "(cached) " >&6
2748 else
2749   if test -n "$CC"; then
2750   ac_cv_prog_CC="$CC" # Let the user override the test.
2751 else
2752 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2753 for as_dir in $PATH
2754 do
2755   IFS=$as_save_IFS
2756   test -z "$as_dir" && as_dir=.
2757   for ac_exec_ext in '' $ac_executable_extensions; do
2758   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
2759     ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
2760     $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
2761     break 2
2762   fi
2763 done
2764 done
2765 IFS=$as_save_IFS
2766
2767 fi
2768 fi
2769 CC=$ac_cv_prog_CC
2770 if test -n "$CC"; then
2771   { $as_echo "$as_me:$LINENO: result: $CC" >&5
2772 $as_echo "$CC" >&6; }
2773 else
2774   { $as_echo "$as_me:$LINENO: result: no" >&5
2775 $as_echo "no" >&6; }
2776 fi
2777
2778
2779     test -n "$CC" && break
2780   done
2781 fi
2782 if test -z "$CC"; then
2783   ac_ct_CC=$CC
2784   for ac_prog in cl.exe
2785 do
2786   # Extract the first word of "$ac_prog", so it can be a program name with args.
2787 set dummy $ac_prog; ac_word=$2
2788 { $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
2789 $as_echo_n "checking for $ac_word... " >&6; }
2790 if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
2791   $as_echo_n "(cached) " >&6
2792 else
2793   if test -n "$ac_ct_CC"; then
2794   ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
2795 else
2796 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2797 for as_dir in $PATH
2798 do
2799   IFS=$as_save_IFS
2800   test -z "$as_dir" && as_dir=.
2801   for ac_exec_ext in '' $ac_executable_extensions; do
2802   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
2803     ac_cv_prog_ac_ct_CC="$ac_prog"
2804     $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
2805     break 2
2806   fi
2807 done
2808 done
2809 IFS=$as_save_IFS
2810
2811 fi
2812 fi
2813 ac_ct_CC=$ac_cv_prog_ac_ct_CC
2814 if test -n "$ac_ct_CC"; then
2815   { $as_echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
2816 $as_echo "$ac_ct_CC" >&6; }
2817 else
2818   { $as_echo "$as_me:$LINENO: result: no" >&5
2819 $as_echo "no" >&6; }
2820 fi
2821
2822
2823   test -n "$ac_ct_CC" && break
2824 done
2825
2826   if test "x$ac_ct_CC" = x; then
2827     CC=""
2828   else
2829     case $cross_compiling:$ac_tool_warned in
2830 yes:)
2831 { $as_echo "$as_me:$LINENO: WARNING: using cross tools not prefixed with host triplet" >&5
2832 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
2833 ac_tool_warned=yes ;;
2834 esac
2835     CC=$ac_ct_CC
2836   fi
2837 fi
2838
2839 fi
2840
2841
2842 test -z "$CC" && { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5
2843 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2844 { { $as_echo "$as_me:$LINENO: error: no acceptable C compiler found in \$PATH
2845 See \`config.log' for more details." >&5
2846 $as_echo "$as_me: error: no acceptable C compiler found in \$PATH
2847 See \`config.log' for more details." >&2;}
2848    { (exit 1); exit 1; }; }; }
2849
2850 # Provide some information about the compiler.
2851 $as_echo "$as_me:$LINENO: checking for C compiler version" >&5
2852 set X $ac_compile
2853 ac_compiler=$2
2854 { (ac_try="$ac_compiler --version >&5"
2855 case "(($ac_try" in
2856   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2857   *) ac_try_echo=$ac_try;;
2858 esac
2859 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
2860 $as_echo "$ac_try_echo") >&5
2861   (eval "$ac_compiler --version >&5") 2>&5
2862   ac_status=$?
2863   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
2864   (exit $ac_status); }
2865 { (ac_try="$ac_compiler -v >&5"
2866 case "(($ac_try" in
2867   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2868   *) ac_try_echo=$ac_try;;
2869 esac
2870 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
2871 $as_echo "$ac_try_echo") >&5
2872   (eval "$ac_compiler -v >&5") 2>&5
2873   ac_status=$?
2874   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
2875   (exit $ac_status); }
2876 { (ac_try="$ac_compiler -V >&5"
2877 case "(($ac_try" in
2878   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2879   *) ac_try_echo=$ac_try;;
2880 esac
2881 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
2882 $as_echo "$ac_try_echo") >&5
2883   (eval "$ac_compiler -V >&5") 2>&5
2884   ac_status=$?
2885   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
2886   (exit $ac_status); }
2887
2888 cat >conftest.$ac_ext <<_ACEOF
2889 /* confdefs.h.  */
2890 _ACEOF
2891 cat confdefs.h >>conftest.$ac_ext
2892 cat >>conftest.$ac_ext <<_ACEOF
2893 /* end confdefs.h.  */
2894
2895 int
2896 main ()
2897 {
2898
2899   ;
2900   return 0;
2901 }
2902 _ACEOF
2903 ac_clean_files_save=$ac_clean_files
2904 ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out"
2905 # Try to create an executable without -o first, disregard a.out.
2906 # It will help us diagnose broken compilers, and finding out an intuition
2907 # of exeext.
2908 { $as_echo "$as_me:$LINENO: checking for C compiler default output file name" >&5
2909 $as_echo_n "checking for C compiler default output file name... " >&6; }
2910 ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
2911
2912 # The possible output files:
2913 ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*"
2914
2915 ac_rmfiles=
2916 for ac_file in $ac_files
2917 do
2918   case $ac_file in
2919     *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
2920     * ) ac_rmfiles="$ac_rmfiles $ac_file";;
2921   esac
2922 done
2923 rm -f $ac_rmfiles
2924
2925 if { (ac_try="$ac_link_default"
2926 case "(($ac_try" in
2927   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2928   *) ac_try_echo=$ac_try;;
2929 esac
2930 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
2931 $as_echo "$ac_try_echo") >&5
2932   (eval "$ac_link_default") 2>&5
2933   ac_status=$?
2934   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
2935   (exit $ac_status); }; then
2936   # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
2937 # So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
2938 # in a Makefile.  We should not override ac_cv_exeext if it was cached,
2939 # so that the user can short-circuit this test for compilers unknown to
2940 # Autoconf.
2941 for ac_file in $ac_files ''
2942 do
2943   test -f "$ac_file" || continue
2944   case $ac_file in
2945     *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj )
2946         ;;
2947     [ab].out )
2948         # We found the default executable, but exeext='' is most
2949         # certainly right.
2950         break;;
2951     *.* )
2952         if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no;
2953         then :; else
2954            ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
2955         fi
2956         # We set ac_cv_exeext here because the later test for it is not
2957         # safe: cross compilers may not add the suffix if given an `-o'
2958         # argument, so we may need to know it at that point already.
2959         # Even if this section looks crufty: it has the advantage of
2960         # actually working.
2961         break;;
2962     * )
2963         break;;
2964   esac
2965 done
2966 test "$ac_cv_exeext" = no && ac_cv_exeext=
2967
2968 else
2969   ac_file=''
2970 fi
2971
2972 { $as_echo "$as_me:$LINENO: result: $ac_file" >&5
2973 $as_echo "$ac_file" >&6; }
2974 if test -z "$ac_file"; then
2975   $as_echo "$as_me: failed program was:" >&5
2976 sed 's/^/| /' conftest.$ac_ext >&5
2977
2978 { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5
2979 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2980 { { $as_echo "$as_me:$LINENO: error: C compiler cannot create executables
2981 See \`config.log' for more details." >&5
2982 $as_echo "$as_me: error: C compiler cannot create executables
2983 See \`config.log' for more details." >&2;}
2984    { (exit 77); exit 77; }; }; }
2985 fi
2986
2987 ac_exeext=$ac_cv_exeext
2988
2989 # Check that the compiler produces executables we can run.  If not, either
2990 # the compiler is broken, or we cross compile.
2991 { $as_echo "$as_me:$LINENO: checking whether the C compiler works" >&5
2992 $as_echo_n "checking whether the C compiler works... " >&6; }
2993 # FIXME: These cross compiler hacks should be removed for Autoconf 3.0
2994 # If not cross compiling, check that we can run a simple program.
2995 if test "$cross_compiling" != yes; then
2996   if { ac_try='./$ac_file'
2997   { (case "(($ac_try" in
2998   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2999   *) ac_try_echo=$ac_try;;
3000 esac
3001 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
3002 $as_echo "$ac_try_echo") >&5
3003   (eval "$ac_try") 2>&5
3004   ac_status=$?
3005   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
3006   (exit $ac_status); }; }; then
3007     cross_compiling=no
3008   else
3009     if test "$cross_compiling" = maybe; then
3010         cross_compiling=yes
3011     else
3012         { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5
3013 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3014 { { $as_echo "$as_me:$LINENO: error: cannot run C compiled programs.
3015 If you meant to cross compile, use \`--host'.
3016 See \`config.log' for more details." >&5
3017 $as_echo "$as_me: error: cannot run C compiled programs.
3018 If you meant to cross compile, use \`--host'.
3019 See \`config.log' for more details." >&2;}
3020    { (exit 1); exit 1; }; }; }
3021     fi
3022   fi
3023 fi
3024 { $as_echo "$as_me:$LINENO: result: yes" >&5
3025 $as_echo "yes" >&6; }
3026
3027 rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out
3028 ac_clean_files=$ac_clean_files_save
3029 # Check that the compiler produces executables we can run.  If not, either
3030 # the compiler is broken, or we cross compile.
3031 { $as_echo "$as_me:$LINENO: checking whether we are cross compiling" >&5
3032 $as_echo_n "checking whether we are cross compiling... " >&6; }
3033 { $as_echo "$as_me:$LINENO: result: $cross_compiling" >&5
3034 $as_echo "$cross_compiling" >&6; }
3035
3036 { $as_echo "$as_me:$LINENO: checking for suffix of executables" >&5
3037 $as_echo_n "checking for suffix of executables... " >&6; }
3038 if { (ac_try="$ac_link"
3039 case "(($ac_try" in
3040   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3041   *) ac_try_echo=$ac_try;;
3042 esac
3043 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
3044 $as_echo "$ac_try_echo") >&5
3045   (eval "$ac_link") 2>&5
3046   ac_status=$?
3047   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
3048   (exit $ac_status); }; then
3049   # If both `conftest.exe' and `conftest' are `present' (well, observable)
3050 # catch `conftest.exe'.  For instance with Cygwin, `ls conftest' will
3051 # work properly (i.e., refer to `conftest.exe'), while it won't with
3052 # `rm'.
3053 for ac_file in conftest.exe conftest conftest.*; do
3054   test -f "$ac_file" || continue
3055   case $ac_file in
3056     *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
3057     *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
3058           break;;
3059     * ) break;;
3060   esac
3061 done
3062 else
3063   { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5
3064 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3065 { { $as_echo "$as_me:$LINENO: error: cannot compute suffix of executables: cannot compile and link
3066 See \`config.log' for more details." >&5
3067 $as_echo "$as_me: error: cannot compute suffix of executables: cannot compile and link
3068 See \`config.log' for more details." >&2;}
3069    { (exit 1); exit 1; }; }; }
3070 fi
3071
3072 rm -rf conftest$ac_cv_exeext
3073 { $as_echo "$as_me:$LINENO: result: $ac_cv_exeext" >&5
3074 $as_echo "$ac_cv_exeext" >&6; }
3075
3076 rm -rf conftest.$ac_ext
3077 EXEEXT=$ac_cv_exeext
3078 ac_exeext=$EXEEXT
3079 { $as_echo "$as_me:$LINENO: checking for suffix of object files" >&5
3080 $as_echo_n "checking for suffix of object files... " >&6; }
3081 if test "${ac_cv_objext+set}" = set; then
3082   $as_echo_n "(cached) " >&6
3083 else
3084   cat >conftest.$ac_ext <<_ACEOF
3085 /* confdefs.h.  */
3086 _ACEOF
3087 cat confdefs.h >>conftest.$ac_ext
3088 cat >>conftest.$ac_ext <<_ACEOF
3089 /* end confdefs.h.  */
3090
3091 int
3092 main ()
3093 {
3094
3095   ;
3096   return 0;
3097 }
3098 _ACEOF
3099 rm -rf conftest.o conftest.obj
3100 if { (ac_try="$ac_compile"
3101 case "(($ac_try" in
3102   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3103   *) ac_try_echo=$ac_try;;
3104 esac
3105 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
3106 $as_echo "$ac_try_echo") >&5
3107   (eval "$ac_compile") 2>&5
3108   ac_status=$?
3109   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
3110   (exit $ac_status); }; then
3111   for ac_file in conftest.o conftest.obj conftest.*; do
3112   test -f "$ac_file" || continue;
3113   case $ac_file in
3114     *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;;
3115     *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
3116        break;;
3117   esac
3118 done
3119 else
3120   $as_echo "$as_me: failed program was:" >&5
3121 sed 's/^/| /' conftest.$ac_ext >&5
3122
3123 { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5
3124 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3125 { { $as_echo "$as_me:$LINENO: error: cannot compute suffix of object files: cannot compile
3126 See \`config.log' for more details." >&5
3127 $as_echo "$as_me: error: cannot compute suffix of object files: cannot compile
3128 See \`config.log' for more details." >&2;}
3129    { (exit 1); exit 1; }; }; }
3130 fi
3131
3132 rm -rf conftest.$ac_cv_objext conftest.$ac_ext
3133 fi
3134 { $as_echo "$as_me:$LINENO: result: $ac_cv_objext" >&5
3135 $as_echo "$ac_cv_objext" >&6; }
3136 OBJEXT=$ac_cv_objext
3137 ac_objext=$OBJEXT
3138 { $as_echo "$as_me:$LINENO: checking whether we are using the GNU C compiler" >&5
3139 $as_echo_n "checking whether we are using the GNU C compiler... " >&6; }
3140 if test "${ac_cv_c_compiler_gnu+set}" = set; then
3141   $as_echo_n "(cached) " >&6
3142 else
3143   cat >conftest.$ac_ext <<_ACEOF
3144 /* confdefs.h.  */
3145 _ACEOF
3146 cat confdefs.h >>conftest.$ac_ext
3147 cat >>conftest.$ac_ext <<_ACEOF
3148 /* end confdefs.h.  */
3149
3150 int
3151 main ()
3152 {
3153 #ifndef __GNUC__
3154        choke me
3155 #endif
3156
3157   ;
3158   return 0;
3159 }
3160 _ACEOF
3161 rm -rf conftest.$ac_objext
3162 if { (ac_try="$ac_compile"
3163 case "(($ac_try" in
3164   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3165   *) ac_try_echo=$ac_try;;
3166 esac
3167 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
3168 $as_echo "$ac_try_echo") >&5
3169   (eval "$ac_compile") 2>conftest.er1
3170   ac_status=$?
3171   grep -v '^ *+' conftest.er1 >conftest.err
3172   rm -rf conftest.er1
3173   cat conftest.err >&5
3174   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
3175   (exit $ac_status); } && {
3176          test -z "$ac_c_werror_flag" ||
3177          test ! -s conftest.err
3178        } && test -s conftest.$ac_objext; then
3179   ac_compiler_gnu=yes
3180 else
3181   $as_echo "$as_me: failed program was:" >&5
3182 sed 's/^/| /' conftest.$ac_ext >&5
3183
3184         ac_compiler_gnu=no
3185 fi
3186
3187 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3188 ac_cv_c_compiler_gnu=$ac_compiler_gnu
3189
3190 fi
3191 { $as_echo "$as_me:$LINENO: result: $ac_cv_c_compiler_gnu" >&5
3192 $as_echo "$ac_cv_c_compiler_gnu" >&6; }
3193 if test $ac_compiler_gnu = yes; then
3194   GCC=yes
3195 else
3196   GCC=
3197 fi
3198 ac_test_CFLAGS=${CFLAGS+set}
3199 ac_save_CFLAGS=$CFLAGS
3200 { $as_echo "$as_me:$LINENO: checking whether $CC accepts -g" >&5
3201 $as_echo_n "checking whether $CC accepts -g... " >&6; }
3202 if test "${ac_cv_prog_cc_g+set}" = set; then
3203   $as_echo_n "(cached) " >&6
3204 else
3205   ac_save_c_werror_flag=$ac_c_werror_flag
3206    ac_c_werror_flag=yes
3207    ac_cv_prog_cc_g=no
3208    CFLAGS="-g"
3209    cat >conftest.$ac_ext <<_ACEOF
3210 /* confdefs.h.  */
3211 _ACEOF
3212 cat confdefs.h >>conftest.$ac_ext
3213 cat >>conftest.$ac_ext <<_ACEOF
3214 /* end confdefs.h.  */
3215
3216 int
3217 main ()
3218 {
3219
3220   ;
3221   return 0;
3222 }
3223 _ACEOF
3224 rm -rf conftest.$ac_objext
3225 if { (ac_try="$ac_compile"
3226 case "(($ac_try" in
3227   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3228   *) ac_try_echo=$ac_try;;
3229 esac
3230 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
3231 $as_echo "$ac_try_echo") >&5
3232   (eval "$ac_compile") 2>conftest.er1
3233   ac_status=$?
3234   grep -v '^ *+' conftest.er1 >conftest.err
3235   rm -rf conftest.er1
3236   cat conftest.err >&5
3237   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
3238   (exit $ac_status); } && {
3239          test -z "$ac_c_werror_flag" ||
3240          test ! -s conftest.err
3241        } && test -s conftest.$ac_objext; then
3242   ac_cv_prog_cc_g=yes
3243 else
3244   $as_echo "$as_me: failed program was:" >&5
3245 sed 's/^/| /' conftest.$ac_ext >&5
3246
3247         CFLAGS=""
3248       cat >conftest.$ac_ext <<_ACEOF
3249 /* confdefs.h.  */
3250 _ACEOF
3251 cat confdefs.h >>conftest.$ac_ext
3252 cat >>conftest.$ac_ext <<_ACEOF
3253 /* end confdefs.h.  */
3254
3255 int
3256 main ()
3257 {
3258
3259   ;
3260   return 0;
3261 }
3262 _ACEOF
3263 rm -rf conftest.$ac_objext
3264 if { (ac_try="$ac_compile"
3265 case "(($ac_try" in
3266   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3267   *) ac_try_echo=$ac_try;;
3268 esac
3269 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
3270 $as_echo "$ac_try_echo") >&5
3271   (eval "$ac_compile") 2>conftest.er1
3272   ac_status=$?
3273   grep -v '^ *+' conftest.er1 >conftest.err
3274   rm -rf conftest.er1
3275   cat conftest.err >&5
3276   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
3277   (exit $ac_status); } && {
3278          test -z "$ac_c_werror_flag" ||
3279          test ! -s conftest.err
3280        } && test -s conftest.$ac_objext; then
3281   :
3282 else
3283   $as_echo "$as_me: failed program was:" >&5
3284 sed 's/^/| /' conftest.$ac_ext >&5
3285
3286         ac_c_werror_flag=$ac_save_c_werror_flag
3287          CFLAGS="-g"
3288          cat >conftest.$ac_ext <<_ACEOF
3289 /* confdefs.h.  */
3290 _ACEOF
3291 cat confdefs.h >>conftest.$ac_ext
3292 cat >>conftest.$ac_ext <<_ACEOF
3293 /* end confdefs.h.  */
3294
3295 int
3296 main ()
3297 {
3298
3299   ;
3300   return 0;
3301 }
3302 _ACEOF
3303 rm -rf conftest.$ac_objext
3304 if { (ac_try="$ac_compile"
3305 case "(($ac_try" in
3306   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3307   *) ac_try_echo=$ac_try;;
3308 esac
3309 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
3310 $as_echo "$ac_try_echo") >&5
3311   (eval "$ac_compile") 2>conftest.er1
3312   ac_status=$?
3313   grep -v '^ *+' conftest.er1 >conftest.err
3314   rm -rf conftest.er1
3315   cat conftest.err >&5
3316   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
3317   (exit $ac_status); } && {
3318          test -z "$ac_c_werror_flag" ||
3319          test ! -s conftest.err
3320        } && test -s conftest.$ac_objext; then
3321   ac_cv_prog_cc_g=yes
3322 else
3323   $as_echo "$as_me: failed program was:" >&5
3324 sed 's/^/| /' conftest.$ac_ext >&5
3325
3326
3327 fi
3328
3329 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3330 fi
3331
3332 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3333 fi
3334
3335 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3336    ac_c_werror_flag=$ac_save_c_werror_flag
3337 fi
3338 { $as_echo "$as_me:$LINENO: result: $ac_cv_prog_cc_g" >&5
3339 $as_echo "$ac_cv_prog_cc_g" >&6; }
3340 if test "$ac_test_CFLAGS" = set; then
3341   CFLAGS=$ac_save_CFLAGS
3342 elif test $ac_cv_prog_cc_g = yes; then
3343   if test "$GCC" = yes; then
3344     CFLAGS="-g -O2"
3345   else
3346     CFLAGS="-g"
3347   fi
3348 else
3349   if test "$GCC" = yes; then
3350     CFLAGS="-O2"
3351   else
3352     CFLAGS=
3353   fi
3354 fi
3355 { $as_echo "$as_me:$LINENO: checking for $CC option to accept ISO C89" >&5
3356 $as_echo_n "checking for $CC option to accept ISO C89... " >&6; }
3357 if test "${ac_cv_prog_cc_c89+set}" = set; then
3358   $as_echo_n "(cached) " >&6
3359 else
3360   ac_cv_prog_cc_c89=no
3361 ac_save_CC=$CC
3362 cat >conftest.$ac_ext <<_ACEOF
3363 /* confdefs.h.  */
3364 _ACEOF
3365 cat confdefs.h >>conftest.$ac_ext
3366 cat >>conftest.$ac_ext <<_ACEOF
3367 /* end confdefs.h.  */
3368 #include <stdarg.h>
3369 #include <stdio.h>
3370 #include <sys/types.h>
3371 #include <sys/stat.h>
3372 /* Most of the following tests are stolen from RCS 5.7's src/conf.sh.  */
3373 struct buf { int x; };
3374 FILE * (*rcsopen) (struct buf *, struct stat *, int);
3375 static char *e (p, i)
3376      char **p;
3377      int i;
3378 {
3379   return p[i];
3380 }
3381 static char *f (char * (*g) (char **, int), char **p, ...)
3382 {
3383   char *s;
3384   va_list v;
3385   va_start (v,p);
3386   s = g (p, va_arg (v,int));
3387   va_end (v);
3388   return s;
3389 }
3390
3391 /* OSF 4.0 Compaq cc is some sort of almost-ANSI by default.  It has
3392    function prototypes and stuff, but not '\xHH' hex character constants.
3393    These don't provoke an error unfortunately, instead are silently treated
3394    as 'x'.  The following induces an error, until -std is added to get
3395    proper ANSI mode.  Curiously '\x00'!='x' always comes out true, for an
3396    array size at least.  It's necessary to write '\x00'==0 to get something
3397    that's true only with -std.  */
3398 int osf4_cc_array ['\x00' == 0 ? 1 : -1];
3399
3400 /* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
3401    inside strings and character constants.  */
3402 #define FOO(x) 'x'
3403 int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
3404
3405 int test (int i, double x);
3406 struct s1 {int (*f) (int a);};
3407 struct s2 {int (*f) (double a);};
3408 int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
3409 int argc;
3410 char **argv;
3411 int
3412 main ()
3413 {
3414 return f (e, argv, 0) != argv[0]  ||  f (e, argv, 1) != argv[1];
3415   ;
3416   return 0;
3417 }
3418 _ACEOF
3419 for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
3420         -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
3421 do
3422   CC="$ac_save_CC $ac_arg"
3423   rm -rf conftest.$ac_objext
3424 if { (ac_try="$ac_compile"
3425 case "(($ac_try" in
3426   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3427   *) ac_try_echo=$ac_try;;
3428 esac
3429 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
3430 $as_echo "$ac_try_echo") >&5
3431   (eval "$ac_compile") 2>conftest.er1
3432   ac_status=$?
3433   grep -v '^ *+' conftest.er1 >conftest.err
3434   rm -rf conftest.er1
3435   cat conftest.err >&5
3436   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
3437   (exit $ac_status); } && {
3438          test -z "$ac_c_werror_flag" ||
3439          test ! -s conftest.err
3440        } && test -s conftest.$ac_objext; then
3441   ac_cv_prog_cc_c89=$ac_arg
3442 else
3443   $as_echo "$as_me: failed program was:" >&5
3444 sed 's/^/| /' conftest.$ac_ext >&5
3445
3446
3447 fi
3448
3449 rm -f core conftest.err conftest.$ac_objext
3450   test "x$ac_cv_prog_cc_c89" != "xno" && break
3451 done
3452 rm -rf conftest.$ac_ext
3453 CC=$ac_save_CC
3454
3455 fi
3456 # AC_CACHE_VAL
3457 case "x$ac_cv_prog_cc_c89" in
3458   x)
3459     { $as_echo "$as_me:$LINENO: result: none needed" >&5
3460 $as_echo "none needed" >&6; } ;;
3461   xno)
3462     { $as_echo "$as_me:$LINENO: result: unsupported" >&5
3463 $as_echo "unsupported" >&6; } ;;
3464   *)
3465     CC="$CC $ac_cv_prog_cc_c89"
3466     { $as_echo "$as_me:$LINENO: result: $ac_cv_prog_cc_c89" >&5
3467 $as_echo "$ac_cv_prog_cc_c89" >&6; } ;;
3468 esac
3469
3470
3471 ac_ext=c
3472 ac_cpp='$CPP $CPPFLAGS'
3473 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3474 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3475 ac_compiler_gnu=$ac_cv_c_compiler_gnu
3476
3477
3478   if test -z "$GCC"; then
3479     # not using GCC
3480     { $as_echo "$as_me:$LINENO: checking how to request ANSI compilation" >&5
3481 $as_echo_n "checking how to request ANSI compilation... " >&6; }
3482     case "$host" in
3483       *-hpux* )
3484         { $as_echo "$as_me:$LINENO: result: HPUX: adding -Ae" >&5
3485 $as_echo "HPUX: adding -Ae" >&6; }
3486         CC="$CC -Ae"
3487       ;;
3488       *-aix* )
3489         { $as_echo "$as_me:$LINENO: result: AIX: adding -qlanglvl=ansi -qhalt=e" >&5
3490 $as_echo "AIX: adding -qlanglvl=ansi -qhalt=e" >&6; }
3491         CC="$CC -qlanglvl=ansi -qhalt=e"
3492       ;;
3493       *-dec-* )
3494         { $as_echo "$as_me:$LINENO: result: DEC: adding -std1 -ieee" >&5
3495 $as_echo "DEC: adding -std1 -ieee" >&6; }
3496         CC="$CC -std1"
3497       ;;
3498       *)
3499         { $as_echo "$as_me:$LINENO: result: no idea" >&5
3500 $as_echo "no idea" >&6; }
3501       ;;
3502     esac
3503   else
3504     # using GCC
3505     case "$host" in
3506       *-solaris*)
3507         { $as_echo "$as_me:$LINENO: result: Solaris: adding -D__EXTENSIONS__" >&5
3508 $as_echo "Solaris: adding -D__EXTENSIONS__" >&6; }
3509         CC="$CC -D__EXTENSIONS__"
3510       ;;
3511     esac
3512   fi
3513
3514   OBJCC="$CC"
3515
3516   { $as_echo "$as_me:$LINENO: checking whether the compiler works on ANSI C" >&5
3517 $as_echo_n "checking whether the compiler works on ANSI C... " >&6; }
3518   if test "$cross_compiling" = yes; then
3519   { { $as_echo "$as_me:$LINENO: error: Couldn't build even a trivial ANSI C program: check CC." >&5
3520 $as_echo "$as_me: error: Couldn't build even a trivial ANSI C program: check CC." >&2;}
3521    { (exit 1); exit 1; }; }
3522 else
3523   cat >conftest.$ac_ext <<_ACEOF
3524 /* confdefs.h.  */
3525 _ACEOF
3526 cat confdefs.h >>conftest.$ac_ext
3527 cat >>conftest.$ac_ext <<_ACEOF
3528 /* end confdefs.h.  */
3529  main(int ac, char **av) { return 0; }
3530 _ACEOF
3531 rm -rf conftest$ac_exeext
3532 if { (ac_try="$ac_link"
3533 case "(($ac_try" in
3534   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3535   *) ac_try_echo=$ac_try;;
3536 esac
3537 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
3538 $as_echo "$ac_try_echo") >&5
3539   (eval "$ac_link") 2>&5
3540   ac_status=$?
3541   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
3542   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
3543   { (case "(($ac_try" in
3544   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3545   *) ac_try_echo=$ac_try;;
3546 esac
3547 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
3548 $as_echo "$ac_try_echo") >&5
3549   (eval "$ac_try") 2>&5
3550   ac_status=$?
3551   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
3552   (exit $ac_status); }; }; then
3553   { $as_echo "$as_me:$LINENO: result: yes" >&5
3554 $as_echo "yes" >&6; }
3555 else
3556   $as_echo "$as_me: program exited with status $ac_status" >&5
3557 $as_echo "$as_me: failed program was:" >&5
3558 sed 's/^/| /' conftest.$ac_ext >&5
3559
3560 ( exit $ac_status )
3561 { $as_echo "$as_me:$LINENO: result: no" >&5
3562 $as_echo "no" >&6; }
3563      { { $as_echo "$as_me:$LINENO: error: Couldn't build even a trivial ANSI C program: check CC." >&5
3564 $as_echo "$as_me: error: Couldn't build even a trivial ANSI C program: check CC." >&2;}
3565    { (exit 1); exit 1; }; }
3566 fi
3567 rm -rf conftest.dSYM
3568 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
3569 fi
3570
3571
3572
3573   if test -n "$GCC"; then
3574     { $as_echo "$as_me:$LINENO: result: Turning on gcc compiler warnings." >&5
3575 $as_echo "Turning on gcc compiler warnings." >&6; }
3576     CC="$CC -pedantic -Wall -Wstrict-prototypes -Wnested-externs -Wmissing-prototypes"
3577     OBJCC="$OBJCC -Wall"
3578     # As of gcc 3.4, we have "-Wdeclaration-after-statement"
3579     # and so perhaps now we can do without -pedantic?
3580   else
3581     case "$host" in
3582       *-irix5* |*-irix6.0-3* )
3583         { $as_echo "$as_me:$LINENO: result: Turning on SGI compiler warnings." >&5
3584 $as_echo "Turning on SGI compiler warnings." >&6; }
3585         CC="$CC -fullwarn -use_readonly_const -rdata_shared -g3"
3586       ;;
3587 #     *-dec-osf* )
3588 #       if test -z "$GCC"; then
3589 #         AC_MSG_RESULT(Turning on DEC C compiler warnings.)
3590 #         CC="$CC -migrate -w0 -verbose -warnprotos"
3591 #       fi
3592 #     ;;
3593     esac
3594   fi
3595
3596 if test -n "$GCC"; then
3597    { $as_echo "$as_me:$LINENO: checking whether gcc accepts -Wno-overlength-strings" >&5
3598 $as_echo_n "checking whether gcc accepts -Wno-overlength-strings... " >&6; }
3599 if test "${ac_cv_gcc_accepts_no_overlength+set}" = set; then
3600   $as_echo_n "(cached) " >&6
3601 else
3602   rm -rf conftest.$ac_ext
3603      touch conftest.$ac_ext
3604      if ( ( gcc -c -Wno-overlength-strings conftest.$ac_ext -o/dev/null >/dev/null ) 2>&1 | \
3605           grep unrecognized >/dev/null ); then
3606        ac_cv_gcc_accepts_no_overlength=no
3607      else
3608        ac_cv_gcc_accepts_no_overlength=yes
3609        CC="$CC -Wno-overlength-strings"
3610      fi
3611 fi
3612 { $as_echo "$as_me:$LINENO: result: $ac_cv_gcc_accepts_no_overlength" >&5
3613 $as_echo "$ac_cv_gcc_accepts_no_overlength" >&6; }
3614    ac_gcc_accepts_no_overlength="$ac_cv_gcc_accepts_no_overlength"
3615   fi
3616
3617 if test -n "$GCC"; then
3618    { $as_echo "$as_me:$LINENO: checking whether gcc accepts -Wdeclaration-after-statement" >&5
3619 $as_echo_n "checking whether gcc accepts -Wdeclaration-after-statement... " >&6; }
3620 if test "${ac_cv_gcc_accepts_no_decl_after+set}" = set; then
3621   $as_echo_n "(cached) " >&6
3622 else
3623   rm -rf conftest.$ac_ext
3624      touch conftest.$ac_ext
3625      if ( ( gcc -c -Wdeclaration-after-statement conftest.$ac_ext -o/dev/null >/dev/null ) 2>&1 | \
3626           grep unrecognized >/dev/null ); then
3627        ac_cv_gcc_accepts_no_decl_after=no
3628      else
3629        ac_cv_gcc_accepts_no_decl_after=yes
3630        CC="$CC -Wdeclaration-after-statement"
3631      fi
3632 fi
3633 { $as_echo "$as_me:$LINENO: result: $ac_cv_gcc_accepts_no_decl_after" >&5
3634 $as_echo "$ac_cv_gcc_accepts_no_decl_after" >&6; }
3635    ac_gcc_accepts_no_decl_after="$ac_cv_gcc_accepts_no_decl_after"
3636   fi
3637
3638 if test -n "$GCC"; then
3639    { $as_echo "$as_me:$LINENO: checking whether gcc accepts -no-cpp-precomp" >&5
3640 $as_echo_n "checking whether gcc accepts -no-cpp-precomp... " >&6; }
3641 if test "${ac_cv_gcc_accepts_no_cpp_precomp+set}" = set; then
3642   $as_echo_n "(cached) " >&6
3643 else
3644   rm -rf conftest.$ac_ext
3645      touch conftest.$ac_ext
3646      if ( ( gcc -c -no-cpp-precomp conftest.$ac_ext -o/dev/null >/dev/null ) 2>&1 | \
3647           grep unrecognized >/dev/null ); then
3648        ac_cv_gcc_accepts_no_cpp_precomp=no
3649      else
3650        ac_cv_gcc_accepts_no_cpp_precomp=yes
3651        CC="$CC -no-cpp-precomp"
3652      fi
3653 fi
3654 { $as_echo "$as_me:$LINENO: result: $ac_cv_gcc_accepts_no_cpp_precomp" >&5
3655 $as_echo "$ac_cv_gcc_accepts_no_cpp_precomp" >&6; }
3656    ac_gcc_accepts_no_cpp_precomp="$ac_cv_gcc_accepts_no_cpp_precomp"
3657   fi
3658
3659 if test -n "$GCC"; then
3660
3661   case "$host" in
3662     *-darwin* )
3663       # Fucking Apple let // comments sneak into OpenGL headers, so
3664       # we *must* allow // comments when compiling on Mac OS 10.6!  FUCK!
3665     ;;
3666    *)
3667      if test -n "$GCC"; then
3668    { $as_echo "$as_me:$LINENO: checking whether gcc accepts -std=c89" >&5
3669 $as_echo_n "checking whether gcc accepts -std=c89... " >&6; }
3670 if test "${ac_cv_gcc_accepts_std+set}" = set; then
3671   $as_echo_n "(cached) " >&6
3672 else
3673   rm -rf conftest.$ac_ext
3674      touch conftest.$ac_ext
3675      if ( ( gcc -c -std=c89 conftest.$ac_ext -o/dev/null >/dev/null ) 2>&1 | \
3676           grep unrecognized >/dev/null ); then
3677        ac_cv_gcc_accepts_std=no
3678      else
3679        ac_cv_gcc_accepts_std=yes
3680        CC="$CC -std=c89"
3681      fi
3682 fi
3683 { $as_echo "$as_me:$LINENO: result: $ac_cv_gcc_accepts_std" >&5
3684 $as_echo "$ac_cv_gcc_accepts_std" >&6; }
3685    ac_gcc_accepts_std="$ac_cv_gcc_accepts_std"
3686   fi
3687
3688    ;;
3689   esac
3690
3691    { $as_echo "$as_me:$LINENO: result: Disabling C++ comments in ANSI C code." >&5
3692 $as_echo "Disabling C++ comments in ANSI C code." >&6; }
3693    #
3694    # The reason that // comments are banned from xscreensaver is that gcc is
3695    # basically the only compiler in the world that supports them in C code.
3696    # All other vendors support them only in their C++ compilers, not in their
3697    # ANSI C compilers.  This means that it's a portability problem: every time
3698    # these comments have snuck into the xscreensaver source code, I've gotten
3699    # complaints about it the next day.  So we turn off support for them in gcc
3700    # as well to prevent them from accidentially slipping in.
3701    #
3702    if test "$ac_gcc_accepts_std" = yes ; then
3703      #
3704      # -std=c89 defines __STRICT_ANSI__, which we don't want.
3705      # (That appears to be the only additional preprocessor symbol
3706      # it defines, in addition to the syntax changes it makes.)
3707      #
3708      # -std=gnu89 is no good, because // comments were a GNU extension
3709      # before they were in the ANSI C 99 spec...  (gcc 2.96 permits //
3710      # with -std=gnu89 but not with -std=c89.)
3711      #
3712      # $CC already contains "-std=c89" via AC_GCC_ACCEPTS_STD
3713      CC="$CC -U__STRICT_ANSI__"
3714 #   else
3715 #     # The old way:
3716 #     CC="$CC -Wp,-lang-c89"
3717    fi
3718   fi
3719
3720 ac_ext=c
3721 ac_cpp='$CPP $CPPFLAGS'
3722 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3723 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3724 ac_compiler_gnu=$ac_cv_c_compiler_gnu
3725 { $as_echo "$as_me:$LINENO: checking how to run the C preprocessor" >&5
3726 $as_echo_n "checking how to run the C preprocessor... " >&6; }
3727 # On Suns, sometimes $CPP names a directory.
3728 if test -n "$CPP" && test -d "$CPP"; then
3729   CPP=
3730 fi
3731 if test -z "$CPP"; then
3732   if test "${ac_cv_prog_CPP+set}" = set; then
3733   $as_echo_n "(cached) " >&6
3734 else
3735       # Double quotes because CPP needs to be expanded
3736     for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
3737     do
3738       ac_preproc_ok=false
3739 for ac_c_preproc_warn_flag in '' yes
3740 do
3741   # Use a header file that comes with gcc, so configuring glibc
3742   # with a fresh cross-compiler works.
3743   # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
3744   # <limits.h> exists even on freestanding compilers.
3745   # On the NeXT, cc -E runs the code through the compiler's parser,
3746   # not just through cpp. "Syntax error" is here to catch this case.
3747   cat >conftest.$ac_ext <<_ACEOF
3748 /* confdefs.h.  */
3749 _ACEOF
3750 cat confdefs.h >>conftest.$ac_ext
3751 cat >>conftest.$ac_ext <<_ACEOF
3752 /* end confdefs.h.  */
3753 #ifdef __STDC__
3754 # include <limits.h>
3755 #else
3756 # include <assert.h>
3757 #endif
3758                      Syntax error
3759 _ACEOF
3760 if { (ac_try="$ac_cpp conftest.$ac_ext"
3761 case "(($ac_try" in
3762   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3763   *) ac_try_echo=$ac_try;;
3764 esac
3765 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
3766 $as_echo "$ac_try_echo") >&5
3767   (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
3768   ac_status=$?
3769   grep -v '^ *+' conftest.er1 >conftest.err
3770   rm -rf conftest.er1
3771   cat conftest.err >&5
3772   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
3773   (exit $ac_status); } >/dev/null && {
3774          test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
3775          test ! -s conftest.err
3776        }; then
3777   :
3778 else
3779   $as_echo "$as_me: failed program was:" >&5
3780 sed 's/^/| /' conftest.$ac_ext >&5
3781
3782   # Broken: fails on valid input.
3783 continue
3784 fi
3785
3786 rm -rf conftest.err conftest.$ac_ext
3787
3788   # OK, works on sane cases.  Now check whether nonexistent headers
3789   # can be detected and how.
3790   cat >conftest.$ac_ext <<_ACEOF
3791 /* confdefs.h.  */
3792 _ACEOF
3793 cat confdefs.h >>conftest.$ac_ext
3794 cat >>conftest.$ac_ext <<_ACEOF
3795 /* end confdefs.h.  */
3796 #include <ac_nonexistent.h>
3797 _ACEOF
3798 if { (ac_try="$ac_cpp conftest.$ac_ext"
3799 case "(($ac_try" in
3800   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3801   *) ac_try_echo=$ac_try;;
3802 esac
3803 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
3804 $as_echo "$ac_try_echo") >&5
3805   (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
3806   ac_status=$?
3807   grep -v '^ *+' conftest.er1 >conftest.err
3808   rm -rf conftest.er1
3809   cat conftest.err >&5
3810   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
3811   (exit $ac_status); } >/dev/null && {
3812          test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
3813          test ! -s conftest.err
3814        }; then
3815   # Broken: success on invalid input.
3816 continue
3817 else
3818   $as_echo "$as_me: failed program was:" >&5
3819 sed 's/^/| /' conftest.$ac_ext >&5
3820
3821   # Passes both tests.
3822 ac_preproc_ok=:
3823 break
3824 fi
3825
3826 rm -rf conftest.err conftest.$ac_ext
3827
3828 done
3829 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
3830 rm -rf conftest.err conftest.$ac_ext
3831 if $ac_preproc_ok; then
3832   break
3833 fi
3834
3835     done
3836     ac_cv_prog_CPP=$CPP
3837
3838 fi
3839   CPP=$ac_cv_prog_CPP
3840 else
3841   ac_cv_prog_CPP=$CPP
3842 fi
3843 { $as_echo "$as_me:$LINENO: result: $CPP" >&5
3844 $as_echo "$CPP" >&6; }
3845 ac_preproc_ok=false
3846 for ac_c_preproc_warn_flag in '' yes
3847 do
3848   # Use a header file that comes with gcc, so configuring glibc
3849   # with a fresh cross-compiler works.
3850   # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
3851   # <limits.h> exists even on freestanding compilers.
3852   # On the NeXT, cc -E runs the code through the compiler's parser,
3853   # not just through cpp. "Syntax error" is here to catch this case.
3854   cat >conftest.$ac_ext <<_ACEOF
3855 /* confdefs.h.  */
3856 _ACEOF
3857 cat confdefs.h >>conftest.$ac_ext
3858 cat >>conftest.$ac_ext <<_ACEOF
3859 /* end confdefs.h.  */
3860 #ifdef __STDC__
3861 # include <limits.h>
3862 #else
3863 # include <assert.h>
3864 #endif
3865                      Syntax error
3866 _ACEOF
3867 if { (ac_try="$ac_cpp conftest.$ac_ext"
3868 case "(($ac_try" in
3869   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3870   *) ac_try_echo=$ac_try;;
3871 esac
3872 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
3873 $as_echo "$ac_try_echo") >&5
3874   (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
3875   ac_status=$?
3876   grep -v '^ *+' conftest.er1 >conftest.err
3877   rm -rf conftest.er1
3878   cat conftest.err >&5
3879   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
3880   (exit $ac_status); } >/dev/null && {
3881          test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
3882          test ! -s conftest.err
3883        }; then
3884   :
3885 else
3886   $as_echo "$as_me: failed program was:" >&5
3887 sed 's/^/| /' conftest.$ac_ext >&5
3888
3889   # Broken: fails on valid input.
3890 continue
3891 fi
3892
3893 rm -rf conftest.err conftest.$ac_ext
3894
3895   # OK, works on sane cases.  Now check whether nonexistent headers
3896   # can be detected and how.
3897   cat >conftest.$ac_ext <<_ACEOF
3898 /* confdefs.h.  */
3899 _ACEOF
3900 cat confdefs.h >>conftest.$ac_ext
3901 cat >>conftest.$ac_ext <<_ACEOF
3902 /* end confdefs.h.  */
3903 #include <ac_nonexistent.h>
3904 _ACEOF
3905 if { (ac_try="$ac_cpp conftest.$ac_ext"
3906 case "(($ac_try" in
3907   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3908   *) ac_try_echo=$ac_try;;
3909 esac
3910 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
3911 $as_echo "$ac_try_echo") >&5
3912   (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
3913   ac_status=$?
3914   grep -v '^ *+' conftest.er1 >conftest.err
3915   rm -rf conftest.er1
3916   cat conftest.err >&5
3917   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
3918   (exit $ac_status); } >/dev/null && {
3919          test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
3920          test ! -s conftest.err
3921        }; then
3922   # Broken: success on invalid input.
3923 continue
3924 else
3925   $as_echo "$as_me: failed program was:" >&5
3926 sed 's/^/| /' conftest.$ac_ext >&5
3927
3928   # Passes both tests.
3929 ac_preproc_ok=:
3930 break
3931 fi
3932
3933 rm -rf conftest.err conftest.$ac_ext
3934
3935 done
3936 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
3937 rm -rf conftest.err conftest.$ac_ext
3938 if $ac_preproc_ok; then
3939   :
3940 else
3941   { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5
3942 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3943 { { $as_echo "$as_me:$LINENO: error: C preprocessor \"$CPP\" fails sanity check
3944 See \`config.log' for more details." >&5
3945 $as_echo "$as_me: error: C preprocessor \"$CPP\" fails sanity check
3946 See \`config.log' for more details." >&2;}
3947    { (exit 1); exit 1; }; }; }
3948 fi
3949
3950 ac_ext=c
3951 ac_cpp='$CPP $CPPFLAGS'
3952 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3953 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3954 ac_compiler_gnu=$ac_cv_c_compiler_gnu
3955
3956 { $as_echo "$as_me:$LINENO: checking for an ANSI C-conforming const" >&5
3957 $as_echo_n "checking for an ANSI C-conforming const... " >&6; }
3958 if test "${ac_cv_c_const+set}" = set; then
3959   $as_echo_n "(cached) " >&6
3960 else
3961   cat >conftest.$ac_ext <<_ACEOF
3962 /* confdefs.h.  */
3963 _ACEOF
3964 cat confdefs.h >>conftest.$ac_ext
3965 cat >>conftest.$ac_ext <<_ACEOF
3966 /* end confdefs.h.  */
3967
3968 int
3969 main ()
3970 {
3971 /* FIXME: Include the comments suggested by Paul. */
3972 #ifndef __cplusplus
3973   /* Ultrix mips cc rejects this.  */
3974   typedef int charset[2];
3975   const charset cs;
3976   /* SunOS 4.1.1 cc rejects this.  */
3977   char const *const *pcpcc;
3978   char **ppc;
3979   /* NEC SVR4.0.2 mips cc rejects this.  */
3980   struct point {int x, y;};
3981   static struct point const zero = {0,0};
3982   /* AIX XL C 1.02.0.0 rejects this.
3983      It does not let you subtract one const X* pointer from another in
3984      an arm of an if-expression whose if-part is not a constant
3985      expression */
3986   const char *g = "string";
3987   pcpcc = &g + (g ? g-g : 0);
3988   /* HPUX 7.0 cc rejects these. */
3989   ++pcpcc;
3990   ppc = (char**) pcpcc;
3991   pcpcc = (char const *const *) ppc;
3992   { /* SCO 3.2v4 cc rejects this.  */
3993     char *t;
3994     char const *s = 0 ? (char *) 0 : (char const *) 0;
3995
3996     *t++ = 0;
3997     if (s) return 0;
3998   }
3999   { /* Someone thinks the Sun supposedly-ANSI compiler will reject this.  */
4000     int x[] = {25, 17};
4001     const int *foo = &x[0];
4002     ++foo;
4003   }
4004   { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
4005     typedef const int *iptr;
4006     iptr p = 0;
4007     ++p;
4008   }
4009   { /* AIX XL C 1.02.0.0 rejects this saying
4010        "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
4011     struct s { int j; const int *ap[3]; };
4012     struct s *b; b->j = 5;
4013   }
4014   { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
4015     const int foo = 10;
4016     if (!foo) return 0;
4017   }
4018   return !cs[0] && !zero.x;
4019 #endif
4020
4021   ;
4022   return 0;
4023 }
4024 _ACEOF
4025 rm -rf conftest.$ac_objext
4026 if { (ac_try="$ac_compile"
4027 case "(($ac_try" in
4028   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4029   *) ac_try_echo=$ac_try;;
4030 esac
4031 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
4032 $as_echo "$ac_try_echo") >&5
4033   (eval "$ac_compile") 2>conftest.er1
4034   ac_status=$?
4035   grep -v '^ *+' conftest.er1 >conftest.err
4036   rm -rf conftest.er1
4037   cat conftest.err >&5
4038   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
4039   (exit $ac_status); } && {
4040          test -z "$ac_c_werror_flag" ||
4041          test ! -s conftest.err
4042        } && test -s conftest.$ac_objext; then
4043   ac_cv_c_const=yes
4044 else
4045   $as_echo "$as_me: failed program was:" >&5
4046 sed 's/^/| /' conftest.$ac_ext >&5
4047
4048         ac_cv_c_const=no
4049 fi
4050
4051 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4052 fi
4053 { $as_echo "$as_me:$LINENO: result: $ac_cv_c_const" >&5
4054 $as_echo "$ac_cv_c_const" >&6; }
4055 if test $ac_cv_c_const = no; then
4056
4057 cat >>confdefs.h <<\_ACEOF
4058 #define const /**/
4059 _ACEOF
4060
4061 fi
4062
4063 { $as_echo "$as_me:$LINENO: checking for inline" >&5
4064 $as_echo_n "checking for inline... " >&6; }
4065 if test "${ac_cv_c_inline+set}" = set; then
4066   $as_echo_n "(cached) " >&6
4067 else
4068   ac_cv_c_inline=no
4069 for ac_kw in inline __inline__ __inline; do
4070   cat >conftest.$ac_ext <<_ACEOF
4071 /* confdefs.h.  */
4072 _ACEOF
4073 cat confdefs.h >>conftest.$ac_ext
4074 cat >>conftest.$ac_ext <<_ACEOF
4075 /* end confdefs.h.  */
4076 #ifndef __cplusplus
4077 typedef int foo_t;
4078 static $ac_kw foo_t static_foo () {return 0; }
4079 $ac_kw foo_t foo () {return 0; }
4080 #endif
4081
4082 _ACEOF
4083 rm -rf conftest.$ac_objext
4084 if { (ac_try="$ac_compile"
4085 case "(($ac_try" in
4086   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4087   *) ac_try_echo=$ac_try;;
4088 esac
4089 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
4090 $as_echo "$ac_try_echo") >&5
4091   (eval "$ac_compile") 2>conftest.er1
4092   ac_status=$?
4093   grep -v '^ *+' conftest.er1 >conftest.err
4094   rm -rf conftest.er1
4095   cat conftest.err >&5
4096   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
4097   (exit $ac_status); } && {
4098          test -z "$ac_c_werror_flag" ||
4099          test ! -s conftest.err
4100        } && test -s conftest.$ac_objext; then
4101   ac_cv_c_inline=$ac_kw
4102 else
4103   $as_echo "$as_me: failed program was:" >&5
4104 sed 's/^/| /' conftest.$ac_ext >&5
4105
4106
4107 fi
4108
4109 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4110   test "$ac_cv_c_inline" != no && break
4111 done
4112
4113 fi
4114 { $as_echo "$as_me:$LINENO: result: $ac_cv_c_inline" >&5
4115 $as_echo "$ac_cv_c_inline" >&6; }
4116
4117
4118 case $ac_cv_c_inline in
4119   inline | yes) ;;
4120   *)
4121     case $ac_cv_c_inline in
4122       no) ac_val=;;
4123       *) ac_val=$ac_cv_c_inline;;
4124     esac
4125     cat >>confdefs.h <<_ACEOF
4126 #ifndef __cplusplus
4127 #define inline $ac_val
4128 #endif
4129 _ACEOF
4130     ;;
4131 esac
4132
4133
4134 ac_bc_result=`echo 6+9 | bc 2>/dev/null`
4135   { $as_echo "$as_me:$LINENO: checking for bc" >&5
4136 $as_echo_n "checking for bc... " >&6; }
4137   if test "$ac_bc_result" = "15" ; then
4138     { $as_echo "$as_me:$LINENO: result: yes" >&5
4139 $as_echo "yes" >&6; }
4140   else
4141     { $as_echo "$as_me:$LINENO: result: no" >&5
4142 $as_echo "no" >&6; }
4143     echo ''
4144     { { $as_echo "$as_me:$LINENO: error: Your system doesn't have \"bc\", which has been a standard
4145                   part of Unix since the 1970s.  Come back when your vendor
4146                   has grown a clue." >&5
4147 $as_echo "$as_me: error: Your system doesn't have \"bc\", which has been a standard
4148                   part of Unix since the 1970s.  Come back when your vendor
4149                   has grown a clue." >&2;}
4150    { (exit 1); exit 1; }; }
4151   fi
4152
4153
4154 # stuff for Makefiles
4155 # Find a good install program.  We prefer a C program (faster),
4156 # so one script is as good as another.  But avoid the broken or
4157 # incompatible versions:
4158 # SysV /etc/install, /usr/sbin/install
4159 # SunOS /usr/etc/install
4160 # IRIX /sbin/install
4161 # AIX /bin/install
4162 # AmigaOS /C/install, which installs bootblocks on floppy discs
4163 # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
4164 # AFS /usr/afsws/bin/install, which mishandles nonexistent args
4165 # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
4166 # OS/2's system install, which has a completely different semantic
4167 # ./install, which can be erroneously created by make from ./install.sh.
4168 # Reject install programs that cannot install multiple files.
4169 { $as_echo "$as_me:$LINENO: checking for a BSD-compatible install" >&5
4170 $as_echo_n "checking for a BSD-compatible install... " >&6; }
4171 if test -z "$INSTALL"; then
4172 if test "${ac_cv_path_install+set}" = set; then
4173   $as_echo_n "(cached) " >&6
4174 else
4175   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4176 for as_dir in $PATH
4177 do
4178   IFS=$as_save_IFS
4179   test -z "$as_dir" && as_dir=.
4180   # Account for people who put trailing slashes in PATH elements.
4181 case $as_dir/ in
4182   ./ | .// | /cC/* | \
4183   /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \
4184   ?:\\/os2\\/install\\/* | ?:\\/OS2\\/INSTALL\\/* | \
4185   /usr/ucb/* ) ;;
4186   *)
4187     # OSF1 and SCO ODT 3.0 have their own names for install.
4188     # Don't use installbsd from OSF since it installs stuff as root
4189     # by default.
4190     for ac_prog in ginstall scoinst install; do
4191       for ac_exec_ext in '' $ac_executable_extensions; do
4192         if { test -f "$as_dir/$ac_prog$ac_exec_ext" && $as_test_x "$as_dir/$ac_prog$ac_exec_ext"; }; then
4193           if test $ac_prog = install &&
4194             grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
4195             # AIX install.  It has an incompatible calling convention.
4196             :
4197           elif test $ac_prog = install &&
4198             grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
4199             # program-specific install script used by HP pwplus--don't use.
4200             :
4201           else
4202             rm -rf conftest.one conftest.two conftest.dir
4203             echo one > conftest.one
4204             echo two > conftest.two
4205             mkdir conftest.dir
4206             if "$as_dir/$ac_prog$ac_exec_ext" -c conftest.one conftest.two "`pwd`/conftest.dir" &&
4207               test -s conftest.one && test -s conftest.two &&
4208               test -s conftest.dir/conftest.one &&
4209               test -s conftest.dir/conftest.two
4210             then
4211               ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c"
4212               break 3
4213             fi
4214           fi
4215         fi
4216       done
4217     done
4218     ;;
4219 esac
4220
4221 done
4222 IFS=$as_save_IFS
4223
4224 rm -rf conftest.one conftest.two conftest.dir
4225
4226 fi
4227   if test "${ac_cv_path_install+set}" = set; then
4228     INSTALL=$ac_cv_path_install
4229   else
4230     # As a last resort, use the slow shell script.  Don't cache a
4231     # value for INSTALL within a source directory, because that will
4232     # break other packages using the cache if that directory is
4233     # removed, or if the value is a relative name.
4234     INSTALL=$ac_install_sh
4235   fi
4236 fi
4237 { $as_echo "$as_me:$LINENO: result: $INSTALL" >&5
4238 $as_echo "$INSTALL" >&6; }
4239
4240 # Use test -z because SunOS4 sh mishandles braces in ${var-val}.
4241 # It thinks the first close brace ends the variable substitution.
4242 test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
4243
4244 test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
4245
4246 test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
4247
4248 { $as_echo "$as_me:$LINENO: checking whether \"\${INSTALL} -d\" creates intermediate directories" >&5
4249 $as_echo_n "checking whether \"\${INSTALL} -d\" creates intermediate directories... " >&6; }
4250 if test "${ac_cv_install_d_creates_dirs+set}" = set; then
4251   $as_echo_n "(cached) " >&6
4252 else
4253   ac_cv_install_d_creates_dirs=no
4254      rm -rf conftestdir
4255      if mkdir conftestdir; then
4256        cd conftestdir 2>/dev/null
4257        ${INSTALL} -d `pwd`/dir1/dir2 >/dev/null 2>&1
4258        if test -d dir1/dir2/. ; then
4259          ac_cv_install_d_creates_dirs=yes
4260        fi
4261        cd .. 2>/dev/null
4262        rm -rf conftestdir
4263      fi
4264
4265 fi
4266 { $as_echo "$as_me:$LINENO: result: $ac_cv_install_d_creates_dirs" >&5
4267 $as_echo "$ac_cv_install_d_creates_dirs" >&6; }
4268
4269   if test "$ac_cv_install_d_creates_dirs" = no ; then
4270     { $as_echo "$as_me:$LINENO: checking whether \"mkdir -p\" creates intermediate directories" >&5
4271 $as_echo_n "checking whether \"mkdir -p\" creates intermediate directories... " >&6; }
4272 if test "${ac_cv_mkdir_p_creates_dirs+set}" = set; then
4273   $as_echo_n "(cached) " >&6
4274 else
4275   ac_cv_mkdir_p_creates_dirs=no
4276        rm -rf conftestdir
4277        if mkdir conftestdir; then
4278          cd conftestdir 2>/dev/null
4279          mkdir -p dir1/dir2 >/dev/null 2>&1
4280          if test -d dir1/dir2/. ; then
4281            ac_cv_mkdir_p_creates_dirs=yes
4282          fi
4283          cd .. 2>/dev/null
4284          rm -rf conftestdir
4285        fi
4286
4287 fi
4288 { $as_echo "$as_me:$LINENO: result: $ac_cv_mkdir_p_creates_dirs" >&5
4289 $as_echo "$ac_cv_mkdir_p_creates_dirs" >&6; }
4290   fi
4291
4292   if test "$ac_cv_install_d_creates_dirs" = yes ; then
4293     INSTALL_DIRS='${INSTALL} -d'
4294   elif test "$ac_cv_mkdir_p_creates_dirs" = yes ; then
4295     INSTALL_DIRS='mkdir -p'
4296   else
4297     # any other ideas?
4298     INSTALL_DIRS='${INSTALL} -d'
4299   fi
4300
4301 { $as_echo "$as_me:$LINENO: checking whether ${MAKE-make} sets \$(MAKE)" >&5
4302 $as_echo_n "checking whether ${MAKE-make} sets \$(MAKE)... " >&6; }
4303 set x ${MAKE-make}
4304 ac_make=`$as_echo "$2" | sed 's/+/p/g; s/[^a-zA-Z0-9_]/_/g'`
4305 if { as_var=ac_cv_prog_make_${ac_make}_set; eval "test \"\${$as_var+set}\" = set"; }; then
4306   $as_echo_n "(cached) " >&6
4307 else
4308   cat >conftest.make <<\_ACEOF
4309 SHELL = /bin/sh
4310 all:
4311         @echo '@@@%%%=$(MAKE)=@@@%%%'
4312 _ACEOF
4313 # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
4314 case `${MAKE-make} -f conftest.make 2>/dev/null` in
4315   *@@@%%%=?*=@@@%%%*)
4316     eval ac_cv_prog_make_${ac_make}_set=yes;;
4317   *)
4318     eval ac_cv_prog_make_${ac_make}_set=no;;
4319 esac
4320 rm -rf conftest.make
4321 fi
4322 if eval test \$ac_cv_prog_make_${ac_make}_set = yes; then
4323   { $as_echo "$as_me:$LINENO: result: yes" >&5
4324 $as_echo "yes" >&6; }
4325   SET_MAKE=
4326 else
4327   { $as_echo "$as_me:$LINENO: result: no" >&5
4328 $as_echo "no" >&6; }
4329   SET_MAKE="MAKE=${MAKE-make}"
4330 fi
4331
4332
4333 # By default, autoconf sets INSTALL_SCRIPT to '${INSTALL_PROGRAM}'.
4334 # That's wrong: it should be set to '${INSTALL}', so that one can
4335 # implement the "install-strip" target properly (strip executables,
4336 # but do not try to strip scripts.)
4337 #
4338 INSTALL_SCRIPT='${INSTALL}'
4339
4340 # random libc stuff
4341
4342 { $as_echo "$as_me:$LINENO: checking for grep that handles long lines and -e" >&5
4343 $as_echo_n "checking for grep that handles long lines and -e... " >&6; }
4344 if test "${ac_cv_path_GREP+set}" = set; then
4345   $as_echo_n "(cached) " >&6
4346 else
4347   if test -z "$GREP"; then
4348   ac_path_GREP_found=false
4349   # Loop through the user's path and test for each of PROGNAME-LIST
4350   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4351 for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
4352 do
4353   IFS=$as_save_IFS
4354   test -z "$as_dir" && as_dir=.
4355   for ac_prog in grep ggrep; do
4356     for ac_exec_ext in '' $ac_executable_extensions; do
4357       ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
4358       { test -f "$ac_path_GREP" && $as_test_x "$ac_path_GREP"; } || continue
4359 # Check for GNU ac_path_GREP and select it if it is found.
4360   # Check for GNU $ac_path_GREP
4361 case `"$ac_path_GREP" --version 2>&1` in
4362 *GNU*)
4363   ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
4364 *)
4365   ac_count=0
4366   $as_echo_n 0123456789 >"conftest.in"
4367   while :
4368   do
4369     cat "conftest.in" "conftest.in" >"conftest.tmp"
4370     mv "conftest.tmp" "conftest.in"
4371     cp "conftest.in" "conftest.nl"
4372     $as_echo 'GREP' >> "conftest.nl"
4373     "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
4374     diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
4375     ac_count=`expr $ac_count + 1`
4376     if test $ac_count -gt ${ac_path_GREP_max-0}; then
4377       # Best one so far, save it but keep looking for a better one
4378       ac_cv_path_GREP="$ac_path_GREP"
4379       ac_path_GREP_max=$ac_count
4380     fi
4381     # 10*(2^10) chars as input seems more than enough
4382     test $ac_count -gt 10 && break
4383   done
4384   rm -rf conftest.in conftest.tmp conftest.nl conftest.out;;
4385 esac
4386
4387       $ac_path_GREP_found && break 3
4388     done
4389   done
4390 done
4391 IFS=$as_save_IFS
4392   if test -z "$ac_cv_path_GREP"; then
4393     { { $as_echo "$as_me:$LINENO: error: no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&5
4394 $as_echo "$as_me: error: no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&2;}
4395    { (exit 1); exit 1; }; }
4396   fi
4397 else
4398   ac_cv_path_GREP=$GREP
4399 fi
4400
4401 fi
4402 { $as_echo "$as_me:$LINENO: result: $ac_cv_path_GREP" >&5
4403 $as_echo "$ac_cv_path_GREP" >&6; }
4404  GREP="$ac_cv_path_GREP"
4405
4406
4407 { $as_echo "$as_me:$LINENO: checking for egrep" >&5
4408 $as_echo_n "checking for egrep... " >&6; }
4409 if test "${ac_cv_path_EGREP+set}" = set; then
4410   $as_echo_n "(cached) " >&6
4411 else
4412   if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
4413    then ac_cv_path_EGREP="$GREP -E"
4414    else
4415      if test -z "$EGREP"; then
4416   ac_path_EGREP_found=false
4417   # Loop through the user's path and test for each of PROGNAME-LIST
4418   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4419 for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
4420 do
4421   IFS=$as_save_IFS
4422   test -z "$as_dir" && as_dir=.
4423   for ac_prog in egrep; do
4424     for ac_exec_ext in '' $ac_executable_extensions; do
4425       ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
4426       { test -f "$ac_path_EGREP" && $as_test_x "$ac_path_EGREP"; } || continue
4427 # Check for GNU ac_path_EGREP and select it if it is found.
4428   # Check for GNU $ac_path_EGREP
4429 case `"$ac_path_EGREP" --version 2>&1` in
4430 *GNU*)
4431   ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
4432 *)
4433   ac_count=0
4434   $as_echo_n 0123456789 >"conftest.in"
4435   while :
4436   do
4437     cat "conftest.in" "conftest.in" >"conftest.tmp"
4438     mv "conftest.tmp" "conftest.in"
4439     cp "conftest.in" "conftest.nl"
4440     $as_echo 'EGREP' >> "conftest.nl"
4441     "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
4442     diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
4443     ac_count=`expr $ac_count + 1`
4444     if test $ac_count -gt ${ac_path_EGREP_max-0}; then
4445       # Best one so far, save it but keep looking for a better one
4446       ac_cv_path_EGREP="$ac_path_EGREP"
4447       ac_path_EGREP_max=$ac_count
4448     fi
4449     # 10*(2^10) chars as input seems more than enough
4450     test $ac_count -gt 10 && break
4451   done
4452   rm -rf conftest.in conftest.tmp conftest.nl conftest.out;;
4453 esac
4454
4455       $ac_path_EGREP_found && break 3
4456     done
4457   done
4458 done
4459 IFS=$as_save_IFS
4460   if test -z "$ac_cv_path_EGREP"; then
4461     { { $as_echo "$as_me:$LINENO: error: no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&5
4462 $as_echo "$as_me: error: no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&2;}
4463    { (exit 1); exit 1; }; }
4464   fi
4465 else
4466   ac_cv_path_EGREP=$EGREP
4467 fi
4468
4469    fi
4470 fi
4471 { $as_echo "$as_me:$LINENO: result: $ac_cv_path_EGREP" >&5
4472 $as_echo "$ac_cv_path_EGREP" >&6; }
4473  EGREP="$ac_cv_path_EGREP"
4474
4475
4476 { $as_echo "$as_me:$LINENO: checking for ANSI C header files" >&5
4477 $as_echo_n "checking for ANSI C header files... " >&6; }
4478 if test "${ac_cv_header_stdc+set}" = set; then
4479   $as_echo_n "(cached) " >&6
4480 else
4481   cat >conftest.$ac_ext <<_ACEOF
4482 /* confdefs.h.  */
4483 _ACEOF
4484 cat confdefs.h >>conftest.$ac_ext
4485 cat >>conftest.$ac_ext <<_ACEOF
4486 /* end confdefs.h.  */
4487 #include <stdlib.h>
4488 #include <stdarg.h>
4489 #include <string.h>
4490 #include <float.h>
4491
4492 int
4493 main ()
4494 {
4495
4496   ;
4497   return 0;
4498 }
4499 _ACEOF
4500 rm -rf conftest.$ac_objext
4501 if { (ac_try="$ac_compile"
4502 case "(($ac_try" in
4503   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4504   *) ac_try_echo=$ac_try;;
4505 esac
4506 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
4507 $as_echo "$ac_try_echo") >&5
4508   (eval "$ac_compile") 2>conftest.er1
4509   ac_status=$?
4510   grep -v '^ *+' conftest.er1 >conftest.err
4511   rm -rf conftest.er1
4512   cat conftest.err >&5
4513   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
4514   (exit $ac_status); } && {
4515          test -z "$ac_c_werror_flag" ||
4516          test ! -s conftest.err
4517        } && test -s conftest.$ac_objext; then
4518   ac_cv_header_stdc=yes
4519 else
4520   $as_echo "$as_me: failed program was:" >&5
4521 sed 's/^/| /' conftest.$ac_ext >&5
4522
4523         ac_cv_header_stdc=no
4524 fi
4525
4526 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4527
4528 if test $ac_cv_header_stdc = yes; then
4529   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
4530   cat >conftest.$ac_ext <<_ACEOF
4531 /* confdefs.h.  */
4532 _ACEOF
4533 cat confdefs.h >>conftest.$ac_ext
4534 cat >>conftest.$ac_ext <<_ACEOF
4535 /* end confdefs.h.  */
4536 #include <string.h>
4537
4538 _ACEOF
4539 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4540   $EGREP "memchr" >/dev/null 2>&1; then
4541   :
4542 else
4543   ac_cv_header_stdc=no
4544 fi
4545 rm -rf conftest*
4546
4547 fi
4548
4549 if test $ac_cv_header_stdc = yes; then
4550   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
4551   cat >conftest.$ac_ext <<_ACEOF
4552 /* confdefs.h.  */
4553 _ACEOF
4554 cat confdefs.h >>conftest.$ac_ext
4555 cat >>conftest.$ac_ext <<_ACEOF
4556 /* end confdefs.h.  */
4557 #include <stdlib.h>
4558
4559 _ACEOF
4560 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4561   $EGREP "free" >/dev/null 2>&1; then
4562   :
4563 else
4564   ac_cv_header_stdc=no
4565 fi
4566 rm -rf conftest*
4567
4568 fi
4569
4570 if test $ac_cv_header_stdc = yes; then
4571   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
4572   if test "$cross_compiling" = yes; then
4573   :
4574 else
4575   cat >conftest.$ac_ext <<_ACEOF
4576 /* confdefs.h.  */
4577 _ACEOF
4578 cat confdefs.h >>conftest.$ac_ext
4579 cat >>conftest.$ac_ext <<_ACEOF
4580 /* end confdefs.h.  */
4581 #include <ctype.h>
4582 #include <stdlib.h>
4583 #if ((' ' & 0x0FF) == 0x020)
4584 # define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
4585 # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
4586 #else
4587 # define ISLOWER(c) \
4588                    (('a' <= (c) && (c) <= 'i') \
4589                      || ('j' <= (c) && (c) <= 'r') \
4590                      || ('s' <= (c) && (c) <= 'z'))
4591 # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
4592 #endif
4593
4594 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
4595 int
4596 main ()
4597 {
4598   int i;
4599   for (i = 0; i < 256; i++)
4600     if (XOR (islower (i), ISLOWER (i))
4601         || toupper (i) != TOUPPER (i))
4602       return 2;
4603   return 0;
4604 }
4605 _ACEOF
4606 rm -rf conftest$ac_exeext
4607 if { (ac_try="$ac_link"
4608 case "(($ac_try" in
4609   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4610   *) ac_try_echo=$ac_try;;
4611 esac
4612 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
4613 $as_echo "$ac_try_echo") >&5
4614   (eval "$ac_link") 2>&5
4615   ac_status=$?
4616   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
4617   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
4618   { (case "(($ac_try" in
4619   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4620   *) ac_try_echo=$ac_try;;
4621 esac
4622 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
4623 $as_echo "$ac_try_echo") >&5
4624   (eval "$ac_try") 2>&5
4625   ac_status=$?
4626   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
4627   (exit $ac_status); }; }; then
4628   :
4629 else
4630   $as_echo "$as_me: program exited with status $ac_status" >&5
4631 $as_echo "$as_me: failed program was:" >&5
4632 sed 's/^/| /' conftest.$ac_ext >&5
4633
4634 ( exit $ac_status )
4635 ac_cv_header_stdc=no
4636 fi
4637 rm -rf conftest.dSYM
4638 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
4639 fi
4640
4641
4642 fi
4643 fi
4644 { $as_echo "$as_me:$LINENO: result: $ac_cv_header_stdc" >&5
4645 $as_echo "$ac_cv_header_stdc" >&6; }
4646 if test $ac_cv_header_stdc = yes; then
4647
4648 cat >>confdefs.h <<\_ACEOF
4649 #define STDC_HEADERS 1
4650 _ACEOF
4651
4652 fi
4653
4654 # On IRIX 5.3, sys/types and inttypes.h are conflicting.
4655
4656
4657
4658
4659
4660
4661
4662
4663
4664 for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
4665                   inttypes.h stdint.h unistd.h
4666 do
4667 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
4668 { $as_echo "$as_me:$LINENO: checking for $ac_header" >&5
4669 $as_echo_n "checking for $ac_header... " >&6; }
4670 if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
4671   $as_echo_n "(cached) " >&6
4672 else
4673   cat >conftest.$ac_ext <<_ACEOF
4674 /* confdefs.h.  */
4675 _ACEOF
4676 cat confdefs.h >>conftest.$ac_ext
4677 cat >>conftest.$ac_ext <<_ACEOF
4678 /* end confdefs.h.  */
4679 $ac_includes_default
4680
4681 #include <$ac_header>
4682 _ACEOF
4683 rm -rf conftest.$ac_objext
4684 if { (ac_try="$ac_compile"
4685 case "(($ac_try" in
4686   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4687   *) ac_try_echo=$ac_try;;
4688 esac
4689 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
4690 $as_echo "$ac_try_echo") >&5
4691   (eval "$ac_compile") 2>conftest.er1
4692   ac_status=$?
4693   grep -v '^ *+' conftest.er1 >conftest.err
4694   rm -rf conftest.er1
4695   cat conftest.err >&5
4696   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
4697   (exit $ac_status); } && {
4698          test -z "$ac_c_werror_flag" ||
4699          test ! -s conftest.err
4700        } && test -s conftest.$ac_objext; then
4701   eval "$as_ac_Header=yes"
4702 else
4703   $as_echo "$as_me: failed program was:" >&5
4704 sed 's/^/| /' conftest.$ac_ext >&5
4705
4706         eval "$as_ac_Header=no"
4707 fi
4708
4709 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4710 fi
4711 ac_res=`eval 'as_val=${'$as_ac_Header'}
4712                  $as_echo "$as_val"'`
4713                { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
4714 $as_echo "$ac_res" >&6; }
4715 as_val=`eval 'as_val=${'$as_ac_Header'}
4716                  $as_echo "$as_val"'`
4717    if test "x$as_val" = x""yes; then
4718   cat >>confdefs.h <<_ACEOF
4719 #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
4720 _ACEOF
4721
4722 fi
4723
4724 done
4725
4726
4727
4728 for ac_header in unistd.h
4729 do
4730 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
4731 if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
4732   { $as_echo "$as_me:$LINENO: checking for $ac_header" >&5
4733 $as_echo_n "checking for $ac_header... " >&6; }
4734 if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
4735   $as_echo_n "(cached) " >&6
4736 fi
4737 ac_res=`eval 'as_val=${'$as_ac_Header'}
4738                  $as_echo "$as_val"'`
4739                { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
4740 $as_echo "$ac_res" >&6; }
4741 else
4742   # Is the header compilable?
4743 { $as_echo "$as_me:$LINENO: checking $ac_header usability" >&5
4744 $as_echo_n "checking $ac_header usability... " >&6; }
4745 cat >conftest.$ac_ext <<_ACEOF
4746 /* confdefs.h.  */
4747 _ACEOF
4748 cat confdefs.h >>conftest.$ac_ext
4749 cat >>conftest.$ac_ext <<_ACEOF
4750 /* end confdefs.h.  */
4751 $ac_includes_default
4752 #include <$ac_header>
4753 _ACEOF
4754 rm -rf conftest.$ac_objext
4755 if { (ac_try="$ac_compile"
4756 case "(($ac_try" in
4757   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4758   *) ac_try_echo=$ac_try;;
4759 esac
4760 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
4761 $as_echo "$ac_try_echo") >&5
4762   (eval "$ac_compile") 2>conftest.er1
4763   ac_status=$?
4764   grep -v '^ *+' conftest.er1 >conftest.err
4765   rm -rf conftest.er1
4766   cat conftest.err >&5
4767   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
4768   (exit $ac_status); } && {
4769          test -z "$ac_c_werror_flag" ||
4770          test ! -s conftest.err
4771        } && test -s conftest.$ac_objext; then
4772   ac_header_compiler=yes
4773 else
4774   $as_echo "$as_me: failed program was:" >&5
4775 sed 's/^/| /' conftest.$ac_ext >&5
4776
4777         ac_header_compiler=no
4778 fi
4779
4780 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4781 { $as_echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
4782 $as_echo "$ac_header_compiler" >&6; }
4783
4784 # Is the header present?
4785 { $as_echo "$as_me:$LINENO: checking $ac_header presence" >&5
4786 $as_echo_n "checking $ac_header presence... " >&6; }
4787 cat >conftest.$ac_ext <<_ACEOF
4788 /* confdefs.h.  */
4789 _ACEOF
4790 cat confdefs.h >>conftest.$ac_ext
4791 cat >>conftest.$ac_ext <<_ACEOF
4792 /* end confdefs.h.  */
4793 #include <$ac_header>
4794 _ACEOF
4795 if { (ac_try="$ac_cpp conftest.$ac_ext"
4796 case "(($ac_try" in
4797   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4798   *) ac_try_echo=$ac_try;;
4799 esac
4800 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
4801 $as_echo "$ac_try_echo") >&5
4802   (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
4803   ac_status=$?
4804   grep -v '^ *+' conftest.er1 >conftest.err
4805   rm -rf conftest.er1
4806   cat conftest.err >&5
4807   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
4808   (exit $ac_status); } >/dev/null && {
4809          test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
4810          test ! -s conftest.err
4811        }; then
4812   ac_header_preproc=yes
4813 else
4814   $as_echo "$as_me: failed program was:" >&5
4815 sed 's/^/| /' conftest.$ac_ext >&5
4816
4817   ac_header_preproc=no
4818 fi
4819
4820 rm -rf conftest.err conftest.$ac_ext
4821 { $as_echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
4822 $as_echo "$ac_header_preproc" >&6; }
4823
4824 # So?  What about this header?
4825 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
4826   yes:no: )
4827     { $as_echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
4828 $as_echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
4829     { $as_echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
4830 $as_echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
4831     ac_header_preproc=yes
4832     ;;
4833   no:yes:* )
4834     { $as_echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
4835 $as_echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
4836     { $as_echo "$as_me:$LINENO: WARNING: $ac_header:     check for missing prerequisite headers?" >&5
4837 $as_echo "$as_me: WARNING: $ac_header:     check for missing prerequisite headers?" >&2;}
4838     { $as_echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
4839 $as_echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
4840     { $as_echo "$as_me:$LINENO: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&5
4841 $as_echo "$as_me: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&2;}
4842     { $as_echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
4843 $as_echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
4844     { $as_echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
4845 $as_echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
4846
4847     ;;
4848 esac
4849 { $as_echo "$as_me:$LINENO: checking for $ac_header" >&5
4850 $as_echo_n "checking for $ac_header... " >&6; }
4851 if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
4852   $as_echo_n "(cached) " >&6
4853 else
4854   eval "$as_ac_Header=\$ac_header_preproc"
4855 fi
4856 ac_res=`eval 'as_val=${'$as_ac_Header'}
4857                  $as_echo "$as_val"'`
4858                { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
4859 $as_echo "$ac_res" >&6; }
4860
4861 fi
4862 as_val=`eval 'as_val=${'$as_ac_Header'}
4863                  $as_echo "$as_val"'`
4864    if test "x$as_val" = x""yes; then
4865   cat >>confdefs.h <<_ACEOF
4866 #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
4867 _ACEOF
4868
4869 fi
4870
4871 done
4872
4873 { $as_echo "$as_me:$LINENO: checking for mode_t" >&5
4874 $as_echo_n "checking for mode_t... " >&6; }
4875 if test "${ac_cv_type_mode_t+set}" = set; then
4876   $as_echo_n "(cached) " >&6
4877 else
4878   ac_cv_type_mode_t=no
4879 cat >conftest.$ac_ext <<_ACEOF
4880 /* confdefs.h.  */
4881 _ACEOF
4882 cat confdefs.h >>conftest.$ac_ext
4883 cat >>conftest.$ac_ext <<_ACEOF
4884 /* end confdefs.h.  */
4885 $ac_includes_default
4886 int
4887 main ()
4888 {
4889 if (sizeof (mode_t))
4890        return 0;
4891   ;
4892   return 0;
4893 }
4894 _ACEOF
4895 rm -rf conftest.$ac_objext
4896 if { (ac_try="$ac_compile"
4897 case "(($ac_try" in
4898   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4899   *) ac_try_echo=$ac_try;;
4900 esac
4901 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
4902 $as_echo "$ac_try_echo") >&5
4903   (eval "$ac_compile") 2>conftest.er1
4904   ac_status=$?
4905   grep -v '^ *+' conftest.er1 >conftest.err
4906   rm -rf conftest.er1
4907   cat conftest.err >&5
4908   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
4909   (exit $ac_status); } && {
4910          test -z "$ac_c_werror_flag" ||
4911          test ! -s conftest.err
4912        } && test -s conftest.$ac_objext; then
4913   cat >conftest.$ac_ext <<_ACEOF
4914 /* confdefs.h.  */
4915 _ACEOF
4916 cat confdefs.h >>conftest.$ac_ext
4917 cat >>conftest.$ac_ext <<_ACEOF
4918 /* end confdefs.h.  */
4919 $ac_includes_default
4920 int
4921 main ()
4922 {
4923 if (sizeof ((mode_t)))
4924           return 0;
4925   ;
4926   return 0;
4927 }
4928 _ACEOF
4929 rm -rf conftest.$ac_objext
4930 if { (ac_try="$ac_compile"
4931 case "(($ac_try" in
4932   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4933   *) ac_try_echo=$ac_try;;
4934 esac
4935 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
4936 $as_echo "$ac_try_echo") >&5
4937   (eval "$ac_compile") 2>conftest.er1
4938   ac_status=$?
4939   grep -v '^ *+' conftest.er1 >conftest.err
4940   rm -rf conftest.er1
4941   cat conftest.err >&5
4942   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
4943   (exit $ac_status); } && {
4944          test -z "$ac_c_werror_flag" ||
4945          test ! -s conftest.err
4946        } && test -s conftest.$ac_objext; then
4947   :
4948 else
4949   $as_echo "$as_me: failed program was:" >&5
4950 sed 's/^/| /' conftest.$ac_ext >&5
4951
4952         ac_cv_type_mode_t=yes
4953 fi
4954
4955 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4956 else
4957   $as_echo "$as_me: failed program was:" >&5
4958 sed 's/^/| /' conftest.$ac_ext >&5
4959
4960
4961 fi
4962
4963 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4964 fi
4965 { $as_echo "$as_me:$LINENO: result: $ac_cv_type_mode_t" >&5
4966 $as_echo "$ac_cv_type_mode_t" >&6; }
4967 if test "x$ac_cv_type_mode_t" = x""yes; then
4968   :
4969 else
4970
4971 cat >>confdefs.h <<_ACEOF
4972 #define mode_t int
4973 _ACEOF
4974
4975 fi
4976
4977 { $as_echo "$as_me:$LINENO: checking for pid_t" >&5
4978 $as_echo_n "checking for pid_t... " >&6; }
4979 if test "${ac_cv_type_pid_t+set}" = set; then
4980   $as_echo_n "(cached) " >&6
4981 else
4982   ac_cv_type_pid_t=no
4983 cat >conftest.$ac_ext <<_ACEOF
4984 /* confdefs.h.  */
4985 _ACEOF
4986 cat confdefs.h >>conftest.$ac_ext
4987 cat >>conftest.$ac_ext <<_ACEOF
4988 /* end confdefs.h.  */
4989 $ac_includes_default
4990 int
4991 main ()
4992 {
4993 if (sizeof (pid_t))
4994        return 0;
4995   ;
4996   return 0;
4997 }
4998 _ACEOF
4999 rm -rf conftest.$ac_objext
5000 if { (ac_try="$ac_compile"
5001 case "(($ac_try" in
5002   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5003   *) ac_try_echo=$ac_try;;
5004 esac
5005 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
5006 $as_echo "$ac_try_echo") >&5
5007   (eval "$ac_compile") 2>conftest.er1
5008   ac_status=$?
5009   grep -v '^ *+' conftest.er1 >conftest.err
5010   rm -rf conftest.er1
5011   cat conftest.err >&5
5012   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
5013   (exit $ac_status); } && {
5014          test -z "$ac_c_werror_flag" ||
5015          test ! -s conftest.err
5016        } && test -s conftest.$ac_objext; then
5017   cat >conftest.$ac_ext <<_ACEOF
5018 /* confdefs.h.  */
5019 _ACEOF
5020 cat confdefs.h >>conftest.$ac_ext
5021 cat >>conftest.$ac_ext <<_ACEOF
5022 /* end confdefs.h.  */
5023 $ac_includes_default
5024 int
5025 main ()
5026 {
5027 if (sizeof ((pid_t)))
5028           return 0;
5029   ;
5030   return 0;
5031 }
5032 _ACEOF
5033 rm -rf conftest.$ac_objext
5034 if { (ac_try="$ac_compile"
5035 case "(($ac_try" in
5036   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5037   *) ac_try_echo=$ac_try;;
5038 esac
5039 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
5040 $as_echo "$ac_try_echo") >&5
5041   (eval "$ac_compile") 2>conftest.er1
5042   ac_status=$?
5043   grep -v '^ *+' conftest.er1 >conftest.err
5044   rm -rf conftest.er1
5045   cat conftest.err >&5
5046   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
5047   (exit $ac_status); } && {
5048          test -z "$ac_c_werror_flag" ||
5049          test ! -s conftest.err
5050        } && test -s conftest.$ac_objext; then
5051   :
5052 else
5053   $as_echo "$as_me: failed program was:" >&5
5054 sed 's/^/| /' conftest.$ac_ext >&5
5055
5056         ac_cv_type_pid_t=yes
5057 fi
5058
5059 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5060 else
5061   $as_echo "$as_me: failed program was:" >&5
5062 sed 's/^/| /' conftest.$ac_ext >&5
5063
5064
5065 fi
5066
5067 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5068 fi
5069 { $as_echo "$as_me:$LINENO: result: $ac_cv_type_pid_t" >&5
5070 $as_echo "$ac_cv_type_pid_t" >&6; }
5071 if test "x$ac_cv_type_pid_t" = x""yes; then
5072   :
5073 else
5074
5075 cat >>confdefs.h <<_ACEOF
5076 #define pid_t int
5077 _ACEOF
5078
5079 fi
5080
5081 { $as_echo "$as_me:$LINENO: checking for size_t" >&5
5082 $as_echo_n "checking for size_t... " >&6; }
5083 if test "${ac_cv_type_size_t+set}" = set; then
5084   $as_echo_n "(cached) " >&6
5085 else
5086   ac_cv_type_size_t=no
5087 cat >conftest.$ac_ext <<_ACEOF
5088 /* confdefs.h.  */
5089 _ACEOF
5090 cat confdefs.h >>conftest.$ac_ext
5091 cat >>conftest.$ac_ext <<_ACEOF
5092 /* end confdefs.h.  */
5093 $ac_includes_default
5094 int
5095 main ()
5096 {
5097 if (sizeof (size_t))
5098        return 0;
5099   ;
5100   return 0;
5101 }
5102 _ACEOF
5103 rm -rf conftest.$ac_objext
5104 if { (ac_try="$ac_compile"
5105 case "(($ac_try" in
5106   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5107   *) ac_try_echo=$ac_try;;
5108 esac
5109 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
5110 $as_echo "$ac_try_echo") >&5
5111   (eval "$ac_compile") 2>conftest.er1
5112   ac_status=$?
5113   grep -v '^ *+' conftest.er1 >conftest.err
5114   rm -rf conftest.er1
5115   cat conftest.err >&5
5116   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
5117   (exit $ac_status); } && {
5118          test -z "$ac_c_werror_flag" ||
5119          test ! -s conftest.err
5120        } && test -s conftest.$ac_objext; then
5121   cat >conftest.$ac_ext <<_ACEOF
5122 /* confdefs.h.  */
5123 _ACEOF
5124 cat confdefs.h >>conftest.$ac_ext
5125 cat >>conftest.$ac_ext <<_ACEOF
5126 /* end confdefs.h.  */
5127 $ac_includes_default
5128 int
5129 main ()
5130 {
5131 if (sizeof ((size_t)))
5132           return 0;
5133   ;
5134   return 0;
5135 }
5136 _ACEOF
5137 rm -rf conftest.$ac_objext
5138 if { (ac_try="$ac_compile"
5139 case "(($ac_try" in
5140   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5141   *) ac_try_echo=$ac_try;;
5142 esac
5143 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
5144 $as_echo "$ac_try_echo") >&5
5145   (eval "$ac_compile") 2>conftest.er1
5146   ac_status=$?
5147   grep -v '^ *+' conftest.er1 >conftest.err
5148   rm -rf conftest.er1
5149   cat conftest.err >&5
5150   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
5151   (exit $ac_status); } && {
5152          test -z "$ac_c_werror_flag" ||
5153          test ! -s conftest.err
5154        } && test -s conftest.$ac_objext; then
5155   :
5156 else
5157   $as_echo "$as_me: failed program was:" >&5
5158 sed 's/^/| /' conftest.$ac_ext >&5
5159
5160         ac_cv_type_size_t=yes
5161 fi
5162
5163 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5164 else
5165   $as_echo "$as_me: failed program was:" >&5
5166 sed 's/^/| /' conftest.$ac_ext >&5
5167
5168
5169 fi
5170
5171 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5172 fi
5173 { $as_echo "$as_me:$LINENO: result: $ac_cv_type_size_t" >&5
5174 $as_echo "$ac_cv_type_size_t" >&6; }
5175 if test "x$ac_cv_type_size_t" = x""yes; then
5176   :
5177 else
5178
5179 cat >>confdefs.h <<_ACEOF
5180 #define size_t unsigned int
5181 _ACEOF
5182
5183 fi
5184
5185 { $as_echo "$as_me:$LINENO: checking return type of signal handlers" >&5
5186 $as_echo_n "checking return type of signal handlers... " >&6; }
5187 if test "${ac_cv_type_signal+set}" = set; then
5188   $as_echo_n "(cached) " >&6
5189 else
5190   cat >conftest.$ac_ext <<_ACEOF
5191 /* confdefs.h.  */
5192 _ACEOF
5193 cat confdefs.h >>conftest.$ac_ext
5194 cat >>conftest.$ac_ext <<_ACEOF
5195 /* end confdefs.h.  */
5196 #include <sys/types.h>
5197 #include <signal.h>
5198
5199 int
5200 main ()
5201 {
5202 return *(signal (0, 0)) (0) == 1;
5203   ;
5204   return 0;
5205 }
5206 _ACEOF
5207 rm -rf conftest.$ac_objext
5208 if { (ac_try="$ac_compile"
5209 case "(($ac_try" in
5210   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5211   *) ac_try_echo=$ac_try;;
5212 esac
5213 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
5214 $as_echo "$ac_try_echo") >&5
5215   (eval "$ac_compile") 2>conftest.er1
5216   ac_status=$?
5217   grep -v '^ *+' conftest.er1 >conftest.err
5218   rm -rf conftest.er1
5219   cat conftest.err >&5
5220   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
5221   (exit $ac_status); } && {
5222          test -z "$ac_c_werror_flag" ||
5223          test ! -s conftest.err
5224        } && test -s conftest.$ac_objext; then
5225   ac_cv_type_signal=int
5226 else
5227   $as_echo "$as_me: failed program was:" >&5
5228 sed 's/^/| /' conftest.$ac_ext >&5
5229
5230         ac_cv_type_signal=void
5231 fi
5232
5233 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5234 fi
5235 { $as_echo "$as_me:$LINENO: result: $ac_cv_type_signal" >&5
5236 $as_echo "$ac_cv_type_signal" >&6; }
5237
5238 cat >>confdefs.h <<_ACEOF
5239 #define RETSIGTYPE $ac_cv_type_signal
5240 _ACEOF
5241
5242
5243 { $as_echo "$as_me:$LINENO: checking whether time.h and sys/time.h may both be included" >&5
5244 $as_echo_n "checking whether time.h and sys/time.h may both be included... " >&6; }
5245 if test "${ac_cv_header_time+set}" = set; then
5246   $as_echo_n "(cached) " >&6
5247 else
5248   cat >conftest.$ac_ext <<_ACEOF
5249 /* confdefs.h.  */
5250 _ACEOF
5251 cat confdefs.h >>conftest.$ac_ext
5252 cat >>conftest.$ac_ext <<_ACEOF
5253 /* end confdefs.h.  */
5254 #include <sys/types.h>
5255 #include <sys/time.h>
5256 #include <time.h>
5257
5258 int
5259 main ()
5260 {
5261 if ((struct tm *) 0)
5262 return 0;
5263   ;
5264   return 0;
5265 }
5266 _ACEOF
5267 rm -rf conftest.$ac_objext
5268 if { (ac_try="$ac_compile"
5269 case "(($ac_try" in
5270   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5271   *) ac_try_echo=$ac_try;;
5272 esac
5273 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
5274 $as_echo "$ac_try_echo") >&5
5275   (eval "$ac_compile") 2>conftest.er1
5276   ac_status=$?
5277   grep -v '^ *+' conftest.er1 >conftest.err
5278   rm -rf conftest.er1
5279   cat conftest.err >&5
5280   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
5281   (exit $ac_status); } && {
5282          test -z "$ac_c_werror_flag" ||
5283          test ! -s conftest.err
5284        } && test -s conftest.$ac_objext; then
5285   ac_cv_header_time=yes
5286 else
5287   $as_echo "$as_me: failed program was:" >&5
5288 sed 's/^/| /' conftest.$ac_ext >&5
5289
5290         ac_cv_header_time=no
5291 fi
5292
5293 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5294 fi
5295 { $as_echo "$as_me:$LINENO: result: $ac_cv_header_time" >&5
5296 $as_echo "$ac_cv_header_time" >&6; }
5297 if test $ac_cv_header_time = yes; then
5298
5299 cat >>confdefs.h <<\_ACEOF
5300 #define TIME_WITH_SYS_TIME 1
5301 _ACEOF
5302
5303 fi
5304
5305 { $as_echo "$as_me:$LINENO: checking for sys/wait.h that is POSIX.1 compatible" >&5
5306 $as_echo_n "checking for sys/wait.h that is POSIX.1 compatible... " >&6; }
5307 if test "${ac_cv_header_sys_wait_h+set}" = set; then
5308   $as_echo_n "(cached) " >&6
5309 else
5310   cat >conftest.$ac_ext <<_ACEOF
5311 /* confdefs.h.  */
5312 _ACEOF
5313 cat confdefs.h >>conftest.$ac_ext
5314 cat >>conftest.$ac_ext <<_ACEOF
5315 /* end confdefs.h.  */
5316 #include <sys/types.h>
5317 #include <sys/wait.h>
5318 #ifndef WEXITSTATUS
5319 # define WEXITSTATUS(stat_val) ((unsigned int) (stat_val) >> 8)
5320 #endif
5321 #ifndef WIFEXITED
5322 # define WIFEXITED(stat_val) (((stat_val) & 255) == 0)
5323 #endif
5324
5325 int
5326 main ()
5327 {
5328   int s;
5329   wait (&s);
5330   s = WIFEXITED (s) ? WEXITSTATUS (s) : 1;
5331   ;
5332   return 0;
5333 }
5334 _ACEOF
5335 rm -rf conftest.$ac_objext
5336 if { (ac_try="$ac_compile"
5337 case "(($ac_try" in
5338   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5339   *) ac_try_echo=$ac_try;;
5340 esac
5341 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
5342 $as_echo "$ac_try_echo") >&5
5343   (eval "$ac_compile") 2>conftest.er1
5344   ac_status=$?
5345   grep -v '^ *+' conftest.er1 >conftest.err
5346   rm -rf conftest.er1
5347   cat conftest.err >&5
5348   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
5349   (exit $ac_status); } && {
5350          test -z "$ac_c_werror_flag" ||
5351          test ! -s conftest.err
5352        } && test -s conftest.$ac_objext; then
5353   ac_cv_header_sys_wait_h=yes
5354 else
5355   $as_echo "$as_me: failed program was:" >&5
5356 sed 's/^/| /' conftest.$ac_ext >&5
5357
5358         ac_cv_header_sys_wait_h=no
5359 fi
5360
5361 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5362 fi
5363 { $as_echo "$as_me:$LINENO: result: $ac_cv_header_sys_wait_h" >&5
5364 $as_echo "$ac_cv_header_sys_wait_h" >&6; }
5365 if test $ac_cv_header_sys_wait_h = yes; then
5366
5367 cat >>confdefs.h <<\_ACEOF
5368 #define HAVE_SYS_WAIT_H 1
5369 _ACEOF
5370
5371 fi
5372
5373
5374
5375
5376
5377
5378 ac_header_dirent=no
5379 for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h; do
5380   as_ac_Header=`$as_echo "ac_cv_header_dirent_$ac_hdr" | $as_tr_sh`
5381 { $as_echo "$as_me:$LINENO: checking for $ac_hdr that defines DIR" >&5
5382 $as_echo_n "checking for $ac_hdr that defines DIR... " >&6; }
5383 if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
5384   $as_echo_n "(cached) " >&6
5385 else
5386   cat >conftest.$ac_ext <<_ACEOF
5387 /* confdefs.h.  */
5388 _ACEOF
5389 cat confdefs.h >>conftest.$ac_ext
5390 cat >>conftest.$ac_ext <<_ACEOF
5391 /* end confdefs.h.  */
5392 #include <sys/types.h>
5393 #include <$ac_hdr>
5394
5395 int
5396 main ()
5397 {
5398 if ((DIR *) 0)
5399 return 0;
5400   ;
5401   return 0;
5402 }
5403 _ACEOF
5404 rm -rf conftest.$ac_objext
5405 if { (ac_try="$ac_compile"
5406 case "(($ac_try" in
5407   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5408   *) ac_try_echo=$ac_try;;
5409 esac
5410 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
5411 $as_echo "$ac_try_echo") >&5
5412   (eval "$ac_compile") 2>conftest.er1
5413   ac_status=$?
5414   grep -v '^ *+' conftest.er1 >conftest.err
5415   rm -rf conftest.er1
5416   cat conftest.err >&5
5417   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
5418   (exit $ac_status); } && {
5419          test -z "$ac_c_werror_flag" ||
5420          test ! -s conftest.err
5421        } && test -s conftest.$ac_objext; then
5422   eval "$as_ac_Header=yes"
5423 else
5424   $as_echo "$as_me: failed program was:" >&5
5425 sed 's/^/| /' conftest.$ac_ext >&5
5426
5427         eval "$as_ac_Header=no"
5428 fi
5429
5430 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5431 fi
5432 ac_res=`eval 'as_val=${'$as_ac_Header'}
5433                  $as_echo "$as_val"'`
5434                { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
5435 $as_echo "$ac_res" >&6; }
5436 as_val=`eval 'as_val=${'$as_ac_Header'}
5437                  $as_echo "$as_val"'`
5438    if test "x$as_val" = x""yes; then
5439   cat >>confdefs.h <<_ACEOF
5440 #define `$as_echo "HAVE_$ac_hdr" | $as_tr_cpp` 1
5441 _ACEOF
5442
5443 ac_header_dirent=$ac_hdr; break
5444 fi
5445
5446 done
5447 # Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
5448 if test $ac_header_dirent = dirent.h; then
5449   { $as_echo "$as_me:$LINENO: checking for library containing opendir" >&5
5450 $as_echo_n "checking for library containing opendir... " >&6; }
5451 if test "${ac_cv_search_opendir+set}" = set; then
5452   $as_echo_n "(cached) " >&6
5453 else
5454   ac_func_search_save_LIBS=$LIBS
5455 cat >conftest.$ac_ext <<_ACEOF
5456 /* confdefs.h.  */
5457 _ACEOF
5458 cat confdefs.h >>conftest.$ac_ext
5459 cat >>conftest.$ac_ext <<_ACEOF
5460 /* end confdefs.h.  */
5461
5462 /* Override any GCC internal prototype to avoid an error.
5463    Use char because int might match the return type of a GCC
5464    builtin and then its argument prototype would still apply.  */
5465 #ifdef __cplusplus
5466 extern "C"
5467 #endif
5468 char opendir ();
5469 int
5470 main ()
5471 {
5472 return opendir ();
5473   ;
5474   return 0;
5475 }
5476 _ACEOF
5477 for ac_lib in '' dir; do
5478   if test -z "$ac_lib"; then
5479     ac_res="none required"
5480   else
5481     ac_res=-l$ac_lib
5482     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
5483   fi
5484   rm -rf conftest.$ac_objext conftest$ac_exeext
5485 if { (ac_try="$ac_link"
5486 case "(($ac_try" in
5487   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5488   *) ac_try_echo=$ac_try;;
5489 esac
5490 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
5491 $as_echo "$ac_try_echo") >&5
5492   (eval "$ac_link") 2>conftest.er1
5493   ac_status=$?
5494   grep -v '^ *+' conftest.er1 >conftest.err
5495   rm -rf conftest.er1
5496   cat conftest.err >&5
5497   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
5498   (exit $ac_status); } && {
5499          test -z "$ac_c_werror_flag" ||
5500          test ! -s conftest.err
5501        } && test -s conftest$ac_exeext && {
5502          test "$cross_compiling" = yes ||
5503          $as_test_x conftest$ac_exeext
5504        }; then
5505   ac_cv_search_opendir=$ac_res
5506 else
5507   $as_echo "$as_me: failed program was:" >&5
5508 sed 's/^/| /' conftest.$ac_ext >&5
5509
5510
5511 fi
5512
5513 rm -rf conftest.dSYM
5514 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
5515       conftest$ac_exeext
5516   if test "${ac_cv_search_opendir+set}" = set; then
5517   break
5518 fi
5519 done
5520 if test "${ac_cv_search_opendir+set}" = set; then
5521   :
5522 else
5523   ac_cv_search_opendir=no
5524 fi
5525 rm conftest.$ac_ext
5526 LIBS=$ac_func_search_save_LIBS
5527 fi
5528 { $as_echo "$as_me:$LINENO: result: $ac_cv_search_opendir" >&5
5529 $as_echo "$ac_cv_search_opendir" >&6; }
5530 ac_res=$ac_cv_search_opendir
5531 if test "$ac_res" != no; then
5532   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
5533
5534 fi
5535
5536 else
5537   { $as_echo "$as_me:$LINENO: checking for library containing opendir" >&5
5538 $as_echo_n "checking for library containing opendir... " >&6; }
5539 if test "${ac_cv_search_opendir+set}" = set; then
5540   $as_echo_n "(cached) " >&6
5541 else
5542   ac_func_search_save_LIBS=$LIBS
5543 cat >conftest.$ac_ext <<_ACEOF
5544 /* confdefs.h.  */
5545 _ACEOF
5546 cat confdefs.h >>conftest.$ac_ext
5547 cat >>conftest.$ac_ext <<_ACEOF
5548 /* end confdefs.h.  */
5549
5550 /* Override any GCC internal prototype to avoid an error.
5551    Use char because int might match the return type of a GCC
5552    builtin and then its argument prototype would still apply.  */
5553 #ifdef __cplusplus
5554 extern "C"
5555 #endif
5556 char opendir ();
5557 int
5558 main ()
5559 {
5560 return opendir ();
5561   ;
5562   return 0;
5563 }
5564 _ACEOF
5565 for ac_lib in '' x; do
5566   if test -z "$ac_lib"; then
5567     ac_res="none required"
5568   else
5569     ac_res=-l$ac_lib
5570     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
5571   fi
5572   rm -rf conftest.$ac_objext conftest$ac_exeext
5573 if { (ac_try="$ac_link"
5574 case "(($ac_try" in
5575   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5576   *) ac_try_echo=$ac_try;;
5577 esac
5578 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
5579 $as_echo "$ac_try_echo") >&5
5580   (eval "$ac_link") 2>conftest.er1
5581   ac_status=$?
5582   grep -v '^ *+' conftest.er1 >conftest.err
5583   rm -rf conftest.er1
5584   cat conftest.err >&5
5585   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
5586   (exit $ac_status); } && {
5587          test -z "$ac_c_werror_flag" ||
5588          test ! -s conftest.err
5589        } && test -s conftest$ac_exeext && {
5590          test "$cross_compiling" = yes ||
5591          $as_test_x conftest$ac_exeext
5592        }; then
5593   ac_cv_search_opendir=$ac_res
5594 else
5595   $as_echo "$as_me: failed program was:" >&5
5596 sed 's/^/| /' conftest.$ac_ext >&5
5597
5598
5599 fi
5600
5601 rm -rf conftest.dSYM
5602 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
5603       conftest$ac_exeext
5604   if test "${ac_cv_search_opendir+set}" = set; then
5605   break
5606 fi
5607 done
5608 if test "${ac_cv_search_opendir+set}" = set; then
5609   :
5610 else
5611   ac_cv_search_opendir=no
5612 fi
5613 rm conftest.$ac_ext
5614 LIBS=$ac_func_search_save_LIBS
5615 fi
5616 { $as_echo "$as_me:$LINENO: result: $ac_cv_search_opendir" >&5
5617 $as_echo "$ac_cv_search_opendir" >&6; }
5618 ac_res=$ac_cv_search_opendir
5619 if test "$ac_res" != no; then
5620   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
5621
5622 fi
5623
5624 fi
5625
5626 { $as_echo "$as_me:$LINENO: checking how to call gettimeofday" >&5
5627 $as_echo_n "checking how to call gettimeofday... " >&6; }
5628   if test "${ac_cv_gettimeofday_args+set}" = set; then
5629   $as_echo_n "(cached) " >&6
5630 else
5631   cat >conftest.$ac_ext <<_ACEOF
5632 /* confdefs.h.  */
5633 _ACEOF
5634 cat confdefs.h >>conftest.$ac_ext
5635 cat >>conftest.$ac_ext <<_ACEOF
5636 /* end confdefs.h.  */
5637 #include <stdlib.h>
5638                     #include <sys/time.h>
5639 int
5640 main ()
5641 {
5642 struct timeval tv; struct timezone tzp;
5643                     gettimeofday(&tv, &tzp);
5644   ;
5645   return 0;
5646 }
5647 _ACEOF
5648 rm -rf conftest.$ac_objext
5649 if { (ac_try="$ac_compile"
5650 case "(($ac_try" in
5651   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5652   *) ac_try_echo=$ac_try;;
5653 esac
5654 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
5655 $as_echo "$ac_try_echo") >&5
5656   (eval "$ac_compile") 2>conftest.er1
5657   ac_status=$?
5658   grep -v '^ *+' conftest.er1 >conftest.err
5659   rm -rf conftest.er1
5660   cat conftest.err >&5
5661   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
5662   (exit $ac_status); } && {
5663          test -z "$ac_c_werror_flag" ||
5664          test ! -s conftest.err
5665        } && test -s conftest.$ac_objext; then
5666   ac_gettimeofday_args=2
5667 else
5668   $as_echo "$as_me: failed program was:" >&5
5669 sed 's/^/| /' conftest.$ac_ext >&5
5670
5671         cat >conftest.$ac_ext <<_ACEOF
5672 /* confdefs.h.  */
5673 _ACEOF
5674 cat confdefs.h >>conftest.$ac_ext
5675 cat >>conftest.$ac_ext <<_ACEOF
5676 /* end confdefs.h.  */
5677 #include <stdlib.h>
5678                                     #include <sys/time.h>
5679 int
5680 main ()
5681 {
5682 struct timeval tv; gettimeofday(&tv);
5683   ;
5684   return 0;
5685 }
5686 _ACEOF
5687 rm -rf conftest.$ac_objext
5688 if { (ac_try="$ac_compile"
5689 case "(($ac_try" in
5690   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5691   *) ac_try_echo=$ac_try;;
5692 esac
5693 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
5694 $as_echo "$ac_try_echo") >&5
5695   (eval "$ac_compile") 2>conftest.er1
5696   ac_status=$?
5697   grep -v '^ *+' conftest.er1 >conftest.err
5698   rm -rf conftest.er1
5699   cat conftest.err >&5
5700   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
5701   (exit $ac_status); } && {
5702          test -z "$ac_c_werror_flag" ||
5703          test ! -s conftest.err
5704        } && test -s conftest.$ac_objext; then
5705   ac_gettimeofday_args=1
5706 else
5707   $as_echo "$as_me: failed program was:" >&5
5708 sed 's/^/| /' conftest.$ac_ext >&5
5709
5710         ac_gettimeofday_args=0
5711 fi
5712
5713 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5714 fi
5715
5716 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5717     ac_cv_gettimeofday_args=$ac_gettimeofday_args
5718 fi
5719
5720   ac_gettimeofday_args=$ac_cv_gettimeofday_args
5721   if test "$ac_gettimeofday_args" = 1 ; then
5722     cat >>confdefs.h <<\_ACEOF
5723 #define HAVE_GETTIMEOFDAY 1
5724 _ACEOF
5725
5726     { $as_echo "$as_me:$LINENO: result: one argument" >&5
5727 $as_echo "one argument" >&6; }
5728   elif test "$ac_gettimeofday_args" = 2 ; then
5729     cat >>confdefs.h <<\_ACEOF
5730 #define HAVE_GETTIMEOFDAY 1
5731 _ACEOF
5732
5733     cat >>confdefs.h <<\_ACEOF
5734 #define GETTIMEOFDAY_TWO_ARGS 1
5735 _ACEOF
5736
5737     { $as_echo "$as_me:$LINENO: result: two arguments" >&5
5738 $as_echo "two arguments" >&6; }
5739   else
5740     { $as_echo "$as_me:$LINENO: result: unknown" >&5
5741 $as_echo "unknown" >&6; }
5742   fi
5743
5744
5745
5746
5747
5748
5749
5750
5751
5752
5753 for ac_func in select fcntl uname nice setpriority getcwd getwd putenv sbrk
5754 do
5755 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
5756 { $as_echo "$as_me:$LINENO: checking for $ac_func" >&5
5757 $as_echo_n "checking for $ac_func... " >&6; }
5758 if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
5759   $as_echo_n "(cached) " >&6
5760 else
5761   cat >conftest.$ac_ext <<_ACEOF
5762 /* confdefs.h.  */
5763 _ACEOF
5764 cat confdefs.h >>conftest.$ac_ext
5765 cat >>conftest.$ac_ext <<_ACEOF
5766 /* end confdefs.h.  */
5767 /* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
5768    For example, HP-UX 11i <limits.h> declares gettimeofday.  */
5769 #define $ac_func innocuous_$ac_func
5770
5771 /* System header to define __stub macros and hopefully few prototypes,
5772     which can conflict with char $ac_func (); below.
5773     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
5774     <limits.h> exists even on freestanding compilers.  */
5775
5776 #ifdef __STDC__
5777 # include <limits.h>
5778 #else
5779 # include <assert.h>
5780 #endif
5781
5782 #undef $ac_func
5783
5784 /* Override any GCC internal prototype to avoid an error.
5785    Use char because int might match the return type of a GCC
5786    builtin and then its argument prototype would still apply.  */
5787 #ifdef __cplusplus
5788 extern "C"
5789 #endif
5790 char $ac_func ();
5791 /* The GNU C library defines this for functions which it implements
5792     to always fail with ENOSYS.  Some functions are actually named
5793     something starting with __ and the normal name is an alias.  */
5794 #if defined __stub_$ac_func || defined __stub___$ac_func
5795 choke me
5796 #endif
5797
5798 int
5799 main ()
5800 {
5801 return $ac_func ();
5802   ;
5803   return 0;
5804 }
5805 _ACEOF
5806 rm -rf conftest.$ac_objext conftest$ac_exeext
5807 if { (ac_try="$ac_link"
5808 case "(($ac_try" in
5809   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5810   *) ac_try_echo=$ac_try;;
5811 esac
5812 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
5813 $as_echo "$ac_try_echo") >&5
5814   (eval "$ac_link") 2>conftest.er1
5815   ac_status=$?
5816   grep -v '^ *+' conftest.er1 >conftest.err
5817   rm -rf conftest.er1
5818   cat conftest.err >&5
5819   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
5820   (exit $ac_status); } && {
5821          test -z "$ac_c_werror_flag" ||
5822          test ! -s conftest.err
5823        } && test -s conftest$ac_exeext && {
5824          test "$cross_compiling" = yes ||
5825          $as_test_x conftest$ac_exeext
5826        }; then
5827   eval "$as_ac_var=yes"
5828 else
5829   $as_echo "$as_me: failed program was:" >&5
5830 sed 's/^/| /' conftest.$ac_ext >&5
5831
5832         eval "$as_ac_var=no"
5833 fi
5834
5835 rm -rf conftest.dSYM
5836 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
5837       conftest$ac_exeext conftest.$ac_ext
5838 fi
5839 ac_res=`eval 'as_val=${'$as_ac_var'}
5840                  $as_echo "$as_val"'`
5841                { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
5842 $as_echo "$ac_res" >&6; }
5843 as_val=`eval 'as_val=${'$as_ac_var'}
5844                  $as_echo "$as_val"'`
5845    if test "x$as_val" = x""yes; then
5846   cat >>confdefs.h <<_ACEOF
5847 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
5848 _ACEOF
5849
5850 fi
5851 done
5852
5853
5854
5855
5856
5857 for ac_func in sigaction syslog realpath setrlimit
5858 do
5859 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
5860 { $as_echo "$as_me:$LINENO: checking for $ac_func" >&5
5861 $as_echo_n "checking for $ac_func... " >&6; }
5862 if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
5863   $as_echo_n "(cached) " >&6
5864 else
5865   cat >conftest.$ac_ext <<_ACEOF
5866 /* confdefs.h.  */
5867 _ACEOF
5868 cat confdefs.h >>conftest.$ac_ext
5869 cat >>conftest.$ac_ext <<_ACEOF
5870 /* end confdefs.h.  */
5871 /* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
5872    For example, HP-UX 11i <limits.h> declares gettimeofday.  */
5873 #define $ac_func innocuous_$ac_func
5874
5875 /* System header to define __stub macros and hopefully few prototypes,
5876     which can conflict with char $ac_func (); below.
5877     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
5878     <limits.h> exists even on freestanding compilers.  */
5879
5880 #ifdef __STDC__
5881 # include <limits.h>
5882 #else
5883 # include <assert.h>
5884 #endif
5885
5886 #undef $ac_func
5887
5888 /* Override any GCC internal prototype to avoid an error.
5889    Use char because int might match the return type of a GCC
5890    builtin and then its argument prototype would still apply.  */
5891 #ifdef __cplusplus
5892 extern "C"
5893 #endif
5894 char $ac_func ();
5895 /* The GNU C library defines this for functions which it implements
5896     to always fail with ENOSYS.  Some functions are actually named
5897     something starting with __ and the normal name is an alias.  */
5898 #if defined __stub_$ac_func || defined __stub___$ac_func
5899 choke me
5900 #endif
5901
5902 int
5903 main ()
5904 {
5905 return $ac_func ();
5906   ;
5907   return 0;
5908 }
5909 _ACEOF
5910 rm -rf conftest.$ac_objext conftest$ac_exeext
5911 if { (ac_try="$ac_link"
5912 case "(($ac_try" in
5913   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5914   *) ac_try_echo=$ac_try;;
5915 esac
5916 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
5917 $as_echo "$ac_try_echo") >&5
5918   (eval "$ac_link") 2>conftest.er1
5919   ac_status=$?
5920   grep -v '^ *+' conftest.er1 >conftest.err
5921   rm -rf conftest.er1
5922   cat conftest.err >&5
5923   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
5924   (exit $ac_status); } && {
5925          test -z "$ac_c_werror_flag" ||
5926          test ! -s conftest.err
5927        } && test -s conftest$ac_exeext && {
5928          test "$cross_compiling" = yes ||
5929          $as_test_x conftest$ac_exeext
5930        }; then
5931   eval "$as_ac_var=yes"
5932 else
5933   $as_echo "$as_me: failed program was:" >&5
5934 sed 's/^/| /' conftest.$ac_ext >&5
5935
5936         eval "$as_ac_var=no"
5937 fi
5938
5939 rm -rf conftest.dSYM
5940 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
5941       conftest$ac_exeext conftest.$ac_ext
5942 fi
5943 ac_res=`eval 'as_val=${'$as_ac_var'}
5944                  $as_echo "$as_val"'`
5945                { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
5946 $as_echo "$ac_res" >&6; }
5947 as_val=`eval 'as_val=${'$as_ac_var'}
5948                  $as_echo "$as_val"'`
5949    if test "x$as_val" = x""yes; then
5950   cat >>confdefs.h <<_ACEOF
5951 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
5952 _ACEOF
5953
5954 fi
5955 done
5956
5957
5958 for ac_func in setlocale
5959 do
5960 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
5961 { $as_echo "$as_me:$LINENO: checking for $ac_func" >&5
5962 $as_echo_n "checking for $ac_func... " >&6; }
5963 if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
5964   $as_echo_n "(cached) " >&6
5965 else
5966   cat >conftest.$ac_ext <<_ACEOF
5967 /* confdefs.h.  */
5968 _ACEOF
5969 cat confdefs.h >>conftest.$ac_ext
5970 cat >>conftest.$ac_ext <<_ACEOF
5971 /* end confdefs.h.  */
5972 /* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
5973    For example, HP-UX 11i <limits.h> declares gettimeofday.  */
5974 #define $ac_func innocuous_$ac_func
5975
5976 /* System header to define __stub macros and hopefully few prototypes,
5977     which can conflict with char $ac_func (); below.
5978     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
5979     <limits.h> exists even on freestanding compilers.  */
5980
5981 #ifdef __STDC__
5982 # include <limits.h>
5983 #else
5984 # include <assert.h>
5985 #endif
5986
5987 #undef $ac_func
5988
5989 /* Override any GCC internal prototype to avoid an error.
5990    Use char because int might match the return type of a GCC
5991    builtin and then its argument prototype would still apply.  */
5992 #ifdef __cplusplus
5993 extern "C"
5994 #endif
5995 char $ac_func ();
5996 /* The GNU C library defines this for functions which it implements
5997     to always fail with ENOSYS.  Some functions are actually named
5998     something starting with __ and the normal name is an alias.  */
5999 #if defined __stub_$ac_func || defined __stub___$ac_func
6000 choke me
6001 #endif
6002
6003 int
6004 main ()
6005 {
6006 return $ac_func ();
6007   ;
6008   return 0;
6009 }
6010 _ACEOF
6011 rm -rf conftest.$ac_objext conftest$ac_exeext
6012 if { (ac_try="$ac_link"
6013 case "(($ac_try" in
6014   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6015   *) ac_try_echo=$ac_try;;
6016 esac
6017 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
6018 $as_echo "$ac_try_echo") >&5
6019   (eval "$ac_link") 2>conftest.er1
6020   ac_status=$?
6021   grep -v '^ *+' conftest.er1 >conftest.err
6022   rm -rf conftest.er1
6023   cat conftest.err >&5
6024   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
6025   (exit $ac_status); } && {
6026          test -z "$ac_c_werror_flag" ||
6027          test ! -s conftest.err
6028        } && test -s conftest$ac_exeext && {
6029          test "$cross_compiling" = yes ||
6030          $as_test_x conftest$ac_exeext
6031        }; then
6032   eval "$as_ac_var=yes"
6033 else
6034   $as_echo "$as_me: failed program was:" >&5
6035 sed 's/^/| /' conftest.$ac_ext >&5
6036
6037         eval "$as_ac_var=no"
6038 fi
6039
6040 rm -rf conftest.dSYM
6041 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
6042       conftest$ac_exeext conftest.$ac_ext
6043 fi
6044 ac_res=`eval 'as_val=${'$as_ac_var'}
6045                  $as_echo "$as_val"'`
6046                { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
6047 $as_echo "$ac_res" >&6; }
6048 as_val=`eval 'as_val=${'$as_ac_var'}
6049                  $as_echo "$as_val"'`
6050    if test "x$as_val" = x""yes; then
6051   cat >>confdefs.h <<_ACEOF
6052 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
6053 _ACEOF
6054
6055 fi
6056 done
6057
6058 { $as_echo "$as_me:$LINENO: checking for struct icmp" >&5
6059 $as_echo_n "checking for struct icmp... " >&6; }
6060 if test "${ac_cv_have_icmp+set}" = set; then
6061   $as_echo_n "(cached) " >&6
6062 else
6063   cat >conftest.$ac_ext <<_ACEOF
6064 /* confdefs.h.  */
6065 _ACEOF
6066 cat confdefs.h >>conftest.$ac_ext
6067 cat >>conftest.$ac_ext <<_ACEOF
6068 /* end confdefs.h.  */
6069 #include <stdlib.h>
6070                    #include <stdio.h>
6071                    #include <math.h>
6072                    #include <unistd.h>
6073                    #include <limits.h>
6074                    #include <signal.h>
6075                    #include <fcntl.h>
6076                    #include <sys/types.h>
6077                    #include <sys/time.h>
6078                    #include <sys/ipc.h>
6079                    #include <sys/shm.h>
6080                    #include <sys/socket.h>
6081                    #include <netinet/in_systm.h>
6082                    #include <netinet/in.h>
6083                    #include <netinet/ip.h>
6084                    #include <netinet/ip_icmp.h>
6085                    #include <netinet/udp.h>
6086                    #include <arpa/inet.h>
6087                    #include <netdb.h>
6088 int
6089 main ()
6090 {
6091 struct icmp i;
6092                    struct sockaddr s;
6093                    struct sockaddr_in si;
6094                    struct ip ip;
6095                    i.icmp_type = ICMP_ECHO;
6096                    i.icmp_code = 0;
6097                    i.icmp_cksum = 0;
6098                    i.icmp_id = 0;
6099                    i.icmp_seq = 0;
6100                    si.sin_family = AF_INET;
6101                    #if defined(__DECC) || defined(_IP_VHL)
6102                    ip.ip_vhl = 0;
6103                    #else
6104                    ip.ip_hl = 0;
6105                    #endif
6106
6107   ;
6108   return 0;
6109 }
6110 _ACEOF
6111 rm -rf conftest.$ac_objext
6112 if { (ac_try="$ac_compile"
6113 case "(($ac_try" in
6114   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6115   *) ac_try_echo=$ac_try;;
6116 esac
6117 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
6118 $as_echo "$ac_try_echo") >&5
6119   (eval "$ac_compile") 2>conftest.er1
6120   ac_status=$?
6121   grep -v '^ *+' conftest.er1 >conftest.err
6122   rm -rf conftest.er1
6123   cat conftest.err >&5
6124   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
6125   (exit $ac_status); } && {
6126          test -z "$ac_c_werror_flag" ||
6127          test ! -s conftest.err
6128        } && test -s conftest.$ac_objext; then
6129   ac_cv_have_icmp=yes
6130 else
6131   $as_echo "$as_me: failed program was:" >&5
6132 sed 's/^/| /' conftest.$ac_ext >&5
6133
6134         ac_cv_have_icmp=no
6135 fi
6136
6137 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6138 fi
6139 { $as_echo "$as_me:$LINENO: result: $ac_cv_have_icmp" >&5
6140 $as_echo "$ac_cv_have_icmp" >&6; }
6141  if test "$ac_cv_have_icmp" = yes ; then
6142    cat >>confdefs.h <<\_ACEOF
6143 #define HAVE_ICMP 1
6144 _ACEOF
6145
6146  fi
6147 { $as_echo "$as_me:$LINENO: checking for struct icmphdr" >&5
6148 $as_echo_n "checking for struct icmphdr... " >&6; }
6149 if test "${ac_cv_have_icmphdr+set}" = set; then
6150   $as_echo_n "(cached) " >&6
6151 else
6152   cat >conftest.$ac_ext <<_ACEOF
6153 /* confdefs.h.  */
6154 _ACEOF
6155 cat confdefs.h >>conftest.$ac_ext
6156 cat >>conftest.$ac_ext <<_ACEOF
6157 /* end confdefs.h.  */
6158 #include <stdlib.h>
6159                    #include <stdio.h>
6160                    #include <math.h>
6161                    #include <unistd.h>
6162                    #include <limits.h>
6163                    #include <signal.h>
6164                    #include <fcntl.h>
6165                    #include <sys/types.h>
6166                    #include <sys/time.h>
6167                    #include <sys/ipc.h>
6168                    #include <sys/shm.h>
6169                    #include <sys/socket.h>
6170                    #include <netinet/in_systm.h>
6171                    #include <netinet/in.h>
6172                    #include <netinet/ip.h>
6173                    #include <netinet/ip_icmp.h>
6174                    #include <netinet/udp.h>
6175                    #include <arpa/inet.h>
6176                    #include <netdb.h>
6177 int
6178 main ()
6179 {
6180 struct icmphdr i;
6181                    struct sockaddr s;
6182                    struct sockaddr_in si;
6183                    struct ip ip;
6184                    i.type = ICMP_ECHO;
6185                    i.code = 0;
6186                    i.checksum = 0;
6187                    i.un.echo.id = 0;
6188                    i.un.echo.sequence = 0;
6189                    si.sin_family = AF_INET;
6190                    ip.ip_hl = 0;
6191   ;
6192   return 0;
6193 }
6194 _ACEOF
6195 rm -rf conftest.$ac_objext
6196 if { (ac_try="$ac_compile"
6197 case "(($ac_try" in
6198   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6199   *) ac_try_echo=$ac_try;;
6200 esac
6201 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
6202 $as_echo "$ac_try_echo") >&5
6203   (eval "$ac_compile") 2>conftest.er1
6204   ac_status=$?
6205   grep -v '^ *+' conftest.er1 >conftest.err
6206   rm -rf conftest.er1
6207   cat conftest.err >&5
6208   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
6209   (exit $ac_status); } && {
6210          test -z "$ac_c_werror_flag" ||
6211          test ! -s conftest.err
6212        } && test -s conftest.$ac_objext; then
6213   ac_cv_have_icmphdr=yes
6214 else
6215   $as_echo "$as_me: failed program was:" >&5
6216 sed 's/^/| /' conftest.$ac_ext >&5
6217
6218         ac_cv_have_icmphdr=no
6219 fi
6220
6221 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6222 fi
6223 { $as_echo "$as_me:$LINENO: result: $ac_cv_have_icmphdr" >&5
6224 $as_echo "$ac_cv_have_icmphdr" >&6; }
6225  if test "$ac_cv_have_icmphdr" = yes ; then
6226    cat >>confdefs.h <<\_ACEOF
6227 #define HAVE_ICMPHDR 1
6228 _ACEOF
6229
6230  fi
6231
6232
6233 for ac_header in crypt.h sys/select.h
6234 do
6235 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
6236 if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
6237   { $as_echo "$as_me:$LINENO: checking for $ac_header" >&5
6238 $as_echo_n "checking for $ac_header... " >&6; }
6239 if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
6240   $as_echo_n "(cached) " >&6
6241 fi
6242 ac_res=`eval 'as_val=${'$as_ac_Header'}
6243                  $as_echo "$as_val"'`
6244                { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
6245 $as_echo "$ac_res" >&6; }
6246 else
6247   # Is the header compilable?
6248 { $as_echo "$as_me:$LINENO: checking $ac_header usability" >&5
6249 $as_echo_n "checking $ac_header usability... " >&6; }
6250 cat >conftest.$ac_ext <<_ACEOF
6251 /* confdefs.h.  */
6252 _ACEOF
6253 cat confdefs.h >>conftest.$ac_ext
6254 cat >>conftest.$ac_ext <<_ACEOF
6255 /* end confdefs.h.  */
6256 $ac_includes_default
6257 #include <$ac_header>
6258 _ACEOF
6259 rm -rf conftest.$ac_objext
6260 if { (ac_try="$ac_compile"
6261 case "(($ac_try" in
6262   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6263   *) ac_try_echo=$ac_try;;
6264 esac
6265 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
6266 $as_echo "$ac_try_echo") >&5
6267   (eval "$ac_compile") 2>conftest.er1
6268   ac_status=$?
6269   grep -v '^ *+' conftest.er1 >conftest.err
6270   rm -rf conftest.er1
6271   cat conftest.err >&5
6272   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
6273   (exit $ac_status); } && {
6274          test -z "$ac_c_werror_flag" ||
6275          test ! -s conftest.err
6276        } && test -s conftest.$ac_objext; then
6277   ac_header_compiler=yes
6278 else
6279   $as_echo "$as_me: failed program was:" >&5
6280 sed 's/^/| /' conftest.$ac_ext >&5
6281
6282         ac_header_compiler=no
6283 fi
6284
6285 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6286 { $as_echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
6287 $as_echo "$ac_header_compiler" >&6; }
6288
6289 # Is the header present?
6290 { $as_echo "$as_me:$LINENO: checking $ac_header presence" >&5
6291 $as_echo_n "checking $ac_header presence... " >&6; }
6292 cat >conftest.$ac_ext <<_ACEOF
6293 /* confdefs.h.  */
6294 _ACEOF
6295 cat confdefs.h >>conftest.$ac_ext
6296 cat >>conftest.$ac_ext <<_ACEOF
6297 /* end confdefs.h.  */
6298 #include <$ac_header>
6299 _ACEOF
6300 if { (ac_try="$ac_cpp conftest.$ac_ext"
6301 case "(($ac_try" in
6302   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6303   *) ac_try_echo=$ac_try;;
6304 esac
6305 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
6306 $as_echo "$ac_try_echo") >&5
6307   (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
6308   ac_status=$?
6309   grep -v '^ *+' conftest.er1 >conftest.err
6310   rm -rf conftest.er1
6311   cat conftest.err >&5
6312   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
6313   (exit $ac_status); } >/dev/null && {
6314          test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
6315          test ! -s conftest.err
6316        }; then
6317   ac_header_preproc=yes
6318 else
6319   $as_echo "$as_me: failed program was:" >&5
6320 sed 's/^/| /' conftest.$ac_ext >&5
6321
6322   ac_header_preproc=no
6323 fi
6324
6325 rm -rf conftest.err conftest.$ac_ext
6326 { $as_echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
6327 $as_echo "$ac_header_preproc" >&6; }
6328
6329 # So?  What about this header?
6330 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
6331   yes:no: )
6332     { $as_echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
6333 $as_echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
6334     { $as_echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
6335 $as_echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
6336     ac_header_preproc=yes
6337     ;;
6338   no:yes:* )
6339     { $as_echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
6340 $as_echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
6341     { $as_echo "$as_me:$LINENO: WARNING: $ac_header:     check for missing prerequisite headers?" >&5
6342 $as_echo "$as_me: WARNING: $ac_header:     check for missing prerequisite headers?" >&2;}
6343     { $as_echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
6344 $as_echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
6345     { $as_echo "$as_me:$LINENO: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&5
6346 $as_echo "$as_me: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&2;}
6347     { $as_echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
6348 $as_echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
6349     { $as_echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
6350 $as_echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
6351
6352     ;;
6353 esac
6354 { $as_echo "$as_me:$LINENO: checking for $ac_header" >&5
6355 $as_echo_n "checking for $ac_header... " >&6; }
6356 if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
6357   $as_echo_n "(cached) " >&6
6358 else
6359   eval "$as_ac_Header=\$ac_header_preproc"
6360 fi
6361 ac_res=`eval 'as_val=${'$as_ac_Header'}
6362                  $as_echo "$as_val"'`
6363                { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
6364 $as_echo "$ac_res" >&6; }
6365
6366 fi
6367 as_val=`eval 'as_val=${'$as_ac_Header'}
6368                  $as_echo "$as_val"'`
6369    if test "x$as_val" = x""yes; then
6370   cat >>confdefs.h <<_ACEOF
6371 #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
6372 _ACEOF
6373
6374 fi
6375
6376 done
6377
6378 for ac_prog in perl5 perl
6379 do
6380   # Extract the first word of "$ac_prog", so it can be a program name with args.
6381 set dummy $ac_prog; ac_word=$2
6382 { $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
6383 $as_echo_n "checking for $ac_word... " >&6; }
6384 if test "${ac_cv_path_PERL+set}" = set; then
6385   $as_echo_n "(cached) " >&6
6386 else
6387   case $PERL in
6388   [\\/]* | ?:[\\/]*)
6389   ac_cv_path_PERL="$PERL" # Let the user override the test with a path.
6390   ;;
6391   *)
6392   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6393 for as_dir in $PATH
6394 do
6395   IFS=$as_save_IFS
6396   test -z "$as_dir" && as_dir=.
6397   for ac_exec_ext in '' $ac_executable_extensions; do
6398   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
6399     ac_cv_path_PERL="$as_dir/$ac_word$ac_exec_ext"
6400     $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
6401     break 2
6402   fi
6403 done
6404 done
6405 IFS=$as_save_IFS
6406
6407   ;;
6408 esac
6409 fi
6410 PERL=$ac_cv_path_PERL
6411 if test -n "$PERL"; then
6412   { $as_echo "$as_me:$LINENO: result: $PERL" >&5
6413 $as_echo "$PERL" >&6; }
6414 else
6415   { $as_echo "$as_me:$LINENO: result: no" >&5
6416 $as_echo "no" >&6; }
6417 fi
6418
6419
6420   test -n "$PERL" && break
6421 done
6422
6423   if test -z "$PERL" ; then
6424     PERL_VERSION=0
6425   else
6426     { $as_echo "$as_me:$LINENO: checking perl version" >&5
6427 $as_echo_n "checking perl version... " >&6; }
6428 if test "${ac_cv_perl_version+set}" = set; then
6429   $as_echo_n "(cached) " >&6
6430 else
6431   ac_cv_perl_version=`$PERL -e "$perl_version_cmd"`
6432 fi
6433 { $as_echo "$as_me:$LINENO: result: $ac_cv_perl_version" >&5
6434 $as_echo "$ac_cv_perl_version" >&6; }
6435     PERL_VERSION=$ac_cv_perl_version
6436   fi
6437
6438
6439 if test -z "$PERL" ; then
6440   # don't let it be blank...
6441   PERL=/usr/bin/perl
6442 fi
6443
6444 { $as_echo "$as_me:$LINENO: checking for X" >&5
6445 $as_echo_n "checking for X... " >&6; }
6446
6447
6448 # Check whether --with-x was given.
6449 if test "${with_x+set}" = set; then
6450   withval=$with_x;
6451 fi
6452
6453 # $have_x is `yes', `no', `disabled', or empty when we do not yet know.
6454 if test "x$with_x" = xno; then
6455   # The user explicitly disabled X.
6456   have_x=disabled
6457 else
6458   case $x_includes,$x_libraries in #(
6459     *\'*) { { $as_echo "$as_me:$LINENO: error: cannot use X directory names containing '" >&5
6460 $as_echo "$as_me: error: cannot use X directory names containing '" >&2;}
6461    { (exit 1); exit 1; }; };; #(
6462     *,NONE | NONE,*) if test "${ac_cv_have_x+set}" = set; then
6463   $as_echo_n "(cached) " >&6
6464 else
6465   # One or both of the vars are not set, and there is no cached value.
6466 ac_x_includes=no ac_x_libraries=no
6467 rm -f -r conftest.dir
6468 if mkdir conftest.dir; then
6469   cd conftest.dir
6470   cat >Imakefile <<'_ACEOF'
6471 incroot:
6472         @echo incroot='${INCROOT}'
6473 usrlibdir:
6474         @echo usrlibdir='${USRLIBDIR}'
6475 libdir:
6476         @echo libdir='${LIBDIR}'
6477 _ACEOF
6478   if (export CC; ${XMKMF-xmkmf}) >/dev/null 2>/dev/null && test -f Makefile; then
6479     # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
6480     for ac_var in incroot usrlibdir libdir; do
6481       eval "ac_im_$ac_var=\`\${MAKE-make} $ac_var 2>/dev/null | sed -n 's/^$ac_var=//p'\`"
6482     done
6483     # Open Windows xmkmf reportedly sets LIBDIR instead of USRLIBDIR.
6484     for ac_extension in a so sl dylib la dll; do
6485       if test ! -f "$ac_im_usrlibdir/libX11.$ac_extension" &&
6486          test -f "$ac_im_libdir/libX11.$ac_extension"; then
6487         ac_im_usrlibdir=$ac_im_libdir; break
6488       fi
6489     done
6490     # Screen out bogus values from the imake configuration.  They are
6491     # bogus both because they are the default anyway, and because
6492     # using them would break gcc on systems where it needs fixed includes.
6493     case $ac_im_incroot in
6494         /usr/include) ac_x_includes= ;;
6495         *) test -f "$ac_im_incroot/X11/Xos.h" && ac_x_includes=$ac_im_incroot;;
6496     esac
6497     case $ac_im_usrlibdir in
6498         /usr/lib | /usr/lib64 | /lib | /lib64) ;;
6499         *) test -d "$ac_im_usrlibdir" && ac_x_libraries=$ac_im_usrlibdir ;;
6500     esac
6501   fi
6502   cd ..
6503   rm -f -r conftest.dir
6504 fi
6505
6506 # Standard set of common directories for X headers.
6507 # Check X11 before X11Rn because it is often a symlink to the current release.
6508 ac_x_header_dirs='
6509 /usr/X11/include
6510 /usr/X11R6/include
6511 /usr/X11R5/include
6512 /usr/X11R4/include
6513
6514 /usr/include/X11
6515 /usr/include/X11R6
6516 /usr/include/X11R5
6517 /usr/include/X11R4
6518
6519 /usr/local/X11/include
6520 /usr/local/X11R6/include
6521 /usr/local/X11R5/include
6522 /usr/local/X11R4/include
6523
6524 /usr/local/include/X11
6525 /usr/local/include/X11R6
6526 /usr/local/include/X11R5
6527 /usr/local/include/X11R4
6528
6529 /usr/X386/include
6530 /usr/x386/include
6531 /usr/XFree86/include/X11
6532
6533 /usr/include
6534 /usr/local/include
6535 /usr/unsupported/include
6536 /usr/athena/include
6537 /usr/local/x11r5/include
6538 /usr/lpp/Xamples/include
6539
6540 /usr/openwin/include
6541 /usr/openwin/share/include'
6542
6543 if test "$ac_x_includes" = no; then
6544   # Guess where to find include files, by looking for Xlib.h.
6545   # First, try using that file with no special directory specified.
6546   cat >conftest.$ac_ext <<_ACEOF
6547 /* confdefs.h.  */
6548 _ACEOF
6549 cat confdefs.h >>conftest.$ac_ext
6550 cat >>conftest.$ac_ext <<_ACEOF
6551 /* end confdefs.h.  */
6552 #include <X11/Xlib.h>
6553 _ACEOF
6554 if { (ac_try="$ac_cpp conftest.$ac_ext"
6555 case "(($ac_try" in
6556   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6557   *) ac_try_echo=$ac_try;;
6558 esac
6559 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
6560 $as_echo "$ac_try_echo") >&5
6561   (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
6562   ac_status=$?
6563   grep -v '^ *+' conftest.er1 >conftest.err
6564   rm -rf conftest.er1
6565   cat conftest.err >&5
6566   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
6567   (exit $ac_status); } >/dev/null && {
6568          test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
6569          test ! -s conftest.err
6570        }; then
6571   # We can compile using X headers with no special include directory.
6572 ac_x_includes=
6573 else
6574   $as_echo "$as_me: failed program was:" >&5
6575 sed 's/^/| /' conftest.$ac_ext >&5
6576
6577   for ac_dir in $ac_x_header_dirs; do
6578   if test -r "$ac_dir/X11/Xlib.h"; then
6579     ac_x_includes=$ac_dir
6580     break
6581   fi
6582 done
6583 fi
6584
6585 rm -rf conftest.err conftest.$ac_ext
6586 fi # $ac_x_includes = no
6587
6588 if test "$ac_x_libraries" = no; then
6589   # Check for the libraries.
6590   # See if we find them without any special options.
6591   # Don't add to $LIBS permanently.
6592   ac_save_LIBS=$LIBS
6593   LIBS="-lX11 $LIBS"
6594   cat >conftest.$ac_ext <<_ACEOF
6595 /* confdefs.h.  */
6596 _ACEOF
6597 cat confdefs.h >>conftest.$ac_ext
6598 cat >>conftest.$ac_ext <<_ACEOF
6599 /* end confdefs.h.  */
6600 #include <X11/Xlib.h>
6601 int
6602 main ()
6603 {
6604 XrmInitialize ()
6605   ;
6606   return 0;
6607 }
6608 _ACEOF
6609 rm -rf conftest.$ac_objext conftest$ac_exeext
6610 if { (ac_try="$ac_link"
6611 case "(($ac_try" in
6612   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6613   *) ac_try_echo=$ac_try;;
6614 esac
6615 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
6616 $as_echo "$ac_try_echo") >&5
6617   (eval "$ac_link") 2>conftest.er1
6618   ac_status=$?
6619   grep -v '^ *+' conftest.er1 >conftest.err
6620   rm -rf conftest.er1
6621   cat conftest.err >&5
6622   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
6623   (exit $ac_status); } && {
6624          test -z "$ac_c_werror_flag" ||
6625          test ! -s conftest.err
6626        } && test -s conftest$ac_exeext && {
6627          test "$cross_compiling" = yes ||
6628          $as_test_x conftest$ac_exeext
6629        }; then
6630   LIBS=$ac_save_LIBS
6631 # We can link X programs with no special library path.
6632 ac_x_libraries=
6633 else
6634   $as_echo "$as_me: failed program was:" >&5
6635 sed 's/^/| /' conftest.$ac_ext >&5
6636
6637         LIBS=$ac_save_LIBS
6638 for ac_dir in `$as_echo "$ac_x_includes $ac_x_header_dirs" | sed s/include/lib/g`
6639 do
6640   # Don't even attempt the hair of trying to link an X program!
6641   for ac_extension in a so sl dylib la dll; do
6642     if test -r "$ac_dir/libX11.$ac_extension"; then
6643       ac_x_libraries=$ac_dir
6644       break 2
6645     fi
6646   done
6647 done
6648 fi
6649
6650 rm -rf conftest.dSYM
6651 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
6652       conftest$ac_exeext conftest.$ac_ext
6653 fi # $ac_x_libraries = no
6654
6655 case $ac_x_includes,$ac_x_libraries in #(
6656   no,* | *,no | *\'*)
6657     # Didn't find X, or a directory has "'" in its name.
6658     ac_cv_have_x="have_x=no";; #(
6659   *)
6660     # Record where we found X for the cache.
6661     ac_cv_have_x="have_x=yes\
6662         ac_x_includes='$ac_x_includes'\
6663         ac_x_libraries='$ac_x_libraries'"
6664 esac
6665 fi
6666 ;; #(
6667     *) have_x=yes;;
6668   esac
6669   eval "$ac_cv_have_x"
6670 fi # $with_x != no
6671
6672 if test "$have_x" != yes; then
6673   { $as_echo "$as_me:$LINENO: result: $have_x" >&5
6674 $as_echo "$have_x" >&6; }
6675   no_x=yes
6676 else
6677   # If each of the values was on the command line, it overrides each guess.
6678   test "x$x_includes" = xNONE && x_includes=$ac_x_includes
6679   test "x$x_libraries" = xNONE && x_libraries=$ac_x_libraries
6680   # Update the cache value to reflect the command line values.
6681   ac_cv_have_x="have_x=yes\
6682         ac_x_includes='$x_includes'\
6683         ac_x_libraries='$x_libraries'"
6684   { $as_echo "$as_me:$LINENO: result: libraries $x_libraries, headers $x_includes" >&5
6685 $as_echo "libraries $x_libraries, headers $x_includes" >&6; }
6686 fi
6687
6688 if test "$no_x" = yes; then
6689   # Not all programs may use this symbol, but it does not hurt to define it.
6690
6691 cat >>confdefs.h <<\_ACEOF
6692 #define X_DISPLAY_MISSING 1
6693 _ACEOF
6694
6695   X_CFLAGS= X_PRE_LIBS= X_LIBS= X_EXTRA_LIBS=
6696 else
6697   if test -n "$x_includes"; then
6698     X_CFLAGS="$X_CFLAGS -I$x_includes"
6699   fi
6700
6701   # It would also be nice to do this for all -L options, not just this one.
6702   if test -n "$x_libraries"; then
6703     X_LIBS="$X_LIBS -L$x_libraries"
6704     # For Solaris; some versions of Sun CC require a space after -R and
6705     # others require no space.  Words are not sufficient . . . .
6706     { $as_echo "$as_me:$LINENO: checking whether -R must be followed by a space" >&5
6707 $as_echo_n "checking whether -R must be followed by a space... " >&6; }
6708     ac_xsave_LIBS=$LIBS; LIBS="$LIBS -R$x_libraries"
6709     ac_xsave_c_werror_flag=$ac_c_werror_flag
6710     ac_c_werror_flag=yes
6711     cat >conftest.$ac_ext <<_ACEOF
6712 /* confdefs.h.  */
6713 _ACEOF
6714 cat confdefs.h >>conftest.$ac_ext
6715 cat >>conftest.$ac_ext <<_ACEOF
6716 /* end confdefs.h.  */
6717
6718 int
6719 main ()
6720 {
6721
6722   ;
6723   return 0;
6724 }
6725 _ACEOF
6726 rm -rf conftest.$ac_objext conftest$ac_exeext
6727 if { (ac_try="$ac_link"
6728 case "(($ac_try" in
6729   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6730   *) ac_try_echo=$ac_try;;
6731 esac
6732 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
6733 $as_echo "$ac_try_echo") >&5
6734   (eval "$ac_link") 2>conftest.er1
6735   ac_status=$?
6736   grep -v '^ *+' conftest.er1 >conftest.err
6737   rm -rf conftest.er1
6738   cat conftest.err >&5
6739   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
6740   (exit $ac_status); } && {
6741          test -z "$ac_c_werror_flag" ||
6742          test ! -s conftest.err
6743        } && test -s conftest$ac_exeext && {
6744          test "$cross_compiling" = yes ||
6745          $as_test_x conftest$ac_exeext
6746        }; then
6747   { $as_echo "$as_me:$LINENO: result: no" >&5
6748 $as_echo "no" >&6; }
6749        X_LIBS="$X_LIBS -R$x_libraries"
6750 else
6751   $as_echo "$as_me: failed program was:" >&5
6752 sed 's/^/| /' conftest.$ac_ext >&5
6753
6754         LIBS="$ac_xsave_LIBS -R $x_libraries"
6755        cat >conftest.$ac_ext <<_ACEOF
6756 /* confdefs.h.  */
6757 _ACEOF
6758 cat confdefs.h >>conftest.$ac_ext
6759 cat >>conftest.$ac_ext <<_ACEOF
6760 /* end confdefs.h.  */
6761
6762 int
6763 main ()
6764 {
6765
6766   ;
6767   return 0;
6768 }
6769 _ACEOF
6770 rm -rf conftest.$ac_objext conftest$ac_exeext
6771 if { (ac_try="$ac_link"
6772 case "(($ac_try" in
6773   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6774   *) ac_try_echo=$ac_try;;
6775 esac
6776 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
6777 $as_echo "$ac_try_echo") >&5
6778   (eval "$ac_link") 2>conftest.er1
6779   ac_status=$?
6780   grep -v '^ *+' conftest.er1 >conftest.err
6781   rm -rf conftest.er1
6782   cat conftest.err >&5
6783   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
6784   (exit $ac_status); } && {
6785          test -z "$ac_c_werror_flag" ||
6786          test ! -s conftest.err
6787        } && test -s conftest$ac_exeext && {
6788          test "$cross_compiling" = yes ||
6789          $as_test_x conftest$ac_exeext
6790        }; then
6791   { $as_echo "$as_me:$LINENO: result: yes" >&5
6792 $as_echo "yes" >&6; }
6793           X_LIBS="$X_LIBS -R $x_libraries"
6794 else
6795   $as_echo "$as_me: failed program was:" >&5
6796 sed 's/^/| /' conftest.$ac_ext >&5
6797
6798         { $as_echo "$as_me:$LINENO: result: neither works" >&5
6799 $as_echo "neither works" >&6; }
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 fi
6806
6807 rm -rf conftest.dSYM
6808 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
6809       conftest$ac_exeext conftest.$ac_ext
6810     ac_c_werror_flag=$ac_xsave_c_werror_flag
6811     LIBS=$ac_xsave_LIBS
6812   fi
6813
6814   # Check for system-dependent libraries X programs must link with.
6815   # Do this before checking for the system-independent R6 libraries
6816   # (-lICE), since we may need -lsocket or whatever for X linking.
6817
6818   if test "$ISC" = yes; then
6819     X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl_s -linet"
6820   else
6821     # Martyn Johnson says this is needed for Ultrix, if the X
6822     # libraries were built with DECnet support.  And Karl Berry says
6823     # the Alpha needs dnet_stub (dnet does not exist).
6824     ac_xsave_LIBS="$LIBS"; LIBS="$LIBS $X_LIBS -lX11"
6825     cat >conftest.$ac_ext <<_ACEOF
6826 /* confdefs.h.  */
6827 _ACEOF
6828 cat confdefs.h >>conftest.$ac_ext
6829 cat >>conftest.$ac_ext <<_ACEOF
6830 /* end confdefs.h.  */
6831
6832 /* Override any GCC internal prototype to avoid an error.
6833    Use char because int might match the return type of a GCC
6834    builtin and then its argument prototype would still apply.  */
6835 #ifdef __cplusplus
6836 extern "C"
6837 #endif
6838 char XOpenDisplay ();
6839 int
6840 main ()
6841 {
6842 return XOpenDisplay ();
6843   ;
6844   return 0;
6845 }
6846 _ACEOF
6847 rm -rf conftest.$ac_objext conftest$ac_exeext
6848 if { (ac_try="$ac_link"
6849 case "(($ac_try" in
6850   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6851   *) ac_try_echo=$ac_try;;
6852 esac
6853 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
6854 $as_echo "$ac_try_echo") >&5
6855   (eval "$ac_link") 2>conftest.er1
6856   ac_status=$?
6857   grep -v '^ *+' conftest.er1 >conftest.err
6858   rm -rf conftest.er1
6859   cat conftest.err >&5
6860   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
6861   (exit $ac_status); } && {
6862          test -z "$ac_c_werror_flag" ||
6863          test ! -s conftest.err
6864        } && test -s conftest$ac_exeext && {
6865          test "$cross_compiling" = yes ||
6866          $as_test_x conftest$ac_exeext
6867        }; then
6868   :
6869 else
6870   $as_echo "$as_me: failed program was:" >&5
6871 sed 's/^/| /' conftest.$ac_ext >&5
6872
6873         { $as_echo "$as_me:$LINENO: checking for dnet_ntoa in -ldnet" >&5
6874 $as_echo_n "checking for dnet_ntoa in -ldnet... " >&6; }
6875 if test "${ac_cv_lib_dnet_dnet_ntoa+set}" = set; then
6876   $as_echo_n "(cached) " >&6
6877 else
6878   ac_check_lib_save_LIBS=$LIBS
6879 LIBS="-ldnet  $LIBS"
6880 cat >conftest.$ac_ext <<_ACEOF
6881 /* confdefs.h.  */
6882 _ACEOF
6883 cat confdefs.h >>conftest.$ac_ext
6884 cat >>conftest.$ac_ext <<_ACEOF
6885 /* end confdefs.h.  */
6886
6887 /* Override any GCC internal prototype to avoid an error.
6888    Use char because int might match the return type of a GCC
6889    builtin and then its argument prototype would still apply.  */
6890 #ifdef __cplusplus
6891 extern "C"
6892 #endif
6893 char dnet_ntoa ();
6894 int
6895 main ()
6896 {
6897 return dnet_ntoa ();
6898   ;
6899   return 0;
6900 }
6901 _ACEOF
6902 rm -rf conftest.$ac_objext conftest$ac_exeext
6903 if { (ac_try="$ac_link"
6904 case "(($ac_try" in
6905   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6906   *) ac_try_echo=$ac_try;;
6907 esac
6908 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
6909 $as_echo "$ac_try_echo") >&5
6910   (eval "$ac_link") 2>conftest.er1
6911   ac_status=$?
6912   grep -v '^ *+' conftest.er1 >conftest.err
6913   rm -rf conftest.er1
6914   cat conftest.err >&5
6915   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
6916   (exit $ac_status); } && {
6917          test -z "$ac_c_werror_flag" ||
6918          test ! -s conftest.err
6919        } && test -s conftest$ac_exeext && {
6920          test "$cross_compiling" = yes ||
6921          $as_test_x conftest$ac_exeext
6922        }; then
6923   ac_cv_lib_dnet_dnet_ntoa=yes
6924 else
6925   $as_echo "$as_me: failed program was:" >&5
6926 sed 's/^/| /' conftest.$ac_ext >&5
6927
6928         ac_cv_lib_dnet_dnet_ntoa=no
6929 fi
6930
6931 rm -rf conftest.dSYM
6932 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
6933       conftest$ac_exeext conftest.$ac_ext
6934 LIBS=$ac_check_lib_save_LIBS
6935 fi
6936 { $as_echo "$as_me:$LINENO: result: $ac_cv_lib_dnet_dnet_ntoa" >&5
6937 $as_echo "$ac_cv_lib_dnet_dnet_ntoa" >&6; }
6938 if test "x$ac_cv_lib_dnet_dnet_ntoa" = x""yes; then
6939   X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet"
6940 fi
6941
6942     if test $ac_cv_lib_dnet_dnet_ntoa = no; then
6943       { $as_echo "$as_me:$LINENO: checking for dnet_ntoa in -ldnet_stub" >&5
6944 $as_echo_n "checking for dnet_ntoa in -ldnet_stub... " >&6; }
6945 if test "${ac_cv_lib_dnet_stub_dnet_ntoa+set}" = set; then
6946   $as_echo_n "(cached) " >&6
6947 else
6948   ac_check_lib_save_LIBS=$LIBS
6949 LIBS="-ldnet_stub  $LIBS"
6950 cat >conftest.$ac_ext <<_ACEOF
6951 /* confdefs.h.  */
6952 _ACEOF
6953 cat confdefs.h >>conftest.$ac_ext
6954 cat >>conftest.$ac_ext <<_ACEOF
6955 /* end confdefs.h.  */
6956
6957 /* Override any GCC internal prototype to avoid an error.
6958    Use char because int might match the return type of a GCC
6959    builtin and then its argument prototype would still apply.  */
6960 #ifdef __cplusplus
6961 extern "C"
6962 #endif
6963 char dnet_ntoa ();
6964 int
6965 main ()
6966 {
6967 return dnet_ntoa ();
6968   ;
6969   return 0;
6970 }
6971 _ACEOF
6972 rm -rf conftest.$ac_objext conftest$ac_exeext
6973 if { (ac_try="$ac_link"
6974 case "(($ac_try" in
6975   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6976   *) ac_try_echo=$ac_try;;
6977 esac
6978 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
6979 $as_echo "$ac_try_echo") >&5
6980   (eval "$ac_link") 2>conftest.er1
6981   ac_status=$?
6982   grep -v '^ *+' conftest.er1 >conftest.err
6983   rm -rf conftest.er1
6984   cat conftest.err >&5
6985   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
6986   (exit $ac_status); } && {
6987          test -z "$ac_c_werror_flag" ||
6988          test ! -s conftest.err
6989        } && test -s conftest$ac_exeext && {
6990          test "$cross_compiling" = yes ||
6991          $as_test_x conftest$ac_exeext
6992        }; then
6993   ac_cv_lib_dnet_stub_dnet_ntoa=yes
6994 else
6995   $as_echo "$as_me: failed program was:" >&5
6996 sed 's/^/| /' conftest.$ac_ext >&5
6997
6998         ac_cv_lib_dnet_stub_dnet_ntoa=no
6999 fi
7000
7001 rm -rf conftest.dSYM
7002 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
7003       conftest$ac_exeext conftest.$ac_ext
7004 LIBS=$ac_check_lib_save_LIBS
7005 fi
7006 { $as_echo "$as_me:$LINENO: result: $ac_cv_lib_dnet_stub_dnet_ntoa" >&5
7007 $as_echo "$ac_cv_lib_dnet_stub_dnet_ntoa" >&6; }
7008 if test "x$ac_cv_lib_dnet_stub_dnet_ntoa" = x""yes; then
7009   X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet_stub"
7010 fi
7011
7012     fi
7013 fi
7014
7015 rm -rf conftest.dSYM
7016 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
7017       conftest$ac_exeext conftest.$ac_ext
7018     LIBS="$ac_xsave_LIBS"
7019
7020     # msh@cis.ufl.edu says -lnsl (and -lsocket) are needed for his 386/AT,
7021     # to get the SysV transport functions.
7022     # Chad R. Larson says the Pyramis MIS-ES running DC/OSx (SVR4)
7023     # needs -lnsl.
7024     # The nsl library prevents programs from opening the X display
7025     # on Irix 5.2, according to T.E. Dickey.
7026     # The functions gethostbyname, getservbyname, and inet_addr are
7027     # in -lbsd on LynxOS 3.0.1/i386, according to Lars Hecking.
7028     { $as_echo "$as_me:$LINENO: checking for gethostbyname" >&5
7029 $as_echo_n "checking for gethostbyname... " >&6; }
7030 if test "${ac_cv_func_gethostbyname+set}" = set; then
7031   $as_echo_n "(cached) " >&6
7032 else
7033   cat >conftest.$ac_ext <<_ACEOF
7034 /* confdefs.h.  */
7035 _ACEOF
7036 cat confdefs.h >>conftest.$ac_ext
7037 cat >>conftest.$ac_ext <<_ACEOF
7038 /* end confdefs.h.  */
7039 /* Define gethostbyname to an innocuous variant, in case <limits.h> declares gethostbyname.
7040    For example, HP-UX 11i <limits.h> declares gettimeofday.  */
7041 #define gethostbyname innocuous_gethostbyname
7042
7043 /* System header to define __stub macros and hopefully few prototypes,
7044     which can conflict with char gethostbyname (); below.
7045     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
7046     <limits.h> exists even on freestanding compilers.  */
7047
7048 #ifdef __STDC__
7049 # include <limits.h>
7050 #else
7051 # include <assert.h>
7052 #endif
7053
7054 #undef gethostbyname
7055
7056 /* Override any GCC internal prototype to avoid an error.
7057    Use char because int might match the return type of a GCC
7058    builtin and then its argument prototype would still apply.  */
7059 #ifdef __cplusplus
7060 extern "C"
7061 #endif
7062 char gethostbyname ();
7063 /* The GNU C library defines this for functions which it implements
7064     to always fail with ENOSYS.  Some functions are actually named
7065     something starting with __ and the normal name is an alias.  */
7066 #if defined __stub_gethostbyname || defined __stub___gethostbyname
7067 choke me
7068 #endif
7069
7070 int
7071 main ()
7072 {
7073 return gethostbyname ();
7074   ;
7075   return 0;
7076 }
7077 _ACEOF
7078 rm -rf conftest.$ac_objext conftest$ac_exeext
7079 if { (ac_try="$ac_link"
7080 case "(($ac_try" in
7081   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7082   *) ac_try_echo=$ac_try;;
7083 esac
7084 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
7085 $as_echo "$ac_try_echo") >&5
7086   (eval "$ac_link") 2>conftest.er1
7087   ac_status=$?
7088   grep -v '^ *+' conftest.er1 >conftest.err
7089   rm -rf conftest.er1
7090   cat conftest.err >&5
7091   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
7092   (exit $ac_status); } && {
7093          test -z "$ac_c_werror_flag" ||
7094          test ! -s conftest.err
7095        } && test -s conftest$ac_exeext && {
7096          test "$cross_compiling" = yes ||
7097          $as_test_x conftest$ac_exeext
7098        }; then
7099   ac_cv_func_gethostbyname=yes
7100 else
7101   $as_echo "$as_me: failed program was:" >&5
7102 sed 's/^/| /' conftest.$ac_ext >&5
7103
7104         ac_cv_func_gethostbyname=no
7105 fi
7106
7107 rm -rf conftest.dSYM
7108 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
7109       conftest$ac_exeext conftest.$ac_ext
7110 fi
7111 { $as_echo "$as_me:$LINENO: result: $ac_cv_func_gethostbyname" >&5
7112 $as_echo "$ac_cv_func_gethostbyname" >&6; }
7113
7114     if test $ac_cv_func_gethostbyname = no; then
7115       { $as_echo "$as_me:$LINENO: checking for gethostbyname in -lnsl" >&5
7116 $as_echo_n "checking for gethostbyname in -lnsl... " >&6; }
7117 if test "${ac_cv_lib_nsl_gethostbyname+set}" = set; then
7118   $as_echo_n "(cached) " >&6
7119 else
7120   ac_check_lib_save_LIBS=$LIBS
7121 LIBS="-lnsl  $LIBS"
7122 cat >conftest.$ac_ext <<_ACEOF
7123 /* confdefs.h.  */
7124 _ACEOF
7125 cat confdefs.h >>conftest.$ac_ext
7126 cat >>conftest.$ac_ext <<_ACEOF
7127 /* end confdefs.h.  */
7128
7129 /* Override any GCC internal prototype to avoid an error.
7130    Use char because int might match the return type of a GCC
7131    builtin and then its argument prototype would still apply.  */
7132 #ifdef __cplusplus
7133 extern "C"
7134 #endif
7135 char gethostbyname ();
7136 int
7137 main ()
7138 {
7139 return gethostbyname ();
7140   ;
7141   return 0;
7142 }
7143 _ACEOF
7144 rm -rf conftest.$ac_objext conftest$ac_exeext
7145 if { (ac_try="$ac_link"
7146 case "(($ac_try" in
7147   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7148   *) ac_try_echo=$ac_try;;
7149 esac
7150 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
7151 $as_echo "$ac_try_echo") >&5
7152   (eval "$ac_link") 2>conftest.er1
7153   ac_status=$?
7154   grep -v '^ *+' conftest.er1 >conftest.err
7155   rm -rf conftest.er1
7156   cat conftest.err >&5
7157   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
7158   (exit $ac_status); } && {
7159          test -z "$ac_c_werror_flag" ||
7160          test ! -s conftest.err
7161        } && test -s conftest$ac_exeext && {
7162          test "$cross_compiling" = yes ||
7163          $as_test_x conftest$ac_exeext
7164        }; then
7165   ac_cv_lib_nsl_gethostbyname=yes
7166 else
7167   $as_echo "$as_me: failed program was:" >&5
7168 sed 's/^/| /' conftest.$ac_ext >&5
7169
7170         ac_cv_lib_nsl_gethostbyname=no
7171 fi
7172
7173 rm -rf conftest.dSYM
7174 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
7175       conftest$ac_exeext conftest.$ac_ext
7176 LIBS=$ac_check_lib_save_LIBS
7177 fi
7178 { $as_echo "$as_me:$LINENO: result: $ac_cv_lib_nsl_gethostbyname" >&5
7179 $as_echo "$ac_cv_lib_nsl_gethostbyname" >&6; }
7180 if test "x$ac_cv_lib_nsl_gethostbyname" = x""yes; then
7181   X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl"
7182 fi
7183
7184       if test $ac_cv_lib_nsl_gethostbyname = no; then
7185         { $as_echo "$as_me:$LINENO: checking for gethostbyname in -lbsd" >&5
7186 $as_echo_n "checking for gethostbyname in -lbsd... " >&6; }
7187 if test "${ac_cv_lib_bsd_gethostbyname+set}" = set; then
7188   $as_echo_n "(cached) " >&6
7189 else
7190   ac_check_lib_save_LIBS=$LIBS
7191 LIBS="-lbsd  $LIBS"
7192 cat >conftest.$ac_ext <<_ACEOF
7193 /* confdefs.h.  */
7194 _ACEOF
7195 cat confdefs.h >>conftest.$ac_ext
7196 cat >>conftest.$ac_ext <<_ACEOF
7197 /* end confdefs.h.  */
7198
7199 /* Override any GCC internal prototype to avoid an error.
7200    Use char because int might match the return type of a GCC
7201    builtin and then its argument prototype would still apply.  */
7202 #ifdef __cplusplus
7203 extern "C"
7204 #endif
7205 char gethostbyname ();
7206 int
7207 main ()
7208 {
7209 return gethostbyname ();
7210   ;
7211   return 0;
7212 }
7213 _ACEOF
7214 rm -rf conftest.$ac_objext conftest$ac_exeext
7215 if { (ac_try="$ac_link"
7216 case "(($ac_try" in
7217   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7218   *) ac_try_echo=$ac_try;;
7219 esac
7220 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
7221 $as_echo "$ac_try_echo") >&5
7222   (eval "$ac_link") 2>conftest.er1
7223   ac_status=$?
7224   grep -v '^ *+' conftest.er1 >conftest.err
7225   rm -rf conftest.er1
7226   cat conftest.err >&5
7227   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
7228   (exit $ac_status); } && {
7229          test -z "$ac_c_werror_flag" ||
7230          test ! -s conftest.err
7231        } && test -s conftest$ac_exeext && {
7232          test "$cross_compiling" = yes ||
7233          $as_test_x conftest$ac_exeext
7234        }; then
7235   ac_cv_lib_bsd_gethostbyname=yes
7236 else
7237   $as_echo "$as_me: failed program was:" >&5
7238 sed 's/^/| /' conftest.$ac_ext >&5
7239
7240         ac_cv_lib_bsd_gethostbyname=no
7241 fi
7242
7243 rm -rf conftest.dSYM
7244 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
7245       conftest$ac_exeext conftest.$ac_ext
7246 LIBS=$ac_check_lib_save_LIBS
7247 fi
7248 { $as_echo "$as_me:$LINENO: result: $ac_cv_lib_bsd_gethostbyname" >&5
7249 $as_echo "$ac_cv_lib_bsd_gethostbyname" >&6; }
7250 if test "x$ac_cv_lib_bsd_gethostbyname" = x""yes; then
7251   X_EXTRA_LIBS="$X_EXTRA_LIBS -lbsd"
7252 fi
7253
7254       fi
7255     fi
7256
7257     # lieder@skyler.mavd.honeywell.com says without -lsocket,
7258     # socket/setsockopt and other routines are undefined under SCO ODT
7259     # 2.0.  But -lsocket is broken on IRIX 5.2 (and is not necessary
7260     # on later versions), says Simon Leinen: it contains gethostby*
7261     # variants that don't use the name server (or something).  -lsocket
7262     # must be given before -lnsl if both are needed.  We assume that
7263     # if connect needs -lnsl, so does gethostbyname.
7264     { $as_echo "$as_me:$LINENO: checking for connect" >&5
7265 $as_echo_n "checking for connect... " >&6; }
7266 if test "${ac_cv_func_connect+set}" = set; then
7267   $as_echo_n "(cached) " >&6
7268 else
7269   cat >conftest.$ac_ext <<_ACEOF
7270 /* confdefs.h.  */
7271 _ACEOF
7272 cat confdefs.h >>conftest.$ac_ext
7273 cat >>conftest.$ac_ext <<_ACEOF
7274 /* end confdefs.h.  */
7275 /* Define connect to an innocuous variant, in case <limits.h> declares connect.
7276    For example, HP-UX 11i <limits.h> declares gettimeofday.  */
7277 #define connect innocuous_connect
7278
7279 /* System header to define __stub macros and hopefully few prototypes,
7280     which can conflict with char connect (); below.
7281     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
7282     <limits.h> exists even on freestanding compilers.  */
7283
7284 #ifdef __STDC__
7285 # include <limits.h>
7286 #else
7287 # include <assert.h>
7288 #endif
7289
7290 #undef connect
7291
7292 /* Override any GCC internal prototype to avoid an error.
7293    Use char because int might match the return type of a GCC
7294    builtin and then its argument prototype would still apply.  */
7295 #ifdef __cplusplus
7296 extern "C"
7297 #endif
7298 char connect ();
7299 /* The GNU C library defines this for functions which it implements
7300     to always fail with ENOSYS.  Some functions are actually named
7301     something starting with __ and the normal name is an alias.  */
7302 #if defined __stub_connect || defined __stub___connect
7303 choke me
7304 #endif
7305
7306 int
7307 main ()
7308 {
7309 return connect ();
7310   ;
7311   return 0;
7312 }
7313 _ACEOF
7314 rm -rf conftest.$ac_objext conftest$ac_exeext
7315 if { (ac_try="$ac_link"
7316 case "(($ac_try" in
7317   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7318   *) ac_try_echo=$ac_try;;
7319 esac
7320 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
7321 $as_echo "$ac_try_echo") >&5
7322   (eval "$ac_link") 2>conftest.er1
7323   ac_status=$?
7324   grep -v '^ *+' conftest.er1 >conftest.err
7325   rm -rf conftest.er1
7326   cat conftest.err >&5
7327   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
7328   (exit $ac_status); } && {
7329          test -z "$ac_c_werror_flag" ||
7330          test ! -s conftest.err
7331        } && test -s conftest$ac_exeext && {
7332          test "$cross_compiling" = yes ||
7333          $as_test_x conftest$ac_exeext
7334        }; then
7335   ac_cv_func_connect=yes
7336 else
7337   $as_echo "$as_me: failed program was:" >&5
7338 sed 's/^/| /' conftest.$ac_ext >&5
7339
7340         ac_cv_func_connect=no
7341 fi
7342
7343 rm -rf conftest.dSYM
7344 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
7345       conftest$ac_exeext conftest.$ac_ext
7346 fi
7347 { $as_echo "$as_me:$LINENO: result: $ac_cv_func_connect" >&5
7348 $as_echo "$ac_cv_func_connect" >&6; }
7349
7350     if test $ac_cv_func_connect = no; then
7351       { $as_echo "$as_me:$LINENO: checking for connect in -lsocket" >&5
7352 $as_echo_n "checking for connect in -lsocket... " >&6; }
7353 if test "${ac_cv_lib_socket_connect+set}" = set; then
7354   $as_echo_n "(cached) " >&6
7355 else
7356   ac_check_lib_save_LIBS=$LIBS
7357 LIBS="-lsocket $X_EXTRA_LIBS $LIBS"
7358 cat >conftest.$ac_ext <<_ACEOF
7359 /* confdefs.h.  */
7360 _ACEOF
7361 cat confdefs.h >>conftest.$ac_ext
7362 cat >>conftest.$ac_ext <<_ACEOF
7363 /* end confdefs.h.  */
7364
7365 /* Override any GCC internal prototype to avoid an error.
7366    Use char because int might match the return type of a GCC
7367    builtin and then its argument prototype would still apply.  */
7368 #ifdef __cplusplus
7369 extern "C"
7370 #endif
7371 char connect ();
7372 int
7373 main ()
7374 {
7375 return connect ();
7376   ;
7377   return 0;
7378 }
7379 _ACEOF
7380 rm -rf conftest.$ac_objext conftest$ac_exeext
7381 if { (ac_try="$ac_link"
7382 case "(($ac_try" in
7383   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7384   *) ac_try_echo=$ac_try;;
7385 esac
7386 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
7387 $as_echo "$ac_try_echo") >&5
7388   (eval "$ac_link") 2>conftest.er1
7389   ac_status=$?
7390   grep -v '^ *+' conftest.er1 >conftest.err
7391   rm -rf conftest.er1
7392   cat conftest.err >&5
7393   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
7394   (exit $ac_status); } && {
7395          test -z "$ac_c_werror_flag" ||
7396          test ! -s conftest.err
7397        } && test -s conftest$ac_exeext && {
7398          test "$cross_compiling" = yes ||
7399          $as_test_x conftest$ac_exeext
7400        }; then
7401   ac_cv_lib_socket_connect=yes
7402 else
7403   $as_echo "$as_me: failed program was:" >&5
7404 sed 's/^/| /' conftest.$ac_ext >&5
7405
7406         ac_cv_lib_socket_connect=no
7407 fi
7408
7409 rm -rf conftest.dSYM
7410 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
7411       conftest$ac_exeext conftest.$ac_ext
7412 LIBS=$ac_check_lib_save_LIBS
7413 fi
7414 { $as_echo "$as_me:$LINENO: result: $ac_cv_lib_socket_connect" >&5
7415 $as_echo "$ac_cv_lib_socket_connect" >&6; }
7416 if test "x$ac_cv_lib_socket_connect" = x""yes; then
7417   X_EXTRA_LIBS="-lsocket $X_EXTRA_LIBS"
7418 fi
7419
7420     fi
7421
7422     # Guillermo Gomez says -lposix is necessary on A/UX.
7423     { $as_echo "$as_me:$LINENO: checking for remove" >&5
7424 $as_echo_n "checking for remove... " >&6; }
7425 if test "${ac_cv_func_remove+set}" = set; then
7426   $as_echo_n "(cached) " >&6
7427 else
7428   cat >conftest.$ac_ext <<_ACEOF
7429 /* confdefs.h.  */
7430 _ACEOF
7431 cat confdefs.h >>conftest.$ac_ext
7432 cat >>conftest.$ac_ext <<_ACEOF
7433 /* end confdefs.h.  */
7434 /* Define remove to an innocuous variant, in case <limits.h> declares remove.
7435    For example, HP-UX 11i <limits.h> declares gettimeofday.  */
7436 #define remove innocuous_remove
7437
7438 /* System header to define __stub macros and hopefully few prototypes,
7439     which can conflict with char remove (); below.
7440     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
7441     <limits.h> exists even on freestanding compilers.  */
7442
7443 #ifdef __STDC__
7444 # include <limits.h>
7445 #else
7446 # include <assert.h>
7447 #endif
7448
7449 #undef remove
7450
7451 /* Override any GCC internal prototype to avoid an error.
7452    Use char because int might match the return type of a GCC
7453    builtin and then its argument prototype would still apply.  */
7454 #ifdef __cplusplus
7455 extern "C"
7456 #endif
7457 char remove ();
7458 /* The GNU C library defines this for functions which it implements
7459     to always fail with ENOSYS.  Some functions are actually named
7460     something starting with __ and the normal name is an alias.  */
7461 #if defined __stub_remove || defined __stub___remove
7462 choke me
7463 #endif
7464
7465 int
7466 main ()
7467 {
7468 return remove ();
7469   ;
7470   return 0;
7471 }
7472 _ACEOF
7473 rm -rf conftest.$ac_objext conftest$ac_exeext
7474 if { (ac_try="$ac_link"
7475 case "(($ac_try" in
7476   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7477   *) ac_try_echo=$ac_try;;
7478 esac
7479 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
7480 $as_echo "$ac_try_echo") >&5
7481   (eval "$ac_link") 2>conftest.er1
7482   ac_status=$?
7483   grep -v '^ *+' conftest.er1 >conftest.err
7484   rm -rf conftest.er1
7485   cat conftest.err >&5
7486   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
7487   (exit $ac_status); } && {
7488          test -z "$ac_c_werror_flag" ||
7489          test ! -s conftest.err
7490        } && test -s conftest$ac_exeext && {
7491          test "$cross_compiling" = yes ||
7492          $as_test_x conftest$ac_exeext
7493        }; then
7494   ac_cv_func_remove=yes
7495 else
7496   $as_echo "$as_me: failed program was:" >&5
7497 sed 's/^/| /' conftest.$ac_ext >&5
7498
7499         ac_cv_func_remove=no
7500 fi
7501
7502 rm -rf conftest.dSYM
7503 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
7504       conftest$ac_exeext conftest.$ac_ext
7505 fi
7506 { $as_echo "$as_me:$LINENO: result: $ac_cv_func_remove" >&5
7507 $as_echo "$ac_cv_func_remove" >&6; }
7508
7509     if test $ac_cv_func_remove = no; then
7510       { $as_echo "$as_me:$LINENO: checking for remove in -lposix" >&5
7511 $as_echo_n "checking for remove in -lposix... " >&6; }
7512 if test "${ac_cv_lib_posix_remove+set}" = set; then
7513   $as_echo_n "(cached) " >&6
7514 else
7515   ac_check_lib_save_LIBS=$LIBS
7516 LIBS="-lposix  $LIBS"
7517 cat >conftest.$ac_ext <<_ACEOF
7518 /* confdefs.h.  */
7519 _ACEOF
7520 cat confdefs.h >>conftest.$ac_ext
7521 cat >>conftest.$ac_ext <<_ACEOF
7522 /* end confdefs.h.  */
7523
7524 /* Override any GCC internal prototype to avoid an error.
7525    Use char because int might match the return type of a GCC
7526    builtin and then its argument prototype would still apply.  */
7527 #ifdef __cplusplus
7528 extern "C"
7529 #endif
7530 char remove ();
7531 int
7532 main ()
7533 {
7534 return remove ();
7535   ;
7536   return 0;
7537 }
7538 _ACEOF
7539 rm -rf conftest.$ac_objext conftest$ac_exeext
7540 if { (ac_try="$ac_link"
7541 case "(($ac_try" in
7542   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7543   *) ac_try_echo=$ac_try;;
7544 esac
7545 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
7546 $as_echo "$ac_try_echo") >&5
7547   (eval "$ac_link") 2>conftest.er1
7548   ac_status=$?
7549   grep -v '^ *+' conftest.er1 >conftest.err
7550   rm -rf conftest.er1
7551   cat conftest.err >&5
7552   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
7553   (exit $ac_status); } && {
7554          test -z "$ac_c_werror_flag" ||
7555          test ! -s conftest.err
7556        } && test -s conftest$ac_exeext && {
7557          test "$cross_compiling" = yes ||
7558          $as_test_x conftest$ac_exeext
7559        }; then
7560   ac_cv_lib_posix_remove=yes
7561 else
7562   $as_echo "$as_me: failed program was:" >&5
7563 sed 's/^/| /' conftest.$ac_ext >&5
7564
7565         ac_cv_lib_posix_remove=no
7566 fi
7567
7568 rm -rf conftest.dSYM
7569 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
7570       conftest$ac_exeext conftest.$ac_ext
7571 LIBS=$ac_check_lib_save_LIBS
7572 fi
7573 { $as_echo "$as_me:$LINENO: result: $ac_cv_lib_posix_remove" >&5
7574 $as_echo "$ac_cv_lib_posix_remove" >&6; }
7575 if test "x$ac_cv_lib_posix_remove" = x""yes; then
7576   X_EXTRA_LIBS="$X_EXTRA_LIBS -lposix"
7577 fi
7578
7579     fi
7580
7581     # BSDI BSD/OS 2.1 needs -lipc for XOpenDisplay.
7582     { $as_echo "$as_me:$LINENO: checking for shmat" >&5
7583 $as_echo_n "checking for shmat... " >&6; }
7584 if test "${ac_cv_func_shmat+set}" = set; then
7585   $as_echo_n "(cached) " >&6
7586 else
7587   cat >conftest.$ac_ext <<_ACEOF
7588 /* confdefs.h.  */
7589 _ACEOF
7590 cat confdefs.h >>conftest.$ac_ext
7591 cat >>conftest.$ac_ext <<_ACEOF
7592 /* end confdefs.h.  */
7593 /* Define shmat to an innocuous variant, in case <limits.h> declares shmat.
7594    For example, HP-UX 11i <limits.h> declares gettimeofday.  */
7595 #define shmat innocuous_shmat
7596
7597 /* System header to define __stub macros and hopefully few prototypes,
7598     which can conflict with char shmat (); below.
7599     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
7600     <limits.h> exists even on freestanding compilers.  */
7601
7602 #ifdef __STDC__
7603 # include <limits.h>
7604 #else
7605 # include <assert.h>
7606 #endif
7607
7608 #undef shmat
7609
7610 /* Override any GCC internal prototype to avoid an error.
7611    Use char because int might match the return type of a GCC
7612    builtin and then its argument prototype would still apply.  */
7613 #ifdef __cplusplus
7614 extern "C"
7615 #endif
7616 char shmat ();
7617 /* The GNU C library defines this for functions which it implements
7618     to always fail with ENOSYS.  Some functions are actually named
7619     something starting with __ and the normal name is an alias.  */
7620 #if defined __stub_shmat || defined __stub___shmat
7621 choke me
7622 #endif
7623
7624 int
7625 main ()
7626 {
7627 return shmat ();
7628   ;
7629   return 0;
7630 }
7631 _ACEOF
7632 rm -rf conftest.$ac_objext conftest$ac_exeext
7633 if { (ac_try="$ac_link"
7634 case "(($ac_try" in
7635   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7636   *) ac_try_echo=$ac_try;;
7637 esac
7638 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
7639 $as_echo "$ac_try_echo") >&5
7640   (eval "$ac_link") 2>conftest.er1
7641   ac_status=$?
7642   grep -v '^ *+' conftest.er1 >conftest.err
7643   rm -rf conftest.er1
7644   cat conftest.err >&5
7645   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
7646   (exit $ac_status); } && {
7647          test -z "$ac_c_werror_flag" ||
7648          test ! -s conftest.err
7649        } && test -s conftest$ac_exeext && {
7650          test "$cross_compiling" = yes ||
7651          $as_test_x conftest$ac_exeext
7652        }; then
7653   ac_cv_func_shmat=yes
7654 else
7655   $as_echo "$as_me: failed program was:" >&5
7656 sed 's/^/| /' conftest.$ac_ext >&5
7657
7658         ac_cv_func_shmat=no
7659 fi
7660
7661 rm -rf conftest.dSYM
7662 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
7663       conftest$ac_exeext conftest.$ac_ext
7664 fi
7665 { $as_echo "$as_me:$LINENO: result: $ac_cv_func_shmat" >&5
7666 $as_echo "$ac_cv_func_shmat" >&6; }
7667
7668     if test $ac_cv_func_shmat = no; then
7669       { $as_echo "$as_me:$LINENO: checking for shmat in -lipc" >&5
7670 $as_echo_n "checking for shmat in -lipc... " >&6; }
7671 if test "${ac_cv_lib_ipc_shmat+set}" = set; then
7672   $as_echo_n "(cached) " >&6
7673 else
7674   ac_check_lib_save_LIBS=$LIBS
7675 LIBS="-lipc  $LIBS"
7676 cat >conftest.$ac_ext <<_ACEOF
7677 /* confdefs.h.  */
7678 _ACEOF
7679 cat confdefs.h >>conftest.$ac_ext
7680 cat >>conftest.$ac_ext <<_ACEOF
7681 /* end confdefs.h.  */
7682
7683 /* Override any GCC internal prototype to avoid an error.
7684    Use char because int might match the return type of a GCC
7685    builtin and then its argument prototype would still apply.  */
7686 #ifdef __cplusplus
7687 extern "C"
7688 #endif
7689 char shmat ();
7690 int
7691 main ()
7692 {
7693 return shmat ();
7694   ;
7695   return 0;
7696 }
7697 _ACEOF
7698 rm -rf conftest.$ac_objext conftest$ac_exeext
7699 if { (ac_try="$ac_link"
7700 case "(($ac_try" in
7701   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7702   *) ac_try_echo=$ac_try;;
7703 esac
7704 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
7705 $as_echo "$ac_try_echo") >&5
7706   (eval "$ac_link") 2>conftest.er1
7707   ac_status=$?
7708   grep -v '^ *+' conftest.er1 >conftest.err
7709   rm -rf conftest.er1
7710   cat conftest.err >&5
7711   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
7712   (exit $ac_status); } && {
7713          test -z "$ac_c_werror_flag" ||
7714          test ! -s conftest.err
7715        } && test -s conftest$ac_exeext && {
7716          test "$cross_compiling" = yes ||
7717          $as_test_x conftest$ac_exeext
7718        }; then
7719   ac_cv_lib_ipc_shmat=yes
7720 else
7721   $as_echo "$as_me: failed program was:" >&5
7722 sed 's/^/| /' conftest.$ac_ext >&5
7723
7724         ac_cv_lib_ipc_shmat=no
7725 fi
7726
7727 rm -rf conftest.dSYM
7728 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
7729       conftest$ac_exeext conftest.$ac_ext
7730 LIBS=$ac_check_lib_save_LIBS
7731 fi
7732 { $as_echo "$as_me:$LINENO: result: $ac_cv_lib_ipc_shmat" >&5
7733 $as_echo "$ac_cv_lib_ipc_shmat" >&6; }
7734 if test "x$ac_cv_lib_ipc_shmat" = x""yes; then
7735   X_EXTRA_LIBS="$X_EXTRA_LIBS -lipc"
7736 fi
7737
7738     fi
7739   fi
7740
7741   # Check for libraries that X11R6 Xt/Xaw programs need.
7742   ac_save_LDFLAGS=$LDFLAGS
7743   test -n "$x_libraries" && LDFLAGS="$LDFLAGS -L$x_libraries"
7744   # SM needs ICE to (dynamically) link under SunOS 4.x (so we have to
7745   # check for ICE first), but we must link in the order -lSM -lICE or
7746   # we get undefined symbols.  So assume we have SM if we have ICE.
7747   # These have to be linked with before -lX11, unlike the other
7748   # libraries we check for below, so use a different variable.
7749   # John Interrante, Karl Berry
7750   { $as_echo "$as_me:$LINENO: checking for IceConnectionNumber in -lICE" >&5
7751 $as_echo_n "checking for IceConnectionNumber in -lICE... " >&6; }
7752 if test "${ac_cv_lib_ICE_IceConnectionNumber+set}" = set; then
7753   $as_echo_n "(cached) " >&6
7754 else
7755   ac_check_lib_save_LIBS=$LIBS
7756 LIBS="-lICE $X_EXTRA_LIBS $LIBS"
7757 cat >conftest.$ac_ext <<_ACEOF
7758 /* confdefs.h.  */
7759 _ACEOF
7760 cat confdefs.h >>conftest.$ac_ext
7761 cat >>conftest.$ac_ext <<_ACEOF
7762 /* end confdefs.h.  */
7763
7764 /* Override any GCC internal prototype to avoid an error.
7765    Use char because int might match the return type of a GCC
7766    builtin and then its argument prototype would still apply.  */
7767 #ifdef __cplusplus
7768 extern "C"
7769 #endif
7770 char IceConnectionNumber ();
7771 int
7772 main ()
7773 {
7774 return IceConnectionNumber ();
7775   ;
7776   return 0;
7777 }
7778 _ACEOF
7779 rm -rf conftest.$ac_objext conftest$ac_exeext
7780 if { (ac_try="$ac_link"
7781 case "(($ac_try" in
7782   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7783   *) ac_try_echo=$ac_try;;
7784 esac
7785 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
7786 $as_echo "$ac_try_echo") >&5
7787   (eval "$ac_link") 2>conftest.er1
7788   ac_status=$?
7789   grep -v '^ *+' conftest.er1 >conftest.err
7790   rm -rf conftest.er1
7791   cat conftest.err >&5
7792   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
7793   (exit $ac_status); } && {
7794          test -z "$ac_c_werror_flag" ||
7795          test ! -s conftest.err
7796        } && test -s conftest$ac_exeext && {
7797          test "$cross_compiling" = yes ||
7798          $as_test_x conftest$ac_exeext
7799        }; then
7800   ac_cv_lib_ICE_IceConnectionNumber=yes
7801 else
7802   $as_echo "$as_me: failed program was:" >&5
7803 sed 's/^/| /' conftest.$ac_ext >&5
7804
7805         ac_cv_lib_ICE_IceConnectionNumber=no
7806 fi
7807
7808 rm -rf conftest.dSYM
7809 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
7810       conftest$ac_exeext conftest.$ac_ext
7811 LIBS=$ac_check_lib_save_LIBS
7812 fi
7813 { $as_echo "$as_me:$LINENO: result: $ac_cv_lib_ICE_IceConnectionNumber" >&5
7814 $as_echo "$ac_cv_lib_ICE_IceConnectionNumber" >&6; }
7815 if test "x$ac_cv_lib_ICE_IceConnectionNumber" = x""yes; then
7816   X_PRE_LIBS="$X_PRE_LIBS -lSM -lICE"
7817 fi
7818
7819   LDFLAGS=$ac_save_LDFLAGS
7820
7821 fi
7822
7823
7824 if test "$have_x" != yes; then
7825   { { $as_echo "$as_me:$LINENO: error: Couldn't find X11 headers/libs.  Try \`$0 --help'." >&5
7826 $as_echo "$as_me: error: Couldn't find X11 headers/libs.  Try \`$0 --help'." >&2;}
7827    { (exit 1); exit 1; }; }
7828 fi
7829
7830
7831     { $as_echo "$as_me:$LINENO: checking for X app-defaults directory" >&5
7832 $as_echo_n "checking for X app-defaults directory... " >&6; }
7833 if test "${ac_cv_x_app_defaults+set}" = set; then
7834   $as_echo_n "(cached) " >&6
7835 else
7836
7837   rm -fr conftestdir
7838   if mkdir conftestdir; then
7839     cd conftestdir 2>/dev/null
7840     # Make sure to not put "make" in the Imakefile rules, since we grep it out.
7841     cat > Imakefile <<'EOF'
7842 acfindx:
7843         @echo 'ac_x_app_defaults="${XAPPLOADDIR}"'
7844 EOF
7845     if (xmkmf) >/dev/null 2>&1 && test -f Makefile; then
7846       # GNU make sometimes prints "make[1]: Entering...", which'd confuse us.
7847       eval `${MAKE-make} acfindx 2>/dev/null | grep -v make`
7848     fi
7849     cd .. 2>/dev/null
7850     rm -fr conftestdir
7851   fi
7852       if test x"$ac_x_app_defaults" = x; then
7853
7854   # Look for the directory under a standard set of common directories.
7855   # Check X11 before X11Rn because it's often a symlink to the current release.
7856   for ac_dir in                                 \
7857     /usr/X11/lib/app-defaults                   \
7858     /usr/X11R6/lib/app-defaults                 \
7859     /usr/X11R6/lib/X11/app-defaults             \
7860     /usr/X11R5/lib/app-defaults                 \
7861     /usr/X11R5/lib/X11/app-defaults             \
7862     /usr/X11R4/lib/app-defaults                 \
7863     /usr/X11R4/lib/X11/app-defaults             \
7864                                                 \
7865     /usr/lib/X11/app-defaults                   \
7866     /usr/lib/X11R6/app-defaults                 \
7867     /usr/lib/X11R5/app-defaults                 \
7868     /usr/lib/X11R4/app-defaults                 \
7869                                                 \
7870     /usr/local/X11/lib/app-defaults             \
7871     /usr/local/X11R6/lib/app-defaults           \
7872     /usr/local/X11R5/lib/app-defaults           \
7873     /usr/local/X11R4/lib/app-defaults           \
7874                                                 \
7875     /usr/local/lib/X11/app-defaults             \
7876     /usr/local/lib/X11R6/app-defaults           \
7877     /usr/local/lib/X11R6/X11/app-defaults       \
7878     /usr/local/lib/X11R5/app-defaults           \
7879     /usr/local/lib/X11R5/X11/app-defaults       \
7880     /usr/local/lib/X11R4/app-defaults           \
7881     /usr/local/lib/X11R4/X11/app-defaults       \
7882                                                 \
7883     /usr/X386/lib/X11/app-defaults              \
7884     /usr/x386/lib/X11/app-defaults              \
7885     /usr/XFree86/lib/X11/app-defaults           \
7886                                                 \
7887     /usr/lib/X11/app-defaults                   \
7888     /usr/local/lib/X11/app-defaults             \
7889     /usr/unsupported/lib/X11/app-defaults       \
7890     /usr/athena/lib/X11/app-defaults            \
7891     /usr/local/x11r5/lib/X11/app-defaults       \
7892     /usr/lpp/Xamples/lib/X11/app-defaults       \
7893     /lib/usr/lib/X11/app-defaults               \
7894                                                 \
7895     /usr/openwin/lib/app-defaults               \
7896     /usr/openwin/lib/X11/app-defaults           \
7897     /usr/openwin/share/lib/app-defaults         \
7898     /usr/openwin/share/lib/X11/app-defaults     \
7899                                                 \
7900     /X11R6/lib/app-defaults                     \
7901     /X11R5/lib/app-defaults                     \
7902     /X11R4/lib/app-defaults                     \
7903     ; \
7904   do
7905     if test -d "$ac_dir"; then
7906       ac_x_app_defaults=$ac_dir
7907       break
7908     fi
7909   done
7910
7911       fi
7912       if test x"$ac_x_app_defaults" = x; then
7913         ac_cv_x_app_defaults="/usr/lib/X11/app-defaults"
7914       else
7915         # Record where we found app-defaults for the cache.
7916         ac_cv_x_app_defaults="$ac_x_app_defaults"
7917       fi
7918 fi
7919 { $as_echo "$as_me:$LINENO: result: $ac_cv_x_app_defaults" >&5
7920 $as_echo "$ac_cv_x_app_defaults" >&6; }
7921     eval ac_x_app_defaults="$ac_cv_x_app_defaults"
7922 case "$host" in
7923     *-hpux*)
7924
7925       # The following arcana was gleaned from conversations with
7926       # Eric Schwartz <erics@col.hp.com>:
7927       #
7928       # On HPUX 10.x, the parts of X that HP considers "standard" live in
7929       # /usr/{include,lib}/X11R6/.  The parts that HP doesn't consider
7930       # "standard", notably, Xaw and Xmu, live in /usr/contrib/X11R6/.
7931       # Yet /usr/contrib/X11R6/ comes preinstalled on all HPUX systems.
7932       # Also, there are symlinks from /usr/include/ and /usr/lib/ into
7933       # /usr/{include,lib}/X11R6/, so that (if you don't use Xmu at all)
7934       # you don't need any -I or -L arguments.
7935       #
7936       # On HPUX 9.x, /usr/{include,lib}/X11R5/ and /usr/contrib/X11R5/
7937       # are the same division as 10.x.  However, there are no symlinks to
7938       # the X stuff from /usr/include/ and /usr/lib/, so -I and -L
7939       # arguments are always necessary.
7940       #
7941       # However, X11R6 was available on HPUX 9.x as a patch: if that
7942       # patch was installed, then all of X11R6 went in to
7943       # /usr/contrib/X11R6/ (there was no /usr/{include,lib}/X11R6/.)
7944       #
7945       # HPUX 8.x was the same as 9.x, but was X11R4 instead (I don't know
7946       # whether R5 was available as a patch; R6 undoubtedly was not.)
7947       #
7948       # So.  We try and use the highest numbered pair of
7949       # /usr/{include,lib}/X11R?/ and /usr/contrib/X11R?/{include,lib}/
7950       # that are available.  We do not mix and match different versions
7951       # of X.
7952       #
7953       # Question I still don't know the answer to: (do you?)
7954       #
7955       #   * On HPUX 9.x, where /usr/include/X11R5/ was standard, and
7956       #     /usr/contrib/X11R6/ could be installed as a patch, what was in
7957       #     that contrib directory?  Did it contain so-called "standard"
7958       #     X11R6, or did it include Xaw and Xmu as well?  If the former,
7959       #     where did one find Xaw and Xmu on 9.x R6 systems?  Would this
7960       #     be a situation where one had to reach into the R5 headers and
7961       #     libs to find Xmu?  That is, must both R6 and R5 directories
7962       #     be on the -I and -L lists in that case?
7963       #
7964       for version in X11R6 X11R5 X11R4 ; do
7965         # if either pair of directories exists...
7966         if test -d /usr/include/$version || test -d /usr/contrib/$version/include
7967         then
7968            # if contrib exists, use it...
7969            if test -d /usr/contrib/$version/include ; then
7970              X_CFLAGS="$X_CFLAGS -I/usr/contrib/$version/include"
7971              X_LIBS="$X_LIBS -L/usr/contrib/$version/lib"
7972            fi
7973            # if the "standard" one exists, use it.
7974            if test -d /usr/include/$version ; then
7975              X_CFLAGS="$X_CFLAGS -I/usr/include/$version"
7976              X_LIBS="$X_LIBS -L/usr/lib/$version"
7977            fi
7978            # since at least one of the pair exists, go no farther.
7979            break
7980         fi
7981       done
7982
7983       # Now find Motif.  Thanks for not making xmkmf find this by
7984       # default, you losers.
7985       #
7986       if test -d /usr/include/Motif2.1 ; then
7987         X_CFLAGS="$X_CFLAGS -I/usr/include/Motif2.1"
7988         X_LIBS="$X_LIBS -L/usr/lib/Motif2.1"
7989       elif test -d /usr/include/Motif1.2 ; then
7990         X_CFLAGS="$X_CFLAGS -I/usr/include/Motif1.2"
7991         X_LIBS="$X_LIBS -L/usr/lib/Motif1.2"
7992       elif test -d /usr/include/Motif1.1 ; then
7993         X_CFLAGS="$X_CFLAGS -I/usr/include/Motif1.1"
7994         X_LIBS="$X_LIBS -L/usr/lib/Motif1.1"
7995       fi
7996
7997       # Now let's check for the pseudo-standard locations for OpenGL and XPM.
7998       #
7999       if test -d /opt/graphics/OpenGL/include ; then
8000         # HP-UX 10.20 puts it here
8001         X_CFLAGS="-I/opt/graphics/OpenGL/include $X_CFLAGS"
8002         X_LIBS="-L/opt/graphics/OpenGL/lib $X_LIBS"
8003       elif test -d /opt/Mesa/lib ; then
8004         X_CFLAGS="-I/opt/Mesa/include $X_CFLAGS"
8005         X_LIBS="-L/opt/Mesa/lib $X_LIBS"
8006       fi
8007
8008
8009       if test -d /opt/xpm/lib/X11 ; then
8010         X_CFLAGS="-I/opt/xpm/include $X_CFLAGS"
8011         X_LIBS="-L/opt/xpm/lib/X11 $X_LIBS"
8012       fi
8013
8014       # On HPUX, default to installing in /opt/xscreensaver/ instead of
8015       # in /usr/local/, unless there is already an xscreensaver in
8016       # /usr/local/bin/.  This can be overridden with the --prefix arg
8017       # to configure.  I'm not sure this is the right thing to do, but
8018       # Richard Lloyd says so...
8019       #
8020       if test \! -x /usr/local/bin/xscreensaver ; then
8021         ac_default_prefix=/opt/xscreensaver
8022       fi
8023
8024     ;;
8025     *-solaris*)
8026
8027       # Thanks for not making xmkmf find this by default, pinheads.
8028       # And thanks for moving things around again, too.  Is this
8029       # really the standard location now?  What happened to the
8030       # joke that this kind of thing went in /opt?
8031       # cthomp says "answer: CDE (Common Disorganized Environment)"
8032       #
8033       if test -f /usr/dt/include/Xm/Xm.h ; then
8034         X_CFLAGS="$X_CFLAGS -I/usr/dt/include"
8035         MOTIF_LIBS="$MOTIF_LIBS -L/usr/dt/lib -R/usr/dt/lib"
8036
8037         # Some versions of Slowlaris Motif require -lgen.  But not all.  Why?
8038         { $as_echo "$as_me:$LINENO: checking for regcmp in -lgen" >&5
8039 $as_echo_n "checking for regcmp in -lgen... " >&6; }
8040 if test "${ac_cv_lib_gen_regcmp+set}" = set; then
8041   $as_echo_n "(cached) " >&6
8042 else
8043   ac_check_lib_save_LIBS=$LIBS
8044 LIBS="-lgen  $LIBS"
8045 cat >conftest.$ac_ext <<_ACEOF
8046 /* confdefs.h.  */
8047 _ACEOF
8048 cat confdefs.h >>conftest.$ac_ext
8049 cat >>conftest.$ac_ext <<_ACEOF
8050 /* end confdefs.h.  */
8051
8052 /* Override any GCC internal prototype to avoid an error.
8053    Use char because int might match the return type of a GCC
8054    builtin and then its argument prototype would still apply.  */
8055 #ifdef __cplusplus
8056 extern "C"
8057 #endif
8058 char regcmp ();
8059 int
8060 main ()
8061 {
8062 return regcmp ();
8063   ;
8064   return 0;
8065 }
8066 _ACEOF
8067 rm -rf conftest.$ac_objext conftest$ac_exeext
8068 if { (ac_try="$ac_link"
8069 case "(($ac_try" in
8070   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8071   *) ac_try_echo=$ac_try;;
8072 esac
8073 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
8074 $as_echo "$ac_try_echo") >&5
8075   (eval "$ac_link") 2>conftest.er1
8076   ac_status=$?
8077   grep -v '^ *+' conftest.er1 >conftest.err
8078   rm -rf conftest.er1
8079   cat conftest.err >&5
8080   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
8081   (exit $ac_status); } && {
8082          test -z "$ac_c_werror_flag" ||
8083          test ! -s conftest.err
8084        } && test -s conftest$ac_exeext && {
8085          test "$cross_compiling" = yes ||
8086          $as_test_x conftest$ac_exeext
8087        }; then
8088   ac_cv_lib_gen_regcmp=yes
8089 else
8090   $as_echo "$as_me: failed program was:" >&5
8091 sed 's/^/| /' conftest.$ac_ext >&5
8092
8093         ac_cv_lib_gen_regcmp=no
8094 fi
8095
8096 rm -rf conftest.dSYM
8097 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
8098       conftest$ac_exeext conftest.$ac_ext
8099 LIBS=$ac_check_lib_save_LIBS
8100 fi
8101 { $as_echo "$as_me:$LINENO: result: $ac_cv_lib_gen_regcmp" >&5
8102 $as_echo "$ac_cv_lib_gen_regcmp" >&6; }
8103 if test "x$ac_cv_lib_gen_regcmp" = x""yes; then
8104   MOTIF_LIBS="$MOTIF_LIBS -lgen"
8105 fi
8106
8107       fi
8108
8109     ;;
8110     *-darwin*)
8111
8112       # On MacOS X (10.x with "fink"), many things are under /sw/.
8113       #
8114       if test -d /sw/include ; then
8115         X_CFLAGS="-I/sw/include $X_CFLAGS"
8116         X_LIBS="-L/sw/lib $X_LIBS"
8117       fi
8118     ;;
8119   esac
8120 { $as_echo "$as_me:$LINENO: checking for XPointer" >&5
8121 $as_echo_n "checking for XPointer... " >&6; }
8122 if test "${ac_cv_xpointer+set}" = set; then
8123   $as_echo_n "(cached) " >&6
8124 else
8125
8126   ac_save_CPPFLAGS="$CPPFLAGS"
8127   if test \! -z "$includedir" ; then
8128     CPPFLAGS="$CPPFLAGS -I$includedir"
8129   fi
8130   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
8131   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
8132   cat >conftest.$ac_ext <<_ACEOF
8133 /* confdefs.h.  */
8134 _ACEOF
8135 cat confdefs.h >>conftest.$ac_ext
8136 cat >>conftest.$ac_ext <<_ACEOF
8137 /* end confdefs.h.  */
8138 #include <X11/Xlib.h>
8139 int
8140 main ()
8141 {
8142 XPointer foo = (XPointer) 0;
8143   ;
8144   return 0;
8145 }
8146 _ACEOF
8147 rm -rf conftest.$ac_objext
8148 if { (ac_try="$ac_compile"
8149 case "(($ac_try" in
8150   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8151   *) ac_try_echo=$ac_try;;
8152 esac
8153 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
8154 $as_echo "$ac_try_echo") >&5
8155   (eval "$ac_compile") 2>conftest.er1
8156   ac_status=$?
8157   grep -v '^ *+' conftest.er1 >conftest.err
8158   rm -rf conftest.er1
8159   cat conftest.err >&5
8160   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
8161   (exit $ac_status); } && {
8162          test -z "$ac_c_werror_flag" ||
8163          test ! -s conftest.err
8164        } && test -s conftest.$ac_objext; then
8165   ac_cv_xpointer=yes
8166 else
8167   $as_echo "$as_me: failed program was:" >&5
8168 sed 's/^/| /' conftest.$ac_ext >&5
8169
8170         ac_cv_xpointer=no
8171 fi
8172
8173 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
8174   CPPFLAGS="$ac_save_CPPFLAGS"
8175 fi
8176 { $as_echo "$as_me:$LINENO: result: $ac_cv_xpointer" >&5
8177 $as_echo "$ac_cv_xpointer" >&6; }
8178   if test "$ac_cv_xpointer" != yes; then
8179    cat >>confdefs.h <<\_ACEOF
8180 #define XPointer char*
8181 _ACEOF
8182
8183   fi
8184
8185 { $as_echo "$as_me:$LINENO: checking whether this is MacOS X" >&5
8186 $as_echo_n "checking whether this is MacOS X... " >&6; }
8187   ac_macosx=no
8188   case "$host" in
8189     *-apple-darwin* )
8190       ac_macosx=yes
8191     ;;
8192   esac
8193 { $as_echo "$as_me:$LINENO: result: $ac_macosx" >&5
8194 $as_echo "$ac_macosx" >&6; }
8195
8196
8197 ###############################################################################
8198 #
8199 #       Gettext support
8200 #
8201 ###############################################################################
8202
8203
8204
8205 if test -n ""; then
8206     { $as_echo "$as_me:$LINENO: checking for intltool >= " >&5
8207 $as_echo_n "checking for intltool >= ... " >&6; }
8208
8209     INTLTOOL_REQUIRED_VERSION_AS_INT=`echo  | awk -F. '{ printf "%d", $1 * 100 + $2; }'`
8210     INTLTOOL_APPLIED_VERSION=`awk -F\" '/\\$VERSION / { printf $2; }'  < intltool-update.in`
8211
8212     INTLTOOL_APPLIED_VERSION_AS_INT=`awk -F\" '/\\$VERSION / { split($2, VERSION, "."); printf "%d\n", VERSION[1] * 100 + VERSION[2];}' < intltool-update.in`
8213
8214
8215     if test "$INTLTOOL_APPLIED_VERSION_AS_INT" -ge "$INTLTOOL_REQUIRED_VERSION_AS_INT"; then
8216         { $as_echo "$as_me:$LINENO: result: $INTLTOOL_APPLIED_VERSION found" >&5
8217 $as_echo "$INTLTOOL_APPLIED_VERSION found" >&6; }
8218     else
8219         { $as_echo "$as_me:$LINENO: result: $INTLTOOL_APPLIED_VERSION found. Your intltool is too old.  You need intltool  or later." >&5
8220 $as_echo "$INTLTOOL_APPLIED_VERSION found. Your intltool is too old.  You need intltool  or later." >&6; }
8221         exit 1
8222     fi
8223 fi
8224
8225   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'
8226 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'
8227      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'
8228       INTLTOOL_OAF_RULE='%.oaf:       %.oaf.in       $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; $(INTLTOOL_MERGE) $(top_srcdir)/po $< $@ -o -p'
8229      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'
8230    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'
8231     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'
8232 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'
8233        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'
8234       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'
8235     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'
8236
8237
8238
8239
8240
8241
8242
8243
8244
8245
8246
8247
8248
8249 # Use the tools built into the package, not the ones that are installed.
8250
8251 INTLTOOL_EXTRACT='$(top_builddir)/intltool-extract'
8252 INTLTOOL_MERGE='$(top_builddir)/intltool-merge'
8253 INTLTOOL_UPDATE='$(top_builddir)/intltool-update'
8254
8255
8256
8257
8258
8259 # Extract the first word of "perl", so it can be a program name with args.
8260 set dummy perl; ac_word=$2
8261 { $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
8262 $as_echo_n "checking for $ac_word... " >&6; }
8263 if test "${ac_cv_path_INTLTOOL_PERL+set}" = set; then
8264   $as_echo_n "(cached) " >&6
8265 else
8266   case $INTLTOOL_PERL in
8267   [\\/]* | ?:[\\/]*)
8268   ac_cv_path_INTLTOOL_PERL="$INTLTOOL_PERL" # Let the user override the test with a path.
8269   ;;
8270   *)
8271   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8272 for as_dir in $PATH
8273 do
8274   IFS=$as_save_IFS
8275   test -z "$as_dir" && as_dir=.
8276   for ac_exec_ext in '' $ac_executable_extensions; do
8277   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
8278     ac_cv_path_INTLTOOL_PERL="$as_dir/$ac_word$ac_exec_ext"
8279     $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
8280     break 2
8281   fi
8282 done
8283 done
8284 IFS=$as_save_IFS
8285
8286   ;;
8287 esac
8288 fi
8289 INTLTOOL_PERL=$ac_cv_path_INTLTOOL_PERL
8290 if test -n "$INTLTOOL_PERL"; then
8291   { $as_echo "$as_me:$LINENO: result: $INTLTOOL_PERL" >&5
8292 $as_echo "$INTLTOOL_PERL" >&6; }
8293 else
8294   { $as_echo "$as_me:$LINENO: result: no" >&5
8295 $as_echo "no" >&6; }
8296 fi
8297
8298
8299 if test -z "$INTLTOOL_PERL"; then
8300    { { $as_echo "$as_me:$LINENO: error: perl not found; required for intltool" >&5
8301 $as_echo "$as_me: error: perl not found; required for intltool" >&2;}
8302    { (exit 1); exit 1; }; }
8303 fi
8304 if test -z "`$INTLTOOL_PERL -v | fgrep '5.' 2> /dev/null`"; then
8305    { { $as_echo "$as_me:$LINENO: error: perl 5.x required for intltool" >&5
8306 $as_echo "$as_me: error: perl 5.x required for intltool" >&2;}
8307    { (exit 1); exit 1; }; }
8308 fi
8309
8310 # Remove file type tags (using []) from po/POTFILES.
8311
8312
8313
8314
8315
8316
8317
8318 # Manually sed perl in so people don't have to put the intltool scripts in AC_OUTPUT.
8319
8320 ac_config_commands="$ac_config_commands default-1"
8321
8322
8323
8324 GETTEXT_PACKAGE=xscreensaver
8325
8326 cat >>confdefs.h <<_ACEOF
8327 #define GETTEXT_PACKAGE "$GETTEXT_PACKAGE"
8328 _ACEOF
8329
8330
8331 cat >>confdefs.h <<_ACEOF
8332 #define PACKAGE "$GETTEXT_PACKAGE"
8333 _ACEOF
8334
8335
8336
8337 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"
8338 if test -n "$ac_tool_prefix"; then
8339   # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
8340 set dummy ${ac_tool_prefix}ranlib; ac_word=$2
8341 { $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
8342 $as_echo_n "checking for $ac_word... " >&6; }
8343 if test "${ac_cv_prog_RANLIB+set}" = set; then
8344   $as_echo_n "(cached) " >&6
8345 else
8346   if test -n "$RANLIB"; then
8347   ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
8348 else
8349 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8350 for as_dir in $PATH
8351 do
8352   IFS=$as_save_IFS
8353   test -z "$as_dir" && as_dir=.
8354   for ac_exec_ext in '' $ac_executable_extensions; do
8355   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
8356     ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
8357     $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
8358     break 2
8359   fi
8360 done
8361 done
8362 IFS=$as_save_IFS
8363
8364 fi
8365 fi
8366 RANLIB=$ac_cv_prog_RANLIB
8367 if test -n "$RANLIB"; then
8368   { $as_echo "$as_me:$LINENO: result: $RANLIB" >&5
8369 $as_echo "$RANLIB" >&6; }
8370 else
8371   { $as_echo "$as_me:$LINENO: result: no" >&5
8372 $as_echo "no" >&6; }
8373 fi
8374
8375
8376 fi
8377 if test -z "$ac_cv_prog_RANLIB"; then
8378   ac_ct_RANLIB=$RANLIB
8379   # Extract the first word of "ranlib", so it can be a program name with args.
8380 set dummy ranlib; ac_word=$2
8381 { $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
8382 $as_echo_n "checking for $ac_word... " >&6; }
8383 if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then
8384   $as_echo_n "(cached) " >&6
8385 else
8386   if test -n "$ac_ct_RANLIB"; then
8387   ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
8388 else
8389 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8390 for as_dir in $PATH
8391 do
8392   IFS=$as_save_IFS
8393   test -z "$as_dir" && as_dir=.
8394   for ac_exec_ext in '' $ac_executable_extensions; do
8395   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
8396     ac_cv_prog_ac_ct_RANLIB="ranlib"
8397     $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
8398     break 2
8399   fi
8400 done
8401 done
8402 IFS=$as_save_IFS
8403
8404 fi
8405 fi
8406 ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
8407 if test -n "$ac_ct_RANLIB"; then
8408   { $as_echo "$as_me:$LINENO: result: $ac_ct_RANLIB" >&5
8409 $as_echo "$ac_ct_RANLIB" >&6; }
8410 else
8411   { $as_echo "$as_me:$LINENO: result: no" >&5
8412 $as_echo "no" >&6; }
8413 fi
8414
8415   if test "x$ac_ct_RANLIB" = x; then
8416     RANLIB=":"
8417   else
8418     case $cross_compiling:$ac_tool_warned in
8419 yes:)
8420 { $as_echo "$as_me:$LINENO: WARNING: using cross tools not prefixed with host triplet" >&5
8421 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
8422 ac_tool_warned=yes ;;
8423 esac
8424     RANLIB=$ac_ct_RANLIB
8425   fi
8426 else
8427   RANLIB="$ac_cv_prog_RANLIB"
8428 fi
8429
8430 { $as_echo "$as_me:$LINENO: checking for off_t" >&5
8431 $as_echo_n "checking for off_t... " >&6; }
8432 if test "${ac_cv_type_off_t+set}" = set; then
8433   $as_echo_n "(cached) " >&6
8434 else
8435   ac_cv_type_off_t=no
8436 cat >conftest.$ac_ext <<_ACEOF
8437 /* confdefs.h.  */
8438 _ACEOF
8439 cat confdefs.h >>conftest.$ac_ext
8440 cat >>conftest.$ac_ext <<_ACEOF
8441 /* end confdefs.h.  */
8442 $ac_includes_default
8443 int
8444 main ()
8445 {
8446 if (sizeof (off_t))
8447        return 0;
8448   ;
8449   return 0;
8450 }
8451 _ACEOF
8452 rm -rf conftest.$ac_objext
8453 if { (ac_try="$ac_compile"
8454 case "(($ac_try" in
8455   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8456   *) ac_try_echo=$ac_try;;
8457 esac
8458 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
8459 $as_echo "$ac_try_echo") >&5
8460   (eval "$ac_compile") 2>conftest.er1
8461   ac_status=$?
8462   grep -v '^ *+' conftest.er1 >conftest.err
8463   rm -rf conftest.er1
8464   cat conftest.err >&5
8465   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
8466   (exit $ac_status); } && {
8467          test -z "$ac_c_werror_flag" ||
8468          test ! -s conftest.err
8469        } && test -s conftest.$ac_objext; then
8470   cat >conftest.$ac_ext <<_ACEOF
8471 /* confdefs.h.  */
8472 _ACEOF
8473 cat confdefs.h >>conftest.$ac_ext
8474 cat >>conftest.$ac_ext <<_ACEOF
8475 /* end confdefs.h.  */
8476 $ac_includes_default
8477 int
8478 main ()
8479 {
8480 if (sizeof ((off_t)))
8481           return 0;
8482   ;
8483   return 0;
8484 }
8485 _ACEOF
8486 rm -rf conftest.$ac_objext
8487 if { (ac_try="$ac_compile"
8488 case "(($ac_try" in
8489   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8490   *) ac_try_echo=$ac_try;;
8491 esac
8492 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
8493 $as_echo "$ac_try_echo") >&5
8494   (eval "$ac_compile") 2>conftest.er1
8495   ac_status=$?
8496   grep -v '^ *+' conftest.er1 >conftest.err
8497   rm -rf conftest.er1
8498   cat conftest.err >&5
8499   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
8500   (exit $ac_status); } && {
8501          test -z "$ac_c_werror_flag" ||
8502          test ! -s conftest.err
8503        } && test -s conftest.$ac_objext; then
8504   :
8505 else
8506   $as_echo "$as_me: failed program was:" >&5
8507 sed 's/^/| /' conftest.$ac_ext >&5
8508
8509         ac_cv_type_off_t=yes
8510 fi
8511
8512 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
8513 else
8514   $as_echo "$as_me: failed program was:" >&5
8515 sed 's/^/| /' conftest.$ac_ext >&5
8516
8517
8518 fi
8519
8520 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
8521 fi
8522 { $as_echo "$as_me:$LINENO: result: $ac_cv_type_off_t" >&5
8523 $as_echo "$ac_cv_type_off_t" >&6; }
8524 if test "x$ac_cv_type_off_t" = x""yes; then
8525   :
8526 else
8527
8528 cat >>confdefs.h <<_ACEOF
8529 #define off_t long int
8530 _ACEOF
8531
8532 fi
8533
8534 # The Ultrix 4.2 mips builtin alloca declared by alloca.h only works
8535 # for constant arguments.  Useless!
8536 { $as_echo "$as_me:$LINENO: checking for working alloca.h" >&5
8537 $as_echo_n "checking for working alloca.h... " >&6; }
8538 if test "${ac_cv_working_alloca_h+set}" = set; then
8539   $as_echo_n "(cached) " >&6
8540 else
8541   cat >conftest.$ac_ext <<_ACEOF
8542 /* confdefs.h.  */
8543 _ACEOF
8544 cat confdefs.h >>conftest.$ac_ext
8545 cat >>conftest.$ac_ext <<_ACEOF
8546 /* end confdefs.h.  */
8547 #include <alloca.h>
8548 int
8549 main ()
8550 {
8551 char *p = (char *) alloca (2 * sizeof (int));
8552                           if (p) return 0;
8553   ;
8554   return 0;
8555 }
8556 _ACEOF
8557 rm -rf conftest.$ac_objext conftest$ac_exeext
8558 if { (ac_try="$ac_link"
8559 case "(($ac_try" in
8560   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8561   *) ac_try_echo=$ac_try;;
8562 esac
8563 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
8564 $as_echo "$ac_try_echo") >&5
8565   (eval "$ac_link") 2>conftest.er1
8566   ac_status=$?
8567   grep -v '^ *+' conftest.er1 >conftest.err
8568   rm -rf conftest.er1
8569   cat conftest.err >&5
8570   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
8571   (exit $ac_status); } && {
8572          test -z "$ac_c_werror_flag" ||
8573          test ! -s conftest.err
8574        } && test -s conftest$ac_exeext && {
8575          test "$cross_compiling" = yes ||
8576          $as_test_x conftest$ac_exeext
8577        }; then
8578   ac_cv_working_alloca_h=yes
8579 else
8580   $as_echo "$as_me: failed program was:" >&5
8581 sed 's/^/| /' conftest.$ac_ext >&5
8582
8583         ac_cv_working_alloca_h=no
8584 fi
8585
8586 rm -rf conftest.dSYM
8587 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
8588       conftest$ac_exeext conftest.$ac_ext
8589 fi
8590 { $as_echo "$as_me:$LINENO: result: $ac_cv_working_alloca_h" >&5
8591 $as_echo "$ac_cv_working_alloca_h" >&6; }
8592 if test $ac_cv_working_alloca_h = yes; then
8593
8594 cat >>confdefs.h <<\_ACEOF
8595 #define HAVE_ALLOCA_H 1
8596 _ACEOF
8597
8598 fi
8599
8600 { $as_echo "$as_me:$LINENO: checking for alloca" >&5
8601 $as_echo_n "checking for alloca... " >&6; }
8602 if test "${ac_cv_func_alloca_works+set}" = set; then
8603   $as_echo_n "(cached) " >&6
8604 else
8605   cat >conftest.$ac_ext <<_ACEOF
8606 /* confdefs.h.  */
8607 _ACEOF
8608 cat confdefs.h >>conftest.$ac_ext
8609 cat >>conftest.$ac_ext <<_ACEOF
8610 /* end confdefs.h.  */
8611 #ifdef __GNUC__
8612 # define alloca __builtin_alloca
8613 #else
8614 # ifdef _MSC_VER
8615 #  include <malloc.h>
8616 #  define alloca _alloca
8617 # else
8618 #  ifdef HAVE_ALLOCA_H
8619 #   include <alloca.h>
8620 #  else
8621 #   ifdef _AIX
8622  #pragma alloca
8623 #   else
8624 #    ifndef alloca /* predefined by HP cc +Olibcalls */
8625 char *alloca ();
8626 #    endif
8627 #   endif
8628 #  endif
8629 # endif
8630 #endif
8631
8632 int
8633 main ()
8634 {
8635 char *p = (char *) alloca (1);
8636                                     if (p) return 0;
8637   ;
8638   return 0;
8639 }
8640 _ACEOF
8641 rm -rf conftest.$ac_objext conftest$ac_exeext
8642 if { (ac_try="$ac_link"
8643 case "(($ac_try" in
8644   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8645   *) ac_try_echo=$ac_try;;
8646 esac
8647 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
8648 $as_echo "$ac_try_echo") >&5
8649   (eval "$ac_link") 2>conftest.er1
8650   ac_status=$?
8651   grep -v '^ *+' conftest.er1 >conftest.err
8652   rm -rf conftest.er1
8653   cat conftest.err >&5
8654   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
8655   (exit $ac_status); } && {
8656          test -z "$ac_c_werror_flag" ||
8657          test ! -s conftest.err
8658        } && test -s conftest$ac_exeext && {
8659          test "$cross_compiling" = yes ||
8660          $as_test_x conftest$ac_exeext
8661        }; then
8662   ac_cv_func_alloca_works=yes
8663 else
8664   $as_echo "$as_me: failed program was:" >&5
8665 sed 's/^/| /' conftest.$ac_ext >&5
8666
8667         ac_cv_func_alloca_works=no
8668 fi
8669
8670 rm -rf conftest.dSYM
8671 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
8672       conftest$ac_exeext conftest.$ac_ext
8673 fi
8674 { $as_echo "$as_me:$LINENO: result: $ac_cv_func_alloca_works" >&5
8675 $as_echo "$ac_cv_func_alloca_works" >&6; }
8676
8677 if test $ac_cv_func_alloca_works = yes; then
8678
8679 cat >>confdefs.h <<\_ACEOF
8680 #define HAVE_ALLOCA 1
8681 _ACEOF
8682
8683 else
8684   # The SVR3 libPW and SVR4 libucb both contain incompatible functions
8685 # that cause trouble.  Some versions do not even contain alloca or
8686 # contain a buggy version.  If you still want to use their alloca,
8687 # use ar to extract alloca.o from them instead of compiling alloca.c.
8688
8689 ALLOCA=\${LIBOBJDIR}alloca.$ac_objext
8690
8691 cat >>confdefs.h <<\_ACEOF
8692 #define C_ALLOCA 1
8693 _ACEOF
8694
8695
8696 { $as_echo "$as_me:$LINENO: checking whether \`alloca.c' needs Cray hooks" >&5
8697 $as_echo_n "checking whether \`alloca.c' needs Cray hooks... " >&6; }
8698 if test "${ac_cv_os_cray+set}" = set; then
8699   $as_echo_n "(cached) " >&6
8700 else
8701   cat >conftest.$ac_ext <<_ACEOF
8702 /* confdefs.h.  */
8703 _ACEOF
8704 cat confdefs.h >>conftest.$ac_ext
8705 cat >>conftest.$ac_ext <<_ACEOF
8706 /* end confdefs.h.  */
8707 #if defined CRAY && ! defined CRAY2
8708 webecray
8709 #else
8710 wenotbecray
8711 #endif
8712
8713 _ACEOF
8714 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
8715   $EGREP "webecray" >/dev/null 2>&1; then
8716   ac_cv_os_cray=yes
8717 else
8718   ac_cv_os_cray=no
8719 fi
8720 rm -rf conftest*
8721
8722 fi
8723 { $as_echo "$as_me:$LINENO: result: $ac_cv_os_cray" >&5
8724 $as_echo "$ac_cv_os_cray" >&6; }
8725 if test $ac_cv_os_cray = yes; then
8726   for ac_func in _getb67 GETB67 getb67; do
8727     as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
8728 { $as_echo "$as_me:$LINENO: checking for $ac_func" >&5
8729 $as_echo_n "checking for $ac_func... " >&6; }
8730 if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
8731   $as_echo_n "(cached) " >&6
8732 else
8733   cat >conftest.$ac_ext <<_ACEOF
8734 /* confdefs.h.  */
8735 _ACEOF
8736 cat confdefs.h >>conftest.$ac_ext
8737 cat >>conftest.$ac_ext <<_ACEOF
8738 /* end confdefs.h.  */
8739 /* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
8740    For example, HP-UX 11i <limits.h> declares gettimeofday.  */
8741 #define $ac_func innocuous_$ac_func
8742
8743 /* System header to define __stub macros and hopefully few prototypes,
8744     which can conflict with char $ac_func (); below.
8745     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
8746     <limits.h> exists even on freestanding compilers.  */
8747
8748 #ifdef __STDC__
8749 # include <limits.h>
8750 #else
8751 # include <assert.h>
8752 #endif
8753
8754 #undef $ac_func
8755
8756 /* Override any GCC internal prototype to avoid an error.
8757    Use char because int might match the return type of a GCC
8758    builtin and then its argument prototype would still apply.  */
8759 #ifdef __cplusplus
8760 extern "C"
8761 #endif
8762 char $ac_func ();
8763 /* The GNU C library defines this for functions which it implements
8764     to always fail with ENOSYS.  Some functions are actually named
8765     something starting with __ and the normal name is an alias.  */
8766 #if defined __stub_$ac_func || defined __stub___$ac_func
8767 choke me
8768 #endif
8769
8770 int
8771 main ()
8772 {
8773 return $ac_func ();
8774   ;
8775   return 0;
8776 }
8777 _ACEOF
8778 rm -rf conftest.$ac_objext conftest$ac_exeext
8779 if { (ac_try="$ac_link"
8780 case "(($ac_try" in
8781   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8782   *) ac_try_echo=$ac_try;;
8783 esac
8784 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
8785 $as_echo "$ac_try_echo") >&5
8786   (eval "$ac_link") 2>conftest.er1
8787   ac_status=$?
8788   grep -v '^ *+' conftest.er1 >conftest.err
8789   rm -rf conftest.er1
8790   cat conftest.err >&5
8791   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
8792   (exit $ac_status); } && {
8793          test -z "$ac_c_werror_flag" ||
8794          test ! -s conftest.err
8795        } && test -s conftest$ac_exeext && {
8796          test "$cross_compiling" = yes ||
8797          $as_test_x conftest$ac_exeext
8798        }; then
8799   eval "$as_ac_var=yes"
8800 else
8801   $as_echo "$as_me: failed program was:" >&5
8802 sed 's/^/| /' conftest.$ac_ext >&5
8803
8804         eval "$as_ac_var=no"
8805 fi
8806
8807 rm -rf conftest.dSYM
8808 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
8809       conftest$ac_exeext conftest.$ac_ext
8810 fi
8811 ac_res=`eval 'as_val=${'$as_ac_var'}
8812                  $as_echo "$as_val"'`
8813                { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
8814 $as_echo "$ac_res" >&6; }
8815 as_val=`eval 'as_val=${'$as_ac_var'}
8816                  $as_echo "$as_val"'`
8817    if test "x$as_val" = x""yes; then
8818
8819 cat >>confdefs.h <<_ACEOF
8820 #define CRAY_STACKSEG_END $ac_func
8821 _ACEOF
8822
8823     break
8824 fi
8825
8826   done
8827 fi
8828
8829 { $as_echo "$as_me:$LINENO: checking stack direction for C alloca" >&5
8830 $as_echo_n "checking stack direction for C alloca... " >&6; }
8831 if test "${ac_cv_c_stack_direction+set}" = set; then
8832   $as_echo_n "(cached) " >&6
8833 else
8834   if test "$cross_compiling" = yes; then
8835   ac_cv_c_stack_direction=0
8836 else
8837   cat >conftest.$ac_ext <<_ACEOF
8838 /* confdefs.h.  */
8839 _ACEOF
8840 cat confdefs.h >>conftest.$ac_ext
8841 cat >>conftest.$ac_ext <<_ACEOF
8842 /* end confdefs.h.  */
8843 $ac_includes_default
8844 int
8845 find_stack_direction ()
8846 {
8847   static char *addr = 0;
8848   auto char dummy;
8849   if (addr == 0)
8850     {
8851       addr = &dummy;
8852       return find_stack_direction ();
8853     }
8854   else
8855     return (&dummy > addr) ? 1 : -1;
8856 }
8857
8858 int
8859 main ()
8860 {
8861   return find_stack_direction () < 0;
8862 }
8863 _ACEOF
8864 rm -rf conftest$ac_exeext
8865 if { (ac_try="$ac_link"
8866 case "(($ac_try" in
8867   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8868   *) ac_try_echo=$ac_try;;
8869 esac
8870 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
8871 $as_echo "$ac_try_echo") >&5
8872   (eval "$ac_link") 2>&5
8873   ac_status=$?
8874   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
8875   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
8876   { (case "(($ac_try" in
8877   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8878   *) ac_try_echo=$ac_try;;
8879 esac
8880 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
8881 $as_echo "$ac_try_echo") >&5
8882   (eval "$ac_try") 2>&5
8883   ac_status=$?
8884   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
8885   (exit $ac_status); }; }; then
8886   ac_cv_c_stack_direction=1
8887 else
8888   $as_echo "$as_me: program exited with status $ac_status" >&5
8889 $as_echo "$as_me: failed program was:" >&5
8890 sed 's/^/| /' conftest.$ac_ext >&5
8891
8892 ( exit $ac_status )
8893 ac_cv_c_stack_direction=-1
8894 fi
8895 rm -rf conftest.dSYM
8896 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
8897 fi
8898
8899
8900 fi
8901 { $as_echo "$as_me:$LINENO: result: $ac_cv_c_stack_direction" >&5
8902 $as_echo "$ac_cv_c_stack_direction" >&6; }
8903
8904 cat >>confdefs.h <<_ACEOF
8905 #define STACK_DIRECTION $ac_cv_c_stack_direction
8906 _ACEOF
8907
8908
8909 fi
8910
8911
8912
8913 for ac_header in stdlib.h unistd.h
8914 do
8915 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
8916 if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
8917   { $as_echo "$as_me:$LINENO: checking for $ac_header" >&5
8918 $as_echo_n "checking for $ac_header... " >&6; }
8919 if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
8920   $as_echo_n "(cached) " >&6
8921 fi
8922 ac_res=`eval 'as_val=${'$as_ac_Header'}
8923                  $as_echo "$as_val"'`
8924                { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
8925 $as_echo "$ac_res" >&6; }
8926 else
8927   # Is the header compilable?
8928 { $as_echo "$as_me:$LINENO: checking $ac_header usability" >&5
8929 $as_echo_n "checking $ac_header usability... " >&6; }
8930 cat >conftest.$ac_ext <<_ACEOF
8931 /* confdefs.h.  */
8932 _ACEOF
8933 cat confdefs.h >>conftest.$ac_ext
8934 cat >>conftest.$ac_ext <<_ACEOF
8935 /* end confdefs.h.  */
8936 $ac_includes_default
8937 #include <$ac_header>
8938 _ACEOF
8939 rm -rf conftest.$ac_objext
8940 if { (ac_try="$ac_compile"
8941 case "(($ac_try" in
8942   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8943   *) ac_try_echo=$ac_try;;
8944 esac
8945 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
8946 $as_echo "$ac_try_echo") >&5
8947   (eval "$ac_compile") 2>conftest.er1
8948   ac_status=$?
8949   grep -v '^ *+' conftest.er1 >conftest.err
8950   rm -rf conftest.er1
8951   cat conftest.err >&5
8952   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
8953   (exit $ac_status); } && {
8954          test -z "$ac_c_werror_flag" ||
8955          test ! -s conftest.err
8956        } && test -s conftest.$ac_objext; then
8957   ac_header_compiler=yes
8958 else
8959   $as_echo "$as_me: failed program was:" >&5
8960 sed 's/^/| /' conftest.$ac_ext >&5
8961
8962         ac_header_compiler=no
8963 fi
8964
8965 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
8966 { $as_echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
8967 $as_echo "$ac_header_compiler" >&6; }
8968
8969 # Is the header present?
8970 { $as_echo "$as_me:$LINENO: checking $ac_header presence" >&5
8971 $as_echo_n "checking $ac_header presence... " >&6; }
8972 cat >conftest.$ac_ext <<_ACEOF
8973 /* confdefs.h.  */
8974 _ACEOF
8975 cat confdefs.h >>conftest.$ac_ext
8976 cat >>conftest.$ac_ext <<_ACEOF
8977 /* end confdefs.h.  */
8978 #include <$ac_header>
8979 _ACEOF
8980 if { (ac_try="$ac_cpp conftest.$ac_ext"
8981 case "(($ac_try" in
8982   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8983   *) ac_try_echo=$ac_try;;
8984 esac
8985 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
8986 $as_echo "$ac_try_echo") >&5
8987   (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
8988   ac_status=$?
8989   grep -v '^ *+' conftest.er1 >conftest.err
8990   rm -rf conftest.er1
8991   cat conftest.err >&5
8992   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
8993   (exit $ac_status); } >/dev/null && {
8994          test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
8995          test ! -s conftest.err
8996        }; then
8997   ac_header_preproc=yes
8998 else
8999   $as_echo "$as_me: failed program was:" >&5
9000 sed 's/^/| /' conftest.$ac_ext >&5
9001
9002   ac_header_preproc=no
9003 fi
9004
9005 rm -rf conftest.err conftest.$ac_ext
9006 { $as_echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
9007 $as_echo "$ac_header_preproc" >&6; }
9008
9009 # So?  What about this header?
9010 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
9011   yes:no: )
9012     { $as_echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
9013 $as_echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
9014     { $as_echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
9015 $as_echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
9016     ac_header_preproc=yes
9017     ;;
9018   no:yes:* )
9019     { $as_echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
9020 $as_echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
9021     { $as_echo "$as_me:$LINENO: WARNING: $ac_header:     check for missing prerequisite headers?" >&5
9022 $as_echo "$as_me: WARNING: $ac_header:     check for missing prerequisite headers?" >&2;}
9023     { $as_echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
9024 $as_echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
9025     { $as_echo "$as_me:$LINENO: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&5
9026 $as_echo "$as_me: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&2;}
9027     { $as_echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
9028 $as_echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
9029     { $as_echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
9030 $as_echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
9031
9032     ;;
9033 esac
9034 { $as_echo "$as_me:$LINENO: checking for $ac_header" >&5
9035 $as_echo_n "checking for $ac_header... " >&6; }
9036 if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
9037   $as_echo_n "(cached) " >&6
9038 else
9039   eval "$as_ac_Header=\$ac_header_preproc"
9040 fi
9041 ac_res=`eval 'as_val=${'$as_ac_Header'}
9042                  $as_echo "$as_val"'`
9043                { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
9044 $as_echo "$ac_res" >&6; }
9045
9046 fi
9047 as_val=`eval 'as_val=${'$as_ac_Header'}
9048                  $as_echo "$as_val"'`
9049    if test "x$as_val" = x""yes; then
9050   cat >>confdefs.h <<_ACEOF
9051 #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
9052 _ACEOF
9053
9054 fi
9055
9056 done
9057
9058
9059 for ac_func in getpagesize
9060 do
9061 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
9062 { $as_echo "$as_me:$LINENO: checking for $ac_func" >&5
9063 $as_echo_n "checking for $ac_func... " >&6; }
9064 if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
9065   $as_echo_n "(cached) " >&6
9066 else
9067   cat >conftest.$ac_ext <<_ACEOF
9068 /* confdefs.h.  */
9069 _ACEOF
9070 cat confdefs.h >>conftest.$ac_ext
9071 cat >>conftest.$ac_ext <<_ACEOF
9072 /* end confdefs.h.  */
9073 /* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
9074    For example, HP-UX 11i <limits.h> declares gettimeofday.  */
9075 #define $ac_func innocuous_$ac_func
9076
9077 /* System header to define __stub macros and hopefully few prototypes,
9078     which can conflict with char $ac_func (); below.
9079     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
9080     <limits.h> exists even on freestanding compilers.  */
9081
9082 #ifdef __STDC__
9083 # include <limits.h>
9084 #else
9085 # include <assert.h>
9086 #endif
9087
9088 #undef $ac_func
9089
9090 /* Override any GCC internal prototype to avoid an error.
9091    Use char because int might match the return type of a GCC
9092    builtin and then its argument prototype would still apply.  */
9093 #ifdef __cplusplus
9094 extern "C"
9095 #endif
9096 char $ac_func ();
9097 /* The GNU C library defines this for functions which it implements
9098     to always fail with ENOSYS.  Some functions are actually named
9099     something starting with __ and the normal name is an alias.  */
9100 #if defined __stub_$ac_func || defined __stub___$ac_func
9101 choke me
9102 #endif
9103
9104 int
9105 main ()
9106 {
9107 return $ac_func ();
9108   ;
9109   return 0;
9110 }
9111 _ACEOF
9112 rm -rf conftest.$ac_objext conftest$ac_exeext
9113 if { (ac_try="$ac_link"
9114 case "(($ac_try" in
9115   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9116   *) ac_try_echo=$ac_try;;
9117 esac
9118 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
9119 $as_echo "$ac_try_echo") >&5
9120   (eval "$ac_link") 2>conftest.er1
9121   ac_status=$?
9122   grep -v '^ *+' conftest.er1 >conftest.err
9123   rm -rf conftest.er1
9124   cat conftest.err >&5
9125   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
9126   (exit $ac_status); } && {
9127          test -z "$ac_c_werror_flag" ||
9128          test ! -s conftest.err
9129        } && test -s conftest$ac_exeext && {
9130          test "$cross_compiling" = yes ||
9131          $as_test_x conftest$ac_exeext
9132        }; then
9133   eval "$as_ac_var=yes"
9134 else
9135   $as_echo "$as_me: failed program was:" >&5
9136 sed 's/^/| /' conftest.$ac_ext >&5
9137
9138         eval "$as_ac_var=no"
9139 fi
9140
9141 rm -rf conftest.dSYM
9142 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
9143       conftest$ac_exeext conftest.$ac_ext
9144 fi
9145 ac_res=`eval 'as_val=${'$as_ac_var'}
9146                  $as_echo "$as_val"'`
9147                { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
9148 $as_echo "$ac_res" >&6; }
9149 as_val=`eval 'as_val=${'$as_ac_var'}
9150                  $as_echo "$as_val"'`
9151    if test "x$as_val" = x""yes; then
9152   cat >>confdefs.h <<_ACEOF
9153 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
9154 _ACEOF
9155
9156 fi
9157 done
9158
9159 { $as_echo "$as_me:$LINENO: checking for working mmap" >&5
9160 $as_echo_n "checking for working mmap... " >&6; }
9161 if test "${ac_cv_func_mmap_fixed_mapped+set}" = set; then
9162   $as_echo_n "(cached) " >&6
9163 else
9164   if test "$cross_compiling" = yes; then
9165   ac_cv_func_mmap_fixed_mapped=no
9166 else
9167   cat >conftest.$ac_ext <<_ACEOF
9168 /* confdefs.h.  */
9169 _ACEOF
9170 cat confdefs.h >>conftest.$ac_ext
9171 cat >>conftest.$ac_ext <<_ACEOF
9172 /* end confdefs.h.  */
9173 $ac_includes_default
9174 /* malloc might have been renamed as rpl_malloc. */
9175 #undef malloc
9176
9177 /* Thanks to Mike Haertel and Jim Avera for this test.
9178    Here is a matrix of mmap possibilities:
9179         mmap private not fixed
9180         mmap private fixed at somewhere currently unmapped
9181         mmap private fixed at somewhere already mapped
9182         mmap shared not fixed
9183         mmap shared fixed at somewhere currently unmapped
9184         mmap shared fixed at somewhere already mapped
9185    For private mappings, we should verify that changes cannot be read()
9186    back from the file, nor mmap's back from the file at a different
9187    address.  (There have been systems where private was not correctly
9188    implemented like the infamous i386 svr4.0, and systems where the
9189    VM page cache was not coherent with the file system buffer cache
9190    like early versions of FreeBSD and possibly contemporary NetBSD.)
9191    For shared mappings, we should conversely verify that changes get
9192    propagated back to all the places they're supposed to be.
9193
9194    Grep wants private fixed already mapped.
9195    The main things grep needs to know about mmap are:
9196    * does it exist and is it safe to write into the mmap'd area
9197    * how to use it (BSD variants)  */
9198
9199 #include <fcntl.h>
9200 #include <sys/mman.h>
9201
9202 #if !defined STDC_HEADERS && !defined HAVE_STDLIB_H
9203 char *malloc ();
9204 #endif
9205
9206 /* This mess was copied from the GNU getpagesize.h.  */
9207 #ifndef HAVE_GETPAGESIZE
9208 /* Assume that all systems that can run configure have sys/param.h.  */
9209 # ifndef HAVE_SYS_PARAM_H
9210 #  define HAVE_SYS_PARAM_H 1
9211 # endif
9212
9213 # ifdef _SC_PAGESIZE
9214 #  define getpagesize() sysconf(_SC_PAGESIZE)
9215 # else /* no _SC_PAGESIZE */
9216 #  ifdef HAVE_SYS_PARAM_H
9217 #   include <sys/param.h>
9218 #   ifdef EXEC_PAGESIZE
9219 #    define getpagesize() EXEC_PAGESIZE
9220 #   else /* no EXEC_PAGESIZE */
9221 #    ifdef NBPG
9222 #     define getpagesize() NBPG * CLSIZE
9223 #     ifndef CLSIZE
9224 #      define CLSIZE 1
9225 #     endif /* no CLSIZE */
9226 #    else /* no NBPG */
9227 #     ifdef NBPC
9228 #      define getpagesize() NBPC
9229 #     else /* no NBPC */
9230 #      ifdef PAGESIZE
9231 #       define getpagesize() PAGESIZE
9232 #      endif /* PAGESIZE */
9233 #     endif /* no NBPC */
9234 #    endif /* no NBPG */
9235 #   endif /* no EXEC_PAGESIZE */
9236 #  else /* no HAVE_SYS_PARAM_H */
9237 #   define getpagesize() 8192   /* punt totally */
9238 #  endif /* no HAVE_SYS_PARAM_H */
9239 # endif /* no _SC_PAGESIZE */
9240
9241 #endif /* no HAVE_GETPAGESIZE */
9242
9243 int
9244 main ()
9245 {
9246   char *data, *data2, *data3;
9247   int i, pagesize;
9248   int fd;
9249
9250   pagesize = getpagesize ();
9251
9252   /* First, make a file with some known garbage in it. */
9253   data = (char *) malloc (pagesize);
9254   if (!data)
9255     return 1;
9256   for (i = 0; i < pagesize; ++i)
9257     *(data + i) = rand ();
9258   umask (0);
9259   fd = creat ("conftest.mmap", 0600);
9260   if (fd < 0)
9261     return 1;
9262   if (write (fd, data, pagesize) != pagesize)
9263     return 1;
9264   close (fd);
9265
9266   /* Next, try to mmap the file at a fixed address which already has
9267      something else allocated at it.  If we can, also make sure that
9268      we see the same garbage.  */
9269   fd = open ("conftest.mmap", O_RDWR);
9270   if (fd < 0)
9271     return 1;
9272   data2 = (char *) malloc (2 * pagesize);
9273   if (!data2)
9274     return 1;
9275   data2 += (pagesize - ((long int) data2 & (pagesize - 1))) & (pagesize - 1);
9276   if (data2 != mmap (data2, pagesize, PROT_READ | PROT_WRITE,
9277                      MAP_PRIVATE | MAP_FIXED, fd, 0L))
9278     return 1;
9279   for (i = 0; i < pagesize; ++i)
9280     if (*(data + i) != *(data2 + i))
9281       return 1;
9282
9283   /* Finally, make sure that changes to the mapped area do not
9284      percolate back to the file as seen by read().  (This is a bug on
9285      some variants of i386 svr4.0.)  */
9286   for (i = 0; i < pagesize; ++i)
9287     *(data2 + i) = *(data2 + i) + 1;
9288   data3 = (char *) malloc (pagesize);
9289   if (!data3)
9290     return 1;
9291   if (read (fd, data3, pagesize) != pagesize)
9292     return 1;
9293   for (i = 0; i < pagesize; ++i)
9294     if (*(data + i) != *(data3 + i))
9295       return 1;
9296   close (fd);
9297   return 0;
9298 }
9299 _ACEOF
9300 rm -rf conftest$ac_exeext
9301 if { (ac_try="$ac_link"
9302 case "(($ac_try" in
9303   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9304   *) ac_try_echo=$ac_try;;
9305 esac
9306 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
9307 $as_echo "$ac_try_echo") >&5
9308   (eval "$ac_link") 2>&5
9309   ac_status=$?
9310   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
9311   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
9312   { (case "(($ac_try" in
9313   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9314   *) ac_try_echo=$ac_try;;
9315 esac
9316 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
9317 $as_echo "$ac_try_echo") >&5
9318   (eval "$ac_try") 2>&5
9319   ac_status=$?
9320   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
9321   (exit $ac_status); }; }; then
9322   ac_cv_func_mmap_fixed_mapped=yes
9323 else
9324   $as_echo "$as_me: program exited with status $ac_status" >&5
9325 $as_echo "$as_me: failed program was:" >&5
9326 sed 's/^/| /' conftest.$ac_ext >&5
9327
9328 ( exit $ac_status )
9329 ac_cv_func_mmap_fixed_mapped=no
9330 fi
9331 rm -rf conftest.dSYM
9332 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
9333 fi
9334
9335
9336 fi
9337 { $as_echo "$as_me:$LINENO: result: $ac_cv_func_mmap_fixed_mapped" >&5
9338 $as_echo "$ac_cv_func_mmap_fixed_mapped" >&6; }
9339 if test $ac_cv_func_mmap_fixed_mapped = yes; then
9340
9341 cat >>confdefs.h <<\_ACEOF
9342 #define HAVE_MMAP 1
9343 _ACEOF
9344
9345 fi
9346 rm -rf conftest.mmap
9347
9348
9349
9350
9351
9352
9353
9354
9355
9356
9357 for ac_header in argz.h limits.h locale.h nl_types.h malloc.h string.h \
9358 unistd.h sys/param.h
9359 do
9360 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
9361 if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
9362   { $as_echo "$as_me:$LINENO: checking for $ac_header" >&5
9363 $as_echo_n "checking for $ac_header... " >&6; }
9364 if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
9365   $as_echo_n "(cached) " >&6
9366 fi
9367 ac_res=`eval 'as_val=${'$as_ac_Header'}
9368                  $as_echo "$as_val"'`
9369                { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
9370 $as_echo "$ac_res" >&6; }
9371 else
9372   # Is the header compilable?
9373 { $as_echo "$as_me:$LINENO: checking $ac_header usability" >&5
9374 $as_echo_n "checking $ac_header usability... " >&6; }
9375 cat >conftest.$ac_ext <<_ACEOF
9376 /* confdefs.h.  */
9377 _ACEOF
9378 cat confdefs.h >>conftest.$ac_ext
9379 cat >>conftest.$ac_ext <<_ACEOF
9380 /* end confdefs.h.  */
9381 $ac_includes_default
9382 #include <$ac_header>
9383 _ACEOF
9384 rm -rf conftest.$ac_objext
9385 if { (ac_try="$ac_compile"
9386 case "(($ac_try" in
9387   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9388   *) ac_try_echo=$ac_try;;
9389 esac
9390 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
9391 $as_echo "$ac_try_echo") >&5
9392   (eval "$ac_compile") 2>conftest.er1
9393   ac_status=$?
9394   grep -v '^ *+' conftest.er1 >conftest.err
9395   rm -rf conftest.er1
9396   cat conftest.err >&5
9397   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
9398   (exit $ac_status); } && {
9399          test -z "$ac_c_werror_flag" ||
9400          test ! -s conftest.err
9401        } && test -s conftest.$ac_objext; then
9402   ac_header_compiler=yes
9403 else
9404   $as_echo "$as_me: failed program was:" >&5
9405 sed 's/^/| /' conftest.$ac_ext >&5
9406
9407         ac_header_compiler=no
9408 fi
9409
9410 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9411 { $as_echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
9412 $as_echo "$ac_header_compiler" >&6; }
9413
9414 # Is the header present?
9415 { $as_echo "$as_me:$LINENO: checking $ac_header presence" >&5
9416 $as_echo_n "checking $ac_header presence... " >&6; }
9417 cat >conftest.$ac_ext <<_ACEOF
9418 /* confdefs.h.  */
9419 _ACEOF
9420 cat confdefs.h >>conftest.$ac_ext
9421 cat >>conftest.$ac_ext <<_ACEOF
9422 /* end confdefs.h.  */
9423 #include <$ac_header>
9424 _ACEOF
9425 if { (ac_try="$ac_cpp conftest.$ac_ext"
9426 case "(($ac_try" in
9427   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9428   *) ac_try_echo=$ac_try;;
9429 esac
9430 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
9431 $as_echo "$ac_try_echo") >&5
9432   (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
9433   ac_status=$?
9434   grep -v '^ *+' conftest.er1 >conftest.err
9435   rm -rf conftest.er1
9436   cat conftest.err >&5
9437   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
9438   (exit $ac_status); } >/dev/null && {
9439          test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
9440          test ! -s conftest.err
9441        }; then
9442   ac_header_preproc=yes
9443 else
9444   $as_echo "$as_me: failed program was:" >&5
9445 sed 's/^/| /' conftest.$ac_ext >&5
9446
9447   ac_header_preproc=no
9448 fi
9449
9450 rm -rf conftest.err conftest.$ac_ext
9451 { $as_echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
9452 $as_echo "$ac_header_preproc" >&6; }
9453
9454 # So?  What about this header?
9455 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
9456   yes:no: )
9457     { $as_echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
9458 $as_echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
9459     { $as_echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
9460 $as_echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
9461     ac_header_preproc=yes
9462     ;;
9463   no:yes:* )
9464     { $as_echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
9465 $as_echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
9466     { $as_echo "$as_me:$LINENO: WARNING: $ac_header:     check for missing prerequisite headers?" >&5
9467 $as_echo "$as_me: WARNING: $ac_header:     check for missing prerequisite headers?" >&2;}
9468     { $as_echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
9469 $as_echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
9470     { $as_echo "$as_me:$LINENO: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&5
9471 $as_echo "$as_me: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&2;}
9472     { $as_echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
9473 $as_echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
9474     { $as_echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
9475 $as_echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
9476
9477     ;;
9478 esac
9479 { $as_echo "$as_me:$LINENO: checking for $ac_header" >&5
9480 $as_echo_n "checking for $ac_header... " >&6; }
9481 if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
9482   $as_echo_n "(cached) " >&6
9483 else
9484   eval "$as_ac_Header=\$ac_header_preproc"
9485 fi
9486 ac_res=`eval 'as_val=${'$as_ac_Header'}
9487                  $as_echo "$as_val"'`
9488                { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
9489 $as_echo "$ac_res" >&6; }
9490
9491 fi
9492 as_val=`eval 'as_val=${'$as_ac_Header'}
9493                  $as_echo "$as_val"'`
9494    if test "x$as_val" = x""yes; then
9495   cat >>confdefs.h <<_ACEOF
9496 #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
9497 _ACEOF
9498
9499 fi
9500
9501 done
9502
9503
9504
9505
9506
9507
9508
9509
9510
9511
9512
9513
9514 for ac_func in getcwd munmap putenv setenv setlocale strchr strcasecmp \
9515 strdup __argz_count __argz_stringify __argz_next
9516 do
9517 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
9518 { $as_echo "$as_me:$LINENO: checking for $ac_func" >&5
9519 $as_echo_n "checking for $ac_func... " >&6; }
9520 if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
9521   $as_echo_n "(cached) " >&6
9522 else
9523   cat >conftest.$ac_ext <<_ACEOF
9524 /* confdefs.h.  */
9525 _ACEOF
9526 cat confdefs.h >>conftest.$ac_ext
9527 cat >>conftest.$ac_ext <<_ACEOF
9528 /* end confdefs.h.  */
9529 /* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
9530    For example, HP-UX 11i <limits.h> declares gettimeofday.  */
9531 #define $ac_func innocuous_$ac_func
9532
9533 /* System header to define __stub macros and hopefully few prototypes,
9534     which can conflict with char $ac_func (); below.
9535     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
9536     <limits.h> exists even on freestanding compilers.  */
9537
9538 #ifdef __STDC__
9539 # include <limits.h>
9540 #else
9541 # include <assert.h>
9542 #endif
9543
9544 #undef $ac_func
9545
9546 /* Override any GCC internal prototype to avoid an error.
9547    Use char because int might match the return type of a GCC
9548    builtin and then its argument prototype would still apply.  */
9549 #ifdef __cplusplus
9550 extern "C"
9551 #endif
9552 char $ac_func ();
9553 /* The GNU C library defines this for functions which it implements
9554     to always fail with ENOSYS.  Some functions are actually named
9555     something starting with __ and the normal name is an alias.  */
9556 #if defined __stub_$ac_func || defined __stub___$ac_func
9557 choke me
9558 #endif
9559
9560 int
9561 main ()
9562 {
9563 return $ac_func ();
9564   ;
9565   return 0;
9566 }
9567 _ACEOF
9568 rm -rf conftest.$ac_objext conftest$ac_exeext
9569 if { (ac_try="$ac_link"
9570 case "(($ac_try" in
9571   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9572   *) ac_try_echo=$ac_try;;
9573 esac
9574 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
9575 $as_echo "$ac_try_echo") >&5
9576   (eval "$ac_link") 2>conftest.er1
9577   ac_status=$?
9578   grep -v '^ *+' conftest.er1 >conftest.err
9579   rm -rf conftest.er1
9580   cat conftest.err >&5
9581   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
9582   (exit $ac_status); } && {
9583          test -z "$ac_c_werror_flag" ||
9584          test ! -s conftest.err
9585        } && test -s conftest$ac_exeext && {
9586          test "$cross_compiling" = yes ||
9587          $as_test_x conftest$ac_exeext
9588        }; then
9589   eval "$as_ac_var=yes"
9590 else
9591   $as_echo "$as_me: failed program was:" >&5
9592 sed 's/^/| /' conftest.$ac_ext >&5
9593
9594         eval "$as_ac_var=no"
9595 fi
9596
9597 rm -rf conftest.dSYM
9598 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
9599       conftest$ac_exeext conftest.$ac_ext
9600 fi
9601 ac_res=`eval 'as_val=${'$as_ac_var'}
9602                  $as_echo "$as_val"'`
9603                { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
9604 $as_echo "$ac_res" >&6; }
9605 as_val=`eval 'as_val=${'$as_ac_var'}
9606                  $as_echo "$as_val"'`
9607    if test "x$as_val" = x""yes; then
9608   cat >>confdefs.h <<_ACEOF
9609 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
9610 _ACEOF
9611
9612 fi
9613 done
9614
9615
9616    if test $ac_cv_header_locale_h = yes; then
9617     { $as_echo "$as_me:$LINENO: checking for LC_MESSAGES" >&5
9618 $as_echo_n "checking for LC_MESSAGES... " >&6; }
9619 if test "${am_cv_val_LC_MESSAGES+set}" = set; then
9620   $as_echo_n "(cached) " >&6
9621 else
9622   cat >conftest.$ac_ext <<_ACEOF
9623 /* confdefs.h.  */
9624 _ACEOF
9625 cat confdefs.h >>conftest.$ac_ext
9626 cat >>conftest.$ac_ext <<_ACEOF
9627 /* end confdefs.h.  */
9628 #include <locale.h>
9629 int
9630 main ()
9631 {
9632 return LC_MESSAGES
9633   ;
9634   return 0;
9635 }
9636 _ACEOF
9637 rm -rf conftest.$ac_objext conftest$ac_exeext
9638 if { (ac_try="$ac_link"
9639 case "(($ac_try" in
9640   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9641   *) ac_try_echo=$ac_try;;
9642 esac
9643 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
9644 $as_echo "$ac_try_echo") >&5
9645   (eval "$ac_link") 2>conftest.er1
9646   ac_status=$?
9647   grep -v '^ *+' conftest.er1 >conftest.err
9648   rm -rf conftest.er1
9649   cat conftest.err >&5
9650   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
9651   (exit $ac_status); } && {
9652          test -z "$ac_c_werror_flag" ||
9653          test ! -s conftest.err
9654        } && test -s conftest$ac_exeext && {
9655          test "$cross_compiling" = yes ||
9656          $as_test_x conftest$ac_exeext
9657        }; then
9658   am_cv_val_LC_MESSAGES=yes
9659 else
9660   $as_echo "$as_me: failed program was:" >&5
9661 sed 's/^/| /' conftest.$ac_ext >&5
9662
9663         am_cv_val_LC_MESSAGES=no
9664 fi
9665
9666 rm -rf conftest.dSYM
9667 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
9668       conftest$ac_exeext conftest.$ac_ext
9669 fi
9670 { $as_echo "$as_me:$LINENO: result: $am_cv_val_LC_MESSAGES" >&5
9671 $as_echo "$am_cv_val_LC_MESSAGES" >&6; }
9672     if test $am_cv_val_LC_MESSAGES = yes; then
9673
9674 cat >>confdefs.h <<\_ACEOF
9675 #define HAVE_LC_MESSAGES 1
9676 _ACEOF
9677
9678     fi
9679   fi
9680      USE_NLS=yes
9681
9682
9683         nls_cv_force_use_gnu_gettext="no"
9684
9685     nls_cv_use_gnu_gettext="$nls_cv_force_use_gnu_gettext"
9686     if test "$nls_cv_force_use_gnu_gettext" != "yes"; then
9687                               nls_cv_header_intl=
9688       nls_cv_header_libgt=
9689       CATOBJEXT=NONE
9690
9691       if test "${ac_cv_header_libintl_h+set}" = set; then
9692   { $as_echo "$as_me:$LINENO: checking for libintl.h" >&5
9693 $as_echo_n "checking for libintl.h... " >&6; }
9694 if test "${ac_cv_header_libintl_h+set}" = set; then
9695   $as_echo_n "(cached) " >&6
9696 fi
9697 { $as_echo "$as_me:$LINENO: result: $ac_cv_header_libintl_h" >&5
9698 $as_echo "$ac_cv_header_libintl_h" >&6; }
9699 else
9700   # Is the header compilable?
9701 { $as_echo "$as_me:$LINENO: checking libintl.h usability" >&5
9702 $as_echo_n "checking libintl.h usability... " >&6; }
9703 cat >conftest.$ac_ext <<_ACEOF
9704 /* confdefs.h.  */
9705 _ACEOF
9706 cat confdefs.h >>conftest.$ac_ext
9707 cat >>conftest.$ac_ext <<_ACEOF
9708 /* end confdefs.h.  */
9709 $ac_includes_default
9710 #include <libintl.h>
9711 _ACEOF
9712 rm -rf conftest.$ac_objext
9713 if { (ac_try="$ac_compile"
9714 case "(($ac_try" in
9715   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9716   *) ac_try_echo=$ac_try;;
9717 esac
9718 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
9719 $as_echo "$ac_try_echo") >&5
9720   (eval "$ac_compile") 2>conftest.er1
9721   ac_status=$?
9722   grep -v '^ *+' conftest.er1 >conftest.err
9723   rm -rf conftest.er1
9724   cat conftest.err >&5
9725   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
9726   (exit $ac_status); } && {
9727          test -z "$ac_c_werror_flag" ||
9728          test ! -s conftest.err
9729        } && test -s conftest.$ac_objext; then
9730   ac_header_compiler=yes
9731 else
9732   $as_echo "$as_me: failed program was:" >&5
9733 sed 's/^/| /' conftest.$ac_ext >&5
9734
9735         ac_header_compiler=no
9736 fi
9737
9738 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9739 { $as_echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
9740 $as_echo "$ac_header_compiler" >&6; }
9741
9742 # Is the header present?
9743 { $as_echo "$as_me:$LINENO: checking libintl.h presence" >&5
9744 $as_echo_n "checking libintl.h presence... " >&6; }
9745 cat >conftest.$ac_ext <<_ACEOF
9746 /* confdefs.h.  */
9747 _ACEOF
9748 cat confdefs.h >>conftest.$ac_ext
9749 cat >>conftest.$ac_ext <<_ACEOF
9750 /* end confdefs.h.  */
9751 #include <libintl.h>
9752 _ACEOF
9753 if { (ac_try="$ac_cpp conftest.$ac_ext"
9754 case "(($ac_try" in
9755   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9756   *) ac_try_echo=$ac_try;;
9757 esac
9758 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
9759 $as_echo "$ac_try_echo") >&5
9760   (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
9761   ac_status=$?
9762   grep -v '^ *+' conftest.er1 >conftest.err
9763   rm -rf conftest.er1
9764   cat conftest.err >&5
9765   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
9766   (exit $ac_status); } >/dev/null && {
9767          test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
9768          test ! -s conftest.err
9769        }; then
9770   ac_header_preproc=yes
9771 else
9772   $as_echo "$as_me: failed program was:" >&5
9773 sed 's/^/| /' conftest.$ac_ext >&5
9774
9775   ac_header_preproc=no
9776 fi
9777
9778 rm -rf conftest.err conftest.$ac_ext
9779 { $as_echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
9780 $as_echo "$ac_header_preproc" >&6; }
9781
9782 # So?  What about this header?
9783 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
9784   yes:no: )
9785     { $as_echo "$as_me:$LINENO: WARNING: libintl.h: accepted by the compiler, rejected by the preprocessor!" >&5
9786 $as_echo "$as_me: WARNING: libintl.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
9787     { $as_echo "$as_me:$LINENO: WARNING: libintl.h: proceeding with the compiler's result" >&5
9788 $as_echo "$as_me: WARNING: libintl.h: proceeding with the compiler's result" >&2;}
9789     ac_header_preproc=yes
9790     ;;
9791   no:yes:* )
9792     { $as_echo "$as_me:$LINENO: WARNING: libintl.h: present but cannot be compiled" >&5
9793 $as_echo "$as_me: WARNING: libintl.h: present but cannot be compiled" >&2;}
9794     { $as_echo "$as_me:$LINENO: WARNING: libintl.h:     check for missing prerequisite headers?" >&5
9795 $as_echo "$as_me: WARNING: libintl.h:     check for missing prerequisite headers?" >&2;}
9796     { $as_echo "$as_me:$LINENO: WARNING: libintl.h: see the Autoconf documentation" >&5
9797 $as_echo "$as_me: WARNING: libintl.h: see the Autoconf documentation" >&2;}
9798     { $as_echo "$as_me:$LINENO: WARNING: libintl.h:     section \"Present But Cannot Be Compiled\"" >&5
9799 $as_echo "$as_me: WARNING: libintl.h:     section \"Present But Cannot Be Compiled\"" >&2;}
9800     { $as_echo "$as_me:$LINENO: WARNING: libintl.h: proceeding with the preprocessor's result" >&5
9801 $as_echo "$as_me: WARNING: libintl.h: proceeding with the preprocessor's result" >&2;}
9802     { $as_echo "$as_me:$LINENO: WARNING: libintl.h: in the future, the compiler will take precedence" >&5
9803 $as_echo "$as_me: WARNING: libintl.h: in the future, the compiler will take precedence" >&2;}
9804
9805     ;;
9806 esac
9807 { $as_echo "$as_me:$LINENO: checking for libintl.h" >&5
9808 $as_echo_n "checking for libintl.h... " >&6; }
9809 if test "${ac_cv_header_libintl_h+set}" = set; then
9810   $as_echo_n "(cached) " >&6
9811 else
9812   ac_cv_header_libintl_h=$ac_header_preproc
9813 fi
9814 { $as_echo "$as_me:$LINENO: result: $ac_cv_header_libintl_h" >&5
9815 $as_echo "$ac_cv_header_libintl_h" >&6; }
9816
9817 fi
9818 if test "x$ac_cv_header_libintl_h" = x""yes; then
9819   { $as_echo "$as_me:$LINENO: checking for dgettext in libc" >&5
9820 $as_echo_n "checking for dgettext in libc... " >&6; }
9821 if test "${gt_cv_func_dgettext_libc+set}" = set; then
9822   $as_echo_n "(cached) " >&6
9823 else
9824   cat >conftest.$ac_ext <<_ACEOF
9825 /* confdefs.h.  */
9826 _ACEOF
9827 cat confdefs.h >>conftest.$ac_ext
9828 cat >>conftest.$ac_ext <<_ACEOF
9829 /* end confdefs.h.  */
9830 #include <libintl.h>
9831 int
9832 main ()
9833 {
9834 return (int) dgettext ("","")
9835   ;
9836   return 0;
9837 }
9838 _ACEOF
9839 rm -rf conftest.$ac_objext conftest$ac_exeext
9840 if { (ac_try="$ac_link"
9841 case "(($ac_try" in
9842   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9843   *) ac_try_echo=$ac_try;;
9844 esac
9845 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
9846 $as_echo "$ac_try_echo") >&5
9847   (eval "$ac_link") 2>conftest.er1
9848   ac_status=$?
9849   grep -v '^ *+' conftest.er1 >conftest.err
9850   rm -rf conftest.er1
9851   cat conftest.err >&5
9852   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
9853   (exit $ac_status); } && {
9854          test -z "$ac_c_werror_flag" ||
9855          test ! -s conftest.err
9856        } && test -s conftest$ac_exeext && {
9857          test "$cross_compiling" = yes ||
9858          $as_test_x conftest$ac_exeext
9859        }; then
9860   gt_cv_func_dgettext_libc=yes
9861 else
9862   $as_echo "$as_me: failed program was:" >&5
9863 sed 's/^/| /' conftest.$ac_ext >&5
9864
9865         gt_cv_func_dgettext_libc=no
9866 fi
9867
9868 rm -rf conftest.dSYM
9869 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
9870       conftest$ac_exeext conftest.$ac_ext
9871 fi
9872 { $as_echo "$as_me:$LINENO: result: $gt_cv_func_dgettext_libc" >&5
9873 $as_echo "$gt_cv_func_dgettext_libc" >&6; }
9874
9875           if test "$gt_cv_func_dgettext_libc" != "yes"; then
9876             { $as_echo "$as_me:$LINENO: checking for bindtextdomain in -lintl" >&5
9877 $as_echo_n "checking for bindtextdomain in -lintl... " >&6; }
9878 if test "${ac_cv_lib_intl_bindtextdomain+set}" = set; then
9879   $as_echo_n "(cached) " >&6
9880 else
9881   ac_check_lib_save_LIBS=$LIBS
9882 LIBS="-lintl  $LIBS"
9883 cat >conftest.$ac_ext <<_ACEOF
9884 /* confdefs.h.  */
9885 _ACEOF
9886 cat confdefs.h >>conftest.$ac_ext
9887 cat >>conftest.$ac_ext <<_ACEOF
9888 /* end confdefs.h.  */
9889
9890 /* Override any GCC internal prototype to avoid an error.
9891    Use char because int might match the return type of a GCC
9892    builtin and then its argument prototype would still apply.  */
9893 #ifdef __cplusplus
9894 extern "C"
9895 #endif
9896 char bindtextdomain ();
9897 int
9898 main ()
9899 {
9900 return bindtextdomain ();
9901   ;
9902   return 0;
9903 }
9904 _ACEOF
9905 rm -rf conftest.$ac_objext conftest$ac_exeext
9906 if { (ac_try="$ac_link"
9907 case "(($ac_try" in
9908   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9909   *) ac_try_echo=$ac_try;;
9910 esac
9911 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
9912 $as_echo "$ac_try_echo") >&5
9913   (eval "$ac_link") 2>conftest.er1
9914   ac_status=$?
9915   grep -v '^ *+' conftest.er1 >conftest.err
9916   rm -rf conftest.er1
9917   cat conftest.err >&5
9918   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
9919   (exit $ac_status); } && {
9920          test -z "$ac_c_werror_flag" ||
9921          test ! -s conftest.err
9922        } && test -s conftest$ac_exeext && {
9923          test "$cross_compiling" = yes ||
9924          $as_test_x conftest$ac_exeext
9925        }; then
9926   ac_cv_lib_intl_bindtextdomain=yes
9927 else
9928   $as_echo "$as_me: failed program was:" >&5
9929 sed 's/^/| /' conftest.$ac_ext >&5
9930
9931         ac_cv_lib_intl_bindtextdomain=no
9932 fi
9933
9934 rm -rf conftest.dSYM
9935 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
9936       conftest$ac_exeext conftest.$ac_ext
9937 LIBS=$ac_check_lib_save_LIBS
9938 fi
9939 { $as_echo "$as_me:$LINENO: result: $ac_cv_lib_intl_bindtextdomain" >&5
9940 $as_echo "$ac_cv_lib_intl_bindtextdomain" >&6; }
9941 if test "x$ac_cv_lib_intl_bindtextdomain" = x""yes; then
9942   { $as_echo "$as_me:$LINENO: checking for dgettext in libintl" >&5
9943 $as_echo_n "checking for dgettext in libintl... " >&6; }
9944 if test "${gt_cv_func_dgettext_libintl+set}" = set; then
9945   $as_echo_n "(cached) " >&6
9946 else
9947   { $as_echo "$as_me:$LINENO: checking for dgettext in -lintl" >&5
9948 $as_echo_n "checking for dgettext in -lintl... " >&6; }
9949 if test "${ac_cv_lib_intl_dgettext+set}" = set; then
9950   $as_echo_n "(cached) " >&6
9951 else
9952   ac_check_lib_save_LIBS=$LIBS
9953 LIBS="-lintl  $LIBS"
9954 cat >conftest.$ac_ext <<_ACEOF
9955 /* confdefs.h.  */
9956 _ACEOF
9957 cat confdefs.h >>conftest.$ac_ext
9958 cat >>conftest.$ac_ext <<_ACEOF
9959 /* end confdefs.h.  */
9960
9961 /* Override any GCC internal prototype to avoid an error.
9962    Use char because int might match the return type of a GCC
9963    builtin and then its argument prototype would still apply.  */
9964 #ifdef __cplusplus
9965 extern "C"
9966 #endif
9967 char dgettext ();
9968 int
9969 main ()
9970 {
9971 return dgettext ();
9972   ;
9973   return 0;
9974 }
9975 _ACEOF
9976 rm -rf conftest.$ac_objext conftest$ac_exeext
9977 if { (ac_try="$ac_link"
9978 case "(($ac_try" in
9979   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9980   *) ac_try_echo=$ac_try;;
9981 esac
9982 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
9983 $as_echo "$ac_try_echo") >&5
9984   (eval "$ac_link") 2>conftest.er1
9985   ac_status=$?
9986   grep -v '^ *+' conftest.er1 >conftest.err
9987   rm -rf conftest.er1
9988   cat conftest.err >&5
9989   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
9990   (exit $ac_status); } && {
9991          test -z "$ac_c_werror_flag" ||
9992          test ! -s conftest.err
9993        } && test -s conftest$ac_exeext && {
9994          test "$cross_compiling" = yes ||
9995          $as_test_x conftest$ac_exeext
9996        }; then
9997   ac_cv_lib_intl_dgettext=yes
9998 else
9999   $as_echo "$as_me: failed program was:" >&5
10000 sed 's/^/| /' conftest.$ac_ext >&5
10001
10002         ac_cv_lib_intl_dgettext=no
10003 fi
10004
10005 rm -rf conftest.dSYM
10006 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
10007       conftest$ac_exeext conftest.$ac_ext
10008 LIBS=$ac_check_lib_save_LIBS
10009 fi
10010 { $as_echo "$as_me:$LINENO: result: $ac_cv_lib_intl_dgettext" >&5
10011 $as_echo "$ac_cv_lib_intl_dgettext" >&6; }
10012 if test "x$ac_cv_lib_intl_dgettext" = x""yes; then
10013   gt_cv_func_dgettext_libintl=yes
10014 else
10015   gt_cv_func_dgettext_libintl=no
10016 fi
10017
10018 fi
10019 { $as_echo "$as_me:$LINENO: result: $gt_cv_func_dgettext_libintl" >&5
10020 $as_echo "$gt_cv_func_dgettext_libintl" >&6; }
10021 fi
10022
10023           fi
10024
10025           if test "$gt_cv_func_dgettext_libintl" = "yes"; then
10026             LIBS="$LIBS -lintl";
10027           fi
10028
10029           if test "$gt_cv_func_dgettext_libc" = "yes" \
10030             || test "$gt_cv_func_dgettext_libintl" = "yes"; then
10031
10032 cat >>confdefs.h <<\_ACEOF
10033 #define HAVE_GETTEXT 1
10034 _ACEOF
10035
10036             # Extract the first word of "msgfmt", so it can be a program name with args.
10037 set dummy msgfmt; ac_word=$2
10038 { $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
10039 $as_echo_n "checking for $ac_word... " >&6; }
10040 if test "${ac_cv_path_MSGFMT+set}" = set; then
10041   $as_echo_n "(cached) " >&6
10042 else
10043   case "$MSGFMT" in
10044   /*)
10045   ac_cv_path_MSGFMT="$MSGFMT" # Let the user override the test with a path.
10046   ;;
10047   *)
10048   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
10049   for ac_dir in $PATH; do
10050     test -z "$ac_dir" && ac_dir=.
10051     if test -f $ac_dir/$ac_word; then
10052       if test -z "`$ac_dir/$ac_word -h 2>&1 | grep 'dv '`"; then
10053         ac_cv_path_MSGFMT="$ac_dir/$ac_word"
10054         break
10055       fi
10056     fi
10057   done
10058   IFS="$ac_save_ifs"
10059   test -z "$ac_cv_path_MSGFMT" && ac_cv_path_MSGFMT="no"
10060   ;;
10061 esac
10062 fi
10063 MSGFMT="$ac_cv_path_MSGFMT"
10064 if test -n "$MSGFMT"; then
10065   { $as_echo "$as_me:$LINENO: result: $MSGFMT" >&5
10066 $as_echo "$MSGFMT" >&6; }
10067 else
10068   { $as_echo "$as_me:$LINENO: result: no" >&5
10069 $as_echo "no" >&6; }
10070 fi
10071             if test "$MSGFMT" != "no"; then
10072
10073 for ac_func in dcgettext
10074 do
10075 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
10076 { $as_echo "$as_me:$LINENO: checking for $ac_func" >&5
10077 $as_echo_n "checking for $ac_func... " >&6; }
10078 if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
10079   $as_echo_n "(cached) " >&6
10080 else
10081   cat >conftest.$ac_ext <<_ACEOF
10082 /* confdefs.h.  */
10083 _ACEOF
10084 cat confdefs.h >>conftest.$ac_ext
10085 cat >>conftest.$ac_ext <<_ACEOF
10086 /* end confdefs.h.  */
10087 /* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
10088    For example, HP-UX 11i <limits.h> declares gettimeofday.  */
10089 #define $ac_func innocuous_$ac_func
10090
10091 /* System header to define __stub macros and hopefully few prototypes,
10092     which can conflict with char $ac_func (); below.
10093     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
10094     <limits.h> exists even on freestanding compilers.  */
10095
10096 #ifdef __STDC__
10097 # include <limits.h>
10098 #else
10099 # include <assert.h>
10100 #endif
10101
10102 #undef $ac_func
10103
10104 /* Override any GCC internal prototype to avoid an error.
10105    Use char because int might match the return type of a GCC
10106    builtin and then its argument prototype would still apply.  */
10107 #ifdef __cplusplus
10108 extern "C"
10109 #endif
10110 char $ac_func ();
10111 /* The GNU C library defines this for functions which it implements
10112     to always fail with ENOSYS.  Some functions are actually named
10113     something starting with __ and the normal name is an alias.  */
10114 #if defined __stub_$ac_func || defined __stub___$ac_func
10115 choke me
10116 #endif
10117
10118 int
10119 main ()
10120 {
10121 return $ac_func ();
10122   ;
10123   return 0;
10124 }
10125 _ACEOF
10126 rm -rf conftest.$ac_objext conftest$ac_exeext
10127 if { (ac_try="$ac_link"
10128 case "(($ac_try" in
10129   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10130   *) ac_try_echo=$ac_try;;
10131 esac
10132 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
10133 $as_echo "$ac_try_echo") >&5
10134   (eval "$ac_link") 2>conftest.er1
10135   ac_status=$?
10136   grep -v '^ *+' conftest.er1 >conftest.err
10137   rm -rf conftest.er1
10138   cat conftest.err >&5
10139   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
10140   (exit $ac_status); } && {
10141          test -z "$ac_c_werror_flag" ||
10142          test ! -s conftest.err
10143        } && test -s conftest$ac_exeext && {
10144          test "$cross_compiling" = yes ||
10145          $as_test_x conftest$ac_exeext
10146        }; then
10147   eval "$as_ac_var=yes"
10148 else
10149   $as_echo "$as_me: failed program was:" >&5
10150 sed 's/^/| /' conftest.$ac_ext >&5
10151
10152         eval "$as_ac_var=no"
10153 fi
10154
10155 rm -rf conftest.dSYM
10156 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
10157       conftest$ac_exeext conftest.$ac_ext
10158 fi
10159 ac_res=`eval 'as_val=${'$as_ac_var'}
10160                  $as_echo "$as_val"'`
10161                { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
10162 $as_echo "$ac_res" >&6; }
10163 as_val=`eval 'as_val=${'$as_ac_var'}
10164                  $as_echo "$as_val"'`
10165    if test "x$as_val" = x""yes; then
10166   cat >>confdefs.h <<_ACEOF
10167 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
10168 _ACEOF
10169
10170 fi
10171 done
10172
10173               # Extract the first word of "gmsgfmt", so it can be a program name with args.
10174 set dummy gmsgfmt; ac_word=$2
10175 { $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
10176 $as_echo_n "checking for $ac_word... " >&6; }
10177 if test "${ac_cv_path_GMSGFMT+set}" = set; then
10178   $as_echo_n "(cached) " >&6
10179 else
10180   case $GMSGFMT in
10181   [\\/]* | ?:[\\/]*)
10182   ac_cv_path_GMSGFMT="$GMSGFMT" # Let the user override the test with a path.
10183   ;;
10184   *)
10185   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10186 for as_dir in $PATH
10187 do
10188   IFS=$as_save_IFS
10189   test -z "$as_dir" && as_dir=.
10190   for ac_exec_ext in '' $ac_executable_extensions; do
10191   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
10192     ac_cv_path_GMSGFMT="$as_dir/$ac_word$ac_exec_ext"
10193     $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
10194     break 2
10195   fi
10196 done
10197 done
10198 IFS=$as_save_IFS
10199
10200   test -z "$ac_cv_path_GMSGFMT" && ac_cv_path_GMSGFMT="$MSGFMT"
10201   ;;
10202 esac
10203 fi
10204 GMSGFMT=$ac_cv_path_GMSGFMT
10205 if test -n "$GMSGFMT"; then
10206   { $as_echo "$as_me:$LINENO: result: $GMSGFMT" >&5
10207 $as_echo "$GMSGFMT" >&6; }
10208 else
10209   { $as_echo "$as_me:$LINENO: result: no" >&5
10210 $as_echo "no" >&6; }
10211 fi
10212
10213
10214               # Extract the first word of "xgettext", so it can be a program name with args.
10215 set dummy xgettext; ac_word=$2
10216 { $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
10217 $as_echo_n "checking for $ac_word... " >&6; }
10218 if test "${ac_cv_path_XGETTEXT+set}" = set; then
10219   $as_echo_n "(cached) " >&6
10220 else
10221   case "$XGETTEXT" in
10222   /*)
10223   ac_cv_path_XGETTEXT="$XGETTEXT" # Let the user override the test with a path.
10224   ;;
10225   *)
10226   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
10227   for ac_dir in $PATH; do
10228     test -z "$ac_dir" && ac_dir=.
10229     if test -f $ac_dir/$ac_word; then
10230       if test -z "`$ac_dir/$ac_word -h 2>&1 | grep '(HELP)'`"; then
10231         ac_cv_path_XGETTEXT="$ac_dir/$ac_word"
10232         break
10233       fi
10234     fi
10235   done
10236   IFS="$ac_save_ifs"
10237   test -z "$ac_cv_path_XGETTEXT" && ac_cv_path_XGETTEXT=":"
10238   ;;
10239 esac
10240 fi
10241 XGETTEXT="$ac_cv_path_XGETTEXT"
10242 if test -n "$XGETTEXT"; then
10243   { $as_echo "$as_me:$LINENO: result: $XGETTEXT" >&5
10244 $as_echo "$XGETTEXT" >&6; }
10245 else
10246   { $as_echo "$as_me:$LINENO: result: no" >&5
10247 $as_echo "no" >&6; }
10248 fi
10249
10250               cat >conftest.$ac_ext <<_ACEOF
10251 /* confdefs.h.  */
10252 _ACEOF
10253 cat confdefs.h >>conftest.$ac_ext
10254 cat >>conftest.$ac_ext <<_ACEOF
10255 /* end confdefs.h.  */
10256
10257 int
10258 main ()
10259 {
10260 extern int _nl_msg_cat_cntr;
10261                              return _nl_msg_cat_cntr
10262   ;
10263   return 0;
10264 }
10265 _ACEOF
10266 rm -rf conftest.$ac_objext conftest$ac_exeext
10267 if { (ac_try="$ac_link"
10268 case "(($ac_try" in
10269   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10270   *) ac_try_echo=$ac_try;;
10271 esac
10272 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
10273 $as_echo "$ac_try_echo") >&5
10274   (eval "$ac_link") 2>conftest.er1
10275   ac_status=$?
10276   grep -v '^ *+' conftest.er1 >conftest.err
10277   rm -rf conftest.er1
10278   cat conftest.err >&5
10279   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
10280   (exit $ac_status); } && {
10281          test -z "$ac_c_werror_flag" ||
10282          test ! -s conftest.err
10283        } && test -s conftest$ac_exeext && {
10284          test "$cross_compiling" = yes ||
10285          $as_test_x conftest$ac_exeext
10286        }; then
10287   CATOBJEXT=.gmo
10288                  DATADIRNAME=share
10289 else
10290   $as_echo "$as_me: failed program was:" >&5
10291 sed 's/^/| /' conftest.$ac_ext >&5
10292
10293         CATOBJEXT=.mo
10294                  DATADIRNAME=lib
10295 fi
10296
10297 rm -rf conftest.dSYM
10298 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
10299       conftest$ac_exeext conftest.$ac_ext
10300               INSTOBJEXT=.mo
10301             fi
10302           fi
10303
10304           # Added by Martin Baulig 12/15/98 for libc5 systems
10305           if test "$gt_cv_func_dgettext_libc" != "yes" \
10306             && test "$gt_cv_func_dgettext_libintl" = "yes"; then
10307             INTLLIBS=-lintl
10308             LIBS=`echo $LIBS | sed -e 's/-lintl//'`
10309           fi
10310
10311 fi
10312
10313
10314
10315       if test "$CATOBJEXT" = "NONE"; then
10316                         nls_cv_use_gnu_gettext=yes
10317       fi
10318     fi
10319
10320     if test "$nls_cv_use_gnu_gettext" != "yes"; then
10321
10322 cat >>confdefs.h <<\_ACEOF
10323 #define ENABLE_NLS 1
10324 _ACEOF
10325
10326     else
10327             CATOBJEXT=
10328     fi
10329
10330         if test "$XGETTEXT" != ":"; then
10331                   if $XGETTEXT --omit-header /dev/null 2> /dev/null; then
10332         : ;
10333       else
10334         { $as_echo "$as_me:$LINENO: result: found xgettext program is not GNU xgettext; ignore it" >&5
10335 $as_echo "found xgettext program is not GNU xgettext; ignore it" >&6; }
10336         XGETTEXT=":"
10337       fi
10338     fi
10339
10340     # We need to process the po/ directory.
10341     POSUB=po
10342
10343     ac_config_commands="$ac_config_commands default-2"
10344
10345
10346                 for lang in $ALL_LINGUAS; do
10347       GMOFILES="$GMOFILES $lang.gmo"
10348       POFILES="$POFILES $lang.po"
10349     done
10350
10351
10352
10353
10354
10355
10356
10357
10358
10359
10360
10361
10362
10363    if test "x$CATOBJEXT" != "x"; then
10364      if test "x$ALL_LINGUAS" = "x"; then
10365        LINGUAS=
10366      else
10367        { $as_echo "$as_me:$LINENO: checking for catalogs to be installed" >&5
10368 $as_echo_n "checking for catalogs to be installed... " >&6; }
10369        NEW_LINGUAS=
10370        for lang in ${LINGUAS=$ALL_LINGUAS}; do
10371          case "$ALL_LINGUAS" in
10372           *$lang*) NEW_LINGUAS="$NEW_LINGUAS $lang" ;;
10373          esac
10374        done
10375        LINGUAS=$NEW_LINGUAS
10376        { $as_echo "$as_me:$LINENO: result: $LINGUAS" >&5
10377 $as_echo "$LINGUAS" >&6; }
10378      fi
10379
10380           if test -n "$LINGUAS"; then
10381        for lang in $LINGUAS; do CATALOGS="$CATALOGS $lang$CATOBJEXT"; done
10382      fi
10383    fi
10384
10385             test -d po || mkdir po
10386    if test "$CATOBJEXT" = ".cat"; then
10387      if test "${ac_cv_header_linux_version_h+set}" = set; then
10388   { $as_echo "$as_me:$LINENO: checking for linux/version.h" >&5
10389 $as_echo_n "checking for linux/version.h... " >&6; }
10390 if test "${ac_cv_header_linux_version_h+set}" = set; then
10391   $as_echo_n "(cached) " >&6
10392 fi
10393 { $as_echo "$as_me:$LINENO: result: $ac_cv_header_linux_version_h" >&5
10394 $as_echo "$ac_cv_header_linux_version_h" >&6; }
10395 else
10396   # Is the header compilable?
10397 { $as_echo "$as_me:$LINENO: checking linux/version.h usability" >&5
10398 $as_echo_n "checking linux/version.h usability... " >&6; }
10399 cat >conftest.$ac_ext <<_ACEOF
10400 /* confdefs.h.  */
10401 _ACEOF
10402 cat confdefs.h >>conftest.$ac_ext
10403 cat >>conftest.$ac_ext <<_ACEOF
10404 /* end confdefs.h.  */
10405 $ac_includes_default
10406 #include <linux/version.h>
10407 _ACEOF
10408 rm -rf conftest.$ac_objext
10409 if { (ac_try="$ac_compile"
10410 case "(($ac_try" in
10411   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10412   *) ac_try_echo=$ac_try;;
10413 esac
10414 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
10415 $as_echo "$ac_try_echo") >&5
10416   (eval "$ac_compile") 2>conftest.er1
10417   ac_status=$?
10418   grep -v '^ *+' conftest.er1 >conftest.err
10419   rm -rf conftest.er1
10420   cat conftest.err >&5
10421   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
10422   (exit $ac_status); } && {
10423          test -z "$ac_c_werror_flag" ||
10424          test ! -s conftest.err
10425        } && test -s conftest.$ac_objext; then
10426   ac_header_compiler=yes
10427 else
10428   $as_echo "$as_me: failed program was:" >&5
10429 sed 's/^/| /' conftest.$ac_ext >&5
10430
10431         ac_header_compiler=no
10432 fi
10433
10434 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10435 { $as_echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
10436 $as_echo "$ac_header_compiler" >&6; }
10437
10438 # Is the header present?
10439 { $as_echo "$as_me:$LINENO: checking linux/version.h presence" >&5
10440 $as_echo_n "checking linux/version.h presence... " >&6; }
10441 cat >conftest.$ac_ext <<_ACEOF
10442 /* confdefs.h.  */
10443 _ACEOF
10444 cat confdefs.h >>conftest.$ac_ext
10445 cat >>conftest.$ac_ext <<_ACEOF
10446 /* end confdefs.h.  */
10447 #include <linux/version.h>
10448 _ACEOF
10449 if { (ac_try="$ac_cpp conftest.$ac_ext"
10450 case "(($ac_try" in
10451   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10452   *) ac_try_echo=$ac_try;;
10453 esac
10454 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
10455 $as_echo "$ac_try_echo") >&5
10456   (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
10457   ac_status=$?
10458   grep -v '^ *+' conftest.er1 >conftest.err
10459   rm -rf conftest.er1
10460   cat conftest.err >&5
10461   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
10462   (exit $ac_status); } >/dev/null && {
10463          test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
10464          test ! -s conftest.err
10465        }; then
10466   ac_header_preproc=yes
10467 else
10468   $as_echo "$as_me: failed program was:" >&5
10469 sed 's/^/| /' conftest.$ac_ext >&5
10470
10471   ac_header_preproc=no
10472 fi
10473
10474 rm -rf conftest.err conftest.$ac_ext
10475 { $as_echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
10476 $as_echo "$ac_header_preproc" >&6; }
10477
10478 # So?  What about this header?
10479 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
10480   yes:no: )
10481     { $as_echo "$as_me:$LINENO: WARNING: linux/version.h: accepted by the compiler, rejected by the preprocessor!" >&5
10482 $as_echo "$as_me: WARNING: linux/version.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
10483     { $as_echo "$as_me:$LINENO: WARNING: linux/version.h: proceeding with the compiler's result" >&5
10484 $as_echo "$as_me: WARNING: linux/version.h: proceeding with the compiler's result" >&2;}
10485     ac_header_preproc=yes
10486     ;;
10487   no:yes:* )
10488     { $as_echo "$as_me:$LINENO: WARNING: linux/version.h: present but cannot be compiled" >&5
10489 $as_echo "$as_me: WARNING: linux/version.h: present but cannot be compiled" >&2;}
10490     { $as_echo "$as_me:$LINENO: WARNING: linux/version.h:     check for missing prerequisite headers?" >&5
10491 $as_echo "$as_me: WARNING: linux/version.h:     check for missing prerequisite headers?" >&2;}
10492     { $as_echo "$as_me:$LINENO: WARNING: linux/version.h: see the Autoconf documentation" >&5
10493 $as_echo "$as_me: WARNING: linux/version.h: see the Autoconf documentation" >&2;}
10494     { $as_echo "$as_me:$LINENO: WARNING: linux/version.h:     section \"Present But Cannot Be Compiled\"" >&5
10495 $as_echo "$as_me: WARNING: linux/version.h:     section \"Present But Cannot Be Compiled\"" >&2;}
10496     { $as_echo "$as_me:$LINENO: WARNING: linux/version.h: proceeding with the preprocessor's result" >&5
10497 $as_echo "$as_me: WARNING: linux/version.h: proceeding with the preprocessor's result" >&2;}
10498     { $as_echo "$as_me:$LINENO: WARNING: linux/version.h: in the future, the compiler will take precedence" >&5
10499 $as_echo "$as_me: WARNING: linux/version.h: in the future, the compiler will take precedence" >&2;}
10500
10501     ;;
10502 esac
10503 { $as_echo "$as_me:$LINENO: checking for linux/version.h" >&5
10504 $as_echo_n "checking for linux/version.h... " >&6; }
10505 if test "${ac_cv_header_linux_version_h+set}" = set; then
10506   $as_echo_n "(cached) " >&6
10507 else
10508   ac_cv_header_linux_version_h=$ac_header_preproc
10509 fi
10510 { $as_echo "$as_me:$LINENO: result: $ac_cv_header_linux_version_h" >&5
10511 $as_echo "$ac_cv_header_linux_version_h" >&6; }
10512
10513 fi
10514 if test "x$ac_cv_header_linux_version_h" = x""yes; then
10515   msgformat=linux
10516 else
10517   msgformat=xopen
10518 fi
10519
10520
10521
10522                sed -e '/^#/d' $srcdir/po/$msgformat-msg.sed > po/po2msg.sed
10523    fi
10524
10525             MKINSTALLDIRS=
10526 #
10527 # jwz: fuck this!  it puts hardcoded pathnames into the generated Makefiles!
10528 #
10529 #   if test -n "$ac_aux_dir"; then
10530 #     MKINSTALLDIRS="$ac_aux_dir/mkinstalldirs"
10531 #   fi
10532    if test -z "$MKINSTALLDIRS"; then
10533      MKINSTALLDIRS="\$(top_srcdir)/mkinstalldirs"
10534    fi
10535
10536    # jwz: you know what, screw it.  Let's just use the version that I
10537    # already computed in configure.in, instead of this version that came
10538    # with the i18n crud, ok?
10539    MKINSTALLDIRS="$INSTALL_DIRS"
10540
10541
10542
10543
10544          test -d po || mkdir po
10545    if test "x$srcdir" != "x."; then
10546      if test "x`echo $srcdir | sed 's@/.*@@'`" = "x"; then
10547        posrcprefix="$srcdir/"
10548      else
10549        posrcprefix="../$srcdir/"
10550      fi
10551    else
10552      posrcprefix="../"
10553    fi
10554    rm -f po/POTFILES
10555    sed -e "/^#/d" -e "/^\$/d" -e "s,.*, $posrcprefix& \\\\," -e "\$s/\(.*\) \\\\/\1/" \
10556         < $srcdir/po/POTFILES.in > po/POTFILES
10557
10558 MKINSTALLDIRS="$INSTALL_DIRS"
10559
10560
10561 ###############################################################################
10562 #
10563 #       Check for -lXmu (some fucked up vendors don't ship it...)
10564 #
10565 ###############################################################################
10566
10567 have_xmu=no
10568
10569   ac_save_CPPFLAGS="$CPPFLAGS"
10570   if test \! -z "$includedir" ; then
10571     CPPFLAGS="$CPPFLAGS -I$includedir"
10572   fi
10573   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
10574   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
10575   { $as_echo "$as_me:$LINENO: checking for X11/Xmu/Error.h" >&5
10576 $as_echo_n "checking for X11/Xmu/Error.h... " >&6; }
10577 if test "${ac_cv_header_X11_Xmu_Error_h+set}" = set; then
10578   $as_echo_n "(cached) " >&6
10579 else
10580   cat >conftest.$ac_ext <<_ACEOF
10581 /* confdefs.h.  */
10582 _ACEOF
10583 cat confdefs.h >>conftest.$ac_ext
10584 cat >>conftest.$ac_ext <<_ACEOF
10585 /* end confdefs.h.  */
10586 #include <stdlib.h>
10587                    #include <stdio.h>
10588                    #include <X11/Intrinsic.h>
10589
10590 #include <X11/Xmu/Error.h>
10591 _ACEOF
10592 rm -rf conftest.$ac_objext
10593 if { (ac_try="$ac_compile"
10594 case "(($ac_try" in
10595   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10596   *) ac_try_echo=$ac_try;;
10597 esac
10598 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
10599 $as_echo "$ac_try_echo") >&5
10600   (eval "$ac_compile") 2>conftest.er1
10601   ac_status=$?
10602   grep -v '^ *+' conftest.er1 >conftest.err
10603   rm -rf conftest.er1
10604   cat conftest.err >&5
10605   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
10606   (exit $ac_status); } && {
10607          test -z "$ac_c_werror_flag" ||
10608          test ! -s conftest.err
10609        } && test -s conftest.$ac_objext; then
10610   ac_cv_header_X11_Xmu_Error_h=yes
10611 else
10612   $as_echo "$as_me: failed program was:" >&5
10613 sed 's/^/| /' conftest.$ac_ext >&5
10614
10615         ac_cv_header_X11_Xmu_Error_h=no
10616 fi
10617
10618 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10619 fi
10620 { $as_echo "$as_me:$LINENO: result: $ac_cv_header_X11_Xmu_Error_h" >&5
10621 $as_echo "$ac_cv_header_X11_Xmu_Error_h" >&6; }
10622 if test "x$ac_cv_header_X11_Xmu_Error_h" = x""yes; then
10623   have_xmu=yes
10624 fi
10625
10626
10627   CPPFLAGS="$ac_save_CPPFLAGS"
10628 if test "$have_xmu" = no ; then
10629   XMU_SRCS='$(UTILS_SRC)/xmu.c'
10630   XMU_OBJS='$(UTILS_BIN)/xmu.o'
10631   XMU_LIBS=''
10632 else
10633   XMU_SRCS=''
10634   XMU_OBJS=''
10635   XMU_LIBS='-lXmu'
10636   cat >>confdefs.h <<\_ACEOF
10637 #define HAVE_XMU 1
10638 _ACEOF
10639
10640 fi
10641
10642
10643 ###############################################################################
10644 #
10645 #       Check for the SunOS 4.1.x _get_wmShellWidgetClass bug.
10646 #       See comp.windows.x FAQ question 124.  The right fix is to
10647 #       get OpenWindows 3.0 patches 100512-02 and 100573-03.
10648 #
10649 ###############################################################################
10650
10651 if test "$have_xmu" = yes ; then
10652   case "$host" in
10653     *-sunos4*)
10654     { $as_echo "$as_me:$LINENO: checking for the SunOS 4.1.x _get_wmShellWidgetClass bug" >&5
10655 $as_echo_n "checking for the SunOS 4.1.x _get_wmShellWidgetClass bug... " >&6; }
10656 if test "${ac_cv_sunos_xmu_bug+set}" = set; then
10657   $as_echo_n "(cached) " >&6
10658 else
10659   ac_save_LDFLAGS="$LDFLAGS"
10660                     if test \! -z "$x_libraries" ; then
10661                       LDFLAGS="$LDFLAGS -L$x_libraries"
10662                     fi
10663                     # Note: this trick never works!  (Generally.)
10664                     # We're only getting away with using AC_TRY_LINK
10665                     # with X libraries because we know it's SunOS.
10666                     LDFLAGS="$LDFLAGS -lXmu -lXt -lX11 -lXext -lm"
10667                     cat >conftest.$ac_ext <<_ACEOF
10668 /* confdefs.h.  */
10669 _ACEOF
10670 cat confdefs.h >>conftest.$ac_ext
10671 cat >>conftest.$ac_ext <<_ACEOF
10672 /* end confdefs.h.  */
10673
10674 int
10675 main ()
10676 {
10677
10678   ;
10679   return 0;
10680 }
10681 _ACEOF
10682 rm -rf conftest.$ac_objext conftest$ac_exeext
10683 if { (ac_try="$ac_link"
10684 case "(($ac_try" in
10685   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10686   *) ac_try_echo=$ac_try;;
10687 esac
10688 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
10689 $as_echo "$ac_try_echo") >&5
10690   (eval "$ac_link") 2>conftest.er1
10691   ac_status=$?
10692   grep -v '^ *+' conftest.er1 >conftest.err
10693   rm -rf conftest.er1
10694   cat conftest.err >&5
10695   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
10696   (exit $ac_status); } && {
10697          test -z "$ac_c_werror_flag" ||
10698          test ! -s conftest.err
10699        } && test -s conftest$ac_exeext && {
10700          test "$cross_compiling" = yes ||
10701          $as_test_x conftest$ac_exeext
10702        }; then
10703   ac_cv_sunos_xmu_bug=no
10704 else
10705   $as_echo "$as_me: failed program was:" >&5
10706 sed 's/^/| /' conftest.$ac_ext >&5
10707
10708         ac_cv_sunos_xmu_bug=yes
10709 fi
10710
10711 rm -rf conftest.dSYM
10712 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
10713       conftest$ac_exeext conftest.$ac_ext
10714                     LDFLAGS="$ac_save_LDFLAGS"
10715 fi
10716 { $as_echo "$as_me:$LINENO: result: $ac_cv_sunos_xmu_bug" >&5
10717 $as_echo "$ac_cv_sunos_xmu_bug" >&6; }
10718     if test "$ac_cv_sunos_xmu_bug" = yes ; then
10719       { $as_echo "$as_me:$LINENO: checking whether the compiler understands -static" >&5
10720 $as_echo_n "checking whether the compiler understands -static... " >&6; }
10721 if test "${ac_cv_ld_static+set}" = set; then
10722   $as_echo_n "(cached) " >&6
10723 else
10724   ac_save_LDFLAGS="$LDFLAGS"
10725                       LDFLAGS="$LDFLAGS -static"
10726                       cat >conftest.$ac_ext <<_ACEOF
10727 /* confdefs.h.  */
10728 _ACEOF
10729 cat confdefs.h >>conftest.$ac_ext
10730 cat >>conftest.$ac_ext <<_ACEOF
10731 /* end confdefs.h.  */
10732
10733 int
10734 main ()
10735 {
10736
10737   ;
10738   return 0;
10739 }
10740 _ACEOF
10741 rm -rf conftest.$ac_objext conftest$ac_exeext
10742 if { (ac_try="$ac_link"
10743 case "(($ac_try" in
10744   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10745   *) ac_try_echo=$ac_try;;
10746 esac
10747 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
10748 $as_echo "$ac_try_echo") >&5
10749   (eval "$ac_link") 2>conftest.er1
10750   ac_status=$?
10751   grep -v '^ *+' conftest.er1 >conftest.err
10752   rm -rf conftest.er1
10753   cat conftest.err >&5
10754   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
10755   (exit $ac_status); } && {
10756          test -z "$ac_c_werror_flag" ||
10757          test ! -s conftest.err
10758        } && test -s conftest$ac_exeext && {
10759          test "$cross_compiling" = yes ||
10760          $as_test_x conftest$ac_exeext
10761        }; then
10762   ac_cv_ld_static=yes
10763 else
10764   $as_echo "$as_me: failed program was:" >&5
10765 sed 's/^/| /' conftest.$ac_ext >&5
10766
10767         ac_cv_ld_static=no
10768 fi
10769
10770 rm -rf conftest.dSYM
10771 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
10772       conftest$ac_exeext conftest.$ac_ext
10773                     LDFLAGS="$ac_save_LDFLAGS"
10774 fi
10775 { $as_echo "$as_me:$LINENO: result: $ac_cv_ld_static" >&5
10776 $as_echo "$ac_cv_ld_static" >&6; }
10777       if test "$ac_cv_ld_static" = yes ; then
10778         LDFLAGS="$LDFLAGS -static"
10779       else
10780         LDFLAGS="$LDFLAGS -Bstatic"
10781       fi
10782     fi
10783     ;;
10784   esac
10785 fi
10786
10787
10788 ###############################################################################
10789 #
10790 #       Handle the --with-hackdir option
10791 #
10792 ###############################################################################
10793
10794 have_hackdir=yes
10795 with_hackdir_req=unspecified
10796
10797 # Check whether --with-hackdir was given.
10798 if test "${with_hackdir+set}" = set; then
10799   withval=$with_hackdir; with_hackdir="$withval"; with_hackdir_req="$withval"
10800 else
10801   with_hackdir=yes
10802 fi
10803
10804
10805 if test x"$with_hackdir" = xyes; then
10806   HACKDIR='${libexecdir}/xscreensaver'
10807 elif test x"$with_hackdir" = xno; then
10808   HACKDIR='${bindir}'
10809 else
10810   HACKDIR=$with_hackdir
10811 fi
10812
10813 # canonicalize slashes.
10814 HACKDIR=`echo "${HACKDIR}" | sed 's@/$@@;s@//*@/@g'`
10815
10816 # Expand HACKDIR as HACKDIR_FULL
10817 HACKDIR_FULL=`eval eval eval eval eval eval eval eval eval echo $HACKDIR`
10818
10819 # This option used to be called --enable-subdir; make sure that is no longer
10820 # used, since configure brain-damagedly ignores unknown --enable options.
10821
10822 obsolete_enable=
10823 # Check whether --enable-subdir was given.
10824 if test "${enable_subdir+set}" = set; then
10825   enableval=$enable_subdir; obsolete_enable=yes
10826 fi
10827
10828 if test -n "$obsolete_enable"; then
10829   echo "error: the --enable-subdir option has been replaced with"
10830   echo "       the new --with-hackdir option; see \`configure --help'"
10831   echo "       for more information."
10832   exit 1
10833 fi
10834
10835
10836 ###############################################################################
10837 #
10838 #       Handle the --with-configdir option
10839 #       Help for --with-x-app-defaults option added..
10840 #
10841 ###############################################################################
10842
10843 have_configdir=yes
10844 with_configdir_req=unspecified
10845
10846 # Check whether --with-configdir was given.
10847 if test "${with_configdir+set}" = set; then
10848   withval=$with_configdir; with_configdir="$withval"; with_configdir_req="$withval"
10849 else
10850   with_configdir=yes
10851 fi
10852
10853
10854 if test x"$with_configdir" = xyes; then
10855   HACK_CONF_DIR='${datadir}/xscreensaver/config'
10856 elif test x"$with_configdir" = xno; then
10857   echo "error: must be yes, or a pathname: --with-configdir=$with_configdir"
10858   exit 1
10859 else
10860   # there must be a better way than this...
10861   if test -z "`echo $with_configdir | sed 's@^/.*@@'`" ; then
10862     # absolute path
10863     HACK_CONF_DIR=$with_configdir
10864   else
10865     # relative path
10866     HACK_CONF_DIR="\${exec_prefix}$with_configdir"
10867   fi
10868 fi
10869
10870
10871
10872
10873 ###############################################################################
10874 #
10875 #       Check for the SGI SCREEN_SAVER server extension.
10876 #
10877 ###############################################################################
10878
10879 have_sgi=no
10880 with_sgi_req=unspecified
10881
10882 # Check whether --with-sgi-ext was given.
10883 if test "${with_sgi_ext+set}" = set; then
10884   withval=$with_sgi_ext; with_sgi="$withval"; with_sgi_req="$withval"
10885 else
10886   with_sgi=yes
10887 fi
10888
10889
10890
10891    case "$with_sgi" in
10892     yes) ;;
10893     no)  ;;
10894
10895     /*)
10896      { $as_echo "$as_me:$LINENO: checking for SGI SCREEN_SAVER headers" >&5
10897 $as_echo_n "checking for SGI SCREEN_SAVER headers... " >&6; }
10898      d=$with_sgi/include
10899      if test -d $d; then
10900        X_CFLAGS="-I$d $X_CFLAGS"
10901        { $as_echo "$as_me:$LINENO: result: $d" >&5
10902 $as_echo "$d" >&6; }
10903      else
10904        { $as_echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
10905 $as_echo "not found ($d: no such directory)" >&6; }
10906      fi
10907
10908      { $as_echo "$as_me:$LINENO: checking for SGI SCREEN_SAVER libs" >&5
10909 $as_echo_n "checking for SGI SCREEN_SAVER libs... " >&6; }
10910      d=$with_sgi/lib
10911      if test -d $d; then
10912        X_LIBS="-L$d $X_LIBS"
10913        { $as_echo "$as_me:$LINENO: result: $d" >&5
10914 $as_echo "$d" >&6; }
10915      else
10916        { $as_echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
10917 $as_echo "not found ($d: no such directory)" >&6; }
10918      fi
10919
10920      # replace the directory string with "yes".
10921      with_sgi_req="yes"
10922      with_sgi=$with_sgi_req
10923      ;;
10924
10925     *)
10926      echo ""
10927      echo "error: argument to --with-sgi-ext must be \"yes\", \"no\", or a directory."
10928      echo "       If it is a directory, then \`DIR/include' will be added to"
10929      echo "       the -I list, and \`DIR/lib' will be added to the -L list."
10930      exit 1
10931      ;;
10932    esac
10933
10934
10935 if test "$with_sgi" = yes; then
10936
10937   ac_save_CPPFLAGS="$CPPFLAGS"
10938   if test \! -z "$includedir" ; then
10939     CPPFLAGS="$CPPFLAGS -I$includedir"
10940   fi
10941   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
10942   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
10943   { $as_echo "$as_me:$LINENO: checking for X11/extensions/XScreenSaver.h" >&5
10944 $as_echo_n "checking for X11/extensions/XScreenSaver.h... " >&6; }
10945 if test "${ac_cv_header_X11_extensions_XScreenSaver_h+set}" = set; then
10946   $as_echo_n "(cached) " >&6
10947 else
10948   cat >conftest.$ac_ext <<_ACEOF
10949 /* confdefs.h.  */
10950 _ACEOF
10951 cat confdefs.h >>conftest.$ac_ext
10952 cat >>conftest.$ac_ext <<_ACEOF
10953 /* end confdefs.h.  */
10954 #include <X11/Xlib.h>
10955
10956 #include <X11/extensions/XScreenSaver.h>
10957 _ACEOF
10958 rm -rf conftest.$ac_objext
10959 if { (ac_try="$ac_compile"
10960 case "(($ac_try" in
10961   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10962   *) ac_try_echo=$ac_try;;
10963 esac
10964 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
10965 $as_echo "$ac_try_echo") >&5
10966   (eval "$ac_compile") 2>conftest.er1
10967   ac_status=$?
10968   grep -v '^ *+' conftest.er1 >conftest.err
10969   rm -rf conftest.er1
10970   cat conftest.err >&5
10971   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
10972   (exit $ac_status); } && {
10973          test -z "$ac_c_werror_flag" ||
10974          test ! -s conftest.err
10975        } && test -s conftest.$ac_objext; then
10976   ac_cv_header_X11_extensions_XScreenSaver_h=yes
10977 else
10978   $as_echo "$as_me: failed program was:" >&5
10979 sed 's/^/| /' conftest.$ac_ext >&5
10980
10981         ac_cv_header_X11_extensions_XScreenSaver_h=no
10982 fi
10983
10984 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10985 fi
10986 { $as_echo "$as_me:$LINENO: result: $ac_cv_header_X11_extensions_XScreenSaver_h" >&5
10987 $as_echo "$ac_cv_header_X11_extensions_XScreenSaver_h" >&6; }
10988 if test "x$ac_cv_header_X11_extensions_XScreenSaver_h" = x""yes; then
10989   have_sgi=yes
10990                      cat >>confdefs.h <<\_ACEOF
10991 #define HAVE_SGI_SAVER_EXTENSION 1
10992 _ACEOF
10993
10994 fi
10995
10996
10997   CPPFLAGS="$ac_save_CPPFLAGS"
10998
10999 elif test "$with_sgi" != no; then
11000   echo "error: must be yes or no: --with-sgi-ext=$with_sgi"
11001   exit 1
11002 fi
11003
11004
11005 ###############################################################################
11006 #
11007 #       Check for the XIDLE server extension.
11008 #
11009 ###############################################################################
11010
11011 have_xidle=no
11012 with_xidle_req=unspecified
11013
11014 # Check whether --with-xidle-ext was given.
11015 if test "${with_xidle_ext+set}" = set; then
11016   withval=$with_xidle_ext; with_xidle="$withval"; with_xidle_req="$withval"
11017 else
11018   with_xidle=yes
11019 fi
11020
11021
11022
11023    case "$with_xidle" in
11024     yes) ;;
11025     no)  ;;
11026
11027     /*)
11028      { $as_echo "$as_me:$LINENO: checking for XIDLE headers" >&5
11029 $as_echo_n "checking for XIDLE headers... " >&6; }
11030      d=$with_xidle/include
11031      if test -d $d; then
11032        X_CFLAGS="-I$d $X_CFLAGS"
11033        { $as_echo "$as_me:$LINENO: result: $d" >&5
11034 $as_echo "$d" >&6; }
11035      else
11036        { $as_echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
11037 $as_echo "not found ($d: no such directory)" >&6; }
11038      fi
11039
11040      { $as_echo "$as_me:$LINENO: checking for XIDLE libs" >&5
11041 $as_echo_n "checking for XIDLE libs... " >&6; }
11042      d=$with_xidle/lib
11043      if test -d $d; then
11044        X_LIBS="-L$d $X_LIBS"
11045        { $as_echo "$as_me:$LINENO: result: $d" >&5
11046 $as_echo "$d" >&6; }
11047      else
11048        { $as_echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
11049 $as_echo "not found ($d: no such directory)" >&6; }
11050      fi
11051
11052      # replace the directory string with "yes".
11053      with_xidle_req="yes"
11054      with_xidle=$with_xidle_req
11055      ;;
11056
11057     *)
11058      echo ""
11059      echo "error: argument to --with-xidle-ext must be \"yes\", \"no\", or a directory."
11060      echo "       If it is a directory, then \`DIR/include' will be added to"
11061      echo "       the -I list, and \`DIR/lib' will be added to the -L list."
11062      exit 1
11063      ;;
11064    esac
11065
11066
11067 if test "$with_xidle" = yes; then
11068
11069   ac_save_CPPFLAGS="$CPPFLAGS"
11070   if test \! -z "$includedir" ; then
11071     CPPFLAGS="$CPPFLAGS -I$includedir"
11072   fi
11073   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
11074   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
11075   { $as_echo "$as_me:$LINENO: checking for X11/extensions/xidle.h" >&5
11076 $as_echo_n "checking for X11/extensions/xidle.h... " >&6; }
11077 if test "${ac_cv_header_X11_extensions_xidle_h+set}" = set; then
11078   $as_echo_n "(cached) " >&6
11079 else
11080   cat >conftest.$ac_ext <<_ACEOF
11081 /* confdefs.h.  */
11082 _ACEOF
11083 cat confdefs.h >>conftest.$ac_ext
11084 cat >>conftest.$ac_ext <<_ACEOF
11085 /* end confdefs.h.  */
11086 #include <X11/Xlib.h>
11087
11088 #include <X11/extensions/xidle.h>
11089 _ACEOF
11090 rm -rf conftest.$ac_objext
11091 if { (ac_try="$ac_compile"
11092 case "(($ac_try" in
11093   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11094   *) ac_try_echo=$ac_try;;
11095 esac
11096 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
11097 $as_echo "$ac_try_echo") >&5
11098   (eval "$ac_compile") 2>conftest.er1
11099   ac_status=$?
11100   grep -v '^ *+' conftest.er1 >conftest.err
11101   rm -rf conftest.er1
11102   cat conftest.err >&5
11103   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
11104   (exit $ac_status); } && {
11105          test -z "$ac_c_werror_flag" ||
11106          test ! -s conftest.err
11107        } && test -s conftest.$ac_objext; then
11108   ac_cv_header_X11_extensions_xidle_h=yes
11109 else
11110   $as_echo "$as_me: failed program was:" >&5
11111 sed 's/^/| /' conftest.$ac_ext >&5
11112
11113         ac_cv_header_X11_extensions_xidle_h=no
11114 fi
11115
11116 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11117 fi
11118 { $as_echo "$as_me:$LINENO: result: $ac_cv_header_X11_extensions_xidle_h" >&5
11119 $as_echo "$ac_cv_header_X11_extensions_xidle_h" >&6; }
11120 if test "x$ac_cv_header_X11_extensions_xidle_h" = x""yes; then
11121   have_xidle=yes
11122                      cat >>confdefs.h <<\_ACEOF
11123 #define HAVE_XIDLE_EXTENSION 1
11124 _ACEOF
11125
11126 fi
11127
11128
11129   CPPFLAGS="$ac_save_CPPFLAGS"
11130 elif test "$with_xidle" != no; then
11131   echo "error: must be yes or no: --with-xidle-ext=$with_xidle"
11132   exit 1
11133 fi
11134
11135
11136 ###############################################################################
11137 #
11138 #       Check for the SGI-VIDEO-CONTROL server extension.
11139 #
11140 ###############################################################################
11141
11142 have_sgivc=no
11143 with_sgivc_req=unspecified
11144
11145 # Check whether --with-sgivc-ext was given.
11146 if test "${with_sgivc_ext+set}" = set; then
11147   withval=$with_sgivc_ext; with_sgivc="$withval"; with_sgivc_req="$withval"
11148 else
11149   with_sgivc=yes
11150 fi
11151
11152
11153
11154    case "$with_sgivc" in
11155     yes) ;;
11156     no)  ;;
11157
11158     /*)
11159      { $as_echo "$as_me:$LINENO: checking for SGI-VIDEO-CONTROL headers" >&5
11160 $as_echo_n "checking for SGI-VIDEO-CONTROL headers... " >&6; }
11161      d=$with_sgivc/include
11162      if test -d $d; then
11163        X_CFLAGS="-I$d $X_CFLAGS"
11164        { $as_echo "$as_me:$LINENO: result: $d" >&5
11165 $as_echo "$d" >&6; }
11166      else
11167        { $as_echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
11168 $as_echo "not found ($d: no such directory)" >&6; }
11169      fi
11170
11171      { $as_echo "$as_me:$LINENO: checking for SGI-VIDEO-CONTROL libs" >&5
11172 $as_echo_n "checking for SGI-VIDEO-CONTROL libs... " >&6; }
11173      d=$with_sgivc/lib
11174      if test -d $d; then
11175        X_LIBS="-L$d $X_LIBS"
11176        { $as_echo "$as_me:$LINENO: result: $d" >&5
11177 $as_echo "$d" >&6; }
11178      else
11179        { $as_echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
11180 $as_echo "not found ($d: no such directory)" >&6; }
11181      fi
11182
11183      # replace the directory string with "yes".
11184      with_sgivc_req="yes"
11185      with_sgivc=$with_sgivc_req
11186      ;;
11187
11188     *)
11189      echo ""
11190      echo "error: argument to --with-sgivc-ext must be \"yes\", \"no\", or a directory."
11191      echo "       If it is a directory, then \`DIR/include' will be added to"
11192      echo "       the -I list, and \`DIR/lib' will be added to the -L list."
11193      exit 1
11194      ;;
11195    esac
11196
11197
11198 if test "$with_sgivc" = yes; then
11199
11200   # first check for XSGIvc.h
11201
11202   ac_save_CPPFLAGS="$CPPFLAGS"
11203   if test \! -z "$includedir" ; then
11204     CPPFLAGS="$CPPFLAGS -I$includedir"
11205   fi
11206   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
11207   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
11208   { $as_echo "$as_me:$LINENO: checking for X11/extensions/XSGIvc.h" >&5
11209 $as_echo_n "checking for X11/extensions/XSGIvc.h... " >&6; }
11210 if test "${ac_cv_header_X11_extensions_XSGIvc_h+set}" = set; then
11211   $as_echo_n "(cached) " >&6
11212 else
11213   cat >conftest.$ac_ext <<_ACEOF
11214 /* confdefs.h.  */
11215 _ACEOF
11216 cat confdefs.h >>conftest.$ac_ext
11217 cat >>conftest.$ac_ext <<_ACEOF
11218 /* end confdefs.h.  */
11219 #include <X11/Xlib.h>
11220
11221 #include <X11/extensions/XSGIvc.h>
11222 _ACEOF
11223 rm -rf conftest.$ac_objext
11224 if { (ac_try="$ac_compile"
11225 case "(($ac_try" in
11226   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11227   *) ac_try_echo=$ac_try;;
11228 esac
11229 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
11230 $as_echo "$ac_try_echo") >&5
11231   (eval "$ac_compile") 2>conftest.er1
11232   ac_status=$?
11233   grep -v '^ *+' conftest.er1 >conftest.err
11234   rm -rf conftest.er1
11235   cat conftest.err >&5
11236   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
11237   (exit $ac_status); } && {
11238          test -z "$ac_c_werror_flag" ||
11239          test ! -s conftest.err
11240        } && test -s conftest.$ac_objext; then
11241   ac_cv_header_X11_extensions_XSGIvc_h=yes
11242 else
11243   $as_echo "$as_me: failed program was:" >&5
11244 sed 's/^/| /' conftest.$ac_ext >&5
11245
11246         ac_cv_header_X11_extensions_XSGIvc_h=no
11247 fi
11248
11249 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11250 fi
11251 { $as_echo "$as_me:$LINENO: result: $ac_cv_header_X11_extensions_XSGIvc_h" >&5
11252 $as_echo "$ac_cv_header_X11_extensions_XSGIvc_h" >&6; }
11253 if test "x$ac_cv_header_X11_extensions_XSGIvc_h" = x""yes; then
11254   have_sgivc=yes
11255 fi
11256
11257
11258   CPPFLAGS="$ac_save_CPPFLAGS"
11259
11260   # if that succeeded, then check for the -lXsgivc
11261   if test "$have_sgivc" = yes; then
11262     have_sgivc=no
11263
11264   ac_save_CPPFLAGS="$CPPFLAGS"
11265   ac_save_LDFLAGS="$LDFLAGS"
11266 #  ac_save_LIBS="$LIBS"
11267
11268   if test \! -z "$includedir" ; then
11269     CPPFLAGS="$CPPFLAGS -I$includedir"
11270   fi
11271   # note: $X_CFLAGS includes $x_includes
11272   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
11273
11274   if test \! -z "$libdir" ; then
11275     LDFLAGS="$LDFLAGS -L$libdir"
11276   fi
11277   # note: $X_LIBS includes $x_libraries
11278   LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
11279
11280   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
11281   LDFLAGS=`eval eval eval eval eval eval eval eval eval echo $LDFLAGS`
11282   { $as_echo "$as_me:$LINENO: checking for XSGIvcQueryGammaMap in -lXsgivc" >&5
11283 $as_echo_n "checking for XSGIvcQueryGammaMap in -lXsgivc... " >&6; }
11284 if test "${ac_cv_lib_Xsgivc_XSGIvcQueryGammaMap+set}" = set; then
11285   $as_echo_n "(cached) " >&6
11286 else
11287   ac_check_lib_save_LIBS=$LIBS
11288 LIBS="-lXsgivc -lXext -lX11 $LIBS"
11289 cat >conftest.$ac_ext <<_ACEOF
11290 /* confdefs.h.  */
11291 _ACEOF
11292 cat confdefs.h >>conftest.$ac_ext
11293 cat >>conftest.$ac_ext <<_ACEOF
11294 /* end confdefs.h.  */
11295
11296 /* Override any GCC internal prototype to avoid an error.
11297    Use char because int might match the return type of a GCC
11298    builtin and then its argument prototype would still apply.  */
11299 #ifdef __cplusplus
11300 extern "C"
11301 #endif
11302 char XSGIvcQueryGammaMap ();
11303 int
11304 main ()
11305 {
11306 return XSGIvcQueryGammaMap ();
11307   ;
11308   return 0;
11309 }
11310 _ACEOF
11311 rm -rf conftest.$ac_objext conftest$ac_exeext
11312 if { (ac_try="$ac_link"
11313 case "(($ac_try" in
11314   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11315   *) ac_try_echo=$ac_try;;
11316 esac
11317 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
11318 $as_echo "$ac_try_echo") >&5
11319   (eval "$ac_link") 2>conftest.er1
11320   ac_status=$?
11321   grep -v '^ *+' conftest.er1 >conftest.err
11322   rm -rf conftest.er1
11323   cat conftest.err >&5
11324   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
11325   (exit $ac_status); } && {
11326          test -z "$ac_c_werror_flag" ||
11327          test ! -s conftest.err
11328        } && test -s conftest$ac_exeext && {
11329          test "$cross_compiling" = yes ||
11330          $as_test_x conftest$ac_exeext
11331        }; then
11332   ac_cv_lib_Xsgivc_XSGIvcQueryGammaMap=yes
11333 else
11334   $as_echo "$as_me: failed program was:" >&5
11335 sed 's/^/| /' conftest.$ac_ext >&5
11336
11337         ac_cv_lib_Xsgivc_XSGIvcQueryGammaMap=no
11338 fi
11339
11340 rm -rf conftest.dSYM
11341 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
11342       conftest$ac_exeext conftest.$ac_ext
11343 LIBS=$ac_check_lib_save_LIBS
11344 fi
11345 { $as_echo "$as_me:$LINENO: result: $ac_cv_lib_Xsgivc_XSGIvcQueryGammaMap" >&5
11346 $as_echo "$ac_cv_lib_Xsgivc_XSGIvcQueryGammaMap" >&6; }
11347 if test "x$ac_cv_lib_Xsgivc_XSGIvcQueryGammaMap" = x""yes; then
11348   have_sgivc=yes; SAVER_LIBS="$SAVER_LIBS -lXsgivc"
11349 else
11350   true
11351 fi
11352
11353   CPPFLAGS="$ac_save_CPPFLAGS"
11354   LDFLAGS="$ac_save_LDFLAGS"
11355 #  LIBS="$ac_save_LIBS"
11356
11357   fi
11358
11359   # if that succeeded, then we've really got it.
11360   if test "$have_sgivc" = yes; then
11361     cat >>confdefs.h <<\_ACEOF
11362 #define HAVE_SGI_VC_EXTENSION 1
11363 _ACEOF
11364
11365   fi
11366
11367 elif test "$with_sgivc" != no; then
11368   echo "error: must be yes or no: --with-sgivc-ext=$with_sgivc"
11369   exit 1
11370 fi
11371
11372
11373 ###############################################################################
11374 #
11375 #       Check for the DPMS server extension.
11376 #
11377 ###############################################################################
11378
11379 have_dpms=no
11380 with_dpms_req=unspecified
11381
11382 # Check whether --with-dpms-ext was given.
11383 if test "${with_dpms_ext+set}" = set; then
11384   withval=$with_dpms_ext; with_dpms="$withval"; with_dpms_req="$withval"
11385 else
11386   with_dpms=yes
11387 fi
11388
11389
11390
11391    case "$with_dpms" in
11392     yes) ;;
11393     no)  ;;
11394
11395     /*)
11396      { $as_echo "$as_me:$LINENO: checking for DPMS headers" >&5
11397 $as_echo_n "checking for DPMS headers... " >&6; }
11398      d=$with_dpms/include
11399      if test -d $d; then
11400        X_CFLAGS="-I$d $X_CFLAGS"
11401        { $as_echo "$as_me:$LINENO: result: $d" >&5
11402 $as_echo "$d" >&6; }
11403      else
11404        { $as_echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
11405 $as_echo "not found ($d: no such directory)" >&6; }
11406      fi
11407
11408      { $as_echo "$as_me:$LINENO: checking for DPMS libs" >&5
11409 $as_echo_n "checking for DPMS libs... " >&6; }
11410      d=$with_dpms/lib
11411      if test -d $d; then
11412        X_LIBS="-L$d $X_LIBS"
11413        { $as_echo "$as_me:$LINENO: result: $d" >&5
11414 $as_echo "$d" >&6; }
11415      else
11416        { $as_echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
11417 $as_echo "not found ($d: no such directory)" >&6; }
11418      fi
11419
11420      # replace the directory string with "yes".
11421      with_dpms_req="yes"
11422      with_dpms=$with_dpms_req
11423      ;;
11424
11425     *)
11426      echo ""
11427      echo "error: argument to --with-dpms-ext must be \"yes\", \"no\", or a directory."
11428      echo "       If it is a directory, then \`DIR/include' will be added to"
11429      echo "       the -I list, and \`DIR/lib' will be added to the -L list."
11430      exit 1
11431      ;;
11432    esac
11433
11434
11435 if test "$with_dpms" = yes; then
11436
11437   # first check for dpms.h
11438
11439   ac_save_CPPFLAGS="$CPPFLAGS"
11440   if test \! -z "$includedir" ; then
11441     CPPFLAGS="$CPPFLAGS -I$includedir"
11442   fi
11443   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
11444   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
11445   { $as_echo "$as_me:$LINENO: checking for X11/extensions/dpms.h" >&5
11446 $as_echo_n "checking for X11/extensions/dpms.h... " >&6; }
11447 if test "${ac_cv_header_X11_extensions_dpms_h+set}" = set; then
11448   $as_echo_n "(cached) " >&6
11449 else
11450   cat >conftest.$ac_ext <<_ACEOF
11451 /* confdefs.h.  */
11452 _ACEOF
11453 cat confdefs.h >>conftest.$ac_ext
11454 cat >>conftest.$ac_ext <<_ACEOF
11455 /* end confdefs.h.  */
11456 #include <X11/Xlib.h>
11457                      #include <X11/Xmd.h>
11458
11459 #include <X11/extensions/dpms.h>
11460 _ACEOF
11461 rm -rf conftest.$ac_objext
11462 if { (ac_try="$ac_compile"
11463 case "(($ac_try" in
11464   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11465   *) ac_try_echo=$ac_try;;
11466 esac
11467 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
11468 $as_echo "$ac_try_echo") >&5
11469   (eval "$ac_compile") 2>conftest.er1
11470   ac_status=$?
11471   grep -v '^ *+' conftest.er1 >conftest.err
11472   rm -rf conftest.er1
11473   cat conftest.err >&5
11474   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
11475   (exit $ac_status); } && {
11476          test -z "$ac_c_werror_flag" ||
11477          test ! -s conftest.err
11478        } && test -s conftest.$ac_objext; then
11479   ac_cv_header_X11_extensions_dpms_h=yes
11480 else
11481   $as_echo "$as_me: failed program was:" >&5
11482 sed 's/^/| /' conftest.$ac_ext >&5
11483
11484         ac_cv_header_X11_extensions_dpms_h=no
11485 fi
11486
11487 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11488 fi
11489 { $as_echo "$as_me:$LINENO: result: $ac_cv_header_X11_extensions_dpms_h" >&5
11490 $as_echo "$ac_cv_header_X11_extensions_dpms_h" >&6; }
11491 if test "x$ac_cv_header_X11_extensions_dpms_h" = x""yes; then
11492   have_dpms=yes
11493 fi
11494
11495
11496   CPPFLAGS="$ac_save_CPPFLAGS"
11497
11498   # if that succeeded, then check for the DPMS code in the libraries
11499   if test "$have_dpms" = yes; then
11500
11501     # first look in -lXext (this is where it is with XFree86 4.0)
11502     have_dpms=no
11503
11504   ac_save_CPPFLAGS="$CPPFLAGS"
11505   ac_save_LDFLAGS="$LDFLAGS"
11506 #  ac_save_LIBS="$LIBS"
11507
11508   if test \! -z "$includedir" ; then
11509     CPPFLAGS="$CPPFLAGS -I$includedir"
11510   fi
11511   # note: $X_CFLAGS includes $x_includes
11512   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
11513
11514   if test \! -z "$libdir" ; then
11515     LDFLAGS="$LDFLAGS -L$libdir"
11516   fi
11517   # note: $X_LIBS includes $x_libraries
11518   LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
11519
11520   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
11521   LDFLAGS=`eval eval eval eval eval eval eval eval eval echo $LDFLAGS`
11522   { $as_echo "$as_me:$LINENO: checking for DPMSInfo in -lXext" >&5
11523 $as_echo_n "checking for DPMSInfo in -lXext... " >&6; }
11524 if test "${ac_cv_lib_Xext_DPMSInfo+set}" = set; then
11525   $as_echo_n "(cached) " >&6
11526 else
11527   ac_check_lib_save_LIBS=$LIBS
11528 LIBS="-lXext -lXext -lX11 $LIBS"
11529 cat >conftest.$ac_ext <<_ACEOF
11530 /* confdefs.h.  */
11531 _ACEOF
11532 cat confdefs.h >>conftest.$ac_ext
11533 cat >>conftest.$ac_ext <<_ACEOF
11534 /* end confdefs.h.  */
11535
11536 /* Override any GCC internal prototype to avoid an error.
11537    Use char because int might match the return type of a GCC
11538    builtin and then its argument prototype would still apply.  */
11539 #ifdef __cplusplus
11540 extern "C"
11541 #endif
11542 char DPMSInfo ();
11543 int
11544 main ()
11545 {
11546 return DPMSInfo ();
11547   ;
11548   return 0;
11549 }
11550 _ACEOF
11551 rm -rf conftest.$ac_objext conftest$ac_exeext
11552 if { (ac_try="$ac_link"
11553 case "(($ac_try" in
11554   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11555   *) ac_try_echo=$ac_try;;
11556 esac
11557 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
11558 $as_echo "$ac_try_echo") >&5
11559   (eval "$ac_link") 2>conftest.er1
11560   ac_status=$?
11561   grep -v '^ *+' conftest.er1 >conftest.err
11562   rm -rf conftest.er1
11563   cat conftest.err >&5
11564   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
11565   (exit $ac_status); } && {
11566          test -z "$ac_c_werror_flag" ||
11567          test ! -s conftest.err
11568        } && test -s conftest$ac_exeext && {
11569          test "$cross_compiling" = yes ||
11570          $as_test_x conftest$ac_exeext
11571        }; then
11572   ac_cv_lib_Xext_DPMSInfo=yes
11573 else
11574   $as_echo "$as_me: failed program was:" >&5
11575 sed 's/^/| /' conftest.$ac_ext >&5
11576
11577         ac_cv_lib_Xext_DPMSInfo=no
11578 fi
11579
11580 rm -rf conftest.dSYM
11581 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
11582       conftest$ac_exeext conftest.$ac_ext
11583 LIBS=$ac_check_lib_save_LIBS
11584 fi
11585 { $as_echo "$as_me:$LINENO: result: $ac_cv_lib_Xext_DPMSInfo" >&5
11586 $as_echo "$ac_cv_lib_Xext_DPMSInfo" >&6; }
11587 if test "x$ac_cv_lib_Xext_DPMSInfo" = x""yes; then
11588   have_dpms=yes
11589 else
11590   true
11591 fi
11592
11593   CPPFLAGS="$ac_save_CPPFLAGS"
11594   LDFLAGS="$ac_save_LDFLAGS"
11595 #  LIBS="$ac_save_LIBS"
11596
11597
11598     # if that failed, look in -lXdpms (this is where it was in XFree86 3.x)
11599     if test "$have_dpms" = no; then
11600
11601   ac_save_CPPFLAGS="$CPPFLAGS"
11602   ac_save_LDFLAGS="$LDFLAGS"
11603 #  ac_save_LIBS="$LIBS"
11604
11605   if test \! -z "$includedir" ; then
11606     CPPFLAGS="$CPPFLAGS -I$includedir"
11607   fi
11608   # note: $X_CFLAGS includes $x_includes
11609   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
11610
11611   if test \! -z "$libdir" ; then
11612     LDFLAGS="$LDFLAGS -L$libdir"
11613   fi
11614   # note: $X_LIBS includes $x_libraries
11615   LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
11616
11617   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
11618   LDFLAGS=`eval eval eval eval eval eval eval eval eval echo $LDFLAGS`
11619   { $as_echo "$as_me:$LINENO: checking for DPMSInfo in -lXdpms" >&5
11620 $as_echo_n "checking for DPMSInfo in -lXdpms... " >&6; }
11621 if test "${ac_cv_lib_Xdpms_DPMSInfo+set}" = set; then
11622   $as_echo_n "(cached) " >&6
11623 else
11624   ac_check_lib_save_LIBS=$LIBS
11625 LIBS="-lXdpms -lXext -lX11 $LIBS"
11626 cat >conftest.$ac_ext <<_ACEOF
11627 /* confdefs.h.  */
11628 _ACEOF
11629 cat confdefs.h >>conftest.$ac_ext
11630 cat >>conftest.$ac_ext <<_ACEOF
11631 /* end confdefs.h.  */
11632
11633 /* Override any GCC internal prototype to avoid an error.
11634    Use char because int might match the return type of a GCC
11635    builtin and then its argument prototype would still apply.  */
11636 #ifdef __cplusplus
11637 extern "C"
11638 #endif
11639 char DPMSInfo ();
11640 int
11641 main ()
11642 {
11643 return DPMSInfo ();
11644   ;
11645   return 0;
11646 }
11647 _ACEOF
11648 rm -rf conftest.$ac_objext conftest$ac_exeext
11649 if { (ac_try="$ac_link"
11650 case "(($ac_try" in
11651   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11652   *) ac_try_echo=$ac_try;;
11653 esac
11654 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
11655 $as_echo "$ac_try_echo") >&5
11656   (eval "$ac_link") 2>conftest.er1
11657   ac_status=$?
11658   grep -v '^ *+' conftest.er1 >conftest.err
11659   rm -rf conftest.er1
11660   cat conftest.err >&5
11661   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
11662   (exit $ac_status); } && {
11663          test -z "$ac_c_werror_flag" ||
11664          test ! -s conftest.err
11665        } && test -s conftest$ac_exeext && {
11666          test "$cross_compiling" = yes ||
11667          $as_test_x conftest$ac_exeext
11668        }; then
11669   ac_cv_lib_Xdpms_DPMSInfo=yes
11670 else
11671   $as_echo "$as_me: failed program was:" >&5
11672 sed 's/^/| /' conftest.$ac_ext >&5
11673
11674         ac_cv_lib_Xdpms_DPMSInfo=no
11675 fi
11676
11677 rm -rf conftest.dSYM
11678 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
11679       conftest$ac_exeext conftest.$ac_ext
11680 LIBS=$ac_check_lib_save_LIBS
11681 fi
11682 { $as_echo "$as_me:$LINENO: result: $ac_cv_lib_Xdpms_DPMSInfo" >&5
11683 $as_echo "$ac_cv_lib_Xdpms_DPMSInfo" >&6; }
11684 if test "x$ac_cv_lib_Xdpms_DPMSInfo" = x""yes; then
11685   have_dpms=yes; XDPMS_LIBS="-lXdpms"
11686 else
11687   true
11688 fi
11689
11690   CPPFLAGS="$ac_save_CPPFLAGS"
11691   LDFLAGS="$ac_save_LDFLAGS"
11692 #  LIBS="$ac_save_LIBS"
11693
11694     fi
11695   fi
11696
11697
11698   # if that succeeded, then we've really got it.
11699   if test "$have_dpms" = yes; then
11700     cat >>confdefs.h <<\_ACEOF
11701 #define HAVE_DPMS_EXTENSION 1
11702 _ACEOF
11703
11704   fi
11705
11706 elif test "$with_dpms" != no; then
11707   echo "error: must be yes or no: --with-dpms-ext=$with_dpms"
11708   exit 1
11709 fi
11710
11711
11712 ###############################################################################
11713 #
11714 #       Check for the XINERAMA server extension.
11715 #
11716 ###############################################################################
11717
11718 have_xinerama=no
11719 with_xinerama_req=unspecified
11720
11721 # Check whether --with-xinerama-ext was given.
11722 if test "${with_xinerama_ext+set}" = set; then
11723   withval=$with_xinerama_ext; with_xinerama="$withval"; with_xinerama_req="$withval"
11724 else
11725   with_xinerama=yes
11726 fi
11727
11728
11729
11730    case "$with_xinerama" in
11731     yes) ;;
11732     no)  ;;
11733
11734     /*)
11735      { $as_echo "$as_me:$LINENO: checking for XINERAMA headers" >&5
11736 $as_echo_n "checking for XINERAMA headers... " >&6; }
11737      d=$with_xinerama/include
11738      if test -d $d; then
11739        X_CFLAGS="-I$d $X_CFLAGS"
11740        { $as_echo "$as_me:$LINENO: result: $d" >&5
11741 $as_echo "$d" >&6; }
11742      else
11743        { $as_echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
11744 $as_echo "not found ($d: no such directory)" >&6; }
11745      fi
11746
11747      { $as_echo "$as_me:$LINENO: checking for XINERAMA libs" >&5
11748 $as_echo_n "checking for XINERAMA libs... " >&6; }
11749      d=$with_xinerama/lib
11750      if test -d $d; then
11751        X_LIBS="-L$d $X_LIBS"
11752        { $as_echo "$as_me:$LINENO: result: $d" >&5
11753 $as_echo "$d" >&6; }
11754      else
11755        { $as_echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
11756 $as_echo "not found ($d: no such directory)" >&6; }
11757      fi
11758
11759      # replace the directory string with "yes".
11760      with_xinerama_req="yes"
11761      with_xinerama=$with_xinerama_req
11762      ;;
11763
11764     *)
11765      echo ""
11766      echo "error: argument to --with-xinerama-ext must be \"yes\", \"no\", or a directory."
11767      echo "       If it is a directory, then \`DIR/include' will be added to"
11768      echo "       the -I list, and \`DIR/lib' will be added to the -L list."
11769      exit 1
11770      ;;
11771    esac
11772
11773
11774 if test "$with_xinerama" = yes; then
11775
11776   # first check for Xinerama.h
11777
11778   ac_save_CPPFLAGS="$CPPFLAGS"
11779   if test \! -z "$includedir" ; then
11780     CPPFLAGS="$CPPFLAGS -I$includedir"
11781   fi
11782   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
11783   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
11784   { $as_echo "$as_me:$LINENO: checking for X11/extensions/Xinerama.h" >&5
11785 $as_echo_n "checking for X11/extensions/Xinerama.h... " >&6; }
11786 if test "${ac_cv_header_X11_extensions_Xinerama_h+set}" = set; then
11787   $as_echo_n "(cached) " >&6
11788 else
11789   cat >conftest.$ac_ext <<_ACEOF
11790 /* confdefs.h.  */
11791 _ACEOF
11792 cat confdefs.h >>conftest.$ac_ext
11793 cat >>conftest.$ac_ext <<_ACEOF
11794 /* end confdefs.h.  */
11795 #include <X11/Xlib.h>
11796
11797 #include <X11/extensions/Xinerama.h>
11798 _ACEOF
11799 rm -rf conftest.$ac_objext
11800 if { (ac_try="$ac_compile"
11801 case "(($ac_try" in
11802   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11803   *) ac_try_echo=$ac_try;;
11804 esac
11805 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
11806 $as_echo "$ac_try_echo") >&5
11807   (eval "$ac_compile") 2>conftest.er1
11808   ac_status=$?
11809   grep -v '^ *+' conftest.er1 >conftest.err
11810   rm -rf conftest.er1
11811   cat conftest.err >&5
11812   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
11813   (exit $ac_status); } && {
11814          test -z "$ac_c_werror_flag" ||
11815          test ! -s conftest.err
11816        } && test -s conftest.$ac_objext; then
11817   ac_cv_header_X11_extensions_Xinerama_h=yes
11818 else
11819   $as_echo "$as_me: failed program was:" >&5
11820 sed 's/^/| /' conftest.$ac_ext >&5
11821
11822         ac_cv_header_X11_extensions_Xinerama_h=no
11823 fi
11824
11825 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11826 fi
11827 { $as_echo "$as_me:$LINENO: result: $ac_cv_header_X11_extensions_Xinerama_h" >&5
11828 $as_echo "$ac_cv_header_X11_extensions_Xinerama_h" >&6; }
11829 if test "x$ac_cv_header_X11_extensions_Xinerama_h" = x""yes; then
11830   have_xinerama=yes
11831 fi
11832
11833
11834   CPPFLAGS="$ac_save_CPPFLAGS"
11835
11836   # if that succeeded, then check for the XINERAMA code in the libraries
11837   if test "$have_xinerama" = yes; then
11838
11839     # first look in -lXext
11840     have_xinerama=no
11841
11842   ac_save_CPPFLAGS="$CPPFLAGS"
11843   ac_save_LDFLAGS="$LDFLAGS"
11844 #  ac_save_LIBS="$LIBS"
11845
11846   if test \! -z "$includedir" ; then
11847     CPPFLAGS="$CPPFLAGS -I$includedir"
11848   fi
11849   # note: $X_CFLAGS includes $x_includes
11850   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
11851
11852   if test \! -z "$libdir" ; then
11853     LDFLAGS="$LDFLAGS -L$libdir"
11854   fi
11855   # note: $X_LIBS includes $x_libraries
11856   LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
11857
11858   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
11859   LDFLAGS=`eval eval eval eval eval eval eval eval eval echo $LDFLAGS`
11860   { $as_echo "$as_me:$LINENO: checking for XineramaQueryScreens in -lXext" >&5
11861 $as_echo_n "checking for XineramaQueryScreens in -lXext... " >&6; }
11862 if test "${ac_cv_lib_Xext_XineramaQueryScreens+set}" = set; then
11863   $as_echo_n "(cached) " >&6
11864 else
11865   ac_check_lib_save_LIBS=$LIBS
11866 LIBS="-lXext -lXext -lX11 $LIBS"
11867 cat >conftest.$ac_ext <<_ACEOF
11868 /* confdefs.h.  */
11869 _ACEOF
11870 cat confdefs.h >>conftest.$ac_ext
11871 cat >>conftest.$ac_ext <<_ACEOF
11872 /* end confdefs.h.  */
11873
11874 /* Override any GCC internal prototype to avoid an error.
11875    Use char because int might match the return type of a GCC
11876    builtin and then its argument prototype would still apply.  */
11877 #ifdef __cplusplus
11878 extern "C"
11879 #endif
11880 char XineramaQueryScreens ();
11881 int
11882 main ()
11883 {
11884 return XineramaQueryScreens ();
11885   ;
11886   return 0;
11887 }
11888 _ACEOF
11889 rm -rf conftest.$ac_objext conftest$ac_exeext
11890 if { (ac_try="$ac_link"
11891 case "(($ac_try" in
11892   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11893   *) ac_try_echo=$ac_try;;
11894 esac
11895 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
11896 $as_echo "$ac_try_echo") >&5
11897   (eval "$ac_link") 2>conftest.er1
11898   ac_status=$?
11899   grep -v '^ *+' conftest.er1 >conftest.err
11900   rm -rf conftest.er1
11901   cat conftest.err >&5
11902   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
11903   (exit $ac_status); } && {
11904          test -z "$ac_c_werror_flag" ||
11905          test ! -s conftest.err
11906        } && test -s conftest$ac_exeext && {
11907          test "$cross_compiling" = yes ||
11908          $as_test_x conftest$ac_exeext
11909        }; then
11910   ac_cv_lib_Xext_XineramaQueryScreens=yes
11911 else
11912   $as_echo "$as_me: failed program was:" >&5
11913 sed 's/^/| /' conftest.$ac_ext >&5
11914
11915         ac_cv_lib_Xext_XineramaQueryScreens=no
11916 fi
11917
11918 rm -rf conftest.dSYM
11919 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
11920       conftest$ac_exeext conftest.$ac_ext
11921 LIBS=$ac_check_lib_save_LIBS
11922 fi
11923 { $as_echo "$as_me:$LINENO: result: $ac_cv_lib_Xext_XineramaQueryScreens" >&5
11924 $as_echo "$ac_cv_lib_Xext_XineramaQueryScreens" >&6; }
11925 if test "x$ac_cv_lib_Xext_XineramaQueryScreens" = x""yes; then
11926   have_xinerama=yes
11927 else
11928   true
11929 fi
11930
11931   CPPFLAGS="$ac_save_CPPFLAGS"
11932   LDFLAGS="$ac_save_LDFLAGS"
11933 #  LIBS="$ac_save_LIBS"
11934
11935
11936     # if that failed, look in -lXinerama (this is where it is in XFree86 4.1.)
11937     if test "$have_xinerama" = no; then
11938
11939   ac_save_CPPFLAGS="$CPPFLAGS"
11940   ac_save_LDFLAGS="$LDFLAGS"
11941 #  ac_save_LIBS="$LIBS"
11942
11943   if test \! -z "$includedir" ; then
11944     CPPFLAGS="$CPPFLAGS -I$includedir"
11945   fi
11946   # note: $X_CFLAGS includes $x_includes
11947   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
11948
11949   if test \! -z "$libdir" ; then
11950     LDFLAGS="$LDFLAGS -L$libdir"
11951   fi
11952   # note: $X_LIBS includes $x_libraries
11953   LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
11954
11955   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
11956   LDFLAGS=`eval eval eval eval eval eval eval eval eval echo $LDFLAGS`
11957   { $as_echo "$as_me:$LINENO: checking for XineramaQueryScreens in -lXinerama" >&5
11958 $as_echo_n "checking for XineramaQueryScreens in -lXinerama... " >&6; }
11959 if test "${ac_cv_lib_Xinerama_XineramaQueryScreens+set}" = set; then
11960   $as_echo_n "(cached) " >&6
11961 else
11962   ac_check_lib_save_LIBS=$LIBS
11963 LIBS="-lXinerama -lXext -lX11 $LIBS"
11964 cat >conftest.$ac_ext <<_ACEOF
11965 /* confdefs.h.  */
11966 _ACEOF
11967 cat confdefs.h >>conftest.$ac_ext
11968 cat >>conftest.$ac_ext <<_ACEOF
11969 /* end confdefs.h.  */
11970
11971 /* Override any GCC internal prototype to avoid an error.
11972    Use char because int might match the return type of a GCC
11973    builtin and then its argument prototype would still apply.  */
11974 #ifdef __cplusplus
11975 extern "C"
11976 #endif
11977 char XineramaQueryScreens ();
11978 int
11979 main ()
11980 {
11981 return XineramaQueryScreens ();
11982   ;
11983   return 0;
11984 }
11985 _ACEOF
11986 rm -rf conftest.$ac_objext conftest$ac_exeext
11987 if { (ac_try="$ac_link"
11988 case "(($ac_try" in
11989   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11990   *) ac_try_echo=$ac_try;;
11991 esac
11992 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
11993 $as_echo "$ac_try_echo") >&5
11994   (eval "$ac_link") 2>conftest.er1
11995   ac_status=$?
11996   grep -v '^ *+' conftest.er1 >conftest.err
11997   rm -rf conftest.er1
11998   cat conftest.err >&5
11999   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
12000   (exit $ac_status); } && {
12001          test -z "$ac_c_werror_flag" ||
12002          test ! -s conftest.err
12003        } && test -s conftest$ac_exeext && {
12004          test "$cross_compiling" = yes ||
12005          $as_test_x conftest$ac_exeext
12006        }; then
12007   ac_cv_lib_Xinerama_XineramaQueryScreens=yes
12008 else
12009   $as_echo "$as_me: failed program was:" >&5
12010 sed 's/^/| /' conftest.$ac_ext >&5
12011
12012         ac_cv_lib_Xinerama_XineramaQueryScreens=no
12013 fi
12014
12015 rm -rf conftest.dSYM
12016 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
12017       conftest$ac_exeext conftest.$ac_ext
12018 LIBS=$ac_check_lib_save_LIBS
12019 fi
12020 { $as_echo "$as_me:$LINENO: result: $ac_cv_lib_Xinerama_XineramaQueryScreens" >&5
12021 $as_echo "$ac_cv_lib_Xinerama_XineramaQueryScreens" >&6; }
12022 if test "x$ac_cv_lib_Xinerama_XineramaQueryScreens" = x""yes; then
12023   have_xinerama=yes; XINERAMA_LIBS="-lXinerama"
12024 else
12025   true
12026 fi
12027
12028   CPPFLAGS="$ac_save_CPPFLAGS"
12029   LDFLAGS="$ac_save_LDFLAGS"
12030 #  LIBS="$ac_save_LIBS"
12031
12032     fi
12033   fi
12034
12035   # if that succeeded, then we've really got it.
12036   if test "$have_xinerama" = yes; then
12037     cat >>confdefs.h <<\_ACEOF
12038 #define HAVE_XINERAMA 1
12039 _ACEOF
12040
12041   fi
12042
12043 elif test "$with_xinerama" != no; then
12044   echo "error: must be yes or no: --with-xinerama-ext=$with_xinerama"
12045   exit 1
12046 fi
12047
12048
12049 ###############################################################################
12050 #
12051 #       Check for the XINPUT server extension.
12052 #
12053 ###############################################################################
12054
12055 have_xinput=no
12056 with_xinput_req=unspecified
12057
12058 # Check whether --with-xinput-ext was given.
12059 if test "${with_xinput_ext+set}" = set; then
12060   withval=$with_xinput_ext; with_xinput="$withval"; with_xinput_req="$withval"
12061 else
12062   with_xinput=yes
12063 fi
12064
12065
12066
12067    case "$with_xinput" in
12068     yes) ;;
12069     no)  ;;
12070
12071     /*)
12072      { $as_echo "$as_me:$LINENO: checking for XINPUT headers" >&5
12073 $as_echo_n "checking for XINPUT headers... " >&6; }
12074      d=$with_xinput/include
12075      if test -d $d; then
12076        X_CFLAGS="-I$d $X_CFLAGS"
12077        { $as_echo "$as_me:$LINENO: result: $d" >&5
12078 $as_echo "$d" >&6; }
12079      else
12080        { $as_echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
12081 $as_echo "not found ($d: no such directory)" >&6; }
12082      fi
12083
12084      { $as_echo "$as_me:$LINENO: checking for XINPUT libs" >&5
12085 $as_echo_n "checking for XINPUT libs... " >&6; }
12086      d=$with_xinput/lib
12087      if test -d $d; then
12088        X_LIBS="-L$d $X_LIBS"
12089        { $as_echo "$as_me:$LINENO: result: $d" >&5
12090 $as_echo "$d" >&6; }
12091      else
12092        { $as_echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
12093 $as_echo "not found ($d: no such directory)" >&6; }
12094      fi
12095
12096      # replace the directory string with "yes".
12097      with_xinput_req="yes"
12098      with_xinput=$with_xinput_req
12099      ;;
12100
12101     *)
12102      echo ""
12103      echo "error: argument to --with-xinput-ext must be \"yes\", \"no\", or a directory."
12104      echo "       If it is a directory, then \`DIR/include' will be added to"
12105      echo "       the -I list, and \`DIR/lib' will be added to the -L list."
12106      exit 1
12107      ;;
12108    esac
12109
12110
12111 if test "$with_xinput" = yes; then
12112
12113   # first check for Xinput.h
12114
12115   ac_save_CPPFLAGS="$CPPFLAGS"
12116   if test \! -z "$includedir" ; then
12117     CPPFLAGS="$CPPFLAGS -I$includedir"
12118   fi
12119   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
12120   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
12121   { $as_echo "$as_me:$LINENO: checking for X11/extensions/XInput.h" >&5
12122 $as_echo_n "checking for X11/extensions/XInput.h... " >&6; }
12123 if test "${ac_cv_header_X11_extensions_XInput_h+set}" = set; then
12124   $as_echo_n "(cached) " >&6
12125 else
12126   cat >conftest.$ac_ext <<_ACEOF
12127 /* confdefs.h.  */
12128 _ACEOF
12129 cat confdefs.h >>conftest.$ac_ext
12130 cat >>conftest.$ac_ext <<_ACEOF
12131 /* end confdefs.h.  */
12132 #include <X11/Xlib.h>
12133
12134 #include <X11/extensions/XInput.h>
12135 _ACEOF
12136 rm -rf conftest.$ac_objext
12137 if { (ac_try="$ac_compile"
12138 case "(($ac_try" in
12139   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12140   *) ac_try_echo=$ac_try;;
12141 esac
12142 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
12143 $as_echo "$ac_try_echo") >&5
12144   (eval "$ac_compile") 2>conftest.er1
12145   ac_status=$?
12146   grep -v '^ *+' conftest.er1 >conftest.err
12147   rm -rf conftest.er1
12148   cat conftest.err >&5
12149   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
12150   (exit $ac_status); } && {
12151          test -z "$ac_c_werror_flag" ||
12152          test ! -s conftest.err
12153        } && test -s conftest.$ac_objext; then
12154   ac_cv_header_X11_extensions_XInput_h=yes
12155 else
12156   $as_echo "$as_me: failed program was:" >&5
12157 sed 's/^/| /' conftest.$ac_ext >&5
12158
12159         ac_cv_header_X11_extensions_XInput_h=no
12160 fi
12161
12162 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12163 fi
12164 { $as_echo "$as_me:$LINENO: result: $ac_cv_header_X11_extensions_XInput_h" >&5
12165 $as_echo "$ac_cv_header_X11_extensions_XInput_h" >&6; }
12166 if test "x$ac_cv_header_X11_extensions_XInput_h" = x""yes; then
12167   have_xinput=yes
12168 fi
12169
12170
12171   CPPFLAGS="$ac_save_CPPFLAGS"
12172
12173   # if that succeeded, then check for libXi
12174   if test "$have_xinput" = yes; then
12175     have_xinput=no
12176
12177   ac_save_CPPFLAGS="$CPPFLAGS"
12178   ac_save_LDFLAGS="$LDFLAGS"
12179 #  ac_save_LIBS="$LIBS"
12180
12181   if test \! -z "$includedir" ; then
12182     CPPFLAGS="$CPPFLAGS -I$includedir"
12183   fi
12184   # note: $X_CFLAGS includes $x_includes
12185   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
12186
12187   if test \! -z "$libdir" ; then
12188     LDFLAGS="$LDFLAGS -L$libdir"
12189   fi
12190   # note: $X_LIBS includes $x_libraries
12191   LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
12192
12193   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
12194   LDFLAGS=`eval eval eval eval eval eval eval eval eval echo $LDFLAGS`
12195   { $as_echo "$as_me:$LINENO: checking for XListInputDevices in -lXi" >&5
12196 $as_echo_n "checking for XListInputDevices in -lXi... " >&6; }
12197 if test "${ac_cv_lib_Xi_XListInputDevices+set}" = set; then
12198   $as_echo_n "(cached) " >&6
12199 else
12200   ac_check_lib_save_LIBS=$LIBS
12201 LIBS="-lXi -lXext -lX11 $LIBS"
12202 cat >conftest.$ac_ext <<_ACEOF
12203 /* confdefs.h.  */
12204 _ACEOF
12205 cat confdefs.h >>conftest.$ac_ext
12206 cat >>conftest.$ac_ext <<_ACEOF
12207 /* end confdefs.h.  */
12208
12209 /* Override any GCC internal prototype to avoid an error.
12210    Use char because int might match the return type of a GCC
12211    builtin and then its argument prototype would still apply.  */
12212 #ifdef __cplusplus
12213 extern "C"
12214 #endif
12215 char XListInputDevices ();
12216 int
12217 main ()
12218 {
12219 return XListInputDevices ();
12220   ;
12221   return 0;
12222 }
12223 _ACEOF
12224 rm -rf conftest.$ac_objext conftest$ac_exeext
12225 if { (ac_try="$ac_link"
12226 case "(($ac_try" in
12227   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12228   *) ac_try_echo=$ac_try;;
12229 esac
12230 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
12231 $as_echo "$ac_try_echo") >&5
12232   (eval "$ac_link") 2>conftest.er1
12233   ac_status=$?
12234   grep -v '^ *+' conftest.er1 >conftest.err
12235   rm -rf conftest.er1
12236   cat conftest.err >&5
12237   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
12238   (exit $ac_status); } && {
12239          test -z "$ac_c_werror_flag" ||
12240          test ! -s conftest.err
12241        } && test -s conftest$ac_exeext && {
12242          test "$cross_compiling" = yes ||
12243          $as_test_x conftest$ac_exeext
12244        }; then
12245   ac_cv_lib_Xi_XListInputDevices=yes
12246 else
12247   $as_echo "$as_me: failed program was:" >&5
12248 sed 's/^/| /' conftest.$ac_ext >&5
12249
12250         ac_cv_lib_Xi_XListInputDevices=no
12251 fi
12252
12253 rm -rf conftest.dSYM
12254 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
12255       conftest$ac_exeext conftest.$ac_ext
12256 LIBS=$ac_check_lib_save_LIBS
12257 fi
12258 { $as_echo "$as_me:$LINENO: result: $ac_cv_lib_Xi_XListInputDevices" >&5
12259 $as_echo "$ac_cv_lib_Xi_XListInputDevices" >&6; }
12260 if test "x$ac_cv_lib_Xi_XListInputDevices" = x""yes; then
12261   have_xinput=yes; SAVER_LIBS="$SAVER_LIBS -lXi"
12262 else
12263   true
12264 fi
12265
12266   CPPFLAGS="$ac_save_CPPFLAGS"
12267   LDFLAGS="$ac_save_LDFLAGS"
12268 #  LIBS="$ac_save_LIBS"
12269
12270   fi
12271
12272   # if that succeeded, then we've really got it.
12273   if test "$have_xinput" = yes; then
12274     cat >>confdefs.h <<\_ACEOF
12275 #define HAVE_XINPUT 1
12276 _ACEOF
12277
12278   fi
12279
12280 elif test "$with_xinput" != no; then
12281   echo "error: must be yes or no: --with-xinput-ext=$with_xinput"
12282   exit 1
12283 fi
12284
12285
12286 ###############################################################################
12287 #
12288 #       Check for the XF86VMODE server extension (for virtual screens.)
12289 #
12290 ###############################################################################
12291
12292 have_xf86vmode=no
12293 with_xf86vmode_req=unspecified
12294
12295 # Check whether --with-xf86vmode-ext was given.
12296 if test "${with_xf86vmode_ext+set}" = set; then
12297   withval=$with_xf86vmode_ext; with_xf86vmode="$withval"; with_xf86vmode_req="$withval"
12298 else
12299   with_xf86vmode=yes
12300 fi
12301
12302
12303
12304    case "$with_xf86vmode" in
12305     yes) ;;
12306     no)  ;;
12307
12308     /*)
12309      { $as_echo "$as_me:$LINENO: checking for xf86vmode headers" >&5
12310 $as_echo_n "checking for xf86vmode headers... " >&6; }
12311      d=$with_xf86vmode/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 xf86vmode libs" >&5
12322 $as_echo_n "checking for xf86vmode libs... " >&6; }
12323      d=$with_xf86vmode/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_xf86vmode_req="yes"
12335      with_xf86vmode=$with_xf86vmode_req
12336      ;;
12337
12338     *)
12339      echo ""
12340      echo "error: argument to --with-xf86vmode-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 VIDMODE_LIBS=""
12349
12350 if test "$with_xf86vmode" = yes; then
12351
12352   # first check for xf86vmode.h
12353
12354   ac_save_CPPFLAGS="$CPPFLAGS"
12355   if test \! -z "$includedir" ; then
12356     CPPFLAGS="$CPPFLAGS -I$includedir"
12357   fi
12358   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
12359   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
12360   { $as_echo "$as_me:$LINENO: checking for X11/extensions/xf86vmode.h" >&5
12361 $as_echo_n "checking for X11/extensions/xf86vmode.h... " >&6; }
12362 if test "${ac_cv_header_X11_extensions_xf86vmode_h+set}" = set; then
12363   $as_echo_n "(cached) " >&6
12364 else
12365   cat >conftest.$ac_ext <<_ACEOF
12366 /* confdefs.h.  */
12367 _ACEOF
12368 cat confdefs.h >>conftest.$ac_ext
12369 cat >>conftest.$ac_ext <<_ACEOF
12370 /* end confdefs.h.  */
12371 #include <X11/Xlib.h>
12372
12373 #include <X11/extensions/xf86vmode.h>
12374 _ACEOF
12375 rm -rf conftest.$ac_objext
12376 if { (ac_try="$ac_compile"
12377 case "(($ac_try" in
12378   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12379   *) ac_try_echo=$ac_try;;
12380 esac
12381 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
12382 $as_echo "$ac_try_echo") >&5
12383   (eval "$ac_compile") 2>conftest.er1
12384   ac_status=$?
12385   grep -v '^ *+' conftest.er1 >conftest.err
12386   rm -rf conftest.er1
12387   cat conftest.err >&5
12388   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
12389   (exit $ac_status); } && {
12390          test -z "$ac_c_werror_flag" ||
12391          test ! -s conftest.err
12392        } && test -s conftest.$ac_objext; then
12393   ac_cv_header_X11_extensions_xf86vmode_h=yes
12394 else
12395   $as_echo "$as_me: failed program was:" >&5
12396 sed 's/^/| /' conftest.$ac_ext >&5
12397
12398         ac_cv_header_X11_extensions_xf86vmode_h=no
12399 fi
12400
12401 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12402 fi
12403 { $as_echo "$as_me:$LINENO: result: $ac_cv_header_X11_extensions_xf86vmode_h" >&5
12404 $as_echo "$ac_cv_header_X11_extensions_xf86vmode_h" >&6; }
12405 if test "x$ac_cv_header_X11_extensions_xf86vmode_h" = x""yes; then
12406   have_xf86vmode=yes
12407 fi
12408
12409
12410   CPPFLAGS="$ac_save_CPPFLAGS"
12411
12412   # if that succeeded, then check for the -lXxf86vm
12413   if test "$have_xf86vmode" = yes; then
12414     have_xf86vmode=no
12415
12416   ac_save_CPPFLAGS="$CPPFLAGS"
12417   ac_save_LDFLAGS="$LDFLAGS"
12418 #  ac_save_LIBS="$LIBS"
12419
12420   if test \! -z "$includedir" ; then
12421     CPPFLAGS="$CPPFLAGS -I$includedir"
12422   fi
12423   # note: $X_CFLAGS includes $x_includes
12424   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
12425
12426   if test \! -z "$libdir" ; then
12427     LDFLAGS="$LDFLAGS -L$libdir"
12428   fi
12429   # note: $X_LIBS includes $x_libraries
12430   LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
12431
12432   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
12433   LDFLAGS=`eval eval eval eval eval eval eval eval eval echo $LDFLAGS`
12434   { $as_echo "$as_me:$LINENO: checking for XF86VidModeGetViewPort in -lXxf86vm" >&5
12435 $as_echo_n "checking for XF86VidModeGetViewPort in -lXxf86vm... " >&6; }
12436 if test "${ac_cv_lib_Xxf86vm_XF86VidModeGetViewPort+set}" = set; then
12437   $as_echo_n "(cached) " >&6
12438 else
12439   ac_check_lib_save_LIBS=$LIBS
12440 LIBS="-lXxf86vm -lXext -lX11 $LIBS"
12441 cat >conftest.$ac_ext <<_ACEOF
12442 /* confdefs.h.  */
12443 _ACEOF
12444 cat confdefs.h >>conftest.$ac_ext
12445 cat >>conftest.$ac_ext <<_ACEOF
12446 /* end confdefs.h.  */
12447
12448 /* Override any GCC internal prototype to avoid an error.
12449    Use char because int might match the return type of a GCC
12450    builtin and then its argument prototype would still apply.  */
12451 #ifdef __cplusplus
12452 extern "C"
12453 #endif
12454 char XF86VidModeGetViewPort ();
12455 int
12456 main ()
12457 {
12458 return XF86VidModeGetViewPort ();
12459   ;
12460   return 0;
12461 }
12462 _ACEOF
12463 rm -rf conftest.$ac_objext conftest$ac_exeext
12464 if { (ac_try="$ac_link"
12465 case "(($ac_try" in
12466   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12467   *) ac_try_echo=$ac_try;;
12468 esac
12469 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
12470 $as_echo "$ac_try_echo") >&5
12471   (eval "$ac_link") 2>conftest.er1
12472   ac_status=$?
12473   grep -v '^ *+' conftest.er1 >conftest.err
12474   rm -rf conftest.er1
12475   cat conftest.err >&5
12476   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
12477   (exit $ac_status); } && {
12478          test -z "$ac_c_werror_flag" ||
12479          test ! -s conftest.err
12480        } && test -s conftest$ac_exeext && {
12481          test "$cross_compiling" = yes ||
12482          $as_test_x conftest$ac_exeext
12483        }; then
12484   ac_cv_lib_Xxf86vm_XF86VidModeGetViewPort=yes
12485 else
12486   $as_echo "$as_me: failed program was:" >&5
12487 sed 's/^/| /' conftest.$ac_ext >&5
12488
12489         ac_cv_lib_Xxf86vm_XF86VidModeGetViewPort=no
12490 fi
12491
12492 rm -rf conftest.dSYM
12493 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
12494       conftest$ac_exeext conftest.$ac_ext
12495 LIBS=$ac_check_lib_save_LIBS
12496 fi
12497 { $as_echo "$as_me:$LINENO: result: $ac_cv_lib_Xxf86vm_XF86VidModeGetViewPort" >&5
12498 $as_echo "$ac_cv_lib_Xxf86vm_XF86VidModeGetViewPort" >&6; }
12499 if test "x$ac_cv_lib_Xxf86vm_XF86VidModeGetViewPort" = x""yes; then
12500   have_xf86vmode=yes;
12501                    VIDMODE_LIBS="-lXxf86vm";
12502                    SAVER_LIBS="$SAVER_LIBS $VIDMODE_LIBS"
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   # if that succeeded, then we've really got it.
12514   if test "$have_xf86vmode" = yes; then
12515     cat >>confdefs.h <<\_ACEOF
12516 #define HAVE_XF86VMODE 1
12517 _ACEOF
12518
12519   fi
12520
12521 elif test "$with_xf86vmode" != no; then
12522   echo "error: must be yes or no: --with-xf86vmode-ext=$with_xf86vmode"
12523   exit 1
12524 fi
12525
12526
12527 ###############################################################################
12528 #
12529 #       Check for the XF86VMODE server extension (for gamma fading.)
12530 #
12531 ###############################################################################
12532
12533 have_xf86gamma=no
12534 have_xf86gamma_ramp=no
12535 with_xf86gamma_req=unspecified
12536
12537 # Check whether --with-xf86gamma-ext was given.
12538 if test "${with_xf86gamma_ext+set}" = set; then
12539   withval=$with_xf86gamma_ext; with_xf86gamma="$withval"; with_xf86gamma_req="$withval"
12540 else
12541   with_xf86gamma=yes
12542 fi
12543
12544
12545
12546    case "$with_xf86gamma" in
12547     yes) ;;
12548     no)  ;;
12549
12550     /*)
12551      { $as_echo "$as_me:$LINENO: checking for xf86gamma headers" >&5
12552 $as_echo_n "checking for xf86gamma headers... " >&6; }
12553      d=$with_xf86gamma/include
12554      if test -d $d; then
12555        X_CFLAGS="-I$d $X_CFLAGS"
12556        { $as_echo "$as_me:$LINENO: result: $d" >&5
12557 $as_echo "$d" >&6; }
12558      else
12559        { $as_echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
12560 $as_echo "not found ($d: no such directory)" >&6; }
12561      fi
12562
12563      { $as_echo "$as_me:$LINENO: checking for xf86gamma libs" >&5
12564 $as_echo_n "checking for xf86gamma libs... " >&6; }
12565      d=$with_xf86gamma/lib
12566      if test -d $d; then
12567        X_LIBS="-L$d $X_LIBS"
12568        { $as_echo "$as_me:$LINENO: result: $d" >&5
12569 $as_echo "$d" >&6; }
12570      else
12571        { $as_echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
12572 $as_echo "not found ($d: no such directory)" >&6; }
12573      fi
12574
12575      # replace the directory string with "yes".
12576      with_xf86gamma_req="yes"
12577      with_xf86gamma=$with_xf86gamma_req
12578      ;;
12579
12580     *)
12581      echo ""
12582      echo "error: argument to --with-xf86gamma-ext must be \"yes\", \"no\", or a directory."
12583      echo "       If it is a directory, then \`DIR/include' will be added to"
12584      echo "       the -I list, and \`DIR/lib' will be added to the -L list."
12585      exit 1
12586      ;;
12587    esac
12588
12589
12590 if test "$with_xf86gamma" = yes; then
12591
12592   # first check for xf86vmode.h, if we haven't already
12593   if test "$have_xf86vmode" = yes; then
12594     have_xf86gamma=yes
12595   else
12596
12597   ac_save_CPPFLAGS="$CPPFLAGS"
12598   if test \! -z "$includedir" ; then
12599     CPPFLAGS="$CPPFLAGS -I$includedir"
12600   fi
12601   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
12602   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
12603   { $as_echo "$as_me:$LINENO: checking for X11/extensions/xf86vmode.h" >&5
12604 $as_echo_n "checking for X11/extensions/xf86vmode.h... " >&6; }
12605 if test "${ac_cv_header_X11_extensions_xf86vmode_h+set}" = set; then
12606   $as_echo_n "(cached) " >&6
12607 else
12608   cat >conftest.$ac_ext <<_ACEOF
12609 /* confdefs.h.  */
12610 _ACEOF
12611 cat confdefs.h >>conftest.$ac_ext
12612 cat >>conftest.$ac_ext <<_ACEOF
12613 /* end confdefs.h.  */
12614 #include <X11/Xlib.h>
12615
12616 #include <X11/extensions/xf86vmode.h>
12617 _ACEOF
12618 rm -rf conftest.$ac_objext
12619 if { (ac_try="$ac_compile"
12620 case "(($ac_try" in
12621   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12622   *) ac_try_echo=$ac_try;;
12623 esac
12624 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
12625 $as_echo "$ac_try_echo") >&5
12626   (eval "$ac_compile") 2>conftest.er1
12627   ac_status=$?
12628   grep -v '^ *+' conftest.er1 >conftest.err
12629   rm -rf conftest.er1
12630   cat conftest.err >&5
12631   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
12632   (exit $ac_status); } && {
12633          test -z "$ac_c_werror_flag" ||
12634          test ! -s conftest.err
12635        } && test -s conftest.$ac_objext; then
12636   ac_cv_header_X11_extensions_xf86vmode_h=yes
12637 else
12638   $as_echo "$as_me: failed program was:" >&5
12639 sed 's/^/| /' conftest.$ac_ext >&5
12640
12641         ac_cv_header_X11_extensions_xf86vmode_h=no
12642 fi
12643
12644 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12645 fi
12646 { $as_echo "$as_me:$LINENO: result: $ac_cv_header_X11_extensions_xf86vmode_h" >&5
12647 $as_echo "$ac_cv_header_X11_extensions_xf86vmode_h" >&6; }
12648 if test "x$ac_cv_header_X11_extensions_xf86vmode_h" = x""yes; then
12649   have_xf86gamma=yes
12650 fi
12651
12652
12653   CPPFLAGS="$ac_save_CPPFLAGS"
12654   fi
12655
12656   # if that succeeded, then check for the -lXxf86vm
12657   if test "$have_xf86gamma" = yes; then
12658     have_xf86gamma=no
12659
12660   ac_save_CPPFLAGS="$CPPFLAGS"
12661   ac_save_LDFLAGS="$LDFLAGS"
12662 #  ac_save_LIBS="$LIBS"
12663
12664   if test \! -z "$includedir" ; then
12665     CPPFLAGS="$CPPFLAGS -I$includedir"
12666   fi
12667   # note: $X_CFLAGS includes $x_includes
12668   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
12669
12670   if test \! -z "$libdir" ; then
12671     LDFLAGS="$LDFLAGS -L$libdir"
12672   fi
12673   # note: $X_LIBS includes $x_libraries
12674   LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
12675
12676   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
12677   LDFLAGS=`eval eval eval eval eval eval eval eval eval echo $LDFLAGS`
12678   { $as_echo "$as_me:$LINENO: checking for XF86VidModeSetGamma in -lXxf86vm" >&5
12679 $as_echo_n "checking for XF86VidModeSetGamma in -lXxf86vm... " >&6; }
12680 if test "${ac_cv_lib_Xxf86vm_XF86VidModeSetGamma+set}" = set; then
12681   $as_echo_n "(cached) " >&6
12682 else
12683   ac_check_lib_save_LIBS=$LIBS
12684 LIBS="-lXxf86vm -lXext -lX11 $LIBS"
12685 cat >conftest.$ac_ext <<_ACEOF
12686 /* confdefs.h.  */
12687 _ACEOF
12688 cat confdefs.h >>conftest.$ac_ext
12689 cat >>conftest.$ac_ext <<_ACEOF
12690 /* end confdefs.h.  */
12691
12692 /* Override any GCC internal prototype to avoid an error.
12693    Use char because int might match the return type of a GCC
12694    builtin and then its argument prototype would still apply.  */
12695 #ifdef __cplusplus
12696 extern "C"
12697 #endif
12698 char XF86VidModeSetGamma ();
12699 int
12700 main ()
12701 {
12702 return XF86VidModeSetGamma ();
12703   ;
12704   return 0;
12705 }
12706 _ACEOF
12707 rm -rf conftest.$ac_objext conftest$ac_exeext
12708 if { (ac_try="$ac_link"
12709 case "(($ac_try" in
12710   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12711   *) ac_try_echo=$ac_try;;
12712 esac
12713 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
12714 $as_echo "$ac_try_echo") >&5
12715   (eval "$ac_link") 2>conftest.er1
12716   ac_status=$?
12717   grep -v '^ *+' conftest.er1 >conftest.err
12718   rm -rf conftest.er1
12719   cat conftest.err >&5
12720   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
12721   (exit $ac_status); } && {
12722          test -z "$ac_c_werror_flag" ||
12723          test ! -s conftest.err
12724        } && test -s conftest$ac_exeext && {
12725          test "$cross_compiling" = yes ||
12726          $as_test_x conftest$ac_exeext
12727        }; then
12728   ac_cv_lib_Xxf86vm_XF86VidModeSetGamma=yes
12729 else
12730   $as_echo "$as_me: failed program was:" >&5
12731 sed 's/^/| /' conftest.$ac_ext >&5
12732
12733         ac_cv_lib_Xxf86vm_XF86VidModeSetGamma=no
12734 fi
12735
12736 rm -rf conftest.dSYM
12737 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
12738       conftest$ac_exeext conftest.$ac_ext
12739 LIBS=$ac_check_lib_save_LIBS
12740 fi
12741 { $as_echo "$as_me:$LINENO: result: $ac_cv_lib_Xxf86vm_XF86VidModeSetGamma" >&5
12742 $as_echo "$ac_cv_lib_Xxf86vm_XF86VidModeSetGamma" >&6; }
12743 if test "x$ac_cv_lib_Xxf86vm_XF86VidModeSetGamma" = x""yes; then
12744   have_xf86gamma=yes
12745 else
12746   true
12747 fi
12748
12749   CPPFLAGS="$ac_save_CPPFLAGS"
12750   LDFLAGS="$ac_save_LDFLAGS"
12751 #  LIBS="$ac_save_LIBS"
12752
12753   fi
12754
12755   # check for the Ramp versions of the functions too.
12756   if test "$have_xf86gamma" = yes; then
12757     have_xf86gamma_ramp=no
12758
12759   ac_save_CPPFLAGS="$CPPFLAGS"
12760   ac_save_LDFLAGS="$LDFLAGS"
12761 #  ac_save_LIBS="$LIBS"
12762
12763   if test \! -z "$includedir" ; then
12764     CPPFLAGS="$CPPFLAGS -I$includedir"
12765   fi
12766   # note: $X_CFLAGS includes $x_includes
12767   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
12768
12769   if test \! -z "$libdir" ; then
12770     LDFLAGS="$LDFLAGS -L$libdir"
12771   fi
12772   # note: $X_LIBS includes $x_libraries
12773   LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
12774
12775   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
12776   LDFLAGS=`eval eval eval eval eval eval eval eval eval echo $LDFLAGS`
12777   { $as_echo "$as_me:$LINENO: checking for XF86VidModeSetGammaRamp in -lXxf86vm" >&5
12778 $as_echo_n "checking for XF86VidModeSetGammaRamp in -lXxf86vm... " >&6; }
12779 if test "${ac_cv_lib_Xxf86vm_XF86VidModeSetGammaRamp+set}" = set; then
12780   $as_echo_n "(cached) " >&6
12781 else
12782   ac_check_lib_save_LIBS=$LIBS
12783 LIBS="-lXxf86vm -lXext -lX11 $LIBS"
12784 cat >conftest.$ac_ext <<_ACEOF
12785 /* confdefs.h.  */
12786 _ACEOF
12787 cat confdefs.h >>conftest.$ac_ext
12788 cat >>conftest.$ac_ext <<_ACEOF
12789 /* end confdefs.h.  */
12790
12791 /* Override any GCC internal prototype to avoid an error.
12792    Use char because int might match the return type of a GCC
12793    builtin and then its argument prototype would still apply.  */
12794 #ifdef __cplusplus
12795 extern "C"
12796 #endif
12797 char XF86VidModeSetGammaRamp ();
12798 int
12799 main ()
12800 {
12801 return XF86VidModeSetGammaRamp ();
12802   ;
12803   return 0;
12804 }
12805 _ACEOF
12806 rm -rf conftest.$ac_objext conftest$ac_exeext
12807 if { (ac_try="$ac_link"
12808 case "(($ac_try" in
12809   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12810   *) ac_try_echo=$ac_try;;
12811 esac
12812 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
12813 $as_echo "$ac_try_echo") >&5
12814   (eval "$ac_link") 2>conftest.er1
12815   ac_status=$?
12816   grep -v '^ *+' conftest.er1 >conftest.err
12817   rm -rf conftest.er1
12818   cat conftest.err >&5
12819   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
12820   (exit $ac_status); } && {
12821          test -z "$ac_c_werror_flag" ||
12822          test ! -s conftest.err
12823        } && test -s conftest$ac_exeext && {
12824          test "$cross_compiling" = yes ||
12825          $as_test_x conftest$ac_exeext
12826        }; then
12827   ac_cv_lib_Xxf86vm_XF86VidModeSetGammaRamp=yes
12828 else
12829   $as_echo "$as_me: failed program was:" >&5
12830 sed 's/^/| /' conftest.$ac_ext >&5
12831
12832         ac_cv_lib_Xxf86vm_XF86VidModeSetGammaRamp=no
12833 fi
12834
12835 rm -rf conftest.dSYM
12836 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
12837       conftest$ac_exeext conftest.$ac_ext
12838 LIBS=$ac_check_lib_save_LIBS
12839 fi
12840 { $as_echo "$as_me:$LINENO: result: $ac_cv_lib_Xxf86vm_XF86VidModeSetGammaRamp" >&5
12841 $as_echo "$ac_cv_lib_Xxf86vm_XF86VidModeSetGammaRamp" >&6; }
12842 if test "x$ac_cv_lib_Xxf86vm_XF86VidModeSetGammaRamp" = x""yes; then
12843   have_xf86gamma_ramp=yes
12844 else
12845   true
12846 fi
12847
12848   CPPFLAGS="$ac_save_CPPFLAGS"
12849   LDFLAGS="$ac_save_LDFLAGS"
12850 #  LIBS="$ac_save_LIBS"
12851
12852   fi
12853
12854   # if those tests succeeded, then we've really got the functions.
12855   if test "$have_xf86gamma" = yes; then
12856     cat >>confdefs.h <<\_ACEOF
12857 #define HAVE_XF86VMODE_GAMMA 1
12858 _ACEOF
12859
12860   fi
12861
12862   if test "$have_xf86gamma_ramp" = yes; then
12863     cat >>confdefs.h <<\_ACEOF
12864 #define HAVE_XF86VMODE_GAMMA_RAMP 1
12865 _ACEOF
12866
12867   fi
12868
12869   # pull in the lib, if we haven't already
12870   if test "$have_xf86gamma" = yes -a "$have_xf86vmode" = no; then
12871     SAVER_LIBS="$SAVER_LIBS -lXxf86vm"
12872   fi
12873
12874 elif test "$with_xf86gamma" != no; then
12875   echo "error: must be yes or no: --with-xf86gamma-ext=$with_xf86vmode"
12876   exit 1
12877 fi
12878
12879
12880 ###############################################################################
12881 #
12882 #       Check for the RANDR (Resize and Rotate) server extension.
12883 #
12884 #       We need this to detect when the resolution of the desktop
12885 #       has changed out from under us (this is a newer, different
12886 #       mechanism than the XF86VMODE virtual viewports.)
12887 #
12888 ###############################################################################
12889
12890 have_randr=no
12891 with_randr_req=unspecified
12892
12893 # Check whether --with-randr-ext was given.
12894 if test "${with_randr_ext+set}" = set; then
12895   withval=$with_randr_ext; with_randr="$withval"; with_randr_req="$withval"
12896 else
12897   with_randr=yes
12898 fi
12899
12900
12901
12902    case "$with_randr" in
12903     yes) ;;
12904     no)  ;;
12905
12906     /*)
12907      { $as_echo "$as_me:$LINENO: checking for RANDR headers" >&5
12908 $as_echo_n "checking for RANDR headers... " >&6; }
12909      d=$with_randr/include
12910      if test -d $d; then
12911        X_CFLAGS="-I$d $X_CFLAGS"
12912        { $as_echo "$as_me:$LINENO: result: $d" >&5
12913 $as_echo "$d" >&6; }
12914      else
12915        { $as_echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
12916 $as_echo "not found ($d: no such directory)" >&6; }
12917      fi
12918
12919      { $as_echo "$as_me:$LINENO: checking for RANDR libs" >&5
12920 $as_echo_n "checking for RANDR libs... " >&6; }
12921      d=$with_randr/lib
12922      if test -d $d; then
12923        X_LIBS="-L$d $X_LIBS"
12924        { $as_echo "$as_me:$LINENO: result: $d" >&5
12925 $as_echo "$d" >&6; }
12926      else
12927        { $as_echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
12928 $as_echo "not found ($d: no such directory)" >&6; }
12929      fi
12930
12931      # replace the directory string with "yes".
12932      with_randr_req="yes"
12933      with_randr=$with_randr_req
12934      ;;
12935
12936     *)
12937      echo ""
12938      echo "error: argument to --with-randr-ext must be \"yes\", \"no\", or a directory."
12939      echo "       If it is a directory, then \`DIR/include' will be added to"
12940      echo "       the -I list, and \`DIR/lib' will be added to the -L list."
12941      exit 1
12942      ;;
12943    esac
12944
12945
12946 if test "$with_randr" = yes; then
12947
12948   # first check for Xrandr.h
12949
12950   ac_save_CPPFLAGS="$CPPFLAGS"
12951   if test \! -z "$includedir" ; then
12952     CPPFLAGS="$CPPFLAGS -I$includedir"
12953   fi
12954   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
12955   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
12956   { $as_echo "$as_me:$LINENO: checking for X11/extensions/Xrandr.h" >&5
12957 $as_echo_n "checking for X11/extensions/Xrandr.h... " >&6; }
12958 if test "${ac_cv_header_X11_extensions_Xrandr_h+set}" = set; then
12959   $as_echo_n "(cached) " >&6
12960 else
12961   cat >conftest.$ac_ext <<_ACEOF
12962 /* confdefs.h.  */
12963 _ACEOF
12964 cat confdefs.h >>conftest.$ac_ext
12965 cat >>conftest.$ac_ext <<_ACEOF
12966 /* end confdefs.h.  */
12967 #include <X11/Xlib.h>
12968
12969 #include <X11/extensions/Xrandr.h>
12970 _ACEOF
12971 rm -rf conftest.$ac_objext
12972 if { (ac_try="$ac_compile"
12973 case "(($ac_try" in
12974   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12975   *) ac_try_echo=$ac_try;;
12976 esac
12977 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
12978 $as_echo "$ac_try_echo") >&5
12979   (eval "$ac_compile") 2>conftest.er1
12980   ac_status=$?
12981   grep -v '^ *+' conftest.er1 >conftest.err
12982   rm -rf conftest.er1
12983   cat conftest.err >&5
12984   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
12985   (exit $ac_status); } && {
12986          test -z "$ac_c_werror_flag" ||
12987          test ! -s conftest.err
12988        } && test -s conftest.$ac_objext; then
12989   ac_cv_header_X11_extensions_Xrandr_h=yes
12990 else
12991   $as_echo "$as_me: failed program was:" >&5
12992 sed 's/^/| /' conftest.$ac_ext >&5
12993
12994         ac_cv_header_X11_extensions_Xrandr_h=no
12995 fi
12996
12997 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12998 fi
12999 { $as_echo "$as_me:$LINENO: result: $ac_cv_header_X11_extensions_Xrandr_h" >&5
13000 $as_echo "$ac_cv_header_X11_extensions_Xrandr_h" >&6; }
13001 if test "x$ac_cv_header_X11_extensions_Xrandr_h" = x""yes; then
13002   have_randr=yes
13003 fi
13004
13005
13006   CPPFLAGS="$ac_save_CPPFLAGS"
13007
13008   # if that succeeded, then check for the XRR code in the libraries
13009   if test "$have_randr" = yes; then
13010
13011     # RANDR probably needs -lXrender
13012     xrender_libs=
13013
13014   ac_save_CPPFLAGS="$CPPFLAGS"
13015   ac_save_LDFLAGS="$LDFLAGS"
13016 #  ac_save_LIBS="$LIBS"
13017
13018   if test \! -z "$includedir" ; then
13019     CPPFLAGS="$CPPFLAGS -I$includedir"
13020   fi
13021   # note: $X_CFLAGS includes $x_includes
13022   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
13023
13024   if test \! -z "$libdir" ; then
13025     LDFLAGS="$LDFLAGS -L$libdir"
13026   fi
13027   # note: $X_LIBS includes $x_libraries
13028   LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
13029
13030   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
13031   LDFLAGS=`eval eval eval eval eval eval eval eval eval echo $LDFLAGS`
13032   { $as_echo "$as_me:$LINENO: checking for XRenderSetSubpixelOrder in -lXrender" >&5
13033 $as_echo_n "checking for XRenderSetSubpixelOrder in -lXrender... " >&6; }
13034 if test "${ac_cv_lib_Xrender_XRenderSetSubpixelOrder+set}" = set; then
13035   $as_echo_n "(cached) " >&6
13036 else
13037   ac_check_lib_save_LIBS=$LIBS
13038 LIBS="-lXrender -lXext -lX11 $LIBS"
13039 cat >conftest.$ac_ext <<_ACEOF
13040 /* confdefs.h.  */
13041 _ACEOF
13042 cat confdefs.h >>conftest.$ac_ext
13043 cat >>conftest.$ac_ext <<_ACEOF
13044 /* end confdefs.h.  */
13045
13046 /* Override any GCC internal prototype to avoid an error.
13047    Use char because int might match the return type of a GCC
13048    builtin and then its argument prototype would still apply.  */
13049 #ifdef __cplusplus
13050 extern "C"
13051 #endif
13052 char XRenderSetSubpixelOrder ();
13053 int
13054 main ()
13055 {
13056 return XRenderSetSubpixelOrder ();
13057   ;
13058   return 0;
13059 }
13060 _ACEOF
13061 rm -rf conftest.$ac_objext conftest$ac_exeext
13062 if { (ac_try="$ac_link"
13063 case "(($ac_try" in
13064   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13065   *) ac_try_echo=$ac_try;;
13066 esac
13067 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
13068 $as_echo "$ac_try_echo") >&5
13069   (eval "$ac_link") 2>conftest.er1
13070   ac_status=$?
13071   grep -v '^ *+' conftest.er1 >conftest.err
13072   rm -rf conftest.er1
13073   cat conftest.err >&5
13074   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
13075   (exit $ac_status); } && {
13076          test -z "$ac_c_werror_flag" ||
13077          test ! -s conftest.err
13078        } && test -s conftest$ac_exeext && {
13079          test "$cross_compiling" = yes ||
13080          $as_test_x conftest$ac_exeext
13081        }; then
13082   ac_cv_lib_Xrender_XRenderSetSubpixelOrder=yes
13083 else
13084   $as_echo "$as_me: failed program was:" >&5
13085 sed 's/^/| /' conftest.$ac_ext >&5
13086
13087         ac_cv_lib_Xrender_XRenderSetSubpixelOrder=no
13088 fi
13089
13090 rm -rf conftest.dSYM
13091 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
13092       conftest$ac_exeext conftest.$ac_ext
13093 LIBS=$ac_check_lib_save_LIBS
13094 fi
13095 { $as_echo "$as_me:$LINENO: result: $ac_cv_lib_Xrender_XRenderSetSubpixelOrder" >&5
13096 $as_echo "$ac_cv_lib_Xrender_XRenderSetSubpixelOrder" >&6; }
13097 if test "x$ac_cv_lib_Xrender_XRenderSetSubpixelOrder" = x""yes; then
13098   xrender_libs="-lXrender"
13099 else
13100   true
13101 fi
13102
13103   CPPFLAGS="$ac_save_CPPFLAGS"
13104   LDFLAGS="$ac_save_LDFLAGS"
13105 #  LIBS="$ac_save_LIBS"
13106
13107
13108     # first look for RANDR in -lXext
13109     have_randr=no
13110
13111   ac_save_CPPFLAGS="$CPPFLAGS"
13112   ac_save_LDFLAGS="$LDFLAGS"
13113 #  ac_save_LIBS="$LIBS"
13114
13115   if test \! -z "$includedir" ; then
13116     CPPFLAGS="$CPPFLAGS -I$includedir"
13117   fi
13118   # note: $X_CFLAGS includes $x_includes
13119   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
13120
13121   if test \! -z "$libdir" ; then
13122     LDFLAGS="$LDFLAGS -L$libdir"
13123   fi
13124   # note: $X_LIBS includes $x_libraries
13125   LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
13126
13127   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
13128   LDFLAGS=`eval eval eval eval eval eval eval eval eval echo $LDFLAGS`
13129   { $as_echo "$as_me:$LINENO: checking for XRRGetScreenInfo in -lXext" >&5
13130 $as_echo_n "checking for XRRGetScreenInfo in -lXext... " >&6; }
13131 if test "${ac_cv_lib_Xext_XRRGetScreenInfo+set}" = set; then
13132   $as_echo_n "(cached) " >&6
13133 else
13134   ac_check_lib_save_LIBS=$LIBS
13135 LIBS="-lXext $xrender_libs -lXext -lX11 $LIBS"
13136 cat >conftest.$ac_ext <<_ACEOF
13137 /* confdefs.h.  */
13138 _ACEOF
13139 cat confdefs.h >>conftest.$ac_ext
13140 cat >>conftest.$ac_ext <<_ACEOF
13141 /* end confdefs.h.  */
13142
13143 /* Override any GCC internal prototype to avoid an error.
13144    Use char because int might match the return type of a GCC
13145    builtin and then its argument prototype would still apply.  */
13146 #ifdef __cplusplus
13147 extern "C"
13148 #endif
13149 char XRRGetScreenInfo ();
13150 int
13151 main ()
13152 {
13153 return XRRGetScreenInfo ();
13154   ;
13155   return 0;
13156 }
13157 _ACEOF
13158 rm -rf conftest.$ac_objext conftest$ac_exeext
13159 if { (ac_try="$ac_link"
13160 case "(($ac_try" in
13161   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13162   *) ac_try_echo=$ac_try;;
13163 esac
13164 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
13165 $as_echo "$ac_try_echo") >&5
13166   (eval "$ac_link") 2>conftest.er1
13167   ac_status=$?
13168   grep -v '^ *+' conftest.er1 >conftest.err
13169   rm -rf conftest.er1
13170   cat conftest.err >&5
13171   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
13172   (exit $ac_status); } && {
13173          test -z "$ac_c_werror_flag" ||
13174          test ! -s conftest.err
13175        } && test -s conftest$ac_exeext && {
13176          test "$cross_compiling" = yes ||
13177          $as_test_x conftest$ac_exeext
13178        }; then
13179   ac_cv_lib_Xext_XRRGetScreenInfo=yes
13180 else
13181   $as_echo "$as_me: failed program was:" >&5
13182 sed 's/^/| /' conftest.$ac_ext >&5
13183
13184         ac_cv_lib_Xext_XRRGetScreenInfo=no
13185 fi
13186
13187 rm -rf conftest.dSYM
13188 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
13189       conftest$ac_exeext conftest.$ac_ext
13190 LIBS=$ac_check_lib_save_LIBS
13191 fi
13192 { $as_echo "$as_me:$LINENO: result: $ac_cv_lib_Xext_XRRGetScreenInfo" >&5
13193 $as_echo "$ac_cv_lib_Xext_XRRGetScreenInfo" >&6; }
13194 if test "x$ac_cv_lib_Xext_XRRGetScreenInfo" = x""yes; then
13195   have_randr=yes; SAVER_LIBS="$SAVER_LIBS $xrender_libs"
13196 else
13197   true
13198 fi
13199
13200   CPPFLAGS="$ac_save_CPPFLAGS"
13201   LDFLAGS="$ac_save_LDFLAGS"
13202 #  LIBS="$ac_save_LIBS"
13203
13204
13205     # if that failed, look in -lXrandr
13206     if test "$have_randr" = no; then
13207
13208   ac_save_CPPFLAGS="$CPPFLAGS"
13209   ac_save_LDFLAGS="$LDFLAGS"
13210 #  ac_save_LIBS="$LIBS"
13211
13212   if test \! -z "$includedir" ; then
13213     CPPFLAGS="$CPPFLAGS -I$includedir"
13214   fi
13215   # note: $X_CFLAGS includes $x_includes
13216   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
13217
13218   if test \! -z "$libdir" ; then
13219     LDFLAGS="$LDFLAGS -L$libdir"
13220   fi
13221   # note: $X_LIBS includes $x_libraries
13222   LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
13223
13224   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
13225   LDFLAGS=`eval eval eval eval eval eval eval eval eval echo $LDFLAGS`
13226   { $as_echo "$as_me:$LINENO: checking for XRRGetScreenInfo in -lXrandr" >&5
13227 $as_echo_n "checking for XRRGetScreenInfo in -lXrandr... " >&6; }
13228 if test "${ac_cv_lib_Xrandr_XRRGetScreenInfo+set}" = set; then
13229   $as_echo_n "(cached) " >&6
13230 else
13231   ac_check_lib_save_LIBS=$LIBS
13232 LIBS="-lXrandr $xrender_libs -lXext -lX11 $LIBS"
13233 cat >conftest.$ac_ext <<_ACEOF
13234 /* confdefs.h.  */
13235 _ACEOF
13236 cat confdefs.h >>conftest.$ac_ext
13237 cat >>conftest.$ac_ext <<_ACEOF
13238 /* end confdefs.h.  */
13239
13240 /* Override any GCC internal prototype to avoid an error.
13241    Use char because int might match the return type of a GCC
13242    builtin and then its argument prototype would still apply.  */
13243 #ifdef __cplusplus
13244 extern "C"
13245 #endif
13246 char XRRGetScreenInfo ();
13247 int
13248 main ()
13249 {
13250 return XRRGetScreenInfo ();
13251   ;
13252   return 0;
13253 }
13254 _ACEOF
13255 rm -rf conftest.$ac_objext conftest$ac_exeext
13256 if { (ac_try="$ac_link"
13257 case "(($ac_try" in
13258   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13259   *) ac_try_echo=$ac_try;;
13260 esac
13261 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
13262 $as_echo "$ac_try_echo") >&5
13263   (eval "$ac_link") 2>conftest.er1
13264   ac_status=$?
13265   grep -v '^ *+' conftest.er1 >conftest.err
13266   rm -rf conftest.er1
13267   cat conftest.err >&5
13268   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
13269   (exit $ac_status); } && {
13270          test -z "$ac_c_werror_flag" ||
13271          test ! -s conftest.err
13272        } && test -s conftest$ac_exeext && {
13273          test "$cross_compiling" = yes ||
13274          $as_test_x conftest$ac_exeext
13275        }; then
13276   ac_cv_lib_Xrandr_XRRGetScreenInfo=yes
13277 else
13278   $as_echo "$as_me: failed program was:" >&5
13279 sed 's/^/| /' conftest.$ac_ext >&5
13280
13281         ac_cv_lib_Xrandr_XRRGetScreenInfo=no
13282 fi
13283
13284 rm -rf conftest.dSYM
13285 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
13286       conftest$ac_exeext conftest.$ac_ext
13287 LIBS=$ac_check_lib_save_LIBS
13288 fi
13289 { $as_echo "$as_me:$LINENO: result: $ac_cv_lib_Xrandr_XRRGetScreenInfo" >&5
13290 $as_echo "$ac_cv_lib_Xrandr_XRRGetScreenInfo" >&6; }
13291 if test "x$ac_cv_lib_Xrandr_XRRGetScreenInfo" = x""yes; then
13292   have_randr=yes; SAVER_LIBS="$SAVER_LIBS -lXrandr $xrender_libs"
13293 else
13294   true
13295 fi
13296
13297   CPPFLAGS="$ac_save_CPPFLAGS"
13298   LDFLAGS="$ac_save_LDFLAGS"
13299 #  LIBS="$ac_save_LIBS"
13300
13301     fi
13302   fi
13303
13304   # if that succeeded, then we've really got it.
13305   if test "$have_randr" = yes; then
13306     cat >>confdefs.h <<\_ACEOF
13307 #define HAVE_RANDR 1
13308 _ACEOF
13309
13310
13311     # Now check for version 1.2 in the same libs.
13312     # Try to compile, since on MacOS 10.5.7, headers are older than libs!
13313     { $as_echo "$as_me:$LINENO: checking for XRRGetScreenResources" >&5
13314 $as_echo_n "checking for XRRGetScreenResources... " >&6; }
13315 if test "${ac_cv_randr_12+set}" = set; then
13316   $as_echo_n "(cached) " >&6
13317 else
13318   ac_cv_randr_12=no
13319
13320   ac_save_CPPFLAGS="$CPPFLAGS"
13321   if test \! -z "$includedir" ; then
13322     CPPFLAGS="$CPPFLAGS -I$includedir"
13323   fi
13324   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
13325   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
13326   cat >conftest.$ac_ext <<_ACEOF
13327 /* confdefs.h.  */
13328 _ACEOF
13329 cat confdefs.h >>conftest.$ac_ext
13330 cat >>conftest.$ac_ext <<_ACEOF
13331 /* end confdefs.h.  */
13332 #include <stdlib.h>
13333                          #include <X11/Xlib.h>
13334                          #include <X11/extensions/Xrandr.h>
13335 int
13336 main ()
13337 {
13338 XRRScreenResources *res =
13339                            XRRGetScreenResources (0, 0);
13340   ;
13341   return 0;
13342 }
13343 _ACEOF
13344 rm -rf conftest.$ac_objext
13345 if { (ac_try="$ac_compile"
13346 case "(($ac_try" in
13347   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13348   *) ac_try_echo=$ac_try;;
13349 esac
13350 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
13351 $as_echo "$ac_try_echo") >&5
13352   (eval "$ac_compile") 2>conftest.er1
13353   ac_status=$?
13354   grep -v '^ *+' conftest.er1 >conftest.err
13355   rm -rf conftest.er1
13356   cat conftest.err >&5
13357   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
13358   (exit $ac_status); } && {
13359          test -z "$ac_c_werror_flag" ||
13360          test ! -s conftest.err
13361        } && test -s conftest.$ac_objext; then
13362   ac_cv_randr_12=yes
13363 else
13364   $as_echo "$as_me: failed program was:" >&5
13365 sed 's/^/| /' conftest.$ac_ext >&5
13366
13367         ac_cv_randr_12=no
13368 fi
13369
13370 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13371   CPPFLAGS="$ac_save_CPPFLAGS"
13372 fi
13373 { $as_echo "$as_me:$LINENO: result: $ac_cv_randr_12" >&5
13374 $as_echo "$ac_cv_randr_12" >&6; }
13375     if test "$ac_cv_randr_12" = yes ; then
13376       cat >>confdefs.h <<\_ACEOF
13377 #define HAVE_RANDR_12 1
13378 _ACEOF
13379
13380     fi
13381 #   AC_CHECK_X_LIB(c, XRRGetOutputInfo, [AC_DEFINE(HAVE_RANDR_12)],
13382 #                  [true], $SAVER_LIBS)
13383   fi
13384
13385
13386 elif test "$with_randr" != no; then
13387   echo "error: must be yes or no: --with-randr-ext=$with_randr"
13388   exit 1
13389 fi
13390
13391
13392 ###############################################################################
13393 #
13394 #       Check for XF86MiscSetGrabKeysState (but only bother if we are already
13395 #       using other XF86 stuff.)
13396 #
13397 ###############################################################################
13398
13399 have_xf86miscsetgrabkeysstate=no
13400 if test "$have_xf86gamma" = yes -o "$have_xf86vmode" = yes; then
13401
13402   ac_save_CPPFLAGS="$CPPFLAGS"
13403   ac_save_LDFLAGS="$LDFLAGS"
13404 #  ac_save_LIBS="$LIBS"
13405
13406   if test \! -z "$includedir" ; then
13407     CPPFLAGS="$CPPFLAGS -I$includedir"
13408   fi
13409   # note: $X_CFLAGS includes $x_includes
13410   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
13411
13412   if test \! -z "$libdir" ; then
13413     LDFLAGS="$LDFLAGS -L$libdir"
13414   fi
13415   # note: $X_LIBS includes $x_libraries
13416   LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
13417
13418   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
13419   LDFLAGS=`eval eval eval eval eval eval eval eval eval echo $LDFLAGS`
13420   { $as_echo "$as_me:$LINENO: checking for XF86MiscSetGrabKeysState in -lXxf86misc" >&5
13421 $as_echo_n "checking for XF86MiscSetGrabKeysState in -lXxf86misc... " >&6; }
13422 if test "${ac_cv_lib_Xxf86misc_XF86MiscSetGrabKeysState+set}" = set; then
13423   $as_echo_n "(cached) " >&6
13424 else
13425   ac_check_lib_save_LIBS=$LIBS
13426 LIBS="-lXxf86misc -lXext -lX11 $LIBS"
13427 cat >conftest.$ac_ext <<_ACEOF
13428 /* confdefs.h.  */
13429 _ACEOF
13430 cat confdefs.h >>conftest.$ac_ext
13431 cat >>conftest.$ac_ext <<_ACEOF
13432 /* end confdefs.h.  */
13433
13434 /* Override any GCC internal prototype to avoid an error.
13435    Use char because int might match the return type of a GCC
13436    builtin and then its argument prototype would still apply.  */
13437 #ifdef __cplusplus
13438 extern "C"
13439 #endif
13440 char XF86MiscSetGrabKeysState ();
13441 int
13442 main ()
13443 {
13444 return XF86MiscSetGrabKeysState ();
13445   ;
13446   return 0;
13447 }
13448 _ACEOF
13449 rm -rf conftest.$ac_objext conftest$ac_exeext
13450 if { (ac_try="$ac_link"
13451 case "(($ac_try" in
13452   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13453   *) ac_try_echo=$ac_try;;
13454 esac
13455 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
13456 $as_echo "$ac_try_echo") >&5
13457   (eval "$ac_link") 2>conftest.er1
13458   ac_status=$?
13459   grep -v '^ *+' conftest.er1 >conftest.err
13460   rm -rf conftest.er1
13461   cat conftest.err >&5
13462   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
13463   (exit $ac_status); } && {
13464          test -z "$ac_c_werror_flag" ||
13465          test ! -s conftest.err
13466        } && test -s conftest$ac_exeext && {
13467          test "$cross_compiling" = yes ||
13468          $as_test_x conftest$ac_exeext
13469        }; then
13470   ac_cv_lib_Xxf86misc_XF86MiscSetGrabKeysState=yes
13471 else
13472   $as_echo "$as_me: failed program was:" >&5
13473 sed 's/^/| /' conftest.$ac_ext >&5
13474
13475         ac_cv_lib_Xxf86misc_XF86MiscSetGrabKeysState=no
13476 fi
13477
13478 rm -rf conftest.dSYM
13479 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
13480       conftest$ac_exeext conftest.$ac_ext
13481 LIBS=$ac_check_lib_save_LIBS
13482 fi
13483 { $as_echo "$as_me:$LINENO: result: $ac_cv_lib_Xxf86misc_XF86MiscSetGrabKeysState" >&5
13484 $as_echo "$ac_cv_lib_Xxf86misc_XF86MiscSetGrabKeysState" >&6; }
13485 if test "x$ac_cv_lib_Xxf86misc_XF86MiscSetGrabKeysState" = x""yes; then
13486   have_xf86miscsetgrabkeysstate=yes
13487 else
13488   true
13489 fi
13490
13491   CPPFLAGS="$ac_save_CPPFLAGS"
13492   LDFLAGS="$ac_save_LDFLAGS"
13493 #  LIBS="$ac_save_LIBS"
13494
13495   if test "$have_xf86miscsetgrabkeysstate" = yes ; then
13496     SAVER_LIBS="$SAVER_LIBS -lXxf86misc"
13497     cat >>confdefs.h <<\_ACEOF
13498 #define HAVE_XF86MISCSETGRABKEYSSTATE 1
13499 _ACEOF
13500
13501   fi
13502 fi
13503
13504
13505 ###############################################################################
13506 #
13507 #       Check for HP XHPDisableReset and XHPEnableReset.
13508 #
13509 ###############################################################################
13510
13511 { $as_echo "$as_me:$LINENO: checking for XHPDisableReset in X11/XHPlib.h" >&5
13512 $as_echo_n "checking for XHPDisableReset in X11/XHPlib.h... " >&6; }
13513
13514   ac_save_CPPFLAGS="$CPPFLAGS"
13515   if test \! -z "$includedir" ; then
13516     CPPFLAGS="$CPPFLAGS -I$includedir"
13517   fi
13518   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
13519   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
13520   cat >conftest.$ac_ext <<_ACEOF
13521 /* confdefs.h.  */
13522 _ACEOF
13523 cat confdefs.h >>conftest.$ac_ext
13524 cat >>conftest.$ac_ext <<_ACEOF
13525 /* end confdefs.h.  */
13526 #include <X11/XHPlib.h>
13527
13528 _ACEOF
13529 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
13530   $EGREP "XHPDisableReset" >/dev/null 2>&1; then
13531   cat >>confdefs.h <<\_ACEOF
13532 #define HAVE_XHPDISABLERESET 1
13533 _ACEOF
13534
13535                    SAVER_LIBS="-lXhp11 $SAVER_LIBS"
13536                    { $as_echo "$as_me:$LINENO: result: yes" >&5
13537 $as_echo "yes" >&6; }
13538 else
13539   { $as_echo "$as_me:$LINENO: result: no" >&5
13540 $as_echo "no" >&6; }
13541 fi
13542 rm -rf conftest*
13543
13544   CPPFLAGS="$ac_save_CPPFLAGS"
13545
13546
13547 ###############################################################################
13548 #
13549 #       Check for /proc/interrupts.
13550 #
13551 ###############################################################################
13552
13553 have_proc_interrupts=no
13554 with_proc_interrupts_req=unspecified
13555
13556 # Check whether --with-proc-interrupts was given.
13557 if test "${with_proc_interrupts+set}" = set; then
13558   withval=$with_proc_interrupts; with_proc_interrupts="$withval"; with_proc_interrupts_req="$withval"
13559 else
13560   with_proc_interrupts=yes
13561 fi
13562
13563
13564 if test "$with_proc_interrupts" = yes; then
13565
13566   # Note that we may be building in an environment (e.g. Debian buildd chroot)
13567   # without a proper /proc filesystem. If /proc/interrupts exists, then we'll
13568   # check that it has the bits we need, but otherwise we'll just go on faith.
13569   #
13570   have_proc_interrupts=yes
13571
13572   if test -f /proc/interrupts; then
13573    { $as_echo "$as_me:$LINENO: checking whether /proc/interrupts contains keyboard data" >&5
13574 $as_echo_n "checking whether /proc/interrupts contains keyboard data... " >&6; }
13575 if test "${ac_cv_have_proc_interrupts+set}" = set; then
13576   $as_echo_n "(cached) " >&6
13577 else
13578   ac_cv_have_proc_interrupts=no
13579      if grep 'keyboard\|i8042' /proc/interrupts >/dev/null 2>&1 ; then
13580        ac_cv_have_proc_interrupts=yes
13581      fi
13582
13583 fi
13584 { $as_echo "$as_me:$LINENO: result: $ac_cv_have_proc_interrupts" >&5
13585 $as_echo "$ac_cv_have_proc_interrupts" >&6; }
13586    have_proc_interrupts=$ac_cv_have_proc_interrupts
13587   fi
13588
13589   if test "$have_proc_interrupts" = yes; then
13590     cat >>confdefs.h <<\_ACEOF
13591 #define HAVE_PROC_INTERRUPTS 1
13592 _ACEOF
13593
13594   fi
13595
13596 elif test "$with_proc_interrupts" != no; then
13597   echo "error: must be yes or no: --with-proc-interrupts=$with_proc_interrupts"
13598   exit 1
13599 fi
13600
13601
13602 ###############################################################################
13603 #
13604 #       The --enable-locking option
13605 #
13606 ###############################################################################
13607
13608 # Check whether --enable-locking was given.
13609 if test "${enable_locking+set}" = set; then
13610   enableval=$enable_locking; enable_locking="$enableval"
13611 else
13612   if test "$ac_macosx" = yes; then
13613     # We can't lock on MacOS X, so default to not compiling in support for it.
13614     # But allow --enable-locking to override that, so I can debug Linux locking
13615     # under MacOS X11.
13616     enable_locking=no
13617    else
13618     enable_locking=yes
13619    fi
13620 fi
13621
13622 if test "$enable_locking" = yes; then
13623   true
13624 elif test "$enable_locking" = no; then
13625   cat >>confdefs.h <<\_ACEOF
13626 #define NO_LOCKING 1
13627 _ACEOF
13628
13629 else
13630   echo "error: must be yes or no: --enable-locking=$enable_locking"
13631   exit 1
13632 fi
13633
13634
13635 ###############################################################################
13636 #
13637 #       Whether to allow root password to unblank.
13638 #
13639 ###############################################################################
13640 # Check whether --enable-root-passwd was given.
13641 if test "${enable_root_passwd+set}" = set; then
13642   enableval=$enable_root_passwd; enable_root_passwd="$enableval"
13643 else
13644   enable_root_passwd=yes
13645 fi
13646
13647 if test "$enable_root_passwd" = yes; then
13648   cat >>confdefs.h <<\_ACEOF
13649 #define ALLOW_ROOT_PASSWD 1
13650 _ACEOF
13651
13652   true
13653 elif test "$enable_root_passwd" != no; then
13654   echo "error: must be yes or no: --enable-root-passwd=$enable_root_passwd"
13655   exit 1
13656 fi
13657
13658 ###############################################################################
13659 #
13660 #       Check for PAM.
13661 #
13662 ###############################################################################
13663
13664 case "$host" in
13665   *-solaris*)
13666    # Solaris systems tend to come with PAM misconfigured.
13667    #  Don't build it by default, even if the headers exist.
13668    with_pam_default=no
13669    ;;
13670   *)
13671    # Default to building PAM support on all other systems, if it exists.
13672    with_pam_default=yes
13673   ;;
13674 esac
13675
13676 have_pam=no
13677 with_pam_req=unspecified
13678
13679
13680 # Check whether --with-pam was given.
13681 if test "${with_pam+set}" = set; then
13682   withval=$with_pam; with_pam="$withval"; with_pam_req="$withval"
13683 else
13684   with_pam=$with_pam_default
13685 fi
13686
13687
13688
13689 # Check whether --with-pam_service_name was given.
13690 if test "${with_pam_service_name+set}" = set; then
13691   withval=$with_pam_service_name; pam_service_name="$withval"
13692 else
13693   pam_service_name="xscreensaver"
13694 fi
13695
13696
13697
13698    case "$with_pam" in
13699     yes) ;;
13700     no)  ;;
13701
13702     /*)
13703      { $as_echo "$as_me:$LINENO: checking for PAM headers" >&5
13704 $as_echo_n "checking for PAM headers... " >&6; }
13705      d=$with_pam/include
13706      if test -d $d; then
13707        X_CFLAGS="-I$d $X_CFLAGS"
13708        { $as_echo "$as_me:$LINENO: result: $d" >&5
13709 $as_echo "$d" >&6; }
13710      else
13711        { $as_echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
13712 $as_echo "not found ($d: no such directory)" >&6; }
13713      fi
13714
13715      { $as_echo "$as_me:$LINENO: checking for PAM libs" >&5
13716 $as_echo_n "checking for PAM libs... " >&6; }
13717      d=$with_pam/lib
13718      if test -d $d; then
13719        X_LIBS="-L$d $X_LIBS"
13720        { $as_echo "$as_me:$LINENO: result: $d" >&5
13721 $as_echo "$d" >&6; }
13722      else
13723        { $as_echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
13724 $as_echo "not found ($d: no such directory)" >&6; }
13725      fi
13726
13727      # replace the directory string with "yes".
13728      with_pam_req="yes"
13729      with_pam=$with_pam_req
13730      ;;
13731
13732     *)
13733      echo ""
13734      echo "error: argument to --with-pam must be \"yes\", \"no\", or a directory."
13735      echo "       If it is a directory, then \`DIR/include' will be added to"
13736      echo "       the -I list, and \`DIR/lib' will be added to the -L list."
13737      exit 1
13738      ;;
13739    esac
13740
13741
13742 if test "$enable_locking" = yes -a "$with_pam" = yes; then
13743   { $as_echo "$as_me:$LINENO: checking for PAM" >&5
13744 $as_echo_n "checking for PAM... " >&6; }
13745 if test "${ac_cv_pam+set}" = set; then
13746   $as_echo_n "(cached) " >&6
13747 else
13748
13749   ac_save_CPPFLAGS="$CPPFLAGS"
13750   if test \! -z "$includedir" ; then
13751     CPPFLAGS="$CPPFLAGS -I$includedir"
13752   fi
13753   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
13754   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
13755   cat >conftest.$ac_ext <<_ACEOF
13756 /* confdefs.h.  */
13757 _ACEOF
13758 cat confdefs.h >>conftest.$ac_ext
13759 cat >>conftest.$ac_ext <<_ACEOF
13760 /* end confdefs.h.  */
13761 #include <security/pam_appl.h>
13762 int
13763 main ()
13764 {
13765
13766   ;
13767   return 0;
13768 }
13769 _ACEOF
13770 rm -rf conftest.$ac_objext
13771 if { (ac_try="$ac_compile"
13772 case "(($ac_try" in
13773   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13774   *) ac_try_echo=$ac_try;;
13775 esac
13776 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
13777 $as_echo "$ac_try_echo") >&5
13778   (eval "$ac_compile") 2>conftest.er1
13779   ac_status=$?
13780   grep -v '^ *+' conftest.er1 >conftest.err
13781   rm -rf conftest.er1
13782   cat conftest.err >&5
13783   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
13784   (exit $ac_status); } && {
13785          test -z "$ac_c_werror_flag" ||
13786          test ! -s conftest.err
13787        } && test -s conftest.$ac_objext; then
13788   ac_cv_pam=yes
13789 else
13790   $as_echo "$as_me: failed program was:" >&5
13791 sed 's/^/| /' conftest.$ac_ext >&5
13792
13793         ac_cv_pam=no
13794 fi
13795
13796 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13797   CPPFLAGS="$ac_save_CPPFLAGS"
13798 fi
13799 { $as_echo "$as_me:$LINENO: result: $ac_cv_pam" >&5
13800 $as_echo "$ac_cv_pam" >&6; }
13801   if test "$ac_cv_pam" = yes ; then
13802     have_pam=yes
13803     cat >>confdefs.h <<\_ACEOF
13804 #define HAVE_PAM 1
13805 _ACEOF
13806
13807     cat >>confdefs.h <<_ACEOF
13808 #define PAM_SERVICE_NAME "$pam_service_name"
13809 _ACEOF
13810
13811
13812     PASSWD_LIBS="${PASSWD_LIBS} -lpam"
13813
13814     # libpam typically requires dlopen and dlsym.  On FreeBSD,
13815     # those are in libc.  On Linux and Solaris, they're in libdl.
13816     { $as_echo "$as_me:$LINENO: checking for dlopen in -ldl" >&5
13817 $as_echo_n "checking for dlopen in -ldl... " >&6; }
13818 if test "${ac_cv_lib_dl_dlopen+set}" = set; then
13819   $as_echo_n "(cached) " >&6
13820 else
13821   ac_check_lib_save_LIBS=$LIBS
13822 LIBS="-ldl  $LIBS"
13823 cat >conftest.$ac_ext <<_ACEOF
13824 /* confdefs.h.  */
13825 _ACEOF
13826 cat confdefs.h >>conftest.$ac_ext
13827 cat >>conftest.$ac_ext <<_ACEOF
13828 /* end confdefs.h.  */
13829
13830 /* Override any GCC internal prototype to avoid an error.
13831    Use char because int might match the return type of a GCC
13832    builtin and then its argument prototype would still apply.  */
13833 #ifdef __cplusplus
13834 extern "C"
13835 #endif
13836 char dlopen ();
13837 int
13838 main ()
13839 {
13840 return dlopen ();
13841   ;
13842   return 0;
13843 }
13844 _ACEOF
13845 rm -rf conftest.$ac_objext conftest$ac_exeext
13846 if { (ac_try="$ac_link"
13847 case "(($ac_try" in
13848   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13849   *) ac_try_echo=$ac_try;;
13850 esac
13851 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
13852 $as_echo "$ac_try_echo") >&5
13853   (eval "$ac_link") 2>conftest.er1
13854   ac_status=$?
13855   grep -v '^ *+' conftest.er1 >conftest.err
13856   rm -rf conftest.er1
13857   cat conftest.err >&5
13858   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
13859   (exit $ac_status); } && {
13860          test -z "$ac_c_werror_flag" ||
13861          test ! -s conftest.err
13862        } && test -s conftest$ac_exeext && {
13863          test "$cross_compiling" = yes ||
13864          $as_test_x conftest$ac_exeext
13865        }; then
13866   ac_cv_lib_dl_dlopen=yes
13867 else
13868   $as_echo "$as_me: failed program was:" >&5
13869 sed 's/^/| /' conftest.$ac_ext >&5
13870
13871         ac_cv_lib_dl_dlopen=no
13872 fi
13873
13874 rm -rf conftest.dSYM
13875 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
13876       conftest$ac_exeext conftest.$ac_ext
13877 LIBS=$ac_check_lib_save_LIBS
13878 fi
13879 { $as_echo "$as_me:$LINENO: result: $ac_cv_lib_dl_dlopen" >&5
13880 $as_echo "$ac_cv_lib_dl_dlopen" >&6; }
13881 if test "x$ac_cv_lib_dl_dlopen" = x""yes; then
13882   PASSWD_LIBS="${PASSWD_LIBS} -ldl"
13883 fi
13884
13885
13886     # On Linux, sigtimedwait() is in libc; on Solaris, it's in librt.
13887     have_timedwait=no
13888     { $as_echo "$as_me:$LINENO: checking for sigtimedwait in -lc" >&5
13889 $as_echo_n "checking for sigtimedwait in -lc... " >&6; }
13890 if test "${ac_cv_lib_c_sigtimedwait+set}" = set; then
13891   $as_echo_n "(cached) " >&6
13892 else
13893   ac_check_lib_save_LIBS=$LIBS
13894 LIBS="-lc  $LIBS"
13895 cat >conftest.$ac_ext <<_ACEOF
13896 /* confdefs.h.  */
13897 _ACEOF
13898 cat confdefs.h >>conftest.$ac_ext
13899 cat >>conftest.$ac_ext <<_ACEOF
13900 /* end confdefs.h.  */
13901
13902 /* Override any GCC internal prototype to avoid an error.
13903    Use char because int might match the return type of a GCC
13904    builtin and then its argument prototype would still apply.  */
13905 #ifdef __cplusplus
13906 extern "C"
13907 #endif
13908 char sigtimedwait ();
13909 int
13910 main ()
13911 {
13912 return sigtimedwait ();
13913   ;
13914   return 0;
13915 }
13916 _ACEOF
13917 rm -rf conftest.$ac_objext conftest$ac_exeext
13918 if { (ac_try="$ac_link"
13919 case "(($ac_try" in
13920   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13921   *) ac_try_echo=$ac_try;;
13922 esac
13923 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
13924 $as_echo "$ac_try_echo") >&5
13925   (eval "$ac_link") 2>conftest.er1
13926   ac_status=$?
13927   grep -v '^ *+' conftest.er1 >conftest.err
13928   rm -rf conftest.er1
13929   cat conftest.err >&5
13930   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
13931   (exit $ac_status); } && {
13932          test -z "$ac_c_werror_flag" ||
13933          test ! -s conftest.err
13934        } && test -s conftest$ac_exeext && {
13935          test "$cross_compiling" = yes ||
13936          $as_test_x conftest$ac_exeext
13937        }; then
13938   ac_cv_lib_c_sigtimedwait=yes
13939 else
13940   $as_echo "$as_me: failed program was:" >&5
13941 sed 's/^/| /' conftest.$ac_ext >&5
13942
13943         ac_cv_lib_c_sigtimedwait=no
13944 fi
13945
13946 rm -rf conftest.dSYM
13947 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
13948       conftest$ac_exeext conftest.$ac_ext
13949 LIBS=$ac_check_lib_save_LIBS
13950 fi
13951 { $as_echo "$as_me:$LINENO: result: $ac_cv_lib_c_sigtimedwait" >&5
13952 $as_echo "$ac_cv_lib_c_sigtimedwait" >&6; }
13953 if test "x$ac_cv_lib_c_sigtimedwait" = x""yes; then
13954   have_timedwait=yes
13955                   cat >>confdefs.h <<\_ACEOF
13956 #define HAVE_SIGTIMEDWAIT 1
13957 _ACEOF
13958
13959 fi
13960
13961     if test "$have_timedwait" = no ; then
13962       { $as_echo "$as_me:$LINENO: checking for sigtimedwait in -lrt" >&5
13963 $as_echo_n "checking for sigtimedwait in -lrt... " >&6; }
13964 if test "${ac_cv_lib_rt_sigtimedwait+set}" = set; then
13965   $as_echo_n "(cached) " >&6
13966 else
13967   ac_check_lib_save_LIBS=$LIBS
13968 LIBS="-lrt  $LIBS"
13969 cat >conftest.$ac_ext <<_ACEOF
13970 /* confdefs.h.  */
13971 _ACEOF
13972 cat confdefs.h >>conftest.$ac_ext
13973 cat >>conftest.$ac_ext <<_ACEOF
13974 /* end confdefs.h.  */
13975
13976 /* Override any GCC internal prototype to avoid an error.
13977    Use char because int might match the return type of a GCC
13978    builtin and then its argument prototype would still apply.  */
13979 #ifdef __cplusplus
13980 extern "C"
13981 #endif
13982 char sigtimedwait ();
13983 int
13984 main ()
13985 {
13986 return sigtimedwait ();
13987   ;
13988   return 0;
13989 }
13990 _ACEOF
13991 rm -rf conftest.$ac_objext conftest$ac_exeext
13992 if { (ac_try="$ac_link"
13993 case "(($ac_try" in
13994   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13995   *) ac_try_echo=$ac_try;;
13996 esac
13997 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
13998 $as_echo "$ac_try_echo") >&5
13999   (eval "$ac_link") 2>conftest.er1
14000   ac_status=$?
14001   grep -v '^ *+' conftest.er1 >conftest.err
14002   rm -rf conftest.er1
14003   cat conftest.err >&5
14004   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
14005   (exit $ac_status); } && {
14006          test -z "$ac_c_werror_flag" ||
14007          test ! -s conftest.err
14008        } && test -s conftest$ac_exeext && {
14009          test "$cross_compiling" = yes ||
14010          $as_test_x conftest$ac_exeext
14011        }; then
14012   ac_cv_lib_rt_sigtimedwait=yes
14013 else
14014   $as_echo "$as_me: failed program was:" >&5
14015 sed 's/^/| /' conftest.$ac_ext >&5
14016
14017         ac_cv_lib_rt_sigtimedwait=no
14018 fi
14019
14020 rm -rf conftest.dSYM
14021 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
14022       conftest$ac_exeext conftest.$ac_ext
14023 LIBS=$ac_check_lib_save_LIBS
14024 fi
14025 { $as_echo "$as_me:$LINENO: result: $ac_cv_lib_rt_sigtimedwait" >&5
14026 $as_echo "$ac_cv_lib_rt_sigtimedwait" >&6; }
14027 if test "x$ac_cv_lib_rt_sigtimedwait" = x""yes; then
14028   have_timedwait=yes
14029                                       cat >>confdefs.h <<\_ACEOF
14030 #define HAVE_SIGTIMEDWAIT 1
14031 _ACEOF
14032
14033                                       PASSWD_LIBS="${PASSWD_LIBS} -lrt"
14034 fi
14035
14036     fi
14037
14038     { $as_echo "$as_me:$LINENO: checking how to call pam_strerror" >&5
14039 $as_echo_n "checking how to call pam_strerror... " >&6; }
14040     if test "${ac_cv_pam_strerror_args+set}" = set; then
14041   $as_echo_n "(cached) " >&6
14042 else
14043
14044   ac_save_CPPFLAGS="$CPPFLAGS"
14045   if test \! -z "$includedir" ; then
14046     CPPFLAGS="$CPPFLAGS -I$includedir"
14047   fi
14048   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
14049   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
14050   cat >conftest.$ac_ext <<_ACEOF
14051 /* confdefs.h.  */
14052 _ACEOF
14053 cat confdefs.h >>conftest.$ac_ext
14054 cat >>conftest.$ac_ext <<_ACEOF
14055 /* end confdefs.h.  */
14056 #include <stdio.h>
14057                         #include <stdlib.h>
14058                         #include <security/pam_appl.h>
14059 int
14060 main ()
14061 {
14062 pam_handle_t *pamh = 0;
14063                         char *s = pam_strerror(pamh, PAM_SUCCESS);
14064   ;
14065   return 0;
14066 }
14067 _ACEOF
14068 rm -rf conftest.$ac_objext
14069 if { (ac_try="$ac_compile"
14070 case "(($ac_try" in
14071   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14072   *) ac_try_echo=$ac_try;;
14073 esac
14074 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
14075 $as_echo "$ac_try_echo") >&5
14076   (eval "$ac_compile") 2>conftest.er1
14077   ac_status=$?
14078   grep -v '^ *+' conftest.er1 >conftest.err
14079   rm -rf conftest.er1
14080   cat conftest.err >&5
14081   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
14082   (exit $ac_status); } && {
14083          test -z "$ac_c_werror_flag" ||
14084          test ! -s conftest.err
14085        } && test -s conftest.$ac_objext; then
14086   ac_pam_strerror_args=2
14087 else
14088   $as_echo "$as_me: failed program was:" >&5
14089 sed 's/^/| /' conftest.$ac_ext >&5
14090
14091
14092   ac_save_CPPFLAGS="$CPPFLAGS"
14093   if test \! -z "$includedir" ; then
14094     CPPFLAGS="$CPPFLAGS -I$includedir"
14095   fi
14096   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
14097   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
14098   cat >conftest.$ac_ext <<_ACEOF
14099 /* confdefs.h.  */
14100 _ACEOF
14101 cat confdefs.h >>conftest.$ac_ext
14102 cat >>conftest.$ac_ext <<_ACEOF
14103 /* end confdefs.h.  */
14104 #include <stdio.h>
14105                                           #include <stdlib.h>
14106                                           #include <security/pam_appl.h>
14107 int
14108 main ()
14109 {
14110 char *s =
14111                                            pam_strerror(PAM_SUCCESS);
14112   ;
14113   return 0;
14114 }
14115 _ACEOF
14116 rm -rf conftest.$ac_objext
14117 if { (ac_try="$ac_compile"
14118 case "(($ac_try" in
14119   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14120   *) ac_try_echo=$ac_try;;
14121 esac
14122 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
14123 $as_echo "$ac_try_echo") >&5
14124   (eval "$ac_compile") 2>conftest.er1
14125   ac_status=$?
14126   grep -v '^ *+' conftest.er1 >conftest.err
14127   rm -rf conftest.er1
14128   cat conftest.err >&5
14129   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
14130   (exit $ac_status); } && {
14131          test -z "$ac_c_werror_flag" ||
14132          test ! -s conftest.err
14133        } && test -s conftest.$ac_objext; then
14134   ac_pam_strerror_args=1
14135 else
14136   $as_echo "$as_me: failed program was:" >&5
14137 sed 's/^/| /' conftest.$ac_ext >&5
14138
14139         ac_pam_strerror_args=0
14140 fi
14141
14142 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14143   CPPFLAGS="$ac_save_CPPFLAGS"
14144 fi
14145
14146 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14147   CPPFLAGS="$ac_save_CPPFLAGS"
14148       ac_cv_pam_strerror_args=$ac_pam_strerror_args
14149 fi
14150
14151     ac_pam_strerror_args=$ac_cv_pam_strerror_args
14152     if test "$ac_pam_strerror_args" = 1 ; then
14153       { $as_echo "$as_me:$LINENO: result: one argument" >&5
14154 $as_echo "one argument" >&6; }
14155     elif test "$ac_pam_strerror_args" = 2 ; then
14156       cat >>confdefs.h <<\_ACEOF
14157 #define PAM_STRERROR_TWO_ARGS 1
14158 _ACEOF
14159
14160       { $as_echo "$as_me:$LINENO: result: two arguments" >&5
14161 $as_echo "two arguments" >&6; }
14162     else
14163       { $as_echo "$as_me:$LINENO: result: unknown" >&5
14164 $as_echo "unknown" >&6; }
14165     fi
14166
14167 # Check pam_fail_delay
14168     { $as_echo "$as_me:$LINENO: checking pam_fail_delay in -lpam" >&5
14169 $as_echo_n "checking pam_fail_delay in -lpam... " >&6; }
14170     if test "${ac_cv_pam_fail_delay+set}" = set; then
14171   $as_echo_n "(cached) " >&6
14172 else
14173   ac_save_LDFLAGS="$LDFLAGS"
14174       LDFLAGS="-lpam"
14175       cat >conftest.$ac_ext <<_ACEOF
14176 /* confdefs.h.  */
14177 _ACEOF
14178 cat confdefs.h >>conftest.$ac_ext
14179 cat >>conftest.$ac_ext <<_ACEOF
14180 /* end confdefs.h.  */
14181 #include <security/pam_appl.h>
14182 int
14183 main ()
14184 {
14185 pam_handle_t *pamh = 0;
14186                    unsigned int usec = 1;
14187                    int status = pam_fail_delay (pamh, usec);
14188   ;
14189   return 0;
14190 }
14191 _ACEOF
14192 rm -rf conftest.$ac_objext conftest$ac_exeext
14193 if { (ac_try="$ac_link"
14194 case "(($ac_try" in
14195   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14196   *) ac_try_echo=$ac_try;;
14197 esac
14198 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
14199 $as_echo "$ac_try_echo") >&5
14200   (eval "$ac_link") 2>conftest.er1
14201   ac_status=$?
14202   grep -v '^ *+' conftest.er1 >conftest.err
14203   rm -rf conftest.er1
14204   cat conftest.err >&5
14205   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
14206   (exit $ac_status); } && {
14207          test -z "$ac_c_werror_flag" ||
14208          test ! -s conftest.err
14209        } && test -s conftest$ac_exeext && {
14210          test "$cross_compiling" = yes ||
14211          $as_test_x conftest$ac_exeext
14212        }; then
14213   ac_pam_fail_delay=yes
14214 else
14215   $as_echo "$as_me: failed program was:" >&5
14216 sed 's/^/| /' conftest.$ac_ext >&5
14217
14218         ac_pam_fail_delay=no
14219 fi
14220
14221 rm -rf conftest.dSYM
14222 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
14223       conftest$ac_exeext conftest.$ac_ext
14224       ac_cv_pam_fail_delay=$ac_pam_fail_delay,
14225       LDFLAGS=$ac_save_LDFLAGS
14226 fi
14227
14228
14229       if test "$ac_pam_fail_delay" = yes ; then
14230         { $as_echo "$as_me:$LINENO: result: yes" >&5
14231 $as_echo "yes" >&6; }
14232         cat >>confdefs.h <<\_ACEOF
14233 #define HAVE_PAM_FAIL_DELAY 1
14234 _ACEOF
14235
14236       else
14237         { $as_echo "$as_me:$LINENO: result: no" >&5
14238 $as_echo "no" >&6; }
14239       fi
14240
14241   fi
14242 fi
14243
14244
14245 ###############################################################################
14246 #
14247 #       Check for Kerberos.
14248 #
14249 ###############################################################################
14250
14251 have_kerberos=no
14252 have_kerberos5=no
14253 with_kerberos_req=unspecified
14254
14255
14256 # Check whether --with-kerberos was given.
14257 if test "${with_kerberos+set}" = set; then
14258   withval=$with_kerberos; with_kerberos="$withval"; with_kerberos_req="$withval"
14259 else
14260   with_kerberos=yes
14261 fi
14262
14263
14264
14265    case "$with_kerberos" in
14266     yes) ;;
14267     no)  ;;
14268
14269     /*)
14270      { $as_echo "$as_me:$LINENO: checking for Kerberos headers" >&5
14271 $as_echo_n "checking for Kerberos headers... " >&6; }
14272      d=$with_kerberos/include
14273      if test -d $d; then
14274        X_CFLAGS="-I$d $X_CFLAGS"
14275        { $as_echo "$as_me:$LINENO: result: $d" >&5
14276 $as_echo "$d" >&6; }
14277      else
14278        { $as_echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
14279 $as_echo "not found ($d: no such directory)" >&6; }
14280      fi
14281
14282      { $as_echo "$as_me:$LINENO: checking for Kerberos libs" >&5
14283 $as_echo_n "checking for Kerberos libs... " >&6; }
14284      d=$with_kerberos/lib
14285      if test -d $d; then
14286        X_LIBS="-L$d $X_LIBS"
14287        { $as_echo "$as_me:$LINENO: result: $d" >&5
14288 $as_echo "$d" >&6; }
14289      else
14290        { $as_echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
14291 $as_echo "not found ($d: no such directory)" >&6; }
14292      fi
14293
14294      # replace the directory string with "yes".
14295      with_kerberos_req="yes"
14296      with_kerberos=$with_kerberos_req
14297      ;;
14298
14299     *)
14300      echo ""
14301      echo "error: argument to --with-kerberos must be \"yes\", \"no\", or a directory."
14302      echo "       If it is a directory, then \`DIR/include' will be added to"
14303      echo "       the -I list, and \`DIR/lib' will be added to the -L list."
14304      exit 1
14305      ;;
14306    esac
14307
14308
14309 if test "$enable_locking" = yes -a "$with_kerberos" = yes; then
14310   { $as_echo "$as_me:$LINENO: checking for Kerberos 4" >&5
14311 $as_echo_n "checking for Kerberos 4... " >&6; }
14312 if test "${ac_cv_kerberos+set}" = set; then
14313   $as_echo_n "(cached) " >&6
14314 else
14315
14316   ac_save_CPPFLAGS="$CPPFLAGS"
14317   if test \! -z "$includedir" ; then
14318     CPPFLAGS="$CPPFLAGS -I$includedir"
14319   fi
14320   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
14321   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
14322   cat >conftest.$ac_ext <<_ACEOF
14323 /* confdefs.h.  */
14324 _ACEOF
14325 cat confdefs.h >>conftest.$ac_ext
14326 cat >>conftest.$ac_ext <<_ACEOF
14327 /* end confdefs.h.  */
14328 #include <krb.h>
14329 int
14330 main ()
14331 {
14332
14333   ;
14334   return 0;
14335 }
14336 _ACEOF
14337 rm -rf conftest.$ac_objext
14338 if { (ac_try="$ac_compile"
14339 case "(($ac_try" in
14340   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14341   *) ac_try_echo=$ac_try;;
14342 esac
14343 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
14344 $as_echo "$ac_try_echo") >&5
14345   (eval "$ac_compile") 2>conftest.er1
14346   ac_status=$?
14347   grep -v '^ *+' conftest.er1 >conftest.err
14348   rm -rf conftest.er1
14349   cat conftest.err >&5
14350   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
14351   (exit $ac_status); } && {
14352          test -z "$ac_c_werror_flag" ||
14353          test ! -s conftest.err
14354        } && test -s conftest.$ac_objext; then
14355   ac_cv_kerberos=yes
14356 else
14357   $as_echo "$as_me: failed program was:" >&5
14358 sed 's/^/| /' conftest.$ac_ext >&5
14359
14360         ac_cv_kerberos=no
14361 fi
14362
14363 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14364   CPPFLAGS="$ac_save_CPPFLAGS"
14365 fi
14366 { $as_echo "$as_me:$LINENO: result: $ac_cv_kerberos" >&5
14367 $as_echo "$ac_cv_kerberos" >&6; }
14368   { $as_echo "$as_me:$LINENO: checking for Kerberos 5" >&5
14369 $as_echo_n "checking for Kerberos 5... " >&6; }
14370 if test "${ac_cv_kerberos5+set}" = set; then
14371   $as_echo_n "(cached) " >&6
14372 else
14373
14374   ac_save_CPPFLAGS="$CPPFLAGS"
14375   if test \! -z "$includedir" ; then
14376     CPPFLAGS="$CPPFLAGS -I$includedir"
14377   fi
14378   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
14379   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
14380   cat >conftest.$ac_ext <<_ACEOF
14381 /* confdefs.h.  */
14382 _ACEOF
14383 cat confdefs.h >>conftest.$ac_ext
14384 cat >>conftest.$ac_ext <<_ACEOF
14385 /* end confdefs.h.  */
14386 #include <kerberosIV/krb.h>
14387 int
14388 main ()
14389 {
14390
14391   ;
14392   return 0;
14393 }
14394 _ACEOF
14395 rm -rf conftest.$ac_objext
14396 if { (ac_try="$ac_compile"
14397 case "(($ac_try" in
14398   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14399   *) ac_try_echo=$ac_try;;
14400 esac
14401 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
14402 $as_echo "$ac_try_echo") >&5
14403   (eval "$ac_compile") 2>conftest.er1
14404   ac_status=$?
14405   grep -v '^ *+' conftest.er1 >conftest.err
14406   rm -rf conftest.er1
14407   cat conftest.err >&5
14408   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
14409   (exit $ac_status); } && {
14410          test -z "$ac_c_werror_flag" ||
14411          test ! -s conftest.err
14412        } && test -s conftest.$ac_objext; then
14413   ac_cv_kerberos5=yes
14414 else
14415   $as_echo "$as_me: failed program was:" >&5
14416 sed 's/^/| /' conftest.$ac_ext >&5
14417
14418         ac_cv_kerberos5=no
14419 fi
14420
14421 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14422   CPPFLAGS="$ac_save_CPPFLAGS"
14423 fi
14424 { $as_echo "$as_me:$LINENO: result: $ac_cv_kerberos5" >&5
14425 $as_echo "$ac_cv_kerberos5" >&6; }
14426
14427   if test "$ac_cv_kerberos" = yes ; then
14428     have_kerberos=yes
14429     cat >>confdefs.h <<\_ACEOF
14430 #define HAVE_KERBEROS 1
14431 _ACEOF
14432
14433   fi
14434
14435   if test "$ac_cv_kerberos5" = yes ; then
14436
14437     # Andrew Snare <ajs@pigpond.com> wrote:
14438     #
14439     # You were assuming that if kerberosV (krb5) was found, then kerberosIV
14440     # (krb4) was also available.  This turns out not to be the case with
14441     # mit-krb-1.2.7; apparently backwards-compatibility with KerberosIV
14442     # is optional.
14443     #
14444     # So, disable kerberosV support if libkrb4 can't be found.
14445     # This is not the best solution, but it makes the compile not fail.
14446     #
14447
14448   ac_save_CPPFLAGS="$CPPFLAGS"
14449   ac_save_LDFLAGS="$LDFLAGS"
14450 #  ac_save_LIBS="$LIBS"
14451
14452   if test \! -z "$includedir" ; then
14453     CPPFLAGS="$CPPFLAGS -I$includedir"
14454   fi
14455   # note: $X_CFLAGS includes $x_includes
14456   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
14457
14458   if test \! -z "$libdir" ; then
14459     LDFLAGS="$LDFLAGS -L$libdir"
14460   fi
14461   # note: $X_LIBS includes $x_libraries
14462   LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
14463
14464   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
14465   LDFLAGS=`eval eval eval eval eval eval eval eval eval echo $LDFLAGS`
14466   { $as_echo "$as_me:$LINENO: checking for krb_get_tf_realm in -lkrb4" >&5
14467 $as_echo_n "checking for krb_get_tf_realm in -lkrb4... " >&6; }
14468 if test "${ac_cv_lib_krb4_krb_get_tf_realm+set}" = set; then
14469   $as_echo_n "(cached) " >&6
14470 else
14471   ac_check_lib_save_LIBS=$LIBS
14472 LIBS="-lkrb4  $LIBS"
14473 cat >conftest.$ac_ext <<_ACEOF
14474 /* confdefs.h.  */
14475 _ACEOF
14476 cat confdefs.h >>conftest.$ac_ext
14477 cat >>conftest.$ac_ext <<_ACEOF
14478 /* end confdefs.h.  */
14479
14480 /* Override any GCC internal prototype to avoid an error.
14481    Use char because int might match the return type of a GCC
14482    builtin and then its argument prototype would still apply.  */
14483 #ifdef __cplusplus
14484 extern "C"
14485 #endif
14486 char krb_get_tf_realm ();
14487 int
14488 main ()
14489 {
14490 return krb_get_tf_realm ();
14491   ;
14492   return 0;
14493 }
14494 _ACEOF
14495 rm -rf conftest.$ac_objext conftest$ac_exeext
14496 if { (ac_try="$ac_link"
14497 case "(($ac_try" in
14498   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14499   *) ac_try_echo=$ac_try;;
14500 esac
14501 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
14502 $as_echo "$ac_try_echo") >&5
14503   (eval "$ac_link") 2>conftest.er1
14504   ac_status=$?
14505   grep -v '^ *+' conftest.er1 >conftest.err
14506   rm -rf conftest.er1
14507   cat conftest.err >&5
14508   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
14509   (exit $ac_status); } && {
14510          test -z "$ac_c_werror_flag" ||
14511          test ! -s conftest.err
14512        } && test -s conftest$ac_exeext && {
14513          test "$cross_compiling" = yes ||
14514          $as_test_x conftest$ac_exeext
14515        }; then
14516   ac_cv_lib_krb4_krb_get_tf_realm=yes
14517 else
14518   $as_echo "$as_me: failed program was:" >&5
14519 sed 's/^/| /' conftest.$ac_ext >&5
14520
14521         ac_cv_lib_krb4_krb_get_tf_realm=no
14522 fi
14523
14524 rm -rf conftest.dSYM
14525 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
14526       conftest$ac_exeext conftest.$ac_ext
14527 LIBS=$ac_check_lib_save_LIBS
14528 fi
14529 { $as_echo "$as_me:$LINENO: result: $ac_cv_lib_krb4_krb_get_tf_realm" >&5
14530 $as_echo "$ac_cv_lib_krb4_krb_get_tf_realm" >&6; }
14531 if test "x$ac_cv_lib_krb4_krb_get_tf_realm" = x""yes; then
14532   have_kerberos=yes
14533 else
14534   have_kerberos=no
14535 fi
14536
14537   CPPFLAGS="$ac_save_CPPFLAGS"
14538   LDFLAGS="$ac_save_LDFLAGS"
14539 #  LIBS="$ac_save_LIBS"
14540
14541     if test "$have_kerberos" = yes ; then
14542       have_kerberos5=yes
14543       cat >>confdefs.h <<\_ACEOF
14544 #define HAVE_KERBEROS 1
14545 _ACEOF
14546
14547       cat >>confdefs.h <<\_ACEOF
14548 #define HAVE_KERBEROS5 1
14549 _ACEOF
14550
14551     else
14552       have_kerberos5=no
14553       { $as_echo "$as_me:$LINENO: WARNING: Cannot find compat lib (libkrb4) needed to use Kerberos 5" >&5
14554 $as_echo "$as_me: WARNING: Cannot find compat lib (libkrb4) needed to use Kerberos 5" >&2;}
14555     fi
14556
14557   fi
14558
14559   if test "$have_kerberos5" = yes ; then
14560     # from Matt Knopp <mhat@infocalypse.netlag.com>
14561     # (who got it from amu@mit.edu)
14562
14563     PASSWD_LIBS="$PASSWD_LIBS -lkrb4 -ldes425 -lkrb5 -lk5crypto -lcom_err"
14564
14565     # jwz: MacOS X uses -lkrb5, but not -lcrypt
14566
14567   ac_save_CPPFLAGS="$CPPFLAGS"
14568   ac_save_LDFLAGS="$LDFLAGS"
14569 #  ac_save_LIBS="$LIBS"
14570
14571   if test \! -z "$includedir" ; then
14572     CPPFLAGS="$CPPFLAGS -I$includedir"
14573   fi
14574   # note: $X_CFLAGS includes $x_includes
14575   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
14576
14577   if test \! -z "$libdir" ; then
14578     LDFLAGS="$LDFLAGS -L$libdir"
14579   fi
14580   # note: $X_LIBS includes $x_libraries
14581   LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
14582
14583   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
14584   LDFLAGS=`eval eval eval eval eval eval eval eval eval echo $LDFLAGS`
14585   { $as_echo "$as_me:$LINENO: checking for crypt in -lcrypt" >&5
14586 $as_echo_n "checking for crypt in -lcrypt... " >&6; }
14587 if test "${ac_cv_lib_crypt_crypt+set}" = set; then
14588   $as_echo_n "(cached) " >&6
14589 else
14590   ac_check_lib_save_LIBS=$LIBS
14591 LIBS="-lcrypt  $LIBS"
14592 cat >conftest.$ac_ext <<_ACEOF
14593 /* confdefs.h.  */
14594 _ACEOF
14595 cat confdefs.h >>conftest.$ac_ext
14596 cat >>conftest.$ac_ext <<_ACEOF
14597 /* end confdefs.h.  */
14598
14599 /* Override any GCC internal prototype to avoid an error.
14600    Use char because int might match the return type of a GCC
14601    builtin and then its argument prototype would still apply.  */
14602 #ifdef __cplusplus
14603 extern "C"
14604 #endif
14605 char crypt ();
14606 int
14607 main ()
14608 {
14609 return crypt ();
14610   ;
14611   return 0;
14612 }
14613 _ACEOF
14614 rm -rf conftest.$ac_objext conftest$ac_exeext
14615 if { (ac_try="$ac_link"
14616 case "(($ac_try" in
14617   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14618   *) ac_try_echo=$ac_try;;
14619 esac
14620 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
14621 $as_echo "$ac_try_echo") >&5
14622   (eval "$ac_link") 2>conftest.er1
14623   ac_status=$?
14624   grep -v '^ *+' conftest.er1 >conftest.err
14625   rm -rf conftest.er1
14626   cat conftest.err >&5
14627   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
14628   (exit $ac_status); } && {
14629          test -z "$ac_c_werror_flag" ||
14630          test ! -s conftest.err
14631        } && test -s conftest$ac_exeext && {
14632          test "$cross_compiling" = yes ||
14633          $as_test_x conftest$ac_exeext
14634        }; then
14635   ac_cv_lib_crypt_crypt=yes
14636 else
14637   $as_echo "$as_me: failed program was:" >&5
14638 sed 's/^/| /' conftest.$ac_ext >&5
14639
14640         ac_cv_lib_crypt_crypt=no
14641 fi
14642
14643 rm -rf conftest.dSYM
14644 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
14645       conftest$ac_exeext conftest.$ac_ext
14646 LIBS=$ac_check_lib_save_LIBS
14647 fi
14648 { $as_echo "$as_me:$LINENO: result: $ac_cv_lib_crypt_crypt" >&5
14649 $as_echo "$ac_cv_lib_crypt_crypt" >&6; }
14650 if test "x$ac_cv_lib_crypt_crypt" = x""yes; then
14651   PASSWD_LIBS="$PASSWD_LIBS -lcrypt"
14652 fi
14653
14654   CPPFLAGS="$ac_save_CPPFLAGS"
14655   LDFLAGS="$ac_save_LDFLAGS"
14656 #  LIBS="$ac_save_LIBS"
14657
14658
14659   elif test "$have_kerberos" = yes ; then
14660     # from Tim Showalter <tjs@psaux.com> for FreeBSD 4.2
14661     PASSWD_LIBS="$PASSWD_LIBS -lkrb -ldes -lcom_err"
14662   fi
14663
14664   if test "$have_kerberos" = yes ; then
14665     { $as_echo "$as_me:$LINENO: checking for res_search" >&5
14666 $as_echo_n "checking for res_search... " >&6; }
14667 if test "${ac_cv_func_res_search+set}" = set; then
14668   $as_echo_n "(cached) " >&6
14669 else
14670   cat >conftest.$ac_ext <<_ACEOF
14671 /* confdefs.h.  */
14672 _ACEOF
14673 cat confdefs.h >>conftest.$ac_ext
14674 cat >>conftest.$ac_ext <<_ACEOF
14675 /* end confdefs.h.  */
14676 /* Define res_search to an innocuous variant, in case <limits.h> declares res_search.
14677    For example, HP-UX 11i <limits.h> declares gettimeofday.  */
14678 #define res_search innocuous_res_search
14679
14680 /* System header to define __stub macros and hopefully few prototypes,
14681     which can conflict with char res_search (); below.
14682     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
14683     <limits.h> exists even on freestanding compilers.  */
14684
14685 #ifdef __STDC__
14686 # include <limits.h>
14687 #else
14688 # include <assert.h>
14689 #endif
14690
14691 #undef res_search
14692
14693 /* Override any GCC internal prototype to avoid an error.
14694    Use char because int might match the return type of a GCC
14695    builtin and then its argument prototype would still apply.  */
14696 #ifdef __cplusplus
14697 extern "C"
14698 #endif
14699 char res_search ();
14700 /* The GNU C library defines this for functions which it implements
14701     to always fail with ENOSYS.  Some functions are actually named
14702     something starting with __ and the normal name is an alias.  */
14703 #if defined __stub_res_search || defined __stub___res_search
14704 choke me
14705 #endif
14706
14707 int
14708 main ()
14709 {
14710 return res_search ();
14711   ;
14712   return 0;
14713 }
14714 _ACEOF
14715 rm -rf conftest.$ac_objext conftest$ac_exeext
14716 if { (ac_try="$ac_link"
14717 case "(($ac_try" in
14718   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14719   *) ac_try_echo=$ac_try;;
14720 esac
14721 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
14722 $as_echo "$ac_try_echo") >&5
14723   (eval "$ac_link") 2>conftest.er1
14724   ac_status=$?
14725   grep -v '^ *+' conftest.er1 >conftest.err
14726   rm -rf conftest.er1
14727   cat conftest.err >&5
14728   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
14729   (exit $ac_status); } && {
14730          test -z "$ac_c_werror_flag" ||
14731          test ! -s conftest.err
14732        } && test -s conftest$ac_exeext && {
14733          test "$cross_compiling" = yes ||
14734          $as_test_x conftest$ac_exeext
14735        }; then
14736   ac_cv_func_res_search=yes
14737 else
14738   $as_echo "$as_me: failed program was:" >&5
14739 sed 's/^/| /' conftest.$ac_ext >&5
14740
14741         ac_cv_func_res_search=no
14742 fi
14743
14744 rm -rf conftest.dSYM
14745 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
14746       conftest$ac_exeext conftest.$ac_ext
14747 fi
14748 { $as_echo "$as_me:$LINENO: result: $ac_cv_func_res_search" >&5
14749 $as_echo "$ac_cv_func_res_search" >&6; }
14750 if test "x$ac_cv_func_res_search" = x""yes; then
14751   :
14752 else
14753   { $as_echo "$as_me:$LINENO: checking for res_search in -lresolv" >&5
14754 $as_echo_n "checking for res_search in -lresolv... " >&6; }
14755 if test "${ac_cv_lib_resolv_res_search+set}" = set; then
14756   $as_echo_n "(cached) " >&6
14757 else
14758   ac_check_lib_save_LIBS=$LIBS
14759 LIBS="-lresolv  $LIBS"
14760 cat >conftest.$ac_ext <<_ACEOF
14761 /* confdefs.h.  */
14762 _ACEOF
14763 cat confdefs.h >>conftest.$ac_ext
14764 cat >>conftest.$ac_ext <<_ACEOF
14765 /* end confdefs.h.  */
14766
14767 /* Override any GCC internal prototype to avoid an error.
14768    Use char because int might match the return type of a GCC
14769    builtin and then its argument prototype would still apply.  */
14770 #ifdef __cplusplus
14771 extern "C"
14772 #endif
14773 char res_search ();
14774 int
14775 main ()
14776 {
14777 return res_search ();
14778   ;
14779   return 0;
14780 }
14781 _ACEOF
14782 rm -rf conftest.$ac_objext conftest$ac_exeext
14783 if { (ac_try="$ac_link"
14784 case "(($ac_try" in
14785   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14786   *) ac_try_echo=$ac_try;;
14787 esac
14788 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
14789 $as_echo "$ac_try_echo") >&5
14790   (eval "$ac_link") 2>conftest.er1
14791   ac_status=$?
14792   grep -v '^ *+' conftest.er1 >conftest.err
14793   rm -rf conftest.er1
14794   cat conftest.err >&5
14795   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
14796   (exit $ac_status); } && {
14797          test -z "$ac_c_werror_flag" ||
14798          test ! -s conftest.err
14799        } && test -s conftest$ac_exeext && {
14800          test "$cross_compiling" = yes ||
14801          $as_test_x conftest$ac_exeext
14802        }; then
14803   ac_cv_lib_resolv_res_search=yes
14804 else
14805   $as_echo "$as_me: failed program was:" >&5
14806 sed 's/^/| /' conftest.$ac_ext >&5
14807
14808         ac_cv_lib_resolv_res_search=no
14809 fi
14810
14811 rm -rf conftest.dSYM
14812 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
14813       conftest$ac_exeext conftest.$ac_ext
14814 LIBS=$ac_check_lib_save_LIBS
14815 fi
14816 { $as_echo "$as_me:$LINENO: result: $ac_cv_lib_resolv_res_search" >&5
14817 $as_echo "$ac_cv_lib_resolv_res_search" >&6; }
14818 if test "x$ac_cv_lib_resolv_res_search" = x""yes; then
14819   PASSWD_LIBS="${PASSWD_LIBS} -lresolv"
14820 else
14821   { $as_echo "$as_me:$LINENO: WARNING: Can't find DNS resolver libraries needed for Kerberos" >&5
14822 $as_echo "$as_me: WARNING: Can't find DNS resolver libraries needed for Kerberos" >&2;}
14823
14824 fi
14825
14826 fi
14827
14828   fi
14829 fi
14830
14831
14832 ###############################################################################
14833 #
14834 #       Check for the nine billion variants of shadow passwords...
14835 #
14836 ###############################################################################
14837
14838 need_setuid=no
14839
14840 have_shadow=no
14841 with_shadow_req=unspecified
14842
14843
14844 # Check whether --with-shadow was given.
14845 if test "${with_shadow+set}" = set; then
14846   withval=$with_shadow; with_shadow="$withval"; with_shadow_req="$withval"
14847 else
14848   with_shadow=yes
14849 fi
14850
14851
14852
14853    case "$with_shadow" in
14854     yes) ;;
14855     no)  ;;
14856
14857     /*)
14858      { $as_echo "$as_me:$LINENO: checking for shadow password headers" >&5
14859 $as_echo_n "checking for shadow password headers... " >&6; }
14860      d=$with_shadow/include
14861      if test -d $d; then
14862        X_CFLAGS="-I$d $X_CFLAGS"
14863        { $as_echo "$as_me:$LINENO: result: $d" >&5
14864 $as_echo "$d" >&6; }
14865      else
14866        { $as_echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
14867 $as_echo "not found ($d: no such directory)" >&6; }
14868      fi
14869
14870      { $as_echo "$as_me:$LINENO: checking for shadow password libs" >&5
14871 $as_echo_n "checking for shadow password libs... " >&6; }
14872      d=$with_shadow/lib
14873      if test -d $d; then
14874        X_LIBS="-L$d $X_LIBS"
14875        { $as_echo "$as_me:$LINENO: result: $d" >&5
14876 $as_echo "$d" >&6; }
14877      else
14878        { $as_echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
14879 $as_echo "not found ($d: no such directory)" >&6; }
14880      fi
14881
14882      # replace the directory string with "yes".
14883      with_shadow_req="yes"
14884      with_shadow=$with_shadow_req
14885      ;;
14886
14887     *)
14888      echo ""
14889      echo "error: argument to --with-shadow must be \"yes\", \"no\", or a directory."
14890      echo "       If it is a directory, then \`DIR/include' will be added to"
14891      echo "       the -I list, and \`DIR/lib' will be added to the -L list."
14892      exit 1
14893      ;;
14894    esac
14895
14896
14897 if test "$enable_locking" = no ; then
14898   with_shadow_req=no
14899   with_shadow=no
14900 fi
14901
14902
14903 ###############################################################################
14904 #
14905 #       Check for Sun "adjunct" passwords.
14906 #
14907 ###############################################################################
14908
14909 if test "$with_shadow" = yes ; then
14910   { $as_echo "$as_me:$LINENO: checking for Sun-style shadow passwords" >&5
14911 $as_echo_n "checking for Sun-style shadow passwords... " >&6; }
14912 if test "${ac_cv_sun_adjunct+set}" = set; then
14913   $as_echo_n "(cached) " >&6
14914 else
14915
14916   ac_save_CPPFLAGS="$CPPFLAGS"
14917   if test \! -z "$includedir" ; then
14918     CPPFLAGS="$CPPFLAGS -I$includedir"
14919   fi
14920   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
14921   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
14922   cat >conftest.$ac_ext <<_ACEOF
14923 /* confdefs.h.  */
14924 _ACEOF
14925 cat confdefs.h >>conftest.$ac_ext
14926 cat >>conftest.$ac_ext <<_ACEOF
14927 /* end confdefs.h.  */
14928 #include <stdlib.h>
14929                                     #include <unistd.h>
14930                                     #include <sys/types.h>
14931                                     #include <sys/label.h>
14932                                     #include <sys/audit.h>
14933                                     #include <pwdadj.h>
14934 int
14935 main ()
14936 {
14937 struct passwd_adjunct *p = getpwanam("nobody");
14938                        const char *pw = p->pwa_passwd;
14939   ;
14940   return 0;
14941 }
14942 _ACEOF
14943 rm -rf conftest.$ac_objext
14944 if { (ac_try="$ac_compile"
14945 case "(($ac_try" in
14946   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14947   *) ac_try_echo=$ac_try;;
14948 esac
14949 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
14950 $as_echo "$ac_try_echo") >&5
14951   (eval "$ac_compile") 2>conftest.er1
14952   ac_status=$?
14953   grep -v '^ *+' conftest.er1 >conftest.err
14954   rm -rf conftest.er1
14955   cat conftest.err >&5
14956   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
14957   (exit $ac_status); } && {
14958          test -z "$ac_c_werror_flag" ||
14959          test ! -s conftest.err
14960        } && test -s conftest.$ac_objext; then
14961   ac_cv_sun_adjunct=yes
14962 else
14963   $as_echo "$as_me: failed program was:" >&5
14964 sed 's/^/| /' conftest.$ac_ext >&5
14965
14966         ac_cv_sun_adjunct=no
14967 fi
14968
14969 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14970   CPPFLAGS="$ac_save_CPPFLAGS"
14971 fi
14972 { $as_echo "$as_me:$LINENO: result: $ac_cv_sun_adjunct" >&5
14973 $as_echo "$ac_cv_sun_adjunct" >&6; }
14974   if test "$ac_cv_sun_adjunct" = yes; then
14975     have_shadow_adjunct=yes
14976     have_shadow=yes
14977     need_setuid=yes
14978   fi
14979 fi
14980
14981
14982 ###############################################################################
14983 #
14984 #       Check for DEC and SCO so-called "enhanced" security.
14985 #
14986 ###############################################################################
14987
14988 if test "$with_shadow" = yes ; then
14989   { $as_echo "$as_me:$LINENO: checking for DEC-style shadow passwords" >&5
14990 $as_echo_n "checking for DEC-style shadow passwords... " >&6; }
14991 if test "${ac_cv_enhanced_passwd+set}" = set; then
14992   $as_echo_n "(cached) " >&6
14993 else
14994
14995   ac_save_CPPFLAGS="$CPPFLAGS"
14996   if test \! -z "$includedir" ; then
14997     CPPFLAGS="$CPPFLAGS -I$includedir"
14998   fi
14999   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
15000   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
15001   cat >conftest.$ac_ext <<_ACEOF
15002 /* confdefs.h.  */
15003 _ACEOF
15004 cat confdefs.h >>conftest.$ac_ext
15005 cat >>conftest.$ac_ext <<_ACEOF
15006 /* end confdefs.h.  */
15007 #include <stdlib.h>
15008                                     #include <unistd.h>
15009                                     #include <sys/types.h>
15010                                     #include <pwd.h>
15011                                     #include <sys/security.h>
15012                                     #include <prot.h>
15013 int
15014 main ()
15015 {
15016 struct pr_passwd *p;
15017                        const char *pw;
15018                        set_auth_parameters(0, 0);
15019                        check_auth_parameters();
15020                        p = getprpwnam("nobody");
15021                        pw = p->ufld.fd_encrypt;
15022   ;
15023   return 0;
15024 }
15025 _ACEOF
15026 rm -rf conftest.$ac_objext
15027 if { (ac_try="$ac_compile"
15028 case "(($ac_try" in
15029   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15030   *) ac_try_echo=$ac_try;;
15031 esac
15032 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
15033 $as_echo "$ac_try_echo") >&5
15034   (eval "$ac_compile") 2>conftest.er1
15035   ac_status=$?
15036   grep -v '^ *+' conftest.er1 >conftest.err
15037   rm -rf conftest.er1
15038   cat conftest.err >&5
15039   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
15040   (exit $ac_status); } && {
15041          test -z "$ac_c_werror_flag" ||
15042          test ! -s conftest.err
15043        } && test -s conftest.$ac_objext; then
15044   ac_cv_enhanced_passwd=yes
15045 else
15046   $as_echo "$as_me: failed program was:" >&5
15047 sed 's/^/| /' conftest.$ac_ext >&5
15048
15049         ac_cv_enhanced_passwd=no
15050 fi
15051
15052 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15053   CPPFLAGS="$ac_save_CPPFLAGS"
15054 fi
15055 { $as_echo "$as_me:$LINENO: result: $ac_cv_enhanced_passwd" >&5
15056 $as_echo "$ac_cv_enhanced_passwd" >&6; }
15057   if test $ac_cv_enhanced_passwd = yes; then
15058     have_shadow_enhanced=yes
15059     have_shadow=yes
15060     need_setuid=yes
15061
15062     # On SCO, getprpwnam() is in -lprot (which uses nap() from -lx)
15063     # (I'm told it needs -lcurses too, but I don't understand why.)
15064     # But on DEC, it's in -lsecurity.
15065     #
15066     { $as_echo "$as_me:$LINENO: checking for getprpwnam in -lprot" >&5
15067 $as_echo_n "checking for getprpwnam in -lprot... " >&6; }
15068 if test "${ac_cv_lib_prot_getprpwnam+set}" = set; then
15069   $as_echo_n "(cached) " >&6
15070 else
15071   ac_check_lib_save_LIBS=$LIBS
15072 LIBS="-lprot -lx $LIBS"
15073 cat >conftest.$ac_ext <<_ACEOF
15074 /* confdefs.h.  */
15075 _ACEOF
15076 cat confdefs.h >>conftest.$ac_ext
15077 cat >>conftest.$ac_ext <<_ACEOF
15078 /* end confdefs.h.  */
15079
15080 /* Override any GCC internal prototype to avoid an error.
15081    Use char because int might match the return type of a GCC
15082    builtin and then its argument prototype would still apply.  */
15083 #ifdef __cplusplus
15084 extern "C"
15085 #endif
15086 char getprpwnam ();
15087 int
15088 main ()
15089 {
15090 return getprpwnam ();
15091   ;
15092   return 0;
15093 }
15094 _ACEOF
15095 rm -rf conftest.$ac_objext conftest$ac_exeext
15096 if { (ac_try="$ac_link"
15097 case "(($ac_try" in
15098   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15099   *) ac_try_echo=$ac_try;;
15100 esac
15101 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
15102 $as_echo "$ac_try_echo") >&5
15103   (eval "$ac_link") 2>conftest.er1
15104   ac_status=$?
15105   grep -v '^ *+' conftest.er1 >conftest.err
15106   rm -rf conftest.er1
15107   cat conftest.err >&5
15108   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
15109   (exit $ac_status); } && {
15110          test -z "$ac_c_werror_flag" ||
15111          test ! -s conftest.err
15112        } && test -s conftest$ac_exeext && {
15113          test "$cross_compiling" = yes ||
15114          $as_test_x conftest$ac_exeext
15115        }; then
15116   ac_cv_lib_prot_getprpwnam=yes
15117 else
15118   $as_echo "$as_me: failed program was:" >&5
15119 sed 's/^/| /' conftest.$ac_ext >&5
15120
15121         ac_cv_lib_prot_getprpwnam=no
15122 fi
15123
15124 rm -rf conftest.dSYM
15125 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
15126       conftest$ac_exeext conftest.$ac_ext
15127 LIBS=$ac_check_lib_save_LIBS
15128 fi
15129 { $as_echo "$as_me:$LINENO: result: $ac_cv_lib_prot_getprpwnam" >&5
15130 $as_echo "$ac_cv_lib_prot_getprpwnam" >&6; }
15131 if test "x$ac_cv_lib_prot_getprpwnam" = x""yes; then
15132   PASSWD_LIBS="$PASSWD_LIBS -lprot -lcurses -lx"
15133 else
15134   { $as_echo "$as_me:$LINENO: checking for getprpwnam in -lsecurity" >&5
15135 $as_echo_n "checking for getprpwnam in -lsecurity... " >&6; }
15136 if test "${ac_cv_lib_security_getprpwnam+set}" = set; then
15137   $as_echo_n "(cached) " >&6
15138 else
15139   ac_check_lib_save_LIBS=$LIBS
15140 LIBS="-lsecurity  $LIBS"
15141 cat >conftest.$ac_ext <<_ACEOF
15142 /* confdefs.h.  */
15143 _ACEOF
15144 cat confdefs.h >>conftest.$ac_ext
15145 cat >>conftest.$ac_ext <<_ACEOF
15146 /* end confdefs.h.  */
15147
15148 /* Override any GCC internal prototype to avoid an error.
15149    Use char because int might match the return type of a GCC
15150    builtin and then its argument prototype would still apply.  */
15151 #ifdef __cplusplus
15152 extern "C"
15153 #endif
15154 char getprpwnam ();
15155 int
15156 main ()
15157 {
15158 return getprpwnam ();
15159   ;
15160   return 0;
15161 }
15162 _ACEOF
15163 rm -rf conftest.$ac_objext conftest$ac_exeext
15164 if { (ac_try="$ac_link"
15165 case "(($ac_try" in
15166   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15167   *) ac_try_echo=$ac_try;;
15168 esac
15169 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
15170 $as_echo "$ac_try_echo") >&5
15171   (eval "$ac_link") 2>conftest.er1
15172   ac_status=$?
15173   grep -v '^ *+' conftest.er1 >conftest.err
15174   rm -rf conftest.er1
15175   cat conftest.err >&5
15176   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
15177   (exit $ac_status); } && {
15178          test -z "$ac_c_werror_flag" ||
15179          test ! -s conftest.err
15180        } && test -s conftest$ac_exeext && {
15181          test "$cross_compiling" = yes ||
15182          $as_test_x conftest$ac_exeext
15183        }; then
15184   ac_cv_lib_security_getprpwnam=yes
15185 else
15186   $as_echo "$as_me: failed program was:" >&5
15187 sed 's/^/| /' conftest.$ac_ext >&5
15188
15189         ac_cv_lib_security_getprpwnam=no
15190 fi
15191
15192 rm -rf conftest.dSYM
15193 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
15194       conftest$ac_exeext conftest.$ac_ext
15195 LIBS=$ac_check_lib_save_LIBS
15196 fi
15197 { $as_echo "$as_me:$LINENO: result: $ac_cv_lib_security_getprpwnam" >&5
15198 $as_echo "$ac_cv_lib_security_getprpwnam" >&6; }
15199 if test "x$ac_cv_lib_security_getprpwnam" = x""yes; then
15200   PASSWD_LIBS="$PASSWD_LIBS -lsecurity"
15201 fi
15202
15203 fi
15204
15205   fi
15206 fi
15207
15208 ###############################################################################
15209 #
15210 #       Check for HP's entry in the "Not Invented Here" Sweepstakes.
15211 #
15212 ###############################################################################
15213
15214 if test "$with_shadow" = yes ; then
15215   { $as_echo "$as_me:$LINENO: checking for HP-style shadow passwords" >&5
15216 $as_echo_n "checking for HP-style shadow passwords... " >&6; }
15217 if test "${ac_cv_hpux_passwd+set}" = set; then
15218   $as_echo_n "(cached) " >&6
15219 else
15220
15221   ac_save_CPPFLAGS="$CPPFLAGS"
15222   if test \! -z "$includedir" ; then
15223     CPPFLAGS="$CPPFLAGS -I$includedir"
15224   fi
15225   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
15226   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
15227   cat >conftest.$ac_ext <<_ACEOF
15228 /* confdefs.h.  */
15229 _ACEOF
15230 cat confdefs.h >>conftest.$ac_ext
15231 cat >>conftest.$ac_ext <<_ACEOF
15232 /* end confdefs.h.  */
15233 #include <stdlib.h>
15234                                     #include <unistd.h>
15235                                     #include <sys/types.h>
15236                                     #include <pwd.h>
15237                                     #include <hpsecurity.h>
15238                                     #include <prot.h>
15239 int
15240 main ()
15241 {
15242 struct s_passwd *p = getspwnam("nobody");
15243                        const char *pw = p->pw_passwd;
15244   ;
15245   return 0;
15246 }
15247 _ACEOF
15248 rm -rf conftest.$ac_objext
15249 if { (ac_try="$ac_compile"
15250 case "(($ac_try" in
15251   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15252   *) ac_try_echo=$ac_try;;
15253 esac
15254 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
15255 $as_echo "$ac_try_echo") >&5
15256   (eval "$ac_compile") 2>conftest.er1
15257   ac_status=$?
15258   grep -v '^ *+' conftest.er1 >conftest.err
15259   rm -rf conftest.er1
15260   cat conftest.err >&5
15261   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
15262   (exit $ac_status); } && {
15263          test -z "$ac_c_werror_flag" ||
15264          test ! -s conftest.err
15265        } && test -s conftest.$ac_objext; then
15266   ac_cv_hpux_passwd=yes
15267 else
15268   $as_echo "$as_me: failed program was:" >&5
15269 sed 's/^/| /' conftest.$ac_ext >&5
15270
15271         ac_cv_hpux_passwd=no
15272 fi
15273
15274 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15275   CPPFLAGS="$ac_save_CPPFLAGS"
15276 fi
15277 { $as_echo "$as_me:$LINENO: result: $ac_cv_hpux_passwd" >&5
15278 $as_echo "$ac_cv_hpux_passwd" >&6; }
15279   if test "$ac_cv_hpux_passwd" = yes; then
15280     have_shadow_hpux=yes
15281     have_shadow=yes
15282     need_setuid=yes
15283
15284     # on HPUX, bigcrypt is in -lsec
15285     { $as_echo "$as_me:$LINENO: checking for bigcrypt in -lsec" >&5
15286 $as_echo_n "checking for bigcrypt in -lsec... " >&6; }
15287 if test "${ac_cv_lib_sec_bigcrypt+set}" = set; then
15288   $as_echo_n "(cached) " >&6
15289 else
15290   ac_check_lib_save_LIBS=$LIBS
15291 LIBS="-lsec  $LIBS"
15292 cat >conftest.$ac_ext <<_ACEOF
15293 /* confdefs.h.  */
15294 _ACEOF
15295 cat confdefs.h >>conftest.$ac_ext
15296 cat >>conftest.$ac_ext <<_ACEOF
15297 /* end confdefs.h.  */
15298
15299 /* Override any GCC internal prototype to avoid an error.
15300    Use char because int might match the return type of a GCC
15301    builtin and then its argument prototype would still apply.  */
15302 #ifdef __cplusplus
15303 extern "C"
15304 #endif
15305 char bigcrypt ();
15306 int
15307 main ()
15308 {
15309 return bigcrypt ();
15310   ;
15311   return 0;
15312 }
15313 _ACEOF
15314 rm -rf conftest.$ac_objext conftest$ac_exeext
15315 if { (ac_try="$ac_link"
15316 case "(($ac_try" in
15317   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15318   *) ac_try_echo=$ac_try;;
15319 esac
15320 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
15321 $as_echo "$ac_try_echo") >&5
15322   (eval "$ac_link") 2>conftest.er1
15323   ac_status=$?
15324   grep -v '^ *+' conftest.er1 >conftest.err
15325   rm -rf conftest.er1
15326   cat conftest.err >&5
15327   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
15328   (exit $ac_status); } && {
15329          test -z "$ac_c_werror_flag" ||
15330          test ! -s conftest.err
15331        } && test -s conftest$ac_exeext && {
15332          test "$cross_compiling" = yes ||
15333          $as_test_x conftest$ac_exeext
15334        }; then
15335   ac_cv_lib_sec_bigcrypt=yes
15336 else
15337   $as_echo "$as_me: failed program was:" >&5
15338 sed 's/^/| /' conftest.$ac_ext >&5
15339
15340         ac_cv_lib_sec_bigcrypt=no
15341 fi
15342
15343 rm -rf conftest.dSYM
15344 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
15345       conftest$ac_exeext conftest.$ac_ext
15346 LIBS=$ac_check_lib_save_LIBS
15347 fi
15348 { $as_echo "$as_me:$LINENO: result: $ac_cv_lib_sec_bigcrypt" >&5
15349 $as_echo "$ac_cv_lib_sec_bigcrypt" >&6; }
15350 if test "x$ac_cv_lib_sec_bigcrypt" = x""yes; then
15351   PASSWD_LIBS="$PASSWD_LIBS -lsec"
15352 fi
15353
15354   fi
15355 fi
15356
15357
15358 ###############################################################################
15359 #
15360 #       Check for FreeBSD-style shadow passwords.
15361 #
15362 #       On FreeBSD, getpwnam() and friends work just like on non-shadow-
15363 #       password systems -- except you only get stuff in the pw_passwd field
15364 #       if the running program is setuid.  So, guess that we've got this
15365 #       lossage to contend with if /etc/master.passwd exists, and default to
15366 #       a setuid installation.
15367 #
15368 ###############################################################################
15369
15370 if test "$with_shadow" = yes ; then
15371   { $as_echo "$as_me:$LINENO: checking for FreeBSD-style shadow passwords" >&5
15372 $as_echo_n "checking for FreeBSD-style shadow passwords... " >&6; }
15373 if test "${ac_cv_master_passwd+set}" = set; then
15374   $as_echo_n "(cached) " >&6
15375 else
15376   if test -f /etc/master.passwd ; then
15377                     ac_cv_master_passwd=yes
15378                   else
15379                     ac_cv_master_passwd=no
15380                   fi
15381 fi
15382 { $as_echo "$as_me:$LINENO: result: $ac_cv_master_passwd" >&5
15383 $as_echo "$ac_cv_master_passwd" >&6; }
15384   if test "$ac_cv_master_passwd" = yes; then
15385     need_setuid=yes
15386   fi
15387 fi
15388
15389
15390 ###############################################################################
15391 #
15392 #       Check for traditional (ha!) shadow passwords.
15393 #
15394 ###############################################################################
15395
15396 if test "$with_shadow" = yes ; then
15397   { $as_echo "$as_me:$LINENO: checking for generic shadow passwords" >&5
15398 $as_echo_n "checking for generic shadow passwords... " >&6; }
15399 if test "${ac_cv_shadow+set}" = set; then
15400   $as_echo_n "(cached) " >&6
15401 else
15402
15403   ac_save_CPPFLAGS="$CPPFLAGS"
15404   if test \! -z "$includedir" ; then
15405     CPPFLAGS="$CPPFLAGS -I$includedir"
15406   fi
15407   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
15408   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
15409   cat >conftest.$ac_ext <<_ACEOF
15410 /* confdefs.h.  */
15411 _ACEOF
15412 cat confdefs.h >>conftest.$ac_ext
15413 cat >>conftest.$ac_ext <<_ACEOF
15414 /* end confdefs.h.  */
15415 #include <stdlib.h>
15416                                     #include <unistd.h>
15417                                     #include <sys/types.h>
15418                                     #include <pwd.h>
15419                                     #include <shadow.h>
15420 int
15421 main ()
15422 {
15423 struct spwd *p = getspnam("nobody");
15424                        const char *pw = p->sp_pwdp;
15425   ;
15426   return 0;
15427 }
15428 _ACEOF
15429 rm -rf conftest.$ac_objext
15430 if { (ac_try="$ac_compile"
15431 case "(($ac_try" in
15432   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15433   *) ac_try_echo=$ac_try;;
15434 esac
15435 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
15436 $as_echo "$ac_try_echo") >&5
15437   (eval "$ac_compile") 2>conftest.er1
15438   ac_status=$?
15439   grep -v '^ *+' conftest.er1 >conftest.err
15440   rm -rf conftest.er1
15441   cat conftest.err >&5
15442   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
15443   (exit $ac_status); } && {
15444          test -z "$ac_c_werror_flag" ||
15445          test ! -s conftest.err
15446        } && test -s conftest.$ac_objext; then
15447   ac_cv_shadow=yes
15448 else
15449   $as_echo "$as_me: failed program was:" >&5
15450 sed 's/^/| /' conftest.$ac_ext >&5
15451
15452         ac_cv_shadow=no
15453 fi
15454
15455 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15456   CPPFLAGS="$ac_save_CPPFLAGS"
15457 fi
15458 { $as_echo "$as_me:$LINENO: result: $ac_cv_shadow" >&5
15459 $as_echo "$ac_cv_shadow" >&6; }
15460   if test "$ac_cv_shadow" = yes; then
15461     have_shadow=yes
15462     need_setuid=yes
15463
15464     # On some systems (UnixWare 2.1), getspnam() is in -lgen instead of -lc.
15465     have_getspnam=no
15466     { $as_echo "$as_me:$LINENO: checking for getspnam in -lc" >&5
15467 $as_echo_n "checking for getspnam in -lc... " >&6; }
15468 if test "${ac_cv_lib_c_getspnam+set}" = set; then
15469   $as_echo_n "(cached) " >&6
15470 else
15471   ac_check_lib_save_LIBS=$LIBS
15472 LIBS="-lc  $LIBS"
15473 cat >conftest.$ac_ext <<_ACEOF
15474 /* confdefs.h.  */
15475 _ACEOF
15476 cat confdefs.h >>conftest.$ac_ext
15477 cat >>conftest.$ac_ext <<_ACEOF
15478 /* end confdefs.h.  */
15479
15480 /* Override any GCC internal prototype to avoid an error.
15481    Use char because int might match the return type of a GCC
15482    builtin and then its argument prototype would still apply.  */
15483 #ifdef __cplusplus
15484 extern "C"
15485 #endif
15486 char getspnam ();
15487 int
15488 main ()
15489 {
15490 return getspnam ();
15491   ;
15492   return 0;
15493 }
15494 _ACEOF
15495 rm -rf conftest.$ac_objext conftest$ac_exeext
15496 if { (ac_try="$ac_link"
15497 case "(($ac_try" in
15498   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15499   *) ac_try_echo=$ac_try;;
15500 esac
15501 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
15502 $as_echo "$ac_try_echo") >&5
15503   (eval "$ac_link") 2>conftest.er1
15504   ac_status=$?
15505   grep -v '^ *+' conftest.er1 >conftest.err
15506   rm -rf conftest.er1
15507   cat conftest.err >&5
15508   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
15509   (exit $ac_status); } && {
15510          test -z "$ac_c_werror_flag" ||
15511          test ! -s conftest.err
15512        } && test -s conftest$ac_exeext && {
15513          test "$cross_compiling" = yes ||
15514          $as_test_x conftest$ac_exeext
15515        }; then
15516   ac_cv_lib_c_getspnam=yes
15517 else
15518   $as_echo "$as_me: failed program was:" >&5
15519 sed 's/^/| /' conftest.$ac_ext >&5
15520
15521         ac_cv_lib_c_getspnam=no
15522 fi
15523
15524 rm -rf conftest.dSYM
15525 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
15526       conftest$ac_exeext conftest.$ac_ext
15527 LIBS=$ac_check_lib_save_LIBS
15528 fi
15529 { $as_echo "$as_me:$LINENO: result: $ac_cv_lib_c_getspnam" >&5
15530 $as_echo "$ac_cv_lib_c_getspnam" >&6; }
15531 if test "x$ac_cv_lib_c_getspnam" = x""yes; then
15532   have_getspnam=yes
15533 fi
15534
15535     if test "$have_getspnam" = no ; then
15536       { $as_echo "$as_me:$LINENO: checking for getspnam in -lgen" >&5
15537 $as_echo_n "checking for getspnam in -lgen... " >&6; }
15538 if test "${ac_cv_lib_gen_getspnam+set}" = set; then
15539   $as_echo_n "(cached) " >&6
15540 else
15541   ac_check_lib_save_LIBS=$LIBS
15542 LIBS="-lgen  $LIBS"
15543 cat >conftest.$ac_ext <<_ACEOF
15544 /* confdefs.h.  */
15545 _ACEOF
15546 cat confdefs.h >>conftest.$ac_ext
15547 cat >>conftest.$ac_ext <<_ACEOF
15548 /* end confdefs.h.  */
15549
15550 /* Override any GCC internal prototype to avoid an error.
15551    Use char because int might match the return type of a GCC
15552    builtin and then its argument prototype would still apply.  */
15553 #ifdef __cplusplus
15554 extern "C"
15555 #endif
15556 char getspnam ();
15557 int
15558 main ()
15559 {
15560 return getspnam ();
15561   ;
15562   return 0;
15563 }
15564 _ACEOF
15565 rm -rf conftest.$ac_objext conftest$ac_exeext
15566 if { (ac_try="$ac_link"
15567 case "(($ac_try" in
15568   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15569   *) ac_try_echo=$ac_try;;
15570 esac
15571 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
15572 $as_echo "$ac_try_echo") >&5
15573   (eval "$ac_link") 2>conftest.er1
15574   ac_status=$?
15575   grep -v '^ *+' conftest.er1 >conftest.err
15576   rm -rf conftest.er1
15577   cat conftest.err >&5
15578   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
15579   (exit $ac_status); } && {
15580          test -z "$ac_c_werror_flag" ||
15581          test ! -s conftest.err
15582        } && test -s conftest$ac_exeext && {
15583          test "$cross_compiling" = yes ||
15584          $as_test_x conftest$ac_exeext
15585        }; then
15586   ac_cv_lib_gen_getspnam=yes
15587 else
15588   $as_echo "$as_me: failed program was:" >&5
15589 sed 's/^/| /' conftest.$ac_ext >&5
15590
15591         ac_cv_lib_gen_getspnam=no
15592 fi
15593
15594 rm -rf conftest.dSYM
15595 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
15596       conftest$ac_exeext conftest.$ac_ext
15597 LIBS=$ac_check_lib_save_LIBS
15598 fi
15599 { $as_echo "$as_me:$LINENO: result: $ac_cv_lib_gen_getspnam" >&5
15600 $as_echo "$ac_cv_lib_gen_getspnam" >&6; }
15601 if test "x$ac_cv_lib_gen_getspnam" = x""yes; then
15602   have_getspnam=yes; PASSWD_LIBS="$PASSWD_LIBS -lgen"
15603 fi
15604
15605     fi
15606   fi
15607 fi
15608
15609
15610 ###############################################################################
15611 #
15612 #       Check for other libraries needed for non-shadow passwords.
15613 #
15614 ###############################################################################
15615
15616 if test "$enable_locking" = yes ; then
15617
15618   # On some systems (UnixWare 2.1), crypt() is in -lcrypt instead of -lc.
15619   have_crypt=no
15620   { $as_echo "$as_me:$LINENO: checking for crypt in -lc" >&5
15621 $as_echo_n "checking for crypt in -lc... " >&6; }
15622 if test "${ac_cv_lib_c_crypt+set}" = set; then
15623   $as_echo_n "(cached) " >&6
15624 else
15625   ac_check_lib_save_LIBS=$LIBS
15626 LIBS="-lc  $LIBS"
15627 cat >conftest.$ac_ext <<_ACEOF
15628 /* confdefs.h.  */
15629 _ACEOF
15630 cat confdefs.h >>conftest.$ac_ext
15631 cat >>conftest.$ac_ext <<_ACEOF
15632 /* end confdefs.h.  */
15633
15634 /* Override any GCC internal prototype to avoid an error.
15635    Use char because int might match the return type of a GCC
15636    builtin and then its argument prototype would still apply.  */
15637 #ifdef __cplusplus
15638 extern "C"
15639 #endif
15640 char crypt ();
15641 int
15642 main ()
15643 {
15644 return crypt ();
15645   ;
15646   return 0;
15647 }
15648 _ACEOF
15649 rm -rf conftest.$ac_objext conftest$ac_exeext
15650 if { (ac_try="$ac_link"
15651 case "(($ac_try" in
15652   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15653   *) ac_try_echo=$ac_try;;
15654 esac
15655 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
15656 $as_echo "$ac_try_echo") >&5
15657   (eval "$ac_link") 2>conftest.er1
15658   ac_status=$?
15659   grep -v '^ *+' conftest.er1 >conftest.err
15660   rm -rf conftest.er1
15661   cat conftest.err >&5
15662   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
15663   (exit $ac_status); } && {
15664          test -z "$ac_c_werror_flag" ||
15665          test ! -s conftest.err
15666        } && test -s conftest$ac_exeext && {
15667          test "$cross_compiling" = yes ||
15668          $as_test_x conftest$ac_exeext
15669        }; then
15670   ac_cv_lib_c_crypt=yes
15671 else
15672   $as_echo "$as_me: failed program was:" >&5
15673 sed 's/^/| /' conftest.$ac_ext >&5
15674
15675         ac_cv_lib_c_crypt=no
15676 fi
15677
15678 rm -rf conftest.dSYM
15679 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
15680       conftest$ac_exeext conftest.$ac_ext
15681 LIBS=$ac_check_lib_save_LIBS
15682 fi
15683 { $as_echo "$as_me:$LINENO: result: $ac_cv_lib_c_crypt" >&5
15684 $as_echo "$ac_cv_lib_c_crypt" >&6; }
15685 if test "x$ac_cv_lib_c_crypt" = x""yes; then
15686   have_crypt=yes
15687 fi
15688
15689   if test "$have_crypt" = no ; then
15690     { $as_echo "$as_me:$LINENO: checking for crypt in -lcrypt" >&5
15691 $as_echo_n "checking for crypt in -lcrypt... " >&6; }
15692 if test "${ac_cv_lib_crypt_crypt+set}" = set; then
15693   $as_echo_n "(cached) " >&6
15694 else
15695   ac_check_lib_save_LIBS=$LIBS
15696 LIBS="-lcrypt  $LIBS"
15697 cat >conftest.$ac_ext <<_ACEOF
15698 /* confdefs.h.  */
15699 _ACEOF
15700 cat confdefs.h >>conftest.$ac_ext
15701 cat >>conftest.$ac_ext <<_ACEOF
15702 /* end confdefs.h.  */
15703
15704 /* Override any GCC internal prototype to avoid an error.
15705    Use char because int might match the return type of a GCC
15706    builtin and then its argument prototype would still apply.  */
15707 #ifdef __cplusplus
15708 extern "C"
15709 #endif
15710 char crypt ();
15711 int
15712 main ()
15713 {
15714 return crypt ();
15715   ;
15716   return 0;
15717 }
15718 _ACEOF
15719 rm -rf conftest.$ac_objext conftest$ac_exeext
15720 if { (ac_try="$ac_link"
15721 case "(($ac_try" in
15722   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15723   *) ac_try_echo=$ac_try;;
15724 esac
15725 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
15726 $as_echo "$ac_try_echo") >&5
15727   (eval "$ac_link") 2>conftest.er1
15728   ac_status=$?
15729   grep -v '^ *+' conftest.er1 >conftest.err
15730   rm -rf conftest.er1
15731   cat conftest.err >&5
15732   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
15733   (exit $ac_status); } && {
15734          test -z "$ac_c_werror_flag" ||
15735          test ! -s conftest.err
15736        } && test -s conftest$ac_exeext && {
15737          test "$cross_compiling" = yes ||
15738          $as_test_x conftest$ac_exeext
15739        }; then
15740   ac_cv_lib_crypt_crypt=yes
15741 else
15742   $as_echo "$as_me: failed program was:" >&5
15743 sed 's/^/| /' conftest.$ac_ext >&5
15744
15745         ac_cv_lib_crypt_crypt=no
15746 fi
15747
15748 rm -rf conftest.dSYM
15749 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
15750       conftest$ac_exeext conftest.$ac_ext
15751 LIBS=$ac_check_lib_save_LIBS
15752 fi
15753 { $as_echo "$as_me:$LINENO: result: $ac_cv_lib_crypt_crypt" >&5
15754 $as_echo "$ac_cv_lib_crypt_crypt" >&6; }
15755 if test "x$ac_cv_lib_crypt_crypt" = x""yes; then
15756   have_crypt=yes; PASSWD_LIBS="$PASSWD_LIBS -lcrypt"
15757 fi
15758
15759   fi
15760 fi
15761
15762
15763 # Most of the above shadow mechanisms will have set need_setuid to yes,
15764 # if they were found.  But, on some systems, we need setuid even when
15765 # using plain old vanilla passwords.
15766 #
15767 if test "$enable_locking" = yes ; then
15768   case "$host" in
15769     *-hpux* | *-aix* | *-netbsd* | *-freebsd* | *-openbsd* )
15770       need_setuid=yes
15771     ;;
15772   esac
15773 fi
15774
15775
15776 if test "$have_shadow_adjunct" = yes ; then
15777   cat >>confdefs.h <<\_ACEOF
15778 #define HAVE_ADJUNCT_PASSWD 1
15779 _ACEOF
15780
15781 elif test "$have_shadow_enhanced" = yes ; then
15782   cat >>confdefs.h <<\_ACEOF
15783 #define HAVE_ENHANCED_PASSWD 1
15784 _ACEOF
15785
15786 elif test "$have_shadow_hpux" = yes ; then
15787   cat >>confdefs.h <<\_ACEOF
15788 #define HAVE_HPUX_PASSWD 1
15789 _ACEOF
15790
15791 elif test "$have_shadow" = yes ; then
15792   cat >>confdefs.h <<\_ACEOF
15793 #define HAVE_SHADOW_PASSWD 1
15794 _ACEOF
15795
15796 fi
15797
15798
15799 ###############################################################################
15800 #
15801 #       Check for external password helper
15802 #       On SuSE, instead of having xscreensaver be a setuid program, they
15803 #       fork an external program that takes the password on stdin, and
15804 #       returns true if that password is a valid one.  Then only that
15805 #       smaller program needs to be setuid.
15806 #
15807 #       (Note that this external program is not a GUI: the GUI is still
15808 #       all in xscreensaver itself; the external program just does auth.)
15809 #
15810 ###############################################################################
15811
15812 have_passwd_helper=no
15813 with_passwd_helper_req=unspecified
15814
15815
15816 # Check whether --with-passwd-helper was given.
15817 if test "${with_passwd_helper+set}" = set; then
15818   withval=$with_passwd_helper; with_passwd_helper="$withval"; with_passwd_helper_req="$withval"
15819 else
15820   with_passwd_helper=no
15821 fi
15822
15823 # no HANDLE_X_PATH_ARG for this one
15824
15825 if test "$enable_locking" = no ; then
15826   with_passwd_helper_req=no
15827   with_passwd_helper=no
15828 fi
15829
15830 case "$with_passwd_helper" in
15831   ""|no) : ;;
15832   /*)
15833     cat >>confdefs.h <<_ACEOF
15834 #define PASSWD_HELPER_PROGRAM "$with_passwd_helper"
15835 _ACEOF
15836
15837     have_passwd_helper=yes;;
15838   *)
15839     echo "error: --with-passwd-helper needs full pathname of helper (not '$with_passwd_helper')." >&2
15840     exit 1
15841 esac
15842
15843
15844 ###############################################################################
15845 #
15846 #       Check for a login manager for a "New Login" button on the lock dialog.
15847 #       Usually this will be "/usr/bin/gdmflexiserver".
15848 #
15849 ###############################################################################
15850
15851 with_login_manager_req=unspecified
15852 default_login_manager_1='gdmflexiserver -ls'
15853 default_login_manager_2='kdmctl reserve'
15854
15855
15856 # Check whether --with-login-manager was given.
15857 if test "${with_login_manager+set}" = set; then
15858   withval=$with_login_manager; with_login_manager="$withval"; with_login_manager_req="$withval"
15859 else
15860   with_login_manager=yes
15861 fi
15862
15863 # no HANDLE_X_PATH_ARG for this one
15864
15865 if test "$enable_locking" = no ; then
15866   with_login_manager_req=no
15867   with_login_manager=no
15868 fi
15869
15870 case "$with_login_manager_req" in
15871   no)
15872     with_login_manager=""
15873   ;;
15874
15875   yes|unspecified)
15876     # Try both defaults, use the one that exists.
15877
15878     set dummy $default_login_manager_1 ; login_manager_tmp=$2
15879     unset ac_cv_path_login_manager_tmp  # don't cache
15880     # Extract the first word of "$login_manager_tmp", so it can be a program name with args.
15881 set dummy $login_manager_tmp; ac_word=$2
15882 { $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
15883 $as_echo_n "checking for $ac_word... " >&6; }
15884 if test "${ac_cv_path_login_manager_tmp+set}" = set; then
15885   $as_echo_n "(cached) " >&6
15886 else
15887   case $login_manager_tmp in
15888   [\\/]* | ?:[\\/]*)
15889   ac_cv_path_login_manager_tmp="$login_manager_tmp" # Let the user override the test with a path.
15890   ;;
15891   *)
15892   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
15893 for as_dir in $PATH
15894 do
15895   IFS=$as_save_IFS
15896   test -z "$as_dir" && as_dir=.
15897   for ac_exec_ext in '' $ac_executable_extensions; do
15898   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
15899     ac_cv_path_login_manager_tmp="$as_dir/$ac_word$ac_exec_ext"
15900     $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
15901     break 2
15902   fi
15903 done
15904 done
15905 IFS=$as_save_IFS
15906
15907   ;;
15908 esac
15909 fi
15910 login_manager_tmp=$ac_cv_path_login_manager_tmp
15911 if test -n "$login_manager_tmp"; then
15912   { $as_echo "$as_me:$LINENO: result: $login_manager_tmp" >&5
15913 $as_echo "$login_manager_tmp" >&6; }
15914 else
15915   { $as_echo "$as_me:$LINENO: result: no" >&5
15916 $as_echo "no" >&6; }
15917 fi
15918
15919
15920     if test ! -z "$login_manager_tmp" ; then
15921       with_login_manager="$default_login_manager_1"
15922     else
15923       set dummy $default_login_manager_2 ; login_manager_tmp=$2
15924       unset ac_cv_path_login_manager_tmp  # don't cache
15925       # Extract the first word of "$login_manager_tmp", so it can be a program name with args.
15926 set dummy $login_manager_tmp; ac_word=$2
15927 { $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
15928 $as_echo_n "checking for $ac_word... " >&6; }
15929 if test "${ac_cv_path_login_manager_tmp+set}" = set; then
15930   $as_echo_n "(cached) " >&6
15931 else
15932   case $login_manager_tmp in
15933   [\\/]* | ?:[\\/]*)
15934   ac_cv_path_login_manager_tmp="$login_manager_tmp" # Let the user override the test with a path.
15935   ;;
15936   *)
15937   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
15938 for as_dir in $PATH
15939 do
15940   IFS=$as_save_IFS
15941   test -z "$as_dir" && as_dir=.
15942   for ac_exec_ext in '' $ac_executable_extensions; do
15943   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
15944     ac_cv_path_login_manager_tmp="$as_dir/$ac_word$ac_exec_ext"
15945     $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
15946     break 2
15947   fi
15948 done
15949 done
15950 IFS=$as_save_IFS
15951
15952   ;;
15953 esac
15954 fi
15955 login_manager_tmp=$ac_cv_path_login_manager_tmp
15956 if test -n "$login_manager_tmp"; then
15957   { $as_echo "$as_me:$LINENO: result: $login_manager_tmp" >&5
15958 $as_echo "$login_manager_tmp" >&6; }
15959 else
15960   { $as_echo "$as_me:$LINENO: result: no" >&5
15961 $as_echo "no" >&6; }
15962 fi
15963
15964
15965       if test ! -z "$login_manager_tmp" ; then
15966         with_login_manager="$default_login_manager_2"
15967       else
15968         with_login_manager=""
15969       fi
15970     fi
15971   ;;
15972
15973   /*)
15974     # absolute path specified on cmd line
15975     set dummy $with_login_manager_req ; login_manager_tmp=$2
15976     { $as_echo "$as_me:$LINENO: checking for $login_manager_tmp" >&5
15977 $as_echo_n "checking for $login_manager_tmp... " >&6; }
15978     if test -x "$login_manager_tmp" ; then
15979       { $as_echo "$as_me:$LINENO: result: yes" >&5
15980 $as_echo "yes" >&6; }
15981     else
15982       { $as_echo "$as_me:$LINENO: result: no" >&5
15983 $as_echo "no" >&6; }
15984       with_login_manager=""
15985     fi
15986   ;;
15987
15988   *)
15989     # relative path specified on cmd line
15990     set dummy $with_login_manager_req ; login_manager_tmp=$2
15991     unset ac_cv_path_login_manager_tmp    # don't cache
15992     # Extract the first word of "$login_manager_tmp", so it can be a program name with args.
15993 set dummy $login_manager_tmp; ac_word=$2
15994 { $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
15995 $as_echo_n "checking for $ac_word... " >&6; }
15996 if test "${ac_cv_path_login_manager_tmp+set}" = set; then
15997   $as_echo_n "(cached) " >&6
15998 else
15999   case $login_manager_tmp in
16000   [\\/]* | ?:[\\/]*)
16001   ac_cv_path_login_manager_tmp="$login_manager_tmp" # Let the user override the test with a path.
16002   ;;
16003   *)
16004   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
16005 for as_dir in $PATH
16006 do
16007   IFS=$as_save_IFS
16008   test -z "$as_dir" && as_dir=.
16009   for ac_exec_ext in '' $ac_executable_extensions; do
16010   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
16011     ac_cv_path_login_manager_tmp="$as_dir/$ac_word$ac_exec_ext"
16012     $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
16013     break 2
16014   fi
16015 done
16016 done
16017 IFS=$as_save_IFS
16018
16019   ;;
16020 esac
16021 fi
16022 login_manager_tmp=$ac_cv_path_login_manager_tmp
16023 if test -n "$login_manager_tmp"; then
16024   { $as_echo "$as_me:$LINENO: result: $login_manager_tmp" >&5
16025 $as_echo "$login_manager_tmp" >&6; }
16026 else
16027   { $as_echo "$as_me:$LINENO: result: no" >&5
16028 $as_echo "no" >&6; }
16029 fi
16030
16031
16032     if test -z "$login_manager_tmp" ; then
16033       with_login_manager=""
16034     else
16035       with_login_manager="$login_manager_tmp"
16036     fi
16037   ;;
16038 esac
16039 ac_cv_login_manager_program="$with_login_manager"
16040
16041 NEW_LOGIN_COMMAND_P=''
16042 NEW_LOGIN_COMMAND="$ac_cv_login_manager_program"
16043
16044 { $as_echo "$as_me:$LINENO: checking for login manager" >&5
16045 $as_echo_n "checking for login manager... " >&6; }
16046 if test -z "$NEW_LOGIN_COMMAND" ; then
16047   NEW_LOGIN_COMMAND="$default_login_manager_1"
16048   NEW_LOGIN_COMMAND_P='! '
16049   { $as_echo "$as_me:$LINENO: result: $NEW_LOGIN_COMMAND (disabled)" >&5
16050 $as_echo "$NEW_LOGIN_COMMAND (disabled)" >&6; }
16051 else
16052   { $as_echo "$as_me:$LINENO: result: $NEW_LOGIN_COMMAND" >&5
16053 $as_echo "$NEW_LOGIN_COMMAND" >&6; }
16054 fi
16055
16056
16057 ###############################################################################
16058 #
16059 #       Check for -lgtk (and Gnome stuff)
16060 #
16061 ###############################################################################
16062
16063 have_gtk=no
16064 with_gtk_req=unspecified
16065
16066 # Check whether --with-gtk was given.
16067 if test "${with_gtk+set}" = set; then
16068   withval=$with_gtk; with_gtk="$withval"; with_gtk_req="$withval"
16069 else
16070   with_gtk=yes
16071 fi
16072
16073
16074 # if --with-gtk=/directory/ was specified, remember that directory so that
16075 # we can also look for the `gtk-config' program in that directory.
16076 case "$with_gtk" in
16077   /*)
16078     gtk_dir="$with_gtk"
16079     ;;
16080   *)
16081     gtk_dir=""
16082     ;;
16083 esac
16084
16085
16086    case "$with_gtk" in
16087     yes) ;;
16088     no)  ;;
16089
16090     /*)
16091      { $as_echo "$as_me:$LINENO: checking for Gtk headers" >&5
16092 $as_echo_n "checking for Gtk headers... " >&6; }
16093      d=$with_gtk/include
16094      if test -d $d; then
16095        X_CFLAGS="-I$d $X_CFLAGS"
16096        { $as_echo "$as_me:$LINENO: result: $d" >&5
16097 $as_echo "$d" >&6; }
16098      else
16099        { $as_echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
16100 $as_echo "not found ($d: no such directory)" >&6; }
16101      fi
16102
16103      { $as_echo "$as_me:$LINENO: checking for Gtk libs" >&5
16104 $as_echo_n "checking for Gtk libs... " >&6; }
16105      d=$with_gtk/lib
16106      if test -d $d; then
16107        X_LIBS="-L$d $X_LIBS"
16108        { $as_echo "$as_me:$LINENO: result: $d" >&5
16109 $as_echo "$d" >&6; }
16110      else
16111        { $as_echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
16112 $as_echo "not found ($d: no such directory)" >&6; }
16113      fi
16114
16115      # replace the directory string with "yes".
16116      with_gtk_req="yes"
16117      with_gtk=$with_gtk_req
16118      ;;
16119
16120     *)
16121      echo ""
16122      echo "error: argument to --with-gtk must be \"yes\", \"no\", or a directory."
16123      echo "       If it is a directory, then \`DIR/include' will be added to"
16124      echo "       the -I list, and \`DIR/lib' will be added to the -L list."
16125      exit 1
16126      ;;
16127    esac
16128
16129
16130 if test "$with_gtk" != yes -a "$with_gtk" != no ; then
16131   echo "error: must be yes or no: --with-gtk=$with_gtk"
16132   exit 1
16133 fi
16134
16135
16136 parse_gtk_version_string() {
16137   # M4 sucks!!
16138
16139   maj=`echo $ac_gtk_version_string | sed -n 's/\..*//p'`
16140   min=`echo $ac_gtk_version_string | sed -n 's/[^.]*\.\([^.]*\).*/\1/p'`
16141
16142   ac_gtk_version=`echo "$maj * 1000 + $min" | bc`
16143   if test -z "$ac_gtk_version"; then
16144     ac_gtk_version=unknown
16145     ac_gtk_version_string=unknown
16146   fi
16147 }
16148
16149 # Find pkg-config... (need this for both gtk and gdk_pixbuf.)
16150 # if the user specified --with-gtk=/foo/ then look there.
16151 #
16152 gtk_path="$PATH"
16153 if test ! -z "$gtk_dir"; then
16154   # canonicalize slashes.
16155   foo=`echo "${gtk_dir}/bin" | sed 's@//*@/@g'`
16156   gtk_path="$foo:$gtk_path"
16157 fi
16158
16159 for ac_prog in pkg-config
16160 do
16161   # Extract the first word of "$ac_prog", so it can be a program name with args.
16162 set dummy $ac_prog; ac_word=$2
16163 { $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
16164 $as_echo_n "checking for $ac_word... " >&6; }
16165 if test "${ac_cv_path_pkg_config+set}" = set; then
16166   $as_echo_n "(cached) " >&6
16167 else
16168   case $pkg_config in
16169   [\\/]* | ?:[\\/]*)
16170   ac_cv_path_pkg_config="$pkg_config" # Let the user override the test with a path.
16171   ;;
16172   *)
16173   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
16174 for as_dir in $gtk_path
16175 do
16176   IFS=$as_save_IFS
16177   test -z "$as_dir" && as_dir=.
16178   for ac_exec_ext in '' $ac_executable_extensions; do
16179   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
16180     ac_cv_path_pkg_config="$as_dir/$ac_word$ac_exec_ext"
16181     $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
16182     break 2
16183   fi
16184 done
16185 done
16186 IFS=$as_save_IFS
16187
16188   ;;
16189 esac
16190 fi
16191 pkg_config=$ac_cv_path_pkg_config
16192 if test -n "$pkg_config"; then
16193   { $as_echo "$as_me:$LINENO: result: $pkg_config" >&5
16194 $as_echo "$pkg_config" >&6; }
16195 else
16196   { $as_echo "$as_me:$LINENO: result: no" >&5
16197 $as_echo "no" >&6; }
16198 fi
16199
16200
16201   test -n "$pkg_config" && break
16202 done
16203
16204
16205 if test -z "$pkg_config" ; then
16206   { $as_echo "$as_me:$LINENO: WARNING: pkg-config not found!" >&5
16207 $as_echo "$as_me: WARNING: pkg-config not found!" >&2;}
16208   pkg_config="false"
16209 fi
16210
16211
16212 # Utility function for running pkg-config-based tests...
16213 #
16214 pkgs=''
16215 pkg_check_version() {
16216   if test "$ok" = yes ; then
16217     req="$1"
16218     min="$2"
16219     { $as_echo "$as_me:$LINENO: checking for $req" >&5
16220 $as_echo_n "checking for $req... " >&6; }
16221     if $pkg_config --exists "$req" ; then
16222       vers=`$pkg_config --modversion "$req"`
16223       if $pkg_config --exists "$req >= $min" ; then
16224         { $as_echo "$as_me:$LINENO: result: $vers" >&5
16225 $as_echo "$vers" >&6; }
16226         pkgs="$pkgs $req"
16227         return 1
16228       else
16229         { $as_echo "$as_me:$LINENO: result: $vers (wanted >= $min)" >&5
16230 $as_echo "$vers (wanted >= $min)" >&6; }
16231         ok=no
16232         return 0
16233       fi
16234     else
16235       { $as_echo "$as_me:$LINENO: result: no" >&5
16236 $as_echo "no" >&6; }
16237       ok=no
16238       return 0
16239     fi
16240   fi
16241 }
16242
16243
16244 jurassic_gtk=no
16245 gtk_halfassed=no
16246
16247 if test "$with_gtk" = yes; then
16248   have_gtk=no
16249
16250   ok="yes"
16251   pkg_check_version            gtk+-2.0  2.0.1  ; ac_gtk_version_string="$vers"
16252   pkg_check_version         gmodule-2.0  2.0.0
16253   pkg_check_version          libxml-2.0  2.4.6
16254   pkg_check_version        libglade-2.0  1.99.0
16255   pkg_check_version      gdk-pixbuf-2.0  2.0.0
16256   pkg_check_version gdk-pixbuf-xlib-2.0  2.0.0
16257   have_gtk="$ok"
16258
16259   if test "$have_gtk" = no; then
16260     if test -n "$ac_gtk_version_string" ; then
16261       gtk_halfassed="$ac_gtk_version_string"
16262       gtk_halfassed_lib="$req"
16263     fi
16264   fi
16265
16266   if test "$have_gtk" = yes; then
16267     parse_gtk_version_string
16268     jurassic_gtk=no
16269   fi
16270
16271   if test "$have_gtk" = yes; then
16272     { $as_echo "$as_me:$LINENO: checking for Gtk includes" >&5
16273 $as_echo_n "checking for Gtk includes... " >&6; }
16274 if test "${ac_cv_gtk_config_cflags+set}" = set; then
16275   $as_echo_n "(cached) " >&6
16276 else
16277   ac_cv_gtk_config_cflags=`$pkg_config --cflags $pkgs`
16278 fi
16279 { $as_echo "$as_me:$LINENO: result: $ac_cv_gtk_config_cflags" >&5
16280 $as_echo "$ac_cv_gtk_config_cflags" >&6; }
16281     { $as_echo "$as_me:$LINENO: checking for Gtk libs" >&5
16282 $as_echo_n "checking for Gtk libs... " >&6; }
16283 if test "${ac_cv_gtk_config_libs+set}" = set; then
16284   $as_echo_n "(cached) " >&6
16285 else
16286   ac_cv_gtk_config_libs=`$pkg_config --libs $pkgs`
16287 fi
16288 { $as_echo "$as_me:$LINENO: result: $ac_cv_gtk_config_libs" >&5
16289 $as_echo "$ac_cv_gtk_config_libs" >&6; }
16290   fi
16291
16292   ac_gtk_config_cflags=$ac_cv_gtk_config_cflags
16293   ac_gtk_config_libs=$ac_cv_gtk_config_libs
16294
16295   GTK_EXTRA_OBJS=""
16296   GTK_DATADIR=""
16297   if test "$have_gtk" = yes; then
16298     GTK_DATADIR=`$pkg_config --variable=prefix gtk+-2.0`
16299     GTK_DATADIR="$GTK_DATADIR/share"
16300   fi
16301
16302   if test "$have_gtk" = yes; then
16303     INCLUDES="$INCLUDES $ac_gtk_config_cflags"
16304     GTK_LIBS="$GTK_LIBS $ac_gtk_config_libs"
16305     cat >>confdefs.h <<\_ACEOF
16306 #define HAVE_GTK 1
16307 _ACEOF
16308
16309     cat >>confdefs.h <<\_ACEOF
16310 #define HAVE_GTK2 1
16311 _ACEOF
16312
16313     cat >>confdefs.h <<\_ACEOF
16314 #define HAVE_XML 1
16315 _ACEOF
16316
16317   fi
16318
16319 fi
16320
16321
16322 # Check for the various Gnome help and URL loading programs.
16323 #
16324 WITH_BROWSER=gnome-open
16325 if test "$have_gtk" = yes; then
16326   for ac_prog in gnome-open
16327 do
16328   # Extract the first word of "$ac_prog", so it can be a program name with args.
16329 set dummy $ac_prog; ac_word=$2
16330 { $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
16331 $as_echo_n "checking for $ac_word... " >&6; }
16332 if test "${ac_cv_prog_gnome_open_program+set}" = set; then
16333   $as_echo_n "(cached) " >&6
16334 else
16335   if test -n "$gnome_open_program"; then
16336   ac_cv_prog_gnome_open_program="$gnome_open_program" # Let the user override the test.
16337 else
16338 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
16339 for as_dir in $PATH
16340 do
16341   IFS=$as_save_IFS
16342   test -z "$as_dir" && as_dir=.
16343   for ac_exec_ext in '' $ac_executable_extensions; do
16344   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
16345     ac_cv_prog_gnome_open_program="$ac_prog"
16346     $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
16347     break 2
16348   fi
16349 done
16350 done
16351 IFS=$as_save_IFS
16352
16353 fi
16354 fi
16355 gnome_open_program=$ac_cv_prog_gnome_open_program
16356 if test -n "$gnome_open_program"; then
16357   { $as_echo "$as_me:$LINENO: result: $gnome_open_program" >&5
16358 $as_echo "$gnome_open_program" >&6; }
16359 else
16360   { $as_echo "$as_me:$LINENO: result: no" >&5
16361 $as_echo "no" >&6; }
16362 fi
16363
16364
16365   test -n "$gnome_open_program" && break
16366 done
16367
16368   for ac_prog in gnome-url-show
16369 do
16370   # Extract the first word of "$ac_prog", so it can be a program name with args.
16371 set dummy $ac_prog; ac_word=$2
16372 { $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
16373 $as_echo_n "checking for $ac_word... " >&6; }
16374 if test "${ac_cv_prog_gnome_url_show_program+set}" = set; then
16375   $as_echo_n "(cached) " >&6
16376 else
16377   if test -n "$gnome_url_show_program"; then
16378   ac_cv_prog_gnome_url_show_program="$gnome_url_show_program" # Let the user override the test.
16379 else
16380 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
16381 for as_dir in $PATH
16382 do
16383   IFS=$as_save_IFS
16384   test -z "$as_dir" && as_dir=.
16385   for ac_exec_ext in '' $ac_executable_extensions; do
16386   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
16387     ac_cv_prog_gnome_url_show_program="$ac_prog"
16388     $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
16389     break 2
16390   fi
16391 done
16392 done
16393 IFS=$as_save_IFS
16394
16395 fi
16396 fi
16397 gnome_url_show_program=$ac_cv_prog_gnome_url_show_program
16398 if test -n "$gnome_url_show_program"; then
16399   { $as_echo "$as_me:$LINENO: result: $gnome_url_show_program" >&5
16400 $as_echo "$gnome_url_show_program" >&6; }
16401 else
16402   { $as_echo "$as_me:$LINENO: result: no" >&5
16403 $as_echo "no" >&6; }
16404 fi
16405
16406
16407   test -n "$gnome_url_show_program" && break
16408 done
16409
16410 fi
16411
16412
16413 ###############################################################################
16414 #
16415 #       Check for -lXm.
16416 #
16417 ###############################################################################
16418
16419 have_motif=no
16420 with_motif_req=unspecified
16421
16422 # Check whether --with-motif was given.
16423 if test "${with_motif+set}" = set; then
16424   withval=$with_motif; with_motif="$withval"; with_motif_req="$withval"
16425 else
16426   with_motif=no
16427 fi
16428
16429
16430
16431    case "$with_motif" in
16432     yes) ;;
16433     no)  ;;
16434
16435     /*)
16436      { $as_echo "$as_me:$LINENO: checking for Motif headers" >&5
16437 $as_echo_n "checking for Motif headers... " >&6; }
16438      d=$with_motif/include
16439      if test -d $d; then
16440        X_CFLAGS="-I$d $X_CFLAGS"
16441        { $as_echo "$as_me:$LINENO: result: $d" >&5
16442 $as_echo "$d" >&6; }
16443      else
16444        { $as_echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
16445 $as_echo "not found ($d: no such directory)" >&6; }
16446      fi
16447
16448      { $as_echo "$as_me:$LINENO: checking for Motif libs" >&5
16449 $as_echo_n "checking for Motif libs... " >&6; }
16450      d=$with_motif/lib
16451      if test -d $d; then
16452        X_LIBS="-L$d $X_LIBS"
16453        { $as_echo "$as_me:$LINENO: result: $d" >&5
16454 $as_echo "$d" >&6; }
16455      else
16456        { $as_echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
16457 $as_echo "not found ($d: no such directory)" >&6; }
16458      fi
16459
16460      # replace the directory string with "yes".
16461      with_motif_req="yes"
16462      with_motif=$with_motif_req
16463      ;;
16464
16465     *)
16466      echo ""
16467      echo "error: argument to --with-motif must be \"yes\", \"no\", or a directory."
16468      echo "       If it is a directory, then \`DIR/include' will be added to"
16469      echo "       the -I list, and \`DIR/lib' will be added to the -L list."
16470      exit 1
16471      ;;
16472    esac
16473
16474
16475 if test "$with_motif" != yes -a "$with_motif" != no ; then
16476   echo "error: must be yes or no: --with-motif=$with_motif"
16477   exit 1
16478 fi
16479
16480 if test "$with_motif" = yes; then
16481   have_motif=no
16482
16483   ac_save_CPPFLAGS="$CPPFLAGS"
16484   if test \! -z "$includedir" ; then
16485     CPPFLAGS="$CPPFLAGS -I$includedir"
16486   fi
16487   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
16488   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
16489   { $as_echo "$as_me:$LINENO: checking for Xm/Xm.h" >&5
16490 $as_echo_n "checking for Xm/Xm.h... " >&6; }
16491 if test "${ac_cv_header_Xm_Xm_h+set}" = set; then
16492   $as_echo_n "(cached) " >&6
16493 else
16494   cat >conftest.$ac_ext <<_ACEOF
16495 /* confdefs.h.  */
16496 _ACEOF
16497 cat confdefs.h >>conftest.$ac_ext
16498 cat >>conftest.$ac_ext <<_ACEOF
16499 /* end confdefs.h.  */
16500 #include <stdlib.h>
16501                      #include <stdio.h>
16502                      #include <X11/Intrinsic.h>
16503
16504 #include <Xm/Xm.h>
16505 _ACEOF
16506 rm -rf conftest.$ac_objext
16507 if { (ac_try="$ac_compile"
16508 case "(($ac_try" in
16509   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16510   *) ac_try_echo=$ac_try;;
16511 esac
16512 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
16513 $as_echo "$ac_try_echo") >&5
16514   (eval "$ac_compile") 2>conftest.er1
16515   ac_status=$?
16516   grep -v '^ *+' conftest.er1 >conftest.err
16517   rm -rf conftest.er1
16518   cat conftest.err >&5
16519   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
16520   (exit $ac_status); } && {
16521          test -z "$ac_c_werror_flag" ||
16522          test ! -s conftest.err
16523        } && test -s conftest.$ac_objext; then
16524   ac_cv_header_Xm_Xm_h=yes
16525 else
16526   $as_echo "$as_me: failed program was:" >&5
16527 sed 's/^/| /' conftest.$ac_ext >&5
16528
16529         ac_cv_header_Xm_Xm_h=no
16530 fi
16531
16532 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16533 fi
16534 { $as_echo "$as_me:$LINENO: result: $ac_cv_header_Xm_Xm_h" >&5
16535 $as_echo "$ac_cv_header_Xm_Xm_h" >&6; }
16536 if test "x$ac_cv_header_Xm_Xm_h" = x""yes; then
16537   have_motif=yes
16538                      cat >>confdefs.h <<\_ACEOF
16539 #define HAVE_MOTIF 1
16540 _ACEOF
16541
16542                      MOTIF_LIBS="$MOTIF_LIBS -lXm"
16543 fi
16544
16545
16546   CPPFLAGS="$ac_save_CPPFLAGS"
16547 fi
16548
16549
16550 if test "$have_motif" = yes; then
16551
16552   ac_save_CPPFLAGS="$CPPFLAGS"
16553   if test \! -z "$includedir" ; then
16554     CPPFLAGS="$CPPFLAGS -I$includedir"
16555   fi
16556   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
16557   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
16558   { $as_echo "$as_me:$LINENO: checking for Xm/ComboBox.h" >&5
16559 $as_echo_n "checking for Xm/ComboBox.h... " >&6; }
16560 if test "${ac_cv_header_Xm_ComboBox_h+set}" = set; then
16561   $as_echo_n "(cached) " >&6
16562 else
16563   cat >conftest.$ac_ext <<_ACEOF
16564 /* confdefs.h.  */
16565 _ACEOF
16566 cat confdefs.h >>conftest.$ac_ext
16567 cat >>conftest.$ac_ext <<_ACEOF
16568 /* end confdefs.h.  */
16569 #include <stdlib.h>
16570                      #include <stdio.h>
16571                      #include <X11/Intrinsic.h>
16572
16573 #include <Xm/ComboBox.h>
16574 _ACEOF
16575 rm -rf conftest.$ac_objext
16576 if { (ac_try="$ac_compile"
16577 case "(($ac_try" in
16578   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16579   *) ac_try_echo=$ac_try;;
16580 esac
16581 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
16582 $as_echo "$ac_try_echo") >&5
16583   (eval "$ac_compile") 2>conftest.er1
16584   ac_status=$?
16585   grep -v '^ *+' conftest.er1 >conftest.err
16586   rm -rf conftest.er1
16587   cat conftest.err >&5
16588   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
16589   (exit $ac_status); } && {
16590          test -z "$ac_c_werror_flag" ||
16591          test ! -s conftest.err
16592        } && test -s conftest.$ac_objext; then
16593   ac_cv_header_Xm_ComboBox_h=yes
16594 else
16595   $as_echo "$as_me: failed program was:" >&5
16596 sed 's/^/| /' conftest.$ac_ext >&5
16597
16598         ac_cv_header_Xm_ComboBox_h=no
16599 fi
16600
16601 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16602 fi
16603 { $as_echo "$as_me:$LINENO: result: $ac_cv_header_Xm_ComboBox_h" >&5
16604 $as_echo "$ac_cv_header_Xm_ComboBox_h" >&6; }
16605 if test "x$ac_cv_header_Xm_ComboBox_h" = x""yes; then
16606   cat >>confdefs.h <<\_ACEOF
16607 #define HAVE_XMCOMBOBOX 1
16608 _ACEOF
16609
16610 fi
16611
16612
16613   CPPFLAGS="$ac_save_CPPFLAGS"
16614 fi
16615
16616
16617 ###############################################################################
16618 #
16619 #       Checking whether Motif is really Lesstif.
16620 #
16621 ###############################################################################
16622
16623 have_lesstif=no
16624 if test "$have_motif" = yes ; then
16625   { $as_echo "$as_me:$LINENO: checking whether Motif is really LessTif" >&5
16626 $as_echo_n "checking whether Motif is really LessTif... " >&6; }
16627 if test "${ac_cv_have_lesstif+set}" = set; then
16628   $as_echo_n "(cached) " >&6
16629 else
16630
16631   ac_save_CPPFLAGS="$CPPFLAGS"
16632   if test \! -z "$includedir" ; then
16633     CPPFLAGS="$CPPFLAGS -I$includedir"
16634   fi
16635   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
16636   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
16637   cat >conftest.$ac_ext <<_ACEOF
16638 /* confdefs.h.  */
16639 _ACEOF
16640 cat confdefs.h >>conftest.$ac_ext
16641 cat >>conftest.$ac_ext <<_ACEOF
16642 /* end confdefs.h.  */
16643 #include <Xm/Xm.h>
16644 int
16645 main ()
16646 {
16647 long vers = LesstifVersion;
16648   ;
16649   return 0;
16650 }
16651 _ACEOF
16652 rm -rf conftest.$ac_objext
16653 if { (ac_try="$ac_compile"
16654 case "(($ac_try" in
16655   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16656   *) ac_try_echo=$ac_try;;
16657 esac
16658 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
16659 $as_echo "$ac_try_echo") >&5
16660   (eval "$ac_compile") 2>conftest.er1
16661   ac_status=$?
16662   grep -v '^ *+' conftest.er1 >conftest.err
16663   rm -rf conftest.er1
16664   cat conftest.err >&5
16665   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
16666   (exit $ac_status); } && {
16667          test -z "$ac_c_werror_flag" ||
16668          test ! -s conftest.err
16669        } && test -s conftest.$ac_objext; then
16670   ac_cv_have_lesstif=yes
16671 else
16672   $as_echo "$as_me: failed program was:" >&5
16673 sed 's/^/| /' conftest.$ac_ext >&5
16674
16675         ac_cv_have_lesstif=no
16676 fi
16677
16678 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16679   CPPFLAGS="$ac_save_CPPFLAGS"
16680 fi
16681 { $as_echo "$as_me:$LINENO: result: $ac_cv_have_lesstif" >&5
16682 $as_echo "$ac_cv_have_lesstif" >&6; }
16683   have_lesstif=$ac_cv_have_lesstif
16684 fi
16685
16686
16687 lesstif_version=unknown
16688 lesstif_version_string=unknown
16689
16690 if test "$have_lesstif" = yes ; then
16691   ltv=unknown
16692   echo unknown > conftest-lt
16693   { $as_echo "$as_me:$LINENO: checking LessTif version number" >&5
16694 $as_echo_n "checking LessTif version number... " >&6; }
16695 if test "${ac_cv_lesstif_version_string+set}" = set; then
16696   $as_echo_n "(cached) " >&6
16697 else
16698
16699   ac_save_CPPFLAGS="$CPPFLAGS"
16700   if test \! -z "$includedir" ; then
16701     CPPFLAGS="$CPPFLAGS -I$includedir"
16702   fi
16703   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
16704   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
16705   if test "$cross_compiling" = yes; then
16706   ac_cv_lesstif_version=unknown
16707                      ac_cv_lesstif_version_string=unknown
16708 else
16709   cat >conftest.$ac_ext <<_ACEOF
16710 /* confdefs.h.  */
16711 _ACEOF
16712 cat confdefs.h >>conftest.$ac_ext
16713 cat >>conftest.$ac_ext <<_ACEOF
16714 /* end confdefs.h.  */
16715 #include <stdio.h>
16716                      #include <Xm/Xm.h>
16717                      int main() {
16718                        FILE *f = fopen("conftest-lt", "w");
16719                        if (!f) exit(1);
16720                        fprintf(f, "%d %d.%d\n", LesstifVersion,
16721                           LESSTIF_VERSION, LESSTIF_REVISION);
16722                        fclose(f);
16723                        exit(0);
16724                      }
16725 _ACEOF
16726 rm -rf conftest$ac_exeext
16727 if { (ac_try="$ac_link"
16728 case "(($ac_try" in
16729   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16730   *) ac_try_echo=$ac_try;;
16731 esac
16732 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
16733 $as_echo "$ac_try_echo") >&5
16734   (eval "$ac_link") 2>&5
16735   ac_status=$?
16736   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
16737   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
16738   { (case "(($ac_try" in
16739   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16740   *) ac_try_echo=$ac_try;;
16741 esac
16742 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
16743 $as_echo "$ac_try_echo") >&5
16744   (eval "$ac_try") 2>&5
16745   ac_status=$?
16746   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
16747   (exit $ac_status); }; }; then
16748   ltv=`cat conftest-lt`
16749                      ac_cv_lesstif_version=`echo $ltv | sed 's/ .*//'`
16750                      ac_cv_lesstif_version_string=`echo $ltv | sed 's/.* //'`
16751 else
16752   $as_echo "$as_me: program exited with status $ac_status" >&5
16753 $as_echo "$as_me: failed program was:" >&5
16754 sed 's/^/| /' conftest.$ac_ext >&5
16755
16756 ( exit $ac_status )
16757 ac_cv_lesstif_version=unknown
16758                      ac_cv_lesstif_version_string=unknown
16759 fi
16760 rm -rf conftest.dSYM
16761 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
16762 fi
16763
16764
16765   CPPFLAGS="$ac_save_CPPFLAGS"
16766 fi
16767 { $as_echo "$as_me:$LINENO: result: $ac_cv_lesstif_version_string" >&5
16768 $as_echo "$ac_cv_lesstif_version_string" >&6; }
16769   rm -rf conftest-lt
16770   lesstif_version=$ac_cv_lesstif_version
16771   lesstif_version_string=$ac_cv_lesstif_version_string
16772
16773 fi
16774
16775
16776 if test "$have_motif" = yes ; then
16777   mtv=unknown
16778   echo unknown > conftest-mt
16779   { $as_echo "$as_me:$LINENO: checking Motif version number" >&5
16780 $as_echo_n "checking Motif version number... " >&6; }
16781 if test "${ac_cv_motif_version_string+set}" = set; then
16782   $as_echo_n "(cached) " >&6
16783 else
16784
16785   ac_save_CPPFLAGS="$CPPFLAGS"
16786   if test \! -z "$includedir" ; then
16787     CPPFLAGS="$CPPFLAGS -I$includedir"
16788   fi
16789   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
16790   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
16791   if test "$cross_compiling" = yes; then
16792   ac_cv_motif_version=unknown
16793                      ac_cv_motif_version_string=unknown
16794 else
16795   cat >conftest.$ac_ext <<_ACEOF
16796 /* confdefs.h.  */
16797 _ACEOF
16798 cat confdefs.h >>conftest.$ac_ext
16799 cat >>conftest.$ac_ext <<_ACEOF
16800 /* end confdefs.h.  */
16801 #include <stdio.h>
16802                      #include <Xm/Xm.h>
16803                      int main() {
16804                        FILE *f = fopen("conftest-mt", "w");
16805                        if (!f) exit(1);
16806                        fprintf(f, "%d %d.%d\n", XmVersion,
16807                           XmVERSION, XmREVISION);
16808                        fclose(f);
16809                        exit(0);
16810                      }
16811 _ACEOF
16812 rm -rf conftest$ac_exeext
16813 if { (ac_try="$ac_link"
16814 case "(($ac_try" in
16815   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16816   *) ac_try_echo=$ac_try;;
16817 esac
16818 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
16819 $as_echo "$ac_try_echo") >&5
16820   (eval "$ac_link") 2>&5
16821   ac_status=$?
16822   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
16823   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
16824   { (case "(($ac_try" in
16825   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16826   *) ac_try_echo=$ac_try;;
16827 esac
16828 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
16829 $as_echo "$ac_try_echo") >&5
16830   (eval "$ac_try") 2>&5
16831   ac_status=$?
16832   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
16833   (exit $ac_status); }; }; then
16834   mtv=`cat conftest-mt`
16835                      ac_cv_motif_version=`echo $mtv | sed 's/ .*//'`
16836                      ac_cv_motif_version_string=`echo $mtv | sed 's/.* //'`
16837 else
16838   $as_echo "$as_me: program exited with status $ac_status" >&5
16839 $as_echo "$as_me: failed program was:" >&5
16840 sed 's/^/| /' conftest.$ac_ext >&5
16841
16842 ( exit $ac_status )
16843 ac_cv_motif_version=unknown
16844                      ac_cv_motif_version_string=unknown
16845 fi
16846 rm -rf conftest.dSYM
16847 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
16848 fi
16849
16850
16851   CPPFLAGS="$ac_save_CPPFLAGS"
16852 fi
16853 { $as_echo "$as_me:$LINENO: result: $ac_cv_motif_version_string" >&5
16854 $as_echo "$ac_cv_motif_version_string" >&6; }
16855   rm -rf conftest-mt
16856   motif_version=$ac_cv_motif_version
16857   motif_version_string=$ac_cv_motif_version_string
16858
16859 fi
16860
16861
16862 ###############################################################################
16863 #
16864 #       Checking whether Motif requires -lXpm.
16865 #
16866 #       If this is Motif 2.x, and we have XPM, then link against XPM as well.
16867 #       The deal is, Motif 2.x requires XPM -- but it's a compilation option
16868 #       of the library whether to build the XPM code into libXm, or whether
16869 #       to rely on an external libXm.  So the only way to tell whether XPM is
16870 #       a link-time requirement is to examine libXm.a, which is very
16871 #       difficult to do in an autoconf script.  So... if it's Motif 2.x, we
16872 #       always link against XPM if the XPM lib exists (and this will be a
16873 #       no-op if libXm happens to already have the XPM code in it.)
16874 #
16875 ###############################################################################
16876
16877 motif_requires_xpm=no
16878 if test "$have_motif" = yes ; then
16879    { $as_echo "$as_me:$LINENO: checking whether Motif requires XPM" >&5
16880 $as_echo_n "checking whether Motif requires XPM... " >&6; }
16881    if test "$motif_version" = "unknown" || test "$motif_version" -ge 2000
16882    then
16883      motif_requires_xpm=yes
16884      { $as_echo "$as_me:$LINENO: result: maybe" >&5
16885 $as_echo "maybe" >&6; }
16886    else
16887      { $as_echo "$as_me:$LINENO: result: no" >&5
16888 $as_echo "no" >&6; }
16889    fi
16890 fi
16891
16892
16893 ###############################################################################
16894 #
16895 #       Checking whether Motif requires -lXp.
16896 #
16897 #       Some versions of Motif (2.1.0, at least) require -lXp, the "X Printing
16898 #       Extension".   Why this extension isn't in -lXext with all the others,
16899 #       I have no idea.
16900 #
16901 ###############################################################################
16902
16903 have_xp_ext=no
16904 if test "$have_motif" = yes ; then
16905    have_xp_ext=no
16906
16907   ac_save_CPPFLAGS="$CPPFLAGS"
16908   ac_save_LDFLAGS="$LDFLAGS"
16909 #  ac_save_LIBS="$LIBS"
16910
16911   if test \! -z "$includedir" ; then
16912     CPPFLAGS="$CPPFLAGS -I$includedir"
16913   fi
16914   # note: $X_CFLAGS includes $x_includes
16915   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
16916
16917   if test \! -z "$libdir" ; then
16918     LDFLAGS="$LDFLAGS -L$libdir"
16919   fi
16920   # note: $X_LIBS includes $x_libraries
16921   LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
16922
16923   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
16924   LDFLAGS=`eval eval eval eval eval eval eval eval eval echo $LDFLAGS`
16925   { $as_echo "$as_me:$LINENO: checking for XpQueryExtension in -lXp" >&5
16926 $as_echo_n "checking for XpQueryExtension in -lXp... " >&6; }
16927 if test "${ac_cv_lib_Xp_XpQueryExtension+set}" = set; then
16928   $as_echo_n "(cached) " >&6
16929 else
16930   ac_check_lib_save_LIBS=$LIBS
16931 LIBS="-lXp -lX11 -lXext -lm $LIBS"
16932 cat >conftest.$ac_ext <<_ACEOF
16933 /* confdefs.h.  */
16934 _ACEOF
16935 cat confdefs.h >>conftest.$ac_ext
16936 cat >>conftest.$ac_ext <<_ACEOF
16937 /* end confdefs.h.  */
16938
16939 /* Override any GCC internal prototype to avoid an error.
16940    Use char because int might match the return type of a GCC
16941    builtin and then its argument prototype would still apply.  */
16942 #ifdef __cplusplus
16943 extern "C"
16944 #endif
16945 char XpQueryExtension ();
16946 int
16947 main ()
16948 {
16949 return XpQueryExtension ();
16950   ;
16951   return 0;
16952 }
16953 _ACEOF
16954 rm -rf conftest.$ac_objext conftest$ac_exeext
16955 if { (ac_try="$ac_link"
16956 case "(($ac_try" in
16957   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16958   *) ac_try_echo=$ac_try;;
16959 esac
16960 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
16961 $as_echo "$ac_try_echo") >&5
16962   (eval "$ac_link") 2>conftest.er1
16963   ac_status=$?
16964   grep -v '^ *+' conftest.er1 >conftest.err
16965   rm -rf conftest.er1
16966   cat conftest.err >&5
16967   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
16968   (exit $ac_status); } && {
16969          test -z "$ac_c_werror_flag" ||
16970          test ! -s conftest.err
16971        } && test -s conftest$ac_exeext && {
16972          test "$cross_compiling" = yes ||
16973          $as_test_x conftest$ac_exeext
16974        }; then
16975   ac_cv_lib_Xp_XpQueryExtension=yes
16976 else
16977   $as_echo "$as_me: failed program was:" >&5
16978 sed 's/^/| /' conftest.$ac_ext >&5
16979
16980         ac_cv_lib_Xp_XpQueryExtension=no
16981 fi
16982
16983 rm -rf conftest.dSYM
16984 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
16985       conftest$ac_exeext conftest.$ac_ext
16986 LIBS=$ac_check_lib_save_LIBS
16987 fi
16988 { $as_echo "$as_me:$LINENO: result: $ac_cv_lib_Xp_XpQueryExtension" >&5
16989 $as_echo "$ac_cv_lib_Xp_XpQueryExtension" >&6; }
16990 if test "x$ac_cv_lib_Xp_XpQueryExtension" = x""yes; then
16991   have_xp_ext=yes; MOTIF_LIBS="$MOTIF_LIBS -lXp"
16992 else
16993   true
16994 fi
16995
16996   CPPFLAGS="$ac_save_CPPFLAGS"
16997   LDFLAGS="$ac_save_LDFLAGS"
16998 #  LIBS="$ac_save_LIBS"
16999
17000 fi
17001
17002
17003 ###############################################################################
17004 #
17005 #       Checking whether Motif requires -lXintl (for _Xsetlocale.)
17006 #
17007 ###############################################################################
17008
17009 have_xintl=no
17010 if test "$have_motif" = yes ; then
17011
17012   ac_save_CPPFLAGS="$CPPFLAGS"
17013   ac_save_LDFLAGS="$LDFLAGS"
17014 #  ac_save_LIBS="$LIBS"
17015
17016   if test \! -z "$includedir" ; then
17017     CPPFLAGS="$CPPFLAGS -I$includedir"
17018   fi
17019   # note: $X_CFLAGS includes $x_includes
17020   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
17021
17022   if test \! -z "$libdir" ; then
17023     LDFLAGS="$LDFLAGS -L$libdir"
17024   fi
17025   # note: $X_LIBS includes $x_libraries
17026   LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
17027
17028   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
17029   LDFLAGS=`eval eval eval eval eval eval eval eval eval echo $LDFLAGS`
17030   { $as_echo "$as_me:$LINENO: checking for _Xsetlocale in -lXintl" >&5
17031 $as_echo_n "checking for _Xsetlocale in -lXintl... " >&6; }
17032 if test "${ac_cv_lib_Xintl__Xsetlocale+set}" = set; then
17033   $as_echo_n "(cached) " >&6
17034 else
17035   ac_check_lib_save_LIBS=$LIBS
17036 LIBS="-lXintl -lX11 -lXext -lm $LIBS"
17037 cat >conftest.$ac_ext <<_ACEOF
17038 /* confdefs.h.  */
17039 _ACEOF
17040 cat confdefs.h >>conftest.$ac_ext
17041 cat >>conftest.$ac_ext <<_ACEOF
17042 /* end confdefs.h.  */
17043
17044 /* Override any GCC internal prototype to avoid an error.
17045    Use char because int might match the return type of a GCC
17046    builtin and then its argument prototype would still apply.  */
17047 #ifdef __cplusplus
17048 extern "C"
17049 #endif
17050 char _Xsetlocale ();
17051 int
17052 main ()
17053 {
17054 return _Xsetlocale ();
17055   ;
17056   return 0;
17057 }
17058 _ACEOF
17059 rm -rf conftest.$ac_objext conftest$ac_exeext
17060 if { (ac_try="$ac_link"
17061 case "(($ac_try" in
17062   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17063   *) ac_try_echo=$ac_try;;
17064 esac
17065 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
17066 $as_echo "$ac_try_echo") >&5
17067   (eval "$ac_link") 2>conftest.er1
17068   ac_status=$?
17069   grep -v '^ *+' conftest.er1 >conftest.err
17070   rm -rf conftest.er1
17071   cat conftest.err >&5
17072   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
17073   (exit $ac_status); } && {
17074          test -z "$ac_c_werror_flag" ||
17075          test ! -s conftest.err
17076        } && test -s conftest$ac_exeext && {
17077          test "$cross_compiling" = yes ||
17078          $as_test_x conftest$ac_exeext
17079        }; then
17080   ac_cv_lib_Xintl__Xsetlocale=yes
17081 else
17082   $as_echo "$as_me: failed program was:" >&5
17083 sed 's/^/| /' conftest.$ac_ext >&5
17084
17085         ac_cv_lib_Xintl__Xsetlocale=no
17086 fi
17087
17088 rm -rf conftest.dSYM
17089 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
17090       conftest$ac_exeext conftest.$ac_ext
17091 LIBS=$ac_check_lib_save_LIBS
17092 fi
17093 { $as_echo "$as_me:$LINENO: result: $ac_cv_lib_Xintl__Xsetlocale" >&5
17094 $as_echo "$ac_cv_lib_Xintl__Xsetlocale" >&6; }
17095 if test "x$ac_cv_lib_Xintl__Xsetlocale" = x""yes; then
17096   have_xintl=yes
17097 else
17098   have_xintl=no
17099 fi
17100
17101   CPPFLAGS="$ac_save_CPPFLAGS"
17102   LDFLAGS="$ac_save_LDFLAGS"
17103 #  LIBS="$ac_save_LIBS"
17104
17105   if test "$have_xintl" = yes; then
17106     MOTIF_LIBS="$MOTIF_LIBS -lXintl"
17107   fi
17108 fi
17109
17110
17111 ###############################################################################
17112 #
17113 #       Check for -lGL or -lMesaGL.
17114 #
17115 ###############################################################################
17116
17117 have_gl=no
17118 ac_have_mesa_gl=no
17119 with_gl_req=unspecified
17120 gl_halfassed=no
17121
17122 # Check whether --with-gl was given.
17123 if test "${with_gl+set}" = set; then
17124   withval=$with_gl; with_gl="$withval"; with_gl_req="$withval"
17125 else
17126   with_gl=yes
17127 fi
17128
17129
17130
17131    case "$with_gl" in
17132     yes) ;;
17133     no)  ;;
17134
17135     /*)
17136      { $as_echo "$as_me:$LINENO: checking for GL headers" >&5
17137 $as_echo_n "checking for GL headers... " >&6; }
17138      d=$with_gl/include
17139      if test -d $d; then
17140        X_CFLAGS="-I$d $X_CFLAGS"
17141        { $as_echo "$as_me:$LINENO: result: $d" >&5
17142 $as_echo "$d" >&6; }
17143      else
17144        { $as_echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
17145 $as_echo "not found ($d: no such directory)" >&6; }
17146      fi
17147
17148      { $as_echo "$as_me:$LINENO: checking for GL libs" >&5
17149 $as_echo_n "checking for GL libs... " >&6; }
17150      d=$with_gl/lib
17151      if test -d $d; then
17152        X_LIBS="-L$d $X_LIBS"
17153        { $as_echo "$as_me:$LINENO: result: $d" >&5
17154 $as_echo "$d" >&6; }
17155      else
17156        { $as_echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
17157 $as_echo "not found ($d: no such directory)" >&6; }
17158      fi
17159
17160      # replace the directory string with "yes".
17161      with_gl_req="yes"
17162      with_gl=$with_gl_req
17163      ;;
17164
17165     *)
17166      echo ""
17167      echo "error: argument to --with-gl must be \"yes\", \"no\", or a directory."
17168      echo "       If it is a directory, then \`DIR/include' will be added to"
17169      echo "       the -I list, and \`DIR/lib' will be added to the -L list."
17170      exit 1
17171      ;;
17172    esac
17173
17174
17175 ac_mesagl_version=unknown
17176 ac_mesagl_version_string=unknown
17177
17178 if test "$with_gl" = yes; then
17179
17180   ac_save_CPPFLAGS="$CPPFLAGS"
17181   if test \! -z "$includedir" ; then
17182     CPPFLAGS="$CPPFLAGS -I$includedir"
17183   fi
17184   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
17185   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
17186   if test "${ac_cv_header_GL_gl_h+set}" = set; then
17187   { $as_echo "$as_me:$LINENO: checking for GL/gl.h" >&5
17188 $as_echo_n "checking for GL/gl.h... " >&6; }
17189 if test "${ac_cv_header_GL_gl_h+set}" = set; then
17190   $as_echo_n "(cached) " >&6
17191 fi
17192 { $as_echo "$as_me:$LINENO: result: $ac_cv_header_GL_gl_h" >&5
17193 $as_echo "$ac_cv_header_GL_gl_h" >&6; }
17194 else
17195   # Is the header compilable?
17196 { $as_echo "$as_me:$LINENO: checking GL/gl.h usability" >&5
17197 $as_echo_n "checking GL/gl.h usability... " >&6; }
17198 cat >conftest.$ac_ext <<_ACEOF
17199 /* confdefs.h.  */
17200 _ACEOF
17201 cat confdefs.h >>conftest.$ac_ext
17202 cat >>conftest.$ac_ext <<_ACEOF
17203 /* end confdefs.h.  */
17204 $ac_includes_default
17205 #include <GL/gl.h>
17206 _ACEOF
17207 rm -rf conftest.$ac_objext
17208 if { (ac_try="$ac_compile"
17209 case "(($ac_try" in
17210   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17211   *) ac_try_echo=$ac_try;;
17212 esac
17213 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
17214 $as_echo "$ac_try_echo") >&5
17215   (eval "$ac_compile") 2>conftest.er1
17216   ac_status=$?
17217   grep -v '^ *+' conftest.er1 >conftest.err
17218   rm -rf conftest.er1
17219   cat conftest.err >&5
17220   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
17221   (exit $ac_status); } && {
17222          test -z "$ac_c_werror_flag" ||
17223          test ! -s conftest.err
17224        } && test -s conftest.$ac_objext; then
17225   ac_header_compiler=yes
17226 else
17227   $as_echo "$as_me: failed program was:" >&5
17228 sed 's/^/| /' conftest.$ac_ext >&5
17229
17230         ac_header_compiler=no
17231 fi
17232
17233 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
17234 { $as_echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
17235 $as_echo "$ac_header_compiler" >&6; }
17236
17237 # Is the header present?
17238 { $as_echo "$as_me:$LINENO: checking GL/gl.h presence" >&5
17239 $as_echo_n "checking GL/gl.h presence... " >&6; }
17240 cat >conftest.$ac_ext <<_ACEOF
17241 /* confdefs.h.  */
17242 _ACEOF
17243 cat confdefs.h >>conftest.$ac_ext
17244 cat >>conftest.$ac_ext <<_ACEOF
17245 /* end confdefs.h.  */
17246 #include <GL/gl.h>
17247 _ACEOF
17248 if { (ac_try="$ac_cpp conftest.$ac_ext"
17249 case "(($ac_try" in
17250   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17251   *) ac_try_echo=$ac_try;;
17252 esac
17253 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
17254 $as_echo "$ac_try_echo") >&5
17255   (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
17256   ac_status=$?
17257   grep -v '^ *+' conftest.er1 >conftest.err
17258   rm -rf conftest.er1
17259   cat conftest.err >&5
17260   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
17261   (exit $ac_status); } >/dev/null && {
17262          test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
17263          test ! -s conftest.err
17264        }; then
17265   ac_header_preproc=yes
17266 else
17267   $as_echo "$as_me: failed program was:" >&5
17268 sed 's/^/| /' conftest.$ac_ext >&5
17269
17270   ac_header_preproc=no
17271 fi
17272
17273 rm -rf conftest.err conftest.$ac_ext
17274 { $as_echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
17275 $as_echo "$ac_header_preproc" >&6; }
17276
17277 # So?  What about this header?
17278 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
17279   yes:no: )
17280     { $as_echo "$as_me:$LINENO: WARNING: GL/gl.h: accepted by the compiler, rejected by the preprocessor!" >&5
17281 $as_echo "$as_me: WARNING: GL/gl.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
17282     { $as_echo "$as_me:$LINENO: WARNING: GL/gl.h: proceeding with the compiler's result" >&5
17283 $as_echo "$as_me: WARNING: GL/gl.h: proceeding with the compiler's result" >&2;}
17284     ac_header_preproc=yes
17285     ;;
17286   no:yes:* )
17287     { $as_echo "$as_me:$LINENO: WARNING: GL/gl.h: present but cannot be compiled" >&5
17288 $as_echo "$as_me: WARNING: GL/gl.h: present but cannot be compiled" >&2;}
17289     { $as_echo "$as_me:$LINENO: WARNING: GL/gl.h:     check for missing prerequisite headers?" >&5
17290 $as_echo "$as_me: WARNING: GL/gl.h:     check for missing prerequisite headers?" >&2;}
17291     { $as_echo "$as_me:$LINENO: WARNING: GL/gl.h: see the Autoconf documentation" >&5
17292 $as_echo "$as_me: WARNING: GL/gl.h: see the Autoconf documentation" >&2;}
17293     { $as_echo "$as_me:$LINENO: WARNING: GL/gl.h:     section \"Present But Cannot Be Compiled\"" >&5
17294 $as_echo "$as_me: WARNING: GL/gl.h:     section \"Present But Cannot Be Compiled\"" >&2;}
17295     { $as_echo "$as_me:$LINENO: WARNING: GL/gl.h: proceeding with the preprocessor's result" >&5
17296 $as_echo "$as_me: WARNING: GL/gl.h: proceeding with the preprocessor's result" >&2;}
17297     { $as_echo "$as_me:$LINENO: WARNING: GL/gl.h: in the future, the compiler will take precedence" >&5
17298 $as_echo "$as_me: WARNING: GL/gl.h: in the future, the compiler will take precedence" >&2;}
17299
17300     ;;
17301 esac
17302 { $as_echo "$as_me:$LINENO: checking for GL/gl.h" >&5
17303 $as_echo_n "checking for GL/gl.h... " >&6; }
17304 if test "${ac_cv_header_GL_gl_h+set}" = set; then
17305   $as_echo_n "(cached) " >&6
17306 else
17307   ac_cv_header_GL_gl_h=$ac_header_preproc
17308 fi
17309 { $as_echo "$as_me:$LINENO: result: $ac_cv_header_GL_gl_h" >&5
17310 $as_echo "$ac_cv_header_GL_gl_h" >&6; }
17311
17312 fi
17313 if test "x$ac_cv_header_GL_gl_h" = x""yes; then
17314   have_gl=yes
17315 else
17316   have_gl=no
17317 fi
17318
17319
17320   CPPFLAGS="$ac_save_CPPFLAGS"
17321   if test "$have_gl" = yes ; then
17322
17323   ac_save_CPPFLAGS="$CPPFLAGS"
17324   if test \! -z "$includedir" ; then
17325     CPPFLAGS="$CPPFLAGS -I$includedir"
17326   fi
17327   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
17328   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
17329   { $as_echo "$as_me:$LINENO: checking for GL/glx.h" >&5
17330 $as_echo_n "checking for GL/glx.h... " >&6; }
17331 if test "${ac_cv_header_GL_glx_h+set}" = set; then
17332   $as_echo_n "(cached) " >&6
17333 else
17334   cat >conftest.$ac_ext <<_ACEOF
17335 /* confdefs.h.  */
17336 _ACEOF
17337 cat confdefs.h >>conftest.$ac_ext
17338 cat >>conftest.$ac_ext <<_ACEOF
17339 /* end confdefs.h.  */
17340 #include <GL/gl.h>
17341
17342 #include <GL/glx.h>
17343 _ACEOF
17344 rm -rf conftest.$ac_objext
17345 if { (ac_try="$ac_compile"
17346 case "(($ac_try" in
17347   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17348   *) ac_try_echo=$ac_try;;
17349 esac
17350 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
17351 $as_echo "$ac_try_echo") >&5
17352   (eval "$ac_compile") 2>conftest.er1
17353   ac_status=$?
17354   grep -v '^ *+' conftest.er1 >conftest.err
17355   rm -rf conftest.er1
17356   cat conftest.err >&5
17357   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
17358   (exit $ac_status); } && {
17359          test -z "$ac_c_werror_flag" ||
17360          test ! -s conftest.err
17361        } && test -s conftest.$ac_objext; then
17362   ac_cv_header_GL_glx_h=yes
17363 else
17364   $as_echo "$as_me: failed program was:" >&5
17365 sed 's/^/| /' conftest.$ac_ext >&5
17366
17367         ac_cv_header_GL_glx_h=no
17368 fi
17369
17370 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
17371 fi
17372 { $as_echo "$as_me:$LINENO: result: $ac_cv_header_GL_glx_h" >&5
17373 $as_echo "$ac_cv_header_GL_glx_h" >&6; }
17374 if test "x$ac_cv_header_GL_glx_h" = x""yes; then
17375   have_gl=yes
17376 else
17377   have_gl=no
17378 fi
17379
17380
17381   CPPFLAGS="$ac_save_CPPFLAGS"
17382   fi
17383
17384   # If we have the headers, try and figure out which vendor it's from.
17385   #
17386   if test "$have_gl" = yes ; then
17387
17388     # We need to know whether it's MesaGL so that we know which libraries
17389     # to link against.
17390     #
17391     { $as_echo "$as_me:$LINENO: checking whether GL is really MesaGL" >&5
17392 $as_echo_n "checking whether GL is really MesaGL... " >&6; }
17393 if test "${ac_cv_have_mesa_gl+set}" = set; then
17394   $as_echo_n "(cached) " >&6
17395 else
17396   ac_cv_have_mesa_gl=no
17397        if test "$ac_macosx" = no; then
17398          # WTF! MacOS 10.5.0 ships the Mesa GL headers!
17399          # It's not really Mesa, is it?
17400
17401   ac_save_CPPFLAGS="$CPPFLAGS"
17402   if test \! -z "$includedir" ; then
17403     CPPFLAGS="$CPPFLAGS -I$includedir"
17404   fi
17405   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
17406   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
17407   cat >conftest.$ac_ext <<_ACEOF
17408 /* confdefs.h.  */
17409 _ACEOF
17410 cat confdefs.h >>conftest.$ac_ext
17411 cat >>conftest.$ac_ext <<_ACEOF
17412 /* end confdefs.h.  */
17413 #include <GL/glx.h>
17414
17415 _ACEOF
17416 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
17417   $EGREP "Mesa|MESA" >/dev/null 2>&1; then
17418   ac_cv_have_mesa_gl=yes
17419 fi
17420 rm -rf conftest*
17421
17422   CPPFLAGS="$ac_save_CPPFLAGS"
17423        fi
17424 fi
17425 { $as_echo "$as_me:$LINENO: result: $ac_cv_have_mesa_gl" >&5
17426 $as_echo "$ac_cv_have_mesa_gl" >&6; }
17427     ac_have_mesa_gl=$ac_cv_have_mesa_gl
17428
17429     gl_lib_1=""
17430     GL_LIBS=""
17431
17432     if test "$ac_macosx" = yes; then
17433
17434       # Without these, every link against libGL gets a bunch of useless
17435       # warnings.
17436       #
17437       osx_crud="-bind_at_load -multiply_defined suppress"
17438       { $as_echo "$as_me:$LINENO: result: adding \"$osx_crud\" to GL_LIBS" >&5
17439 $as_echo "adding \"$osx_crud\" to GL_LIBS" >&6; }
17440       GL_LIBS="$GL_LIBS $osx_crud"
17441       unset osx_crud
17442
17443       # New lossage in 10.5.0: without this, we get:
17444       #   ld: cycle in dylib re-exports with /usr/X11/lib/libGL.dylib
17445       #
17446       osx_crud="/System/Library/Frameworks/OpenGL.framework/Versions/A/Libraries/libGL.dylib"
17447       osx_crud="-Wl,-dylib_file,${osx_crud}:${osx_crud}"
17448
17449       { $as_echo "$as_me:$LINENO: result: adding \"$osx_crud\" to GL_LIBS" >&5
17450 $as_echo "adding \"$osx_crud\" to GL_LIBS" >&6; }
17451       GL_LIBS="$GL_LIBS $osx_crud"
17452       unset osx_crud
17453     fi
17454
17455
17456     # Some versions of MesaGL are compiled to require -lpthread.
17457     # So if the Mesa headers exist, and -lpthread exists, then always
17458     # link -lpthread after the Mesa libs (be they named -lGL or -lMesaGL.)
17459     #
17460     if test "$ac_have_mesa_gl" = yes; then
17461       { $as_echo "$as_me:$LINENO: checking for pthread_create in -lpthread" >&5
17462 $as_echo_n "checking for pthread_create in -lpthread... " >&6; }
17463 if test "${ac_cv_lib_pthread_pthread_create+set}" = set; then
17464   $as_echo_n "(cached) " >&6
17465 else
17466   ac_check_lib_save_LIBS=$LIBS
17467 LIBS="-lpthread  $LIBS"
17468 cat >conftest.$ac_ext <<_ACEOF
17469 /* confdefs.h.  */
17470 _ACEOF
17471 cat confdefs.h >>conftest.$ac_ext
17472 cat >>conftest.$ac_ext <<_ACEOF
17473 /* end confdefs.h.  */
17474
17475 /* Override any GCC internal prototype to avoid an error.
17476    Use char because int might match the return type of a GCC
17477    builtin and then its argument prototype would still apply.  */
17478 #ifdef __cplusplus
17479 extern "C"
17480 #endif
17481 char pthread_create ();
17482 int
17483 main ()
17484 {
17485 return pthread_create ();
17486   ;
17487   return 0;
17488 }
17489 _ACEOF
17490 rm -rf conftest.$ac_objext conftest$ac_exeext
17491 if { (ac_try="$ac_link"
17492 case "(($ac_try" in
17493   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17494   *) ac_try_echo=$ac_try;;
17495 esac
17496 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
17497 $as_echo "$ac_try_echo") >&5
17498   (eval "$ac_link") 2>conftest.er1
17499   ac_status=$?
17500   grep -v '^ *+' conftest.er1 >conftest.err
17501   rm -rf conftest.er1
17502   cat conftest.err >&5
17503   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
17504   (exit $ac_status); } && {
17505          test -z "$ac_c_werror_flag" ||
17506          test ! -s conftest.err
17507        } && test -s conftest$ac_exeext && {
17508          test "$cross_compiling" = yes ||
17509          $as_test_x conftest$ac_exeext
17510        }; then
17511   ac_cv_lib_pthread_pthread_create=yes
17512 else
17513   $as_echo "$as_me: failed program was:" >&5
17514 sed 's/^/| /' conftest.$ac_ext >&5
17515
17516         ac_cv_lib_pthread_pthread_create=no
17517 fi
17518
17519 rm -rf conftest.dSYM
17520 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
17521       conftest$ac_exeext conftest.$ac_ext
17522 LIBS=$ac_check_lib_save_LIBS
17523 fi
17524 { $as_echo "$as_me:$LINENO: result: $ac_cv_lib_pthread_pthread_create" >&5
17525 $as_echo "$ac_cv_lib_pthread_pthread_create" >&6; }
17526 if test "x$ac_cv_lib_pthread_pthread_create" = x""yes; then
17527   GL_LIBS="-lpthread"
17528 fi
17529
17530     fi
17531
17532
17533     # If we have Mesa headers, check to see if we can link against -lMesaGL.
17534     # If we don't have Mesa headers, or we don't have -lMesaGL, try -lGL.
17535     # Else, warn that GL is busted.  (We have the headers, but no libs.)
17536     #
17537
17538     if test "$ac_have_mesa_gl" = yes ; then
17539
17540   ac_save_CPPFLAGS="$CPPFLAGS"
17541   ac_save_LDFLAGS="$LDFLAGS"
17542 #  ac_save_LIBS="$LIBS"
17543
17544   if test \! -z "$includedir" ; then
17545     CPPFLAGS="$CPPFLAGS -I$includedir"
17546   fi
17547   # note: $X_CFLAGS includes $x_includes
17548   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
17549
17550   if test \! -z "$libdir" ; then
17551     LDFLAGS="$LDFLAGS -L$libdir"
17552   fi
17553   # note: $X_LIBS includes $x_libraries
17554   LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
17555
17556   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
17557   LDFLAGS=`eval eval eval eval eval eval eval eval eval echo $LDFLAGS`
17558   { $as_echo "$as_me:$LINENO: checking for glXCreateContext in -lMesaGL" >&5
17559 $as_echo_n "checking for glXCreateContext in -lMesaGL... " >&6; }
17560 if test "${ac_cv_lib_MesaGL_glXCreateContext+set}" = set; then
17561   $as_echo_n "(cached) " >&6
17562 else
17563   ac_check_lib_save_LIBS=$LIBS
17564 LIBS="-lMesaGL -lMesaGLU $GL_LIBS -lX11 -lXext $VIDMODE_LIBS -lm $LIBS"
17565 cat >conftest.$ac_ext <<_ACEOF
17566 /* confdefs.h.  */
17567 _ACEOF
17568 cat confdefs.h >>conftest.$ac_ext
17569 cat >>conftest.$ac_ext <<_ACEOF
17570 /* end confdefs.h.  */
17571
17572 /* Override any GCC internal prototype to avoid an error.
17573    Use char because int might match the return type of a GCC
17574    builtin and then its argument prototype would still apply.  */
17575 #ifdef __cplusplus
17576 extern "C"
17577 #endif
17578 char glXCreateContext ();
17579 int
17580 main ()
17581 {
17582 return glXCreateContext ();
17583   ;
17584   return 0;
17585 }
17586 _ACEOF
17587 rm -rf conftest.$ac_objext conftest$ac_exeext
17588 if { (ac_try="$ac_link"
17589 case "(($ac_try" in
17590   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17591   *) ac_try_echo=$ac_try;;
17592 esac
17593 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
17594 $as_echo "$ac_try_echo") >&5
17595   (eval "$ac_link") 2>conftest.er1
17596   ac_status=$?
17597   grep -v '^ *+' conftest.er1 >conftest.err
17598   rm -rf conftest.er1
17599   cat conftest.err >&5
17600   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
17601   (exit $ac_status); } && {
17602          test -z "$ac_c_werror_flag" ||
17603          test ! -s conftest.err
17604        } && test -s conftest$ac_exeext && {
17605          test "$cross_compiling" = yes ||
17606          $as_test_x conftest$ac_exeext
17607        }; then
17608   ac_cv_lib_MesaGL_glXCreateContext=yes
17609 else
17610   $as_echo "$as_me: failed program was:" >&5
17611 sed 's/^/| /' conftest.$ac_ext >&5
17612
17613         ac_cv_lib_MesaGL_glXCreateContext=no
17614 fi
17615
17616 rm -rf conftest.dSYM
17617 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
17618       conftest$ac_exeext conftest.$ac_ext
17619 LIBS=$ac_check_lib_save_LIBS
17620 fi
17621 { $as_echo "$as_me:$LINENO: result: $ac_cv_lib_MesaGL_glXCreateContext" >&5
17622 $as_echo "$ac_cv_lib_MesaGL_glXCreateContext" >&6; }
17623 if test "x$ac_cv_lib_MesaGL_glXCreateContext" = x""yes; then
17624   gl_lib_1="MesaGL"
17625                       GL_LIBS="-lMesaGL -lMesaGLU $VIDMODE_LIBS $GL_LIBS"
17626 fi
17627
17628   CPPFLAGS="$ac_save_CPPFLAGS"
17629   LDFLAGS="$ac_save_LDFLAGS"
17630 #  LIBS="$ac_save_LIBS"
17631
17632     fi
17633
17634     if test "$gl_lib_1" = "" ; then
17635
17636   ac_save_CPPFLAGS="$CPPFLAGS"
17637   ac_save_LDFLAGS="$LDFLAGS"
17638 #  ac_save_LIBS="$LIBS"
17639
17640   if test \! -z "$includedir" ; then
17641     CPPFLAGS="$CPPFLAGS -I$includedir"
17642   fi
17643   # note: $X_CFLAGS includes $x_includes
17644   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
17645
17646   if test \! -z "$libdir" ; then
17647     LDFLAGS="$LDFLAGS -L$libdir"
17648   fi
17649   # note: $X_LIBS includes $x_libraries
17650   LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
17651
17652   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
17653   LDFLAGS=`eval eval eval eval eval eval eval eval eval echo $LDFLAGS`
17654   { $as_echo "$as_me:$LINENO: checking for glXCreateContext in -lGL" >&5
17655 $as_echo_n "checking for glXCreateContext in -lGL... " >&6; }
17656 if test "${ac_cv_lib_GL_glXCreateContext+set}" = set; then
17657   $as_echo_n "(cached) " >&6
17658 else
17659   ac_check_lib_save_LIBS=$LIBS
17660 LIBS="-lGL -lGLU $GL_LIBS -lX11 -lXext $VIDMODE_LIBS -lm $LIBS"
17661 cat >conftest.$ac_ext <<_ACEOF
17662 /* confdefs.h.  */
17663 _ACEOF
17664 cat confdefs.h >>conftest.$ac_ext
17665 cat >>conftest.$ac_ext <<_ACEOF
17666 /* end confdefs.h.  */
17667
17668 /* Override any GCC internal prototype to avoid an error.
17669    Use char because int might match the return type of a GCC
17670    builtin and then its argument prototype would still apply.  */
17671 #ifdef __cplusplus
17672 extern "C"
17673 #endif
17674 char glXCreateContext ();
17675 int
17676 main ()
17677 {
17678 return glXCreateContext ();
17679   ;
17680   return 0;
17681 }
17682 _ACEOF
17683 rm -rf conftest.$ac_objext conftest$ac_exeext
17684 if { (ac_try="$ac_link"
17685 case "(($ac_try" in
17686   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17687   *) ac_try_echo=$ac_try;;
17688 esac
17689 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
17690 $as_echo "$ac_try_echo") >&5
17691   (eval "$ac_link") 2>conftest.er1
17692   ac_status=$?
17693   grep -v '^ *+' conftest.er1 >conftest.err
17694   rm -rf conftest.er1
17695   cat conftest.err >&5
17696   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
17697   (exit $ac_status); } && {
17698          test -z "$ac_c_werror_flag" ||
17699          test ! -s conftest.err
17700        } && test -s conftest$ac_exeext && {
17701          test "$cross_compiling" = yes ||
17702          $as_test_x conftest$ac_exeext
17703        }; then
17704   ac_cv_lib_GL_glXCreateContext=yes
17705 else
17706   $as_echo "$as_me: failed program was:" >&5
17707 sed 's/^/| /' conftest.$ac_ext >&5
17708
17709         ac_cv_lib_GL_glXCreateContext=no
17710 fi
17711
17712 rm -rf conftest.dSYM
17713 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
17714       conftest$ac_exeext conftest.$ac_ext
17715 LIBS=$ac_check_lib_save_LIBS
17716 fi
17717 { $as_echo "$as_me:$LINENO: result: $ac_cv_lib_GL_glXCreateContext" >&5
17718 $as_echo "$ac_cv_lib_GL_glXCreateContext" >&6; }
17719 if test "x$ac_cv_lib_GL_glXCreateContext" = x""yes; then
17720   gl_lib_1="GL"
17721                       GL_LIBS="-lGL -lGLU $VIDMODE_LIBS $GL_LIBS"
17722 fi
17723
17724   CPPFLAGS="$ac_save_CPPFLAGS"
17725   LDFLAGS="$ac_save_LDFLAGS"
17726 #  LIBS="$ac_save_LIBS"
17727
17728     fi
17729
17730     if test "$gl_lib_1" = "" ; then
17731       # we have headers, but no libs -- bail.
17732       have_gl=no
17733       ac_have_mesa_gl=no
17734       gl_halfassed=yes
17735     else
17736       # linking works -- we can build the GL hacks.
17737       cat >>confdefs.h <<\_ACEOF
17738 #define HAVE_GL 1
17739 _ACEOF
17740
17741       if test "$ac_have_mesa_gl" = yes ; then
17742         cat >>confdefs.h <<\_ACEOF
17743 #define HAVE_MESA_GL 1
17744 _ACEOF
17745
17746       fi
17747     fi
17748   fi
17749
17750
17751   # Now that we know we have GL headers and libs, do some more GL testing.
17752   #
17753
17754   if test "$have_gl" = yes ; then
17755     # If it's MesaGL, we'd like to issue a warning if the version number
17756     # is less than or equal to 2.6, because that version had a security bug.
17757     #
17758     if test "$ac_have_mesa_gl" = yes; then
17759
17760       { $as_echo "$as_me:$LINENO: checking MesaGL version number" >&5
17761 $as_echo_n "checking MesaGL version number... " >&6; }
17762 if test "${ac_cv_mesagl_version_string+set}" = set; then
17763   $as_echo_n "(cached) " >&6
17764 else
17765   cat > conftest.$ac_ext <<EOF
17766 #line 17770 "configure"
17767 #include "confdefs.h"
17768 #include <GL/gl.h>
17769 #ifndef MESA_MAJOR_VERSION
17770 # include <GL/xmesa.h>
17771 # ifdef XMESA_MAJOR_VERSION
17772    /* Around Mesa 3.2, they took out the Mesa version number, so instead,
17773       we have to check the XMesa version number (the number of the X protocol
17774       support, which seems to be the same as the Mesa version number.)
17775     */
17776 #  define MESA_MAJOR_VERSION XMESA_MAJOR_VERSION
17777 #  define MESA_MINOR_VERSION XMESA_MINOR_VERSION
17778 # else
17779    /* Oh great.  Some time after 3.4, they took out the xmesa.h header file,
17780       so we have no way of telling what version of Mesa this is at all.
17781       So, we'll guess that the osmesa version (the "offscreen protocol")
17782       is less than or equal to the real mesa version number.  Except that
17783       if OSmesa is 3.3, assume at least Mesa 3.4, since OSmesa was 3.3 in
17784       Mesa 3.4.  And Mesa 3.3 had xmesa.h.  What a complete load of shit!
17785     */
17786 # include <GL/osmesa.h>
17787 #  define MESA_MAJOR_VERSION OSMESA_MAJOR_VERSION
17788 #  define MESA_MINOR_VERSION OSMESA_MINOR_VERSION or newer, probably?
17789 #  if OSMESA_MAJOR_VERSION == 3 && OSMESA_MINOR_VERSION == 3
17790 #   undef MESA_MINOR_VERSION
17791 #   define MESA_MINOR_VERSION 4 or newer, probably?
17792 #  endif
17793 # endif
17794 #endif
17795 configure: MESA_MAJOR_VERSION MESA_MINOR_VERSION
17796 EOF
17797
17798          ac_save_CPPFLAGS="$CPPFLAGS"
17799          if test \! -z "$includedir" ; then
17800            CPPFLAGS="$CPPFLAGS -I$includedir"
17801          fi
17802          CPPFLAGS="$CPPFLAGS $X_CFLAGS"
17803
17804          mglv=`(eval "$ac_cpp conftest.$ac_ext") 2>&5 | grep configure:`
17805
17806          # M4 sucks!!
17807
17808           mglv=`echo "$mglv" | sed -n \
17809              's/^configure: *\([0-9][0-9]*\)  *\([0-9].*\)$/\1.\2/p'`
17810
17811
17812          rm -rf conftest.$ac_ext
17813
17814          CPPFLAGS="$ac_save_CPPFLAGS"
17815
17816          if test "$mglv" = ""; then
17817            ac_mesagl_version=unknown
17818            ac_mesagl_version_string=unknown
17819          else
17820            ac_mesagl_version_string="$mglv"
17821            # M4 sucks!!
17822
17823            maj=`echo "$mglv" | sed -n 's/^\([0-9][0-9]*\)\..*$/\1/p'`
17824            min=`echo "$mglv" | sed -n 's/^.*\.\([0-9][0-9]*\).*$/\1/p'`
17825
17826            ac_mesagl_version=`echo "$maj * 1000 + $min" | bc`
17827            if test -z "$ac_mesagl_version"; then
17828              ac_mesagl_version=unknown
17829              ac_mesagl_version_string=unknown
17830            fi
17831          fi
17832          ac_cv_mesagl_version=$ac_mesagl_version
17833          ac_cv_mesagl_version_string=$ac_mesagl_version_string
17834
17835 fi
17836 { $as_echo "$as_me:$LINENO: result: $ac_cv_mesagl_version_string" >&5
17837 $as_echo "$ac_cv_mesagl_version_string" >&6; }
17838       ac_mesagl_version=$ac_cv_mesagl_version
17839       ac_mesagl_version_string=$ac_cv_mesagl_version_string
17840     fi
17841
17842
17843     # Check for OpenGL 1.1 features.
17844     #
17845
17846   ac_save_CPPFLAGS="$CPPFLAGS"
17847   ac_save_LDFLAGS="$LDFLAGS"
17848 #  ac_save_LIBS="$LIBS"
17849
17850   if test \! -z "$includedir" ; then
17851     CPPFLAGS="$CPPFLAGS -I$includedir"
17852   fi
17853   # note: $X_CFLAGS includes $x_includes
17854   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
17855
17856   if test \! -z "$libdir" ; then
17857     LDFLAGS="$LDFLAGS -L$libdir"
17858   fi
17859   # note: $X_LIBS includes $x_libraries
17860   LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
17861
17862   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
17863   LDFLAGS=`eval eval eval eval eval eval eval eval eval echo $LDFLAGS`
17864   as_ac_Lib=`$as_echo "ac_cv_lib_$gl_lib_1''_glBindTexture" | $as_tr_sh`
17865 { $as_echo "$as_me:$LINENO: checking for glBindTexture in -l$gl_lib_1" >&5
17866 $as_echo_n "checking for glBindTexture in -l$gl_lib_1... " >&6; }
17867 if { as_var=$as_ac_Lib; eval "test \"\${$as_var+set}\" = set"; }; then
17868   $as_echo_n "(cached) " >&6
17869 else
17870   ac_check_lib_save_LIBS=$LIBS
17871 LIBS="-l$gl_lib_1 $GL_LIBS -lX11 -lXext -lm $LIBS"
17872 cat >conftest.$ac_ext <<_ACEOF
17873 /* confdefs.h.  */
17874 _ACEOF
17875 cat confdefs.h >>conftest.$ac_ext
17876 cat >>conftest.$ac_ext <<_ACEOF
17877 /* end confdefs.h.  */
17878
17879 /* Override any GCC internal prototype to avoid an error.
17880    Use char because int might match the return type of a GCC
17881    builtin and then its argument prototype would still apply.  */
17882 #ifdef __cplusplus
17883 extern "C"
17884 #endif
17885 char glBindTexture ();
17886 int
17887 main ()
17888 {
17889 return glBindTexture ();
17890   ;
17891   return 0;
17892 }
17893 _ACEOF
17894 rm -rf conftest.$ac_objext conftest$ac_exeext
17895 if { (ac_try="$ac_link"
17896 case "(($ac_try" in
17897   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17898   *) ac_try_echo=$ac_try;;
17899 esac
17900 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
17901 $as_echo "$ac_try_echo") >&5
17902   (eval "$ac_link") 2>conftest.er1
17903   ac_status=$?
17904   grep -v '^ *+' conftest.er1 >conftest.err
17905   rm -rf conftest.er1
17906   cat conftest.err >&5
17907   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
17908   (exit $ac_status); } && {
17909          test -z "$ac_c_werror_flag" ||
17910          test ! -s conftest.err
17911        } && test -s conftest$ac_exeext && {
17912          test "$cross_compiling" = yes ||
17913          $as_test_x conftest$ac_exeext
17914        }; then
17915   eval "$as_ac_Lib=yes"
17916 else
17917   $as_echo "$as_me: failed program was:" >&5
17918 sed 's/^/| /' conftest.$ac_ext >&5
17919
17920         eval "$as_ac_Lib=no"
17921 fi
17922
17923 rm -rf conftest.dSYM
17924 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
17925       conftest$ac_exeext conftest.$ac_ext
17926 LIBS=$ac_check_lib_save_LIBS
17927 fi
17928 ac_res=`eval 'as_val=${'$as_ac_Lib'}
17929                  $as_echo "$as_val"'`
17930                { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
17931 $as_echo "$ac_res" >&6; }
17932 as_val=`eval 'as_val=${'$as_ac_Lib'}
17933                  $as_echo "$as_val"'`
17934    if test "x$as_val" = x""yes; then
17935   cat >>confdefs.h <<\_ACEOF
17936 #define HAVE_GLBINDTEXTURE 1
17937 _ACEOF
17938
17939 else
17940   true
17941 fi
17942
17943   CPPFLAGS="$ac_save_CPPFLAGS"
17944   LDFLAGS="$ac_save_LDFLAGS"
17945 #  LIBS="$ac_save_LIBS"
17946
17947   fi
17948
17949 elif test "$with_gl" != no; then
17950   echo "error: must be yes or no: --with-gl=$with_gl"
17951   exit 1
17952 fi
17953
17954
17955 ###############################################################################
17956 #
17957 #       Check for -lgle.
17958 #
17959 ###############################################################################
17960
17961 have_gle=no
17962 with_gle_req=unspecified
17963 gle_halfassed=no
17964
17965 # Check whether --with-gle was given.
17966 if test "${with_gle+set}" = set; then
17967   withval=$with_gle; with_gle="$withval"; with_gle_req="$withval"
17968 else
17969   with_gle=yes
17970 fi
17971
17972
17973
17974    case "$with_gle" in
17975     yes) ;;
17976     no)  ;;
17977
17978     /*)
17979      { $as_echo "$as_me:$LINENO: checking for GLE headers" >&5
17980 $as_echo_n "checking for GLE headers... " >&6; }
17981      d=$with_gle/include
17982      if test -d $d; then
17983        X_CFLAGS="-I$d $X_CFLAGS"
17984        { $as_echo "$as_me:$LINENO: result: $d" >&5
17985 $as_echo "$d" >&6; }
17986      else
17987        { $as_echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
17988 $as_echo "not found ($d: no such directory)" >&6; }
17989      fi
17990
17991      { $as_echo "$as_me:$LINENO: checking for GLE libs" >&5
17992 $as_echo_n "checking for GLE libs... " >&6; }
17993      d=$with_gle/lib
17994      if test -d $d; then
17995        X_LIBS="-L$d $X_LIBS"
17996        { $as_echo "$as_me:$LINENO: result: $d" >&5
17997 $as_echo "$d" >&6; }
17998      else
17999        { $as_echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
18000 $as_echo "not found ($d: no such directory)" >&6; }
18001      fi
18002
18003      # replace the directory string with "yes".
18004      with_gle_req="yes"
18005      with_gle=$with_gle_req
18006      ;;
18007
18008     *)
18009      echo ""
18010      echo "error: argument to --with-gle must be \"yes\", \"no\", or a directory."
18011      echo "       If it is a directory, then \`DIR/include' will be added to"
18012      echo "       the -I list, and \`DIR/lib' will be added to the -L list."
18013      exit 1
18014      ;;
18015    esac
18016
18017
18018 GLE_LIBS=""
18019
18020 if test "$have_gl" = no ; then
18021  true
18022 elif test "$with_gle" = yes; then
18023
18024
18025   ac_save_CPPFLAGS="$CPPFLAGS"
18026   if test \! -z "$includedir" ; then
18027     CPPFLAGS="$CPPFLAGS -I$includedir"
18028   fi
18029   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
18030   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
18031   { $as_echo "$as_me:$LINENO: checking for GL/gle.h" >&5
18032 $as_echo_n "checking for GL/gle.h... " >&6; }
18033 if test "${ac_cv_header_GL_gle_h+set}" = set; then
18034   $as_echo_n "(cached) " >&6
18035 else
18036   cat >conftest.$ac_ext <<_ACEOF
18037 /* confdefs.h.  */
18038 _ACEOF
18039 cat confdefs.h >>conftest.$ac_ext
18040 cat >>conftest.$ac_ext <<_ACEOF
18041 /* end confdefs.h.  */
18042 #include <GL/gl.h>
18043
18044 #include <GL/gle.h>
18045 _ACEOF
18046 rm -rf conftest.$ac_objext
18047 if { (ac_try="$ac_compile"
18048 case "(($ac_try" in
18049   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18050   *) ac_try_echo=$ac_try;;
18051 esac
18052 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
18053 $as_echo "$ac_try_echo") >&5
18054   (eval "$ac_compile") 2>conftest.er1
18055   ac_status=$?
18056   grep -v '^ *+' conftest.er1 >conftest.err
18057   rm -rf conftest.er1
18058   cat conftest.err >&5
18059   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
18060   (exit $ac_status); } && {
18061          test -z "$ac_c_werror_flag" ||
18062          test ! -s conftest.err
18063        } && test -s conftest.$ac_objext; then
18064   ac_cv_header_GL_gle_h=yes
18065 else
18066   $as_echo "$as_me: failed program was:" >&5
18067 sed 's/^/| /' conftest.$ac_ext >&5
18068
18069         ac_cv_header_GL_gle_h=no
18070 fi
18071
18072 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
18073 fi
18074 { $as_echo "$as_me:$LINENO: result: $ac_cv_header_GL_gle_h" >&5
18075 $as_echo "$ac_cv_header_GL_gle_h" >&6; }
18076 if test "x$ac_cv_header_GL_gle_h" = x""yes; then
18077   have_gle3=yes
18078 else
18079   have_gle3=no
18080 fi
18081
18082
18083   CPPFLAGS="$ac_save_CPPFLAGS"
18084   if test "$have_gle3" = yes ; then
18085     have_gle=yes;
18086   else
18087
18088   ac_save_CPPFLAGS="$CPPFLAGS"
18089   if test \! -z "$includedir" ; then
18090     CPPFLAGS="$CPPFLAGS -I$includedir"
18091   fi
18092   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
18093   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
18094   { $as_echo "$as_me:$LINENO: checking for GL/gutil.h" >&5
18095 $as_echo_n "checking for GL/gutil.h... " >&6; }
18096 if test "${ac_cv_header_GL_gutil_h+set}" = set; then
18097   $as_echo_n "(cached) " >&6
18098 else
18099   cat >conftest.$ac_ext <<_ACEOF
18100 /* confdefs.h.  */
18101 _ACEOF
18102 cat confdefs.h >>conftest.$ac_ext
18103 cat >>conftest.$ac_ext <<_ACEOF
18104 /* end confdefs.h.  */
18105 #include <GL/gl.h>
18106
18107 #include <GL/gutil.h>
18108 _ACEOF
18109 rm -rf conftest.$ac_objext
18110 if { (ac_try="$ac_compile"
18111 case "(($ac_try" in
18112   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18113   *) ac_try_echo=$ac_try;;
18114 esac
18115 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
18116 $as_echo "$ac_try_echo") >&5
18117   (eval "$ac_compile") 2>conftest.er1
18118   ac_status=$?
18119   grep -v '^ *+' conftest.er1 >conftest.err
18120   rm -rf conftest.er1
18121   cat conftest.err >&5
18122   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
18123   (exit $ac_status); } && {
18124          test -z "$ac_c_werror_flag" ||
18125          test ! -s conftest.err
18126        } && test -s conftest.$ac_objext; then
18127   ac_cv_header_GL_gutil_h=yes
18128 else
18129   $as_echo "$as_me: failed program was:" >&5
18130 sed 's/^/| /' conftest.$ac_ext >&5
18131
18132         ac_cv_header_GL_gutil_h=no
18133 fi
18134
18135 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
18136 fi
18137 { $as_echo "$as_me:$LINENO: result: $ac_cv_header_GL_gutil_h" >&5
18138 $as_echo "$ac_cv_header_GL_gutil_h" >&6; }
18139 if test "x$ac_cv_header_GL_gutil_h" = x""yes; then
18140   have_gle=yes
18141 else
18142   have_gle=no
18143 fi
18144
18145
18146   CPPFLAGS="$ac_save_CPPFLAGS"
18147     if test "$have_gle" = yes ; then
18148
18149   ac_save_CPPFLAGS="$CPPFLAGS"
18150   if test \! -z "$includedir" ; then
18151     CPPFLAGS="$CPPFLAGS -I$includedir"
18152   fi
18153   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
18154   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
18155   { $as_echo "$as_me:$LINENO: checking for GL/tube.h" >&5
18156 $as_echo_n "checking for GL/tube.h... " >&6; }
18157 if test "${ac_cv_header_GL_tube_h+set}" = set; then
18158   $as_echo_n "(cached) " >&6
18159 else
18160   cat >conftest.$ac_ext <<_ACEOF
18161 /* confdefs.h.  */
18162 _ACEOF
18163 cat confdefs.h >>conftest.$ac_ext
18164 cat >>conftest.$ac_ext <<_ACEOF
18165 /* end confdefs.h.  */
18166 #include <GL/gl.h>
18167
18168 #include <GL/tube.h>
18169 _ACEOF
18170 rm -rf conftest.$ac_objext
18171 if { (ac_try="$ac_compile"
18172 case "(($ac_try" in
18173   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18174   *) ac_try_echo=$ac_try;;
18175 esac
18176 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
18177 $as_echo "$ac_try_echo") >&5
18178   (eval "$ac_compile") 2>conftest.er1
18179   ac_status=$?
18180   grep -v '^ *+' conftest.er1 >conftest.err
18181   rm -rf conftest.er1
18182   cat conftest.err >&5
18183   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
18184   (exit $ac_status); } && {
18185          test -z "$ac_c_werror_flag" ||
18186          test ! -s conftest.err
18187        } && test -s conftest.$ac_objext; then
18188   ac_cv_header_GL_tube_h=yes
18189 else
18190   $as_echo "$as_me: failed program was:" >&5
18191 sed 's/^/| /' conftest.$ac_ext >&5
18192
18193         ac_cv_header_GL_tube_h=no
18194 fi
18195
18196 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
18197 fi
18198 { $as_echo "$as_me:$LINENO: result: $ac_cv_header_GL_tube_h" >&5
18199 $as_echo "$ac_cv_header_GL_tube_h" >&6; }
18200 if test "x$ac_cv_header_GL_tube_h" = x""yes; then
18201   have_gle=yes
18202 else
18203   have_gle=no
18204 fi
18205
18206
18207   CPPFLAGS="$ac_save_CPPFLAGS"
18208     fi
18209   fi
18210
18211   if test "$have_gle" = yes ; then
18212     have_gle=no
18213     gle_halfassed=yes
18214
18215   ac_save_CPPFLAGS="$CPPFLAGS"
18216   ac_save_LDFLAGS="$LDFLAGS"
18217 #  ac_save_LIBS="$LIBS"
18218
18219   if test \! -z "$includedir" ; then
18220     CPPFLAGS="$CPPFLAGS -I$includedir"
18221   fi
18222   # note: $X_CFLAGS includes $x_includes
18223   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
18224
18225   if test \! -z "$libdir" ; then
18226     LDFLAGS="$LDFLAGS -L$libdir"
18227   fi
18228   # note: $X_LIBS includes $x_libraries
18229   LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
18230
18231   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
18232   LDFLAGS=`eval eval eval eval eval eval eval eval eval echo $LDFLAGS`
18233   { $as_echo "$as_me:$LINENO: checking for gleCreateGC in -lgle" >&5
18234 $as_echo_n "checking for gleCreateGC in -lgle... " >&6; }
18235 if test "${ac_cv_lib_gle_gleCreateGC+set}" = set; then
18236   $as_echo_n "(cached) " >&6
18237 else
18238   ac_check_lib_save_LIBS=$LIBS
18239 LIBS="-lgle $GL_LIBS -lX11 -lXext -lm $LIBS"
18240 cat >conftest.$ac_ext <<_ACEOF
18241 /* confdefs.h.  */
18242 _ACEOF
18243 cat confdefs.h >>conftest.$ac_ext
18244 cat >>conftest.$ac_ext <<_ACEOF
18245 /* end confdefs.h.  */
18246
18247 /* Override any GCC internal prototype to avoid an error.
18248    Use char because int might match the return type of a GCC
18249    builtin and then its argument prototype would still apply.  */
18250 #ifdef __cplusplus
18251 extern "C"
18252 #endif
18253 char gleCreateGC ();
18254 int
18255 main ()
18256 {
18257 return gleCreateGC ();
18258   ;
18259   return 0;
18260 }
18261 _ACEOF
18262 rm -rf conftest.$ac_objext conftest$ac_exeext
18263 if { (ac_try="$ac_link"
18264 case "(($ac_try" in
18265   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18266   *) ac_try_echo=$ac_try;;
18267 esac
18268 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
18269 $as_echo "$ac_try_echo") >&5
18270   (eval "$ac_link") 2>conftest.er1
18271   ac_status=$?
18272   grep -v '^ *+' conftest.er1 >conftest.err
18273   rm -rf conftest.er1
18274   cat conftest.err >&5
18275   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
18276   (exit $ac_status); } && {
18277          test -z "$ac_c_werror_flag" ||
18278          test ! -s conftest.err
18279        } && test -s conftest$ac_exeext && {
18280          test "$cross_compiling" = yes ||
18281          $as_test_x conftest$ac_exeext
18282        }; then
18283   ac_cv_lib_gle_gleCreateGC=yes
18284 else
18285   $as_echo "$as_me: failed program was:" >&5
18286 sed 's/^/| /' conftest.$ac_ext >&5
18287
18288         ac_cv_lib_gle_gleCreateGC=no
18289 fi
18290
18291 rm -rf conftest.dSYM
18292 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
18293       conftest$ac_exeext conftest.$ac_ext
18294 LIBS=$ac_check_lib_save_LIBS
18295 fi
18296 { $as_echo "$as_me:$LINENO: result: $ac_cv_lib_gle_gleCreateGC" >&5
18297 $as_echo "$ac_cv_lib_gle_gleCreateGC" >&6; }
18298 if test "x$ac_cv_lib_gle_gleCreateGC" = x""yes; then
18299   have_gle=yes; gle_halfassed=no; GLE_LIBS="-lgle"
18300 fi
18301
18302   CPPFLAGS="$ac_save_CPPFLAGS"
18303   LDFLAGS="$ac_save_LDFLAGS"
18304 #  LIBS="$ac_save_LIBS"
18305
18306   fi
18307   if test "$have_gle" = yes ; then
18308     have_gle=no
18309     gle_halfassed=yes
18310
18311     # sometimes the libmatrix stuff is included in libgle.  look there first.
18312 #
18313 # I don't get it.  For some reason, this test passes on SGI, as if
18314 # uview_direction_d() was in libgle -- but it's not, it's in libmatrix.
18315 # Yet the link is succeeding.  Why???
18316 #
18317 #    AC_CHECK_X_LIB(gle, uview_direction_d,
18318 #                   [have_gle=yes; gle_halfassed=no],
18319 #                   [], $GL_LIBS -lX11 -lXext -lm)
18320
18321     # As of GLE 3 this is in libgle, and has changed name to uview_direction!
18322     # *sigh*
18323     if test "$have_gle3" = yes ; then
18324
18325   ac_save_CPPFLAGS="$CPPFLAGS"
18326   ac_save_LDFLAGS="$LDFLAGS"
18327 #  ac_save_LIBS="$LIBS"
18328
18329   if test \! -z "$includedir" ; then
18330     CPPFLAGS="$CPPFLAGS -I$includedir"
18331   fi
18332   # note: $X_CFLAGS includes $x_includes
18333   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
18334
18335   if test \! -z "$libdir" ; then
18336     LDFLAGS="$LDFLAGS -L$libdir"
18337   fi
18338   # note: $X_LIBS includes $x_libraries
18339   LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
18340
18341   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
18342   LDFLAGS=`eval eval eval eval eval eval eval eval eval echo $LDFLAGS`
18343   { $as_echo "$as_me:$LINENO: checking for uview_direction in -lgle" >&5
18344 $as_echo_n "checking for uview_direction in -lgle... " >&6; }
18345 if test "${ac_cv_lib_gle_uview_direction+set}" = set; then
18346   $as_echo_n "(cached) " >&6
18347 else
18348   ac_check_lib_save_LIBS=$LIBS
18349 LIBS="-lgle $GL_LIBS -lX11 -lXext -lm $LIBS"
18350 cat >conftest.$ac_ext <<_ACEOF
18351 /* confdefs.h.  */
18352 _ACEOF
18353 cat confdefs.h >>conftest.$ac_ext
18354 cat >>conftest.$ac_ext <<_ACEOF
18355 /* end confdefs.h.  */
18356
18357 /* Override any GCC internal prototype to avoid an error.
18358    Use char because int might match the return type of a GCC
18359    builtin and then its argument prototype would still apply.  */
18360 #ifdef __cplusplus
18361 extern "C"
18362 #endif
18363 char uview_direction ();
18364 int
18365 main ()
18366 {
18367 return uview_direction ();
18368   ;
18369   return 0;
18370 }
18371 _ACEOF
18372 rm -rf conftest.$ac_objext conftest$ac_exeext
18373 if { (ac_try="$ac_link"
18374 case "(($ac_try" in
18375   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18376   *) ac_try_echo=$ac_try;;
18377 esac
18378 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
18379 $as_echo "$ac_try_echo") >&5
18380   (eval "$ac_link") 2>conftest.er1
18381   ac_status=$?
18382   grep -v '^ *+' conftest.er1 >conftest.err
18383   rm -rf conftest.er1
18384   cat conftest.err >&5
18385   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
18386   (exit $ac_status); } && {
18387          test -z "$ac_c_werror_flag" ||
18388          test ! -s conftest.err
18389        } && test -s conftest$ac_exeext && {
18390          test "$cross_compiling" = yes ||
18391          $as_test_x conftest$ac_exeext
18392        }; then
18393   ac_cv_lib_gle_uview_direction=yes
18394 else
18395   $as_echo "$as_me: failed program was:" >&5
18396 sed 's/^/| /' conftest.$ac_ext >&5
18397
18398         ac_cv_lib_gle_uview_direction=no
18399 fi
18400
18401 rm -rf conftest.dSYM
18402 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
18403       conftest$ac_exeext conftest.$ac_ext
18404 LIBS=$ac_check_lib_save_LIBS
18405 fi
18406 { $as_echo "$as_me:$LINENO: result: $ac_cv_lib_gle_uview_direction" >&5
18407 $as_echo "$ac_cv_lib_gle_uview_direction" >&6; }
18408 if test "x$ac_cv_lib_gle_uview_direction" = x""yes; then
18409   have_gle=yes; gle_halfassed=no
18410 fi
18411
18412   CPPFLAGS="$ac_save_CPPFLAGS"
18413   LDFLAGS="$ac_save_LDFLAGS"
18414 #  LIBS="$ac_save_LIBS"
18415
18416     fi
18417     # if it wasn't in libgle, then look in libmatrix.
18418     if test "$have_gle" = no ; then
18419
18420   ac_save_CPPFLAGS="$CPPFLAGS"
18421   ac_save_LDFLAGS="$LDFLAGS"
18422 #  ac_save_LIBS="$LIBS"
18423
18424   if test \! -z "$includedir" ; then
18425     CPPFLAGS="$CPPFLAGS -I$includedir"
18426   fi
18427   # note: $X_CFLAGS includes $x_includes
18428   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
18429
18430   if test \! -z "$libdir" ; then
18431     LDFLAGS="$LDFLAGS -L$libdir"
18432   fi
18433   # note: $X_LIBS includes $x_libraries
18434   LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
18435
18436   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
18437   LDFLAGS=`eval eval eval eval eval eval eval eval eval echo $LDFLAGS`
18438   { $as_echo "$as_me:$LINENO: checking for uview_direction_d in -lmatrix" >&5
18439 $as_echo_n "checking for uview_direction_d in -lmatrix... " >&6; }
18440 if test "${ac_cv_lib_matrix_uview_direction_d+set}" = set; then
18441   $as_echo_n "(cached) " >&6
18442 else
18443   ac_check_lib_save_LIBS=$LIBS
18444 LIBS="-lmatrix $GL_LIBS -lX11 -lXext -lm $LIBS"
18445 cat >conftest.$ac_ext <<_ACEOF
18446 /* confdefs.h.  */
18447 _ACEOF
18448 cat confdefs.h >>conftest.$ac_ext
18449 cat >>conftest.$ac_ext <<_ACEOF
18450 /* end confdefs.h.  */
18451
18452 /* Override any GCC internal prototype to avoid an error.
18453    Use char because int might match the return type of a GCC
18454    builtin and then its argument prototype would still apply.  */
18455 #ifdef __cplusplus
18456 extern "C"
18457 #endif
18458 char uview_direction_d ();
18459 int
18460 main ()
18461 {
18462 return uview_direction_d ();
18463   ;
18464   return 0;
18465 }
18466 _ACEOF
18467 rm -rf conftest.$ac_objext conftest$ac_exeext
18468 if { (ac_try="$ac_link"
18469 case "(($ac_try" in
18470   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18471   *) ac_try_echo=$ac_try;;
18472 esac
18473 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
18474 $as_echo "$ac_try_echo") >&5
18475   (eval "$ac_link") 2>conftest.er1
18476   ac_status=$?
18477   grep -v '^ *+' conftest.er1 >conftest.err
18478   rm -rf conftest.er1
18479   cat conftest.err >&5
18480   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
18481   (exit $ac_status); } && {
18482          test -z "$ac_c_werror_flag" ||
18483          test ! -s conftest.err
18484        } && test -s conftest$ac_exeext && {
18485          test "$cross_compiling" = yes ||
18486          $as_test_x conftest$ac_exeext
18487        }; then
18488   ac_cv_lib_matrix_uview_direction_d=yes
18489 else
18490   $as_echo "$as_me: failed program was:" >&5
18491 sed 's/^/| /' conftest.$ac_ext >&5
18492
18493         ac_cv_lib_matrix_uview_direction_d=no
18494 fi
18495
18496 rm -rf conftest.dSYM
18497 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
18498       conftest$ac_exeext conftest.$ac_ext
18499 LIBS=$ac_check_lib_save_LIBS
18500 fi
18501 { $as_echo "$as_me:$LINENO: result: $ac_cv_lib_matrix_uview_direction_d" >&5
18502 $as_echo "$ac_cv_lib_matrix_uview_direction_d" >&6; }
18503 if test "x$ac_cv_lib_matrix_uview_direction_d" = x""yes; then
18504   have_gle=yes; gle_halfassed=no;
18505                       GLE_LIBS="$GLE_LIBS -lmatrix"
18506 fi
18507
18508   CPPFLAGS="$ac_save_CPPFLAGS"
18509   LDFLAGS="$ac_save_LDFLAGS"
18510 #  LIBS="$ac_save_LIBS"
18511
18512     fi
18513   fi
18514
18515   if test "$have_gle" = yes ; then
18516     cat >>confdefs.h <<\_ACEOF
18517 #define HAVE_GLE 1
18518 _ACEOF
18519
18520     if test "$have_gle3" = yes ; then
18521       cat >>confdefs.h <<\_ACEOF
18522 #define HAVE_GLE3 1
18523 _ACEOF
18524
18525     fi
18526   fi
18527
18528 elif test "$with_gle" != no; then
18529   echo "error: must be yes or no: --with-gle=$with_gle"
18530   exit 1
18531
18532 fi
18533
18534
18535 ###############################################################################
18536 #
18537 #       Check for -lgdk_pixbuf.
18538 #       These tests are for gdk_pixbuf usage of the hacks,
18539 #       not xscreensaver-demo (thus we have to test again to get
18540 #       the libraries right: don't want to pull in all of GTK
18541 #       for the hacks.)
18542 #
18543 ###############################################################################
18544
18545 have_gdk_pixbuf=no
18546 with_gdk_pixbuf_req=unspecified
18547
18548 # Check whether --with-pixbuf was given.
18549 if test "${with_pixbuf+set}" = set; then
18550   withval=$with_pixbuf; with_gdk_pixbuf="$withval"; with_gdk_pixbuf_req="$withval"
18551 else
18552   with_gdk_pixbuf=yes
18553 fi
18554
18555
18556 # if --with-pixbuf=/directory/ was specified, remember that directory so that
18557 # we can also look for the `gdk-pixbuf-config' program in that directory.
18558 case "$with_gdk_pixbuf" in
18559   /*)
18560     gdk_pixbuf_dir="$with_gdk_pixbuf"
18561     ;;
18562   *)
18563     gdk_pixbuf_dir=""
18564     ;;
18565 esac
18566
18567
18568    case "$with_gdk_pixbuf" in
18569     yes) ;;
18570     no)  ;;
18571
18572     /*)
18573      { $as_echo "$as_me:$LINENO: checking for GDK_PIXBUF headers" >&5
18574 $as_echo_n "checking for GDK_PIXBUF headers... " >&6; }
18575      d=$with_gdk_pixbuf/include
18576      if test -d $d; then
18577        X_CFLAGS="-I$d $X_CFLAGS"
18578        { $as_echo "$as_me:$LINENO: result: $d" >&5
18579 $as_echo "$d" >&6; }
18580      else
18581        { $as_echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
18582 $as_echo "not found ($d: no such directory)" >&6; }
18583      fi
18584
18585      { $as_echo "$as_me:$LINENO: checking for GDK_PIXBUF libs" >&5
18586 $as_echo_n "checking for GDK_PIXBUF libs... " >&6; }
18587      d=$with_gdk_pixbuf/lib
18588      if test -d $d; then
18589        X_LIBS="-L$d $X_LIBS"
18590        { $as_echo "$as_me:$LINENO: result: $d" >&5
18591 $as_echo "$d" >&6; }
18592      else
18593        { $as_echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
18594 $as_echo "not found ($d: no such directory)" >&6; }
18595      fi
18596
18597      # replace the directory string with "yes".
18598      with_gdk_pixbuf_req="yes"
18599      with_gdk_pixbuf=$with_gdk_pixbuf_req
18600      ;;
18601
18602     *)
18603      echo ""
18604      echo "error: argument to --with-pixbuf must be \"yes\", \"no\", or a directory."
18605      echo "       If it is a directory, then \`DIR/include' will be added to"
18606      echo "       the -I list, and \`DIR/lib' will be added to the -L list."
18607      exit 1
18608      ;;
18609    esac
18610
18611
18612 if test "$with_gdk_pixbuf" != yes -a "$with_gdk_pixbuf" != no ; then
18613   echo "error: must be yes or no: --with-pixbuf=$with_gdk_pixbuf"
18614   exit 1
18615 fi
18616
18617 if test "$with_gdk_pixbuf" = yes; then
18618   have_gdk_pixbuf=no
18619
18620   pkgs=''
18621   ok="yes"
18622
18623   pkg_check_version gdk-pixbuf-2.0      2.0.0
18624   pkg_check_version gdk-pixbuf-xlib-2.0 2.0.0
18625   have_gdk_pixbuf="$ok"
18626
18627   if test "$have_gdk_pixbuf" = yes; then
18628     { $as_echo "$as_me:$LINENO: checking for gdk-pixbuf includes" >&5
18629 $as_echo_n "checking for gdk-pixbuf includes... " >&6; }
18630 if test "${ac_cv_gdk_pixbuf_config_cflags+set}" = set; then
18631   $as_echo_n "(cached) " >&6
18632 else
18633   ac_cv_gdk_pixbuf_config_cflags=`$pkg_config --cflags $pkgs`
18634 fi
18635 { $as_echo "$as_me:$LINENO: result: $ac_cv_gdk_pixbuf_config_cflags" >&5
18636 $as_echo "$ac_cv_gdk_pixbuf_config_cflags" >&6; }
18637     { $as_echo "$as_me:$LINENO: checking for gdk-pixbuf libs" >&5
18638 $as_echo_n "checking for gdk-pixbuf libs... " >&6; }
18639 if test "${ac_cv_gdk_pixbuf_config_libs+set}" = set; then
18640   $as_echo_n "(cached) " >&6
18641 else
18642   ac_cv_gdk_pixbuf_config_libs=`$pkg_config --libs $pkgs`
18643 fi
18644 { $as_echo "$as_me:$LINENO: result: $ac_cv_gdk_pixbuf_config_libs" >&5
18645 $as_echo "$ac_cv_gdk_pixbuf_config_libs" >&6; }
18646   fi
18647
18648   ac_gdk_pixbuf_config_cflags=$ac_cv_gdk_pixbuf_config_cflags
18649   ac_gdk_pixbuf_config_libs=$ac_cv_gdk_pixbuf_config_libs
18650
18651
18652   if test "$have_gdk_pixbuf" = yes; then
18653     #
18654     # we appear to have pixbuf; check for headers/libs to be sure.
18655     #
18656     ac_save_gdk_pixbuf_CPPFLAGS="$CPPFLAGS"
18657     CPPFLAGS="$CPPFLAGS $ac_gdk_pixbuf_config_cflags"
18658
18659     have_gdk_pixbuf=no
18660
18661     # check for header A...
18662
18663   ac_save_CPPFLAGS="$CPPFLAGS"
18664   if test \! -z "$includedir" ; then
18665     CPPFLAGS="$CPPFLAGS -I$includedir"
18666   fi
18667   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
18668   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
18669   if test "${ac_cv_header_gdk_pixbuf_gdk_pixbuf_h+set}" = set; then
18670   { $as_echo "$as_me:$LINENO: checking for gdk-pixbuf/gdk-pixbuf.h" >&5
18671 $as_echo_n "checking for gdk-pixbuf/gdk-pixbuf.h... " >&6; }
18672 if test "${ac_cv_header_gdk_pixbuf_gdk_pixbuf_h+set}" = set; then
18673   $as_echo_n "(cached) " >&6
18674 fi
18675 { $as_echo "$as_me:$LINENO: result: $ac_cv_header_gdk_pixbuf_gdk_pixbuf_h" >&5
18676 $as_echo "$ac_cv_header_gdk_pixbuf_gdk_pixbuf_h" >&6; }
18677 else
18678   # Is the header compilable?
18679 { $as_echo "$as_me:$LINENO: checking gdk-pixbuf/gdk-pixbuf.h usability" >&5
18680 $as_echo_n "checking gdk-pixbuf/gdk-pixbuf.h usability... " >&6; }
18681 cat >conftest.$ac_ext <<_ACEOF
18682 /* confdefs.h.  */
18683 _ACEOF
18684 cat confdefs.h >>conftest.$ac_ext
18685 cat >>conftest.$ac_ext <<_ACEOF
18686 /* end confdefs.h.  */
18687 $ac_includes_default
18688 #include <gdk-pixbuf/gdk-pixbuf.h>
18689 _ACEOF
18690 rm -rf conftest.$ac_objext
18691 if { (ac_try="$ac_compile"
18692 case "(($ac_try" in
18693   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18694   *) ac_try_echo=$ac_try;;
18695 esac
18696 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
18697 $as_echo "$ac_try_echo") >&5
18698   (eval "$ac_compile") 2>conftest.er1
18699   ac_status=$?
18700   grep -v '^ *+' conftest.er1 >conftest.err
18701   rm -rf conftest.er1
18702   cat conftest.err >&5
18703   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
18704   (exit $ac_status); } && {
18705          test -z "$ac_c_werror_flag" ||
18706          test ! -s conftest.err
18707        } && test -s conftest.$ac_objext; then
18708   ac_header_compiler=yes
18709 else
18710   $as_echo "$as_me: failed program was:" >&5
18711 sed 's/^/| /' conftest.$ac_ext >&5
18712
18713         ac_header_compiler=no
18714 fi
18715
18716 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
18717 { $as_echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
18718 $as_echo "$ac_header_compiler" >&6; }
18719
18720 # Is the header present?
18721 { $as_echo "$as_me:$LINENO: checking gdk-pixbuf/gdk-pixbuf.h presence" >&5
18722 $as_echo_n "checking gdk-pixbuf/gdk-pixbuf.h presence... " >&6; }
18723 cat >conftest.$ac_ext <<_ACEOF
18724 /* confdefs.h.  */
18725 _ACEOF
18726 cat confdefs.h >>conftest.$ac_ext
18727 cat >>conftest.$ac_ext <<_ACEOF
18728 /* end confdefs.h.  */
18729 #include <gdk-pixbuf/gdk-pixbuf.h>
18730 _ACEOF
18731 if { (ac_try="$ac_cpp conftest.$ac_ext"
18732 case "(($ac_try" in
18733   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18734   *) ac_try_echo=$ac_try;;
18735 esac
18736 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
18737 $as_echo "$ac_try_echo") >&5
18738   (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
18739   ac_status=$?
18740   grep -v '^ *+' conftest.er1 >conftest.err
18741   rm -rf conftest.er1
18742   cat conftest.err >&5
18743   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
18744   (exit $ac_status); } >/dev/null && {
18745          test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
18746          test ! -s conftest.err
18747        }; then
18748   ac_header_preproc=yes
18749 else
18750   $as_echo "$as_me: failed program was:" >&5
18751 sed 's/^/| /' conftest.$ac_ext >&5
18752
18753   ac_header_preproc=no
18754 fi
18755
18756 rm -rf conftest.err conftest.$ac_ext
18757 { $as_echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
18758 $as_echo "$ac_header_preproc" >&6; }
18759
18760 # So?  What about this header?
18761 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
18762   yes:no: )
18763     { $as_echo "$as_me:$LINENO: WARNING: gdk-pixbuf/gdk-pixbuf.h: accepted by the compiler, rejected by the preprocessor!" >&5
18764 $as_echo "$as_me: WARNING: gdk-pixbuf/gdk-pixbuf.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
18765     { $as_echo "$as_me:$LINENO: WARNING: gdk-pixbuf/gdk-pixbuf.h: proceeding with the compiler's result" >&5
18766 $as_echo "$as_me: WARNING: gdk-pixbuf/gdk-pixbuf.h: proceeding with the compiler's result" >&2;}
18767     ac_header_preproc=yes
18768     ;;
18769   no:yes:* )
18770     { $as_echo "$as_me:$LINENO: WARNING: gdk-pixbuf/gdk-pixbuf.h: present but cannot be compiled" >&5
18771 $as_echo "$as_me: WARNING: gdk-pixbuf/gdk-pixbuf.h: present but cannot be compiled" >&2;}
18772     { $as_echo "$as_me:$LINENO: WARNING: gdk-pixbuf/gdk-pixbuf.h:     check for missing prerequisite headers?" >&5
18773 $as_echo "$as_me: WARNING: gdk-pixbuf/gdk-pixbuf.h:     check for missing prerequisite headers?" >&2;}
18774     { $as_echo "$as_me:$LINENO: WARNING: gdk-pixbuf/gdk-pixbuf.h: see the Autoconf documentation" >&5
18775 $as_echo "$as_me: WARNING: gdk-pixbuf/gdk-pixbuf.h: see the Autoconf documentation" >&2;}
18776     { $as_echo "$as_me:$LINENO: WARNING: gdk-pixbuf/gdk-pixbuf.h:     section \"Present But Cannot Be Compiled\"" >&5
18777 $as_echo "$as_me: WARNING: gdk-pixbuf/gdk-pixbuf.h:     section \"Present But Cannot Be Compiled\"" >&2;}
18778     { $as_echo "$as_me:$LINENO: WARNING: gdk-pixbuf/gdk-pixbuf.h: proceeding with the preprocessor's result" >&5
18779 $as_echo "$as_me: WARNING: gdk-pixbuf/gdk-pixbuf.h: proceeding with the preprocessor's result" >&2;}
18780     { $as_echo "$as_me:$LINENO: WARNING: gdk-pixbuf/gdk-pixbuf.h: in the future, the compiler will take precedence" >&5
18781 $as_echo "$as_me: WARNING: gdk-pixbuf/gdk-pixbuf.h: in the future, the compiler will take precedence" >&2;}
18782
18783     ;;
18784 esac
18785 { $as_echo "$as_me:$LINENO: checking for gdk-pixbuf/gdk-pixbuf.h" >&5
18786 $as_echo_n "checking for gdk-pixbuf/gdk-pixbuf.h... " >&6; }
18787 if test "${ac_cv_header_gdk_pixbuf_gdk_pixbuf_h+set}" = set; then
18788   $as_echo_n "(cached) " >&6
18789 else
18790   ac_cv_header_gdk_pixbuf_gdk_pixbuf_h=$ac_header_preproc
18791 fi
18792 { $as_echo "$as_me:$LINENO: result: $ac_cv_header_gdk_pixbuf_gdk_pixbuf_h" >&5
18793 $as_echo "$ac_cv_header_gdk_pixbuf_gdk_pixbuf_h" >&6; }
18794
18795 fi
18796 if test "x$ac_cv_header_gdk_pixbuf_gdk_pixbuf_h" = x""yes; then
18797   have_gdk_pixbuf=yes
18798 fi
18799
18800
18801   CPPFLAGS="$ac_save_CPPFLAGS"
18802
18803     # if that worked, check for header B...
18804     if test "$have_gdk_pixbuf" = yes; then
18805       have_gdk_pixbuf=no
18806       gdk_pixbuf_halfassed=yes
18807
18808   ac_save_CPPFLAGS="$CPPFLAGS"
18809   if test \! -z "$includedir" ; then
18810     CPPFLAGS="$CPPFLAGS -I$includedir"
18811   fi
18812   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
18813   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
18814   if test "${ac_cv_header_gdk_pixbuf_gdk_pixbuf_xlib_h+set}" = set; then
18815   { $as_echo "$as_me:$LINENO: checking for gdk-pixbuf/gdk-pixbuf-xlib.h" >&5
18816 $as_echo_n "checking for gdk-pixbuf/gdk-pixbuf-xlib.h... " >&6; }
18817 if test "${ac_cv_header_gdk_pixbuf_gdk_pixbuf_xlib_h+set}" = set; then
18818   $as_echo_n "(cached) " >&6
18819 fi
18820 { $as_echo "$as_me:$LINENO: result: $ac_cv_header_gdk_pixbuf_gdk_pixbuf_xlib_h" >&5
18821 $as_echo "$ac_cv_header_gdk_pixbuf_gdk_pixbuf_xlib_h" >&6; }
18822 else
18823   # Is the header compilable?
18824 { $as_echo "$as_me:$LINENO: checking gdk-pixbuf/gdk-pixbuf-xlib.h usability" >&5
18825 $as_echo_n "checking gdk-pixbuf/gdk-pixbuf-xlib.h usability... " >&6; }
18826 cat >conftest.$ac_ext <<_ACEOF
18827 /* confdefs.h.  */
18828 _ACEOF
18829 cat confdefs.h >>conftest.$ac_ext
18830 cat >>conftest.$ac_ext <<_ACEOF
18831 /* end confdefs.h.  */
18832 $ac_includes_default
18833 #include <gdk-pixbuf/gdk-pixbuf-xlib.h>
18834 _ACEOF
18835 rm -rf conftest.$ac_objext
18836 if { (ac_try="$ac_compile"
18837 case "(($ac_try" in
18838   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18839   *) ac_try_echo=$ac_try;;
18840 esac
18841 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
18842 $as_echo "$ac_try_echo") >&5
18843   (eval "$ac_compile") 2>conftest.er1
18844   ac_status=$?
18845   grep -v '^ *+' conftest.er1 >conftest.err
18846   rm -rf conftest.er1
18847   cat conftest.err >&5
18848   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
18849   (exit $ac_status); } && {
18850          test -z "$ac_c_werror_flag" ||
18851          test ! -s conftest.err
18852        } && test -s conftest.$ac_objext; then
18853   ac_header_compiler=yes
18854 else
18855   $as_echo "$as_me: failed program was:" >&5
18856 sed 's/^/| /' conftest.$ac_ext >&5
18857
18858         ac_header_compiler=no
18859 fi
18860
18861 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
18862 { $as_echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
18863 $as_echo "$ac_header_compiler" >&6; }
18864
18865 # Is the header present?
18866 { $as_echo "$as_me:$LINENO: checking gdk-pixbuf/gdk-pixbuf-xlib.h presence" >&5
18867 $as_echo_n "checking gdk-pixbuf/gdk-pixbuf-xlib.h presence... " >&6; }
18868 cat >conftest.$ac_ext <<_ACEOF
18869 /* confdefs.h.  */
18870 _ACEOF
18871 cat confdefs.h >>conftest.$ac_ext
18872 cat >>conftest.$ac_ext <<_ACEOF
18873 /* end confdefs.h.  */
18874 #include <gdk-pixbuf/gdk-pixbuf-xlib.h>
18875 _ACEOF
18876 if { (ac_try="$ac_cpp conftest.$ac_ext"
18877 case "(($ac_try" in
18878   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18879   *) ac_try_echo=$ac_try;;
18880 esac
18881 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
18882 $as_echo "$ac_try_echo") >&5
18883   (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
18884   ac_status=$?
18885   grep -v '^ *+' conftest.er1 >conftest.err
18886   rm -rf conftest.er1
18887   cat conftest.err >&5
18888   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
18889   (exit $ac_status); } >/dev/null && {
18890          test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
18891          test ! -s conftest.err
18892        }; then
18893   ac_header_preproc=yes
18894 else
18895   $as_echo "$as_me: failed program was:" >&5
18896 sed 's/^/| /' conftest.$ac_ext >&5
18897
18898   ac_header_preproc=no
18899 fi
18900
18901 rm -rf conftest.err conftest.$ac_ext
18902 { $as_echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
18903 $as_echo "$ac_header_preproc" >&6; }
18904
18905 # So?  What about this header?
18906 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
18907   yes:no: )
18908     { $as_echo "$as_me:$LINENO: WARNING: gdk-pixbuf/gdk-pixbuf-xlib.h: accepted by the compiler, rejected by the preprocessor!" >&5
18909 $as_echo "$as_me: WARNING: gdk-pixbuf/gdk-pixbuf-xlib.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
18910     { $as_echo "$as_me:$LINENO: WARNING: gdk-pixbuf/gdk-pixbuf-xlib.h: proceeding with the compiler's result" >&5
18911 $as_echo "$as_me: WARNING: gdk-pixbuf/gdk-pixbuf-xlib.h: proceeding with the compiler's result" >&2;}
18912     ac_header_preproc=yes
18913     ;;
18914   no:yes:* )
18915     { $as_echo "$as_me:$LINENO: WARNING: gdk-pixbuf/gdk-pixbuf-xlib.h: present but cannot be compiled" >&5
18916 $as_echo "$as_me: WARNING: gdk-pixbuf/gdk-pixbuf-xlib.h: present but cannot be compiled" >&2;}
18917     { $as_echo "$as_me:$LINENO: WARNING: gdk-pixbuf/gdk-pixbuf-xlib.h:     check for missing prerequisite headers?" >&5
18918 $as_echo "$as_me: WARNING: gdk-pixbuf/gdk-pixbuf-xlib.h:     check for missing prerequisite headers?" >&2;}
18919     { $as_echo "$as_me:$LINENO: WARNING: gdk-pixbuf/gdk-pixbuf-xlib.h: see the Autoconf documentation" >&5
18920 $as_echo "$as_me: WARNING: gdk-pixbuf/gdk-pixbuf-xlib.h: see the Autoconf documentation" >&2;}
18921     { $as_echo "$as_me:$LINENO: WARNING: gdk-pixbuf/gdk-pixbuf-xlib.h:     section \"Present But Cannot Be Compiled\"" >&5
18922 $as_echo "$as_me: WARNING: gdk-pixbuf/gdk-pixbuf-xlib.h:     section \"Present But Cannot Be Compiled\"" >&2;}
18923     { $as_echo "$as_me:$LINENO: WARNING: gdk-pixbuf/gdk-pixbuf-xlib.h: proceeding with the preprocessor's result" >&5
18924 $as_echo "$as_me: WARNING: gdk-pixbuf/gdk-pixbuf-xlib.h: proceeding with the preprocessor's result" >&2;}
18925     { $as_echo "$as_me:$LINENO: WARNING: gdk-pixbuf/gdk-pixbuf-xlib.h: in the future, the compiler will take precedence" >&5
18926 $as_echo "$as_me: WARNING: gdk-pixbuf/gdk-pixbuf-xlib.h: in the future, the compiler will take precedence" >&2;}
18927
18928     ;;
18929 esac
18930 { $as_echo "$as_me:$LINENO: checking for gdk-pixbuf/gdk-pixbuf-xlib.h" >&5
18931 $as_echo_n "checking for gdk-pixbuf/gdk-pixbuf-xlib.h... " >&6; }
18932 if test "${ac_cv_header_gdk_pixbuf_gdk_pixbuf_xlib_h+set}" = set; then
18933   $as_echo_n "(cached) " >&6
18934 else
18935   ac_cv_header_gdk_pixbuf_gdk_pixbuf_xlib_h=$ac_header_preproc
18936 fi
18937 { $as_echo "$as_me:$LINENO: result: $ac_cv_header_gdk_pixbuf_gdk_pixbuf_xlib_h" >&5
18938 $as_echo "$ac_cv_header_gdk_pixbuf_gdk_pixbuf_xlib_h" >&6; }
18939
18940 fi
18941 if test "x$ac_cv_header_gdk_pixbuf_gdk_pixbuf_xlib_h" = x""yes; then
18942   have_gdk_pixbuf=yes
18943                          gdk_pixbuf_halfassed=no
18944 fi
18945
18946
18947   CPPFLAGS="$ac_save_CPPFLAGS"
18948
18949       # yay, it has a new name in Gtk 2.x...
18950       if test "$have_gdk_pixbuf" = no; then
18951         have_gdk_pixbuf=no
18952         gdk_pixbuf_halfassed=yes
18953
18954   ac_save_CPPFLAGS="$CPPFLAGS"
18955   if test \! -z "$includedir" ; then
18956     CPPFLAGS="$CPPFLAGS -I$includedir"
18957   fi
18958   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
18959   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
18960   if test "${ac_cv_header_gdk_pixbuf_xlib_gdk_pixbuf_xlib_h+set}" = set; then
18961   { $as_echo "$as_me:$LINENO: checking for gdk-pixbuf-xlib/gdk-pixbuf-xlib.h" >&5
18962 $as_echo_n "checking for gdk-pixbuf-xlib/gdk-pixbuf-xlib.h... " >&6; }
18963 if test "${ac_cv_header_gdk_pixbuf_xlib_gdk_pixbuf_xlib_h+set}" = set; then
18964   $as_echo_n "(cached) " >&6
18965 fi
18966 { $as_echo "$as_me:$LINENO: result: $ac_cv_header_gdk_pixbuf_xlib_gdk_pixbuf_xlib_h" >&5
18967 $as_echo "$ac_cv_header_gdk_pixbuf_xlib_gdk_pixbuf_xlib_h" >&6; }
18968 else
18969   # Is the header compilable?
18970 { $as_echo "$as_me:$LINENO: checking gdk-pixbuf-xlib/gdk-pixbuf-xlib.h usability" >&5
18971 $as_echo_n "checking gdk-pixbuf-xlib/gdk-pixbuf-xlib.h usability... " >&6; }
18972 cat >conftest.$ac_ext <<_ACEOF
18973 /* confdefs.h.  */
18974 _ACEOF
18975 cat confdefs.h >>conftest.$ac_ext
18976 cat >>conftest.$ac_ext <<_ACEOF
18977 /* end confdefs.h.  */
18978 $ac_includes_default
18979 #include <gdk-pixbuf-xlib/gdk-pixbuf-xlib.h>
18980 _ACEOF
18981 rm -rf conftest.$ac_objext
18982 if { (ac_try="$ac_compile"
18983 case "(($ac_try" in
18984   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18985   *) ac_try_echo=$ac_try;;
18986 esac
18987 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
18988 $as_echo "$ac_try_echo") >&5
18989   (eval "$ac_compile") 2>conftest.er1
18990   ac_status=$?
18991   grep -v '^ *+' conftest.er1 >conftest.err
18992   rm -rf conftest.er1
18993   cat conftest.err >&5
18994   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
18995   (exit $ac_status); } && {
18996          test -z "$ac_c_werror_flag" ||
18997          test ! -s conftest.err
18998        } && test -s conftest.$ac_objext; then
18999   ac_header_compiler=yes
19000 else
19001   $as_echo "$as_me: failed program was:" >&5
19002 sed 's/^/| /' conftest.$ac_ext >&5
19003
19004         ac_header_compiler=no
19005 fi
19006
19007 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
19008 { $as_echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
19009 $as_echo "$ac_header_compiler" >&6; }
19010
19011 # Is the header present?
19012 { $as_echo "$as_me:$LINENO: checking gdk-pixbuf-xlib/gdk-pixbuf-xlib.h presence" >&5
19013 $as_echo_n "checking gdk-pixbuf-xlib/gdk-pixbuf-xlib.h presence... " >&6; }
19014 cat >conftest.$ac_ext <<_ACEOF
19015 /* confdefs.h.  */
19016 _ACEOF
19017 cat confdefs.h >>conftest.$ac_ext
19018 cat >>conftest.$ac_ext <<_ACEOF
19019 /* end confdefs.h.  */
19020 #include <gdk-pixbuf-xlib/gdk-pixbuf-xlib.h>
19021 _ACEOF
19022 if { (ac_try="$ac_cpp conftest.$ac_ext"
19023 case "(($ac_try" in
19024   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19025   *) ac_try_echo=$ac_try;;
19026 esac
19027 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
19028 $as_echo "$ac_try_echo") >&5
19029   (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
19030   ac_status=$?
19031   grep -v '^ *+' conftest.er1 >conftest.err
19032   rm -rf conftest.er1
19033   cat conftest.err >&5
19034   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
19035   (exit $ac_status); } >/dev/null && {
19036          test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
19037          test ! -s conftest.err
19038        }; then
19039   ac_header_preproc=yes
19040 else
19041   $as_echo "$as_me: failed program was:" >&5
19042 sed 's/^/| /' conftest.$ac_ext >&5
19043
19044   ac_header_preproc=no
19045 fi
19046
19047 rm -rf conftest.err conftest.$ac_ext
19048 { $as_echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
19049 $as_echo "$ac_header_preproc" >&6; }
19050
19051 # So?  What about this header?
19052 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
19053   yes:no: )
19054     { $as_echo "$as_me:$LINENO: WARNING: gdk-pixbuf-xlib/gdk-pixbuf-xlib.h: accepted by the compiler, rejected by the preprocessor!" >&5
19055 $as_echo "$as_me: WARNING: gdk-pixbuf-xlib/gdk-pixbuf-xlib.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
19056     { $as_echo "$as_me:$LINENO: WARNING: gdk-pixbuf-xlib/gdk-pixbuf-xlib.h: proceeding with the compiler's result" >&5
19057 $as_echo "$as_me: WARNING: gdk-pixbuf-xlib/gdk-pixbuf-xlib.h: proceeding with the compiler's result" >&2;}
19058     ac_header_preproc=yes
19059     ;;
19060   no:yes:* )
19061     { $as_echo "$as_me:$LINENO: WARNING: gdk-pixbuf-xlib/gdk-pixbuf-xlib.h: present but cannot be compiled" >&5
19062 $as_echo "$as_me: WARNING: gdk-pixbuf-xlib/gdk-pixbuf-xlib.h: present but cannot be compiled" >&2;}
19063     { $as_echo "$as_me:$LINENO: WARNING: gdk-pixbuf-xlib/gdk-pixbuf-xlib.h:     check for missing prerequisite headers?" >&5
19064 $as_echo "$as_me: WARNING: gdk-pixbuf-xlib/gdk-pixbuf-xlib.h:     check for missing prerequisite headers?" >&2;}
19065     { $as_echo "$as_me:$LINENO: WARNING: gdk-pixbuf-xlib/gdk-pixbuf-xlib.h: see the Autoconf documentation" >&5
19066 $as_echo "$as_me: WARNING: gdk-pixbuf-xlib/gdk-pixbuf-xlib.h: see the Autoconf documentation" >&2;}
19067     { $as_echo "$as_me:$LINENO: WARNING: gdk-pixbuf-xlib/gdk-pixbuf-xlib.h:     section \"Present But Cannot Be Compiled\"" >&5
19068 $as_echo "$as_me: WARNING: gdk-pixbuf-xlib/gdk-pixbuf-xlib.h:     section \"Present But Cannot Be Compiled\"" >&2;}
19069     { $as_echo "$as_me:$LINENO: WARNING: gdk-pixbuf-xlib/gdk-pixbuf-xlib.h: proceeding with the preprocessor's result" >&5
19070 $as_echo "$as_me: WARNING: gdk-pixbuf-xlib/gdk-pixbuf-xlib.h: proceeding with the preprocessor's result" >&2;}
19071     { $as_echo "$as_me:$LINENO: WARNING: gdk-pixbuf-xlib/gdk-pixbuf-xlib.h: in the future, the compiler will take precedence" >&5
19072 $as_echo "$as_me: WARNING: gdk-pixbuf-xlib/gdk-pixbuf-xlib.h: in the future, the compiler will take precedence" >&2;}
19073
19074     ;;
19075 esac
19076 { $as_echo "$as_me:$LINENO: checking for gdk-pixbuf-xlib/gdk-pixbuf-xlib.h" >&5
19077 $as_echo_n "checking for gdk-pixbuf-xlib/gdk-pixbuf-xlib.h... " >&6; }
19078 if test "${ac_cv_header_gdk_pixbuf_xlib_gdk_pixbuf_xlib_h+set}" = set; then
19079   $as_echo_n "(cached) " >&6
19080 else
19081   ac_cv_header_gdk_pixbuf_xlib_gdk_pixbuf_xlib_h=$ac_header_preproc
19082 fi
19083 { $as_echo "$as_me:$LINENO: result: $ac_cv_header_gdk_pixbuf_xlib_gdk_pixbuf_xlib_h" >&5
19084 $as_echo "$ac_cv_header_gdk_pixbuf_xlib_gdk_pixbuf_xlib_h" >&6; }
19085
19086 fi
19087 if test "x$ac_cv_header_gdk_pixbuf_xlib_gdk_pixbuf_xlib_h" = x""yes; then
19088   have_gdk_pixbuf=yes
19089                            gdk_pixbuf_halfassed=no
19090 fi
19091
19092
19093   CPPFLAGS="$ac_save_CPPFLAGS"
19094       fi
19095     fi
19096     CPPFLAGS="$ac_save_gdk_pixbuf_CPPFLAGS"
19097   fi
19098
19099   if test "$have_gdk_pixbuf" = yes; then
19100     # we have the headers, now check for the libraries
19101     have_gdk_pixbuf=no
19102     gdk_pixbuf_halfassed=yes
19103
19104     { $as_echo "$as_me:$LINENO: result: checking for gdk_pixbuf usability..." >&5
19105 $as_echo "checking for gdk_pixbuf usability..." >&6; }
19106
19107     # library A...
19108
19109   ac_save_CPPFLAGS="$CPPFLAGS"
19110   ac_save_LDFLAGS="$LDFLAGS"
19111 #  ac_save_LIBS="$LIBS"
19112
19113   if test \! -z "$includedir" ; then
19114     CPPFLAGS="$CPPFLAGS -I$includedir"
19115   fi
19116   # note: $X_CFLAGS includes $x_includes
19117   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
19118
19119   if test \! -z "$libdir" ; then
19120     LDFLAGS="$LDFLAGS -L$libdir"
19121   fi
19122   # note: $X_LIBS includes $x_libraries
19123   LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
19124
19125   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
19126   LDFLAGS=`eval eval eval eval eval eval eval eval eval echo $LDFLAGS`
19127   { $as_echo "$as_me:$LINENO: checking for gdk_pixbuf_new_from_file in -lc" >&5
19128 $as_echo_n "checking for gdk_pixbuf_new_from_file in -lc... " >&6; }
19129 if test "${ac_cv_lib_c_gdk_pixbuf_new_from_file+set}" = set; then
19130   $as_echo_n "(cached) " >&6
19131 else
19132   ac_check_lib_save_LIBS=$LIBS
19133 LIBS="-lc $ac_gdk_pixbuf_config_libs -lX11 -lXext -lm $LIBS"
19134 cat >conftest.$ac_ext <<_ACEOF
19135 /* confdefs.h.  */
19136 _ACEOF
19137 cat confdefs.h >>conftest.$ac_ext
19138 cat >>conftest.$ac_ext <<_ACEOF
19139 /* end confdefs.h.  */
19140
19141 /* Override any GCC internal prototype to avoid an error.
19142    Use char because int might match the return type of a GCC
19143    builtin and then its argument prototype would still apply.  */
19144 #ifdef __cplusplus
19145 extern "C"
19146 #endif
19147 char gdk_pixbuf_new_from_file ();
19148 int
19149 main ()
19150 {
19151 return gdk_pixbuf_new_from_file ();
19152   ;
19153   return 0;
19154 }
19155 _ACEOF
19156 rm -rf conftest.$ac_objext conftest$ac_exeext
19157 if { (ac_try="$ac_link"
19158 case "(($ac_try" in
19159   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19160   *) ac_try_echo=$ac_try;;
19161 esac
19162 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
19163 $as_echo "$ac_try_echo") >&5
19164   (eval "$ac_link") 2>conftest.er1
19165   ac_status=$?
19166   grep -v '^ *+' conftest.er1 >conftest.err
19167   rm -rf conftest.er1
19168   cat conftest.err >&5
19169   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
19170   (exit $ac_status); } && {
19171          test -z "$ac_c_werror_flag" ||
19172          test ! -s conftest.err
19173        } && test -s conftest$ac_exeext && {
19174          test "$cross_compiling" = yes ||
19175          $as_test_x conftest$ac_exeext
19176        }; then
19177   ac_cv_lib_c_gdk_pixbuf_new_from_file=yes
19178 else
19179   $as_echo "$as_me: failed program was:" >&5
19180 sed 's/^/| /' conftest.$ac_ext >&5
19181
19182         ac_cv_lib_c_gdk_pixbuf_new_from_file=no
19183 fi
19184
19185 rm -rf conftest.dSYM
19186 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
19187       conftest$ac_exeext conftest.$ac_ext
19188 LIBS=$ac_check_lib_save_LIBS
19189 fi
19190 { $as_echo "$as_me:$LINENO: result: $ac_cv_lib_c_gdk_pixbuf_new_from_file" >&5
19191 $as_echo "$ac_cv_lib_c_gdk_pixbuf_new_from_file" >&6; }
19192 if test "x$ac_cv_lib_c_gdk_pixbuf_new_from_file" = x""yes; then
19193   have_gdk_pixbuf=yes
19194 fi
19195
19196   CPPFLAGS="$ac_save_CPPFLAGS"
19197   LDFLAGS="$ac_save_LDFLAGS"
19198 #  LIBS="$ac_save_LIBS"
19199
19200     # library B...
19201     if test "$have_gdk_pixbuf" = yes; then
19202       have_gdk_pixbuf=no
19203
19204   ac_save_CPPFLAGS="$CPPFLAGS"
19205   ac_save_LDFLAGS="$LDFLAGS"
19206 #  ac_save_LIBS="$LIBS"
19207
19208   if test \! -z "$includedir" ; then
19209     CPPFLAGS="$CPPFLAGS -I$includedir"
19210   fi
19211   # note: $X_CFLAGS includes $x_includes
19212   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
19213
19214   if test \! -z "$libdir" ; then
19215     LDFLAGS="$LDFLAGS -L$libdir"
19216   fi
19217   # note: $X_LIBS includes $x_libraries
19218   LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
19219
19220   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
19221   LDFLAGS=`eval eval eval eval eval eval eval eval eval echo $LDFLAGS`
19222   { $as_echo "$as_me:$LINENO: checking for gdk_pixbuf_xlib_init in -lc" >&5
19223 $as_echo_n "checking for gdk_pixbuf_xlib_init in -lc... " >&6; }
19224 if test "${ac_cv_lib_c_gdk_pixbuf_xlib_init+set}" = set; then
19225   $as_echo_n "(cached) " >&6
19226 else
19227   ac_check_lib_save_LIBS=$LIBS
19228 LIBS="-lc $ac_gdk_pixbuf_config_libs -lX11 -lXext -lm $LIBS"
19229 cat >conftest.$ac_ext <<_ACEOF
19230 /* confdefs.h.  */
19231 _ACEOF
19232 cat confdefs.h >>conftest.$ac_ext
19233 cat >>conftest.$ac_ext <<_ACEOF
19234 /* end confdefs.h.  */
19235
19236 /* Override any GCC internal prototype to avoid an error.
19237    Use char because int might match the return type of a GCC
19238    builtin and then its argument prototype would still apply.  */
19239 #ifdef __cplusplus
19240 extern "C"
19241 #endif
19242 char gdk_pixbuf_xlib_init ();
19243 int
19244 main ()
19245 {
19246 return gdk_pixbuf_xlib_init ();
19247   ;
19248   return 0;
19249 }
19250 _ACEOF
19251 rm -rf conftest.$ac_objext conftest$ac_exeext
19252 if { (ac_try="$ac_link"
19253 case "(($ac_try" in
19254   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19255   *) ac_try_echo=$ac_try;;
19256 esac
19257 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
19258 $as_echo "$ac_try_echo") >&5
19259   (eval "$ac_link") 2>conftest.er1
19260   ac_status=$?
19261   grep -v '^ *+' conftest.er1 >conftest.err
19262   rm -rf conftest.er1
19263   cat conftest.err >&5
19264   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
19265   (exit $ac_status); } && {
19266          test -z "$ac_c_werror_flag" ||
19267          test ! -s conftest.err
19268        } && test -s conftest$ac_exeext && {
19269          test "$cross_compiling" = yes ||
19270          $as_test_x conftest$ac_exeext
19271        }; then
19272   ac_cv_lib_c_gdk_pixbuf_xlib_init=yes
19273 else
19274   $as_echo "$as_me: failed program was:" >&5
19275 sed 's/^/| /' conftest.$ac_ext >&5
19276
19277         ac_cv_lib_c_gdk_pixbuf_xlib_init=no
19278 fi
19279
19280 rm -rf conftest.dSYM
19281 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
19282       conftest$ac_exeext conftest.$ac_ext
19283 LIBS=$ac_check_lib_save_LIBS
19284 fi
19285 { $as_echo "$as_me:$LINENO: result: $ac_cv_lib_c_gdk_pixbuf_xlib_init" >&5
19286 $as_echo "$ac_cv_lib_c_gdk_pixbuf_xlib_init" >&6; }
19287 if test "x$ac_cv_lib_c_gdk_pixbuf_xlib_init" = x""yes; then
19288   have_gdk_pixbuf=yes
19289                       gdk_pixbuf_halfassed=no
19290 fi
19291
19292   CPPFLAGS="$ac_save_CPPFLAGS"
19293   LDFLAGS="$ac_save_LDFLAGS"
19294 #  LIBS="$ac_save_LIBS"
19295
19296     fi
19297   fi
19298
19299   if test "$have_gdk_pixbuf" = yes; then
19300     INCLUDES="$INCLUDES $ac_gdk_pixbuf_config_cflags"
19301     XPM_LIBS="$ac_gdk_pixbuf_config_libs"
19302     cat >>confdefs.h <<\_ACEOF
19303 #define HAVE_GDK_PIXBUF 1
19304 _ACEOF
19305
19306   else
19307     { $as_echo "$as_me:$LINENO: result: checking for gdk_pixbuf usability... no" >&5
19308 $as_echo "checking for gdk_pixbuf usability... no" >&6; }
19309   fi
19310
19311   if test "$have_gdk_pixbuf" = yes; then
19312
19313   ac_save_CPPFLAGS="$CPPFLAGS"
19314   ac_save_LDFLAGS="$LDFLAGS"
19315 #  ac_save_LIBS="$LIBS"
19316
19317   if test \! -z "$includedir" ; then
19318     CPPFLAGS="$CPPFLAGS -I$includedir"
19319   fi
19320   # note: $X_CFLAGS includes $x_includes
19321   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
19322
19323   if test \! -z "$libdir" ; then
19324     LDFLAGS="$LDFLAGS -L$libdir"
19325   fi
19326   # note: $X_LIBS includes $x_libraries
19327   LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
19328
19329   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
19330   LDFLAGS=`eval eval eval eval eval eval eval eval eval echo $LDFLAGS`
19331   { $as_echo "$as_me:$LINENO: checking for gdk_pixbuf_apply_embedded_orientation in -lc" >&5
19332 $as_echo_n "checking for gdk_pixbuf_apply_embedded_orientation in -lc... " >&6; }
19333 if test "${ac_cv_lib_c_gdk_pixbuf_apply_embedded_orientation+set}" = set; then
19334   $as_echo_n "(cached) " >&6
19335 else
19336   ac_check_lib_save_LIBS=$LIBS
19337 LIBS="-lc $ac_gdk_pixbuf_config_libs -lX11 -lXext -lm $LIBS"
19338 cat >conftest.$ac_ext <<_ACEOF
19339 /* confdefs.h.  */
19340 _ACEOF
19341 cat confdefs.h >>conftest.$ac_ext
19342 cat >>conftest.$ac_ext <<_ACEOF
19343 /* end confdefs.h.  */
19344
19345 /* Override any GCC internal prototype to avoid an error.
19346    Use char because int might match the return type of a GCC
19347    builtin and then its argument prototype would still apply.  */
19348 #ifdef __cplusplus
19349 extern "C"
19350 #endif
19351 char gdk_pixbuf_apply_embedded_orientation ();
19352 int
19353 main ()
19354 {
19355 return gdk_pixbuf_apply_embedded_orientation ();
19356   ;
19357   return 0;
19358 }
19359 _ACEOF
19360 rm -rf conftest.$ac_objext conftest$ac_exeext
19361 if { (ac_try="$ac_link"
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_link") 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); } && {
19375          test -z "$ac_c_werror_flag" ||
19376          test ! -s conftest.err
19377        } && test -s conftest$ac_exeext && {
19378          test "$cross_compiling" = yes ||
19379          $as_test_x conftest$ac_exeext
19380        }; then
19381   ac_cv_lib_c_gdk_pixbuf_apply_embedded_orientation=yes
19382 else
19383   $as_echo "$as_me: failed program was:" >&5
19384 sed 's/^/| /' conftest.$ac_ext >&5
19385
19386         ac_cv_lib_c_gdk_pixbuf_apply_embedded_orientation=no
19387 fi
19388
19389 rm -rf conftest.dSYM
19390 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
19391       conftest$ac_exeext conftest.$ac_ext
19392 LIBS=$ac_check_lib_save_LIBS
19393 fi
19394 { $as_echo "$as_me:$LINENO: result: $ac_cv_lib_c_gdk_pixbuf_apply_embedded_orientation" >&5
19395 $as_echo "$ac_cv_lib_c_gdk_pixbuf_apply_embedded_orientation" >&6; }
19396 if test "x$ac_cv_lib_c_gdk_pixbuf_apply_embedded_orientation" = x""yes; then
19397   cat >>confdefs.h <<\_ACEOF
19398 #define HAVE_GDK_PIXBUF_APPLY_EMBEDDED_ORIENTATION 1
19399 _ACEOF
19400
19401 fi
19402
19403   CPPFLAGS="$ac_save_CPPFLAGS"
19404   LDFLAGS="$ac_save_LDFLAGS"
19405 #  LIBS="$ac_save_LIBS"
19406
19407   fi
19408 fi
19409
19410
19411 ###############################################################################
19412 #
19413 #       Check for -lXpm.
19414 #
19415 ###############################################################################
19416
19417 have_xpm=no
19418 with_xpm_req=unspecified
19419
19420 # Check whether --with-xpm was given.
19421 if test "${with_xpm+set}" = set; then
19422   withval=$with_xpm; with_xpm="$withval"; with_xpm_req="$withval"
19423 else
19424   with_xpm=yes
19425 fi
19426
19427
19428
19429    case "$with_xpm" in
19430     yes) ;;
19431     no)  ;;
19432
19433     /*)
19434      { $as_echo "$as_me:$LINENO: checking for XPM headers" >&5
19435 $as_echo_n "checking for XPM headers... " >&6; }
19436      d=$with_xpm/include
19437      if test -d $d; then
19438        X_CFLAGS="-I$d $X_CFLAGS"
19439        { $as_echo "$as_me:$LINENO: result: $d" >&5
19440 $as_echo "$d" >&6; }
19441      else
19442        { $as_echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
19443 $as_echo "not found ($d: no such directory)" >&6; }
19444      fi
19445
19446      { $as_echo "$as_me:$LINENO: checking for XPM libs" >&5
19447 $as_echo_n "checking for XPM libs... " >&6; }
19448      d=$with_xpm/lib
19449      if test -d $d; then
19450        X_LIBS="-L$d $X_LIBS"
19451        { $as_echo "$as_me:$LINENO: result: $d" >&5
19452 $as_echo "$d" >&6; }
19453      else
19454        { $as_echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
19455 $as_echo "not found ($d: no such directory)" >&6; }
19456      fi
19457
19458      # replace the directory string with "yes".
19459      with_xpm_req="yes"
19460      with_xpm=$with_xpm_req
19461      ;;
19462
19463     *)
19464      echo ""
19465      echo "error: argument to --with-xpm must be \"yes\", \"no\", or a directory."
19466      echo "       If it is a directory, then \`DIR/include' will be added to"
19467      echo "       the -I list, and \`DIR/lib' will be added to the -L list."
19468      exit 1
19469      ;;
19470    esac
19471
19472
19473 if test "$with_xpm" = yes; then
19474
19475   ac_save_CPPFLAGS="$CPPFLAGS"
19476   if test \! -z "$includedir" ; then
19477     CPPFLAGS="$CPPFLAGS -I$includedir"
19478   fi
19479   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
19480   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
19481   { $as_echo "$as_me:$LINENO: checking for X11/xpm.h" >&5
19482 $as_echo_n "checking for X11/xpm.h... " >&6; }
19483 if test "${ac_cv_header_X11_xpm_h+set}" = set; then
19484   $as_echo_n "(cached) " >&6
19485 else
19486   cat >conftest.$ac_ext <<_ACEOF
19487 /* confdefs.h.  */
19488 _ACEOF
19489 cat confdefs.h >>conftest.$ac_ext
19490 cat >>conftest.$ac_ext <<_ACEOF
19491 /* end confdefs.h.  */
19492 #include <X11/Xlib.h>
19493
19494 #include <X11/xpm.h>
19495 _ACEOF
19496 rm -rf conftest.$ac_objext
19497 if { (ac_try="$ac_compile"
19498 case "(($ac_try" in
19499   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19500   *) ac_try_echo=$ac_try;;
19501 esac
19502 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
19503 $as_echo "$ac_try_echo") >&5
19504   (eval "$ac_compile") 2>conftest.er1
19505   ac_status=$?
19506   grep -v '^ *+' conftest.er1 >conftest.err
19507   rm -rf conftest.er1
19508   cat conftest.err >&5
19509   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
19510   (exit $ac_status); } && {
19511          test -z "$ac_c_werror_flag" ||
19512          test ! -s conftest.err
19513        } && test -s conftest.$ac_objext; then
19514   ac_cv_header_X11_xpm_h=yes
19515 else
19516   $as_echo "$as_me: failed program was:" >&5
19517 sed 's/^/| /' conftest.$ac_ext >&5
19518
19519         ac_cv_header_X11_xpm_h=no
19520 fi
19521
19522 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
19523 fi
19524 { $as_echo "$as_me:$LINENO: result: $ac_cv_header_X11_xpm_h" >&5
19525 $as_echo "$ac_cv_header_X11_xpm_h" >&6; }
19526 if test "x$ac_cv_header_X11_xpm_h" = x""yes; then
19527   have_xpm=yes
19528                     cat >>confdefs.h <<\_ACEOF
19529 #define HAVE_XPM 1
19530 _ACEOF
19531
19532                     XPM_LIBS="-lXpm $XPM_LIBS"
19533 fi
19534
19535
19536   CPPFLAGS="$ac_save_CPPFLAGS"
19537 elif test "$with_xpm" != no; then
19538   echo "error: must be yes or no: --with-xpm=$with_xpm"
19539   exit 1
19540 fi
19541
19542 # See comment near $motif_requires_xpm, above.
19543 # Need to do this here, after both Motif and XPM have been checked for.
19544 #
19545 if test "$have_motif" = yes -a "$have_xpm" = yes ; then
19546   if test "$motif_requires_xpm" = yes ; then
19547     MOTIF_LIBS="$MOTIF_LIBS $XPM_LIBS"
19548   fi
19549 fi
19550
19551 if test "$XPM_LIBS" = "" ; then
19552   XPM_LIBS=$(MINIXPM)
19553 fi
19554
19555
19556 ###############################################################################
19557 #
19558 #       Check for -ljpeg
19559 #
19560 ###############################################################################
19561
19562 have_jpeg=no
19563 with_jpeg_req=unspecified
19564 jpeg_halfassed=no
19565
19566 # Check whether --with-jpeg was given.
19567 if test "${with_jpeg+set}" = set; then
19568   withval=$with_jpeg; with_jpeg="$withval"; with_jpeg_req="$withval"
19569 else
19570   with_jpeg=yes
19571 fi
19572
19573
19574
19575    case "$with_jpeg" in
19576     yes) ;;
19577     no)  ;;
19578
19579     /*)
19580      { $as_echo "$as_me:$LINENO: checking for JPEG headers" >&5
19581 $as_echo_n "checking for JPEG headers... " >&6; }
19582      d=$with_jpeg/include
19583      if test -d $d; then
19584        X_CFLAGS="-I$d $X_CFLAGS"
19585        { $as_echo "$as_me:$LINENO: result: $d" >&5
19586 $as_echo "$d" >&6; }
19587      else
19588        { $as_echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
19589 $as_echo "not found ($d: no such directory)" >&6; }
19590      fi
19591
19592      { $as_echo "$as_me:$LINENO: checking for JPEG libs" >&5
19593 $as_echo_n "checking for JPEG libs... " >&6; }
19594      d=$with_jpeg/lib
19595      if test -d $d; then
19596        X_LIBS="-L$d $X_LIBS"
19597        { $as_echo "$as_me:$LINENO: result: $d" >&5
19598 $as_echo "$d" >&6; }
19599      else
19600        { $as_echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
19601 $as_echo "not found ($d: no such directory)" >&6; }
19602      fi
19603
19604      # replace the directory string with "yes".
19605      with_jpeg_req="yes"
19606      with_jpeg=$with_jpeg_req
19607      ;;
19608
19609     *)
19610      echo ""
19611      echo "error: argument to --with-jpeg must be \"yes\", \"no\", or a directory."
19612      echo "       If it is a directory, then \`DIR/include' will be added to"
19613      echo "       the -I list, and \`DIR/lib' will be added to the -L list."
19614      exit 1
19615      ;;
19616    esac
19617
19618
19619 if test "$with_jpeg" != yes -a "$with_jpeg" != no ; then
19620   echo "error: must be yes or no: --with-jpeg=$with_jpeg"
19621   exit 1
19622 fi
19623
19624 if test "$with_jpeg" = yes; then
19625
19626   have_jpeg=no
19627
19628   ac_save_CPPFLAGS="$CPPFLAGS"
19629   if test \! -z "$includedir" ; then
19630     CPPFLAGS="$CPPFLAGS -I$includedir"
19631   fi
19632   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
19633   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
19634   if test "${ac_cv_header_jpeglib_h+set}" = set; then
19635   { $as_echo "$as_me:$LINENO: checking for jpeglib.h" >&5
19636 $as_echo_n "checking for jpeglib.h... " >&6; }
19637 if test "${ac_cv_header_jpeglib_h+set}" = set; then
19638   $as_echo_n "(cached) " >&6
19639 fi
19640 { $as_echo "$as_me:$LINENO: result: $ac_cv_header_jpeglib_h" >&5
19641 $as_echo "$ac_cv_header_jpeglib_h" >&6; }
19642 else
19643   # Is the header compilable?
19644 { $as_echo "$as_me:$LINENO: checking jpeglib.h usability" >&5
19645 $as_echo_n "checking jpeglib.h usability... " >&6; }
19646 cat >conftest.$ac_ext <<_ACEOF
19647 /* confdefs.h.  */
19648 _ACEOF
19649 cat confdefs.h >>conftest.$ac_ext
19650 cat >>conftest.$ac_ext <<_ACEOF
19651 /* end confdefs.h.  */
19652 $ac_includes_default
19653 #include <jpeglib.h>
19654 _ACEOF
19655 rm -rf conftest.$ac_objext
19656 if { (ac_try="$ac_compile"
19657 case "(($ac_try" in
19658   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19659   *) ac_try_echo=$ac_try;;
19660 esac
19661 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
19662 $as_echo "$ac_try_echo") >&5
19663   (eval "$ac_compile") 2>conftest.er1
19664   ac_status=$?
19665   grep -v '^ *+' conftest.er1 >conftest.err
19666   rm -rf conftest.er1
19667   cat conftest.err >&5
19668   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
19669   (exit $ac_status); } && {
19670          test -z "$ac_c_werror_flag" ||
19671          test ! -s conftest.err
19672        } && test -s conftest.$ac_objext; then
19673   ac_header_compiler=yes
19674 else
19675   $as_echo "$as_me: failed program was:" >&5
19676 sed 's/^/| /' conftest.$ac_ext >&5
19677
19678         ac_header_compiler=no
19679 fi
19680
19681 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
19682 { $as_echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
19683 $as_echo "$ac_header_compiler" >&6; }
19684
19685 # Is the header present?
19686 { $as_echo "$as_me:$LINENO: checking jpeglib.h presence" >&5
19687 $as_echo_n "checking jpeglib.h presence... " >&6; }
19688 cat >conftest.$ac_ext <<_ACEOF
19689 /* confdefs.h.  */
19690 _ACEOF
19691 cat confdefs.h >>conftest.$ac_ext
19692 cat >>conftest.$ac_ext <<_ACEOF
19693 /* end confdefs.h.  */
19694 #include <jpeglib.h>
19695 _ACEOF
19696 if { (ac_try="$ac_cpp conftest.$ac_ext"
19697 case "(($ac_try" in
19698   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19699   *) ac_try_echo=$ac_try;;
19700 esac
19701 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
19702 $as_echo "$ac_try_echo") >&5
19703   (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
19704   ac_status=$?
19705   grep -v '^ *+' conftest.er1 >conftest.err
19706   rm -rf conftest.er1
19707   cat conftest.err >&5
19708   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
19709   (exit $ac_status); } >/dev/null && {
19710          test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
19711          test ! -s conftest.err
19712        }; then
19713   ac_header_preproc=yes
19714 else
19715   $as_echo "$as_me: failed program was:" >&5
19716 sed 's/^/| /' conftest.$ac_ext >&5
19717
19718   ac_header_preproc=no
19719 fi
19720
19721 rm -rf conftest.err conftest.$ac_ext
19722 { $as_echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
19723 $as_echo "$ac_header_preproc" >&6; }
19724
19725 # So?  What about this header?
19726 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
19727   yes:no: )
19728     { $as_echo "$as_me:$LINENO: WARNING: jpeglib.h: accepted by the compiler, rejected by the preprocessor!" >&5
19729 $as_echo "$as_me: WARNING: jpeglib.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
19730     { $as_echo "$as_me:$LINENO: WARNING: jpeglib.h: proceeding with the compiler's result" >&5
19731 $as_echo "$as_me: WARNING: jpeglib.h: proceeding with the compiler's result" >&2;}
19732     ac_header_preproc=yes
19733     ;;
19734   no:yes:* )
19735     { $as_echo "$as_me:$LINENO: WARNING: jpeglib.h: present but cannot be compiled" >&5
19736 $as_echo "$as_me: WARNING: jpeglib.h: present but cannot be compiled" >&2;}
19737     { $as_echo "$as_me:$LINENO: WARNING: jpeglib.h:     check for missing prerequisite headers?" >&5
19738 $as_echo "$as_me: WARNING: jpeglib.h:     check for missing prerequisite headers?" >&2;}
19739     { $as_echo "$as_me:$LINENO: WARNING: jpeglib.h: see the Autoconf documentation" >&5
19740 $as_echo "$as_me: WARNING: jpeglib.h: see the Autoconf documentation" >&2;}
19741     { $as_echo "$as_me:$LINENO: WARNING: jpeglib.h:     section \"Present But Cannot Be Compiled\"" >&5
19742 $as_echo "$as_me: WARNING: jpeglib.h:     section \"Present But Cannot Be Compiled\"" >&2;}
19743     { $as_echo "$as_me:$LINENO: WARNING: jpeglib.h: proceeding with the preprocessor's result" >&5
19744 $as_echo "$as_me: WARNING: jpeglib.h: proceeding with the preprocessor's result" >&2;}
19745     { $as_echo "$as_me:$LINENO: WARNING: jpeglib.h: in the future, the compiler will take precedence" >&5
19746 $as_echo "$as_me: WARNING: jpeglib.h: in the future, the compiler will take precedence" >&2;}
19747
19748     ;;
19749 esac
19750 { $as_echo "$as_me:$LINENO: checking for jpeglib.h" >&5
19751 $as_echo_n "checking for jpeglib.h... " >&6; }
19752 if test "${ac_cv_header_jpeglib_h+set}" = set; then
19753   $as_echo_n "(cached) " >&6
19754 else
19755   ac_cv_header_jpeglib_h=$ac_header_preproc
19756 fi
19757 { $as_echo "$as_me:$LINENO: result: $ac_cv_header_jpeglib_h" >&5
19758 $as_echo "$ac_cv_header_jpeglib_h" >&6; }
19759
19760 fi
19761 if test "x$ac_cv_header_jpeglib_h" = x""yes; then
19762   have_jpeg=yes
19763 fi
19764
19765
19766   CPPFLAGS="$ac_save_CPPFLAGS"
19767
19768   if test "$have_jpeg" = yes; then
19769     # we have the header, now check for the library
19770     have_jpeg=no
19771     jpeg_halfassed=yes
19772
19773   ac_save_CPPFLAGS="$CPPFLAGS"
19774   ac_save_LDFLAGS="$LDFLAGS"
19775 #  ac_save_LIBS="$LIBS"
19776
19777   if test \! -z "$includedir" ; then
19778     CPPFLAGS="$CPPFLAGS -I$includedir"
19779   fi
19780   # note: $X_CFLAGS includes $x_includes
19781   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
19782
19783   if test \! -z "$libdir" ; then
19784     LDFLAGS="$LDFLAGS -L$libdir"
19785   fi
19786   # note: $X_LIBS includes $x_libraries
19787   LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
19788
19789   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
19790   LDFLAGS=`eval eval eval eval eval eval eval eval eval echo $LDFLAGS`
19791   { $as_echo "$as_me:$LINENO: checking for jpeg_start_compress in -ljpeg" >&5
19792 $as_echo_n "checking for jpeg_start_compress in -ljpeg... " >&6; }
19793 if test "${ac_cv_lib_jpeg_jpeg_start_compress+set}" = set; then
19794   $as_echo_n "(cached) " >&6
19795 else
19796   ac_check_lib_save_LIBS=$LIBS
19797 LIBS="-ljpeg  $LIBS"
19798 cat >conftest.$ac_ext <<_ACEOF
19799 /* confdefs.h.  */
19800 _ACEOF
19801 cat confdefs.h >>conftest.$ac_ext
19802 cat >>conftest.$ac_ext <<_ACEOF
19803 /* end confdefs.h.  */
19804
19805 /* Override any GCC internal prototype to avoid an error.
19806    Use char because int might match the return type of a GCC
19807    builtin and then its argument prototype would still apply.  */
19808 #ifdef __cplusplus
19809 extern "C"
19810 #endif
19811 char jpeg_start_compress ();
19812 int
19813 main ()
19814 {
19815 return jpeg_start_compress ();
19816   ;
19817   return 0;
19818 }
19819 _ACEOF
19820 rm -rf conftest.$ac_objext conftest$ac_exeext
19821 if { (ac_try="$ac_link"
19822 case "(($ac_try" in
19823   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19824   *) ac_try_echo=$ac_try;;
19825 esac
19826 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
19827 $as_echo "$ac_try_echo") >&5
19828   (eval "$ac_link") 2>conftest.er1
19829   ac_status=$?
19830   grep -v '^ *+' conftest.er1 >conftest.err
19831   rm -rf conftest.er1
19832   cat conftest.err >&5
19833   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
19834   (exit $ac_status); } && {
19835          test -z "$ac_c_werror_flag" ||
19836          test ! -s conftest.err
19837        } && test -s conftest$ac_exeext && {
19838          test "$cross_compiling" = yes ||
19839          $as_test_x conftest$ac_exeext
19840        }; then
19841   ac_cv_lib_jpeg_jpeg_start_compress=yes
19842 else
19843   $as_echo "$as_me: failed program was:" >&5
19844 sed 's/^/| /' conftest.$ac_ext >&5
19845
19846         ac_cv_lib_jpeg_jpeg_start_compress=no
19847 fi
19848
19849 rm -rf conftest.dSYM
19850 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
19851       conftest$ac_exeext conftest.$ac_ext
19852 LIBS=$ac_check_lib_save_LIBS
19853 fi
19854 { $as_echo "$as_me:$LINENO: result: $ac_cv_lib_jpeg_jpeg_start_compress" >&5
19855 $as_echo "$ac_cv_lib_jpeg_jpeg_start_compress" >&6; }
19856 if test "x$ac_cv_lib_jpeg_jpeg_start_compress" = x""yes; then
19857   have_jpeg=yes
19858                     jpeg_halfassed=no
19859                     JPEG_LIBS="-ljpeg"
19860                     cat >>confdefs.h <<\_ACEOF
19861 #define HAVE_JPEGLIB 1
19862 _ACEOF
19863
19864 fi
19865
19866   CPPFLAGS="$ac_save_CPPFLAGS"
19867   LDFLAGS="$ac_save_LDFLAGS"
19868 #  LIBS="$ac_save_LIBS"
19869
19870   fi
19871 fi
19872
19873
19874 ###############################################################################
19875 #
19876 #       Check for pty support: this allows 'phosphor' and 'apple2'
19877 #       to run curses-based programs, or be used as terminal windows.
19878 #
19879 ###############################################################################
19880
19881 PTY_LIBS=
19882
19883
19884 for ac_header in pty.h util.h
19885 do
19886 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
19887 if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
19888   { $as_echo "$as_me:$LINENO: checking for $ac_header" >&5
19889 $as_echo_n "checking for $ac_header... " >&6; }
19890 if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
19891   $as_echo_n "(cached) " >&6
19892 fi
19893 ac_res=`eval 'as_val=${'$as_ac_Header'}
19894                  $as_echo "$as_val"'`
19895                { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
19896 $as_echo "$ac_res" >&6; }
19897 else
19898   # Is the header compilable?
19899 { $as_echo "$as_me:$LINENO: checking $ac_header usability" >&5
19900 $as_echo_n "checking $ac_header usability... " >&6; }
19901 cat >conftest.$ac_ext <<_ACEOF
19902 /* confdefs.h.  */
19903 _ACEOF
19904 cat confdefs.h >>conftest.$ac_ext
19905 cat >>conftest.$ac_ext <<_ACEOF
19906 /* end confdefs.h.  */
19907 $ac_includes_default
19908 #include <$ac_header>
19909 _ACEOF
19910 rm -rf conftest.$ac_objext
19911 if { (ac_try="$ac_compile"
19912 case "(($ac_try" in
19913   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19914   *) ac_try_echo=$ac_try;;
19915 esac
19916 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
19917 $as_echo "$ac_try_echo") >&5
19918   (eval "$ac_compile") 2>conftest.er1
19919   ac_status=$?
19920   grep -v '^ *+' conftest.er1 >conftest.err
19921   rm -rf conftest.er1
19922   cat conftest.err >&5
19923   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
19924   (exit $ac_status); } && {
19925          test -z "$ac_c_werror_flag" ||
19926          test ! -s conftest.err
19927        } && test -s conftest.$ac_objext; then
19928   ac_header_compiler=yes
19929 else
19930   $as_echo "$as_me: failed program was:" >&5
19931 sed 's/^/| /' conftest.$ac_ext >&5
19932
19933         ac_header_compiler=no
19934 fi
19935
19936 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
19937 { $as_echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
19938 $as_echo "$ac_header_compiler" >&6; }
19939
19940 # Is the header present?
19941 { $as_echo "$as_me:$LINENO: checking $ac_header presence" >&5
19942 $as_echo_n "checking $ac_header presence... " >&6; }
19943 cat >conftest.$ac_ext <<_ACEOF
19944 /* confdefs.h.  */
19945 _ACEOF
19946 cat confdefs.h >>conftest.$ac_ext
19947 cat >>conftest.$ac_ext <<_ACEOF
19948 /* end confdefs.h.  */
19949 #include <$ac_header>
19950 _ACEOF
19951 if { (ac_try="$ac_cpp conftest.$ac_ext"
19952 case "(($ac_try" in
19953   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19954   *) ac_try_echo=$ac_try;;
19955 esac
19956 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
19957 $as_echo "$ac_try_echo") >&5
19958   (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
19959   ac_status=$?
19960   grep -v '^ *+' conftest.er1 >conftest.err
19961   rm -rf conftest.er1
19962   cat conftest.err >&5
19963   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
19964   (exit $ac_status); } >/dev/null && {
19965          test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
19966          test ! -s conftest.err
19967        }; then
19968   ac_header_preproc=yes
19969 else
19970   $as_echo "$as_me: failed program was:" >&5
19971 sed 's/^/| /' conftest.$ac_ext >&5
19972
19973   ac_header_preproc=no
19974 fi
19975
19976 rm -rf conftest.err conftest.$ac_ext
19977 { $as_echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
19978 $as_echo "$ac_header_preproc" >&6; }
19979
19980 # So?  What about this header?
19981 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
19982   yes:no: )
19983     { $as_echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
19984 $as_echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
19985     { $as_echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
19986 $as_echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
19987     ac_header_preproc=yes
19988     ;;
19989   no:yes:* )
19990     { $as_echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
19991 $as_echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
19992     { $as_echo "$as_me:$LINENO: WARNING: $ac_header:     check for missing prerequisite headers?" >&5
19993 $as_echo "$as_me: WARNING: $ac_header:     check for missing prerequisite headers?" >&2;}
19994     { $as_echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
19995 $as_echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
19996     { $as_echo "$as_me:$LINENO: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&5
19997 $as_echo "$as_me: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&2;}
19998     { $as_echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
19999 $as_echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
20000     { $as_echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
20001 $as_echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
20002
20003     ;;
20004 esac
20005 { $as_echo "$as_me:$LINENO: checking for $ac_header" >&5
20006 $as_echo_n "checking for $ac_header... " >&6; }
20007 if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
20008   $as_echo_n "(cached) " >&6
20009 else
20010   eval "$as_ac_Header=\$ac_header_preproc"
20011 fi
20012 ac_res=`eval 'as_val=${'$as_ac_Header'}
20013                  $as_echo "$as_val"'`
20014                { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
20015 $as_echo "$ac_res" >&6; }
20016
20017 fi
20018 as_val=`eval 'as_val=${'$as_ac_Header'}
20019                  $as_echo "$as_val"'`
20020    if test "x$as_val" = x""yes; then
20021   cat >>confdefs.h <<_ACEOF
20022 #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
20023 _ACEOF
20024
20025 fi
20026
20027 done
20028
20029
20030   ac_save_CPPFLAGS="$CPPFLAGS"
20031   ac_save_LDFLAGS="$LDFLAGS"
20032 #  ac_save_LIBS="$LIBS"
20033
20034   if test \! -z "$includedir" ; then
20035     CPPFLAGS="$CPPFLAGS -I$includedir"
20036   fi
20037   # note: $X_CFLAGS includes $x_includes
20038   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
20039
20040   if test \! -z "$libdir" ; then
20041     LDFLAGS="$LDFLAGS -L$libdir"
20042   fi
20043   # note: $X_LIBS includes $x_libraries
20044   LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
20045
20046   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
20047   LDFLAGS=`eval eval eval eval eval eval eval eval eval echo $LDFLAGS`
20048   { $as_echo "$as_me:$LINENO: checking for forkpty in -lutil" >&5
20049 $as_echo_n "checking for forkpty in -lutil... " >&6; }
20050 if test "${ac_cv_lib_util_forkpty+set}" = set; then
20051   $as_echo_n "(cached) " >&6
20052 else
20053   ac_check_lib_save_LIBS=$LIBS
20054 LIBS="-lutil  $LIBS"
20055 cat >conftest.$ac_ext <<_ACEOF
20056 /* confdefs.h.  */
20057 _ACEOF
20058 cat confdefs.h >>conftest.$ac_ext
20059 cat >>conftest.$ac_ext <<_ACEOF
20060 /* end confdefs.h.  */
20061
20062 /* Override any GCC internal prototype to avoid an error.
20063    Use char because int might match the return type of a GCC
20064    builtin and then its argument prototype would still apply.  */
20065 #ifdef __cplusplus
20066 extern "C"
20067 #endif
20068 char forkpty ();
20069 int
20070 main ()
20071 {
20072 return forkpty ();
20073   ;
20074   return 0;
20075 }
20076 _ACEOF
20077 rm -rf conftest.$ac_objext conftest$ac_exeext
20078 if { (ac_try="$ac_link"
20079 case "(($ac_try" in
20080   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20081   *) ac_try_echo=$ac_try;;
20082 esac
20083 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
20084 $as_echo "$ac_try_echo") >&5
20085   (eval "$ac_link") 2>conftest.er1
20086   ac_status=$?
20087   grep -v '^ *+' conftest.er1 >conftest.err
20088   rm -rf conftest.er1
20089   cat conftest.err >&5
20090   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
20091   (exit $ac_status); } && {
20092          test -z "$ac_c_werror_flag" ||
20093          test ! -s conftest.err
20094        } && test -s conftest$ac_exeext && {
20095          test "$cross_compiling" = yes ||
20096          $as_test_x conftest$ac_exeext
20097        }; then
20098   ac_cv_lib_util_forkpty=yes
20099 else
20100   $as_echo "$as_me: failed program was:" >&5
20101 sed 's/^/| /' conftest.$ac_ext >&5
20102
20103         ac_cv_lib_util_forkpty=no
20104 fi
20105
20106 rm -rf conftest.dSYM
20107 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
20108       conftest$ac_exeext conftest.$ac_ext
20109 LIBS=$ac_check_lib_save_LIBS
20110 fi
20111 { $as_echo "$as_me:$LINENO: result: $ac_cv_lib_util_forkpty" >&5
20112 $as_echo "$ac_cv_lib_util_forkpty" >&6; }
20113 if test "x$ac_cv_lib_util_forkpty" = x""yes; then
20114   PTY_LIBS="-lutil"
20115                 ac_have_forkpty=yes
20116                 cat >>confdefs.h <<\_ACEOF
20117 #define HAVE_FORKPTY 1
20118 _ACEOF
20119
20120 fi
20121
20122   CPPFLAGS="$ac_save_CPPFLAGS"
20123   LDFLAGS="$ac_save_LDFLAGS"
20124 #  LIBS="$ac_save_LIBS"
20125
20126
20127 if test "$ac_have_forkpty" != yes ; then
20128   # we don't need (or have) -lutil on MacOS 10.4.2...
20129
20130   ac_save_CPPFLAGS="$CPPFLAGS"
20131   ac_save_LDFLAGS="$LDFLAGS"
20132 #  ac_save_LIBS="$LIBS"
20133
20134   if test \! -z "$includedir" ; then
20135     CPPFLAGS="$CPPFLAGS -I$includedir"
20136   fi
20137   # note: $X_CFLAGS includes $x_includes
20138   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
20139
20140   if test \! -z "$libdir" ; then
20141     LDFLAGS="$LDFLAGS -L$libdir"
20142   fi
20143   # note: $X_LIBS includes $x_libraries
20144   LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
20145
20146   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
20147   LDFLAGS=`eval eval eval eval eval eval eval eval eval echo $LDFLAGS`
20148   { $as_echo "$as_me:$LINENO: checking for forkpty in -lc" >&5
20149 $as_echo_n "checking for forkpty in -lc... " >&6; }
20150 if test "${ac_cv_lib_c_forkpty+set}" = set; then
20151   $as_echo_n "(cached) " >&6
20152 else
20153   ac_check_lib_save_LIBS=$LIBS
20154 LIBS="-lc  $LIBS"
20155 cat >conftest.$ac_ext <<_ACEOF
20156 /* confdefs.h.  */
20157 _ACEOF
20158 cat confdefs.h >>conftest.$ac_ext
20159 cat >>conftest.$ac_ext <<_ACEOF
20160 /* end confdefs.h.  */
20161
20162 /* Override any GCC internal prototype to avoid an error.
20163    Use char because int might match the return type of a GCC
20164    builtin and then its argument prototype would still apply.  */
20165 #ifdef __cplusplus
20166 extern "C"
20167 #endif
20168 char forkpty ();
20169 int
20170 main ()
20171 {
20172 return forkpty ();
20173   ;
20174   return 0;
20175 }
20176 _ACEOF
20177 rm -rf conftest.$ac_objext conftest$ac_exeext
20178 if { (ac_try="$ac_link"
20179 case "(($ac_try" in
20180   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20181   *) ac_try_echo=$ac_try;;
20182 esac
20183 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
20184 $as_echo "$ac_try_echo") >&5
20185   (eval "$ac_link") 2>conftest.er1
20186   ac_status=$?
20187   grep -v '^ *+' conftest.er1 >conftest.err
20188   rm -rf conftest.er1
20189   cat conftest.err >&5
20190   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
20191   (exit $ac_status); } && {
20192          test -z "$ac_c_werror_flag" ||
20193          test ! -s conftest.err
20194        } && test -s conftest$ac_exeext && {
20195          test "$cross_compiling" = yes ||
20196          $as_test_x conftest$ac_exeext
20197        }; then
20198   ac_cv_lib_c_forkpty=yes
20199 else
20200   $as_echo "$as_me: failed program was:" >&5
20201 sed 's/^/| /' conftest.$ac_ext >&5
20202
20203         ac_cv_lib_c_forkpty=no
20204 fi
20205
20206 rm -rf conftest.dSYM
20207 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
20208       conftest$ac_exeext conftest.$ac_ext
20209 LIBS=$ac_check_lib_save_LIBS
20210 fi
20211 { $as_echo "$as_me:$LINENO: result: $ac_cv_lib_c_forkpty" >&5
20212 $as_echo "$ac_cv_lib_c_forkpty" >&6; }
20213 if test "x$ac_cv_lib_c_forkpty" = x""yes; then
20214   PTY_LIBS=""
20215                   cat >>confdefs.h <<\_ACEOF
20216 #define HAVE_FORKPTY 1
20217 _ACEOF
20218
20219 fi
20220
20221   CPPFLAGS="$ac_save_CPPFLAGS"
20222   LDFLAGS="$ac_save_LDFLAGS"
20223 #  LIBS="$ac_save_LIBS"
20224
20225 fi
20226
20227 ###############################################################################
20228 #
20229 #       Check for the XSHM server extension.
20230 #
20231 ###############################################################################
20232
20233 have_xshm=no
20234 with_xshm_req=unspecified
20235
20236 # Check whether --with-xshm-ext was given.
20237 if test "${with_xshm_ext+set}" = set; then
20238   withval=$with_xshm_ext; with_xshm="$withval"; with_xshm_req="$withval"
20239 else
20240   with_xshm=yes
20241 fi
20242
20243
20244
20245    case "$with_xshm" in
20246     yes) ;;
20247     no)  ;;
20248
20249     /*)
20250      { $as_echo "$as_me:$LINENO: checking for XSHM headers" >&5
20251 $as_echo_n "checking for XSHM headers... " >&6; }
20252      d=$with_xshm/include
20253      if test -d $d; then
20254        X_CFLAGS="-I$d $X_CFLAGS"
20255        { $as_echo "$as_me:$LINENO: result: $d" >&5
20256 $as_echo "$d" >&6; }
20257      else
20258        { $as_echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
20259 $as_echo "not found ($d: no such directory)" >&6; }
20260      fi
20261
20262      { $as_echo "$as_me:$LINENO: checking for XSHM libs" >&5
20263 $as_echo_n "checking for XSHM libs... " >&6; }
20264      d=$with_xshm/lib
20265      if test -d $d; then
20266        X_LIBS="-L$d $X_LIBS"
20267        { $as_echo "$as_me:$LINENO: result: $d" >&5
20268 $as_echo "$d" >&6; }
20269      else
20270        { $as_echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
20271 $as_echo "not found ($d: no such directory)" >&6; }
20272      fi
20273
20274      # replace the directory string with "yes".
20275      with_xshm_req="yes"
20276      with_xshm=$with_xshm_req
20277      ;;
20278
20279     *)
20280      echo ""
20281      echo "error: argument to --with-xshm-ext must be \"yes\", \"no\", or a directory."
20282      echo "       If it is a directory, then \`DIR/include' will be added to"
20283      echo "       the -I list, and \`DIR/lib' will be added to the -L list."
20284      exit 1
20285      ;;
20286    esac
20287
20288
20289 if test "$with_xshm" = yes; then
20290
20291   # first check for Xshm.h.
20292
20293   ac_save_CPPFLAGS="$CPPFLAGS"
20294   if test \! -z "$includedir" ; then
20295     CPPFLAGS="$CPPFLAGS -I$includedir"
20296   fi
20297   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
20298   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
20299   { $as_echo "$as_me:$LINENO: checking for X11/extensions/XShm.h" >&5
20300 $as_echo_n "checking for X11/extensions/XShm.h... " >&6; }
20301 if test "${ac_cv_header_X11_extensions_XShm_h+set}" = set; then
20302   $as_echo_n "(cached) " >&6
20303 else
20304   cat >conftest.$ac_ext <<_ACEOF
20305 /* confdefs.h.  */
20306 _ACEOF
20307 cat confdefs.h >>conftest.$ac_ext
20308 cat >>conftest.$ac_ext <<_ACEOF
20309 /* end confdefs.h.  */
20310 #include <X11/Xlib.h>
20311
20312 #include <X11/extensions/XShm.h>
20313 _ACEOF
20314 rm -rf conftest.$ac_objext
20315 if { (ac_try="$ac_compile"
20316 case "(($ac_try" in
20317   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20318   *) ac_try_echo=$ac_try;;
20319 esac
20320 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
20321 $as_echo "$ac_try_echo") >&5
20322   (eval "$ac_compile") 2>conftest.er1
20323   ac_status=$?
20324   grep -v '^ *+' conftest.er1 >conftest.err
20325   rm -rf conftest.er1
20326   cat conftest.err >&5
20327   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
20328   (exit $ac_status); } && {
20329          test -z "$ac_c_werror_flag" ||
20330          test ! -s conftest.err
20331        } && test -s conftest.$ac_objext; then
20332   ac_cv_header_X11_extensions_XShm_h=yes
20333 else
20334   $as_echo "$as_me: failed program was:" >&5
20335 sed 's/^/| /' conftest.$ac_ext >&5
20336
20337         ac_cv_header_X11_extensions_XShm_h=no
20338 fi
20339
20340 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
20341 fi
20342 { $as_echo "$as_me:$LINENO: result: $ac_cv_header_X11_extensions_XShm_h" >&5
20343 $as_echo "$ac_cv_header_X11_extensions_XShm_h" >&6; }
20344 if test "x$ac_cv_header_X11_extensions_XShm_h" = x""yes; then
20345   have_xshm=yes
20346 fi
20347
20348
20349   CPPFLAGS="$ac_save_CPPFLAGS"
20350
20351   # if that succeeded, then check for sys/ipc.h.
20352   if test "$have_xshm" = yes; then
20353     have_xshm=no
20354
20355   ac_save_CPPFLAGS="$CPPFLAGS"
20356   if test \! -z "$includedir" ; then
20357     CPPFLAGS="$CPPFLAGS -I$includedir"
20358   fi
20359   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
20360   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
20361   if test "${ac_cv_header_sys_ipc_h+set}" = set; then
20362   { $as_echo "$as_me:$LINENO: checking for sys/ipc.h" >&5
20363 $as_echo_n "checking for sys/ipc.h... " >&6; }
20364 if test "${ac_cv_header_sys_ipc_h+set}" = set; then
20365   $as_echo_n "(cached) " >&6
20366 fi
20367 { $as_echo "$as_me:$LINENO: result: $ac_cv_header_sys_ipc_h" >&5
20368 $as_echo "$ac_cv_header_sys_ipc_h" >&6; }
20369 else
20370   # Is the header compilable?
20371 { $as_echo "$as_me:$LINENO: checking sys/ipc.h usability" >&5
20372 $as_echo_n "checking sys/ipc.h usability... " >&6; }
20373 cat >conftest.$ac_ext <<_ACEOF
20374 /* confdefs.h.  */
20375 _ACEOF
20376 cat confdefs.h >>conftest.$ac_ext
20377 cat >>conftest.$ac_ext <<_ACEOF
20378 /* end confdefs.h.  */
20379 $ac_includes_default
20380 #include <sys/ipc.h>
20381 _ACEOF
20382 rm -rf conftest.$ac_objext
20383 if { (ac_try="$ac_compile"
20384 case "(($ac_try" in
20385   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20386   *) ac_try_echo=$ac_try;;
20387 esac
20388 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
20389 $as_echo "$ac_try_echo") >&5
20390   (eval "$ac_compile") 2>conftest.er1
20391   ac_status=$?
20392   grep -v '^ *+' conftest.er1 >conftest.err
20393   rm -rf conftest.er1
20394   cat conftest.err >&5
20395   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
20396   (exit $ac_status); } && {
20397          test -z "$ac_c_werror_flag" ||
20398          test ! -s conftest.err
20399        } && test -s conftest.$ac_objext; then
20400   ac_header_compiler=yes
20401 else
20402   $as_echo "$as_me: failed program was:" >&5
20403 sed 's/^/| /' conftest.$ac_ext >&5
20404
20405         ac_header_compiler=no
20406 fi
20407
20408 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
20409 { $as_echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
20410 $as_echo "$ac_header_compiler" >&6; }
20411
20412 # Is the header present?
20413 { $as_echo "$as_me:$LINENO: checking sys/ipc.h presence" >&5
20414 $as_echo_n "checking sys/ipc.h presence... " >&6; }
20415 cat >conftest.$ac_ext <<_ACEOF
20416 /* confdefs.h.  */
20417 _ACEOF
20418 cat confdefs.h >>conftest.$ac_ext
20419 cat >>conftest.$ac_ext <<_ACEOF
20420 /* end confdefs.h.  */
20421 #include <sys/ipc.h>
20422 _ACEOF
20423 if { (ac_try="$ac_cpp conftest.$ac_ext"
20424 case "(($ac_try" in
20425   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20426   *) ac_try_echo=$ac_try;;
20427 esac
20428 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
20429 $as_echo "$ac_try_echo") >&5
20430   (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
20431   ac_status=$?
20432   grep -v '^ *+' conftest.er1 >conftest.err
20433   rm -rf conftest.er1
20434   cat conftest.err >&5
20435   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
20436   (exit $ac_status); } >/dev/null && {
20437          test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
20438          test ! -s conftest.err
20439        }; then
20440   ac_header_preproc=yes
20441 else
20442   $as_echo "$as_me: failed program was:" >&5
20443 sed 's/^/| /' conftest.$ac_ext >&5
20444
20445   ac_header_preproc=no
20446 fi
20447
20448 rm -rf conftest.err conftest.$ac_ext
20449 { $as_echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
20450 $as_echo "$ac_header_preproc" >&6; }
20451
20452 # So?  What about this header?
20453 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
20454   yes:no: )
20455     { $as_echo "$as_me:$LINENO: WARNING: sys/ipc.h: accepted by the compiler, rejected by the preprocessor!" >&5
20456 $as_echo "$as_me: WARNING: sys/ipc.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
20457     { $as_echo "$as_me:$LINENO: WARNING: sys/ipc.h: proceeding with the compiler's result" >&5
20458 $as_echo "$as_me: WARNING: sys/ipc.h: proceeding with the compiler's result" >&2;}
20459     ac_header_preproc=yes
20460     ;;
20461   no:yes:* )
20462     { $as_echo "$as_me:$LINENO: WARNING: sys/ipc.h: present but cannot be compiled" >&5
20463 $as_echo "$as_me: WARNING: sys/ipc.h: present but cannot be compiled" >&2;}
20464     { $as_echo "$as_me:$LINENO: WARNING: sys/ipc.h:     check for missing prerequisite headers?" >&5
20465 $as_echo "$as_me: WARNING: sys/ipc.h:     check for missing prerequisite headers?" >&2;}
20466     { $as_echo "$as_me:$LINENO: WARNING: sys/ipc.h: see the Autoconf documentation" >&5
20467 $as_echo "$as_me: WARNING: sys/ipc.h: see the Autoconf documentation" >&2;}
20468     { $as_echo "$as_me:$LINENO: WARNING: sys/ipc.h:     section \"Present But Cannot Be Compiled\"" >&5
20469 $as_echo "$as_me: WARNING: sys/ipc.h:     section \"Present But Cannot Be Compiled\"" >&2;}
20470     { $as_echo "$as_me:$LINENO: WARNING: sys/ipc.h: proceeding with the preprocessor's result" >&5
20471 $as_echo "$as_me: WARNING: sys/ipc.h: proceeding with the preprocessor's result" >&2;}
20472     { $as_echo "$as_me:$LINENO: WARNING: sys/ipc.h: in the future, the compiler will take precedence" >&5
20473 $as_echo "$as_me: WARNING: sys/ipc.h: in the future, the compiler will take precedence" >&2;}
20474
20475     ;;
20476 esac
20477 { $as_echo "$as_me:$LINENO: checking for sys/ipc.h" >&5
20478 $as_echo_n "checking for sys/ipc.h... " >&6; }
20479 if test "${ac_cv_header_sys_ipc_h+set}" = set; then
20480   $as_echo_n "(cached) " >&6
20481 else
20482   ac_cv_header_sys_ipc_h=$ac_header_preproc
20483 fi
20484 { $as_echo "$as_me:$LINENO: result: $ac_cv_header_sys_ipc_h" >&5
20485 $as_echo "$ac_cv_header_sys_ipc_h" >&6; }
20486
20487 fi
20488 if test "x$ac_cv_header_sys_ipc_h" = x""yes; then
20489   have_xshm=yes
20490 fi
20491
20492
20493   CPPFLAGS="$ac_save_CPPFLAGS"
20494   fi
20495
20496   # if that succeeded, then check for sys/shm.h.
20497   if test "$have_xshm" = yes; then
20498     have_xshm=no
20499
20500   ac_save_CPPFLAGS="$CPPFLAGS"
20501   if test \! -z "$includedir" ; then
20502     CPPFLAGS="$CPPFLAGS -I$includedir"
20503   fi
20504   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
20505   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
20506   if test "${ac_cv_header_sys_shm_h+set}" = set; then
20507   { $as_echo "$as_me:$LINENO: checking for sys/shm.h" >&5
20508 $as_echo_n "checking for sys/shm.h... " >&6; }
20509 if test "${ac_cv_header_sys_shm_h+set}" = set; then
20510   $as_echo_n "(cached) " >&6
20511 fi
20512 { $as_echo "$as_me:$LINENO: result: $ac_cv_header_sys_shm_h" >&5
20513 $as_echo "$ac_cv_header_sys_shm_h" >&6; }
20514 else
20515   # Is the header compilable?
20516 { $as_echo "$as_me:$LINENO: checking sys/shm.h usability" >&5
20517 $as_echo_n "checking sys/shm.h usability... " >&6; }
20518 cat >conftest.$ac_ext <<_ACEOF
20519 /* confdefs.h.  */
20520 _ACEOF
20521 cat confdefs.h >>conftest.$ac_ext
20522 cat >>conftest.$ac_ext <<_ACEOF
20523 /* end confdefs.h.  */
20524 $ac_includes_default
20525 #include <sys/shm.h>
20526 _ACEOF
20527 rm -rf conftest.$ac_objext
20528 if { (ac_try="$ac_compile"
20529 case "(($ac_try" in
20530   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20531   *) ac_try_echo=$ac_try;;
20532 esac
20533 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
20534 $as_echo "$ac_try_echo") >&5
20535   (eval "$ac_compile") 2>conftest.er1
20536   ac_status=$?
20537   grep -v '^ *+' conftest.er1 >conftest.err
20538   rm -rf conftest.er1
20539   cat conftest.err >&5
20540   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
20541   (exit $ac_status); } && {
20542          test -z "$ac_c_werror_flag" ||
20543          test ! -s conftest.err
20544        } && test -s conftest.$ac_objext; then
20545   ac_header_compiler=yes
20546 else
20547   $as_echo "$as_me: failed program was:" >&5
20548 sed 's/^/| /' conftest.$ac_ext >&5
20549
20550         ac_header_compiler=no
20551 fi
20552
20553 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
20554 { $as_echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
20555 $as_echo "$ac_header_compiler" >&6; }
20556
20557 # Is the header present?
20558 { $as_echo "$as_me:$LINENO: checking sys/shm.h presence" >&5
20559 $as_echo_n "checking sys/shm.h presence... " >&6; }
20560 cat >conftest.$ac_ext <<_ACEOF
20561 /* confdefs.h.  */
20562 _ACEOF
20563 cat confdefs.h >>conftest.$ac_ext
20564 cat >>conftest.$ac_ext <<_ACEOF
20565 /* end confdefs.h.  */
20566 #include <sys/shm.h>
20567 _ACEOF
20568 if { (ac_try="$ac_cpp conftest.$ac_ext"
20569 case "(($ac_try" in
20570   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20571   *) ac_try_echo=$ac_try;;
20572 esac
20573 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
20574 $as_echo "$ac_try_echo") >&5
20575   (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
20576   ac_status=$?
20577   grep -v '^ *+' conftest.er1 >conftest.err
20578   rm -rf conftest.er1
20579   cat conftest.err >&5
20580   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
20581   (exit $ac_status); } >/dev/null && {
20582          test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
20583          test ! -s conftest.err
20584        }; then
20585   ac_header_preproc=yes
20586 else
20587   $as_echo "$as_me: failed program was:" >&5
20588 sed 's/^/| /' conftest.$ac_ext >&5
20589
20590   ac_header_preproc=no
20591 fi
20592
20593 rm -rf conftest.err conftest.$ac_ext
20594 { $as_echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
20595 $as_echo "$ac_header_preproc" >&6; }
20596
20597 # So?  What about this header?
20598 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
20599   yes:no: )
20600     { $as_echo "$as_me:$LINENO: WARNING: sys/shm.h: accepted by the compiler, rejected by the preprocessor!" >&5
20601 $as_echo "$as_me: WARNING: sys/shm.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
20602     { $as_echo "$as_me:$LINENO: WARNING: sys/shm.h: proceeding with the compiler's result" >&5
20603 $as_echo "$as_me: WARNING: sys/shm.h: proceeding with the compiler's result" >&2;}
20604     ac_header_preproc=yes
20605     ;;
20606   no:yes:* )
20607     { $as_echo "$as_me:$LINENO: WARNING: sys/shm.h: present but cannot be compiled" >&5
20608 $as_echo "$as_me: WARNING: sys/shm.h: present but cannot be compiled" >&2;}
20609     { $as_echo "$as_me:$LINENO: WARNING: sys/shm.h:     check for missing prerequisite headers?" >&5
20610 $as_echo "$as_me: WARNING: sys/shm.h:     check for missing prerequisite headers?" >&2;}
20611     { $as_echo "$as_me:$LINENO: WARNING: sys/shm.h: see the Autoconf documentation" >&5
20612 $as_echo "$as_me: WARNING: sys/shm.h: see the Autoconf documentation" >&2;}
20613     { $as_echo "$as_me:$LINENO: WARNING: sys/shm.h:     section \"Present But Cannot Be Compiled\"" >&5
20614 $as_echo "$as_me: WARNING: sys/shm.h:     section \"Present But Cannot Be Compiled\"" >&2;}
20615     { $as_echo "$as_me:$LINENO: WARNING: sys/shm.h: proceeding with the preprocessor's result" >&5
20616 $as_echo "$as_me: WARNING: sys/shm.h: proceeding with the preprocessor's result" >&2;}
20617     { $as_echo "$as_me:$LINENO: WARNING: sys/shm.h: in the future, the compiler will take precedence" >&5
20618 $as_echo "$as_me: WARNING: sys/shm.h: in the future, the compiler will take precedence" >&2;}
20619
20620     ;;
20621 esac
20622 { $as_echo "$as_me:$LINENO: checking for sys/shm.h" >&5
20623 $as_echo_n "checking for sys/shm.h... " >&6; }
20624 if test "${ac_cv_header_sys_shm_h+set}" = set; then
20625   $as_echo_n "(cached) " >&6
20626 else
20627   ac_cv_header_sys_shm_h=$ac_header_preproc
20628 fi
20629 { $as_echo "$as_me:$LINENO: result: $ac_cv_header_sys_shm_h" >&5
20630 $as_echo "$ac_cv_header_sys_shm_h" >&6; }
20631
20632 fi
20633 if test "x$ac_cv_header_sys_shm_h" = x""yes; then
20634   have_xshm=yes
20635 fi
20636
20637
20638   CPPFLAGS="$ac_save_CPPFLAGS"
20639   fi
20640
20641   # AIX is pathological, as usual: apparently it's normal for the Xshm headers
20642   # to exist, but the library code to not exist.  And even better, the library
20643   # code is in its own library: libXextSam.a.  So, if we're on AIX, and that
20644   # lib doesn't exist, give up.  (This lib gets added to X_EXTRA_LIBS, and
20645   # that's not quite right, but close enough.)
20646   #
20647   case "$host" in
20648     *-aix*)
20649       if  `uname -v` -eq 3 ; then
20650         have_xshm=no
20651
20652   ac_save_CPPFLAGS="$CPPFLAGS"
20653   ac_save_LDFLAGS="$LDFLAGS"
20654 #  ac_save_LIBS="$LIBS"
20655
20656   if test \! -z "$includedir" ; then
20657     CPPFLAGS="$CPPFLAGS -I$includedir"
20658   fi
20659   # note: $X_CFLAGS includes $x_includes
20660   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
20661
20662   if test \! -z "$libdir" ; then
20663     LDFLAGS="$LDFLAGS -L$libdir"
20664   fi
20665   # note: $X_LIBS includes $x_libraries
20666   LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
20667
20668   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
20669   LDFLAGS=`eval eval eval eval eval eval eval eval eval echo $LDFLAGS`
20670   { $as_echo "$as_me:$LINENO: checking for XShmQueryExtension in -lXextSam" >&5
20671 $as_echo_n "checking for XShmQueryExtension in -lXextSam... " >&6; }
20672 if test "${ac_cv_lib_XextSam_XShmQueryExtension+set}" = set; then
20673   $as_echo_n "(cached) " >&6
20674 else
20675   ac_check_lib_save_LIBS=$LIBS
20676 LIBS="-lXextSam -lX11 -lXext -lm $LIBS"
20677 cat >conftest.$ac_ext <<_ACEOF
20678 /* confdefs.h.  */
20679 _ACEOF
20680 cat confdefs.h >>conftest.$ac_ext
20681 cat >>conftest.$ac_ext <<_ACEOF
20682 /* end confdefs.h.  */
20683
20684 /* Override any GCC internal prototype to avoid an error.
20685    Use char because int might match the return type of a GCC
20686    builtin and then its argument prototype would still apply.  */
20687 #ifdef __cplusplus
20688 extern "C"
20689 #endif
20690 char XShmQueryExtension ();
20691 int
20692 main ()
20693 {
20694 return XShmQueryExtension ();
20695   ;
20696   return 0;
20697 }
20698 _ACEOF
20699 rm -rf conftest.$ac_objext conftest$ac_exeext
20700 if { (ac_try="$ac_link"
20701 case "(($ac_try" in
20702   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20703   *) ac_try_echo=$ac_try;;
20704 esac
20705 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
20706 $as_echo "$ac_try_echo") >&5
20707   (eval "$ac_link") 2>conftest.er1
20708   ac_status=$?
20709   grep -v '^ *+' conftest.er1 >conftest.err
20710   rm -rf conftest.er1
20711   cat conftest.err >&5
20712   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
20713   (exit $ac_status); } && {
20714          test -z "$ac_c_werror_flag" ||
20715          test ! -s conftest.err
20716        } && test -s conftest$ac_exeext && {
20717          test "$cross_compiling" = yes ||
20718          $as_test_x conftest$ac_exeext
20719        }; then
20720   ac_cv_lib_XextSam_XShmQueryExtension=yes
20721 else
20722   $as_echo "$as_me: failed program was:" >&5
20723 sed 's/^/| /' conftest.$ac_ext >&5
20724
20725         ac_cv_lib_XextSam_XShmQueryExtension=no
20726 fi
20727
20728 rm -rf conftest.dSYM
20729 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
20730       conftest$ac_exeext conftest.$ac_ext
20731 LIBS=$ac_check_lib_save_LIBS
20732 fi
20733 { $as_echo "$as_me:$LINENO: result: $ac_cv_lib_XextSam_XShmQueryExtension" >&5
20734 $as_echo "$ac_cv_lib_XextSam_XShmQueryExtension" >&6; }
20735 if test "x$ac_cv_lib_XextSam_XShmQueryExtension" = x""yes; then
20736   have_xshm=yes; X_EXTRA_LIBS="$X_EXTRA_LIBS -lXextSam"
20737 else
20738   true
20739 fi
20740
20741   CPPFLAGS="$ac_save_CPPFLAGS"
20742   LDFLAGS="$ac_save_LDFLAGS"
20743 #  LIBS="$ac_save_LIBS"
20744
20745       fi
20746     ;;
20747   esac
20748
20749   # if that succeeded, then we've really got it.
20750   if test "$have_xshm" = yes; then
20751     cat >>confdefs.h <<\_ACEOF
20752 #define HAVE_XSHM_EXTENSION 1
20753 _ACEOF
20754
20755   fi
20756
20757 elif test "$with_xshm" != no; then
20758   echo "error: must be yes or no: --with-xshm-ext=$with_xshm"
20759   exit 1
20760 fi
20761
20762
20763 ###############################################################################
20764 #
20765 #       Check for the DOUBLE-BUFFER server extension.
20766 #
20767 ###############################################################################
20768
20769 have_xdbe=no
20770 with_xdbe_req=unspecified
20771
20772 # Check whether --with-xdbe-ext was given.
20773 if test "${with_xdbe_ext+set}" = set; then
20774   withval=$with_xdbe_ext; with_xdbe="$withval"; with_xdbe_req="$withval"
20775 else
20776   with_xdbe=yes
20777 fi
20778
20779
20780
20781    case "$with_xdbe" in
20782     yes) ;;
20783     no)  ;;
20784
20785     /*)
20786      { $as_echo "$as_me:$LINENO: checking for DOUBLE-BUFFER headers" >&5
20787 $as_echo_n "checking for DOUBLE-BUFFER headers... " >&6; }
20788      d=$with_xdbe/include
20789      if test -d $d; then
20790        X_CFLAGS="-I$d $X_CFLAGS"
20791        { $as_echo "$as_me:$LINENO: result: $d" >&5
20792 $as_echo "$d" >&6; }
20793      else
20794        { $as_echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
20795 $as_echo "not found ($d: no such directory)" >&6; }
20796      fi
20797
20798      { $as_echo "$as_me:$LINENO: checking for DOUBLE-BUFFER libs" >&5
20799 $as_echo_n "checking for DOUBLE-BUFFER libs... " >&6; }
20800      d=$with_xdbe/lib
20801      if test -d $d; then
20802        X_LIBS="-L$d $X_LIBS"
20803        { $as_echo "$as_me:$LINENO: result: $d" >&5
20804 $as_echo "$d" >&6; }
20805      else
20806        { $as_echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
20807 $as_echo "not found ($d: no such directory)" >&6; }
20808      fi
20809
20810      # replace the directory string with "yes".
20811      with_xdbe_req="yes"
20812      with_xdbe=$with_xdbe_req
20813      ;;
20814
20815     *)
20816      echo ""
20817      echo "error: argument to --with-xdbe-ext must be \"yes\", \"no\", or a directory."
20818      echo "       If it is a directory, then \`DIR/include' will be added to"
20819      echo "       the -I list, and \`DIR/lib' will be added to the -L list."
20820      exit 1
20821      ;;
20822    esac
20823
20824
20825 if test "$with_xdbe" = yes; then
20826
20827
20828   ac_save_CPPFLAGS="$CPPFLAGS"
20829   if test \! -z "$includedir" ; then
20830     CPPFLAGS="$CPPFLAGS -I$includedir"
20831   fi
20832   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
20833   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
20834   { $as_echo "$as_me:$LINENO: checking for X11/extensions/Xdbe.h" >&5
20835 $as_echo_n "checking for X11/extensions/Xdbe.h... " >&6; }
20836 if test "${ac_cv_header_X11_extensions_Xdbe_h+set}" = set; then
20837   $as_echo_n "(cached) " >&6
20838 else
20839   cat >conftest.$ac_ext <<_ACEOF
20840 /* confdefs.h.  */
20841 _ACEOF
20842 cat confdefs.h >>conftest.$ac_ext
20843 cat >>conftest.$ac_ext <<_ACEOF
20844 /* end confdefs.h.  */
20845 #include <X11/Xlib.h>
20846
20847 #include <X11/extensions/Xdbe.h>
20848 _ACEOF
20849 rm -rf conftest.$ac_objext
20850 if { (ac_try="$ac_compile"
20851 case "(($ac_try" in
20852   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20853   *) ac_try_echo=$ac_try;;
20854 esac
20855 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
20856 $as_echo "$ac_try_echo") >&5
20857   (eval "$ac_compile") 2>conftest.er1
20858   ac_status=$?
20859   grep -v '^ *+' conftest.er1 >conftest.err
20860   rm -rf conftest.er1
20861   cat conftest.err >&5
20862   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
20863   (exit $ac_status); } && {
20864          test -z "$ac_c_werror_flag" ||
20865          test ! -s conftest.err
20866        } && test -s conftest.$ac_objext; then
20867   ac_cv_header_X11_extensions_Xdbe_h=yes
20868 else
20869   $as_echo "$as_me: failed program was:" >&5
20870 sed 's/^/| /' conftest.$ac_ext >&5
20871
20872         ac_cv_header_X11_extensions_Xdbe_h=no
20873 fi
20874
20875 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
20876 fi
20877 { $as_echo "$as_me:$LINENO: result: $ac_cv_header_X11_extensions_Xdbe_h" >&5
20878 $as_echo "$ac_cv_header_X11_extensions_Xdbe_h" >&6; }
20879 if test "x$ac_cv_header_X11_extensions_Xdbe_h" = x""yes; then
20880   have_xdbe=yes
20881 fi
20882
20883
20884   CPPFLAGS="$ac_save_CPPFLAGS"
20885   if test "$have_xdbe" = yes; then
20886     cat >>confdefs.h <<\_ACEOF
20887 #define HAVE_DOUBLE_BUFFER_EXTENSION 1
20888 _ACEOF
20889
20890   fi
20891
20892 elif test "$with_xdbe" != no; then
20893   echo "error: must be yes or no: --with-xdbe-ext=$with_xshm"
20894   exit 1
20895 fi
20896
20897
20898 ###############################################################################
20899 #
20900 #       Check for the SGI XReadDisplay server extension.
20901 #
20902 #       Note: this has to be down here, rather than up with the other server
20903 #       extension tests, so that the output of `configure --help' is in the
20904 #       right order.  Arrgh!
20905 #
20906 ###############################################################################
20907
20908 have_readdisplay=no
20909 with_readdisplay_req=unspecified
20910
20911 # Check whether --with-readdisplay was given.
20912 if test "${with_readdisplay+set}" = set; then
20913   withval=$with_readdisplay; with_readdisplay="$withval"; with_readdisplay_req="$withval"
20914 else
20915   with_readdisplay=yes
20916 fi
20917
20918
20919
20920    case "$with_readdisplay" in
20921     yes) ;;
20922     no)  ;;
20923
20924     /*)
20925      { $as_echo "$as_me:$LINENO: checking for XReadDisplay headers" >&5
20926 $as_echo_n "checking for XReadDisplay headers... " >&6; }
20927      d=$with_readdisplay/include
20928      if test -d $d; then
20929        X_CFLAGS="-I$d $X_CFLAGS"
20930        { $as_echo "$as_me:$LINENO: result: $d" >&5
20931 $as_echo "$d" >&6; }
20932      else
20933        { $as_echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
20934 $as_echo "not found ($d: no such directory)" >&6; }
20935      fi
20936
20937      { $as_echo "$as_me:$LINENO: checking for XReadDisplay libs" >&5
20938 $as_echo_n "checking for XReadDisplay libs... " >&6; }
20939      d=$with_readdisplay/lib
20940      if test -d $d; then
20941        X_LIBS="-L$d $X_LIBS"
20942        { $as_echo "$as_me:$LINENO: result: $d" >&5
20943 $as_echo "$d" >&6; }
20944      else
20945        { $as_echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
20946 $as_echo "not found ($d: no such directory)" >&6; }
20947      fi
20948
20949      # replace the directory string with "yes".
20950      with_readdisplay_req="yes"
20951      with_readdisplay=$with_readdisplay_req
20952      ;;
20953
20954     *)
20955      echo ""
20956      echo "error: argument to --with-readdisplay must be \"yes\", \"no\", or a directory."
20957      echo "       If it is a directory, then \`DIR/include' will be added to"
20958      echo "       the -I list, and \`DIR/lib' will be added to the -L list."
20959      exit 1
20960      ;;
20961    esac
20962
20963
20964 if test "$with_readdisplay" = yes; then
20965
20966   ac_save_CPPFLAGS="$CPPFLAGS"
20967   if test \! -z "$includedir" ; then
20968     CPPFLAGS="$CPPFLAGS -I$includedir"
20969   fi
20970   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
20971   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
20972   { $as_echo "$as_me:$LINENO: checking for X11/extensions/readdisplay.h" >&5
20973 $as_echo_n "checking for X11/extensions/readdisplay.h... " >&6; }
20974 if test "${ac_cv_header_X11_extensions_readdisplay_h+set}" = set; then
20975   $as_echo_n "(cached) " >&6
20976 else
20977   cat >conftest.$ac_ext <<_ACEOF
20978 /* confdefs.h.  */
20979 _ACEOF
20980 cat confdefs.h >>conftest.$ac_ext
20981 cat >>conftest.$ac_ext <<_ACEOF
20982 /* end confdefs.h.  */
20983 #include <X11/Xlib.h>
20984
20985 #include <X11/extensions/readdisplay.h>
20986 _ACEOF
20987 rm -rf conftest.$ac_objext
20988 if { (ac_try="$ac_compile"
20989 case "(($ac_try" in
20990   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20991   *) ac_try_echo=$ac_try;;
20992 esac
20993 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
20994 $as_echo "$ac_try_echo") >&5
20995   (eval "$ac_compile") 2>conftest.er1
20996   ac_status=$?
20997   grep -v '^ *+' conftest.er1 >conftest.err
20998   rm -rf conftest.er1
20999   cat conftest.err >&5
21000   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
21001   (exit $ac_status); } && {
21002          test -z "$ac_c_werror_flag" ||
21003          test ! -s conftest.err
21004        } && test -s conftest.$ac_objext; then
21005   ac_cv_header_X11_extensions_readdisplay_h=yes
21006 else
21007   $as_echo "$as_me: failed program was:" >&5
21008 sed 's/^/| /' conftest.$ac_ext >&5
21009
21010         ac_cv_header_X11_extensions_readdisplay_h=no
21011 fi
21012
21013 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
21014 fi
21015 { $as_echo "$as_me:$LINENO: result: $ac_cv_header_X11_extensions_readdisplay_h" >&5
21016 $as_echo "$ac_cv_header_X11_extensions_readdisplay_h" >&6; }
21017 if test "x$ac_cv_header_X11_extensions_readdisplay_h" = x""yes; then
21018   cat >>confdefs.h <<\_ACEOF
21019 #define HAVE_READ_DISPLAY_EXTENSION 1
21020 _ACEOF
21021
21022 fi
21023
21024
21025   CPPFLAGS="$ac_save_CPPFLAGS"
21026 elif test "$with_readdisplay" != no; then
21027   echo "error: must be yes or no: --with-readdisplay=$with_readdisplay"
21028   exit 1
21029 fi
21030
21031
21032 ###############################################################################
21033 #
21034 #       Check for a directory full of images to use as the default value
21035 #       of the "imageDirectory" preference.
21036 #
21037 ###############################################################################
21038
21039 have_imagedir=no
21040 with_imagedir_req=unspecified
21041
21042
21043 # Check whether --with-image-directory was given.
21044 if test "${with_image_directory+set}" = set; then
21045   withval=$with_image_directory; with_imagedir="$withval"; with_imagedir_req="$withval"
21046 else
21047   with_imagedir=yes
21048 fi
21049
21050 # no HANDLE_X_PATH_ARG for this one
21051
21052 case "$with_imagedir" in
21053   /*)
21054     # absolute path
21055     { $as_echo "$as_me:$LINENO: checking for image directory $with_imagedir" >&5
21056 $as_echo_n "checking for image directory $with_imagedir... " >&6; }
21057     if test -d "$with_imagedir" ; then
21058       { $as_echo "$as_me:$LINENO: result: yes" >&5
21059 $as_echo "yes" >&6; }
21060     else
21061       { $as_echo "$as_me:$LINENO: result: no" >&5
21062 $as_echo "no" >&6; }
21063       with_imagedir=""
21064     fi
21065   ;;
21066   yes)
21067     with_imagedir=""
21068
21069     #### Could use some more defaults here...
21070     for dd in \
21071       "/usr/share/backgrounds/images/"          \
21072       "/usr/share/wallpapers/"                  \
21073       "/Library/Desktop Pictures/"              \
21074     ; do
21075       if test -z "$with_imagedir"; then
21076         { $as_echo "$as_me:$LINENO: checking for image directory $dd" >&5
21077 $as_echo_n "checking for image directory $dd... " >&6; }
21078         if test -d "$dd" ; then
21079           { $as_echo "$as_me:$LINENO: result: yes" >&5
21080 $as_echo "yes" >&6; }
21081           with_imagedir="$dd"
21082         else
21083           { $as_echo "$as_me:$LINENO: result: no" >&5
21084 $as_echo "no" >&6; }
21085         fi
21086       fi
21087     done
21088
21089   ;;
21090   no)
21091     with_imagedir=""
21092   ;;
21093
21094   *)
21095     echo "error: must be an absolute path: --with-image-directory=$with_imagedir_req"
21096     exit 1
21097   ;;
21098 esac
21099 ac_cv_imagedir="$with_imagedir"
21100
21101 DEFAULT_IMAGES_P='True'
21102 DEFAULT_IMAGE_DIRECTORY="$ac_cv_imagedir"
21103
21104 if test -z "$DEFAULT_IMAGE_DIRECTORY" ; then
21105   DEFAULT_IMAGES_P='False'
21106 fi
21107
21108
21109 ###############################################################################
21110 #
21111 #       Pick a text file to use as the default of the "textFile" preference.
21112 #       Any old file will do, but preferably one that will make interesting
21113 #       shapes when displayed by "starwars" and "fontglide".
21114 #
21115 ###############################################################################
21116
21117 have_textfile=no
21118 with_textfile_req=unspecified
21119
21120
21121 # Check whether --with-text-file was given.
21122 if test "${with_text_file+set}" = set; then
21123   withval=$with_text_file; with_textfile="$withval"; with_textfile_req="$withval"
21124 else
21125   with_textfile=yes
21126 fi
21127
21128 # no HANDLE_X_PATH_ARG for this one
21129
21130 case "$with_textfile" in
21131   /*)
21132     # absolute path
21133     { $as_echo "$as_me:$LINENO: checking for text file $with_textfile" >&5
21134 $as_echo_n "checking for text file $with_textfile... " >&6; }
21135     if test -f "$with_textfile" ; then
21136       { $as_echo "$as_me:$LINENO: result: yes" >&5
21137 $as_echo "yes" >&6; }
21138     else
21139       { $as_echo "$as_me:$LINENO: result: no" >&5
21140 $as_echo "no" >&6; }
21141       with_textfile=""
21142     fi
21143   ;;
21144   yes)
21145     with_textfile=""
21146
21147     #### Could use some more defaults here...
21148     for f in \
21149       "/usr/X11R6/lib/X11/doc/README"              \
21150       "/usr/share/doc/xserver-common/copyright"    \
21151       "/usr/share/doc/xserver-xorg-core/copyright" \
21152       "/usr/X11R6/README"                          \
21153       "/usr/share/doc/debian/debian-manifesto"     \
21154     ; do
21155       if test -z "$with_textfile"; then
21156         { $as_echo "$as_me:$LINENO: checking for text file $f" >&5
21157 $as_echo_n "checking for text file $f... " >&6; }
21158         if test -f "$f" ; then
21159           { $as_echo "$as_me:$LINENO: result: yes" >&5
21160 $as_echo "yes" >&6; }
21161           with_textfile="$f"
21162         else
21163           { $as_echo "$as_me:$LINENO: result: no" >&5
21164 $as_echo "no" >&6; }
21165         fi
21166       fi
21167     done
21168
21169   ;;
21170   no)
21171     with_textfile=""
21172   ;;
21173
21174   *)
21175     echo "error: must be an absolute path: --with-text-file=$with_textfile_req"
21176     exit 1
21177   ;;
21178 esac
21179 ac_cv_textfile="$with_textfile"
21180
21181 DEFAULT_TEXT_FILE="$ac_cv_textfile"
21182
21183
21184 ###############################################################################
21185 #
21186 #       Check the browser to see help URL
21187 #
21188 ###############################################################################
21189
21190 have_browser=no
21191 with_browser_req=unspecified
21192
21193
21194 # Check whether --with-browser was given.
21195 if test "${with_browser+set}" = set; then
21196   withval=$with_browser; with_browser="$withval"; with_browser_req="$withval"
21197 else
21198   with_browser=no
21199 fi
21200
21201 # no HANDLE_X_PATH_ARG for this one
21202
21203 case "$with_browser" in
21204   no )
21205   ;;
21206   * )
21207     WITH_BROWSER=$with_browser
21208     gnome_open_program=$with_browser
21209     { $as_echo "$as_me:$LINENO: checking for browser $with_browser" >&5
21210 $as_echo_n "checking for browser $with_browser... " >&6; }
21211     with_browser_fullpath=`which $with_browser 2>/dev/null`
21212     case $with_browser_fullpath in
21213          /* )
21214                 { $as_echo "$as_me:$LINENO: result: yes" >&5
21215 $as_echo "yes" >&6; }
21216                  have_browser=yes
21217                  ;;
21218         * )
21219                { $as_echo "$as_me:$LINENO: result: no" >&5
21220 $as_echo "no" >&6; }
21221 # Only warning: we don't want to install all packages for the
21222 # dependency of the browser in building stage...
21223                echo "WARNING: browser not found: --with-browser=$with_browser"
21224                ;;
21225     esac
21226   ;;
21227 esac
21228 ac_cv_browser="$with_browser"
21229
21230 ###############################################################################
21231 #
21232 #       Check whether it's ok to install some hacks as setuid (e.g., "sonar")
21233 #       This should be safe, but let's give people the option.
21234 #
21235 ###############################################################################
21236
21237 setuid_hacks_default=no
21238 setuid_hacks="$setuid_hacks_default"
21239
21240 # Check whether --with-setuid-hacks was given.
21241 if test "${with_setuid_hacks+set}" = set; then
21242   withval=$with_setuid_hacks; setuid_hacks="$withval"
21243 else
21244   setuid_hacks="$setuid_hacks_default"
21245 fi
21246
21247
21248
21249    case "$setuid_hacks" in
21250     yes) ;;
21251     no)  ;;
21252
21253     /*)
21254      { $as_echo "$as_me:$LINENO: checking for setuid hacks headers" >&5
21255 $as_echo_n "checking for setuid hacks headers... " >&6; }
21256      d=$setuid_hacks/include
21257      if test -d $d; then
21258        X_CFLAGS="-I$d $X_CFLAGS"
21259        { $as_echo "$as_me:$LINENO: result: $d" >&5
21260 $as_echo "$d" >&6; }
21261      else
21262        { $as_echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
21263 $as_echo "not found ($d: no such directory)" >&6; }
21264      fi
21265
21266      { $as_echo "$as_me:$LINENO: checking for setuid hacks libs" >&5
21267 $as_echo_n "checking for setuid hacks libs... " >&6; }
21268      d=$setuid_hacks/lib
21269      if test -d $d; then
21270        X_LIBS="-L$d $X_LIBS"
21271        { $as_echo "$as_me:$LINENO: result: $d" >&5
21272 $as_echo "$d" >&6; }
21273      else
21274        { $as_echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
21275 $as_echo "not found ($d: no such directory)" >&6; }
21276      fi
21277
21278      # replace the directory string with "yes".
21279      setuid_hacks_req="yes"
21280      setuid_hacks=$setuid_hacks_req
21281      ;;
21282
21283     *)
21284      echo ""
21285      echo "error: argument to --with-setuid-hacks must be \"yes\", \"no\", or a directory."
21286      echo "       If it is a directory, then \`DIR/include' will be added to"
21287      echo "       the -I list, and \`DIR/lib' will be added to the -L list."
21288      exit 1
21289      ;;
21290    esac
21291
21292
21293 if test "$setuid_hacks" = yes; then
21294   true
21295 elif test "$setuid_hacks" != no; then
21296   echo "error: must be yes or no: --with-setuid-hacks=$setuid_hacks"
21297   exit 1
21298 fi
21299
21300
21301 ###############################################################################
21302 #
21303 #       Done testing.  Now, set up the various -I and -L variables,
21304 #       and decide which GUI program to build by default.
21305 #
21306 ###############################################################################
21307
21308 DEPEND=makedepend
21309 DEPEND_FLAGS=
21310 DEPEND_DEFINES=
21311
21312
21313 if test \! -z "$includedir" ; then
21314   INCLUDES="$INCLUDES -I$includedir"
21315 fi
21316
21317 if test \! -z "$libdir" ; then
21318   LDFLAGS="$LDFLAGS -L$libdir"
21319 fi
21320
21321
21322 PREFERRED_DEMO_PROGRAM=''
21323 ALL_DEMO_PROGRAMS=
21324 if test "$have_motif" = yes; then
21325   PREFERRED_DEMO_PROGRAM=xscreensaver-demo-Xm
21326   ALL_DEMO_PROGRAMS="$PREFERRED_DEMO_PROGRAM $ALL_DEMO_PROGRAMS"
21327 fi
21328 if test "$have_gtk" = yes; then
21329   PREFERRED_DEMO_PROGRAM=xscreensaver-demo-Gtk
21330   ALL_DEMO_PROGRAMS="$PREFERRED_DEMO_PROGRAM $ALL_DEMO_PROGRAMS"
21331 fi
21332
21333
21334 if test "$have_kerberos" = yes; then
21335   PASSWD_SRCS="$PASSWD_SRCS \$(KERBEROS_SRCS)"
21336   PASSWD_OBJS="$PASSWD_OBJS \$(KERBEROS_OBJS)"
21337 fi
21338 if test "$have_pam" = yes; then
21339   PASSWD_SRCS="$PASSWD_SRCS \$(PAM_SRCS)"
21340   PASSWD_OBJS="$PASSWD_OBJS \$(PAM_OBJS)"
21341   INSTALL_PAM="install-pam"
21342 fi
21343 if test "$have_passwd_helper" = yes; then
21344   PASSWD_SRCS="$PASSWD_SRCS \$(PWHELPER_SRCS)"
21345   PASSWD_OBJS="$PASSWD_OBJS \$(PWHELPER_OBJS)"
21346 fi
21347   PASSWD_SRCS="$PASSWD_SRCS \$(PWENT_SRCS)"
21348   PASSWD_OBJS="$PASSWD_OBJS \$(PWENT_OBJS)"
21349
21350
21351 if test "$enable_locking" = yes; then
21352   LOCK_SRCS='$(LOCK_SRCS_1) $(PASSWD_SRCS)'
21353   LOCK_OBJS='$(LOCK_OBJS_1) $(PASSWD_OBJS)'
21354 else
21355   LOCK_SRCS='$(NOLOCK_SRCS_1)'
21356   LOCK_OBJS='$(NOLOCK_OBJS_1)'
21357 fi
21358
21359 if test "$ac_macosx" = yes; then
21360   EXES_OSX='$(EXES_OSX)'
21361   SCRIPTS_OSX='$(SCRIPTS_OSX)'
21362   MEN_OSX='$(MEN_OSX)'
21363 else
21364   EXES_OSX=
21365   SCRIPTS_OSX=
21366   MEN_OSX=
21367 fi
21368
21369
21370 INSTALL_SETUID='$(INSTALL_PROGRAM) $(SUID_FLAGS)'
21371
21372 if test "$need_setuid" = yes; then
21373   NEED_SETUID=yes
21374 else
21375   NEED_SETUID=no
21376 fi
21377
21378 if test "$setuid_hacks" = yes; then
21379   SETUID_HACKS=yes
21380 else
21381   SETUID_HACKS=no
21382 fi
21383
21384 tab='   '
21385 if test "$have_gl" = yes; then
21386   GL_EXES='$(GL_EXES)'
21387   SUID_EXES='$(SUID_EXES)'
21388   RETIRED_GL_EXES='$(RETIRED_GL_EXES)'
21389   GL_UTIL_EXES='$(GL_UTIL_EXES)'
21390   GL_MEN='$(GL_MEN)'
21391   GL_KLUDGE=" "
21392 else
21393   GL_KLUDGE="-"
21394 fi
21395
21396 if test "$have_gle" = yes; then
21397   GLE_EXES='$(GLE_EXES)'
21398   GLE_KLUDGE=" "
21399 else
21400   GLE_KLUDGE="-"
21401 fi
21402
21403 if test "$have_jpeg" = yes -a "$have_gdk_pixbuf" = yes; then
21404  JPEG_EXES='$(JPEG_EXES)'
21405 fi
21406
21407
21408 # Another substitution in the XScreenSaver.ad.in file:
21409 #
21410 if test "$gnome_open_program" != ''; then
21411   GNOME24=''
21412   GNOME22='!    '
21413   NOGNOME='!    '
21414 elif test "$gnome_url_show_program" != ''; then
21415   GNOME24='!    '
21416   GNOME22=''
21417   NOGNOME='!    '
21418 else
21419   GNOME24='!    '
21420   GNOME22='!    '
21421   NOGNOME=''
21422 fi
21423
21424
21425 # Set PO_DATADIR to something sensible.
21426 #
21427 { $as_echo "$as_me:$LINENO: checking for locale directory" >&5
21428 $as_echo_n "checking for locale directory... " >&6; }
21429 if test -n "$GTK_DATADIR" ; then
21430   PO_DATADIR="$GTK_DATADIR"
21431 elif test "$have_gtk" = yes; then
21432   PO_DATADIR=`$pkg_config --variable=prefix gtk+-2.0`
21433   PO_DATADIR="$PO_DATADIR/share"
21434 fi
21435
21436 if test -z "$PO_DATADIR" ; then
21437   #
21438   # #### Total fucking kludge --
21439   # Map /build/prefix/usr/X11R6/share/ to /build/prefix/usr/share/
21440   # but of course we need to expand all the nested variables to do that...
21441   #
21442   dd=`eval eval eval eval eval eval eval eval eval eval eval echo $datadir`
21443   PO_DATADIR=`echo $dd | sed 's@/X11R6/@/@'`
21444 fi
21445
21446 { $as_echo "$as_me:$LINENO: result: $PO_DATADIR/locale" >&5
21447 $as_echo "$PO_DATADIR/locale" >&6; }
21448
21449
21450 # canonicalize slashes.
21451 HACK_CONF_DIR=`echo "${HACK_CONF_DIR}" | sed 's@/$@@;s@//*@/@g'`
21452
21453 # gcc 3.0 likes to issue this warning for every file:
21454 #
21455 # cc1: warning: changing search order for system directory "/usr/local/include"
21456 # cc1: warning:   as it has already been specified as a non-system directory
21457 #
21458 # Yay.  We can only avoid that by deleting "-I${prefix}/include" from the list.
21459 # Which *should* be totally redundant, and thus an ok thing to delete?
21460 #
21461 INCLUDES=`echo "$INCLUDES" | sed 's@ -I${prefix}/include@@g;'`
21462
21463
21464 ###############################################################################
21465 #
21466 #       Perform substitutions and write Makefiles.
21467 #
21468 ###############################################################################
21469
21470
21471
21472
21473
21474
21475
21476
21477
21478
21479
21480
21481
21482
21483
21484
21485
21486
21487
21488
21489
21490
21491
21492
21493
21494
21495
21496
21497
21498
21499
21500
21501
21502
21503
21504
21505
21506
21507
21508
21509
21510
21511
21512
21513
21514
21515
21516
21517
21518
21519
21520
21521
21522
21523
21524
21525
21526
21527
21528
21529
21530
21531
21532
21533
21534 APPDEFAULTS=$ac_x_app_defaults
21535
21536
21537
21538
21539
21540
21541
21542 ac_config_files="$ac_config_files Makefile utils/Makefile driver/Makefile hacks/Makefile hacks/glx/Makefile po/Makefile.in driver/XScreenSaver.ad"
21543
21544 cat >confcache <<\_ACEOF
21545 # This file is a shell script that caches the results of configure
21546 # tests run on this system so they can be shared between configure
21547 # scripts and configure runs, see configure's option --config-cache.
21548 # It is not useful on other systems.  If it contains results you don't
21549 # want to keep, you may remove or edit it.
21550 #
21551 # config.status only pays attention to the cache file if you give it
21552 # the --recheck option to rerun configure.
21553 #
21554 # `ac_cv_env_foo' variables (set or unset) will be overridden when
21555 # loading this file, other *unset* `ac_cv_foo' will be assigned the
21556 # following values.
21557
21558 _ACEOF
21559
21560 # The following way of writing the cache mishandles newlines in values,
21561 # but we know of no workaround that is simple, portable, and efficient.
21562 # So, we kill variables containing newlines.
21563 # Ultrix sh set writes to stderr and can't be redirected directly,
21564 # and sets the high bit in the cache file unless we assign to the vars.
21565 (
21566   for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
21567     eval ac_val=\$$ac_var
21568     case $ac_val in #(
21569     *${as_nl}*)
21570       case $ac_var in #(
21571       *_cv_*) { $as_echo "$as_me:$LINENO: WARNING: cache variable $ac_var contains a newline" >&5
21572 $as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
21573       esac
21574       case $ac_var in #(
21575       _ | IFS | as_nl) ;; #(
21576       BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
21577       *) $as_unset $ac_var ;;
21578       esac ;;
21579     esac
21580   done
21581
21582   (set) 2>&1 |
21583     case $as_nl`(ac_space=' '; set) 2>&1` in #(
21584     *${as_nl}ac_space=\ *)
21585       # `set' does not quote correctly, so add quotes (double-quote
21586       # substitution turns \\\\ into \\, and sed turns \\ into \).
21587       sed -n \
21588         "s/'/'\\\\''/g;
21589           s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
21590       ;; #(
21591     *)
21592       # `set' quotes correctly as required by POSIX, so do not add quotes.
21593       sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
21594       ;;
21595     esac |
21596     sort
21597 ) |
21598   sed '
21599      /^ac_cv_env_/b end
21600      t clear
21601      :clear
21602      s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
21603      t end
21604      s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
21605      :end' >>confcache
21606 if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
21607   if test -w "$cache_file"; then
21608     test "x$cache_file" != "x/dev/null" &&
21609       { $as_echo "$as_me:$LINENO: updating cache $cache_file" >&5
21610 $as_echo "$as_me: updating cache $cache_file" >&6;}
21611     cat confcache >$cache_file
21612   else
21613     { $as_echo "$as_me:$LINENO: not updating unwritable cache $cache_file" >&5
21614 $as_echo "$as_me: not updating unwritable cache $cache_file" >&6;}
21615   fi
21616 fi
21617 rm -f confcache
21618
21619 test "x$prefix" = xNONE && prefix=$ac_default_prefix
21620 # Let make expand exec_prefix.
21621 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
21622
21623 DEFS=-DHAVE_CONFIG_H
21624
21625 ac_libobjs=
21626 ac_ltlibobjs=
21627 for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
21628   # 1. Remove the extension, and $U if already installed.
21629   ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
21630   ac_i=`$as_echo "$ac_i" | sed "$ac_script"`
21631   # 2. Prepend LIBOBJDIR.  When used with automake>=1.10 LIBOBJDIR
21632   #    will be set to the directory where LIBOBJS objects are built.
21633   ac_libobjs="$ac_libobjs \${LIBOBJDIR}$ac_i\$U.$ac_objext"
21634   ac_ltlibobjs="$ac_ltlibobjs \${LIBOBJDIR}$ac_i"'$U.lo'
21635 done
21636 LIBOBJS=$ac_libobjs
21637
21638 LTLIBOBJS=$ac_ltlibobjs
21639
21640
21641
21642
21643         mv -f po/POTFILES po/POTFILES.tmp
21644         sed -e 's/\[.*\] *//' < po/POTFILES.tmp > po/POTFILES
21645         rm -f po/POTFILES.tmp
21646
21647
21648
21649 : ${CONFIG_STATUS=./config.status}
21650 ac_write_fail=0
21651 ac_clean_files_save=$ac_clean_files
21652 ac_clean_files="$ac_clean_files $CONFIG_STATUS"
21653 { $as_echo "$as_me:$LINENO: creating $CONFIG_STATUS" >&5
21654 $as_echo "$as_me: creating $CONFIG_STATUS" >&6;}
21655 cat >$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
21656 #! $SHELL
21657 # Generated by $as_me.
21658 # Run this file to recreate the current configuration.
21659 # Compiler output produced by configure, useful for debugging
21660 # configure, is in config.log if it exists.
21661
21662 debug=false
21663 ac_cs_recheck=false
21664 ac_cs_silent=false
21665 SHELL=\${CONFIG_SHELL-$SHELL}
21666 _ACEOF
21667
21668 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
21669 ## --------------------- ##
21670 ## M4sh Initialization.  ##
21671 ## --------------------- ##
21672
21673 # Be more Bourne compatible
21674 DUALCASE=1; export DUALCASE # for MKS sh
21675 if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
21676   emulate sh
21677   NULLCMD=:
21678   # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
21679   # is contrary to our usage.  Disable this feature.
21680   alias -g '${1+"$@"}'='"$@"'
21681   setopt NO_GLOB_SUBST
21682 else
21683   case `(set -o) 2>/dev/null` in
21684   *posix*) set -o posix ;;
21685 esac
21686
21687 fi
21688
21689
21690
21691
21692 # PATH needs CR
21693 # Avoid depending upon Character Ranges.
21694 as_cr_letters='abcdefghijklmnopqrstuvwxyz'
21695 as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
21696 as_cr_Letters=$as_cr_letters$as_cr_LETTERS
21697 as_cr_digits='0123456789'
21698 as_cr_alnum=$as_cr_Letters$as_cr_digits
21699
21700 as_nl='
21701 '
21702 export as_nl
21703 # Printing a long string crashes Solaris 7 /usr/bin/printf.
21704 as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
21705 as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
21706 as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
21707 if (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
21708   as_echo='printf %s\n'
21709   as_echo_n='printf %s'
21710 else
21711   if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
21712     as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
21713     as_echo_n='/usr/ucb/echo -n'
21714   else
21715     as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
21716     as_echo_n_body='eval
21717       arg=$1;
21718       case $arg in
21719       *"$as_nl"*)
21720         expr "X$arg" : "X\\(.*\\)$as_nl";
21721         arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
21722       esac;
21723       expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
21724     '
21725     export as_echo_n_body
21726     as_echo_n='sh -c $as_echo_n_body as_echo'
21727   fi
21728   export as_echo_body
21729   as_echo='sh -c $as_echo_body as_echo'
21730 fi
21731
21732 # The user is always right.
21733 if test "${PATH_SEPARATOR+set}" != set; then
21734   PATH_SEPARATOR=:
21735   (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
21736     (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
21737       PATH_SEPARATOR=';'
21738   }
21739 fi
21740
21741 # Support unset when possible.
21742 if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then
21743   as_unset=unset
21744 else
21745   as_unset=false
21746 fi
21747
21748
21749 # IFS
21750 # We need space, tab and new line, in precisely that order.  Quoting is
21751 # there to prevent editors from complaining about space-tab.
21752 # (If _AS_PATH_WALK were called with IFS unset, it would disable word
21753 # splitting by setting IFS to empty value.)
21754 IFS=" ""        $as_nl"
21755
21756 # Find who we are.  Look in the path if we contain no directory separator.
21757 case $0 in
21758   *[\\/]* ) as_myself=$0 ;;
21759   *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21760 for as_dir in $PATH
21761 do
21762   IFS=$as_save_IFS
21763   test -z "$as_dir" && as_dir=.
21764   test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
21765 done
21766 IFS=$as_save_IFS
21767
21768      ;;
21769 esac
21770 # We did not find ourselves, most probably we were run as `sh COMMAND'
21771 # in which case we are not to be found in the path.
21772 if test "x$as_myself" = x; then
21773   as_myself=$0
21774 fi
21775 if test ! -f "$as_myself"; then
21776   $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
21777   { (exit 1); exit 1; }
21778 fi
21779
21780 # Work around bugs in pre-3.0 UWIN ksh.
21781 for as_var in ENV MAIL MAILPATH
21782 do ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var
21783 done
21784 PS1='$ '
21785 PS2='> '
21786 PS4='+ '
21787
21788 # NLS nuisances.
21789 LC_ALL=C
21790 export LC_ALL
21791 LANGUAGE=C
21792 export LANGUAGE
21793
21794 # Required to use basename.
21795 if expr a : '\(a\)' >/dev/null 2>&1 &&
21796    test "X`expr 00001 : '.*\(...\)'`" = X001; then
21797   as_expr=expr
21798 else
21799   as_expr=false
21800 fi
21801
21802 if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
21803   as_basename=basename
21804 else
21805   as_basename=false
21806 fi
21807
21808
21809 # Name of the executable.
21810 as_me=`$as_basename -- "$0" ||
21811 $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
21812          X"$0" : 'X\(//\)$' \| \
21813          X"$0" : 'X\(/\)' \| . 2>/dev/null ||
21814 $as_echo X/"$0" |
21815     sed '/^.*\/\([^/][^/]*\)\/*$/{
21816             s//\1/
21817             q
21818           }
21819           /^X\/\(\/\/\)$/{
21820             s//\1/
21821             q
21822           }
21823           /^X\/\(\/\).*/{
21824             s//\1/
21825             q
21826           }
21827           s/.*/./; q'`
21828
21829 # CDPATH.
21830 $as_unset CDPATH
21831
21832
21833
21834   as_lineno_1=$LINENO
21835   as_lineno_2=$LINENO
21836   test "x$as_lineno_1" != "x$as_lineno_2" &&
21837   test "x`expr $as_lineno_1 + 1`" = "x$as_lineno_2" || {
21838
21839   # Create $as_me.lineno as a copy of $as_myself, but with $LINENO
21840   # uniformly replaced by the line number.  The first 'sed' inserts a
21841   # line-number line after each line using $LINENO; the second 'sed'
21842   # does the real work.  The second script uses 'N' to pair each
21843   # line-number line with the line containing $LINENO, and appends
21844   # trailing '-' during substitution so that $LINENO is not a special
21845   # case at line end.
21846   # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the
21847   # scripts with optimization help from Paolo Bonzini.  Blame Lee
21848   # E. McMahon (1931-1989) for sed's syntax.  :-)
21849   sed -n '
21850     p
21851     /[$]LINENO/=
21852   ' <$as_myself |
21853     sed '
21854       s/[$]LINENO.*/&-/
21855       t lineno
21856       b
21857       :lineno
21858       N
21859       :loop
21860       s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/
21861       t loop
21862       s/-\n.*//
21863     ' >$as_me.lineno &&
21864   chmod +x "$as_me.lineno" ||
21865     { $as_echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2
21866    { (exit 1); exit 1; }; }
21867
21868   # Don't try to exec as it changes $[0], causing all sort of problems
21869   # (the dirname of $[0] is not the place where we might find the
21870   # original and so on.  Autoconf is especially sensitive to this).
21871   . "./$as_me.lineno"
21872   # Exit status is that of the last command.
21873   exit
21874 }
21875
21876
21877 if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
21878   as_dirname=dirname
21879 else
21880   as_dirname=false
21881 fi
21882
21883 ECHO_C= ECHO_N= ECHO_T=
21884 case `echo -n x` in
21885 -n*)
21886   case `echo 'x\c'` in
21887   *c*) ECHO_T=' ';;     # ECHO_T is single tab character.
21888   *)   ECHO_C='\c';;
21889   esac;;
21890 *)
21891   ECHO_N='-n';;
21892 esac
21893 if expr a : '\(a\)' >/dev/null 2>&1 &&
21894    test "X`expr 00001 : '.*\(...\)'`" = X001; then
21895   as_expr=expr
21896 else
21897   as_expr=false
21898 fi
21899
21900 rm -f conf$$ conf$$.exe conf$$.file
21901 if test -d conf$$.dir; then
21902   rm -f conf$$.dir/conf$$.file
21903 else
21904   rm -f conf$$.dir
21905   mkdir conf$$.dir 2>/dev/null
21906 fi
21907 if (echo >conf$$.file) 2>/dev/null; then
21908   if ln -s conf$$.file conf$$ 2>/dev/null; then
21909     as_ln_s='ln -s'
21910     # ... but there are two gotchas:
21911     # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
21912     # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
21913     # In both cases, we have to default to `cp -p'.
21914     ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
21915       as_ln_s='cp -p'
21916   elif ln conf$$.file conf$$ 2>/dev/null; then
21917     as_ln_s=ln
21918   else
21919     as_ln_s='cp -p'
21920   fi
21921 else
21922   as_ln_s='cp -p'
21923 fi
21924 rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
21925 rmdir conf$$.dir 2>/dev/null
21926
21927 if mkdir -p . 2>/dev/null; then
21928   as_mkdir_p=:
21929 else
21930   test -d ./-p && rmdir ./-p
21931   as_mkdir_p=false
21932 fi
21933
21934 if test -x / >/dev/null 2>&1; then
21935   as_test_x='test -x'
21936 else
21937   if ls -dL / >/dev/null 2>&1; then
21938     as_ls_L_option=L
21939   else
21940     as_ls_L_option=
21941   fi
21942   as_test_x='
21943     eval sh -c '\''
21944       if test -d "$1"; then
21945         test -d "$1/.";
21946       else
21947         case $1 in
21948         -*)set "./$1";;
21949         esac;
21950         case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in
21951         ???[sx]*):;;*)false;;esac;fi
21952     '\'' sh
21953   '
21954 fi
21955 as_executable_p=$as_test_x
21956
21957 # Sed expression to map a string onto a valid CPP name.
21958 as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
21959
21960 # Sed expression to map a string onto a valid variable name.
21961 as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
21962
21963
21964 exec 6>&1
21965
21966 # Save the log message, to keep $[0] and so on meaningful, and to
21967 # report actual input values of CONFIG_FILES etc. instead of their
21968 # values after options handling.
21969 ac_log="
21970 This file was extended by $as_me, which was
21971 generated by GNU Autoconf 2.63.  Invocation command line was
21972
21973   CONFIG_FILES    = $CONFIG_FILES
21974   CONFIG_HEADERS  = $CONFIG_HEADERS
21975   CONFIG_LINKS    = $CONFIG_LINKS
21976   CONFIG_COMMANDS = $CONFIG_COMMANDS
21977   $ $0 $@
21978
21979 on `(hostname || uname -n) 2>/dev/null | sed 1q`
21980 "
21981
21982 _ACEOF
21983
21984 case $ac_config_files in *"
21985 "*) set x $ac_config_files; shift; ac_config_files=$*;;
21986 esac
21987
21988 case $ac_config_headers in *"
21989 "*) set x $ac_config_headers; shift; ac_config_headers=$*;;
21990 esac
21991
21992
21993 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
21994 # Files that config.status was made for.
21995 config_files="$ac_config_files"
21996 config_headers="$ac_config_headers"
21997 config_commands="$ac_config_commands"
21998
21999 _ACEOF
22000
22001 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
22002 ac_cs_usage="\
22003 \`$as_me' instantiates files from templates according to the
22004 current configuration.
22005
22006 Usage: $0 [OPTION]... [FILE]...
22007
22008   -h, --help       print this help, then exit
22009   -V, --version    print version number and configuration settings, then exit
22010   -q, --quiet, --silent
22011                    do not print progress messages
22012   -d, --debug      don't remove temporary files
22013       --recheck    update $as_me by reconfiguring in the same conditions
22014       --file=FILE[:TEMPLATE]
22015                    instantiate the configuration file FILE
22016       --header=FILE[:TEMPLATE]
22017                    instantiate the configuration header FILE
22018
22019 Configuration files:
22020 $config_files
22021
22022 Configuration headers:
22023 $config_headers
22024
22025 Configuration commands:
22026 $config_commands
22027
22028 Report bugs to <bug-autoconf@gnu.org>."
22029
22030 _ACEOF
22031 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
22032 ac_cs_version="\\
22033 config.status
22034 configured by $0, generated by GNU Autoconf 2.63,
22035   with options \\"`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`\\"
22036
22037 Copyright (C) 2008 Free Software Foundation, Inc.
22038 This config.status script is free software; the Free Software Foundation
22039 gives unlimited permission to copy, distribute and modify it."
22040
22041 ac_pwd='$ac_pwd'
22042 srcdir='$srcdir'
22043 INSTALL='$INSTALL'
22044 test -n "\$AWK" || AWK=awk
22045 _ACEOF
22046
22047 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
22048 # The default lists apply if the user does not specify any file.
22049 ac_need_defaults=:
22050 while test $# != 0
22051 do
22052   case $1 in
22053   --*=*)
22054     ac_option=`expr "X$1" : 'X\([^=]*\)='`
22055     ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
22056     ac_shift=:
22057     ;;
22058   *)
22059     ac_option=$1
22060     ac_optarg=$2
22061     ac_shift=shift
22062     ;;
22063   esac
22064
22065   case $ac_option in
22066   # Handling of the options.
22067   -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
22068     ac_cs_recheck=: ;;
22069   --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
22070     $as_echo "$ac_cs_version"; exit ;;
22071   --debug | --debu | --deb | --de | --d | -d )
22072     debug=: ;;
22073   --file | --fil | --fi | --f )
22074     $ac_shift
22075     case $ac_optarg in
22076     *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
22077     esac
22078     CONFIG_FILES="$CONFIG_FILES '$ac_optarg'"
22079     ac_need_defaults=false;;
22080   --header | --heade | --head | --hea )
22081     $ac_shift
22082     case $ac_optarg in
22083     *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
22084     esac
22085     CONFIG_HEADERS="$CONFIG_HEADERS '$ac_optarg'"
22086     ac_need_defaults=false;;
22087   --he | --h)
22088     # Conflict between --help and --header
22089     { $as_echo "$as_me: error: ambiguous option: $1
22090 Try \`$0 --help' for more information." >&2
22091    { (exit 1); exit 1; }; };;
22092   --help | --hel | -h )
22093     $as_echo "$ac_cs_usage"; exit ;;
22094   -q | -quiet | --quiet | --quie | --qui | --qu | --q \
22095   | -silent | --silent | --silen | --sile | --sil | --si | --s)
22096     ac_cs_silent=: ;;
22097
22098   # This is an error.
22099   -*) { $as_echo "$as_me: error: unrecognized option: $1
22100 Try \`$0 --help' for more information." >&2
22101    { (exit 1); exit 1; }; } ;;
22102
22103   *) ac_config_targets="$ac_config_targets $1"
22104      ac_need_defaults=false ;;
22105
22106   esac
22107   shift
22108 done
22109
22110 ac_configure_extra_args=
22111
22112 if $ac_cs_silent; then
22113   exec 6>/dev/null
22114   ac_configure_extra_args="$ac_configure_extra_args --silent"
22115 fi
22116
22117 _ACEOF
22118 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
22119 if \$ac_cs_recheck; then
22120   set X '$SHELL' '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
22121   shift
22122   \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6
22123   CONFIG_SHELL='$SHELL'
22124   export CONFIG_SHELL
22125   exec "\$@"
22126 fi
22127
22128 _ACEOF
22129 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
22130 exec 5>>config.log
22131 {
22132   echo
22133   sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
22134 ## Running $as_me. ##
22135 _ASBOX
22136   $as_echo "$ac_log"
22137 } >&5
22138
22139 _ACEOF
22140 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
22141 #
22142 # INIT-COMMANDS
22143 #
22144 INTLTOOL_PERL=${INTLTOOL_PERL}
22145
22146
22147 _ACEOF
22148
22149 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
22150
22151 # Handling of arguments.
22152 for ac_config_target in $ac_config_targets
22153 do
22154   case $ac_config_target in
22155     "config.h") CONFIG_HEADERS="$CONFIG_HEADERS config.h" ;;
22156     "default-1") CONFIG_COMMANDS="$CONFIG_COMMANDS default-1" ;;
22157     "default-2") CONFIG_COMMANDS="$CONFIG_COMMANDS default-2" ;;
22158     "Makefile") CONFIG_FILES="$CONFIG_FILES Makefile" ;;
22159     "utils/Makefile") CONFIG_FILES="$CONFIG_FILES utils/Makefile" ;;
22160     "driver/Makefile") CONFIG_FILES="$CONFIG_FILES driver/Makefile" ;;
22161     "hacks/Makefile") CONFIG_FILES="$CONFIG_FILES hacks/Makefile" ;;
22162     "hacks/glx/Makefile") CONFIG_FILES="$CONFIG_FILES hacks/glx/Makefile" ;;
22163     "po/Makefile.in") CONFIG_FILES="$CONFIG_FILES po/Makefile.in" ;;
22164     "driver/XScreenSaver.ad") CONFIG_FILES="$CONFIG_FILES driver/XScreenSaver.ad" ;;
22165
22166   *) { { $as_echo "$as_me:$LINENO: error: invalid argument: $ac_config_target" >&5
22167 $as_echo "$as_me: error: invalid argument: $ac_config_target" >&2;}
22168    { (exit 1); exit 1; }; };;
22169   esac
22170 done
22171
22172
22173 # If the user did not use the arguments to specify the items to instantiate,
22174 # then the envvar interface is used.  Set only those that are not.
22175 # We use the long form for the default assignment because of an extremely
22176 # bizarre bug on SunOS 4.1.3.
22177 if $ac_need_defaults; then
22178   test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
22179   test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
22180   test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands
22181 fi
22182
22183 # Have a temporary directory for convenience.  Make it in the build tree
22184 # simply because there is no reason against having it here, and in addition,
22185 # creating and moving files from /tmp can sometimes cause problems.
22186 # Hook for its removal unless debugging.
22187 # Note that there is a small window in which the directory will not be cleaned:
22188 # after its creation but before its name has been assigned to `$tmp'.
22189 $debug ||
22190 {
22191   tmp=
22192   trap 'exit_status=$?
22193   { test -z "$tmp" || test ! -d "$tmp" || rm -fr "$tmp"; } && exit $exit_status
22194 ' 0
22195   trap '{ (exit 1); exit 1; }' 1 2 13 15
22196 }
22197 # Create a (secure) tmp directory for tmp files.
22198
22199 {
22200   tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
22201   test -n "$tmp" && test -d "$tmp"
22202 }  ||
22203 {
22204   tmp=./conf$$-$RANDOM
22205   (umask 077 && mkdir "$tmp")
22206 } ||
22207 {
22208    $as_echo "$as_me: cannot create a temporary directory in ." >&2
22209    { (exit 1); exit 1; }
22210 }
22211
22212 # Set up the scripts for CONFIG_FILES section.
22213 # No need to generate them if there are no CONFIG_FILES.
22214 # This happens for instance with `./config.status config.h'.
22215 if test -n "$CONFIG_FILES"; then
22216
22217
22218 ac_cr='\r'
22219 ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null`
22220 if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then
22221   ac_cs_awk_cr='\\r'
22222 else
22223   ac_cs_awk_cr=$ac_cr
22224 fi
22225
22226 echo 'BEGIN {' >"$tmp/subs1.awk" &&
22227 _ACEOF
22228
22229
22230 {
22231   echo "cat >conf$$subs.awk <<_ACEOF" &&
22232   echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' &&
22233   echo "_ACEOF"
22234 } >conf$$subs.sh ||
22235   { { $as_echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5
22236 $as_echo "$as_me: error: could not make $CONFIG_STATUS" >&2;}
22237    { (exit 1); exit 1; }; }
22238 ac_delim_num=`echo "$ac_subst_vars" | grep -c '$'`
22239 ac_delim='%!_!# '
22240 for ac_last_try in false false false false false :; do
22241   . ./conf$$subs.sh ||
22242     { { $as_echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5
22243 $as_echo "$as_me: error: could not make $CONFIG_STATUS" >&2;}
22244    { (exit 1); exit 1; }; }
22245
22246   ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X`
22247   if test $ac_delim_n = $ac_delim_num; then
22248     break
22249   elif $ac_last_try; then
22250     { { $as_echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5
22251 $as_echo "$as_me: error: could not make $CONFIG_STATUS" >&2;}
22252    { (exit 1); exit 1; }; }
22253   else
22254     ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
22255   fi
22256 done
22257 rm -f conf$$subs.sh
22258
22259 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
22260 cat >>"\$tmp/subs1.awk" <<\\_ACAWK &&
22261 _ACEOF
22262 sed -n '
22263 h
22264 s/^/S["/; s/!.*/"]=/
22265 p
22266 g
22267 s/^[^!]*!//
22268 :repl
22269 t repl
22270 s/'"$ac_delim"'$//
22271 t delim
22272 :nl
22273 h
22274 s/\(.\{148\}\).*/\1/
22275 t more1
22276 s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/
22277 p
22278 n
22279 b repl
22280 :more1
22281 s/["\\]/\\&/g; s/^/"/; s/$/"\\/
22282 p
22283 g
22284 s/.\{148\}//
22285 t nl
22286 :delim
22287 h
22288 s/\(.\{148\}\).*/\1/
22289 t more2
22290 s/["\\]/\\&/g; s/^/"/; s/$/"/
22291 p
22292 b
22293 :more2
22294 s/["\\]/\\&/g; s/^/"/; s/$/"\\/
22295 p
22296 g
22297 s/.\{148\}//
22298 t delim
22299 ' <conf$$subs.awk | sed '
22300 /^[^""]/{
22301   N
22302   s/\n//
22303 }
22304 ' >>$CONFIG_STATUS || ac_write_fail=1
22305 rm -f conf$$subs.awk
22306 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
22307 _ACAWK
22308 cat >>"\$tmp/subs1.awk" <<_ACAWK &&
22309   for (key in S) S_is_set[key] = 1
22310   FS = "\a"
22311
22312 }
22313 {
22314   line = $ 0
22315   nfields = split(line, field, "@")
22316   substed = 0
22317   len = length(field[1])
22318   for (i = 2; i < nfields; i++) {
22319     key = field[i]
22320     keylen = length(key)
22321     if (S_is_set[key]) {
22322       value = S[key]
22323       line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3)
22324       len += length(value) + length(field[++i])
22325       substed = 1
22326     } else
22327       len += 1 + keylen
22328   }
22329
22330   print line
22331 }
22332
22333 _ACAWK
22334 _ACEOF
22335 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
22336 if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then
22337   sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g"
22338 else
22339   cat
22340 fi < "$tmp/subs1.awk" > "$tmp/subs.awk" \
22341   || { { $as_echo "$as_me:$LINENO: error: could not setup config files machinery" >&5
22342 $as_echo "$as_me: error: could not setup config files machinery" >&2;}
22343    { (exit 1); exit 1; }; }
22344 _ACEOF
22345
22346 # VPATH may cause trouble with some makes, so we remove $(srcdir),
22347 # ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and
22348 # trailing colons and then remove the whole line if VPATH becomes empty
22349 # (actually we leave an empty line to preserve line numbers).
22350 if test "x$srcdir" = x.; then
22351   ac_vpsub='/^[  ]*VPATH[        ]*=/{
22352 s/:*\$(srcdir):*/:/
22353 s/:*\${srcdir}:*/:/
22354 s/:*@srcdir@:*/:/
22355 s/^\([^=]*=[     ]*\):*/\1/
22356 s/:*$//
22357 s/^[^=]*=[       ]*$//
22358 }'
22359 fi
22360
22361 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
22362 fi # test -n "$CONFIG_FILES"
22363
22364 # Set up the scripts for CONFIG_HEADERS section.
22365 # No need to generate them if there are no CONFIG_HEADERS.
22366 # This happens for instance with `./config.status Makefile'.
22367 if test -n "$CONFIG_HEADERS"; then
22368 cat >"$tmp/defines.awk" <<\_ACAWK ||
22369 BEGIN {
22370 _ACEOF
22371
22372 # Transform confdefs.h into an awk script `defines.awk', embedded as
22373 # here-document in config.status, that substitutes the proper values into
22374 # config.h.in to produce config.h.
22375
22376 # Create a delimiter string that does not exist in confdefs.h, to ease
22377 # handling of long lines.
22378 ac_delim='%!_!# '
22379 for ac_last_try in false false :; do
22380   ac_t=`sed -n "/$ac_delim/p" confdefs.h`
22381   if test -z "$ac_t"; then
22382     break
22383   elif $ac_last_try; then
22384     { { $as_echo "$as_me:$LINENO: error: could not make $CONFIG_HEADERS" >&5
22385 $as_echo "$as_me: error: could not make $CONFIG_HEADERS" >&2;}
22386    { (exit 1); exit 1; }; }
22387   else
22388     ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
22389   fi
22390 done
22391
22392 # For the awk script, D is an array of macro values keyed by name,
22393 # likewise P contains macro parameters if any.  Preserve backslash
22394 # newline sequences.
22395
22396 ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]*
22397 sed -n '
22398 s/.\{148\}/&'"$ac_delim"'/g
22399 t rset
22400 :rset
22401 s/^[     ]*#[    ]*define[       ][      ]*/ /
22402 t def
22403 d
22404 :def
22405 s/\\$//
22406 t bsnl
22407 s/["\\]/\\&/g
22408 s/^ \('"$ac_word_re"'\)\(([^()]*)\)[     ]*\(.*\)/P["\1"]="\2"\
22409 D["\1"]=" \3"/p
22410 s/^ \('"$ac_word_re"'\)[         ]*\(.*\)/D["\1"]=" \2"/p
22411 d
22412 :bsnl
22413 s/["\\]/\\&/g
22414 s/^ \('"$ac_word_re"'\)\(([^()]*)\)[     ]*\(.*\)/P["\1"]="\2"\
22415 D["\1"]=" \3\\\\\\n"\\/p
22416 t cont
22417 s/^ \('"$ac_word_re"'\)[         ]*\(.*\)/D["\1"]=" \2\\\\\\n"\\/p
22418 t cont
22419 d
22420 :cont
22421 n
22422 s/.\{148\}/&'"$ac_delim"'/g
22423 t clear
22424 :clear
22425 s/\\$//
22426 t bsnlc
22427 s/["\\]/\\&/g; s/^/"/; s/$/"/p
22428 d
22429 :bsnlc
22430 s/["\\]/\\&/g; s/^/"/; s/$/\\\\\\n"\\/p
22431 b cont
22432 ' <confdefs.h | sed '
22433 s/'"$ac_delim"'/"\\\
22434 "/g' >>$CONFIG_STATUS || ac_write_fail=1
22435
22436 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
22437   for (key in D) D_is_set[key] = 1
22438   FS = "\a"
22439 }
22440 /^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\$)/ {
22441   line = \$ 0
22442   split(line, arg, " ")
22443   if (arg[1] == "#") {
22444     defundef = arg[2]
22445     mac1 = arg[3]
22446   } else {
22447     defundef = substr(arg[1], 2)
22448     mac1 = arg[2]
22449   }
22450   split(mac1, mac2, "(") #)
22451   macro = mac2[1]
22452   prefix = substr(line, 1, index(line, defundef) - 1)
22453   if (D_is_set[macro]) {
22454     # Preserve the white space surrounding the "#".
22455     print prefix "define", macro P[macro] D[macro]
22456     next
22457   } else {
22458     # Replace #undef with comments.  This is necessary, for example,
22459     # in the case of _POSIX_SOURCE, which is predefined and required
22460     # on some systems where configure will not decide to define it.
22461     if (defundef == "undef") {
22462       print "/*", prefix defundef, macro, "*/"
22463       next
22464     }
22465   }
22466 }
22467 { print }
22468 _ACAWK
22469 _ACEOF
22470 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
22471   { { $as_echo "$as_me:$LINENO: error: could not setup config headers machinery" >&5
22472 $as_echo "$as_me: error: could not setup config headers machinery" >&2;}
22473    { (exit 1); exit 1; }; }
22474 fi # test -n "$CONFIG_HEADERS"
22475
22476
22477 eval set X "  :F $CONFIG_FILES  :H $CONFIG_HEADERS    :C $CONFIG_COMMANDS"
22478 shift
22479 for ac_tag
22480 do
22481   case $ac_tag in
22482   :[FHLC]) ac_mode=$ac_tag; continue;;
22483   esac
22484   case $ac_mode$ac_tag in
22485   :[FHL]*:*);;
22486   :L* | :C*:*) { { $as_echo "$as_me:$LINENO: error: invalid tag $ac_tag" >&5
22487 $as_echo "$as_me: error: invalid tag $ac_tag" >&2;}
22488    { (exit 1); exit 1; }; };;
22489   :[FH]-) ac_tag=-:-;;
22490   :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
22491   esac
22492   ac_save_IFS=$IFS
22493   IFS=:
22494   set x $ac_tag
22495   IFS=$ac_save_IFS
22496   shift
22497   ac_file=$1
22498   shift
22499
22500   case $ac_mode in
22501   :L) ac_source=$1;;
22502   :[FH])
22503     ac_file_inputs=
22504     for ac_f
22505     do
22506       case $ac_f in
22507       -) ac_f="$tmp/stdin";;
22508       *) # Look for the file first in the build tree, then in the source tree
22509          # (if the path is not absolute).  The absolute path cannot be DOS-style,
22510          # because $ac_f cannot contain `:'.
22511          test -f "$ac_f" ||
22512            case $ac_f in
22513            [\\/$]*) false;;
22514            *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
22515            esac ||
22516            { { $as_echo "$as_me:$LINENO: error: cannot find input file: $ac_f" >&5
22517 $as_echo "$as_me: error: cannot find input file: $ac_f" >&2;}
22518    { (exit 1); exit 1; }; };;
22519       esac
22520       case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
22521       ac_file_inputs="$ac_file_inputs '$ac_f'"
22522     done
22523
22524     # Let's still pretend it is `configure' which instantiates (i.e., don't
22525     # use $as_me), people would be surprised to read:
22526     #    /* config.h.  Generated by config.status.  */
22527     configure_input='Generated from '`
22528           $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g'
22529         `' by configure.'
22530     if test x"$ac_file" != x-; then
22531       configure_input="$ac_file.  $configure_input"
22532       { $as_echo "$as_me:$LINENO: creating $ac_file" >&5
22533 $as_echo "$as_me: creating $ac_file" >&6;}
22534     fi
22535     # Neutralize special characters interpreted by sed in replacement strings.
22536     case $configure_input in #(
22537     *\&* | *\|* | *\\* )
22538        ac_sed_conf_input=`$as_echo "$configure_input" |
22539        sed 's/[\\\\&|]/\\\\&/g'`;; #(
22540     *) ac_sed_conf_input=$configure_input;;
22541     esac
22542
22543     case $ac_tag in
22544     *:-:* | *:-) cat >"$tmp/stdin" \
22545       || { { $as_echo "$as_me:$LINENO: error: could not create $ac_file" >&5
22546 $as_echo "$as_me: error: could not create $ac_file" >&2;}
22547    { (exit 1); exit 1; }; } ;;
22548     esac
22549     ;;
22550   esac
22551
22552   ac_dir=`$as_dirname -- "$ac_file" ||
22553 $as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
22554          X"$ac_file" : 'X\(//\)[^/]' \| \
22555          X"$ac_file" : 'X\(//\)$' \| \
22556          X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
22557 $as_echo X"$ac_file" |
22558     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
22559             s//\1/
22560             q
22561           }
22562           /^X\(\/\/\)[^/].*/{
22563             s//\1/
22564             q
22565           }
22566           /^X\(\/\/\)$/{
22567             s//\1/
22568             q
22569           }
22570           /^X\(\/\).*/{
22571             s//\1/
22572             q
22573           }
22574           s/.*/./; q'`
22575   { as_dir="$ac_dir"
22576   case $as_dir in #(
22577   -*) as_dir=./$as_dir;;
22578   esac
22579   test -d "$as_dir" || { $as_mkdir_p && mkdir -p "$as_dir"; } || {
22580     as_dirs=
22581     while :; do
22582       case $as_dir in #(
22583       *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
22584       *) as_qdir=$as_dir;;
22585       esac
22586       as_dirs="'$as_qdir' $as_dirs"
22587       as_dir=`$as_dirname -- "$as_dir" ||
22588 $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
22589          X"$as_dir" : 'X\(//\)[^/]' \| \
22590          X"$as_dir" : 'X\(//\)$' \| \
22591          X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
22592 $as_echo X"$as_dir" |
22593     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
22594             s//\1/
22595             q
22596           }
22597           /^X\(\/\/\)[^/].*/{
22598             s//\1/
22599             q
22600           }
22601           /^X\(\/\/\)$/{
22602             s//\1/
22603             q
22604           }
22605           /^X\(\/\).*/{
22606             s//\1/
22607             q
22608           }
22609           s/.*/./; q'`
22610       test -d "$as_dir" && break
22611     done
22612     test -z "$as_dirs" || eval "mkdir $as_dirs"
22613   } || test -d "$as_dir" || { { $as_echo "$as_me:$LINENO: error: cannot create directory $as_dir" >&5
22614 $as_echo "$as_me: error: cannot create directory $as_dir" >&2;}
22615    { (exit 1); exit 1; }; }; }
22616   ac_builddir=.
22617
22618 case "$ac_dir" in
22619 .) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
22620 *)
22621   ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
22622   # A ".." for each directory in $ac_dir_suffix.
22623   ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
22624   case $ac_top_builddir_sub in
22625   "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
22626   *)  ac_top_build_prefix=$ac_top_builddir_sub/ ;;
22627   esac ;;
22628 esac
22629 ac_abs_top_builddir=$ac_pwd
22630 ac_abs_builddir=$ac_pwd$ac_dir_suffix
22631 # for backward compatibility:
22632 ac_top_builddir=$ac_top_build_prefix
22633
22634 case $srcdir in
22635   .)  # We are building in place.
22636     ac_srcdir=.
22637     ac_top_srcdir=$ac_top_builddir_sub
22638     ac_abs_top_srcdir=$ac_pwd ;;
22639   [\\/]* | ?:[\\/]* )  # Absolute name.
22640     ac_srcdir=$srcdir$ac_dir_suffix;
22641     ac_top_srcdir=$srcdir
22642     ac_abs_top_srcdir=$srcdir ;;
22643   *) # Relative name.
22644     ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
22645     ac_top_srcdir=$ac_top_build_prefix$srcdir
22646     ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
22647 esac
22648 ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
22649
22650
22651   case $ac_mode in
22652   :F)
22653   #
22654   # CONFIG_FILE
22655   #
22656
22657   case $INSTALL in
22658   [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
22659   *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;;
22660   esac
22661 _ACEOF
22662
22663 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
22664 # If the template does not know about datarootdir, expand it.
22665 # FIXME: This hack should be removed a few years after 2.60.
22666 ac_datarootdir_hack=; ac_datarootdir_seen=
22667
22668 ac_sed_dataroot='
22669 /datarootdir/ {
22670   p
22671   q
22672 }
22673 /@datadir@/p
22674 /@docdir@/p
22675 /@infodir@/p
22676 /@localedir@/p
22677 /@mandir@/p
22678 '
22679 case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in
22680 *datarootdir*) ac_datarootdir_seen=yes;;
22681 *@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
22682   { $as_echo "$as_me:$LINENO: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
22683 $as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
22684 _ACEOF
22685 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
22686   ac_datarootdir_hack='
22687   s&@datadir@&$datadir&g
22688   s&@docdir@&$docdir&g
22689   s&@infodir@&$infodir&g
22690   s&@localedir@&$localedir&g
22691   s&@mandir@&$mandir&g
22692     s&\\\${datarootdir}&$datarootdir&g' ;;
22693 esac
22694 _ACEOF
22695
22696 # Neutralize VPATH when `$srcdir' = `.'.
22697 # Shell code in configure.ac might set extrasub.
22698 # FIXME: do we really want to maintain this feature?
22699 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
22700 ac_sed_extra="$ac_vpsub
22701 $extrasub
22702 _ACEOF
22703 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
22704 :t
22705 /@[a-zA-Z_][a-zA-Z_0-9]*@/!b
22706 s|@configure_input@|$ac_sed_conf_input|;t t
22707 s&@top_builddir@&$ac_top_builddir_sub&;t t
22708 s&@top_build_prefix@&$ac_top_build_prefix&;t t
22709 s&@srcdir@&$ac_srcdir&;t t
22710 s&@abs_srcdir@&$ac_abs_srcdir&;t t
22711 s&@top_srcdir@&$ac_top_srcdir&;t t
22712 s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
22713 s&@builddir@&$ac_builddir&;t t
22714 s&@abs_builddir@&$ac_abs_builddir&;t t
22715 s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
22716 s&@INSTALL@&$ac_INSTALL&;t t
22717 $ac_datarootdir_hack
22718 "
22719 eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$tmp/subs.awk" >$tmp/out \
22720   || { { $as_echo "$as_me:$LINENO: error: could not create $ac_file" >&5
22721 $as_echo "$as_me: error: could not create $ac_file" >&2;}
22722    { (exit 1); exit 1; }; }
22723
22724 test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
22725   { ac_out=`sed -n '/\${datarootdir}/p' "$tmp/out"`; test -n "$ac_out"; } &&
22726   { ac_out=`sed -n '/^[  ]*datarootdir[  ]*:*=/p' "$tmp/out"`; test -z "$ac_out"; } &&
22727   { $as_echo "$as_me:$LINENO: WARNING: $ac_file contains a reference to the variable \`datarootdir'
22728 which seems to be undefined.  Please make sure it is defined." >&5
22729 $as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
22730 which seems to be undefined.  Please make sure it is defined." >&2;}
22731
22732   rm -f "$tmp/stdin"
22733   case $ac_file in
22734   -) cat "$tmp/out" && rm -f "$tmp/out";;
22735   *) rm -f "$ac_file" && mv "$tmp/out" "$ac_file";;
22736   esac \
22737   || { { $as_echo "$as_me:$LINENO: error: could not create $ac_file" >&5
22738 $as_echo "$as_me: error: could not create $ac_file" >&2;}
22739    { (exit 1); exit 1; }; }
22740  ;;
22741   :H)
22742   #
22743   # CONFIG_HEADER
22744   #
22745   if test x"$ac_file" != x-; then
22746     {
22747       $as_echo "/* $configure_input  */" \
22748       && eval '$AWK -f "$tmp/defines.awk"' "$ac_file_inputs"
22749     } >"$tmp/config.h" \
22750       || { { $as_echo "$as_me:$LINENO: error: could not create $ac_file" >&5
22751 $as_echo "$as_me: error: could not create $ac_file" >&2;}
22752    { (exit 1); exit 1; }; }
22753     if diff "$ac_file" "$tmp/config.h" >/dev/null 2>&1; then
22754       { $as_echo "$as_me:$LINENO: $ac_file is unchanged" >&5
22755 $as_echo "$as_me: $ac_file is unchanged" >&6;}
22756     else
22757       rm -f "$ac_file"
22758       mv "$tmp/config.h" "$ac_file" \
22759         || { { $as_echo "$as_me:$LINENO: error: could not create $ac_file" >&5
22760 $as_echo "$as_me: error: could not create $ac_file" >&2;}
22761    { (exit 1); exit 1; }; }
22762     fi
22763   else
22764     $as_echo "/* $configure_input  */" \
22765       && eval '$AWK -f "$tmp/defines.awk"' "$ac_file_inputs" \
22766       || { { $as_echo "$as_me:$LINENO: error: could not create -" >&5
22767 $as_echo "$as_me: error: could not create -" >&2;}
22768    { (exit 1); exit 1; }; }
22769   fi
22770  ;;
22771
22772   :C)  { $as_echo "$as_me:$LINENO: executing $ac_file commands" >&5
22773 $as_echo "$as_me: executing $ac_file commands" >&6;}
22774  ;;
22775   esac
22776
22777
22778   case $ac_file$ac_mode in
22779     "default-1":C)
22780
22781 sed -e "s:@INTLTOOL_PERL@:${INTLTOOL_PERL}:;" < ${srcdir}/intltool-extract.in > intltool-extract.out
22782 if cmp -s intltool-extract intltool-extract.out 2>/dev/null; then
22783   rm -f intltool-extract.out
22784 else
22785   mv -f intltool-extract.out intltool-extract
22786 fi
22787 chmod ugo+x intltool-extract
22788 chmod u+w intltool-extract
22789
22790 sed -e "s:@INTLTOOL_PERL@:${INTLTOOL_PERL}:;" < ${srcdir}/intltool-merge.in > intltool-merge.out
22791 if cmp -s intltool-merge intltool-merge.out 2>/dev/null; then
22792   rm -f intltool-merge.out
22793 else
22794   mv -f intltool-merge.out intltool-merge
22795 fi
22796 chmod ugo+x intltool-merge
22797 chmod u+w intltool-merge
22798
22799 sed -e "s:@INTLTOOL_PERL@:${INTLTOOL_PERL}:;" < ${srcdir}/intltool-update.in > intltool-update.out
22800 if cmp -s intltool-update intltool-update.out 2>/dev/null; then
22801   rm -f intltool-update.out
22802 else
22803   mv -f intltool-update.out intltool-update
22804 fi
22805 chmod ugo+x intltool-update
22806 chmod u+w intltool-update
22807
22808  ;;
22809     "default-2":C) case "$CONFIG_FILES" in *po/Makefile.in*)
22810         rm -f po/stamp-it po/stamp-it.tmp
22811         > po/stamp-it.tmp
22812         sed -e "/POTFILES =/r po/POTFILES" po/Makefile.in > po/Makefile
22813         mv po/stamp-it.tmp po/stamp-it
22814       esac ;;
22815
22816   esac
22817 done # for ac_tag
22818
22819
22820 { (exit 0); exit 0; }
22821 _ACEOF
22822 chmod +x $CONFIG_STATUS
22823 ac_clean_files=$ac_clean_files_save
22824
22825 test $ac_write_fail = 0 ||
22826   { { $as_echo "$as_me:$LINENO: error: write failure creating $CONFIG_STATUS" >&5
22827 $as_echo "$as_me: error: write failure creating $CONFIG_STATUS" >&2;}
22828    { (exit 1); exit 1; }; }
22829
22830
22831 # configure is writing to config.log, and then calls config.status.
22832 # config.status does its own redirection, appending to config.log.
22833 # Unfortunately, on DOS this fails, as config.log is still kept open
22834 # by configure, so config.status won't be able to write to it; its
22835 # output is simply discarded.  So we exec the FD to /dev/null,
22836 # effectively closing config.log, so it can be properly (re)opened and
22837 # appended to by config.status.  When coming back to configure, we
22838 # need to make the FD available again.
22839 if test "$no_create" != yes; then
22840   ac_cs_success=:
22841   ac_config_status_args=
22842   test "$silent" = yes &&
22843     ac_config_status_args="$ac_config_status_args --quiet"
22844   exec 5>/dev/null
22845   $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
22846   exec 5>>config.log
22847   # Use ||, not &&, to avoid exiting from the if with $? = 1, which
22848   # would make configure fail if this is the last instruction.
22849   $ac_cs_success || { (exit 1); exit 1; }
22850 fi
22851 if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
22852   { $as_echo "$as_me:$LINENO: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
22853 $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}
22854 fi
22855
22856
22857 ###############################################################################
22858 #
22859 #       Print some warnings at the end.
22860 #
22861 ###############################################################################
22862
22863 warn_prefix_1="    Warning:"
22864 warn_prefix_2="       Note:"
22865 warn_prefix="$warn_prefix_1"
22866
22867 warning=no
22868 warnsep='    #################################################################'
22869
22870 warnpre() {
22871   if test "$warning" = no ; then
22872     echo '' ; echo "$warnsep" ; echo ''
22873     warning=yes
22874   fi
22875 }
22876
22877 warn() {
22878   warnpre
22879   if test "$warning" = long ; then echo '' ; fi
22880   warning=yes
22881   rest="$@"
22882   echo "$warn_prefix $rest"
22883 }
22884
22885 warnL() {
22886   was=$warning
22887   warnpre
22888   warning=yes
22889   if test "$was" != no ; then echo '' ; fi
22890   rest="$@"
22891   echo "$warn_prefix $rest"
22892 }
22893
22894 warn2() {
22895   rest="$@"
22896   echo "             $rest"
22897   warning=long
22898 }
22899
22900 note() {
22901   warn_prefix="$warn_prefix_2"
22902   warn $@
22903   warn_prefix="$warn_prefix_1"
22904 }
22905
22906 noteL() {
22907   warn_prefix="$warn_prefix_2"
22908   warnL $@
22909   warn_prefix="$warn_prefix_1"
22910 }
22911
22912
22913 if test "$with_sgi_req" = yes -a "$have_sgi" = no ; then
22914   warn 'The SGI saver extension was requested, but was not found.'
22915 fi
22916
22917 if test "$with_xidle_req" = yes -a "$have_xidle" = no ; then
22918   warn 'The XIdle extension was requested, but was not found.'
22919 fi
22920
22921 if test "$with_xshm_req" = yes -a "$have_xshm" = no ; then
22922   warn 'The XSHM extension was requested, but was not found.'
22923 fi
22924
22925 if test "$with_xdbe_req" = yes -a "$have_xdbe" = no ; then
22926   warn 'The DOUBLE-BUFFER extension was requested, but was not found.'
22927 fi
22928
22929 if test "$with_sgivc_req" = yes -a "$have_sgivc" = no ; then
22930   warn 'The SGI-VIDEO-CONTROL extension was requested, but was not found.'
22931 fi
22932
22933 if test "$with_dpms_req" = yes -a "$have_dpms" = no ; then
22934   warn 'The DPMS extension was requested, but was not found.'
22935 fi
22936
22937 if test "$with_xinerama_req" = yes -a "$have_xinerama" = no ; then
22938   warn 'The Xinerama extension was requested, but was not found.'
22939 fi
22940
22941 if test "$with_xf86vmode_req" = yes -a "$have_xf86vmode" = no ; then
22942   warn 'The XF86VMODE extension was requested, but was not found.'
22943 fi
22944
22945 if test "$with_randr_req" = yes -a "$have_randr" = no ; then
22946   warn 'The RANDR extension was requested, but was not found.'
22947 fi
22948
22949 if test "$with_proc_interrupts_req" = yes -a "$have_proc_interrupts" = no; then
22950   warn "Checking of /proc/interrupts was requested, but it's bogus."
22951 fi
22952
22953 if test "$pkg_config" = false ; then
22954   warnL 'The "pkg-config" program was not found.  Without that,'
22955   warn2 "detection of the various GTK libraries won't work."
22956 else
22957   pkgerr=`$pkg_config --list-all 2>&1 >/dev/null`
22958   if test "x$pkgerr" != "x" ; then
22959     warnL 'The "pkg-config" program produces errors.  This often causes'
22960     warn2 "detection of the various GTK libraries to malfunction."
22961     warn2 "The errors are:"
22962     echo ''
22963     echo "$pkgerr" | sed 's/^/             > /g'
22964   fi
22965 fi
22966
22967 if test "$gtk_halfassed" != no ; then
22968   warnL "GTK version $gtk_halfassed was found, but at least one supporting"
22969   warn2 "library ($gtk_halfassed_lib) was not, so GTK can't be used."
22970   warn2 "Perhaps some of the development packages are not installed?"
22971   if test "$have_gtk" = yes ; then
22972     v="$ac_gtk_version_string"
22973     warn2 "GTK $v is also installed, so it will be used instead."
22974     warn2 "Please read the above output and the \`config.log' file"
22975     warn2 "for more details."
22976   fi
22977 fi
22978
22979 motif_warn2() {
22980   warn2 'Though the Motif front-end to xscreensaver is still'
22981   warn2 'maintained, it is no longer being updated with new'
22982   warn2 'features: all new development on the xscreensaver-demo'
22983   warn2 'program is happening in the GTK version, and not in the'
22984   warn2 'Motif version.  It is recommended that you build against'
22985   warn2 'GTK instead of Motif.  See <http://www.gtk.org/>.'
22986 }
22987
22988 if test "$have_motif" = no -a "$have_gtk" = no; then
22989
22990   if test "$with_motif" = yes; then
22991     warnL "Neither the GTK nor Motif libraries were found; the"
22992     warn2 "\`xscreensaver-demo' program requires one of these."
22993     echo ''
22994     motif_warn2
22995   else
22996     warnL "The GTK libraries do not seem to be available; the"
22997     warn2 "\`xscreensaver-demo' program requires them."
22998 #   echo ''
22999 #   warn2 'You can use Motif or Lesstif instead of GTK (use the'
23000 #   warn2 "\`--with-motif' option) but that is NOT recommended."
23001 #   motif_warn2
23002   fi
23003
23004 elif test "$with_motif_req" = yes -a "$have_motif" = no ; then
23005   warnL "Use of Motif was requested, but it wasn't found;"
23006   warn2 "Gtk will be used instead."
23007
23008 elif test "$jurassic_gtk" = yes ; then
23009
23010   pref_gtk=2.0
23011
23012   v="$ac_gtk_version_string"
23013   if test "$with_gtk_req" = yes -a "$ac_gtk_version" = "unknown" ; then
23014     warnL "Use of Gtk was requested, but its version number is unknown;"
23015   elif test "$with_gtk_req" = yes ; then
23016     warnL "Use of Gtk was requested, but it is version $v;"
23017   else
23018     warnL "Gtk was found on this system, but it is version $v;"
23019   fi
23020
23021   warn2 "Gtk $pref_gtk or newer is required."
23022
23023 elif test "$with_gtk_req" = yes -a "$have_gtk" = no ; then
23024   warnL "Use of Gtk was requested, but it wasn't found."
23025 fi
23026
23027
23028 if test "$have_gtk" = yes -a "$have_gdk_pixbuf" = no ; then
23029   warn  "GTK is being used, but the GDK-Pixbuf library and/or"
23030   warn2 "headers were not found.  That can't be good.  Please"
23031   warn2 "install the GDK-Pixbuf development kit and re-configure."
23032 fi
23033
23034 if test "$have_motif" = yes -a "$have_lesstif" = yes ; then
23035
23036   preferred_lesstif=0.92
23037
23038   if test "$lesstif_version" = unknown; then
23039     warnL "Unable to determine the LessTif version number!"
23040     warn2 "Make sure you are using version $preferred_lesstif or newer."
23041     warn2 "See <http://www.lesstif.org/>."
23042
23043   elif test \! $lesstif_version -gt 82; then
23044     warnL "LessTif version $lesstif_version_string is being used."
23045     warn2 "LessTif versions 0.82 and earlier are too buggy to"
23046     warn2 "use with XScreenSaver; it is strongly recommended"
23047     warn2 "that you upgrade to at least version $preferred_lesstif!"
23048     warn2 "See <http://www.lesstif.org/>."
23049   fi
23050 fi
23051
23052
23053 if test "$have_motif" = yes -a "$have_gtk" = no ; then
23054   warn  'Motif is being used, and GTK is not.'
23055   echo  ''
23056   motif_warn2
23057 fi
23058
23059
23060 if test "$with_xpm_req" = yes -a "$have_xpm" = no; then
23061   warnL 'Use of XPM was requested, but it was not found.'
23062 fi
23063
23064 if test "$with_gdk_pixbuf_req" = yes  -a "$have_gdk_pixbuf" = no; then
23065   warnL 'Use of GDK-Pixbuf was requested, but it was not found.'
23066 fi
23067
23068 if test "$have_gdk_pixbuf" = no -o "$gdk_pixbuf_halfassed" = yes || \
23069    test "$have_gdk_pixbuf" = no -a "$have_xpm" = no ; then
23070
23071   if test "$with_gdk_pixbuf_req" = yes ; then
23072     true
23073   elif test "$with_gdk_pixbuf_req" = no ; then
23074     warnL 'The GDK-Pixbuf library is not being used.'
23075   else
23076     warnL 'The GDK-Pixbuf library was not found.'
23077   fi
23078
23079   if test "$with_xpm_req" = yes -o "$have_xpm" = yes ; then
23080     true
23081   elif test "$with_xpm_req" = no ; then
23082     warnL 'The XPM library is not being used.'
23083   else
23084     warnL 'The XPM library was not found.'
23085   fi
23086
23087   if test "$have_gdk_pixbuf" = no -a "$have_xpm" = yes ; then
23088     warn2 'The XPM library is being used instead.'
23089   fi
23090
23091   if test "$gdk_pixbuf_halfassed" = yes ; then
23092     echo ''
23093     warn2 'More specifically, we found the headers, but not the'
23094     warn2 'libraries; so either GDK-Pixbuf is half-installed on this'
23095     warn2 "system, or something else went wrong.  The \`config.log'"
23096     warn2 'file might contain some clues.'
23097   fi
23098
23099   echo ''
23100   warn2 'Some of the demos will not use images as much as they could.'
23101   warn2 'You should consider installing GDK-Pixbuf and re-running'
23102   warn2 'configure.  (GDK-Pixbuf is recommended over XPM, as it'
23103   warn2 'provides support for more image formats.)'
23104 fi
23105
23106
23107 if test "$have_jpeg" = no ; then
23108   if test "$with_jpeg_req" = yes ; then
23109     warnL 'Use of libjpeg was requested, but it was not found.'
23110   elif test "$with_jpeg_req" = no ; then
23111     noteL 'The JPEG library is not being used.'
23112   else
23113     noteL 'The JPEG library was not found.'
23114   fi
23115
23116   if test "$jpeg_halfassed" = yes ; then
23117     echo ''
23118     warn2 'More specifically, we found the headers, but not the'
23119     warn2 'library; so either JPEG is half-installed on this'
23120     warn2 "system, or something else went wrong.  The \`config.log'"
23121     warn2 'file might contain some clues.'
23122     echo ''
23123   fi
23124
23125   if test "$have_gdk_pixbuf" = no ; then
23126     warn2 "This means that it won't be possible for the image-manipulating"
23127     warn2 "display modes to load files from disk; and it also means that"
23128     warn2 "the \`webcollage' program will be much slower."
23129   else
23130     warn2 "This means the \`webcollage' program will be much slower."
23131   fi
23132 fi
23133
23134
23135 if test "$have_gl" = yes -a "$ac_have_mesa_gl" = yes ; then
23136   preferred_mesagl=3.4
23137   mgv="$ac_mesagl_version_string"
23138   pgl="$preferred_mesagl"
23139
23140   if test "$ac_mesagl_version" = unknown; then
23141     true
23142     # warnL "Unable to determine the MesaGL version number!"
23143     # warn2 "Make sure you are using version $preferred_mesagl or newer."
23144
23145   elif test \! "$ac_mesagl_version" -gt 2006; then
23146     warnL "MesaGL version number is $mgv --"
23147     warn2 "MesaGL 2.6 and earlier have a security bug.  It is strongly"
23148     warn2 "recommended that you upgrade to at least version $preferred_mesagl."
23149
23150   elif test \! "$ac_mesagl_version" -gt 3003; then
23151     warnL "MesaGL version number is $mgv --"
23152     warn2 "MesaGL 3.3 and earlier have some bugs; it is recommended"
23153     warn2 "that you upgrade to $pgl or newer."
23154   fi
23155 fi
23156
23157 if test "$have_gl" = no ; then
23158   if test "$with_gl_req" = yes ; then
23159     warnL 'Use of GL was requested, but it was not found.'
23160   elif test "$with_gl_req" = no ; then
23161     noteL 'The OpenGL 3D library is not being used.'
23162   else
23163     noteL 'The OpenGL 3D library was not found.'
23164   fi
23165
23166   if test "$gl_halfassed" = yes ; then
23167     echo ''
23168     warn2 'More specifically, we found the headers, but not the'
23169     warn2 'libraries; so either GL is half-installed on this'
23170     warn2 "system, or something else went wrong.  The \`config.log'"
23171     warn2 'file might contain some clues.'
23172   fi
23173
23174   echo ''
23175   warn2 'Those demos which use 3D will not be built or installed.'
23176   warn2 'You might want to consider installing OpenGL and'
23177   warn2 "re-running configure.  If your vendor doesn't ship"
23178   warn2 'their own implementation of OpenGL, you can get a free'
23179   warn2 'version at <http://www.mesa3d.org/>.  For general OpenGL'
23180   warn2 'info, see <http://www.opengl.org/>.'
23181
23182 fi
23183
23184
23185 if test "$have_gl" = yes -a "$have_gle" = no ; then
23186
23187  # nobody cares about this; don't print the warning unless it was
23188  # requested and not found, or halfway-found.
23189  if test "$with_gle_req" = yes -o "$gle_halfassed" = yes ; then
23190
23191   if test "$with_gle_req" = yes ; then
23192     noteL 'Use of the GLE (GL Extrusion) library was requested, but'
23193     warn2 'it was not found (though the OpenGL library was found, and'
23194     warn2 'is being used.)'
23195   elif test "$with_gle_req" = no ; then
23196     noteL 'The OpenGL Library is being used, but the GLE (GL Extrusion)'
23197     warn2 'library is not.'
23198   else
23199     noteL 'The OpenGL Library was found, but the GLE (GL Extrusion)'
23200     warn2 'was not.'
23201   fi
23202
23203   if test "$gle_halfassed" = yes ; then
23204     echo ''
23205     warn2 'More specifically, we found the headers, but not the'
23206     warn2 'libraries; so either GLE is half-installed on this'
23207     warn2 "system, or something else went wrong.  The \`config.log'"
23208     warn2 'file might contain some clues.'
23209   fi
23210
23211   echo ''
23212   warn2 'Some of the OpenGL (3D) demos (those that depend on GLE)'
23213   warn2 'will not be built or installed.  You might want to consider'
23214   warn2 'installing GLE and re-running configure.  You can find the'
23215   warn2 'GLE library at <http://www.linas.org/gle/>.  For general'
23216   warn2 'OpenGL info, see <http://www.opengl.org/>.'
23217
23218  fi
23219 fi
23220
23221
23222 if test "$with_readdisplay_req" = yes -a "$have_readdisplay" = no ; then
23223   warn 'Use of XReadDisplay was requested, but it was not found.'
23224 fi
23225
23226 if test "$with_kerberos_req" = yes -a "$have_kerberos" = no ; then
23227   warn 'Use of Kerberos was requested, but it was not found.'
23228 fi
23229
23230 if test "$with_pam_req" = yes -a "$have_pam" = no ; then
23231   warn 'Use of PAM was requested, but it was not found.'
23232 fi
23233
23234 if test "$with_shadow_req" = yes -a "$have_shadow" = no ; then
23235   warn 'Use of shadow passwords was requested, but they were not found.'
23236 fi
23237
23238 if test "$ac_macosx" = yes ; then
23239   if test "$enable_locking" = yes ; then
23240     warn  "You have specified --enable-locking on MacOS X."
23241     warn2 "THIS DOES NOT WORK!  Don't do this!"
23242   fi
23243 fi
23244
23245
23246 # You are in a twisty maze of namespaces and syntaxes, all alike.
23247 # Fuck the skull of Unix.
23248 #
23249 bindir=`eval eval eval eval eval eval eval echo $bindir`
23250 HACKDIR=`eval eval eval eval eval eval eval echo $HACKDIR`
23251 HACK_CONF_DIR=`eval eval eval eval eval eval eval echo $HACK_CONF_DIR`
23252
23253 # canonicalize slashes.
23254 bindir=`echo  "${bindir}"              | sed 's@/$@@;s@//*@/@g'`
23255 HACKDIR=`echo "${HACKDIR}"             | sed 's@/$@@;s@//*@/@g'`
23256 HACK_CONF_DIR=`echo "${HACK_CONF_DIR}" | sed 's@/$@@;s@//*@/@g'`
23257
23258
23259 # Sanity check the hackdir
23260 for bad_choice in xscreensaver xscreensaver-demo xscreensaver-command ; do
23261   if test "${HACKDIR}" = "${bindir}/${bad_choice}" ; then
23262     echo ""
23263     { { $as_echo "$as_me:$LINENO: error: \"--with-hackdir=${bindir}/${bad_choice}\" won't work.
23264                    There will be an executable installed with that name, so
23265                    that can't be the name of a directory as well.  Please
23266                    re-configure with a different directory name." >&5
23267 $as_echo "$as_me: error: \"--with-hackdir=${bindir}/${bad_choice}\" won't work.
23268                    There will be an executable installed with that name, so
23269                    that can't be the name of a directory as well.  Please
23270                    re-configure with a different directory name." >&2;}
23271    { (exit 1); exit 1; }; }
23272   fi
23273 done
23274
23275
23276 do_dir_warning=no
23277
23278 # Now let's warn if there's a previous RPM version already installed.
23279 # But don't bother with this test if we are currently *building* an RPM.
23280
23281 if test -z "$RPM_PACKAGE_VERSION" ; then
23282
23283   rpmnames="xscreensaver xscreensaver-base xscreensaver-extras"
23284
23285   # M4 sucks!!
23286
23287   rpmv=`(rpm -qv $rpmnames) 2>/dev/null | \
23288         sed -n 's/^[-a-z]*-\([0-9][0-9]*[.][0-9][0-9a-z]*\)-.*$/\1/p' | \
23289         head -1`
23290
23291
23292   if test \! -z "$rpmv" ; then
23293     rpmbdir=`rpm -ql $rpmnames | sed -n 's@^\(.*\)/xscreensaver-demo$@\1@p'`
23294     rpmhdir=`rpm -ql $rpmnames | sed -n 's@^\(.*\)/popsquares$@\1@p'`
23295
23296     warning=no
23297     warnL "There is already an installed RPM of xscreensaver $rpmv"
23298     warn2 'on this system.  You might want to remove it ("rpm -ve")'
23299     warn2 'before running "make install" in this directory.'
23300     echo ""
23301     warn2 "Alternately, you could build this version of xscreensaver"
23302     warn2 'as an RPM, and then install that.  An "xscreensaver.spec"'
23303     warn2 'file is included.  Try "rpmbuild -v -ba xscreensaver.spec".'
23304     warn2 "See the RPM documentation for more info."
23305     echo ""
23306
23307     if test "$rpmbdir" = "$rpmhdir" ; then
23308       warn2 "The RPM version was installed in $rpmbdir/."
23309       do_dir_warning=yes
23310     else
23311       warn2 "The RPM version was installed in $rpmbdir/,"
23312       warn2 "with demos in $rpmhdir/."
23313     fi
23314   fi
23315 fi
23316
23317 # Also warn if there's a Debian package installed.
23318 #
23319 debnames="xscreensaver xscreensaver-data xscreensaver-data-extra"
23320 debv=''
23321 for dpkg in $debnames ; do
23322   if test -z "$debv"; then
23323     debv=`dpkg -s $dpkg 2>/dev/null | sed -n 's/^Version: \(.*\)$/\1/p'`
23324   fi
23325 done
23326
23327 if test \! -z "$debv" ; then
23328   debbdir=`dpkg -L $debnames 2>/dev/null | \
23329             sed -n 's@^\(.*/bin/\)xscreensaver$@\1@p'`
23330   debhdir=`dpkg -L $debnames 2>/dev/null | \
23331             sed -n 's@^\(.*/\)popsquares$@\1@p'`
23332   if test -z "$debbdir" ; then debbdir='???'; fi
23333   if test -z "$debhdir" ; then debhdir='???'; fi
23334
23335   warning=no
23336   warnL "There is already an installed dpkg of xscreensaver"
23337   warn2 "version \"$debv\" on this system."
23338   echo ""
23339   warn2 "The dpkg was installed in $debbdir,"
23340   warn2 "with demos in $debhdir."
23341 fi
23342
23343
23344 if test "${bindir}" = "${HACKDIR}" ; then
23345   do_dir_warning=yes
23346 fi
23347
23348 if test "$do_dir_warning" = yes; then
23349   echo ""
23350   echo "$warnsep"
23351   echo ""
23352   echo '      When you run "make install", the "xscreensaver",'
23353   echo '      "xscreensaver-demo", and "xscreensaver-command" executables'
23354   echo "      will be installed in ${bindir}/."
23355   echo ""
23356   echo "      The various graphics demos (190+ different executables) will"
23357   echo "      be installed in ${HACKDIR}/."
23358   echo ""
23359   echo "      If you would prefer the demos to be installed elsewhere,"
23360   echo "      you should re-run configure with the --with-hackdir=DIR"
23361   echo "      option.  For more information, run \`./configure --help'."
23362   warning=yes
23363 fi
23364
23365 if test "$warning" != no; then
23366   echo '' ; echo "$warnsep" ; echo ''
23367 fi
23368
23369 if test "$do_dir_warning" = no; then
23370   if test "$warning" = no; then
23371     echo ''
23372   fi
23373   echo "User programs will be installed in ${bindir}/"
23374   echo "Screen savers will be installed in ${HACKDIR}/"
23375   echo "Configuration dialogs will be installed in ${HACK_CONF_DIR}/"
23376   echo "System-wide default settings will be installed in ${APPDEFAULTS}/"
23377   echo ''
23378 fi