From http://www.jwz.org/xscreensaver/xscreensaver-5.16.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 GLFONT_OBJS
654 GLFPS_OBJS
655 JWZGLES_OBJS
656 GLE_KLUDGE
657 GLE_EXES
658 GL_KLUDGE
659 GL_MEN
660 GL_UTIL_EXES
661 SUID_EXES
662 RETIRED_GL_EXES
663 GL_EXES
664 JPEG_EXES
665 LOCK_OBJS
666 LOCK_SRCS
667 SAVER_GL_LIBS
668 SAVER_GL_OBJS
669 SAVER_GL_SRCS
670 XMU_LIBS
671 XMU_OBJS
672 XMU_SRCS
673 PASSWD_OBJS
674 PASSWD_SRCS
675 MEN_OSX
676 SCRIPTS_OSX
677 EXES_OSX
678 OBJCC
679 WITH_BROWSER
680 DEFAULT_TEXT_FILE
681 DEFAULT_IMAGE_DIRECTORY
682 DEFAULT_IMAGES_P
683 NEW_LOGIN_COMMAND_P
684 NEW_LOGIN_COMMAND
685 COMMENT_PAM_CHECK_ACCOUNT
686 HAVE_PAM_FAIL_DELAY
687 INSTALL_PAM
688 NEED_SETUID
689 INSTALL_DIRS
690 SETUID_HACKS
691 INSTALL_SETUID
692 PASSWD_LIBS
693 XINERAMA_LIBS
694 XDPMS_LIBS
695 GLE_LIBS
696 GL_LIBS
697 PTY_LIBS
698 XPM_LIBS
699 HACK_LIBS
700 JPEG_LIBS
701 XML_LIBS
702 GTK_LIBS
703 MOTIF_LIBS
704 SAVER_LIBS
705 ALL_DEMO_PROGRAMS
706 PREFERRED_DEMO_PROGRAM
707 INCLUDES
708 gnome_url_show_program
709 gnome_open_program
710 pkg_config
711 login_manager_tmp
712 MKINSTALLDIRS
713 POSUB
714 POFILES
715 INTLOBJS
716 INTLLIBS
717 INTLDEPS
718 INSTOBJEXT
719 GMOFILES
720 DATADIRNAME
721 CATOBJEXT
722 CATALOGS
723 XGETTEXT
724 GMSGFMT
725 MSGFMT
726 USE_NLS
727 ALLOCA
728 RANLIB
729 GETTEXT_PACKAGE
730 INTLTOOL_PERL
731 INTLTOOL_UPDATE
732 INTLTOOL_MERGE
733 INTLTOOL_EXTRACT
734 INTLTOOL_CAVES_RULE
735 INTLTOOL_XML_RULE
736 INTLTOOL_UI_RULE
737 INTLTOOL_SOUNDLIST_RULE
738 INTLTOOL_SHEET_RULE
739 INTLTOOL_SERVER_RULE
740 INTLTOOL_PONG_RULE
741 INTLTOOL_OAF_RULE
742 INTLTOOL_KEYS_RULE
743 INTLTOOL_DIRECTORY_RULE
744 INTLTOOL_DESKTOP_RULE
745 X_EXTRA_LIBS
746 X_LIBS
747 X_PRE_LIBS
748 X_CFLAGS
749 XMKMF
750 PERL
751 EGREP
752 GREP
753 SET_MAKE
754 INSTALL_DATA
755 INSTALL_SCRIPT
756 INSTALL_PROGRAM
757 CPP
758 OBJEXT
759 EXEEXT
760 ac_ct_CC
761 CPPFLAGS
762 LDFLAGS
763 CFLAGS
764 CC
765 host_os
766 host_vendor
767 host_cpu
768 host
769 build_os
770 build_vendor
771 build_cpu
772 build
773 target_alias
774 host_alias
775 build_alias
776 LIBS
777 ECHO_T
778 ECHO_N
779 ECHO_C
780 DEFS
781 mandir
782 localedir
783 libdir
784 psdir
785 pdfdir
786 dvidir
787 htmldir
788 infodir
789 docdir
790 oldincludedir
791 includedir
792 localstatedir
793 sharedstatedir
794 sysconfdir
795 datadir
796 datarootdir
797 libexecdir
798 sbindir
799 bindir
800 program_transform_name
801 prefix
802 exec_prefix
803 PACKAGE_BUGREPORT
804 PACKAGE_STRING
805 PACKAGE_VERSION
806 PACKAGE_TARNAME
807 PACKAGE_NAME
808 PATH_SEPARATOR
809 SHELL'
810 ac_subst_files=''
811 ac_user_opts='
812 enable_option_checking
813 with_x_app_defaults
814 with_x
815 with_hackdir
816 enable_subdir
817 with_configdir
818 with_dpms_ext
819 with_xinerama_ext
820 with_xinput_ext
821 with_xf86vmode_ext
822 with_xf86gamma_ext
823 with_randr_ext
824 with_proc_interrupts
825 enable_locking
826 enable_root_passwd
827 with_pam
828 with_pam_service_name
829 enable_pam_check_account_type
830 with_kerberos
831 with_shadow
832 with_passwd_helper
833 with_login_manager
834 with_gtk
835 with_motif
836 with_gl
837 with_gle
838 with_gles
839 with_pixbuf
840 with_xpm
841 with_jpeg
842 with_xshm_ext
843 with_xdbe_ext
844 with_readdisplay
845 with_image_directory
846 with_text_file
847 with_browser
848 with_setuid_hacks
849 '
850       ac_precious_vars='build_alias
851 host_alias
852 target_alias
853 CC
854 CFLAGS
855 LDFLAGS
856 LIBS
857 CPPFLAGS
858 CPP
859 XMKMF'
860
861
862 # Initialize some variables set by options.
863 ac_init_help=
864 ac_init_version=false
865 ac_unrecognized_opts=
866 ac_unrecognized_sep=
867 # The variables have the same names as the options, with
868 # dashes changed to underlines.
869 cache_file=/dev/null
870 exec_prefix=NONE
871 no_create=
872 no_recursion=
873 prefix=NONE
874 program_prefix=NONE
875 program_suffix=NONE
876 program_transform_name=s,x,x,
877 silent=
878 site=
879 srcdir=
880 verbose=
881 x_includes=NONE
882 x_libraries=NONE
883
884 # Installation directory options.
885 # These are left unexpanded so users can "make install exec_prefix=/foo"
886 # and all the variables that are supposed to be based on exec_prefix
887 # by default will actually change.
888 # Use braces instead of parens because sh, perl, etc. also accept them.
889 # (The list follows the same order as the GNU Coding Standards.)
890 bindir='${exec_prefix}/bin'
891 sbindir='${exec_prefix}/sbin'
892 libexecdir='${exec_prefix}/libexec'
893 datarootdir='${prefix}/share'
894 datadir='${datarootdir}'
895 sysconfdir='${prefix}/etc'
896 sharedstatedir='${prefix}/com'
897 localstatedir='${prefix}/var'
898 includedir='${prefix}/include'
899 oldincludedir='/usr/include'
900 docdir='${datarootdir}/doc/${PACKAGE}'
901 infodir='${datarootdir}/info'
902 htmldir='${docdir}'
903 dvidir='${docdir}'
904 pdfdir='${docdir}'
905 psdir='${docdir}'
906 libdir='${exec_prefix}/lib'
907 localedir='${datarootdir}/locale'
908 mandir='${datarootdir}/man'
909
910 ac_prev=
911 ac_dashdash=
912 for ac_option
913 do
914   # If the previous option needs an argument, assign it.
915   if test -n "$ac_prev"; then
916     eval $ac_prev=\$ac_option
917     ac_prev=
918     continue
919   fi
920
921   case $ac_option in
922   *=*)  ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
923   *)    ac_optarg=yes ;;
924   esac
925
926   # Accept the important Cygnus configure options, so we can diagnose typos.
927
928   case $ac_dashdash$ac_option in
929   --)
930     ac_dashdash=yes ;;
931
932   -bindir | --bindir | --bindi | --bind | --bin | --bi)
933     ac_prev=bindir ;;
934   -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
935     bindir=$ac_optarg ;;
936
937   -build | --build | --buil | --bui | --bu)
938     ac_prev=build_alias ;;
939   -build=* | --build=* | --buil=* | --bui=* | --bu=*)
940     build_alias=$ac_optarg ;;
941
942   -cache-file | --cache-file | --cache-fil | --cache-fi \
943   | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
944     ac_prev=cache_file ;;
945   -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
946   | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
947     cache_file=$ac_optarg ;;
948
949   --config-cache | -C)
950     cache_file=config.cache ;;
951
952   -datadir | --datadir | --datadi | --datad)
953     ac_prev=datadir ;;
954   -datadir=* | --datadir=* | --datadi=* | --datad=*)
955     datadir=$ac_optarg ;;
956
957   -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
958   | --dataroo | --dataro | --datar)
959     ac_prev=datarootdir ;;
960   -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
961   | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
962     datarootdir=$ac_optarg ;;
963
964   -disable-* | --disable-*)
965     ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
966     # Reject names that are not valid shell variable names.
967     expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
968       { $as_echo "$as_me: error: invalid feature name: $ac_useropt" >&2
969    { (exit 1); exit 1; }; }
970     ac_useropt_orig=$ac_useropt
971     ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
972     case $ac_user_opts in
973       *"
974 "enable_$ac_useropt"
975 "*) ;;
976       *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig"
977          ac_unrecognized_sep=', ';;
978     esac
979     eval enable_$ac_useropt=no ;;
980
981   -docdir | --docdir | --docdi | --doc | --do)
982     ac_prev=docdir ;;
983   -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*)
984     docdir=$ac_optarg ;;
985
986   -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv)
987     ac_prev=dvidir ;;
988   -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*)
989     dvidir=$ac_optarg ;;
990
991   -enable-* | --enable-*)
992     ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
993     # Reject names that are not valid shell variable names.
994     expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
995       { $as_echo "$as_me: error: invalid feature name: $ac_useropt" >&2
996    { (exit 1); exit 1; }; }
997     ac_useropt_orig=$ac_useropt
998     ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
999     case $ac_user_opts in
1000       *"
1001 "enable_$ac_useropt"
1002 "*) ;;
1003       *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig"
1004          ac_unrecognized_sep=', ';;
1005     esac
1006     eval enable_$ac_useropt=\$ac_optarg ;;
1007
1008   -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
1009   | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
1010   | --exec | --exe | --ex)
1011     ac_prev=exec_prefix ;;
1012   -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
1013   | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
1014   | --exec=* | --exe=* | --ex=*)
1015     exec_prefix=$ac_optarg ;;
1016
1017   -gas | --gas | --ga | --g)
1018     # Obsolete; use --with-gas.
1019     with_gas=yes ;;
1020
1021   -help | --help | --hel | --he | -h)
1022     ac_init_help=long ;;
1023   -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
1024     ac_init_help=recursive ;;
1025   -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
1026     ac_init_help=short ;;
1027
1028   -host | --host | --hos | --ho)
1029     ac_prev=host_alias ;;
1030   -host=* | --host=* | --hos=* | --ho=*)
1031     host_alias=$ac_optarg ;;
1032
1033   -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht)
1034     ac_prev=htmldir ;;
1035   -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \
1036   | --ht=*)
1037     htmldir=$ac_optarg ;;
1038
1039   -includedir | --includedir | --includedi | --included | --include \
1040   | --includ | --inclu | --incl | --inc)
1041     ac_prev=includedir ;;
1042   -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
1043   | --includ=* | --inclu=* | --incl=* | --inc=*)
1044     includedir=$ac_optarg ;;
1045
1046   -infodir | --infodir | --infodi | --infod | --info | --inf)
1047     ac_prev=infodir ;;
1048   -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
1049     infodir=$ac_optarg ;;
1050
1051   -libdir | --libdir | --libdi | --libd)
1052     ac_prev=libdir ;;
1053   -libdir=* | --libdir=* | --libdi=* | --libd=*)
1054     libdir=$ac_optarg ;;
1055
1056   -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
1057   | --libexe | --libex | --libe)
1058     ac_prev=libexecdir ;;
1059   -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
1060   | --libexe=* | --libex=* | --libe=*)
1061     libexecdir=$ac_optarg ;;
1062
1063   -localedir | --localedir | --localedi | --localed | --locale)
1064     ac_prev=localedir ;;
1065   -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*)
1066     localedir=$ac_optarg ;;
1067
1068   -localstatedir | --localstatedir | --localstatedi | --localstated \
1069   | --localstate | --localstat | --localsta | --localst | --locals)
1070     ac_prev=localstatedir ;;
1071   -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
1072   | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*)
1073     localstatedir=$ac_optarg ;;
1074
1075   -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
1076     ac_prev=mandir ;;
1077   -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
1078     mandir=$ac_optarg ;;
1079
1080   -nfp | --nfp | --nf)
1081     # Obsolete; use --without-fp.
1082     with_fp=no ;;
1083
1084   -no-create | --no-create | --no-creat | --no-crea | --no-cre \
1085   | --no-cr | --no-c | -n)
1086     no_create=yes ;;
1087
1088   -no-recursion | --no-recursion | --no-recursio | --no-recursi \
1089   | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
1090     no_recursion=yes ;;
1091
1092   -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
1093   | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
1094   | --oldin | --oldi | --old | --ol | --o)
1095     ac_prev=oldincludedir ;;
1096   -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
1097   | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
1098   | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
1099     oldincludedir=$ac_optarg ;;
1100
1101   -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
1102     ac_prev=prefix ;;
1103   -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
1104     prefix=$ac_optarg ;;
1105
1106   -program-prefix | --program-prefix | --program-prefi | --program-pref \
1107   | --program-pre | --program-pr | --program-p)
1108     ac_prev=program_prefix ;;
1109   -program-prefix=* | --program-prefix=* | --program-prefi=* \
1110   | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
1111     program_prefix=$ac_optarg ;;
1112
1113   -program-suffix | --program-suffix | --program-suffi | --program-suff \
1114   | --program-suf | --program-su | --program-s)
1115     ac_prev=program_suffix ;;
1116   -program-suffix=* | --program-suffix=* | --program-suffi=* \
1117   | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
1118     program_suffix=$ac_optarg ;;
1119
1120   -program-transform-name | --program-transform-name \
1121   | --program-transform-nam | --program-transform-na \
1122   | --program-transform-n | --program-transform- \
1123   | --program-transform | --program-transfor \
1124   | --program-transfo | --program-transf \
1125   | --program-trans | --program-tran \
1126   | --progr-tra | --program-tr | --program-t)
1127     ac_prev=program_transform_name ;;
1128   -program-transform-name=* | --program-transform-name=* \
1129   | --program-transform-nam=* | --program-transform-na=* \
1130   | --program-transform-n=* | --program-transform-=* \
1131   | --program-transform=* | --program-transfor=* \
1132   | --program-transfo=* | --program-transf=* \
1133   | --program-trans=* | --program-tran=* \
1134   | --progr-tra=* | --program-tr=* | --program-t=*)
1135     program_transform_name=$ac_optarg ;;
1136
1137   -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd)
1138     ac_prev=pdfdir ;;
1139   -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*)
1140     pdfdir=$ac_optarg ;;
1141
1142   -psdir | --psdir | --psdi | --psd | --ps)
1143     ac_prev=psdir ;;
1144   -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*)
1145     psdir=$ac_optarg ;;
1146
1147   -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1148   | -silent | --silent | --silen | --sile | --sil)
1149     silent=yes ;;
1150
1151   -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
1152     ac_prev=sbindir ;;
1153   -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
1154   | --sbi=* | --sb=*)
1155     sbindir=$ac_optarg ;;
1156
1157   -sharedstatedir | --sharedstatedir | --sharedstatedi \
1158   | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
1159   | --sharedst | --shareds | --shared | --share | --shar \
1160   | --sha | --sh)
1161     ac_prev=sharedstatedir ;;
1162   -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
1163   | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
1164   | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
1165   | --sha=* | --sh=*)
1166     sharedstatedir=$ac_optarg ;;
1167
1168   -site | --site | --sit)
1169     ac_prev=site ;;
1170   -site=* | --site=* | --sit=*)
1171     site=$ac_optarg ;;
1172
1173   -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
1174     ac_prev=srcdir ;;
1175   -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
1176     srcdir=$ac_optarg ;;
1177
1178   -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
1179   | --syscon | --sysco | --sysc | --sys | --sy)
1180     ac_prev=sysconfdir ;;
1181   -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
1182   | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
1183     sysconfdir=$ac_optarg ;;
1184
1185   -target | --target | --targe | --targ | --tar | --ta | --t)
1186     ac_prev=target_alias ;;
1187   -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
1188     target_alias=$ac_optarg ;;
1189
1190   -v | -verbose | --verbose | --verbos | --verbo | --verb)
1191     verbose=yes ;;
1192
1193   -version | --version | --versio | --versi | --vers | -V)
1194     ac_init_version=: ;;
1195
1196   -with-* | --with-*)
1197     ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
1198     # Reject names that are not valid shell variable names.
1199     expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1200       { $as_echo "$as_me: error: invalid package name: $ac_useropt" >&2
1201    { (exit 1); exit 1; }; }
1202     ac_useropt_orig=$ac_useropt
1203     ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1204     case $ac_user_opts in
1205       *"
1206 "with_$ac_useropt"
1207 "*) ;;
1208       *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig"
1209          ac_unrecognized_sep=', ';;
1210     esac
1211     eval with_$ac_useropt=\$ac_optarg ;;
1212
1213   -without-* | --without-*)
1214     ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'`
1215     # Reject names that are not valid shell variable names.
1216     expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1217       { $as_echo "$as_me: error: invalid package name: $ac_useropt" >&2
1218    { (exit 1); exit 1; }; }
1219     ac_useropt_orig=$ac_useropt
1220     ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1221     case $ac_user_opts in
1222       *"
1223 "with_$ac_useropt"
1224 "*) ;;
1225       *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig"
1226          ac_unrecognized_sep=', ';;
1227     esac
1228     eval with_$ac_useropt=no ;;
1229
1230   --x)
1231     # Obsolete; use --with-x.
1232     with_x=yes ;;
1233
1234   -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
1235   | --x-incl | --x-inc | --x-in | --x-i)
1236     ac_prev=x_includes ;;
1237   -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
1238   | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
1239     x_includes=$ac_optarg ;;
1240
1241   -x-libraries | --x-libraries | --x-librarie | --x-librari \
1242   | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
1243     ac_prev=x_libraries ;;
1244   -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
1245   | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
1246     x_libraries=$ac_optarg ;;
1247
1248   -*) { $as_echo "$as_me: error: unrecognized option: $ac_option
1249 Try \`$0 --help' for more information." >&2
1250    { (exit 1); exit 1; }; }
1251     ;;
1252
1253   *=*)
1254     ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
1255     # Reject names that are not valid shell variable names.
1256     expr "x$ac_envvar" : ".*[^_$as_cr_alnum]" >/dev/null &&
1257       { $as_echo "$as_me: error: invalid variable name: $ac_envvar" >&2
1258    { (exit 1); exit 1; }; }
1259     eval $ac_envvar=\$ac_optarg
1260     export $ac_envvar ;;
1261
1262   *)
1263     # FIXME: should be removed in autoconf 3.0.
1264     $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2
1265     expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
1266       $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2
1267     : ${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}
1268     ;;
1269
1270   esac
1271 done
1272
1273 if test -n "$ac_prev"; then
1274   ac_option=--`echo $ac_prev | sed 's/_/-/g'`
1275   { $as_echo "$as_me: error: missing argument to $ac_option" >&2
1276    { (exit 1); exit 1; }; }
1277 fi
1278
1279 if test -n "$ac_unrecognized_opts"; then
1280   case $enable_option_checking in
1281     no) ;;
1282     fatal) { $as_echo "$as_me: error: unrecognized options: $ac_unrecognized_opts" >&2
1283    { (exit 1); exit 1; }; } ;;
1284     *)     $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;;
1285   esac
1286 fi
1287
1288 # Check all directory arguments for consistency.
1289 for ac_var in   exec_prefix prefix bindir sbindir libexecdir datarootdir \
1290                 datadir sysconfdir sharedstatedir localstatedir includedir \
1291                 oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
1292                 libdir localedir mandir
1293 do
1294   eval ac_val=\$$ac_var
1295   # Remove trailing slashes.
1296   case $ac_val in
1297     */ )
1298       ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'`
1299       eval $ac_var=\$ac_val;;
1300   esac
1301   # Be sure to have absolute directory names.
1302   case $ac_val in
1303     [\\/$]* | ?:[\\/]* )  continue;;
1304     NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
1305   esac
1306   { $as_echo "$as_me: error: expected an absolute directory name for --$ac_var: $ac_val" >&2
1307    { (exit 1); exit 1; }; }
1308 done
1309
1310 # There might be people who depend on the old broken behavior: `$host'
1311 # used to hold the argument of --host etc.
1312 # FIXME: To remove some day.
1313 build=$build_alias
1314 host=$host_alias
1315 target=$target_alias
1316
1317 # FIXME: To remove some day.
1318 if test "x$host_alias" != x; then
1319   if test "x$build_alias" = x; then
1320     cross_compiling=maybe
1321     $as_echo "$as_me: WARNING: If you wanted to set the --build type, don't use --host.
1322     If a cross compiler is detected then cross compile mode will be used." >&2
1323   elif test "x$build_alias" != "x$host_alias"; then
1324     cross_compiling=yes
1325   fi
1326 fi
1327
1328 ac_tool_prefix=
1329 test -n "$host_alias" && ac_tool_prefix=$host_alias-
1330
1331 test "$silent" = yes && exec 6>/dev/null
1332
1333
1334 ac_pwd=`pwd` && test -n "$ac_pwd" &&
1335 ac_ls_di=`ls -di .` &&
1336 ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` ||
1337   { $as_echo "$as_me: error: working directory cannot be determined" >&2
1338    { (exit 1); exit 1; }; }
1339 test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
1340   { $as_echo "$as_me: error: pwd does not report name of working directory" >&2
1341    { (exit 1); exit 1; }; }
1342
1343
1344 # Find the source files, if location was not specified.
1345 if test -z "$srcdir"; then
1346   ac_srcdir_defaulted=yes
1347   # Try the directory containing this script, then the parent directory.
1348   ac_confdir=`$as_dirname -- "$as_myself" ||
1349 $as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
1350          X"$as_myself" : 'X\(//\)[^/]' \| \
1351          X"$as_myself" : 'X\(//\)$' \| \
1352          X"$as_myself" : 'X\(/\)' \| . 2>/dev/null ||
1353 $as_echo X"$as_myself" |
1354     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
1355             s//\1/
1356             q
1357           }
1358           /^X\(\/\/\)[^/].*/{
1359             s//\1/
1360             q
1361           }
1362           /^X\(\/\/\)$/{
1363             s//\1/
1364             q
1365           }
1366           /^X\(\/\).*/{
1367             s//\1/
1368             q
1369           }
1370           s/.*/./; q'`
1371   srcdir=$ac_confdir
1372   if test ! -r "$srcdir/$ac_unique_file"; then
1373     srcdir=..
1374   fi
1375 else
1376   ac_srcdir_defaulted=no
1377 fi
1378 if test ! -r "$srcdir/$ac_unique_file"; then
1379   test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
1380   { $as_echo "$as_me: error: cannot find sources ($ac_unique_file) in $srcdir" >&2
1381    { (exit 1); exit 1; }; }
1382 fi
1383 ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work"
1384 ac_abs_confdir=`(
1385         cd "$srcdir" && test -r "./$ac_unique_file" || { $as_echo "$as_me: error: $ac_msg" >&2
1386    { (exit 1); exit 1; }; }
1387         pwd)`
1388 # When building in place, set srcdir=.
1389 if test "$ac_abs_confdir" = "$ac_pwd"; then
1390   srcdir=.
1391 fi
1392 # Remove unnecessary trailing slashes from srcdir.
1393 # Double slashes in file names in object file debugging info
1394 # mess up M-x gdb in Emacs.
1395 case $srcdir in
1396 */) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;;
1397 esac
1398 for ac_var in $ac_precious_vars; do
1399   eval ac_env_${ac_var}_set=\${${ac_var}+set}
1400   eval ac_env_${ac_var}_value=\$${ac_var}
1401   eval ac_cv_env_${ac_var}_set=\${${ac_var}+set}
1402   eval ac_cv_env_${ac_var}_value=\$${ac_var}
1403 done
1404
1405 #
1406 # Report the --help message.
1407 #
1408 if test "$ac_init_help" = "long"; then
1409   # Omit some internal or obsolete options to make the list less imposing.
1410   # This message is too long to be a string in the A/UX 3.1 sh.
1411   cat <<_ACEOF
1412 \`configure' configures this package to adapt to many kinds of systems.
1413
1414 Usage: $0 [OPTION]... [VAR=VALUE]...
1415
1416 To assign environment variables (e.g., CC, CFLAGS...), specify them as
1417 VAR=VALUE.  See below for descriptions of some of the useful variables.
1418
1419 Defaults for the options are specified in brackets.
1420
1421
1422 Configuration:
1423
1424   -h, --help              display this help and exit
1425       --help=short        display options specific to this package
1426       --help=recursive    display the short help of all the included packages
1427   -V, --version           display version information and exit
1428   -q, --quiet, --silent   do not print \`checking...' messages
1429       --cache-file=FILE   cache test results in FILE [disabled]
1430   -C, --config-cache      alias for \`--cache-file=config.cache'
1431   -n, --no-create         do not create output files
1432       --srcdir=DIR        find the sources in DIR [configure dir or \`..']
1433
1434 Installation directories:
1435   --prefix=PREFIX         install architecture-independent files in PREFIX
1436                           [$ac_default_prefix]
1437   --exec-prefix=EPREFIX   install architecture-dependent files in EPREFIX
1438                           [PREFIX]
1439
1440 By default, \`make install' will install all the files in
1441 \`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc.  You can specify
1442 an installation prefix other than \`$ac_default_prefix' using \`--prefix',
1443 for instance \`--prefix=\$HOME'.
1444
1445 For better control, use the options below.
1446
1447 Fine tuning of the installation directories:
1448   --bindir=DIR            user executables [EPREFIX/bin]
1449   --libexecdir=DIR        program executables [EPREFIX/libexec]
1450   --libdir=DIR            object code libraries [EPREFIX/lib]
1451   --includedir=DIR        C header files [PREFIX/include]
1452   --x-includes=DIR        X include files are in DIR
1453   --x-libraries=DIR       X library files are in DIR
1454   --datarootdir=DIR       read-only arch.-independent data root [PREFIX/share]
1455   --datadir=DIR           read-only architecture-independent data [DATAROOTDIR]
1456   --localedir=DIR         locale-dependent data [DATAROOTDIR/locale]
1457   --mandir=DIR            man documentation [DATAROOTDIR/man]
1458   --docdir=DIR            documentation root [DATAROOTDIR/doc/PACKAGE]
1459   --htmldir=DIR           html documentation [DOCDIR]
1460   --dvidir=DIR            dvi documentation [DOCDIR]
1461   --pdfdir=DIR            pdf documentation [DOCDIR]
1462   --psdir=DIR             ps documentation [DOCDIR]
1463 _ACEOF
1464
1465   cat <<\_ACEOF
1466
1467 X features:
1468   --x-includes=DIR    X include files are in DIR
1469   --x-libraries=DIR   X library files are in DIR
1470
1471 System types:
1472   --build=BUILD     configure for building on BUILD [guessed]
1473   --host=HOST       cross-compile to build programs to run on HOST [BUILD]
1474 _ACEOF
1475 fi
1476
1477 if test -n "$ac_init_help"; then
1478
1479   cat <<\_ACEOF
1480
1481 Optional Features:
1482   --disable-option-checking  ignore unrecognized --enable/--with options
1483   --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)
1484   --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
1485
1486 Screen locking options:
1487   --enable-locking        Compile in support for locking the display.
1488   --disable-locking       Do not allow locking at all.
1489
1490   --enable-root-passwd        Allow root passwd to unlock screen.
1491   --disable-root-passwd       Do not allow that.
1492   --enable-pam-check-account-type
1493                           Whether PAM should check the result of account
1494                           modules when authenticating. Only do this if you
1495                           have account configured properly on your system.
1496
1497 Optional Packages:
1498   --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
1499   --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
1500
1501
1502 Installation options:
1503   --with-hackdir=DIR      Where to install the hundreds of demo executables.
1504                           Default: `PREFIX/libexec/xscreensaver/'
1505   --with-configdir=DIR    Where to install the data files that describe each
1506                           of the display modes to the GUI.
1507                           Default: `PREFIX/share/xscreensaver/config/'
1508   --with-x-app-defaults=DIR
1509                            Where to install xscreensaver configuration file.
1510
1511   --with-dpms-ext         Include support for the DPMS extension.
1512   --with-xinerama-ext     Include support for the XINERAMA extension.
1513   --with-xinput-ext       Include support for the XInput extension.
1514   --with-xf86vmode-ext    Include support for XFree86 virtual screens.
1515   --with-xf86gamma-ext    Include support for XFree86 gamma fading.
1516   --with-randr-ext        Include support for the X Resize+Rotate extension.
1517   --with-proc-interrupts  Include support for consulting the /proc/interrupts
1518                           file to notice keyboard activity.
1519   --with-pam              Include support for PAM (Pluggable Auth Modules.)
1520   --with-pam-service-name NAME arg is the name of the PAM service that
1521                           xscreensaver will authenticate as.
1522   --with-kerberos         Include support for Kerberos authentication.
1523   --with-shadow           Include support for shadow password authentication.
1524   --with-passwd-helper    Include support for an external password
1525                           verification helper program.
1526   --with-login-manager    Put a "New Login" button on the unlock dialog that
1527                           runs a login manager like gdmflexiserver or kdmctl.
1528
1529 User interface options:
1530
1531   --with-gtk              Use the Gtk toolkit for the user interface.
1532   --with-motif            Use the Motif toolkit for the user interface
1533                           (no longer supported.)
1534
1535 Graphics options:
1536
1537   --with-gl               Build those demos which depend on OpenGL.
1538   --with-gle              Build those demos which depend on GLE
1539                           (the OpenGL "extrusion" library.)
1540   --with-gles             Target OpenGL ES 1.x API instead of OpenGL 1.3.
1541   --with-pixbuf           Include support for the GDK-Pixbuf library in some
1542                           demos, which will make it possible for them to read
1543                           GIF, JPEG, and PNG files as well.
1544   --with-xpm              Include support for XPM files in some demos.
1545                           (Not needed if Pixbuf is used.)
1546   --with-jpeg             Include support for the JPEG library.
1547   --with-xshm-ext         Include support for the Shared Memory extension.
1548   --with-xdbe-ext         Include support for the DOUBLE-BUFFER extension.
1549   --with-readdisplay      Include support for the XReadDisplay extension.
1550   --with-image-directory  Arg is the default directory from which some demos
1551                           will choose random images to display.
1552   --with-text-file=FILE   By default, some demos may display this file.
1553   --with-browser=BROWSER  Specify the web browser used to show the help URL.
1554   --with-setuid-hacks     Allow some demos to be installed `setuid root'
1555                           (which is needed in order to ping other hosts.)
1556
1557
1558 Some influential environment variables:
1559   CC          C compiler command
1560   CFLAGS      C compiler flags
1561   LDFLAGS     linker flags, e.g. -L<lib dir> if you have libraries in a
1562               nonstandard directory <lib dir>
1563   LIBS        libraries to pass to the linker, e.g. -l<library>
1564   CPPFLAGS    C/C++/Objective C preprocessor flags, e.g. -I<include dir> if
1565               you have headers in a nonstandard directory <include dir>
1566   CPP         C preprocessor
1567   XMKMF       Path to xmkmf, Makefile generator for X Window System
1568
1569 Use these variables to override the choices made by `configure' or to help
1570 it to find libraries and programs with nonstandard names/locations.
1571
1572 _ACEOF
1573 ac_status=$?
1574 fi
1575
1576 if test "$ac_init_help" = "recursive"; then
1577   # If there are subdirs, report their specific --help.
1578   for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
1579     test -d "$ac_dir" ||
1580       { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } ||
1581       continue
1582     ac_builddir=.
1583
1584 case "$ac_dir" in
1585 .) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
1586 *)
1587   ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
1588   # A ".." for each directory in $ac_dir_suffix.
1589   ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
1590   case $ac_top_builddir_sub in
1591   "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
1592   *)  ac_top_build_prefix=$ac_top_builddir_sub/ ;;
1593   esac ;;
1594 esac
1595 ac_abs_top_builddir=$ac_pwd
1596 ac_abs_builddir=$ac_pwd$ac_dir_suffix
1597 # for backward compatibility:
1598 ac_top_builddir=$ac_top_build_prefix
1599
1600 case $srcdir in
1601   .)  # We are building in place.
1602     ac_srcdir=.
1603     ac_top_srcdir=$ac_top_builddir_sub
1604     ac_abs_top_srcdir=$ac_pwd ;;
1605   [\\/]* | ?:[\\/]* )  # Absolute name.
1606     ac_srcdir=$srcdir$ac_dir_suffix;
1607     ac_top_srcdir=$srcdir
1608     ac_abs_top_srcdir=$srcdir ;;
1609   *) # Relative name.
1610     ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
1611     ac_top_srcdir=$ac_top_build_prefix$srcdir
1612     ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
1613 esac
1614 ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
1615
1616     cd "$ac_dir" || { ac_status=$?; continue; }
1617     # Check for guested configure.
1618     if test -f "$ac_srcdir/configure.gnu"; then
1619       echo &&
1620       $SHELL "$ac_srcdir/configure.gnu" --help=recursive
1621     elif test -f "$ac_srcdir/configure"; then
1622       echo &&
1623       $SHELL "$ac_srcdir/configure" --help=recursive
1624     else
1625       $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
1626     fi || ac_status=$?
1627     cd "$ac_pwd" || { ac_status=$?; break; }
1628   done
1629 fi
1630
1631 test -n "$ac_init_help" && exit $ac_status
1632 if $ac_init_version; then
1633   cat <<\_ACEOF
1634 configure
1635 generated by GNU Autoconf 2.63
1636
1637 Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001,
1638 2002, 2003, 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc.
1639 This configure script is free software; the Free Software Foundation
1640 gives unlimited permission to copy, distribute and modify it.
1641 _ACEOF
1642   exit
1643 fi
1644 cat >config.log <<_ACEOF
1645 This file contains any messages produced by compilers while
1646 running configure, to aid debugging if configure makes a mistake.
1647
1648 It was created by $as_me, which was
1649 generated by GNU Autoconf 2.63.  Invocation command line was
1650
1651   $ $0 $@
1652
1653 _ACEOF
1654 exec 5>>config.log
1655 {
1656 cat <<_ASUNAME
1657 ## --------- ##
1658 ## Platform. ##
1659 ## --------- ##
1660
1661 hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
1662 uname -m = `(uname -m) 2>/dev/null || echo unknown`
1663 uname -r = `(uname -r) 2>/dev/null || echo unknown`
1664 uname -s = `(uname -s) 2>/dev/null || echo unknown`
1665 uname -v = `(uname -v) 2>/dev/null || echo unknown`
1666
1667 /usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
1668 /bin/uname -X     = `(/bin/uname -X) 2>/dev/null     || echo unknown`
1669
1670 /bin/arch              = `(/bin/arch) 2>/dev/null              || echo unknown`
1671 /usr/bin/arch -k       = `(/usr/bin/arch -k) 2>/dev/null       || echo unknown`
1672 /usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
1673 /usr/bin/hostinfo      = `(/usr/bin/hostinfo) 2>/dev/null      || echo unknown`
1674 /bin/machine           = `(/bin/machine) 2>/dev/null           || echo unknown`
1675 /usr/bin/oslevel       = `(/usr/bin/oslevel) 2>/dev/null       || echo unknown`
1676 /bin/universe          = `(/bin/universe) 2>/dev/null          || echo unknown`
1677
1678 _ASUNAME
1679
1680 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1681 for as_dir in $PATH
1682 do
1683   IFS=$as_save_IFS
1684   test -z "$as_dir" && as_dir=.
1685   $as_echo "PATH: $as_dir"
1686 done
1687 IFS=$as_save_IFS
1688
1689 } >&5
1690
1691 cat >&5 <<_ACEOF
1692
1693
1694 ## ----------- ##
1695 ## Core tests. ##
1696 ## ----------- ##
1697
1698 _ACEOF
1699
1700
1701 # Keep a trace of the command line.
1702 # Strip out --no-create and --no-recursion so they do not pile up.
1703 # Strip out --silent because we don't want to record it for future runs.
1704 # Also quote any args containing shell meta-characters.
1705 # Make two passes to allow for proper duplicate-argument suppression.
1706 ac_configure_args=
1707 ac_configure_args0=
1708 ac_configure_args1=
1709 ac_must_keep_next=false
1710 for ac_pass in 1 2
1711 do
1712   for ac_arg
1713   do
1714     case $ac_arg in
1715     -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
1716     -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1717     | -silent | --silent | --silen | --sile | --sil)
1718       continue ;;
1719     *\'*)
1720       ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
1721     esac
1722     case $ac_pass in
1723     1) ac_configure_args0="$ac_configure_args0 '$ac_arg'" ;;
1724     2)
1725       ac_configure_args1="$ac_configure_args1 '$ac_arg'"
1726       if test $ac_must_keep_next = true; then
1727         ac_must_keep_next=false # Got value, back to normal.
1728       else
1729         case $ac_arg in
1730           *=* | --config-cache | -C | -disable-* | --disable-* \
1731           | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
1732           | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
1733           | -with-* | --with-* | -without-* | --without-* | --x)
1734             case "$ac_configure_args0 " in
1735               "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
1736             esac
1737             ;;
1738           -* ) ac_must_keep_next=true ;;
1739         esac
1740       fi
1741       ac_configure_args="$ac_configure_args '$ac_arg'"
1742       ;;
1743     esac
1744   done
1745 done
1746 $as_unset ac_configure_args0 || test "${ac_configure_args0+set}" != set || { ac_configure_args0=; export ac_configure_args0; }
1747 $as_unset ac_configure_args1 || test "${ac_configure_args1+set}" != set || { ac_configure_args1=; export ac_configure_args1; }
1748
1749 # When interrupted or exit'd, cleanup temporary files, and complete
1750 # config.log.  We remove comments because anyway the quotes in there
1751 # would cause problems or look ugly.
1752 # WARNING: Use '\'' to represent an apostrophe within the trap.
1753 # WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug.
1754 trap 'exit_status=$?
1755   # Save into config.log some information that might help in debugging.
1756   {
1757     echo
1758
1759     cat <<\_ASBOX
1760 ## ---------------- ##
1761 ## Cache variables. ##
1762 ## ---------------- ##
1763 _ASBOX
1764     echo
1765     # The following way of writing the cache mishandles newlines in values,
1766 (
1767   for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do
1768     eval ac_val=\$$ac_var
1769     case $ac_val in #(
1770     *${as_nl}*)
1771       case $ac_var in #(
1772       *_cv_*) { $as_echo "$as_me:$LINENO: WARNING: cache variable $ac_var contains a newline" >&5
1773 $as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
1774       esac
1775       case $ac_var in #(
1776       _ | IFS | as_nl) ;; #(
1777       BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
1778       *) $as_unset $ac_var ;;
1779       esac ;;
1780     esac
1781   done
1782   (set) 2>&1 |
1783     case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #(
1784     *${as_nl}ac_space=\ *)
1785       sed -n \
1786         "s/'\''/'\''\\\\'\'''\''/g;
1787           s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p"
1788       ;; #(
1789     *)
1790       sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
1791       ;;
1792     esac |
1793     sort
1794 )
1795     echo
1796
1797     cat <<\_ASBOX
1798 ## ----------------- ##
1799 ## Output variables. ##
1800 ## ----------------- ##
1801 _ASBOX
1802     echo
1803     for ac_var in $ac_subst_vars
1804     do
1805       eval ac_val=\$$ac_var
1806       case $ac_val in
1807       *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
1808       esac
1809       $as_echo "$ac_var='\''$ac_val'\''"
1810     done | sort
1811     echo
1812
1813     if test -n "$ac_subst_files"; then
1814       cat <<\_ASBOX
1815 ## ------------------- ##
1816 ## File substitutions. ##
1817 ## ------------------- ##
1818 _ASBOX
1819       echo
1820       for ac_var in $ac_subst_files
1821       do
1822         eval ac_val=\$$ac_var
1823         case $ac_val in
1824         *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
1825         esac
1826         $as_echo "$ac_var='\''$ac_val'\''"
1827       done | sort
1828       echo
1829     fi
1830
1831     if test -s confdefs.h; then
1832       cat <<\_ASBOX
1833 ## ----------- ##
1834 ## confdefs.h. ##
1835 ## ----------- ##
1836 _ASBOX
1837       echo
1838       cat confdefs.h
1839       echo
1840     fi
1841     test "$ac_signal" != 0 &&
1842       $as_echo "$as_me: caught signal $ac_signal"
1843     $as_echo "$as_me: exit $exit_status"
1844   } >&5
1845   rm -f core *.core core.conftest.* &&
1846     rm -f -r conftest* confdefs* conf$$* $ac_clean_files &&
1847     exit $exit_status
1848 ' 0
1849 for ac_signal in 1 2 13 15; do
1850   trap 'ac_signal='$ac_signal'; { (exit 1); exit 1; }' $ac_signal
1851 done
1852 ac_signal=0
1853
1854 # confdefs.h avoids OS command line length limits that DEFS can exceed.
1855 rm -f -r conftest* confdefs.h
1856
1857 # Predefined preprocessor variables.
1858
1859 cat >>confdefs.h <<_ACEOF
1860 #define PACKAGE_NAME "$PACKAGE_NAME"
1861 _ACEOF
1862
1863
1864 cat >>confdefs.h <<_ACEOF
1865 #define PACKAGE_TARNAME "$PACKAGE_TARNAME"
1866 _ACEOF
1867
1868
1869 cat >>confdefs.h <<_ACEOF
1870 #define PACKAGE_VERSION "$PACKAGE_VERSION"
1871 _ACEOF
1872
1873
1874 cat >>confdefs.h <<_ACEOF
1875 #define PACKAGE_STRING "$PACKAGE_STRING"
1876 _ACEOF
1877
1878
1879 cat >>confdefs.h <<_ACEOF
1880 #define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
1881 _ACEOF
1882
1883
1884 # Let the site file select an alternate cache file if it wants to.
1885 # Prefer an explicitly selected file to automatically selected ones.
1886 ac_site_file1=NONE
1887 ac_site_file2=NONE
1888 if test -n "$CONFIG_SITE"; then
1889   ac_site_file1=$CONFIG_SITE
1890 elif test "x$prefix" != xNONE; then
1891   ac_site_file1=$prefix/share/config.site
1892   ac_site_file2=$prefix/etc/config.site
1893 else
1894   ac_site_file1=$ac_default_prefix/share/config.site
1895   ac_site_file2=$ac_default_prefix/etc/config.site
1896 fi
1897 for ac_site_file in "$ac_site_file1" "$ac_site_file2"
1898 do
1899   test "x$ac_site_file" = xNONE && continue
1900   if test -r "$ac_site_file"; then
1901     { $as_echo "$as_me:$LINENO: loading site script $ac_site_file" >&5
1902 $as_echo "$as_me: loading site script $ac_site_file" >&6;}
1903     sed 's/^/| /' "$ac_site_file" >&5
1904     . "$ac_site_file"
1905   fi
1906 done
1907
1908 if test -r "$cache_file"; then
1909   # Some versions of bash will fail to source /dev/null (special
1910   # files actually), so we avoid doing that.
1911   if test -f "$cache_file"; then
1912     { $as_echo "$as_me:$LINENO: loading cache $cache_file" >&5
1913 $as_echo "$as_me: loading cache $cache_file" >&6;}
1914     case $cache_file in
1915       [\\/]* | ?:[\\/]* ) . "$cache_file";;
1916       *)                      . "./$cache_file";;
1917     esac
1918   fi
1919 else
1920   { $as_echo "$as_me:$LINENO: creating cache $cache_file" >&5
1921 $as_echo "$as_me: creating cache $cache_file" >&6;}
1922   >$cache_file
1923 fi
1924
1925 # Check that the precious variables saved in the cache have kept the same
1926 # value.
1927 ac_cache_corrupted=false
1928 for ac_var in $ac_precious_vars; do
1929   eval ac_old_set=\$ac_cv_env_${ac_var}_set
1930   eval ac_new_set=\$ac_env_${ac_var}_set
1931   eval ac_old_val=\$ac_cv_env_${ac_var}_value
1932   eval ac_new_val=\$ac_env_${ac_var}_value
1933   case $ac_old_set,$ac_new_set in
1934     set,)
1935       { $as_echo "$as_me:$LINENO: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
1936 $as_echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
1937       ac_cache_corrupted=: ;;
1938     ,set)
1939       { $as_echo "$as_me:$LINENO: error: \`$ac_var' was not set in the previous run" >&5
1940 $as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
1941       ac_cache_corrupted=: ;;
1942     ,);;
1943     *)
1944       if test "x$ac_old_val" != "x$ac_new_val"; then
1945         # differences in whitespace do not lead to failure.
1946         ac_old_val_w=`echo x $ac_old_val`
1947         ac_new_val_w=`echo x $ac_new_val`
1948         if test "$ac_old_val_w" != "$ac_new_val_w"; then
1949           { $as_echo "$as_me:$LINENO: error: \`$ac_var' has changed since the previous run:" >&5
1950 $as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
1951           ac_cache_corrupted=:
1952         else
1953           { $as_echo "$as_me:$LINENO: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5
1954 $as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;}
1955           eval $ac_var=\$ac_old_val
1956         fi
1957         { $as_echo "$as_me:$LINENO:   former value:  \`$ac_old_val'" >&5
1958 $as_echo "$as_me:   former value:  \`$ac_old_val'" >&2;}
1959         { $as_echo "$as_me:$LINENO:   current value: \`$ac_new_val'" >&5
1960 $as_echo "$as_me:   current value: \`$ac_new_val'" >&2;}
1961       fi;;
1962   esac
1963   # Pass precious variables to config.status.
1964   if test "$ac_new_set" = set; then
1965     case $ac_new_val in
1966     *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
1967     *) ac_arg=$ac_var=$ac_new_val ;;
1968     esac
1969     case " $ac_configure_args " in
1970       *" '$ac_arg' "*) ;; # Avoid dups.  Use of quotes ensures accuracy.
1971       *) ac_configure_args="$ac_configure_args '$ac_arg'" ;;
1972     esac
1973   fi
1974 done
1975 if $ac_cache_corrupted; then
1976   { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5
1977 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
1978   { $as_echo "$as_me:$LINENO: error: changes in the environment can compromise the build" >&5
1979 $as_echo "$as_me: error: changes in the environment can compromise the build" >&2;}
1980   { { $as_echo "$as_me:$LINENO: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&5
1981 $as_echo "$as_me: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&2;}
1982    { (exit 1); exit 1; }; }
1983 fi
1984
1985
1986
1987
1988
1989
1990
1991
1992
1993
1994
1995
1996
1997
1998
1999
2000
2001 ac_ext=c
2002 ac_cpp='$CPP $CPPFLAGS'
2003 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2004 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2005 ac_compiler_gnu=$ac_cv_c_compiler_gnu
2006
2007
2008 ac_config_headers="$ac_config_headers config.h"
2009
2010
2011 echo "current directory: `pwd`"
2012 echo "command line was: $0 $@"
2013
2014 ###############################################################################
2015 #
2016 #       Autoheader stuff
2017 #
2018 ###############################################################################
2019
2020
2021
2022
2023
2024
2025
2026
2027
2028
2029 # This only ever existed in X11R4 and X11R5.
2030 #AH_TEMPLATE([HAVE_XIDLE_EXTENSION],
2031 #           [Define this if you have the XIDLE extension installed. If you
2032 #           have the XIDLE extension, this is recommended.  (You have this
2033 #           extension if the file /usr/include/X11/extensions/xidle.h
2034 #           exists.) Turning on this flag lets XScreenSaver work better with
2035 #           servers which support this extension; but it will still work
2036 #           with servers which do not suport it, so it's a good idea to
2037 #           compile in support for it if you can.])
2038
2039 # Using this extension will crash your X server and make fading not work.
2040 #AH_TEMPLATE([HAVE_MIT_SAVER_EXTENSION],
2041 #           [Define this if you have the MIT-SCREEN-SAVER extension
2042 #            installed.  See the caveats about this extension, above.
2043 #            (It's available if /usr/include/X11/extensions/scrnsaver.h
2044 #            exists.)])
2045
2046 # This only ever existed on SGI hardware.
2047 #AH_TEMPLATE([HAVE_SGI_SAVER_EXTENSION],
2048 #           [Define this if you have the SGI SCREEN_SAVER extension.  This is
2049 #           standard on Irix systems, and not available elsewhere.])
2050
2051 # This only ever existed on SGI hardware.
2052 #AH_TEMPLATE([HAVE_SGI_VC_EXTENSION],
2053 #           [Define this if you have the SGI-VIDEO-CONTROL extension.  This
2054 #           is standard on Irix systems, and not available elsewhere.])
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
2206
2207
2208
2209
2210
2211
2212
2213
2214
2215
2216
2217
2218
2219
2220 # After checking to see that --srcdir is correct (which AC_INIT does)
2221 # check for some random other files that come later in the tar file,
2222 # to make sure everything is here.
2223 #
2224 for d in driver utils hacks hacks/glx ; do
2225   f=$srcdir/$d/Makefile.in
2226   if test \! -r $f ; then
2227     echo ""
2228     echo "ERROR: The package is incomplete: $f does not exist."
2229     echo "       This probably means that your download was truncated."
2230     echo ""
2231     exit 1
2232   fi
2233 done
2234
2235 ###############################################################################
2236 #
2237 #       Function to figure out how to run the compiler.
2238 #
2239 ###############################################################################
2240
2241
2242
2243
2244 ###############################################################################
2245 #
2246 #       Check for availability of various gcc command-line options.
2247 #
2248 ###############################################################################
2249
2250
2251
2252
2253
2254
2255
2256 # Need to disable Objective C extensions in ANSI C on MacOS X to work
2257 # around an Apple-specific gcc bug.
2258 #
2259
2260
2261 ###############################################################################
2262 #
2263 #       Function to figure out how to disable // comments in ANSI C code.
2264 #
2265 #       (With recent gcc, this is done with "-std=c89".  With older gcc, this
2266 #       is done by passing "-lang-c89" to cpp, by passing "-Wp,-lang-c89" to
2267 #       gcc.  Old gcc doesn't support -std, and new gcc doesn't support -lang.
2268 #       so much for compatibility!)
2269 #
2270 #       UPDATE: apparently there is NO WAY to tell gcc 3.2.2 to require that
2271 #       declarations preceed statements, without resorting to "-pedantic".
2272 #       This means that there is no way to get gcc3 to issue warnings that
2273 #       ensure that your code complies with the ANSI/ISO C89 standard, without
2274 #       also drowning in totally useless warnings.  Thank you master may I
2275 #       have another.
2276 #
2277 #       So, I give up, let's just use -pedantic.
2278 #
2279 ###############################################################################
2280
2281
2282
2283
2284
2285
2286 ###############################################################################
2287 #
2288 #       Function to figure out how to create directory trees.
2289 #
2290 ###############################################################################
2291
2292
2293
2294
2295 ###############################################################################
2296 #
2297 #       Function to check whether gettimeofday() exists, and how to call it.
2298 #       This may define HAVE_GETTIMEOFDAY and GETTIMEOFDAY_TWO_ARGS.
2299 #
2300 ###############################################################################
2301
2302
2303
2304
2305 ###############################################################################
2306 #
2307 #       Function to find perl5 (defines PERL and PERL_VERSION.)
2308 #
2309 ###############################################################################
2310
2311 # M4 sucks!!  perl sucks too!!
2312
2313 perl_version_cmd='print $]'
2314
2315
2316
2317
2318
2319 ###############################################################################
2320 #
2321 #       Function to demand "bc".  Losers.
2322 #
2323 ###############################################################################
2324
2325
2326
2327 ###############################################################################
2328 #
2329 #       Functions to check how to do ICMP PING requests.
2330 #
2331 ###############################################################################
2332
2333
2334
2335
2336
2337
2338 ###############################################################################
2339 #
2340 #       Functions to check for various X11 crap.
2341 #
2342 ###############################################################################
2343
2344 # Try and find the app-defaults directory.
2345 # It sucks that autoconf doesn't do this already...
2346 #
2347
2348
2349 ###############################################################################
2350 #
2351 #       Handle the --with-x-app-defaults option HERE
2352 #
2353 ###############################################################################
2354
2355
2356 # Check whether --with-x-app-defaults was given.
2357 if test "${with_x_app_defaults+set}" = set; then
2358   withval=$with_x_app_defaults; ac_cv_x_app_defaults="$withval"
2359 else
2360   eval ac_x_app_defaults="$withval"
2361 fi
2362
2363
2364
2365
2366
2367
2368
2369
2370
2371
2372
2373 # Random special-cases for X on certain pathological OSes.
2374 # You know who you are.
2375 #
2376
2377
2378
2379
2380 ###############################################################################
2381 #
2382 #       Some utility functions to make checking for X things easier.
2383 #
2384 ###############################################################################
2385
2386 # Like AC_CHECK_HEADER, but it uses the already-computed -I directories.
2387 #
2388
2389
2390 # Like AC_EGREP_HEADER, but it uses the already-computed -I directories.
2391 #
2392
2393
2394 # Like AC_TRY_COMPILE, but it uses the already-computed -I directories.
2395 #
2396
2397
2398
2399 # Like AC_CHECK_LIB, but it uses the already-computed -I and -L directories.
2400 # Use this sparingly; it probably doesn't work very well on X programs.
2401 #
2402
2403
2404 # Like AC_TRY_RUN, but it uses the already-computed -I directories.
2405 # (But not the -L directories!)
2406 #
2407
2408
2409
2410
2411 # Usage: HANDLE_X_PATH_ARG([variable_name],
2412 #                          [--command-line-option],
2413 #                          [descriptive string])
2414 #
2415 # All of the --with options take three forms:
2416 #
2417 #   --with-foo (or --with-foo=yes)
2418 #   --without-foo (or --with-foo=no)
2419 #   --with-foo=/DIR
2420 #
2421 # This function, HANDLE_X_PATH_ARG, deals with the /DIR case.  When it sees
2422 # a directory (string beginning with a slash) it checks to see whether
2423 # /DIR/include and /DIR/lib exist, and adds them to $X_CFLAGS and $X_LIBS
2424 # as appropriate.
2425 #
2426
2427
2428
2429
2430 ###############################################################################
2431 ###############################################################################
2432 #
2433 #       End of function definitions.  Now start actually executing stuff.
2434 #
2435 ###############################################################################
2436 ###############################################################################
2437
2438 # WTF!  autoconf emits this *way* too late.  Do it earlier.
2439 test "x$prefix" = xNONE && prefix=$ac_default_prefix
2440 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
2441
2442
2443 # random compiler setup
2444 ac_aux_dir=
2445 for ac_dir in "$srcdir" "$srcdir/.." "$srcdir/../.."; do
2446   if test -f "$ac_dir/install-sh"; then
2447     ac_aux_dir=$ac_dir
2448     ac_install_sh="$ac_aux_dir/install-sh -c"
2449     break
2450   elif test -f "$ac_dir/install.sh"; then
2451     ac_aux_dir=$ac_dir
2452     ac_install_sh="$ac_aux_dir/install.sh -c"
2453     break
2454   elif test -f "$ac_dir/shtool"; then
2455     ac_aux_dir=$ac_dir
2456     ac_install_sh="$ac_aux_dir/shtool install -c"
2457     break
2458   fi
2459 done
2460 if test -z "$ac_aux_dir"; then
2461   { { $as_echo "$as_me:$LINENO: error: cannot find install-sh or install.sh in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" >&5
2462 $as_echo "$as_me: error: cannot find install-sh or install.sh in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" >&2;}
2463    { (exit 1); exit 1; }; }
2464 fi
2465
2466 # These three variables are undocumented and unsupported,
2467 # and are intended to be withdrawn in a future Autoconf release.
2468 # They can cause serious problems if a builder's source tree is in a directory
2469 # whose full name contains unusual characters.
2470 ac_config_guess="$SHELL $ac_aux_dir/config.guess"  # Please don't use this var.
2471 ac_config_sub="$SHELL $ac_aux_dir/config.sub"  # Please don't use this var.
2472 ac_configure="$SHELL $ac_aux_dir/configure"  # Please don't use this var.
2473
2474
2475 # Make sure we can run config.sub.
2476 $SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 ||
2477   { { $as_echo "$as_me:$LINENO: error: cannot run $SHELL $ac_aux_dir/config.sub" >&5
2478 $as_echo "$as_me: error: cannot run $SHELL $ac_aux_dir/config.sub" >&2;}
2479    { (exit 1); exit 1; }; }
2480
2481 { $as_echo "$as_me:$LINENO: checking build system type" >&5
2482 $as_echo_n "checking build system type... " >&6; }
2483 if test "${ac_cv_build+set}" = set; then
2484   $as_echo_n "(cached) " >&6
2485 else
2486   ac_build_alias=$build_alias
2487 test "x$ac_build_alias" = x &&
2488   ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"`
2489 test "x$ac_build_alias" = x &&
2490   { { $as_echo "$as_me:$LINENO: error: cannot guess build type; you must specify one" >&5
2491 $as_echo "$as_me: error: cannot guess build type; you must specify one" >&2;}
2492    { (exit 1); exit 1; }; }
2493 ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` ||
2494   { { $as_echo "$as_me:$LINENO: error: $SHELL $ac_aux_dir/config.sub $ac_build_alias failed" >&5
2495 $as_echo "$as_me: error: $SHELL $ac_aux_dir/config.sub $ac_build_alias failed" >&2;}
2496    { (exit 1); exit 1; }; }
2497
2498 fi
2499 { $as_echo "$as_me:$LINENO: result: $ac_cv_build" >&5
2500 $as_echo "$ac_cv_build" >&6; }
2501 case $ac_cv_build in
2502 *-*-*) ;;
2503 *) { { $as_echo "$as_me:$LINENO: error: invalid value of canonical build" >&5
2504 $as_echo "$as_me: error: invalid value of canonical build" >&2;}
2505    { (exit 1); exit 1; }; };;
2506 esac
2507 build=$ac_cv_build
2508 ac_save_IFS=$IFS; IFS='-'
2509 set x $ac_cv_build
2510 shift
2511 build_cpu=$1
2512 build_vendor=$2
2513 shift; shift
2514 # Remember, the first character of IFS is used to create $*,
2515 # except with old shells:
2516 build_os=$*
2517 IFS=$ac_save_IFS
2518 case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac
2519
2520
2521 { $as_echo "$as_me:$LINENO: checking host system type" >&5
2522 $as_echo_n "checking host system type... " >&6; }
2523 if test "${ac_cv_host+set}" = set; then
2524   $as_echo_n "(cached) " >&6
2525 else
2526   if test "x$host_alias" = x; then
2527   ac_cv_host=$ac_cv_build
2528 else
2529   ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` ||
2530     { { $as_echo "$as_me:$LINENO: error: $SHELL $ac_aux_dir/config.sub $host_alias failed" >&5
2531 $as_echo "$as_me: error: $SHELL $ac_aux_dir/config.sub $host_alias failed" >&2;}
2532    { (exit 1); exit 1; }; }
2533 fi
2534
2535 fi
2536 { $as_echo "$as_me:$LINENO: result: $ac_cv_host" >&5
2537 $as_echo "$ac_cv_host" >&6; }
2538 case $ac_cv_host in
2539 *-*-*) ;;
2540 *) { { $as_echo "$as_me:$LINENO: error: invalid value of canonical host" >&5
2541 $as_echo "$as_me: error: invalid value of canonical host" >&2;}
2542    { (exit 1); exit 1; }; };;
2543 esac
2544 host=$ac_cv_host
2545 ac_save_IFS=$IFS; IFS='-'
2546 set x $ac_cv_host
2547 shift
2548 host_cpu=$1
2549 host_vendor=$2
2550 shift; shift
2551 # Remember, the first character of IFS is used to create $*,
2552 # except with old shells:
2553 host_os=$*
2554 IFS=$ac_save_IFS
2555 case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac
2556
2557
2558
2559 ac_ext=c
2560 ac_cpp='$CPP $CPPFLAGS'
2561 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2562 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2563 ac_compiler_gnu=$ac_cv_c_compiler_gnu
2564 if test -n "$ac_tool_prefix"; then
2565   # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
2566 set dummy ${ac_tool_prefix}gcc; ac_word=$2
2567 { $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
2568 $as_echo_n "checking for $ac_word... " >&6; }
2569 if test "${ac_cv_prog_CC+set}" = set; then
2570   $as_echo_n "(cached) " >&6
2571 else
2572   if test -n "$CC"; then
2573   ac_cv_prog_CC="$CC" # Let the user override the test.
2574 else
2575 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2576 for as_dir in $PATH
2577 do
2578   IFS=$as_save_IFS
2579   test -z "$as_dir" && as_dir=.
2580   for ac_exec_ext in '' $ac_executable_extensions; do
2581   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
2582     ac_cv_prog_CC="${ac_tool_prefix}gcc"
2583     $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
2584     break 2
2585   fi
2586 done
2587 done
2588 IFS=$as_save_IFS
2589
2590 fi
2591 fi
2592 CC=$ac_cv_prog_CC
2593 if test -n "$CC"; then
2594   { $as_echo "$as_me:$LINENO: result: $CC" >&5
2595 $as_echo "$CC" >&6; }
2596 else
2597   { $as_echo "$as_me:$LINENO: result: no" >&5
2598 $as_echo "no" >&6; }
2599 fi
2600
2601
2602 fi
2603 if test -z "$ac_cv_prog_CC"; then
2604   ac_ct_CC=$CC
2605   # Extract the first word of "gcc", so it can be a program name with args.
2606 set dummy gcc; ac_word=$2
2607 { $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
2608 $as_echo_n "checking for $ac_word... " >&6; }
2609 if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
2610   $as_echo_n "(cached) " >&6
2611 else
2612   if test -n "$ac_ct_CC"; then
2613   ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
2614 else
2615 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2616 for as_dir in $PATH
2617 do
2618   IFS=$as_save_IFS
2619   test -z "$as_dir" && as_dir=.
2620   for ac_exec_ext in '' $ac_executable_extensions; do
2621   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
2622     ac_cv_prog_ac_ct_CC="gcc"
2623     $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
2624     break 2
2625   fi
2626 done
2627 done
2628 IFS=$as_save_IFS
2629
2630 fi
2631 fi
2632 ac_ct_CC=$ac_cv_prog_ac_ct_CC
2633 if test -n "$ac_ct_CC"; then
2634   { $as_echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
2635 $as_echo "$ac_ct_CC" >&6; }
2636 else
2637   { $as_echo "$as_me:$LINENO: result: no" >&5
2638 $as_echo "no" >&6; }
2639 fi
2640
2641   if test "x$ac_ct_CC" = x; then
2642     CC=""
2643   else
2644     case $cross_compiling:$ac_tool_warned in
2645 yes:)
2646 { $as_echo "$as_me:$LINENO: WARNING: using cross tools not prefixed with host triplet" >&5
2647 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
2648 ac_tool_warned=yes ;;
2649 esac
2650     CC=$ac_ct_CC
2651   fi
2652 else
2653   CC="$ac_cv_prog_CC"
2654 fi
2655
2656 if test -z "$CC"; then
2657           if test -n "$ac_tool_prefix"; then
2658     # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args.
2659 set dummy ${ac_tool_prefix}cc; ac_word=$2
2660 { $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
2661 $as_echo_n "checking for $ac_word... " >&6; }
2662 if test "${ac_cv_prog_CC+set}" = set; then
2663   $as_echo_n "(cached) " >&6
2664 else
2665   if test -n "$CC"; then
2666   ac_cv_prog_CC="$CC" # Let the user override the test.
2667 else
2668 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2669 for as_dir in $PATH
2670 do
2671   IFS=$as_save_IFS
2672   test -z "$as_dir" && as_dir=.
2673   for ac_exec_ext in '' $ac_executable_extensions; do
2674   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
2675     ac_cv_prog_CC="${ac_tool_prefix}cc"
2676     $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
2677     break 2
2678   fi
2679 done
2680 done
2681 IFS=$as_save_IFS
2682
2683 fi
2684 fi
2685 CC=$ac_cv_prog_CC
2686 if test -n "$CC"; then
2687   { $as_echo "$as_me:$LINENO: result: $CC" >&5
2688 $as_echo "$CC" >&6; }
2689 else
2690   { $as_echo "$as_me:$LINENO: result: no" >&5
2691 $as_echo "no" >&6; }
2692 fi
2693
2694
2695   fi
2696 fi
2697 if test -z "$CC"; then
2698   # Extract the first word of "cc", so it can be a program name with args.
2699 set dummy cc; ac_word=$2
2700 { $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
2701 $as_echo_n "checking for $ac_word... " >&6; }
2702 if test "${ac_cv_prog_CC+set}" = set; then
2703   $as_echo_n "(cached) " >&6
2704 else
2705   if test -n "$CC"; then
2706   ac_cv_prog_CC="$CC" # Let the user override the test.
2707 else
2708   ac_prog_rejected=no
2709 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2710 for as_dir in $PATH
2711 do
2712   IFS=$as_save_IFS
2713   test -z "$as_dir" && as_dir=.
2714   for ac_exec_ext in '' $ac_executable_extensions; do
2715   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
2716     if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
2717        ac_prog_rejected=yes
2718        continue
2719      fi
2720     ac_cv_prog_CC="cc"
2721     $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
2722     break 2
2723   fi
2724 done
2725 done
2726 IFS=$as_save_IFS
2727
2728 if test $ac_prog_rejected = yes; then
2729   # We found a bogon in the path, so make sure we never use it.
2730   set dummy $ac_cv_prog_CC
2731   shift
2732   if test $# != 0; then
2733     # We chose a different compiler from the bogus one.
2734     # However, it has the same basename, so the bogon will be chosen
2735     # first if we set CC to just the basename; use the full file name.
2736     shift
2737     ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@"
2738   fi
2739 fi
2740 fi
2741 fi
2742 CC=$ac_cv_prog_CC
2743 if test -n "$CC"; then
2744   { $as_echo "$as_me:$LINENO: result: $CC" >&5
2745 $as_echo "$CC" >&6; }
2746 else
2747   { $as_echo "$as_me:$LINENO: result: no" >&5
2748 $as_echo "no" >&6; }
2749 fi
2750
2751
2752 fi
2753 if test -z "$CC"; then
2754   if test -n "$ac_tool_prefix"; then
2755   for ac_prog in cl.exe
2756   do
2757     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
2758 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
2759 { $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
2760 $as_echo_n "checking for $ac_word... " >&6; }
2761 if test "${ac_cv_prog_CC+set}" = set; then
2762   $as_echo_n "(cached) " >&6
2763 else
2764   if test -n "$CC"; then
2765   ac_cv_prog_CC="$CC" # Let the user override the test.
2766 else
2767 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2768 for as_dir in $PATH
2769 do
2770   IFS=$as_save_IFS
2771   test -z "$as_dir" && as_dir=.
2772   for ac_exec_ext in '' $ac_executable_extensions; do
2773   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
2774     ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
2775     $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
2776     break 2
2777   fi
2778 done
2779 done
2780 IFS=$as_save_IFS
2781
2782 fi
2783 fi
2784 CC=$ac_cv_prog_CC
2785 if test -n "$CC"; then
2786   { $as_echo "$as_me:$LINENO: result: $CC" >&5
2787 $as_echo "$CC" >&6; }
2788 else
2789   { $as_echo "$as_me:$LINENO: result: no" >&5
2790 $as_echo "no" >&6; }
2791 fi
2792
2793
2794     test -n "$CC" && break
2795   done
2796 fi
2797 if test -z "$CC"; then
2798   ac_ct_CC=$CC
2799   for ac_prog in cl.exe
2800 do
2801   # Extract the first word of "$ac_prog", so it can be a program name with args.
2802 set dummy $ac_prog; ac_word=$2
2803 { $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
2804 $as_echo_n "checking for $ac_word... " >&6; }
2805 if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
2806   $as_echo_n "(cached) " >&6
2807 else
2808   if test -n "$ac_ct_CC"; then
2809   ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
2810 else
2811 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2812 for as_dir in $PATH
2813 do
2814   IFS=$as_save_IFS
2815   test -z "$as_dir" && as_dir=.
2816   for ac_exec_ext in '' $ac_executable_extensions; do
2817   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
2818     ac_cv_prog_ac_ct_CC="$ac_prog"
2819     $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
2820     break 2
2821   fi
2822 done
2823 done
2824 IFS=$as_save_IFS
2825
2826 fi
2827 fi
2828 ac_ct_CC=$ac_cv_prog_ac_ct_CC
2829 if test -n "$ac_ct_CC"; then
2830   { $as_echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
2831 $as_echo "$ac_ct_CC" >&6; }
2832 else
2833   { $as_echo "$as_me:$LINENO: result: no" >&5
2834 $as_echo "no" >&6; }
2835 fi
2836
2837
2838   test -n "$ac_ct_CC" && break
2839 done
2840
2841   if test "x$ac_ct_CC" = x; then
2842     CC=""
2843   else
2844     case $cross_compiling:$ac_tool_warned in
2845 yes:)
2846 { $as_echo "$as_me:$LINENO: WARNING: using cross tools not prefixed with host triplet" >&5
2847 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
2848 ac_tool_warned=yes ;;
2849 esac
2850     CC=$ac_ct_CC
2851   fi
2852 fi
2853
2854 fi
2855
2856
2857 test -z "$CC" && { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5
2858 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2859 { { $as_echo "$as_me:$LINENO: error: no acceptable C compiler found in \$PATH
2860 See \`config.log' for more details." >&5
2861 $as_echo "$as_me: error: no acceptable C compiler found in \$PATH
2862 See \`config.log' for more details." >&2;}
2863    { (exit 1); exit 1; }; }; }
2864
2865 # Provide some information about the compiler.
2866 $as_echo "$as_me:$LINENO: checking for C compiler version" >&5
2867 set X $ac_compile
2868 ac_compiler=$2
2869 { (ac_try="$ac_compiler --version >&5"
2870 case "(($ac_try" in
2871   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2872   *) ac_try_echo=$ac_try;;
2873 esac
2874 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
2875 $as_echo "$ac_try_echo") >&5
2876   (eval "$ac_compiler --version >&5") 2>&5
2877   ac_status=$?
2878   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
2879   (exit $ac_status); }
2880 { (ac_try="$ac_compiler -v >&5"
2881 case "(($ac_try" in
2882   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2883   *) ac_try_echo=$ac_try;;
2884 esac
2885 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
2886 $as_echo "$ac_try_echo") >&5
2887   (eval "$ac_compiler -v >&5") 2>&5
2888   ac_status=$?
2889   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
2890   (exit $ac_status); }
2891 { (ac_try="$ac_compiler -V >&5"
2892 case "(($ac_try" in
2893   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2894   *) ac_try_echo=$ac_try;;
2895 esac
2896 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
2897 $as_echo "$ac_try_echo") >&5
2898   (eval "$ac_compiler -V >&5") 2>&5
2899   ac_status=$?
2900   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
2901   (exit $ac_status); }
2902
2903 cat >conftest.$ac_ext <<_ACEOF
2904 /* confdefs.h.  */
2905 _ACEOF
2906 cat confdefs.h >>conftest.$ac_ext
2907 cat >>conftest.$ac_ext <<_ACEOF
2908 /* end confdefs.h.  */
2909
2910 int
2911 main ()
2912 {
2913
2914   ;
2915   return 0;
2916 }
2917 _ACEOF
2918 ac_clean_files_save=$ac_clean_files
2919 ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out"
2920 # Try to create an executable without -o first, disregard a.out.
2921 # It will help us diagnose broken compilers, and finding out an intuition
2922 # of exeext.
2923 { $as_echo "$as_me:$LINENO: checking for C compiler default output file name" >&5
2924 $as_echo_n "checking for C compiler default output file name... " >&6; }
2925 ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
2926
2927 # The possible output files:
2928 ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*"
2929
2930 ac_rmfiles=
2931 for ac_file in $ac_files
2932 do
2933   case $ac_file in
2934     *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
2935     * ) ac_rmfiles="$ac_rmfiles $ac_file";;
2936   esac
2937 done
2938 rm -f $ac_rmfiles
2939
2940 if { (ac_try="$ac_link_default"
2941 case "(($ac_try" in
2942   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2943   *) ac_try_echo=$ac_try;;
2944 esac
2945 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
2946 $as_echo "$ac_try_echo") >&5
2947   (eval "$ac_link_default") 2>&5
2948   ac_status=$?
2949   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
2950   (exit $ac_status); }; then
2951   # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
2952 # So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
2953 # in a Makefile.  We should not override ac_cv_exeext if it was cached,
2954 # so that the user can short-circuit this test for compilers unknown to
2955 # Autoconf.
2956 for ac_file in $ac_files ''
2957 do
2958   test -f "$ac_file" || continue
2959   case $ac_file in
2960     *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj )
2961         ;;
2962     [ab].out )
2963         # We found the default executable, but exeext='' is most
2964         # certainly right.
2965         break;;
2966     *.* )
2967         if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no;
2968         then :; else
2969            ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
2970         fi
2971         # We set ac_cv_exeext here because the later test for it is not
2972         # safe: cross compilers may not add the suffix if given an `-o'
2973         # argument, so we may need to know it at that point already.
2974         # Even if this section looks crufty: it has the advantage of
2975         # actually working.
2976         break;;
2977     * )
2978         break;;
2979   esac
2980 done
2981 test "$ac_cv_exeext" = no && ac_cv_exeext=
2982
2983 else
2984   ac_file=''
2985 fi
2986
2987 { $as_echo "$as_me:$LINENO: result: $ac_file" >&5
2988 $as_echo "$ac_file" >&6; }
2989 if test -z "$ac_file"; then
2990   $as_echo "$as_me: failed program was:" >&5
2991 sed 's/^/| /' conftest.$ac_ext >&5
2992
2993 { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5
2994 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2995 { { $as_echo "$as_me:$LINENO: error: C compiler cannot create executables
2996 See \`config.log' for more details." >&5
2997 $as_echo "$as_me: error: C compiler cannot create executables
2998 See \`config.log' for more details." >&2;}
2999    { (exit 77); exit 77; }; }; }
3000 fi
3001
3002 ac_exeext=$ac_cv_exeext
3003
3004 # Check that the compiler produces executables we can run.  If not, either
3005 # the compiler is broken, or we cross compile.
3006 { $as_echo "$as_me:$LINENO: checking whether the C compiler works" >&5
3007 $as_echo_n "checking whether the C compiler works... " >&6; }
3008 # FIXME: These cross compiler hacks should be removed for Autoconf 3.0
3009 # If not cross compiling, check that we can run a simple program.
3010 if test "$cross_compiling" != yes; then
3011   if { ac_try='./$ac_file'
3012   { (case "(($ac_try" in
3013   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3014   *) ac_try_echo=$ac_try;;
3015 esac
3016 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
3017 $as_echo "$ac_try_echo") >&5
3018   (eval "$ac_try") 2>&5
3019   ac_status=$?
3020   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
3021   (exit $ac_status); }; }; then
3022     cross_compiling=no
3023   else
3024     if test "$cross_compiling" = maybe; then
3025         cross_compiling=yes
3026     else
3027         { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5
3028 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3029 { { $as_echo "$as_me:$LINENO: error: cannot run C compiled programs.
3030 If you meant to cross compile, use \`--host'.
3031 See \`config.log' for more details." >&5
3032 $as_echo "$as_me: error: cannot run C compiled programs.
3033 If you meant to cross compile, use \`--host'.
3034 See \`config.log' for more details." >&2;}
3035    { (exit 1); exit 1; }; }; }
3036     fi
3037   fi
3038 fi
3039 { $as_echo "$as_me:$LINENO: result: yes" >&5
3040 $as_echo "yes" >&6; }
3041
3042 rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out
3043 ac_clean_files=$ac_clean_files_save
3044 # Check that the compiler produces executables we can run.  If not, either
3045 # the compiler is broken, or we cross compile.
3046 { $as_echo "$as_me:$LINENO: checking whether we are cross compiling" >&5
3047 $as_echo_n "checking whether we are cross compiling... " >&6; }
3048 { $as_echo "$as_me:$LINENO: result: $cross_compiling" >&5
3049 $as_echo "$cross_compiling" >&6; }
3050
3051 { $as_echo "$as_me:$LINENO: checking for suffix of executables" >&5
3052 $as_echo_n "checking for suffix of executables... " >&6; }
3053 if { (ac_try="$ac_link"
3054 case "(($ac_try" in
3055   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3056   *) ac_try_echo=$ac_try;;
3057 esac
3058 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
3059 $as_echo "$ac_try_echo") >&5
3060   (eval "$ac_link") 2>&5
3061   ac_status=$?
3062   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
3063   (exit $ac_status); }; then
3064   # If both `conftest.exe' and `conftest' are `present' (well, observable)
3065 # catch `conftest.exe'.  For instance with Cygwin, `ls conftest' will
3066 # work properly (i.e., refer to `conftest.exe'), while it won't with
3067 # `rm'.
3068 for ac_file in conftest.exe conftest conftest.*; do
3069   test -f "$ac_file" || continue
3070   case $ac_file in
3071     *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
3072     *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
3073           break;;
3074     * ) break;;
3075   esac
3076 done
3077 else
3078   { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5
3079 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3080 { { $as_echo "$as_me:$LINENO: error: cannot compute suffix of executables: cannot compile and link
3081 See \`config.log' for more details." >&5
3082 $as_echo "$as_me: error: cannot compute suffix of executables: cannot compile and link
3083 See \`config.log' for more details." >&2;}
3084    { (exit 1); exit 1; }; }; }
3085 fi
3086
3087 rm -rf conftest$ac_cv_exeext
3088 { $as_echo "$as_me:$LINENO: result: $ac_cv_exeext" >&5
3089 $as_echo "$ac_cv_exeext" >&6; }
3090
3091 rm -rf conftest.$ac_ext
3092 EXEEXT=$ac_cv_exeext
3093 ac_exeext=$EXEEXT
3094 { $as_echo "$as_me:$LINENO: checking for suffix of object files" >&5
3095 $as_echo_n "checking for suffix of object files... " >&6; }
3096 if test "${ac_cv_objext+set}" = set; then
3097   $as_echo_n "(cached) " >&6
3098 else
3099   cat >conftest.$ac_ext <<_ACEOF
3100 /* confdefs.h.  */
3101 _ACEOF
3102 cat confdefs.h >>conftest.$ac_ext
3103 cat >>conftest.$ac_ext <<_ACEOF
3104 /* end confdefs.h.  */
3105
3106 int
3107 main ()
3108 {
3109
3110   ;
3111   return 0;
3112 }
3113 _ACEOF
3114 rm -rf conftest.o conftest.obj
3115 if { (ac_try="$ac_compile"
3116 case "(($ac_try" in
3117   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3118   *) ac_try_echo=$ac_try;;
3119 esac
3120 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
3121 $as_echo "$ac_try_echo") >&5
3122   (eval "$ac_compile") 2>&5
3123   ac_status=$?
3124   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
3125   (exit $ac_status); }; then
3126   for ac_file in conftest.o conftest.obj conftest.*; do
3127   test -f "$ac_file" || continue;
3128   case $ac_file in
3129     *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;;
3130     *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
3131        break;;
3132   esac
3133 done
3134 else
3135   $as_echo "$as_me: failed program was:" >&5
3136 sed 's/^/| /' conftest.$ac_ext >&5
3137
3138 { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5
3139 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3140 { { $as_echo "$as_me:$LINENO: error: cannot compute suffix of object files: cannot compile
3141 See \`config.log' for more details." >&5
3142 $as_echo "$as_me: error: cannot compute suffix of object files: cannot compile
3143 See \`config.log' for more details." >&2;}
3144    { (exit 1); exit 1; }; }; }
3145 fi
3146
3147 rm -rf conftest.$ac_cv_objext conftest.$ac_ext
3148 fi
3149 { $as_echo "$as_me:$LINENO: result: $ac_cv_objext" >&5
3150 $as_echo "$ac_cv_objext" >&6; }
3151 OBJEXT=$ac_cv_objext
3152 ac_objext=$OBJEXT
3153 { $as_echo "$as_me:$LINENO: checking whether we are using the GNU C compiler" >&5
3154 $as_echo_n "checking whether we are using the GNU C compiler... " >&6; }
3155 if test "${ac_cv_c_compiler_gnu+set}" = set; then
3156   $as_echo_n "(cached) " >&6
3157 else
3158   cat >conftest.$ac_ext <<_ACEOF
3159 /* confdefs.h.  */
3160 _ACEOF
3161 cat confdefs.h >>conftest.$ac_ext
3162 cat >>conftest.$ac_ext <<_ACEOF
3163 /* end confdefs.h.  */
3164
3165 int
3166 main ()
3167 {
3168 #ifndef __GNUC__
3169        choke me
3170 #endif
3171
3172   ;
3173   return 0;
3174 }
3175 _ACEOF
3176 rm -rf conftest.$ac_objext
3177 if { (ac_try="$ac_compile"
3178 case "(($ac_try" in
3179   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3180   *) ac_try_echo=$ac_try;;
3181 esac
3182 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
3183 $as_echo "$ac_try_echo") >&5
3184   (eval "$ac_compile") 2>conftest.er1
3185   ac_status=$?
3186   grep -v '^ *+' conftest.er1 >conftest.err
3187   rm -rf conftest.er1
3188   cat conftest.err >&5
3189   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
3190   (exit $ac_status); } && {
3191          test -z "$ac_c_werror_flag" ||
3192          test ! -s conftest.err
3193        } && test -s conftest.$ac_objext; then
3194   ac_compiler_gnu=yes
3195 else
3196   $as_echo "$as_me: failed program was:" >&5
3197 sed 's/^/| /' conftest.$ac_ext >&5
3198
3199         ac_compiler_gnu=no
3200 fi
3201
3202 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3203 ac_cv_c_compiler_gnu=$ac_compiler_gnu
3204
3205 fi
3206 { $as_echo "$as_me:$LINENO: result: $ac_cv_c_compiler_gnu" >&5
3207 $as_echo "$ac_cv_c_compiler_gnu" >&6; }
3208 if test $ac_compiler_gnu = yes; then
3209   GCC=yes
3210 else
3211   GCC=
3212 fi
3213 ac_test_CFLAGS=${CFLAGS+set}
3214 ac_save_CFLAGS=$CFLAGS
3215 { $as_echo "$as_me:$LINENO: checking whether $CC accepts -g" >&5
3216 $as_echo_n "checking whether $CC accepts -g... " >&6; }
3217 if test "${ac_cv_prog_cc_g+set}" = set; then
3218   $as_echo_n "(cached) " >&6
3219 else
3220   ac_save_c_werror_flag=$ac_c_werror_flag
3221    ac_c_werror_flag=yes
3222    ac_cv_prog_cc_g=no
3223    CFLAGS="-g"
3224    cat >conftest.$ac_ext <<_ACEOF
3225 /* confdefs.h.  */
3226 _ACEOF
3227 cat confdefs.h >>conftest.$ac_ext
3228 cat >>conftest.$ac_ext <<_ACEOF
3229 /* end confdefs.h.  */
3230
3231 int
3232 main ()
3233 {
3234
3235   ;
3236   return 0;
3237 }
3238 _ACEOF
3239 rm -rf conftest.$ac_objext
3240 if { (ac_try="$ac_compile"
3241 case "(($ac_try" in
3242   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3243   *) ac_try_echo=$ac_try;;
3244 esac
3245 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
3246 $as_echo "$ac_try_echo") >&5
3247   (eval "$ac_compile") 2>conftest.er1
3248   ac_status=$?
3249   grep -v '^ *+' conftest.er1 >conftest.err
3250   rm -rf conftest.er1
3251   cat conftest.err >&5
3252   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
3253   (exit $ac_status); } && {
3254          test -z "$ac_c_werror_flag" ||
3255          test ! -s conftest.err
3256        } && test -s conftest.$ac_objext; then
3257   ac_cv_prog_cc_g=yes
3258 else
3259   $as_echo "$as_me: failed program was:" >&5
3260 sed 's/^/| /' conftest.$ac_ext >&5
3261
3262         CFLAGS=""
3263       cat >conftest.$ac_ext <<_ACEOF
3264 /* confdefs.h.  */
3265 _ACEOF
3266 cat confdefs.h >>conftest.$ac_ext
3267 cat >>conftest.$ac_ext <<_ACEOF
3268 /* end confdefs.h.  */
3269
3270 int
3271 main ()
3272 {
3273
3274   ;
3275   return 0;
3276 }
3277 _ACEOF
3278 rm -rf conftest.$ac_objext
3279 if { (ac_try="$ac_compile"
3280 case "(($ac_try" in
3281   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3282   *) ac_try_echo=$ac_try;;
3283 esac
3284 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
3285 $as_echo "$ac_try_echo") >&5
3286   (eval "$ac_compile") 2>conftest.er1
3287   ac_status=$?
3288   grep -v '^ *+' conftest.er1 >conftest.err
3289   rm -rf conftest.er1
3290   cat conftest.err >&5
3291   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
3292   (exit $ac_status); } && {
3293          test -z "$ac_c_werror_flag" ||
3294          test ! -s conftest.err
3295        } && test -s conftest.$ac_objext; then
3296   :
3297 else
3298   $as_echo "$as_me: failed program was:" >&5
3299 sed 's/^/| /' conftest.$ac_ext >&5
3300
3301         ac_c_werror_flag=$ac_save_c_werror_flag
3302          CFLAGS="-g"
3303          cat >conftest.$ac_ext <<_ACEOF
3304 /* confdefs.h.  */
3305 _ACEOF
3306 cat confdefs.h >>conftest.$ac_ext
3307 cat >>conftest.$ac_ext <<_ACEOF
3308 /* end confdefs.h.  */
3309
3310 int
3311 main ()
3312 {
3313
3314   ;
3315   return 0;
3316 }
3317 _ACEOF
3318 rm -rf conftest.$ac_objext
3319 if { (ac_try="$ac_compile"
3320 case "(($ac_try" in
3321   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3322   *) ac_try_echo=$ac_try;;
3323 esac
3324 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
3325 $as_echo "$ac_try_echo") >&5
3326   (eval "$ac_compile") 2>conftest.er1
3327   ac_status=$?
3328   grep -v '^ *+' conftest.er1 >conftest.err
3329   rm -rf conftest.er1
3330   cat conftest.err >&5
3331   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
3332   (exit $ac_status); } && {
3333          test -z "$ac_c_werror_flag" ||
3334          test ! -s conftest.err
3335        } && test -s conftest.$ac_objext; then
3336   ac_cv_prog_cc_g=yes
3337 else
3338   $as_echo "$as_me: failed program was:" >&5
3339 sed 's/^/| /' conftest.$ac_ext >&5
3340
3341
3342 fi
3343
3344 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3345 fi
3346
3347 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3348 fi
3349
3350 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3351    ac_c_werror_flag=$ac_save_c_werror_flag
3352 fi
3353 { $as_echo "$as_me:$LINENO: result: $ac_cv_prog_cc_g" >&5
3354 $as_echo "$ac_cv_prog_cc_g" >&6; }
3355 if test "$ac_test_CFLAGS" = set; then
3356   CFLAGS=$ac_save_CFLAGS
3357 elif test $ac_cv_prog_cc_g = yes; then
3358   if test "$GCC" = yes; then
3359     CFLAGS="-g -O2"
3360   else
3361     CFLAGS="-g"
3362   fi
3363 else
3364   if test "$GCC" = yes; then
3365     CFLAGS="-O2"
3366   else
3367     CFLAGS=
3368   fi
3369 fi
3370 { $as_echo "$as_me:$LINENO: checking for $CC option to accept ISO C89" >&5
3371 $as_echo_n "checking for $CC option to accept ISO C89... " >&6; }
3372 if test "${ac_cv_prog_cc_c89+set}" = set; then
3373   $as_echo_n "(cached) " >&6
3374 else
3375   ac_cv_prog_cc_c89=no
3376 ac_save_CC=$CC
3377 cat >conftest.$ac_ext <<_ACEOF
3378 /* confdefs.h.  */
3379 _ACEOF
3380 cat confdefs.h >>conftest.$ac_ext
3381 cat >>conftest.$ac_ext <<_ACEOF
3382 /* end confdefs.h.  */
3383 #include <stdarg.h>
3384 #include <stdio.h>
3385 #include <sys/types.h>
3386 #include <sys/stat.h>
3387 /* Most of the following tests are stolen from RCS 5.7's src/conf.sh.  */
3388 struct buf { int x; };
3389 FILE * (*rcsopen) (struct buf *, struct stat *, int);
3390 static char *e (p, i)
3391      char **p;
3392      int i;
3393 {
3394   return p[i];
3395 }
3396 static char *f (char * (*g) (char **, int), char **p, ...)
3397 {
3398   char *s;
3399   va_list v;
3400   va_start (v,p);
3401   s = g (p, va_arg (v,int));
3402   va_end (v);
3403   return s;
3404 }
3405
3406 /* OSF 4.0 Compaq cc is some sort of almost-ANSI by default.  It has
3407    function prototypes and stuff, but not '\xHH' hex character constants.
3408    These don't provoke an error unfortunately, instead are silently treated
3409    as 'x'.  The following induces an error, until -std is added to get
3410    proper ANSI mode.  Curiously '\x00'!='x' always comes out true, for an
3411    array size at least.  It's necessary to write '\x00'==0 to get something
3412    that's true only with -std.  */
3413 int osf4_cc_array ['\x00' == 0 ? 1 : -1];
3414
3415 /* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
3416    inside strings and character constants.  */
3417 #define FOO(x) 'x'
3418 int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
3419
3420 int test (int i, double x);
3421 struct s1 {int (*f) (int a);};
3422 struct s2 {int (*f) (double a);};
3423 int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
3424 int argc;
3425 char **argv;
3426 int
3427 main ()
3428 {
3429 return f (e, argv, 0) != argv[0]  ||  f (e, argv, 1) != argv[1];
3430   ;
3431   return 0;
3432 }
3433 _ACEOF
3434 for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
3435         -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
3436 do
3437   CC="$ac_save_CC $ac_arg"
3438   rm -rf conftest.$ac_objext
3439 if { (ac_try="$ac_compile"
3440 case "(($ac_try" in
3441   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3442   *) ac_try_echo=$ac_try;;
3443 esac
3444 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
3445 $as_echo "$ac_try_echo") >&5
3446   (eval "$ac_compile") 2>conftest.er1
3447   ac_status=$?
3448   grep -v '^ *+' conftest.er1 >conftest.err
3449   rm -rf conftest.er1
3450   cat conftest.err >&5
3451   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
3452   (exit $ac_status); } && {
3453          test -z "$ac_c_werror_flag" ||
3454          test ! -s conftest.err
3455        } && test -s conftest.$ac_objext; then
3456   ac_cv_prog_cc_c89=$ac_arg
3457 else
3458   $as_echo "$as_me: failed program was:" >&5
3459 sed 's/^/| /' conftest.$ac_ext >&5
3460
3461
3462 fi
3463
3464 rm -f core conftest.err conftest.$ac_objext
3465   test "x$ac_cv_prog_cc_c89" != "xno" && break
3466 done
3467 rm -rf conftest.$ac_ext
3468 CC=$ac_save_CC
3469
3470 fi
3471 # AC_CACHE_VAL
3472 case "x$ac_cv_prog_cc_c89" in
3473   x)
3474     { $as_echo "$as_me:$LINENO: result: none needed" >&5
3475 $as_echo "none needed" >&6; } ;;
3476   xno)
3477     { $as_echo "$as_me:$LINENO: result: unsupported" >&5
3478 $as_echo "unsupported" >&6; } ;;
3479   *)
3480     CC="$CC $ac_cv_prog_cc_c89"
3481     { $as_echo "$as_me:$LINENO: result: $ac_cv_prog_cc_c89" >&5
3482 $as_echo "$ac_cv_prog_cc_c89" >&6; } ;;
3483 esac
3484
3485
3486 ac_ext=c
3487 ac_cpp='$CPP $CPPFLAGS'
3488 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3489 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3490 ac_compiler_gnu=$ac_cv_c_compiler_gnu
3491
3492
3493   if test -z "$GCC"; then
3494     # not using GCC
3495     { $as_echo "$as_me:$LINENO: checking how to request ANSI compilation" >&5
3496 $as_echo_n "checking how to request ANSI compilation... " >&6; }
3497     case "$host" in
3498       *-hpux* )
3499         { $as_echo "$as_me:$LINENO: result: HPUX: adding -Ae" >&5
3500 $as_echo "HPUX: adding -Ae" >&6; }
3501         CC="$CC -Ae"
3502       ;;
3503       *-aix* )
3504         { $as_echo "$as_me:$LINENO: result: AIX: adding -qlanglvl=ansi -qhalt=e" >&5
3505 $as_echo "AIX: adding -qlanglvl=ansi -qhalt=e" >&6; }
3506         CC="$CC -qlanglvl=ansi -qhalt=e"
3507       ;;
3508       *-dec-* )
3509         { $as_echo "$as_me:$LINENO: result: DEC: adding -std1 -ieee" >&5
3510 $as_echo "DEC: adding -std1 -ieee" >&6; }
3511         CC="$CC -std1"
3512       ;;
3513       *)
3514         { $as_echo "$as_me:$LINENO: result: no idea" >&5
3515 $as_echo "no idea" >&6; }
3516       ;;
3517     esac
3518   else
3519     # using GCC
3520     case "$host" in
3521       *-solaris*)
3522         { $as_echo "$as_me:$LINENO: result: Solaris: adding -D__EXTENSIONS__" >&5
3523 $as_echo "Solaris: adding -D__EXTENSIONS__" >&6; }
3524         CC="$CC -D__EXTENSIONS__"
3525       ;;
3526     esac
3527   fi
3528
3529   OBJCC="$CC"
3530
3531   { $as_echo "$as_me:$LINENO: checking whether the compiler works on ANSI C" >&5
3532 $as_echo_n "checking whether the compiler works on ANSI C... " >&6; }
3533   if test "$cross_compiling" = yes; then
3534   { { $as_echo "$as_me:$LINENO: error: Couldn't build even a trivial ANSI C program: check CC." >&5
3535 $as_echo "$as_me: error: Couldn't build even a trivial ANSI C program: check CC." >&2;}
3536    { (exit 1); exit 1; }; }
3537 else
3538   cat >conftest.$ac_ext <<_ACEOF
3539 /* confdefs.h.  */
3540 _ACEOF
3541 cat confdefs.h >>conftest.$ac_ext
3542 cat >>conftest.$ac_ext <<_ACEOF
3543 /* end confdefs.h.  */
3544  main(int ac, char **av) { return 0; }
3545 _ACEOF
3546 rm -rf conftest$ac_exeext
3547 if { (ac_try="$ac_link"
3548 case "(($ac_try" in
3549   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3550   *) ac_try_echo=$ac_try;;
3551 esac
3552 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
3553 $as_echo "$ac_try_echo") >&5
3554   (eval "$ac_link") 2>&5
3555   ac_status=$?
3556   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
3557   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
3558   { (case "(($ac_try" in
3559   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3560   *) ac_try_echo=$ac_try;;
3561 esac
3562 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
3563 $as_echo "$ac_try_echo") >&5
3564   (eval "$ac_try") 2>&5
3565   ac_status=$?
3566   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
3567   (exit $ac_status); }; }; then
3568   { $as_echo "$as_me:$LINENO: result: yes" >&5
3569 $as_echo "yes" >&6; }
3570 else
3571   $as_echo "$as_me: program exited with status $ac_status" >&5
3572 $as_echo "$as_me: failed program was:" >&5
3573 sed 's/^/| /' conftest.$ac_ext >&5
3574
3575 ( exit $ac_status )
3576 { $as_echo "$as_me:$LINENO: result: no" >&5
3577 $as_echo "no" >&6; }
3578      { { $as_echo "$as_me:$LINENO: error: Couldn't build even a trivial ANSI C program: check CC." >&5
3579 $as_echo "$as_me: error: Couldn't build even a trivial ANSI C program: check CC." >&2;}
3580    { (exit 1); exit 1; }; }
3581 fi
3582 rm -rf conftest.dSYM
3583 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
3584 fi
3585
3586
3587
3588   if test -n "$GCC"; then
3589     { $as_echo "$as_me:$LINENO: result: Turning on gcc compiler warnings." >&5
3590 $as_echo "Turning on gcc compiler warnings." >&6; }
3591     CC="$CC -pedantic -Wall -Wstrict-prototypes -Wnested-externs -Wmissing-prototypes"
3592     OBJCC="$OBJCC -Wall"
3593     # As of gcc 3.4, we have "-Wdeclaration-after-statement"
3594     # and so perhaps now we can do without -pedantic?
3595   else
3596     case "$host" in
3597       *-irix5* |*-irix6.0-3* )
3598         { $as_echo "$as_me:$LINENO: result: Turning on SGI compiler warnings." >&5
3599 $as_echo "Turning on SGI compiler warnings." >&6; }
3600         CC="$CC -fullwarn -use_readonly_const -rdata_shared -g3"
3601       ;;
3602 #     *-dec-osf* )
3603 #       if test -z "$GCC"; then
3604 #         AC_MSG_RESULT(Turning on DEC C compiler warnings.)
3605 #         CC="$CC -migrate -w0 -verbose -warnprotos"
3606 #       fi
3607 #     ;;
3608     esac
3609   fi
3610
3611 if test -n "$GCC"; then
3612    { $as_echo "$as_me:$LINENO: checking whether gcc accepts -Wno-overlength-strings" >&5
3613 $as_echo_n "checking whether gcc accepts -Wno-overlength-strings... " >&6; }
3614 if test "${ac_cv_gcc_accepts_no_overlength+set}" = set; then
3615   $as_echo_n "(cached) " >&6
3616 else
3617   rm -rf conftest.$ac_ext
3618      touch conftest.$ac_ext
3619      if ( ( gcc -c -Wno-overlength-strings conftest.$ac_ext -o/dev/null >/dev/null ) 2>&1 | \
3620           grep unrecognized >/dev/null ); then
3621        ac_cv_gcc_accepts_no_overlength=no
3622      else
3623        ac_cv_gcc_accepts_no_overlength=yes
3624        CC="$CC -Wno-overlength-strings"
3625      fi
3626 fi
3627 { $as_echo "$as_me:$LINENO: result: $ac_cv_gcc_accepts_no_overlength" >&5
3628 $as_echo "$ac_cv_gcc_accepts_no_overlength" >&6; }
3629    ac_gcc_accepts_no_overlength="$ac_cv_gcc_accepts_no_overlength"
3630   fi
3631
3632 if test -n "$GCC"; then
3633    { $as_echo "$as_me:$LINENO: checking whether gcc accepts -Wdeclaration-after-statement" >&5
3634 $as_echo_n "checking whether gcc accepts -Wdeclaration-after-statement... " >&6; }
3635 if test "${ac_cv_gcc_accepts_no_decl_after+set}" = set; then
3636   $as_echo_n "(cached) " >&6
3637 else
3638   rm -rf conftest.$ac_ext
3639      touch conftest.$ac_ext
3640      if ( ( gcc -c -Wdeclaration-after-statement conftest.$ac_ext -o/dev/null >/dev/null ) 2>&1 | \
3641           grep unrecognized >/dev/null ); then
3642        ac_cv_gcc_accepts_no_decl_after=no
3643      else
3644        ac_cv_gcc_accepts_no_decl_after=yes
3645        CC="$CC -Wdeclaration-after-statement"
3646      fi
3647 fi
3648 { $as_echo "$as_me:$LINENO: result: $ac_cv_gcc_accepts_no_decl_after" >&5
3649 $as_echo "$ac_cv_gcc_accepts_no_decl_after" >&6; }
3650    ac_gcc_accepts_no_decl_after="$ac_cv_gcc_accepts_no_decl_after"
3651   fi
3652
3653 if test -n "$GCC"; then
3654    { $as_echo "$as_me:$LINENO: checking whether gcc accepts -no-cpp-precomp" >&5
3655 $as_echo_n "checking whether gcc accepts -no-cpp-precomp... " >&6; }
3656 if test "${ac_cv_gcc_accepts_no_cpp_precomp+set}" = set; then
3657   $as_echo_n "(cached) " >&6
3658 else
3659   rm -rf conftest.$ac_ext
3660      touch conftest.$ac_ext
3661      if ( ( gcc -c -no-cpp-precomp conftest.$ac_ext -o/dev/null >/dev/null ) 2>&1 | \
3662           grep unrecognized >/dev/null ); then
3663        ac_cv_gcc_accepts_no_cpp_precomp=no
3664      else
3665        ac_cv_gcc_accepts_no_cpp_precomp=yes
3666        CC="$CC -no-cpp-precomp"
3667      fi
3668 fi
3669 { $as_echo "$as_me:$LINENO: result: $ac_cv_gcc_accepts_no_cpp_precomp" >&5
3670 $as_echo "$ac_cv_gcc_accepts_no_cpp_precomp" >&6; }
3671    ac_gcc_accepts_no_cpp_precomp="$ac_cv_gcc_accepts_no_cpp_precomp"
3672   fi
3673
3674 if test -n "$GCC"; then
3675
3676   case "$host" in
3677     *-darwin* )
3678       # Fucking Apple let // comments sneak into OpenGL headers, so
3679       # we *must* allow // comments when compiling on Mac OS 10.6!  FUCK!
3680     ;;
3681    *)
3682      if test -n "$GCC"; then
3683    { $as_echo "$as_me:$LINENO: checking whether gcc accepts -std=c89" >&5
3684 $as_echo_n "checking whether gcc accepts -std=c89... " >&6; }
3685 if test "${ac_cv_gcc_accepts_std+set}" = set; then
3686   $as_echo_n "(cached) " >&6
3687 else
3688   rm -rf conftest.$ac_ext
3689      touch conftest.$ac_ext
3690      if ( ( gcc -c -std=c89 conftest.$ac_ext -o/dev/null >/dev/null ) 2>&1 | \
3691           grep unrecognized >/dev/null ); then
3692        ac_cv_gcc_accepts_std=no
3693      else
3694        ac_cv_gcc_accepts_std=yes
3695        CC="$CC -std=c89"
3696      fi
3697 fi
3698 { $as_echo "$as_me:$LINENO: result: $ac_cv_gcc_accepts_std" >&5
3699 $as_echo "$ac_cv_gcc_accepts_std" >&6; }
3700    ac_gcc_accepts_std="$ac_cv_gcc_accepts_std"
3701   fi
3702
3703    ;;
3704   esac
3705
3706    { $as_echo "$as_me:$LINENO: result: Disabling C++ comments in ANSI C code." >&5
3707 $as_echo "Disabling C++ comments in ANSI C code." >&6; }
3708    #
3709    # The reason that // comments are banned from xscreensaver is that gcc is
3710    # basically the only compiler in the world that supports them in C code.
3711    # All other vendors support them only in their C++ compilers, not in their
3712    # ANSI C compilers.  This means that it's a portability problem: every time
3713    # these comments have snuck into the xscreensaver source code, I've gotten
3714    # complaints about it the next day.  So we turn off support for them in gcc
3715    # as well to prevent them from accidentially slipping in.
3716    #
3717    if test "$ac_gcc_accepts_std" = yes ; then
3718      #
3719      # -std=c89 defines __STRICT_ANSI__, which we don't want.
3720      # (That appears to be the only additional preprocessor symbol
3721      # it defines, in addition to the syntax changes it makes.)
3722      #
3723      # -std=gnu89 is no good, because // comments were a GNU extension
3724      # before they were in the ANSI C 99 spec...  (gcc 2.96 permits //
3725      # with -std=gnu89 but not with -std=c89.)
3726      #
3727      # $CC already contains "-std=c89" via AC_GCC_ACCEPTS_STD
3728      CC="$CC -U__STRICT_ANSI__"
3729 #   else
3730 #     # The old way:
3731 #     CC="$CC -Wp,-lang-c89"
3732    fi
3733   fi
3734
3735 ac_ext=c
3736 ac_cpp='$CPP $CPPFLAGS'
3737 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3738 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3739 ac_compiler_gnu=$ac_cv_c_compiler_gnu
3740 { $as_echo "$as_me:$LINENO: checking how to run the C preprocessor" >&5
3741 $as_echo_n "checking how to run the C preprocessor... " >&6; }
3742 # On Suns, sometimes $CPP names a directory.
3743 if test -n "$CPP" && test -d "$CPP"; then
3744   CPP=
3745 fi
3746 if test -z "$CPP"; then
3747   if test "${ac_cv_prog_CPP+set}" = set; then
3748   $as_echo_n "(cached) " >&6
3749 else
3750       # Double quotes because CPP needs to be expanded
3751     for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
3752     do
3753       ac_preproc_ok=false
3754 for ac_c_preproc_warn_flag in '' yes
3755 do
3756   # Use a header file that comes with gcc, so configuring glibc
3757   # with a fresh cross-compiler works.
3758   # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
3759   # <limits.h> exists even on freestanding compilers.
3760   # On the NeXT, cc -E runs the code through the compiler's parser,
3761   # not just through cpp. "Syntax error" is here to catch this case.
3762   cat >conftest.$ac_ext <<_ACEOF
3763 /* confdefs.h.  */
3764 _ACEOF
3765 cat confdefs.h >>conftest.$ac_ext
3766 cat >>conftest.$ac_ext <<_ACEOF
3767 /* end confdefs.h.  */
3768 #ifdef __STDC__
3769 # include <limits.h>
3770 #else
3771 # include <assert.h>
3772 #endif
3773                      Syntax error
3774 _ACEOF
3775 if { (ac_try="$ac_cpp conftest.$ac_ext"
3776 case "(($ac_try" in
3777   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3778   *) ac_try_echo=$ac_try;;
3779 esac
3780 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
3781 $as_echo "$ac_try_echo") >&5
3782   (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
3783   ac_status=$?
3784   grep -v '^ *+' conftest.er1 >conftest.err
3785   rm -rf conftest.er1
3786   cat conftest.err >&5
3787   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
3788   (exit $ac_status); } >/dev/null && {
3789          test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
3790          test ! -s conftest.err
3791        }; then
3792   :
3793 else
3794   $as_echo "$as_me: failed program was:" >&5
3795 sed 's/^/| /' conftest.$ac_ext >&5
3796
3797   # Broken: fails on valid input.
3798 continue
3799 fi
3800
3801 rm -rf conftest.err conftest.$ac_ext
3802
3803   # OK, works on sane cases.  Now check whether nonexistent headers
3804   # can be detected and how.
3805   cat >conftest.$ac_ext <<_ACEOF
3806 /* confdefs.h.  */
3807 _ACEOF
3808 cat confdefs.h >>conftest.$ac_ext
3809 cat >>conftest.$ac_ext <<_ACEOF
3810 /* end confdefs.h.  */
3811 #include <ac_nonexistent.h>
3812 _ACEOF
3813 if { (ac_try="$ac_cpp conftest.$ac_ext"
3814 case "(($ac_try" in
3815   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3816   *) ac_try_echo=$ac_try;;
3817 esac
3818 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
3819 $as_echo "$ac_try_echo") >&5
3820   (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
3821   ac_status=$?
3822   grep -v '^ *+' conftest.er1 >conftest.err
3823   rm -rf conftest.er1
3824   cat conftest.err >&5
3825   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
3826   (exit $ac_status); } >/dev/null && {
3827          test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
3828          test ! -s conftest.err
3829        }; then
3830   # Broken: success on invalid input.
3831 continue
3832 else
3833   $as_echo "$as_me: failed program was:" >&5
3834 sed 's/^/| /' conftest.$ac_ext >&5
3835
3836   # Passes both tests.
3837 ac_preproc_ok=:
3838 break
3839 fi
3840
3841 rm -rf conftest.err conftest.$ac_ext
3842
3843 done
3844 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
3845 rm -rf conftest.err conftest.$ac_ext
3846 if $ac_preproc_ok; then
3847   break
3848 fi
3849
3850     done
3851     ac_cv_prog_CPP=$CPP
3852
3853 fi
3854   CPP=$ac_cv_prog_CPP
3855 else
3856   ac_cv_prog_CPP=$CPP
3857 fi
3858 { $as_echo "$as_me:$LINENO: result: $CPP" >&5
3859 $as_echo "$CPP" >&6; }
3860 ac_preproc_ok=false
3861 for ac_c_preproc_warn_flag in '' yes
3862 do
3863   # Use a header file that comes with gcc, so configuring glibc
3864   # with a fresh cross-compiler works.
3865   # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
3866   # <limits.h> exists even on freestanding compilers.
3867   # On the NeXT, cc -E runs the code through the compiler's parser,
3868   # not just through cpp. "Syntax error" is here to catch this case.
3869   cat >conftest.$ac_ext <<_ACEOF
3870 /* confdefs.h.  */
3871 _ACEOF
3872 cat confdefs.h >>conftest.$ac_ext
3873 cat >>conftest.$ac_ext <<_ACEOF
3874 /* end confdefs.h.  */
3875 #ifdef __STDC__
3876 # include <limits.h>
3877 #else
3878 # include <assert.h>
3879 #endif
3880                      Syntax error
3881 _ACEOF
3882 if { (ac_try="$ac_cpp conftest.$ac_ext"
3883 case "(($ac_try" in
3884   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3885   *) ac_try_echo=$ac_try;;
3886 esac
3887 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
3888 $as_echo "$ac_try_echo") >&5
3889   (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
3890   ac_status=$?
3891   grep -v '^ *+' conftest.er1 >conftest.err
3892   rm -rf conftest.er1
3893   cat conftest.err >&5
3894   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
3895   (exit $ac_status); } >/dev/null && {
3896          test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
3897          test ! -s conftest.err
3898        }; then
3899   :
3900 else
3901   $as_echo "$as_me: failed program was:" >&5
3902 sed 's/^/| /' conftest.$ac_ext >&5
3903
3904   # Broken: fails on valid input.
3905 continue
3906 fi
3907
3908 rm -rf conftest.err conftest.$ac_ext
3909
3910   # OK, works on sane cases.  Now check whether nonexistent headers
3911   # can be detected and how.
3912   cat >conftest.$ac_ext <<_ACEOF
3913 /* confdefs.h.  */
3914 _ACEOF
3915 cat confdefs.h >>conftest.$ac_ext
3916 cat >>conftest.$ac_ext <<_ACEOF
3917 /* end confdefs.h.  */
3918 #include <ac_nonexistent.h>
3919 _ACEOF
3920 if { (ac_try="$ac_cpp conftest.$ac_ext"
3921 case "(($ac_try" in
3922   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3923   *) ac_try_echo=$ac_try;;
3924 esac
3925 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
3926 $as_echo "$ac_try_echo") >&5
3927   (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
3928   ac_status=$?
3929   grep -v '^ *+' conftest.er1 >conftest.err
3930   rm -rf conftest.er1
3931   cat conftest.err >&5
3932   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
3933   (exit $ac_status); } >/dev/null && {
3934          test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
3935          test ! -s conftest.err
3936        }; then
3937   # Broken: success on invalid input.
3938 continue
3939 else
3940   $as_echo "$as_me: failed program was:" >&5
3941 sed 's/^/| /' conftest.$ac_ext >&5
3942
3943   # Passes both tests.
3944 ac_preproc_ok=:
3945 break
3946 fi
3947
3948 rm -rf conftest.err conftest.$ac_ext
3949
3950 done
3951 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
3952 rm -rf conftest.err conftest.$ac_ext
3953 if $ac_preproc_ok; then
3954   :
3955 else
3956   { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5
3957 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3958 { { $as_echo "$as_me:$LINENO: error: C preprocessor \"$CPP\" fails sanity check
3959 See \`config.log' for more details." >&5
3960 $as_echo "$as_me: error: C preprocessor \"$CPP\" fails sanity check
3961 See \`config.log' for more details." >&2;}
3962    { (exit 1); exit 1; }; }; }
3963 fi
3964
3965 ac_ext=c
3966 ac_cpp='$CPP $CPPFLAGS'
3967 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3968 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3969 ac_compiler_gnu=$ac_cv_c_compiler_gnu
3970
3971 { $as_echo "$as_me:$LINENO: checking for an ANSI C-conforming const" >&5
3972 $as_echo_n "checking for an ANSI C-conforming const... " >&6; }
3973 if test "${ac_cv_c_const+set}" = set; then
3974   $as_echo_n "(cached) " >&6
3975 else
3976   cat >conftest.$ac_ext <<_ACEOF
3977 /* confdefs.h.  */
3978 _ACEOF
3979 cat confdefs.h >>conftest.$ac_ext
3980 cat >>conftest.$ac_ext <<_ACEOF
3981 /* end confdefs.h.  */
3982
3983 int
3984 main ()
3985 {
3986 /* FIXME: Include the comments suggested by Paul. */
3987 #ifndef __cplusplus
3988   /* Ultrix mips cc rejects this.  */
3989   typedef int charset[2];
3990   const charset cs;
3991   /* SunOS 4.1.1 cc rejects this.  */
3992   char const *const *pcpcc;
3993   char **ppc;
3994   /* NEC SVR4.0.2 mips cc rejects this.  */
3995   struct point {int x, y;};
3996   static struct point const zero = {0,0};
3997   /* AIX XL C 1.02.0.0 rejects this.
3998      It does not let you subtract one const X* pointer from another in
3999      an arm of an if-expression whose if-part is not a constant
4000      expression */
4001   const char *g = "string";
4002   pcpcc = &g + (g ? g-g : 0);
4003   /* HPUX 7.0 cc rejects these. */
4004   ++pcpcc;
4005   ppc = (char**) pcpcc;
4006   pcpcc = (char const *const *) ppc;
4007   { /* SCO 3.2v4 cc rejects this.  */
4008     char *t;
4009     char const *s = 0 ? (char *) 0 : (char const *) 0;
4010
4011     *t++ = 0;
4012     if (s) return 0;
4013   }
4014   { /* Someone thinks the Sun supposedly-ANSI compiler will reject this.  */
4015     int x[] = {25, 17};
4016     const int *foo = &x[0];
4017     ++foo;
4018   }
4019   { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
4020     typedef const int *iptr;
4021     iptr p = 0;
4022     ++p;
4023   }
4024   { /* AIX XL C 1.02.0.0 rejects this saying
4025        "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
4026     struct s { int j; const int *ap[3]; };
4027     struct s *b; b->j = 5;
4028   }
4029   { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
4030     const int foo = 10;
4031     if (!foo) return 0;
4032   }
4033   return !cs[0] && !zero.x;
4034 #endif
4035
4036   ;
4037   return 0;
4038 }
4039 _ACEOF
4040 rm -rf conftest.$ac_objext
4041 if { (ac_try="$ac_compile"
4042 case "(($ac_try" in
4043   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4044   *) ac_try_echo=$ac_try;;
4045 esac
4046 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
4047 $as_echo "$ac_try_echo") >&5
4048   (eval "$ac_compile") 2>conftest.er1
4049   ac_status=$?
4050   grep -v '^ *+' conftest.er1 >conftest.err
4051   rm -rf conftest.er1
4052   cat conftest.err >&5
4053   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
4054   (exit $ac_status); } && {
4055          test -z "$ac_c_werror_flag" ||
4056          test ! -s conftest.err
4057        } && test -s conftest.$ac_objext; then
4058   ac_cv_c_const=yes
4059 else
4060   $as_echo "$as_me: failed program was:" >&5
4061 sed 's/^/| /' conftest.$ac_ext >&5
4062
4063         ac_cv_c_const=no
4064 fi
4065
4066 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4067 fi
4068 { $as_echo "$as_me:$LINENO: result: $ac_cv_c_const" >&5
4069 $as_echo "$ac_cv_c_const" >&6; }
4070 if test $ac_cv_c_const = no; then
4071
4072 cat >>confdefs.h <<\_ACEOF
4073 #define const /**/
4074 _ACEOF
4075
4076 fi
4077
4078 { $as_echo "$as_me:$LINENO: checking for inline" >&5
4079 $as_echo_n "checking for inline... " >&6; }
4080 if test "${ac_cv_c_inline+set}" = set; then
4081   $as_echo_n "(cached) " >&6
4082 else
4083   ac_cv_c_inline=no
4084 for ac_kw in inline __inline__ __inline; do
4085   cat >conftest.$ac_ext <<_ACEOF
4086 /* confdefs.h.  */
4087 _ACEOF
4088 cat confdefs.h >>conftest.$ac_ext
4089 cat >>conftest.$ac_ext <<_ACEOF
4090 /* end confdefs.h.  */
4091 #ifndef __cplusplus
4092 typedef int foo_t;
4093 static $ac_kw foo_t static_foo () {return 0; }
4094 $ac_kw foo_t foo () {return 0; }
4095 #endif
4096
4097 _ACEOF
4098 rm -rf conftest.$ac_objext
4099 if { (ac_try="$ac_compile"
4100 case "(($ac_try" in
4101   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4102   *) ac_try_echo=$ac_try;;
4103 esac
4104 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
4105 $as_echo "$ac_try_echo") >&5
4106   (eval "$ac_compile") 2>conftest.er1
4107   ac_status=$?
4108   grep -v '^ *+' conftest.er1 >conftest.err
4109   rm -rf conftest.er1
4110   cat conftest.err >&5
4111   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
4112   (exit $ac_status); } && {
4113          test -z "$ac_c_werror_flag" ||
4114          test ! -s conftest.err
4115        } && test -s conftest.$ac_objext; then
4116   ac_cv_c_inline=$ac_kw
4117 else
4118   $as_echo "$as_me: failed program was:" >&5
4119 sed 's/^/| /' conftest.$ac_ext >&5
4120
4121
4122 fi
4123
4124 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4125   test "$ac_cv_c_inline" != no && break
4126 done
4127
4128 fi
4129 { $as_echo "$as_me:$LINENO: result: $ac_cv_c_inline" >&5
4130 $as_echo "$ac_cv_c_inline" >&6; }
4131
4132
4133 case $ac_cv_c_inline in
4134   inline | yes) ;;
4135   *)
4136     case $ac_cv_c_inline in
4137       no) ac_val=;;
4138       *) ac_val=$ac_cv_c_inline;;
4139     esac
4140     cat >>confdefs.h <<_ACEOF
4141 #ifndef __cplusplus
4142 #define inline $ac_val
4143 #endif
4144 _ACEOF
4145     ;;
4146 esac
4147
4148
4149 ac_bc_result=`echo 6+9 | bc 2>/dev/null`
4150   { $as_echo "$as_me:$LINENO: checking for bc" >&5
4151 $as_echo_n "checking for bc... " >&6; }
4152   if test "$ac_bc_result" = "15" ; then
4153     { $as_echo "$as_me:$LINENO: result: yes" >&5
4154 $as_echo "yes" >&6; }
4155   else
4156     { $as_echo "$as_me:$LINENO: result: no" >&5
4157 $as_echo "no" >&6; }
4158     echo ''
4159     { { $as_echo "$as_me:$LINENO: error: Your system doesn't have \"bc\", which has been a standard
4160                   part of Unix since the 1970s.  Come back when your vendor
4161                   has grown a clue." >&5
4162 $as_echo "$as_me: error: Your system doesn't have \"bc\", which has been a standard
4163                   part of Unix since the 1970s.  Come back when your vendor
4164                   has grown a clue." >&2;}
4165    { (exit 1); exit 1; }; }
4166   fi
4167
4168
4169 # stuff for Makefiles
4170 # Find a good install program.  We prefer a C program (faster),
4171 # so one script is as good as another.  But avoid the broken or
4172 # incompatible versions:
4173 # SysV /etc/install, /usr/sbin/install
4174 # SunOS /usr/etc/install
4175 # IRIX /sbin/install
4176 # AIX /bin/install
4177 # AmigaOS /C/install, which installs bootblocks on floppy discs
4178 # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
4179 # AFS /usr/afsws/bin/install, which mishandles nonexistent args
4180 # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
4181 # OS/2's system install, which has a completely different semantic
4182 # ./install, which can be erroneously created by make from ./install.sh.
4183 # Reject install programs that cannot install multiple files.
4184 { $as_echo "$as_me:$LINENO: checking for a BSD-compatible install" >&5
4185 $as_echo_n "checking for a BSD-compatible install... " >&6; }
4186 if test -z "$INSTALL"; then
4187 if test "${ac_cv_path_install+set}" = set; then
4188   $as_echo_n "(cached) " >&6
4189 else
4190   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4191 for as_dir in $PATH
4192 do
4193   IFS=$as_save_IFS
4194   test -z "$as_dir" && as_dir=.
4195   # Account for people who put trailing slashes in PATH elements.
4196 case $as_dir/ in
4197   ./ | .// | /cC/* | \
4198   /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \
4199   ?:\\/os2\\/install\\/* | ?:\\/OS2\\/INSTALL\\/* | \
4200   /usr/ucb/* ) ;;
4201   *)
4202     # OSF1 and SCO ODT 3.0 have their own names for install.
4203     # Don't use installbsd from OSF since it installs stuff as root
4204     # by default.
4205     for ac_prog in ginstall scoinst install; do
4206       for ac_exec_ext in '' $ac_executable_extensions; do
4207         if { test -f "$as_dir/$ac_prog$ac_exec_ext" && $as_test_x "$as_dir/$ac_prog$ac_exec_ext"; }; then
4208           if test $ac_prog = install &&
4209             grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
4210             # AIX install.  It has an incompatible calling convention.
4211             :
4212           elif test $ac_prog = install &&
4213             grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
4214             # program-specific install script used by HP pwplus--don't use.
4215             :
4216           else
4217             rm -rf conftest.one conftest.two conftest.dir
4218             echo one > conftest.one
4219             echo two > conftest.two
4220             mkdir conftest.dir
4221             if "$as_dir/$ac_prog$ac_exec_ext" -c conftest.one conftest.two "`pwd`/conftest.dir" &&
4222               test -s conftest.one && test -s conftest.two &&
4223               test -s conftest.dir/conftest.one &&
4224               test -s conftest.dir/conftest.two
4225             then
4226               ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c"
4227               break 3
4228             fi
4229           fi
4230         fi
4231       done
4232     done
4233     ;;
4234 esac
4235
4236 done
4237 IFS=$as_save_IFS
4238
4239 rm -rf conftest.one conftest.two conftest.dir
4240
4241 fi
4242   if test "${ac_cv_path_install+set}" = set; then
4243     INSTALL=$ac_cv_path_install
4244   else
4245     # As a last resort, use the slow shell script.  Don't cache a
4246     # value for INSTALL within a source directory, because that will
4247     # break other packages using the cache if that directory is
4248     # removed, or if the value is a relative name.
4249     INSTALL=$ac_install_sh
4250   fi
4251 fi
4252 { $as_echo "$as_me:$LINENO: result: $INSTALL" >&5
4253 $as_echo "$INSTALL" >&6; }
4254
4255 # Use test -z because SunOS4 sh mishandles braces in ${var-val}.
4256 # It thinks the first close brace ends the variable substitution.
4257 test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
4258
4259 test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
4260
4261 test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
4262
4263 { $as_echo "$as_me:$LINENO: checking whether \"\${INSTALL} -d\" creates intermediate directories" >&5
4264 $as_echo_n "checking whether \"\${INSTALL} -d\" creates intermediate directories... " >&6; }
4265 if test "${ac_cv_install_d_creates_dirs+set}" = set; then
4266   $as_echo_n "(cached) " >&6
4267 else
4268   ac_cv_install_d_creates_dirs=no
4269      rm -rf conftestdir
4270      if mkdir conftestdir; then
4271        cd conftestdir 2>/dev/null
4272        ${INSTALL} -d `pwd`/dir1/dir2 >/dev/null 2>&1
4273        if test -d dir1/dir2/. ; then
4274          ac_cv_install_d_creates_dirs=yes
4275        fi
4276        cd .. 2>/dev/null
4277        rm -rf conftestdir
4278      fi
4279
4280 fi
4281 { $as_echo "$as_me:$LINENO: result: $ac_cv_install_d_creates_dirs" >&5
4282 $as_echo "$ac_cv_install_d_creates_dirs" >&6; }
4283
4284   if test "$ac_cv_install_d_creates_dirs" = no ; then
4285     { $as_echo "$as_me:$LINENO: checking whether \"mkdir -p\" creates intermediate directories" >&5
4286 $as_echo_n "checking whether \"mkdir -p\" creates intermediate directories... " >&6; }
4287 if test "${ac_cv_mkdir_p_creates_dirs+set}" = set; then
4288   $as_echo_n "(cached) " >&6
4289 else
4290   ac_cv_mkdir_p_creates_dirs=no
4291        rm -rf conftestdir
4292        if mkdir conftestdir; then
4293          cd conftestdir 2>/dev/null
4294          mkdir -p dir1/dir2 >/dev/null 2>&1
4295          if test -d dir1/dir2/. ; then
4296            ac_cv_mkdir_p_creates_dirs=yes
4297          fi
4298          cd .. 2>/dev/null
4299          rm -rf conftestdir
4300        fi
4301
4302 fi
4303 { $as_echo "$as_me:$LINENO: result: $ac_cv_mkdir_p_creates_dirs" >&5
4304 $as_echo "$ac_cv_mkdir_p_creates_dirs" >&6; }
4305   fi
4306
4307   if test "$ac_cv_install_d_creates_dirs" = yes ; then
4308     INSTALL_DIRS='${INSTALL} -d'
4309   elif test "$ac_cv_mkdir_p_creates_dirs" = yes ; then
4310     INSTALL_DIRS='mkdir -p'
4311   else
4312     # any other ideas?
4313     INSTALL_DIRS='${INSTALL} -d'
4314   fi
4315
4316 { $as_echo "$as_me:$LINENO: checking whether ${MAKE-make} sets \$(MAKE)" >&5
4317 $as_echo_n "checking whether ${MAKE-make} sets \$(MAKE)... " >&6; }
4318 set x ${MAKE-make}
4319 ac_make=`$as_echo "$2" | sed 's/+/p/g; s/[^a-zA-Z0-9_]/_/g'`
4320 if { as_var=ac_cv_prog_make_${ac_make}_set; eval "test \"\${$as_var+set}\" = set"; }; then
4321   $as_echo_n "(cached) " >&6
4322 else
4323   cat >conftest.make <<\_ACEOF
4324 SHELL = /bin/sh
4325 all:
4326         @echo '@@@%%%=$(MAKE)=@@@%%%'
4327 _ACEOF
4328 # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
4329 case `${MAKE-make} -f conftest.make 2>/dev/null` in
4330   *@@@%%%=?*=@@@%%%*)
4331     eval ac_cv_prog_make_${ac_make}_set=yes;;
4332   *)
4333     eval ac_cv_prog_make_${ac_make}_set=no;;
4334 esac
4335 rm -rf conftest.make
4336 fi
4337 if eval test \$ac_cv_prog_make_${ac_make}_set = yes; then
4338   { $as_echo "$as_me:$LINENO: result: yes" >&5
4339 $as_echo "yes" >&6; }
4340   SET_MAKE=
4341 else
4342   { $as_echo "$as_me:$LINENO: result: no" >&5
4343 $as_echo "no" >&6; }
4344   SET_MAKE="MAKE=${MAKE-make}"
4345 fi
4346
4347
4348 # By default, autoconf sets INSTALL_SCRIPT to '${INSTALL_PROGRAM}'.
4349 # That's wrong: it should be set to '${INSTALL}', so that one can
4350 # implement the "install-strip" target properly (strip executables,
4351 # but do not try to strip scripts.)
4352 #
4353 INSTALL_SCRIPT='${INSTALL}'
4354
4355 # random libc stuff
4356
4357 { $as_echo "$as_me:$LINENO: checking for grep that handles long lines and -e" >&5
4358 $as_echo_n "checking for grep that handles long lines and -e... " >&6; }
4359 if test "${ac_cv_path_GREP+set}" = set; then
4360   $as_echo_n "(cached) " >&6
4361 else
4362   if test -z "$GREP"; then
4363   ac_path_GREP_found=false
4364   # Loop through the user's path and test for each of PROGNAME-LIST
4365   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4366 for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
4367 do
4368   IFS=$as_save_IFS
4369   test -z "$as_dir" && as_dir=.
4370   for ac_prog in grep ggrep; do
4371     for ac_exec_ext in '' $ac_executable_extensions; do
4372       ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
4373       { test -f "$ac_path_GREP" && $as_test_x "$ac_path_GREP"; } || continue
4374 # Check for GNU ac_path_GREP and select it if it is found.
4375   # Check for GNU $ac_path_GREP
4376 case `"$ac_path_GREP" --version 2>&1` in
4377 *GNU*)
4378   ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
4379 *)
4380   ac_count=0
4381   $as_echo_n 0123456789 >"conftest.in"
4382   while :
4383   do
4384     cat "conftest.in" "conftest.in" >"conftest.tmp"
4385     mv "conftest.tmp" "conftest.in"
4386     cp "conftest.in" "conftest.nl"
4387     $as_echo 'GREP' >> "conftest.nl"
4388     "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
4389     diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
4390     ac_count=`expr $ac_count + 1`
4391     if test $ac_count -gt ${ac_path_GREP_max-0}; then
4392       # Best one so far, save it but keep looking for a better one
4393       ac_cv_path_GREP="$ac_path_GREP"
4394       ac_path_GREP_max=$ac_count
4395     fi
4396     # 10*(2^10) chars as input seems more than enough
4397     test $ac_count -gt 10 && break
4398   done
4399   rm -rf conftest.in conftest.tmp conftest.nl conftest.out;;
4400 esac
4401
4402       $ac_path_GREP_found && break 3
4403     done
4404   done
4405 done
4406 IFS=$as_save_IFS
4407   if test -z "$ac_cv_path_GREP"; then
4408     { { $as_echo "$as_me:$LINENO: error: no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&5
4409 $as_echo "$as_me: error: no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&2;}
4410    { (exit 1); exit 1; }; }
4411   fi
4412 else
4413   ac_cv_path_GREP=$GREP
4414 fi
4415
4416 fi
4417 { $as_echo "$as_me:$LINENO: result: $ac_cv_path_GREP" >&5
4418 $as_echo "$ac_cv_path_GREP" >&6; }
4419  GREP="$ac_cv_path_GREP"
4420
4421
4422 { $as_echo "$as_me:$LINENO: checking for egrep" >&5
4423 $as_echo_n "checking for egrep... " >&6; }
4424 if test "${ac_cv_path_EGREP+set}" = set; then
4425   $as_echo_n "(cached) " >&6
4426 else
4427   if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
4428    then ac_cv_path_EGREP="$GREP -E"
4429    else
4430      if test -z "$EGREP"; then
4431   ac_path_EGREP_found=false
4432   # Loop through the user's path and test for each of PROGNAME-LIST
4433   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4434 for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
4435 do
4436   IFS=$as_save_IFS
4437   test -z "$as_dir" && as_dir=.
4438   for ac_prog in egrep; do
4439     for ac_exec_ext in '' $ac_executable_extensions; do
4440       ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
4441       { test -f "$ac_path_EGREP" && $as_test_x "$ac_path_EGREP"; } || continue
4442 # Check for GNU ac_path_EGREP and select it if it is found.
4443   # Check for GNU $ac_path_EGREP
4444 case `"$ac_path_EGREP" --version 2>&1` in
4445 *GNU*)
4446   ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
4447 *)
4448   ac_count=0
4449   $as_echo_n 0123456789 >"conftest.in"
4450   while :
4451   do
4452     cat "conftest.in" "conftest.in" >"conftest.tmp"
4453     mv "conftest.tmp" "conftest.in"
4454     cp "conftest.in" "conftest.nl"
4455     $as_echo 'EGREP' >> "conftest.nl"
4456     "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
4457     diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
4458     ac_count=`expr $ac_count + 1`
4459     if test $ac_count -gt ${ac_path_EGREP_max-0}; then
4460       # Best one so far, save it but keep looking for a better one
4461       ac_cv_path_EGREP="$ac_path_EGREP"
4462       ac_path_EGREP_max=$ac_count
4463     fi
4464     # 10*(2^10) chars as input seems more than enough
4465     test $ac_count -gt 10 && break
4466   done
4467   rm -rf conftest.in conftest.tmp conftest.nl conftest.out;;
4468 esac
4469
4470       $ac_path_EGREP_found && break 3
4471     done
4472   done
4473 done
4474 IFS=$as_save_IFS
4475   if test -z "$ac_cv_path_EGREP"; then
4476     { { $as_echo "$as_me:$LINENO: error: no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&5
4477 $as_echo "$as_me: error: no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&2;}
4478    { (exit 1); exit 1; }; }
4479   fi
4480 else
4481   ac_cv_path_EGREP=$EGREP
4482 fi
4483
4484    fi
4485 fi
4486 { $as_echo "$as_me:$LINENO: result: $ac_cv_path_EGREP" >&5
4487 $as_echo "$ac_cv_path_EGREP" >&6; }
4488  EGREP="$ac_cv_path_EGREP"
4489
4490
4491 { $as_echo "$as_me:$LINENO: checking for ANSI C header files" >&5
4492 $as_echo_n "checking for ANSI C header files... " >&6; }
4493 if test "${ac_cv_header_stdc+set}" = set; then
4494   $as_echo_n "(cached) " >&6
4495 else
4496   cat >conftest.$ac_ext <<_ACEOF
4497 /* confdefs.h.  */
4498 _ACEOF
4499 cat confdefs.h >>conftest.$ac_ext
4500 cat >>conftest.$ac_ext <<_ACEOF
4501 /* end confdefs.h.  */
4502 #include <stdlib.h>
4503 #include <stdarg.h>
4504 #include <string.h>
4505 #include <float.h>
4506
4507 int
4508 main ()
4509 {
4510
4511   ;
4512   return 0;
4513 }
4514 _ACEOF
4515 rm -rf conftest.$ac_objext
4516 if { (ac_try="$ac_compile"
4517 case "(($ac_try" in
4518   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4519   *) ac_try_echo=$ac_try;;
4520 esac
4521 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
4522 $as_echo "$ac_try_echo") >&5
4523   (eval "$ac_compile") 2>conftest.er1
4524   ac_status=$?
4525   grep -v '^ *+' conftest.er1 >conftest.err
4526   rm -rf conftest.er1
4527   cat conftest.err >&5
4528   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
4529   (exit $ac_status); } && {
4530          test -z "$ac_c_werror_flag" ||
4531          test ! -s conftest.err
4532        } && test -s conftest.$ac_objext; then
4533   ac_cv_header_stdc=yes
4534 else
4535   $as_echo "$as_me: failed program was:" >&5
4536 sed 's/^/| /' conftest.$ac_ext >&5
4537
4538         ac_cv_header_stdc=no
4539 fi
4540
4541 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4542
4543 if test $ac_cv_header_stdc = yes; then
4544   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
4545   cat >conftest.$ac_ext <<_ACEOF
4546 /* confdefs.h.  */
4547 _ACEOF
4548 cat confdefs.h >>conftest.$ac_ext
4549 cat >>conftest.$ac_ext <<_ACEOF
4550 /* end confdefs.h.  */
4551 #include <string.h>
4552
4553 _ACEOF
4554 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4555   $EGREP "memchr" >/dev/null 2>&1; then
4556   :
4557 else
4558   ac_cv_header_stdc=no
4559 fi
4560 rm -rf conftest*
4561
4562 fi
4563
4564 if test $ac_cv_header_stdc = yes; then
4565   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
4566   cat >conftest.$ac_ext <<_ACEOF
4567 /* confdefs.h.  */
4568 _ACEOF
4569 cat confdefs.h >>conftest.$ac_ext
4570 cat >>conftest.$ac_ext <<_ACEOF
4571 /* end confdefs.h.  */
4572 #include <stdlib.h>
4573
4574 _ACEOF
4575 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4576   $EGREP "free" >/dev/null 2>&1; then
4577   :
4578 else
4579   ac_cv_header_stdc=no
4580 fi
4581 rm -rf conftest*
4582
4583 fi
4584
4585 if test $ac_cv_header_stdc = yes; then
4586   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
4587   if test "$cross_compiling" = yes; then
4588   :
4589 else
4590   cat >conftest.$ac_ext <<_ACEOF
4591 /* confdefs.h.  */
4592 _ACEOF
4593 cat confdefs.h >>conftest.$ac_ext
4594 cat >>conftest.$ac_ext <<_ACEOF
4595 /* end confdefs.h.  */
4596 #include <ctype.h>
4597 #include <stdlib.h>
4598 #if ((' ' & 0x0FF) == 0x020)
4599 # define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
4600 # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
4601 #else
4602 # define ISLOWER(c) \
4603                    (('a' <= (c) && (c) <= 'i') \
4604                      || ('j' <= (c) && (c) <= 'r') \
4605                      || ('s' <= (c) && (c) <= 'z'))
4606 # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
4607 #endif
4608
4609 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
4610 int
4611 main ()
4612 {
4613   int i;
4614   for (i = 0; i < 256; i++)
4615     if (XOR (islower (i), ISLOWER (i))
4616         || toupper (i) != TOUPPER (i))
4617       return 2;
4618   return 0;
4619 }
4620 _ACEOF
4621 rm -rf conftest$ac_exeext
4622 if { (ac_try="$ac_link"
4623 case "(($ac_try" in
4624   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4625   *) ac_try_echo=$ac_try;;
4626 esac
4627 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
4628 $as_echo "$ac_try_echo") >&5
4629   (eval "$ac_link") 2>&5
4630   ac_status=$?
4631   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
4632   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
4633   { (case "(($ac_try" in
4634   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4635   *) ac_try_echo=$ac_try;;
4636 esac
4637 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
4638 $as_echo "$ac_try_echo") >&5
4639   (eval "$ac_try") 2>&5
4640   ac_status=$?
4641   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
4642   (exit $ac_status); }; }; then
4643   :
4644 else
4645   $as_echo "$as_me: program exited with status $ac_status" >&5
4646 $as_echo "$as_me: failed program was:" >&5
4647 sed 's/^/| /' conftest.$ac_ext >&5
4648
4649 ( exit $ac_status )
4650 ac_cv_header_stdc=no
4651 fi
4652 rm -rf conftest.dSYM
4653 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
4654 fi
4655
4656
4657 fi
4658 fi
4659 { $as_echo "$as_me:$LINENO: result: $ac_cv_header_stdc" >&5
4660 $as_echo "$ac_cv_header_stdc" >&6; }
4661 if test $ac_cv_header_stdc = yes; then
4662
4663 cat >>confdefs.h <<\_ACEOF
4664 #define STDC_HEADERS 1
4665 _ACEOF
4666
4667 fi
4668
4669 # On IRIX 5.3, sys/types and inttypes.h are conflicting.
4670
4671
4672
4673
4674
4675
4676
4677
4678
4679 for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
4680                   inttypes.h stdint.h unistd.h
4681 do
4682 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
4683 { $as_echo "$as_me:$LINENO: checking for $ac_header" >&5
4684 $as_echo_n "checking for $ac_header... " >&6; }
4685 if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
4686   $as_echo_n "(cached) " >&6
4687 else
4688   cat >conftest.$ac_ext <<_ACEOF
4689 /* confdefs.h.  */
4690 _ACEOF
4691 cat confdefs.h >>conftest.$ac_ext
4692 cat >>conftest.$ac_ext <<_ACEOF
4693 /* end confdefs.h.  */
4694 $ac_includes_default
4695
4696 #include <$ac_header>
4697 _ACEOF
4698 rm -rf conftest.$ac_objext
4699 if { (ac_try="$ac_compile"
4700 case "(($ac_try" in
4701   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4702   *) ac_try_echo=$ac_try;;
4703 esac
4704 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
4705 $as_echo "$ac_try_echo") >&5
4706   (eval "$ac_compile") 2>conftest.er1
4707   ac_status=$?
4708   grep -v '^ *+' conftest.er1 >conftest.err
4709   rm -rf conftest.er1
4710   cat conftest.err >&5
4711   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
4712   (exit $ac_status); } && {
4713          test -z "$ac_c_werror_flag" ||
4714          test ! -s conftest.err
4715        } && test -s conftest.$ac_objext; then
4716   eval "$as_ac_Header=yes"
4717 else
4718   $as_echo "$as_me: failed program was:" >&5
4719 sed 's/^/| /' conftest.$ac_ext >&5
4720
4721         eval "$as_ac_Header=no"
4722 fi
4723
4724 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4725 fi
4726 ac_res=`eval 'as_val=${'$as_ac_Header'}
4727                  $as_echo "$as_val"'`
4728                { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
4729 $as_echo "$ac_res" >&6; }
4730 as_val=`eval 'as_val=${'$as_ac_Header'}
4731                  $as_echo "$as_val"'`
4732    if test "x$as_val" = x""yes; then
4733   cat >>confdefs.h <<_ACEOF
4734 #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
4735 _ACEOF
4736
4737 fi
4738
4739 done
4740
4741
4742
4743 for ac_header in unistd.h
4744 do
4745 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
4746 if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
4747   { $as_echo "$as_me:$LINENO: checking for $ac_header" >&5
4748 $as_echo_n "checking for $ac_header... " >&6; }
4749 if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
4750   $as_echo_n "(cached) " >&6
4751 fi
4752 ac_res=`eval 'as_val=${'$as_ac_Header'}
4753                  $as_echo "$as_val"'`
4754                { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
4755 $as_echo "$ac_res" >&6; }
4756 else
4757   # Is the header compilable?
4758 { $as_echo "$as_me:$LINENO: checking $ac_header usability" >&5
4759 $as_echo_n "checking $ac_header usability... " >&6; }
4760 cat >conftest.$ac_ext <<_ACEOF
4761 /* confdefs.h.  */
4762 _ACEOF
4763 cat confdefs.h >>conftest.$ac_ext
4764 cat >>conftest.$ac_ext <<_ACEOF
4765 /* end confdefs.h.  */
4766 $ac_includes_default
4767 #include <$ac_header>
4768 _ACEOF
4769 rm -rf conftest.$ac_objext
4770 if { (ac_try="$ac_compile"
4771 case "(($ac_try" in
4772   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4773   *) ac_try_echo=$ac_try;;
4774 esac
4775 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
4776 $as_echo "$ac_try_echo") >&5
4777   (eval "$ac_compile") 2>conftest.er1
4778   ac_status=$?
4779   grep -v '^ *+' conftest.er1 >conftest.err
4780   rm -rf conftest.er1
4781   cat conftest.err >&5
4782   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
4783   (exit $ac_status); } && {
4784          test -z "$ac_c_werror_flag" ||
4785          test ! -s conftest.err
4786        } && test -s conftest.$ac_objext; then
4787   ac_header_compiler=yes
4788 else
4789   $as_echo "$as_me: failed program was:" >&5
4790 sed 's/^/| /' conftest.$ac_ext >&5
4791
4792         ac_header_compiler=no
4793 fi
4794
4795 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4796 { $as_echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
4797 $as_echo "$ac_header_compiler" >&6; }
4798
4799 # Is the header present?
4800 { $as_echo "$as_me:$LINENO: checking $ac_header presence" >&5
4801 $as_echo_n "checking $ac_header presence... " >&6; }
4802 cat >conftest.$ac_ext <<_ACEOF
4803 /* confdefs.h.  */
4804 _ACEOF
4805 cat confdefs.h >>conftest.$ac_ext
4806 cat >>conftest.$ac_ext <<_ACEOF
4807 /* end confdefs.h.  */
4808 #include <$ac_header>
4809 _ACEOF
4810 if { (ac_try="$ac_cpp conftest.$ac_ext"
4811 case "(($ac_try" in
4812   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4813   *) ac_try_echo=$ac_try;;
4814 esac
4815 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
4816 $as_echo "$ac_try_echo") >&5
4817   (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
4818   ac_status=$?
4819   grep -v '^ *+' conftest.er1 >conftest.err
4820   rm -rf conftest.er1
4821   cat conftest.err >&5
4822   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
4823   (exit $ac_status); } >/dev/null && {
4824          test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
4825          test ! -s conftest.err
4826        }; then
4827   ac_header_preproc=yes
4828 else
4829   $as_echo "$as_me: failed program was:" >&5
4830 sed 's/^/| /' conftest.$ac_ext >&5
4831
4832   ac_header_preproc=no
4833 fi
4834
4835 rm -rf conftest.err conftest.$ac_ext
4836 { $as_echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
4837 $as_echo "$ac_header_preproc" >&6; }
4838
4839 # So?  What about this header?
4840 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
4841   yes:no: )
4842     { $as_echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
4843 $as_echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
4844     { $as_echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
4845 $as_echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
4846     ac_header_preproc=yes
4847     ;;
4848   no:yes:* )
4849     { $as_echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
4850 $as_echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
4851     { $as_echo "$as_me:$LINENO: WARNING: $ac_header:     check for missing prerequisite headers?" >&5
4852 $as_echo "$as_me: WARNING: $ac_header:     check for missing prerequisite headers?" >&2;}
4853     { $as_echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
4854 $as_echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
4855     { $as_echo "$as_me:$LINENO: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&5
4856 $as_echo "$as_me: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&2;}
4857     { $as_echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
4858 $as_echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
4859     { $as_echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
4860 $as_echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
4861
4862     ;;
4863 esac
4864 { $as_echo "$as_me:$LINENO: checking for $ac_header" >&5
4865 $as_echo_n "checking for $ac_header... " >&6; }
4866 if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
4867   $as_echo_n "(cached) " >&6
4868 else
4869   eval "$as_ac_Header=\$ac_header_preproc"
4870 fi
4871 ac_res=`eval 'as_val=${'$as_ac_Header'}
4872                  $as_echo "$as_val"'`
4873                { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
4874 $as_echo "$ac_res" >&6; }
4875
4876 fi
4877 as_val=`eval 'as_val=${'$as_ac_Header'}
4878                  $as_echo "$as_val"'`
4879    if test "x$as_val" = x""yes; then
4880   cat >>confdefs.h <<_ACEOF
4881 #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
4882 _ACEOF
4883
4884 fi
4885
4886 done
4887
4888 { $as_echo "$as_me:$LINENO: checking for mode_t" >&5
4889 $as_echo_n "checking for mode_t... " >&6; }
4890 if test "${ac_cv_type_mode_t+set}" = set; then
4891   $as_echo_n "(cached) " >&6
4892 else
4893   ac_cv_type_mode_t=no
4894 cat >conftest.$ac_ext <<_ACEOF
4895 /* confdefs.h.  */
4896 _ACEOF
4897 cat confdefs.h >>conftest.$ac_ext
4898 cat >>conftest.$ac_ext <<_ACEOF
4899 /* end confdefs.h.  */
4900 $ac_includes_default
4901 int
4902 main ()
4903 {
4904 if (sizeof (mode_t))
4905        return 0;
4906   ;
4907   return 0;
4908 }
4909 _ACEOF
4910 rm -rf conftest.$ac_objext
4911 if { (ac_try="$ac_compile"
4912 case "(($ac_try" in
4913   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4914   *) ac_try_echo=$ac_try;;
4915 esac
4916 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
4917 $as_echo "$ac_try_echo") >&5
4918   (eval "$ac_compile") 2>conftest.er1
4919   ac_status=$?
4920   grep -v '^ *+' conftest.er1 >conftest.err
4921   rm -rf conftest.er1
4922   cat conftest.err >&5
4923   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
4924   (exit $ac_status); } && {
4925          test -z "$ac_c_werror_flag" ||
4926          test ! -s conftest.err
4927        } && test -s conftest.$ac_objext; then
4928   cat >conftest.$ac_ext <<_ACEOF
4929 /* confdefs.h.  */
4930 _ACEOF
4931 cat confdefs.h >>conftest.$ac_ext
4932 cat >>conftest.$ac_ext <<_ACEOF
4933 /* end confdefs.h.  */
4934 $ac_includes_default
4935 int
4936 main ()
4937 {
4938 if (sizeof ((mode_t)))
4939           return 0;
4940   ;
4941   return 0;
4942 }
4943 _ACEOF
4944 rm -rf conftest.$ac_objext
4945 if { (ac_try="$ac_compile"
4946 case "(($ac_try" in
4947   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4948   *) ac_try_echo=$ac_try;;
4949 esac
4950 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
4951 $as_echo "$ac_try_echo") >&5
4952   (eval "$ac_compile") 2>conftest.er1
4953   ac_status=$?
4954   grep -v '^ *+' conftest.er1 >conftest.err
4955   rm -rf conftest.er1
4956   cat conftest.err >&5
4957   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
4958   (exit $ac_status); } && {
4959          test -z "$ac_c_werror_flag" ||
4960          test ! -s conftest.err
4961        } && test -s conftest.$ac_objext; then
4962   :
4963 else
4964   $as_echo "$as_me: failed program was:" >&5
4965 sed 's/^/| /' conftest.$ac_ext >&5
4966
4967         ac_cv_type_mode_t=yes
4968 fi
4969
4970 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4971 else
4972   $as_echo "$as_me: failed program was:" >&5
4973 sed 's/^/| /' conftest.$ac_ext >&5
4974
4975
4976 fi
4977
4978 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4979 fi
4980 { $as_echo "$as_me:$LINENO: result: $ac_cv_type_mode_t" >&5
4981 $as_echo "$ac_cv_type_mode_t" >&6; }
4982 if test "x$ac_cv_type_mode_t" = x""yes; then
4983   :
4984 else
4985
4986 cat >>confdefs.h <<_ACEOF
4987 #define mode_t int
4988 _ACEOF
4989
4990 fi
4991
4992 { $as_echo "$as_me:$LINENO: checking for pid_t" >&5
4993 $as_echo_n "checking for pid_t... " >&6; }
4994 if test "${ac_cv_type_pid_t+set}" = set; then
4995   $as_echo_n "(cached) " >&6
4996 else
4997   ac_cv_type_pid_t=no
4998 cat >conftest.$ac_ext <<_ACEOF
4999 /* confdefs.h.  */
5000 _ACEOF
5001 cat confdefs.h >>conftest.$ac_ext
5002 cat >>conftest.$ac_ext <<_ACEOF
5003 /* end confdefs.h.  */
5004 $ac_includes_default
5005 int
5006 main ()
5007 {
5008 if (sizeof (pid_t))
5009        return 0;
5010   ;
5011   return 0;
5012 }
5013 _ACEOF
5014 rm -rf conftest.$ac_objext
5015 if { (ac_try="$ac_compile"
5016 case "(($ac_try" in
5017   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5018   *) ac_try_echo=$ac_try;;
5019 esac
5020 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
5021 $as_echo "$ac_try_echo") >&5
5022   (eval "$ac_compile") 2>conftest.er1
5023   ac_status=$?
5024   grep -v '^ *+' conftest.er1 >conftest.err
5025   rm -rf conftest.er1
5026   cat conftest.err >&5
5027   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
5028   (exit $ac_status); } && {
5029          test -z "$ac_c_werror_flag" ||
5030          test ! -s conftest.err
5031        } && test -s conftest.$ac_objext; then
5032   cat >conftest.$ac_ext <<_ACEOF
5033 /* confdefs.h.  */
5034 _ACEOF
5035 cat confdefs.h >>conftest.$ac_ext
5036 cat >>conftest.$ac_ext <<_ACEOF
5037 /* end confdefs.h.  */
5038 $ac_includes_default
5039 int
5040 main ()
5041 {
5042 if (sizeof ((pid_t)))
5043           return 0;
5044   ;
5045   return 0;
5046 }
5047 _ACEOF
5048 rm -rf conftest.$ac_objext
5049 if { (ac_try="$ac_compile"
5050 case "(($ac_try" in
5051   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5052   *) ac_try_echo=$ac_try;;
5053 esac
5054 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
5055 $as_echo "$ac_try_echo") >&5
5056   (eval "$ac_compile") 2>conftest.er1
5057   ac_status=$?
5058   grep -v '^ *+' conftest.er1 >conftest.err
5059   rm -rf conftest.er1
5060   cat conftest.err >&5
5061   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
5062   (exit $ac_status); } && {
5063          test -z "$ac_c_werror_flag" ||
5064          test ! -s conftest.err
5065        } && test -s conftest.$ac_objext; then
5066   :
5067 else
5068   $as_echo "$as_me: failed program was:" >&5
5069 sed 's/^/| /' conftest.$ac_ext >&5
5070
5071         ac_cv_type_pid_t=yes
5072 fi
5073
5074 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5075 else
5076   $as_echo "$as_me: failed program was:" >&5
5077 sed 's/^/| /' conftest.$ac_ext >&5
5078
5079
5080 fi
5081
5082 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5083 fi
5084 { $as_echo "$as_me:$LINENO: result: $ac_cv_type_pid_t" >&5
5085 $as_echo "$ac_cv_type_pid_t" >&6; }
5086 if test "x$ac_cv_type_pid_t" = x""yes; then
5087   :
5088 else
5089
5090 cat >>confdefs.h <<_ACEOF
5091 #define pid_t int
5092 _ACEOF
5093
5094 fi
5095
5096 { $as_echo "$as_me:$LINENO: checking for size_t" >&5
5097 $as_echo_n "checking for size_t... " >&6; }
5098 if test "${ac_cv_type_size_t+set}" = set; then
5099   $as_echo_n "(cached) " >&6
5100 else
5101   ac_cv_type_size_t=no
5102 cat >conftest.$ac_ext <<_ACEOF
5103 /* confdefs.h.  */
5104 _ACEOF
5105 cat confdefs.h >>conftest.$ac_ext
5106 cat >>conftest.$ac_ext <<_ACEOF
5107 /* end confdefs.h.  */
5108 $ac_includes_default
5109 int
5110 main ()
5111 {
5112 if (sizeof (size_t))
5113        return 0;
5114   ;
5115   return 0;
5116 }
5117 _ACEOF
5118 rm -rf conftest.$ac_objext
5119 if { (ac_try="$ac_compile"
5120 case "(($ac_try" in
5121   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5122   *) ac_try_echo=$ac_try;;
5123 esac
5124 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
5125 $as_echo "$ac_try_echo") >&5
5126   (eval "$ac_compile") 2>conftest.er1
5127   ac_status=$?
5128   grep -v '^ *+' conftest.er1 >conftest.err
5129   rm -rf conftest.er1
5130   cat conftest.err >&5
5131   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
5132   (exit $ac_status); } && {
5133          test -z "$ac_c_werror_flag" ||
5134          test ! -s conftest.err
5135        } && test -s conftest.$ac_objext; then
5136   cat >conftest.$ac_ext <<_ACEOF
5137 /* confdefs.h.  */
5138 _ACEOF
5139 cat confdefs.h >>conftest.$ac_ext
5140 cat >>conftest.$ac_ext <<_ACEOF
5141 /* end confdefs.h.  */
5142 $ac_includes_default
5143 int
5144 main ()
5145 {
5146 if (sizeof ((size_t)))
5147           return 0;
5148   ;
5149   return 0;
5150 }
5151 _ACEOF
5152 rm -rf conftest.$ac_objext
5153 if { (ac_try="$ac_compile"
5154 case "(($ac_try" in
5155   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5156   *) ac_try_echo=$ac_try;;
5157 esac
5158 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
5159 $as_echo "$ac_try_echo") >&5
5160   (eval "$ac_compile") 2>conftest.er1
5161   ac_status=$?
5162   grep -v '^ *+' conftest.er1 >conftest.err
5163   rm -rf conftest.er1
5164   cat conftest.err >&5
5165   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
5166   (exit $ac_status); } && {
5167          test -z "$ac_c_werror_flag" ||
5168          test ! -s conftest.err
5169        } && test -s conftest.$ac_objext; then
5170   :
5171 else
5172   $as_echo "$as_me: failed program was:" >&5
5173 sed 's/^/| /' conftest.$ac_ext >&5
5174
5175         ac_cv_type_size_t=yes
5176 fi
5177
5178 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5179 else
5180   $as_echo "$as_me: failed program was:" >&5
5181 sed 's/^/| /' conftest.$ac_ext >&5
5182
5183
5184 fi
5185
5186 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5187 fi
5188 { $as_echo "$as_me:$LINENO: result: $ac_cv_type_size_t" >&5
5189 $as_echo "$ac_cv_type_size_t" >&6; }
5190 if test "x$ac_cv_type_size_t" = x""yes; then
5191   :
5192 else
5193
5194 cat >>confdefs.h <<_ACEOF
5195 #define size_t unsigned int
5196 _ACEOF
5197
5198 fi
5199
5200 { $as_echo "$as_me:$LINENO: checking return type of signal handlers" >&5
5201 $as_echo_n "checking return type of signal handlers... " >&6; }
5202 if test "${ac_cv_type_signal+set}" = set; then
5203   $as_echo_n "(cached) " >&6
5204 else
5205   cat >conftest.$ac_ext <<_ACEOF
5206 /* confdefs.h.  */
5207 _ACEOF
5208 cat confdefs.h >>conftest.$ac_ext
5209 cat >>conftest.$ac_ext <<_ACEOF
5210 /* end confdefs.h.  */
5211 #include <sys/types.h>
5212 #include <signal.h>
5213
5214 int
5215 main ()
5216 {
5217 return *(signal (0, 0)) (0) == 1;
5218   ;
5219   return 0;
5220 }
5221 _ACEOF
5222 rm -rf conftest.$ac_objext
5223 if { (ac_try="$ac_compile"
5224 case "(($ac_try" in
5225   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5226   *) ac_try_echo=$ac_try;;
5227 esac
5228 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
5229 $as_echo "$ac_try_echo") >&5
5230   (eval "$ac_compile") 2>conftest.er1
5231   ac_status=$?
5232   grep -v '^ *+' conftest.er1 >conftest.err
5233   rm -rf conftest.er1
5234   cat conftest.err >&5
5235   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
5236   (exit $ac_status); } && {
5237          test -z "$ac_c_werror_flag" ||
5238          test ! -s conftest.err
5239        } && test -s conftest.$ac_objext; then
5240   ac_cv_type_signal=int
5241 else
5242   $as_echo "$as_me: failed program was:" >&5
5243 sed 's/^/| /' conftest.$ac_ext >&5
5244
5245         ac_cv_type_signal=void
5246 fi
5247
5248 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5249 fi
5250 { $as_echo "$as_me:$LINENO: result: $ac_cv_type_signal" >&5
5251 $as_echo "$ac_cv_type_signal" >&6; }
5252
5253 cat >>confdefs.h <<_ACEOF
5254 #define RETSIGTYPE $ac_cv_type_signal
5255 _ACEOF
5256
5257
5258 { $as_echo "$as_me:$LINENO: checking whether time.h and sys/time.h may both be included" >&5
5259 $as_echo_n "checking whether time.h and sys/time.h may both be included... " >&6; }
5260 if test "${ac_cv_header_time+set}" = set; then
5261   $as_echo_n "(cached) " >&6
5262 else
5263   cat >conftest.$ac_ext <<_ACEOF
5264 /* confdefs.h.  */
5265 _ACEOF
5266 cat confdefs.h >>conftest.$ac_ext
5267 cat >>conftest.$ac_ext <<_ACEOF
5268 /* end confdefs.h.  */
5269 #include <sys/types.h>
5270 #include <sys/time.h>
5271 #include <time.h>
5272
5273 int
5274 main ()
5275 {
5276 if ((struct tm *) 0)
5277 return 0;
5278   ;
5279   return 0;
5280 }
5281 _ACEOF
5282 rm -rf conftest.$ac_objext
5283 if { (ac_try="$ac_compile"
5284 case "(($ac_try" in
5285   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5286   *) ac_try_echo=$ac_try;;
5287 esac
5288 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
5289 $as_echo "$ac_try_echo") >&5
5290   (eval "$ac_compile") 2>conftest.er1
5291   ac_status=$?
5292   grep -v '^ *+' conftest.er1 >conftest.err
5293   rm -rf conftest.er1
5294   cat conftest.err >&5
5295   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
5296   (exit $ac_status); } && {
5297          test -z "$ac_c_werror_flag" ||
5298          test ! -s conftest.err
5299        } && test -s conftest.$ac_objext; then
5300   ac_cv_header_time=yes
5301 else
5302   $as_echo "$as_me: failed program was:" >&5
5303 sed 's/^/| /' conftest.$ac_ext >&5
5304
5305         ac_cv_header_time=no
5306 fi
5307
5308 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5309 fi
5310 { $as_echo "$as_me:$LINENO: result: $ac_cv_header_time" >&5
5311 $as_echo "$ac_cv_header_time" >&6; }
5312 if test $ac_cv_header_time = yes; then
5313
5314 cat >>confdefs.h <<\_ACEOF
5315 #define TIME_WITH_SYS_TIME 1
5316 _ACEOF
5317
5318 fi
5319
5320 { $as_echo "$as_me:$LINENO: checking for sys/wait.h that is POSIX.1 compatible" >&5
5321 $as_echo_n "checking for sys/wait.h that is POSIX.1 compatible... " >&6; }
5322 if test "${ac_cv_header_sys_wait_h+set}" = set; then
5323   $as_echo_n "(cached) " >&6
5324 else
5325   cat >conftest.$ac_ext <<_ACEOF
5326 /* confdefs.h.  */
5327 _ACEOF
5328 cat confdefs.h >>conftest.$ac_ext
5329 cat >>conftest.$ac_ext <<_ACEOF
5330 /* end confdefs.h.  */
5331 #include <sys/types.h>
5332 #include <sys/wait.h>
5333 #ifndef WEXITSTATUS
5334 # define WEXITSTATUS(stat_val) ((unsigned int) (stat_val) >> 8)
5335 #endif
5336 #ifndef WIFEXITED
5337 # define WIFEXITED(stat_val) (((stat_val) & 255) == 0)
5338 #endif
5339
5340 int
5341 main ()
5342 {
5343   int s;
5344   wait (&s);
5345   s = WIFEXITED (s) ? WEXITSTATUS (s) : 1;
5346   ;
5347   return 0;
5348 }
5349 _ACEOF
5350 rm -rf conftest.$ac_objext
5351 if { (ac_try="$ac_compile"
5352 case "(($ac_try" in
5353   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5354   *) ac_try_echo=$ac_try;;
5355 esac
5356 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
5357 $as_echo "$ac_try_echo") >&5
5358   (eval "$ac_compile") 2>conftest.er1
5359   ac_status=$?
5360   grep -v '^ *+' conftest.er1 >conftest.err
5361   rm -rf conftest.er1
5362   cat conftest.err >&5
5363   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
5364   (exit $ac_status); } && {
5365          test -z "$ac_c_werror_flag" ||
5366          test ! -s conftest.err
5367        } && test -s conftest.$ac_objext; then
5368   ac_cv_header_sys_wait_h=yes
5369 else
5370   $as_echo "$as_me: failed program was:" >&5
5371 sed 's/^/| /' conftest.$ac_ext >&5
5372
5373         ac_cv_header_sys_wait_h=no
5374 fi
5375
5376 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5377 fi
5378 { $as_echo "$as_me:$LINENO: result: $ac_cv_header_sys_wait_h" >&5
5379 $as_echo "$ac_cv_header_sys_wait_h" >&6; }
5380 if test $ac_cv_header_sys_wait_h = yes; then
5381
5382 cat >>confdefs.h <<\_ACEOF
5383 #define HAVE_SYS_WAIT_H 1
5384 _ACEOF
5385
5386 fi
5387
5388
5389
5390
5391
5392
5393 ac_header_dirent=no
5394 for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h; do
5395   as_ac_Header=`$as_echo "ac_cv_header_dirent_$ac_hdr" | $as_tr_sh`
5396 { $as_echo "$as_me:$LINENO: checking for $ac_hdr that defines DIR" >&5
5397 $as_echo_n "checking for $ac_hdr that defines DIR... " >&6; }
5398 if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
5399   $as_echo_n "(cached) " >&6
5400 else
5401   cat >conftest.$ac_ext <<_ACEOF
5402 /* confdefs.h.  */
5403 _ACEOF
5404 cat confdefs.h >>conftest.$ac_ext
5405 cat >>conftest.$ac_ext <<_ACEOF
5406 /* end confdefs.h.  */
5407 #include <sys/types.h>
5408 #include <$ac_hdr>
5409
5410 int
5411 main ()
5412 {
5413 if ((DIR *) 0)
5414 return 0;
5415   ;
5416   return 0;
5417 }
5418 _ACEOF
5419 rm -rf conftest.$ac_objext
5420 if { (ac_try="$ac_compile"
5421 case "(($ac_try" in
5422   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5423   *) ac_try_echo=$ac_try;;
5424 esac
5425 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
5426 $as_echo "$ac_try_echo") >&5
5427   (eval "$ac_compile") 2>conftest.er1
5428   ac_status=$?
5429   grep -v '^ *+' conftest.er1 >conftest.err
5430   rm -rf conftest.er1
5431   cat conftest.err >&5
5432   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
5433   (exit $ac_status); } && {
5434          test -z "$ac_c_werror_flag" ||
5435          test ! -s conftest.err
5436        } && test -s conftest.$ac_objext; then
5437   eval "$as_ac_Header=yes"
5438 else
5439   $as_echo "$as_me: failed program was:" >&5
5440 sed 's/^/| /' conftest.$ac_ext >&5
5441
5442         eval "$as_ac_Header=no"
5443 fi
5444
5445 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5446 fi
5447 ac_res=`eval 'as_val=${'$as_ac_Header'}
5448                  $as_echo "$as_val"'`
5449                { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
5450 $as_echo "$ac_res" >&6; }
5451 as_val=`eval 'as_val=${'$as_ac_Header'}
5452                  $as_echo "$as_val"'`
5453    if test "x$as_val" = x""yes; then
5454   cat >>confdefs.h <<_ACEOF
5455 #define `$as_echo "HAVE_$ac_hdr" | $as_tr_cpp` 1
5456 _ACEOF
5457
5458 ac_header_dirent=$ac_hdr; break
5459 fi
5460
5461 done
5462 # Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
5463 if test $ac_header_dirent = dirent.h; then
5464   { $as_echo "$as_me:$LINENO: checking for library containing opendir" >&5
5465 $as_echo_n "checking for library containing opendir... " >&6; }
5466 if test "${ac_cv_search_opendir+set}" = set; then
5467   $as_echo_n "(cached) " >&6
5468 else
5469   ac_func_search_save_LIBS=$LIBS
5470 cat >conftest.$ac_ext <<_ACEOF
5471 /* confdefs.h.  */
5472 _ACEOF
5473 cat confdefs.h >>conftest.$ac_ext
5474 cat >>conftest.$ac_ext <<_ACEOF
5475 /* end confdefs.h.  */
5476
5477 /* Override any GCC internal prototype to avoid an error.
5478    Use char because int might match the return type of a GCC
5479    builtin and then its argument prototype would still apply.  */
5480 #ifdef __cplusplus
5481 extern "C"
5482 #endif
5483 char opendir ();
5484 int
5485 main ()
5486 {
5487 return opendir ();
5488   ;
5489   return 0;
5490 }
5491 _ACEOF
5492 for ac_lib in '' dir; do
5493   if test -z "$ac_lib"; then
5494     ac_res="none required"
5495   else
5496     ac_res=-l$ac_lib
5497     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
5498   fi
5499   rm -rf conftest.$ac_objext conftest$ac_exeext
5500 if { (ac_try="$ac_link"
5501 case "(($ac_try" in
5502   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5503   *) ac_try_echo=$ac_try;;
5504 esac
5505 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
5506 $as_echo "$ac_try_echo") >&5
5507   (eval "$ac_link") 2>conftest.er1
5508   ac_status=$?
5509   grep -v '^ *+' conftest.er1 >conftest.err
5510   rm -rf conftest.er1
5511   cat conftest.err >&5
5512   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
5513   (exit $ac_status); } && {
5514          test -z "$ac_c_werror_flag" ||
5515          test ! -s conftest.err
5516        } && test -s conftest$ac_exeext && {
5517          test "$cross_compiling" = yes ||
5518          $as_test_x conftest$ac_exeext
5519        }; then
5520   ac_cv_search_opendir=$ac_res
5521 else
5522   $as_echo "$as_me: failed program was:" >&5
5523 sed 's/^/| /' conftest.$ac_ext >&5
5524
5525
5526 fi
5527
5528 rm -rf conftest.dSYM
5529 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
5530       conftest$ac_exeext
5531   if test "${ac_cv_search_opendir+set}" = set; then
5532   break
5533 fi
5534 done
5535 if test "${ac_cv_search_opendir+set}" = set; then
5536   :
5537 else
5538   ac_cv_search_opendir=no
5539 fi
5540 rm conftest.$ac_ext
5541 LIBS=$ac_func_search_save_LIBS
5542 fi
5543 { $as_echo "$as_me:$LINENO: result: $ac_cv_search_opendir" >&5
5544 $as_echo "$ac_cv_search_opendir" >&6; }
5545 ac_res=$ac_cv_search_opendir
5546 if test "$ac_res" != no; then
5547   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
5548
5549 fi
5550
5551 else
5552   { $as_echo "$as_me:$LINENO: checking for library containing opendir" >&5
5553 $as_echo_n "checking for library containing opendir... " >&6; }
5554 if test "${ac_cv_search_opendir+set}" = set; then
5555   $as_echo_n "(cached) " >&6
5556 else
5557   ac_func_search_save_LIBS=$LIBS
5558 cat >conftest.$ac_ext <<_ACEOF
5559 /* confdefs.h.  */
5560 _ACEOF
5561 cat confdefs.h >>conftest.$ac_ext
5562 cat >>conftest.$ac_ext <<_ACEOF
5563 /* end confdefs.h.  */
5564
5565 /* Override any GCC internal prototype to avoid an error.
5566    Use char because int might match the return type of a GCC
5567    builtin and then its argument prototype would still apply.  */
5568 #ifdef __cplusplus
5569 extern "C"
5570 #endif
5571 char opendir ();
5572 int
5573 main ()
5574 {
5575 return opendir ();
5576   ;
5577   return 0;
5578 }
5579 _ACEOF
5580 for ac_lib in '' x; do
5581   if test -z "$ac_lib"; then
5582     ac_res="none required"
5583   else
5584     ac_res=-l$ac_lib
5585     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
5586   fi
5587   rm -rf conftest.$ac_objext conftest$ac_exeext
5588 if { (ac_try="$ac_link"
5589 case "(($ac_try" in
5590   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5591   *) ac_try_echo=$ac_try;;
5592 esac
5593 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
5594 $as_echo "$ac_try_echo") >&5
5595   (eval "$ac_link") 2>conftest.er1
5596   ac_status=$?
5597   grep -v '^ *+' conftest.er1 >conftest.err
5598   rm -rf conftest.er1
5599   cat conftest.err >&5
5600   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
5601   (exit $ac_status); } && {
5602          test -z "$ac_c_werror_flag" ||
5603          test ! -s conftest.err
5604        } && test -s conftest$ac_exeext && {
5605          test "$cross_compiling" = yes ||
5606          $as_test_x conftest$ac_exeext
5607        }; then
5608   ac_cv_search_opendir=$ac_res
5609 else
5610   $as_echo "$as_me: failed program was:" >&5
5611 sed 's/^/| /' conftest.$ac_ext >&5
5612
5613
5614 fi
5615
5616 rm -rf conftest.dSYM
5617 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
5618       conftest$ac_exeext
5619   if test "${ac_cv_search_opendir+set}" = set; then
5620   break
5621 fi
5622 done
5623 if test "${ac_cv_search_opendir+set}" = set; then
5624   :
5625 else
5626   ac_cv_search_opendir=no
5627 fi
5628 rm conftest.$ac_ext
5629 LIBS=$ac_func_search_save_LIBS
5630 fi
5631 { $as_echo "$as_me:$LINENO: result: $ac_cv_search_opendir" >&5
5632 $as_echo "$ac_cv_search_opendir" >&6; }
5633 ac_res=$ac_cv_search_opendir
5634 if test "$ac_res" != no; then
5635   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
5636
5637 fi
5638
5639 fi
5640
5641 { $as_echo "$as_me:$LINENO: checking how to call gettimeofday" >&5
5642 $as_echo_n "checking how to call gettimeofday... " >&6; }
5643   if test "${ac_cv_gettimeofday_args+set}" = set; then
5644   $as_echo_n "(cached) " >&6
5645 else
5646   cat >conftest.$ac_ext <<_ACEOF
5647 /* confdefs.h.  */
5648 _ACEOF
5649 cat confdefs.h >>conftest.$ac_ext
5650 cat >>conftest.$ac_ext <<_ACEOF
5651 /* end confdefs.h.  */
5652 #include <stdlib.h>
5653                     #include <sys/time.h>
5654 int
5655 main ()
5656 {
5657 struct timeval tv; struct timezone tzp;
5658                     gettimeofday(&tv, &tzp);
5659   ;
5660   return 0;
5661 }
5662 _ACEOF
5663 rm -rf conftest.$ac_objext
5664 if { (ac_try="$ac_compile"
5665 case "(($ac_try" in
5666   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5667   *) ac_try_echo=$ac_try;;
5668 esac
5669 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
5670 $as_echo "$ac_try_echo") >&5
5671   (eval "$ac_compile") 2>conftest.er1
5672   ac_status=$?
5673   grep -v '^ *+' conftest.er1 >conftest.err
5674   rm -rf conftest.er1
5675   cat conftest.err >&5
5676   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
5677   (exit $ac_status); } && {
5678          test -z "$ac_c_werror_flag" ||
5679          test ! -s conftest.err
5680        } && test -s conftest.$ac_objext; then
5681   ac_gettimeofday_args=2
5682 else
5683   $as_echo "$as_me: failed program was:" >&5
5684 sed 's/^/| /' conftest.$ac_ext >&5
5685
5686         cat >conftest.$ac_ext <<_ACEOF
5687 /* confdefs.h.  */
5688 _ACEOF
5689 cat confdefs.h >>conftest.$ac_ext
5690 cat >>conftest.$ac_ext <<_ACEOF
5691 /* end confdefs.h.  */
5692 #include <stdlib.h>
5693                                     #include <sys/time.h>
5694 int
5695 main ()
5696 {
5697 struct timeval tv; gettimeofday(&tv);
5698   ;
5699   return 0;
5700 }
5701 _ACEOF
5702 rm -rf conftest.$ac_objext
5703 if { (ac_try="$ac_compile"
5704 case "(($ac_try" in
5705   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5706   *) ac_try_echo=$ac_try;;
5707 esac
5708 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
5709 $as_echo "$ac_try_echo") >&5
5710   (eval "$ac_compile") 2>conftest.er1
5711   ac_status=$?
5712   grep -v '^ *+' conftest.er1 >conftest.err
5713   rm -rf conftest.er1
5714   cat conftest.err >&5
5715   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
5716   (exit $ac_status); } && {
5717          test -z "$ac_c_werror_flag" ||
5718          test ! -s conftest.err
5719        } && test -s conftest.$ac_objext; then
5720   ac_gettimeofday_args=1
5721 else
5722   $as_echo "$as_me: failed program was:" >&5
5723 sed 's/^/| /' conftest.$ac_ext >&5
5724
5725         ac_gettimeofday_args=0
5726 fi
5727
5728 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5729 fi
5730
5731 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5732     ac_cv_gettimeofday_args=$ac_gettimeofday_args
5733 fi
5734
5735   ac_gettimeofday_args=$ac_cv_gettimeofday_args
5736   if test "$ac_gettimeofday_args" = 1 ; then
5737     cat >>confdefs.h <<\_ACEOF
5738 #define HAVE_GETTIMEOFDAY 1
5739 _ACEOF
5740
5741     { $as_echo "$as_me:$LINENO: result: one argument" >&5
5742 $as_echo "one argument" >&6; }
5743   elif test "$ac_gettimeofday_args" = 2 ; then
5744     cat >>confdefs.h <<\_ACEOF
5745 #define HAVE_GETTIMEOFDAY 1
5746 _ACEOF
5747
5748     cat >>confdefs.h <<\_ACEOF
5749 #define GETTIMEOFDAY_TWO_ARGS 1
5750 _ACEOF
5751
5752     { $as_echo "$as_me:$LINENO: result: two arguments" >&5
5753 $as_echo "two arguments" >&6; }
5754   else
5755     { $as_echo "$as_me:$LINENO: result: unknown" >&5
5756 $as_echo "unknown" >&6; }
5757   fi
5758
5759
5760
5761
5762
5763
5764
5765
5766
5767
5768 for ac_func in select fcntl uname nice setpriority getcwd getwd putenv sbrk
5769 do
5770 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
5771 { $as_echo "$as_me:$LINENO: checking for $ac_func" >&5
5772 $as_echo_n "checking for $ac_func... " >&6; }
5773 if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
5774   $as_echo_n "(cached) " >&6
5775 else
5776   cat >conftest.$ac_ext <<_ACEOF
5777 /* confdefs.h.  */
5778 _ACEOF
5779 cat confdefs.h >>conftest.$ac_ext
5780 cat >>conftest.$ac_ext <<_ACEOF
5781 /* end confdefs.h.  */
5782 /* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
5783    For example, HP-UX 11i <limits.h> declares gettimeofday.  */
5784 #define $ac_func innocuous_$ac_func
5785
5786 /* System header to define __stub macros and hopefully few prototypes,
5787     which can conflict with char $ac_func (); below.
5788     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
5789     <limits.h> exists even on freestanding compilers.  */
5790
5791 #ifdef __STDC__
5792 # include <limits.h>
5793 #else
5794 # include <assert.h>
5795 #endif
5796
5797 #undef $ac_func
5798
5799 /* Override any GCC internal prototype to avoid an error.
5800    Use char because int might match the return type of a GCC
5801    builtin and then its argument prototype would still apply.  */
5802 #ifdef __cplusplus
5803 extern "C"
5804 #endif
5805 char $ac_func ();
5806 /* The GNU C library defines this for functions which it implements
5807     to always fail with ENOSYS.  Some functions are actually named
5808     something starting with __ and the normal name is an alias.  */
5809 #if defined __stub_$ac_func || defined __stub___$ac_func
5810 choke me
5811 #endif
5812
5813 int
5814 main ()
5815 {
5816 return $ac_func ();
5817   ;
5818   return 0;
5819 }
5820 _ACEOF
5821 rm -rf conftest.$ac_objext conftest$ac_exeext
5822 if { (ac_try="$ac_link"
5823 case "(($ac_try" in
5824   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5825   *) ac_try_echo=$ac_try;;
5826 esac
5827 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
5828 $as_echo "$ac_try_echo") >&5
5829   (eval "$ac_link") 2>conftest.er1
5830   ac_status=$?
5831   grep -v '^ *+' conftest.er1 >conftest.err
5832   rm -rf conftest.er1
5833   cat conftest.err >&5
5834   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
5835   (exit $ac_status); } && {
5836          test -z "$ac_c_werror_flag" ||
5837          test ! -s conftest.err
5838        } && test -s conftest$ac_exeext && {
5839          test "$cross_compiling" = yes ||
5840          $as_test_x conftest$ac_exeext
5841        }; then
5842   eval "$as_ac_var=yes"
5843 else
5844   $as_echo "$as_me: failed program was:" >&5
5845 sed 's/^/| /' conftest.$ac_ext >&5
5846
5847         eval "$as_ac_var=no"
5848 fi
5849
5850 rm -rf conftest.dSYM
5851 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
5852       conftest$ac_exeext conftest.$ac_ext
5853 fi
5854 ac_res=`eval 'as_val=${'$as_ac_var'}
5855                  $as_echo "$as_val"'`
5856                { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
5857 $as_echo "$ac_res" >&6; }
5858 as_val=`eval 'as_val=${'$as_ac_var'}
5859                  $as_echo "$as_val"'`
5860    if test "x$as_val" = x""yes; then
5861   cat >>confdefs.h <<_ACEOF
5862 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
5863 _ACEOF
5864
5865 fi
5866 done
5867
5868
5869
5870
5871
5872 for ac_func in sigaction syslog realpath setrlimit
5873 do
5874 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
5875 { $as_echo "$as_me:$LINENO: checking for $ac_func" >&5
5876 $as_echo_n "checking for $ac_func... " >&6; }
5877 if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
5878   $as_echo_n "(cached) " >&6
5879 else
5880   cat >conftest.$ac_ext <<_ACEOF
5881 /* confdefs.h.  */
5882 _ACEOF
5883 cat confdefs.h >>conftest.$ac_ext
5884 cat >>conftest.$ac_ext <<_ACEOF
5885 /* end confdefs.h.  */
5886 /* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
5887    For example, HP-UX 11i <limits.h> declares gettimeofday.  */
5888 #define $ac_func innocuous_$ac_func
5889
5890 /* System header to define __stub macros and hopefully few prototypes,
5891     which can conflict with char $ac_func (); below.
5892     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
5893     <limits.h> exists even on freestanding compilers.  */
5894
5895 #ifdef __STDC__
5896 # include <limits.h>
5897 #else
5898 # include <assert.h>
5899 #endif
5900
5901 #undef $ac_func
5902
5903 /* Override any GCC internal prototype to avoid an error.
5904    Use char because int might match the return type of a GCC
5905    builtin and then its argument prototype would still apply.  */
5906 #ifdef __cplusplus
5907 extern "C"
5908 #endif
5909 char $ac_func ();
5910 /* The GNU C library defines this for functions which it implements
5911     to always fail with ENOSYS.  Some functions are actually named
5912     something starting with __ and the normal name is an alias.  */
5913 #if defined __stub_$ac_func || defined __stub___$ac_func
5914 choke me
5915 #endif
5916
5917 int
5918 main ()
5919 {
5920 return $ac_func ();
5921   ;
5922   return 0;
5923 }
5924 _ACEOF
5925 rm -rf conftest.$ac_objext conftest$ac_exeext
5926 if { (ac_try="$ac_link"
5927 case "(($ac_try" in
5928   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5929   *) ac_try_echo=$ac_try;;
5930 esac
5931 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
5932 $as_echo "$ac_try_echo") >&5
5933   (eval "$ac_link") 2>conftest.er1
5934   ac_status=$?
5935   grep -v '^ *+' conftest.er1 >conftest.err
5936   rm -rf conftest.er1
5937   cat conftest.err >&5
5938   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
5939   (exit $ac_status); } && {
5940          test -z "$ac_c_werror_flag" ||
5941          test ! -s conftest.err
5942        } && test -s conftest$ac_exeext && {
5943          test "$cross_compiling" = yes ||
5944          $as_test_x conftest$ac_exeext
5945        }; then
5946   eval "$as_ac_var=yes"
5947 else
5948   $as_echo "$as_me: failed program was:" >&5
5949 sed 's/^/| /' conftest.$ac_ext >&5
5950
5951         eval "$as_ac_var=no"
5952 fi
5953
5954 rm -rf conftest.dSYM
5955 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
5956       conftest$ac_exeext conftest.$ac_ext
5957 fi
5958 ac_res=`eval 'as_val=${'$as_ac_var'}
5959                  $as_echo "$as_val"'`
5960                { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
5961 $as_echo "$ac_res" >&6; }
5962 as_val=`eval 'as_val=${'$as_ac_var'}
5963                  $as_echo "$as_val"'`
5964    if test "x$as_val" = x""yes; then
5965   cat >>confdefs.h <<_ACEOF
5966 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
5967 _ACEOF
5968
5969 fi
5970 done
5971
5972
5973 for ac_func in setlocale
5974 do
5975 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
5976 { $as_echo "$as_me:$LINENO: checking for $ac_func" >&5
5977 $as_echo_n "checking for $ac_func... " >&6; }
5978 if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
5979   $as_echo_n "(cached) " >&6
5980 else
5981   cat >conftest.$ac_ext <<_ACEOF
5982 /* confdefs.h.  */
5983 _ACEOF
5984 cat confdefs.h >>conftest.$ac_ext
5985 cat >>conftest.$ac_ext <<_ACEOF
5986 /* end confdefs.h.  */
5987 /* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
5988    For example, HP-UX 11i <limits.h> declares gettimeofday.  */
5989 #define $ac_func innocuous_$ac_func
5990
5991 /* System header to define __stub macros and hopefully few prototypes,
5992     which can conflict with char $ac_func (); below.
5993     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
5994     <limits.h> exists even on freestanding compilers.  */
5995
5996 #ifdef __STDC__
5997 # include <limits.h>
5998 #else
5999 # include <assert.h>
6000 #endif
6001
6002 #undef $ac_func
6003
6004 /* Override any GCC internal prototype to avoid an error.
6005    Use char because int might match the return type of a GCC
6006    builtin and then its argument prototype would still apply.  */
6007 #ifdef __cplusplus
6008 extern "C"
6009 #endif
6010 char $ac_func ();
6011 /* The GNU C library defines this for functions which it implements
6012     to always fail with ENOSYS.  Some functions are actually named
6013     something starting with __ and the normal name is an alias.  */
6014 #if defined __stub_$ac_func || defined __stub___$ac_func
6015 choke me
6016 #endif
6017
6018 int
6019 main ()
6020 {
6021 return $ac_func ();
6022   ;
6023   return 0;
6024 }
6025 _ACEOF
6026 rm -rf conftest.$ac_objext conftest$ac_exeext
6027 if { (ac_try="$ac_link"
6028 case "(($ac_try" in
6029   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6030   *) ac_try_echo=$ac_try;;
6031 esac
6032 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
6033 $as_echo "$ac_try_echo") >&5
6034   (eval "$ac_link") 2>conftest.er1
6035   ac_status=$?
6036   grep -v '^ *+' conftest.er1 >conftest.err
6037   rm -rf conftest.er1
6038   cat conftest.err >&5
6039   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
6040   (exit $ac_status); } && {
6041          test -z "$ac_c_werror_flag" ||
6042          test ! -s conftest.err
6043        } && test -s conftest$ac_exeext && {
6044          test "$cross_compiling" = yes ||
6045          $as_test_x conftest$ac_exeext
6046        }; then
6047   eval "$as_ac_var=yes"
6048 else
6049   $as_echo "$as_me: failed program was:" >&5
6050 sed 's/^/| /' conftest.$ac_ext >&5
6051
6052         eval "$as_ac_var=no"
6053 fi
6054
6055 rm -rf conftest.dSYM
6056 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
6057       conftest$ac_exeext conftest.$ac_ext
6058 fi
6059 ac_res=`eval 'as_val=${'$as_ac_var'}
6060                  $as_echo "$as_val"'`
6061                { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
6062 $as_echo "$ac_res" >&6; }
6063 as_val=`eval 'as_val=${'$as_ac_var'}
6064                  $as_echo "$as_val"'`
6065    if test "x$as_val" = x""yes; then
6066   cat >>confdefs.h <<_ACEOF
6067 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
6068 _ACEOF
6069
6070 fi
6071 done
6072
6073 { $as_echo "$as_me:$LINENO: checking for struct icmp" >&5
6074 $as_echo_n "checking for struct icmp... " >&6; }
6075 if test "${ac_cv_have_icmp+set}" = set; then
6076   $as_echo_n "(cached) " >&6
6077 else
6078   cat >conftest.$ac_ext <<_ACEOF
6079 /* confdefs.h.  */
6080 _ACEOF
6081 cat confdefs.h >>conftest.$ac_ext
6082 cat >>conftest.$ac_ext <<_ACEOF
6083 /* end confdefs.h.  */
6084 #include <stdlib.h>
6085                    #include <stdio.h>
6086                    #include <math.h>
6087                    #include <unistd.h>
6088                    #include <limits.h>
6089                    #include <signal.h>
6090                    #include <fcntl.h>
6091                    #include <sys/types.h>
6092                    #include <sys/time.h>
6093                    #include <sys/ipc.h>
6094                    #include <sys/shm.h>
6095                    #include <sys/socket.h>
6096                    #include <netinet/in_systm.h>
6097                    #include <netinet/in.h>
6098                    #include <netinet/ip.h>
6099                    #include <netinet/ip_icmp.h>
6100                    #include <netinet/udp.h>
6101                    #include <arpa/inet.h>
6102                    #include <netdb.h>
6103 int
6104 main ()
6105 {
6106 struct icmp i;
6107                    struct sockaddr s;
6108                    struct sockaddr_in si;
6109                    struct ip ip;
6110                    i.icmp_type = ICMP_ECHO;
6111                    i.icmp_code = 0;
6112                    i.icmp_cksum = 0;
6113                    i.icmp_id = 0;
6114                    i.icmp_seq = 0;
6115                    si.sin_family = AF_INET;
6116                    #if defined(__DECC) || defined(_IP_VHL)
6117                    ip.ip_vhl = 0;
6118                    #else
6119                    ip.ip_hl = 0;
6120                    #endif
6121
6122   ;
6123   return 0;
6124 }
6125 _ACEOF
6126 rm -rf conftest.$ac_objext
6127 if { (ac_try="$ac_compile"
6128 case "(($ac_try" in
6129   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6130   *) ac_try_echo=$ac_try;;
6131 esac
6132 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
6133 $as_echo "$ac_try_echo") >&5
6134   (eval "$ac_compile") 2>conftest.er1
6135   ac_status=$?
6136   grep -v '^ *+' conftest.er1 >conftest.err
6137   rm -rf conftest.er1
6138   cat conftest.err >&5
6139   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
6140   (exit $ac_status); } && {
6141          test -z "$ac_c_werror_flag" ||
6142          test ! -s conftest.err
6143        } && test -s conftest.$ac_objext; then
6144   ac_cv_have_icmp=yes
6145 else
6146   $as_echo "$as_me: failed program was:" >&5
6147 sed 's/^/| /' conftest.$ac_ext >&5
6148
6149         ac_cv_have_icmp=no
6150 fi
6151
6152 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6153 fi
6154 { $as_echo "$as_me:$LINENO: result: $ac_cv_have_icmp" >&5
6155 $as_echo "$ac_cv_have_icmp" >&6; }
6156  if test "$ac_cv_have_icmp" = yes ; then
6157    cat >>confdefs.h <<\_ACEOF
6158 #define HAVE_ICMP 1
6159 _ACEOF
6160
6161  fi
6162 { $as_echo "$as_me:$LINENO: checking for struct icmphdr" >&5
6163 $as_echo_n "checking for struct icmphdr... " >&6; }
6164 if test "${ac_cv_have_icmphdr+set}" = set; then
6165   $as_echo_n "(cached) " >&6
6166 else
6167   cat >conftest.$ac_ext <<_ACEOF
6168 /* confdefs.h.  */
6169 _ACEOF
6170 cat confdefs.h >>conftest.$ac_ext
6171 cat >>conftest.$ac_ext <<_ACEOF
6172 /* end confdefs.h.  */
6173 #include <stdlib.h>
6174                    #include <stdio.h>
6175                    #include <math.h>
6176                    #include <unistd.h>
6177                    #include <limits.h>
6178                    #include <signal.h>
6179                    #include <fcntl.h>
6180                    #include <sys/types.h>
6181                    #include <sys/time.h>
6182                    #include <sys/ipc.h>
6183                    #include <sys/shm.h>
6184                    #include <sys/socket.h>
6185                    #include <netinet/in_systm.h>
6186                    #include <netinet/in.h>
6187                    #include <netinet/ip.h>
6188                    #include <netinet/ip_icmp.h>
6189                    #include <netinet/udp.h>
6190                    #include <arpa/inet.h>
6191                    #include <netdb.h>
6192 int
6193 main ()
6194 {
6195 struct icmphdr i;
6196                    struct sockaddr s;
6197                    struct sockaddr_in si;
6198                    struct ip ip;
6199                    i.type = ICMP_ECHO;
6200                    i.code = 0;
6201                    i.checksum = 0;
6202                    i.un.echo.id = 0;
6203                    i.un.echo.sequence = 0;
6204                    si.sin_family = AF_INET;
6205                    ip.ip_hl = 0;
6206   ;
6207   return 0;
6208 }
6209 _ACEOF
6210 rm -rf conftest.$ac_objext
6211 if { (ac_try="$ac_compile"
6212 case "(($ac_try" in
6213   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6214   *) ac_try_echo=$ac_try;;
6215 esac
6216 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
6217 $as_echo "$ac_try_echo") >&5
6218   (eval "$ac_compile") 2>conftest.er1
6219   ac_status=$?
6220   grep -v '^ *+' conftest.er1 >conftest.err
6221   rm -rf conftest.er1
6222   cat conftest.err >&5
6223   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
6224   (exit $ac_status); } && {
6225          test -z "$ac_c_werror_flag" ||
6226          test ! -s conftest.err
6227        } && test -s conftest.$ac_objext; then
6228   ac_cv_have_icmphdr=yes
6229 else
6230   $as_echo "$as_me: failed program was:" >&5
6231 sed 's/^/| /' conftest.$ac_ext >&5
6232
6233         ac_cv_have_icmphdr=no
6234 fi
6235
6236 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6237 fi
6238 { $as_echo "$as_me:$LINENO: result: $ac_cv_have_icmphdr" >&5
6239 $as_echo "$ac_cv_have_icmphdr" >&6; }
6240  if test "$ac_cv_have_icmphdr" = yes ; then
6241    cat >>confdefs.h <<\_ACEOF
6242 #define HAVE_ICMPHDR 1
6243 _ACEOF
6244
6245  fi
6246
6247
6248 for ac_header in crypt.h sys/select.h
6249 do
6250 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
6251 if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
6252   { $as_echo "$as_me:$LINENO: checking for $ac_header" >&5
6253 $as_echo_n "checking for $ac_header... " >&6; }
6254 if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
6255   $as_echo_n "(cached) " >&6
6256 fi
6257 ac_res=`eval 'as_val=${'$as_ac_Header'}
6258                  $as_echo "$as_val"'`
6259                { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
6260 $as_echo "$ac_res" >&6; }
6261 else
6262   # Is the header compilable?
6263 { $as_echo "$as_me:$LINENO: checking $ac_header usability" >&5
6264 $as_echo_n "checking $ac_header usability... " >&6; }
6265 cat >conftest.$ac_ext <<_ACEOF
6266 /* confdefs.h.  */
6267 _ACEOF
6268 cat confdefs.h >>conftest.$ac_ext
6269 cat >>conftest.$ac_ext <<_ACEOF
6270 /* end confdefs.h.  */
6271 $ac_includes_default
6272 #include <$ac_header>
6273 _ACEOF
6274 rm -rf conftest.$ac_objext
6275 if { (ac_try="$ac_compile"
6276 case "(($ac_try" in
6277   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6278   *) ac_try_echo=$ac_try;;
6279 esac
6280 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
6281 $as_echo "$ac_try_echo") >&5
6282   (eval "$ac_compile") 2>conftest.er1
6283   ac_status=$?
6284   grep -v '^ *+' conftest.er1 >conftest.err
6285   rm -rf conftest.er1
6286   cat conftest.err >&5
6287   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
6288   (exit $ac_status); } && {
6289          test -z "$ac_c_werror_flag" ||
6290          test ! -s conftest.err
6291        } && test -s conftest.$ac_objext; then
6292   ac_header_compiler=yes
6293 else
6294   $as_echo "$as_me: failed program was:" >&5
6295 sed 's/^/| /' conftest.$ac_ext >&5
6296
6297         ac_header_compiler=no
6298 fi
6299
6300 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6301 { $as_echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
6302 $as_echo "$ac_header_compiler" >&6; }
6303
6304 # Is the header present?
6305 { $as_echo "$as_me:$LINENO: checking $ac_header presence" >&5
6306 $as_echo_n "checking $ac_header presence... " >&6; }
6307 cat >conftest.$ac_ext <<_ACEOF
6308 /* confdefs.h.  */
6309 _ACEOF
6310 cat confdefs.h >>conftest.$ac_ext
6311 cat >>conftest.$ac_ext <<_ACEOF
6312 /* end confdefs.h.  */
6313 #include <$ac_header>
6314 _ACEOF
6315 if { (ac_try="$ac_cpp conftest.$ac_ext"
6316 case "(($ac_try" in
6317   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6318   *) ac_try_echo=$ac_try;;
6319 esac
6320 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
6321 $as_echo "$ac_try_echo") >&5
6322   (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
6323   ac_status=$?
6324   grep -v '^ *+' conftest.er1 >conftest.err
6325   rm -rf conftest.er1
6326   cat conftest.err >&5
6327   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
6328   (exit $ac_status); } >/dev/null && {
6329          test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
6330          test ! -s conftest.err
6331        }; then
6332   ac_header_preproc=yes
6333 else
6334   $as_echo "$as_me: failed program was:" >&5
6335 sed 's/^/| /' conftest.$ac_ext >&5
6336
6337   ac_header_preproc=no
6338 fi
6339
6340 rm -rf conftest.err conftest.$ac_ext
6341 { $as_echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
6342 $as_echo "$ac_header_preproc" >&6; }
6343
6344 # So?  What about this header?
6345 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
6346   yes:no: )
6347     { $as_echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
6348 $as_echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
6349     { $as_echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
6350 $as_echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
6351     ac_header_preproc=yes
6352     ;;
6353   no:yes:* )
6354     { $as_echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
6355 $as_echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
6356     { $as_echo "$as_me:$LINENO: WARNING: $ac_header:     check for missing prerequisite headers?" >&5
6357 $as_echo "$as_me: WARNING: $ac_header:     check for missing prerequisite headers?" >&2;}
6358     { $as_echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
6359 $as_echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
6360     { $as_echo "$as_me:$LINENO: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&5
6361 $as_echo "$as_me: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&2;}
6362     { $as_echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
6363 $as_echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
6364     { $as_echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
6365 $as_echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
6366
6367     ;;
6368 esac
6369 { $as_echo "$as_me:$LINENO: checking for $ac_header" >&5
6370 $as_echo_n "checking for $ac_header... " >&6; }
6371 if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
6372   $as_echo_n "(cached) " >&6
6373 else
6374   eval "$as_ac_Header=\$ac_header_preproc"
6375 fi
6376 ac_res=`eval 'as_val=${'$as_ac_Header'}
6377                  $as_echo "$as_val"'`
6378                { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
6379 $as_echo "$ac_res" >&6; }
6380
6381 fi
6382 as_val=`eval 'as_val=${'$as_ac_Header'}
6383                  $as_echo "$as_val"'`
6384    if test "x$as_val" = x""yes; then
6385   cat >>confdefs.h <<_ACEOF
6386 #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
6387 _ACEOF
6388
6389 fi
6390
6391 done
6392
6393 for ac_prog in perl5 perl
6394 do
6395   # Extract the first word of "$ac_prog", so it can be a program name with args.
6396 set dummy $ac_prog; ac_word=$2
6397 { $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
6398 $as_echo_n "checking for $ac_word... " >&6; }
6399 if test "${ac_cv_path_PERL+set}" = set; then
6400   $as_echo_n "(cached) " >&6
6401 else
6402   case $PERL in
6403   [\\/]* | ?:[\\/]*)
6404   ac_cv_path_PERL="$PERL" # Let the user override the test with a path.
6405   ;;
6406   *)
6407   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6408 for as_dir in $PATH
6409 do
6410   IFS=$as_save_IFS
6411   test -z "$as_dir" && as_dir=.
6412   for ac_exec_ext in '' $ac_executable_extensions; do
6413   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
6414     ac_cv_path_PERL="$as_dir/$ac_word$ac_exec_ext"
6415     $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
6416     break 2
6417   fi
6418 done
6419 done
6420 IFS=$as_save_IFS
6421
6422   ;;
6423 esac
6424 fi
6425 PERL=$ac_cv_path_PERL
6426 if test -n "$PERL"; then
6427   { $as_echo "$as_me:$LINENO: result: $PERL" >&5
6428 $as_echo "$PERL" >&6; }
6429 else
6430   { $as_echo "$as_me:$LINENO: result: no" >&5
6431 $as_echo "no" >&6; }
6432 fi
6433
6434
6435   test -n "$PERL" && break
6436 done
6437
6438   if test -z "$PERL" ; then
6439     PERL_VERSION=0
6440   else
6441     { $as_echo "$as_me:$LINENO: checking perl version" >&5
6442 $as_echo_n "checking perl version... " >&6; }
6443 if test "${ac_cv_perl_version+set}" = set; then
6444   $as_echo_n "(cached) " >&6
6445 else
6446   ac_cv_perl_version=`$PERL -e "$perl_version_cmd"`
6447 fi
6448 { $as_echo "$as_me:$LINENO: result: $ac_cv_perl_version" >&5
6449 $as_echo "$ac_cv_perl_version" >&6; }
6450     PERL_VERSION=$ac_cv_perl_version
6451   fi
6452
6453
6454 if test -z "$PERL" ; then
6455   # don't let it be blank...
6456   PERL=/usr/bin/perl
6457 fi
6458
6459 { $as_echo "$as_me:$LINENO: checking for X" >&5
6460 $as_echo_n "checking for X... " >&6; }
6461
6462
6463 # Check whether --with-x was given.
6464 if test "${with_x+set}" = set; then
6465   withval=$with_x;
6466 fi
6467
6468 # $have_x is `yes', `no', `disabled', or empty when we do not yet know.
6469 if test "x$with_x" = xno; then
6470   # The user explicitly disabled X.
6471   have_x=disabled
6472 else
6473   case $x_includes,$x_libraries in #(
6474     *\'*) { { $as_echo "$as_me:$LINENO: error: cannot use X directory names containing '" >&5
6475 $as_echo "$as_me: error: cannot use X directory names containing '" >&2;}
6476    { (exit 1); exit 1; }; };; #(
6477     *,NONE | NONE,*) if test "${ac_cv_have_x+set}" = set; then
6478   $as_echo_n "(cached) " >&6
6479 else
6480   # One or both of the vars are not set, and there is no cached value.
6481 ac_x_includes=no ac_x_libraries=no
6482 rm -f -r conftest.dir
6483 if mkdir conftest.dir; then
6484   cd conftest.dir
6485   cat >Imakefile <<'_ACEOF'
6486 incroot:
6487         @echo incroot='${INCROOT}'
6488 usrlibdir:
6489         @echo usrlibdir='${USRLIBDIR}'
6490 libdir:
6491         @echo libdir='${LIBDIR}'
6492 _ACEOF
6493   if (export CC; ${XMKMF-xmkmf}) >/dev/null 2>/dev/null && test -f Makefile; then
6494     # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
6495     for ac_var in incroot usrlibdir libdir; do
6496       eval "ac_im_$ac_var=\`\${MAKE-make} $ac_var 2>/dev/null | sed -n 's/^$ac_var=//p'\`"
6497     done
6498     # Open Windows xmkmf reportedly sets LIBDIR instead of USRLIBDIR.
6499     for ac_extension in a so sl dylib la dll; do
6500       if test ! -f "$ac_im_usrlibdir/libX11.$ac_extension" &&
6501          test -f "$ac_im_libdir/libX11.$ac_extension"; then
6502         ac_im_usrlibdir=$ac_im_libdir; break
6503       fi
6504     done
6505     # Screen out bogus values from the imake configuration.  They are
6506     # bogus both because they are the default anyway, and because
6507     # using them would break gcc on systems where it needs fixed includes.
6508     case $ac_im_incroot in
6509         /usr/include) ac_x_includes= ;;
6510         *) test -f "$ac_im_incroot/X11/Xos.h" && ac_x_includes=$ac_im_incroot;;
6511     esac
6512     case $ac_im_usrlibdir in
6513         /usr/lib | /usr/lib64 | /lib | /lib64) ;;
6514         *) test -d "$ac_im_usrlibdir" && ac_x_libraries=$ac_im_usrlibdir ;;
6515     esac
6516   fi
6517   cd ..
6518   rm -f -r conftest.dir
6519 fi
6520
6521 # Standard set of common directories for X headers.
6522 # Check X11 before X11Rn because it is often a symlink to the current release.
6523 ac_x_header_dirs='
6524 /usr/X11/include
6525 /usr/X11R6/include
6526 /usr/X11R5/include
6527 /usr/X11R4/include
6528
6529 /usr/include/X11
6530 /usr/include/X11R6
6531 /usr/include/X11R5
6532 /usr/include/X11R4
6533
6534 /usr/local/X11/include
6535 /usr/local/X11R6/include
6536 /usr/local/X11R5/include
6537 /usr/local/X11R4/include
6538
6539 /usr/local/include/X11
6540 /usr/local/include/X11R6
6541 /usr/local/include/X11R5
6542 /usr/local/include/X11R4
6543
6544 /usr/X386/include
6545 /usr/x386/include
6546 /usr/XFree86/include/X11
6547
6548 /usr/include
6549 /usr/local/include
6550 /usr/unsupported/include
6551 /usr/athena/include
6552 /usr/local/x11r5/include
6553 /usr/lpp/Xamples/include
6554
6555 /usr/openwin/include
6556 /usr/openwin/share/include'
6557
6558 if test "$ac_x_includes" = no; then
6559   # Guess where to find include files, by looking for Xlib.h.
6560   # First, try using that file with no special directory specified.
6561   cat >conftest.$ac_ext <<_ACEOF
6562 /* confdefs.h.  */
6563 _ACEOF
6564 cat confdefs.h >>conftest.$ac_ext
6565 cat >>conftest.$ac_ext <<_ACEOF
6566 /* end confdefs.h.  */
6567 #include <X11/Xlib.h>
6568 _ACEOF
6569 if { (ac_try="$ac_cpp conftest.$ac_ext"
6570 case "(($ac_try" in
6571   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6572   *) ac_try_echo=$ac_try;;
6573 esac
6574 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
6575 $as_echo "$ac_try_echo") >&5
6576   (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
6577   ac_status=$?
6578   grep -v '^ *+' conftest.er1 >conftest.err
6579   rm -rf conftest.er1
6580   cat conftest.err >&5
6581   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
6582   (exit $ac_status); } >/dev/null && {
6583          test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
6584          test ! -s conftest.err
6585        }; then
6586   # We can compile using X headers with no special include directory.
6587 ac_x_includes=
6588 else
6589   $as_echo "$as_me: failed program was:" >&5
6590 sed 's/^/| /' conftest.$ac_ext >&5
6591
6592   for ac_dir in $ac_x_header_dirs; do
6593   if test -r "$ac_dir/X11/Xlib.h"; then
6594     ac_x_includes=$ac_dir
6595     break
6596   fi
6597 done
6598 fi
6599
6600 rm -rf conftest.err conftest.$ac_ext
6601 fi # $ac_x_includes = no
6602
6603 if test "$ac_x_libraries" = no; then
6604   # Check for the libraries.
6605   # See if we find them without any special options.
6606   # Don't add to $LIBS permanently.
6607   ac_save_LIBS=$LIBS
6608   LIBS="-lX11 $LIBS"
6609   cat >conftest.$ac_ext <<_ACEOF
6610 /* confdefs.h.  */
6611 _ACEOF
6612 cat confdefs.h >>conftest.$ac_ext
6613 cat >>conftest.$ac_ext <<_ACEOF
6614 /* end confdefs.h.  */
6615 #include <X11/Xlib.h>
6616 int
6617 main ()
6618 {
6619 XrmInitialize ()
6620   ;
6621   return 0;
6622 }
6623 _ACEOF
6624 rm -rf conftest.$ac_objext conftest$ac_exeext
6625 if { (ac_try="$ac_link"
6626 case "(($ac_try" in
6627   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6628   *) ac_try_echo=$ac_try;;
6629 esac
6630 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
6631 $as_echo "$ac_try_echo") >&5
6632   (eval "$ac_link") 2>conftest.er1
6633   ac_status=$?
6634   grep -v '^ *+' conftest.er1 >conftest.err
6635   rm -rf conftest.er1
6636   cat conftest.err >&5
6637   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
6638   (exit $ac_status); } && {
6639          test -z "$ac_c_werror_flag" ||
6640          test ! -s conftest.err
6641        } && test -s conftest$ac_exeext && {
6642          test "$cross_compiling" = yes ||
6643          $as_test_x conftest$ac_exeext
6644        }; then
6645   LIBS=$ac_save_LIBS
6646 # We can link X programs with no special library path.
6647 ac_x_libraries=
6648 else
6649   $as_echo "$as_me: failed program was:" >&5
6650 sed 's/^/| /' conftest.$ac_ext >&5
6651
6652         LIBS=$ac_save_LIBS
6653 for ac_dir in `$as_echo "$ac_x_includes $ac_x_header_dirs" | sed s/include/lib/g`
6654 do
6655   # Don't even attempt the hair of trying to link an X program!
6656   for ac_extension in a so sl dylib la dll; do
6657     if test -r "$ac_dir/libX11.$ac_extension"; then
6658       ac_x_libraries=$ac_dir
6659       break 2
6660     fi
6661   done
6662 done
6663 fi
6664
6665 rm -rf conftest.dSYM
6666 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
6667       conftest$ac_exeext conftest.$ac_ext
6668 fi # $ac_x_libraries = no
6669
6670 case $ac_x_includes,$ac_x_libraries in #(
6671   no,* | *,no | *\'*)
6672     # Didn't find X, or a directory has "'" in its name.
6673     ac_cv_have_x="have_x=no";; #(
6674   *)
6675     # Record where we found X for the cache.
6676     ac_cv_have_x="have_x=yes\
6677         ac_x_includes='$ac_x_includes'\
6678         ac_x_libraries='$ac_x_libraries'"
6679 esac
6680 fi
6681 ;; #(
6682     *) have_x=yes;;
6683   esac
6684   eval "$ac_cv_have_x"
6685 fi # $with_x != no
6686
6687 if test "$have_x" != yes; then
6688   { $as_echo "$as_me:$LINENO: result: $have_x" >&5
6689 $as_echo "$have_x" >&6; }
6690   no_x=yes
6691 else
6692   # If each of the values was on the command line, it overrides each guess.
6693   test "x$x_includes" = xNONE && x_includes=$ac_x_includes
6694   test "x$x_libraries" = xNONE && x_libraries=$ac_x_libraries
6695   # Update the cache value to reflect the command line values.
6696   ac_cv_have_x="have_x=yes\
6697         ac_x_includes='$x_includes'\
6698         ac_x_libraries='$x_libraries'"
6699   { $as_echo "$as_me:$LINENO: result: libraries $x_libraries, headers $x_includes" >&5
6700 $as_echo "libraries $x_libraries, headers $x_includes" >&6; }
6701 fi
6702
6703 if test "$no_x" = yes; then
6704   # Not all programs may use this symbol, but it does not hurt to define it.
6705
6706 cat >>confdefs.h <<\_ACEOF
6707 #define X_DISPLAY_MISSING 1
6708 _ACEOF
6709
6710   X_CFLAGS= X_PRE_LIBS= X_LIBS= X_EXTRA_LIBS=
6711 else
6712   if test -n "$x_includes"; then
6713     X_CFLAGS="$X_CFLAGS -I$x_includes"
6714   fi
6715
6716   # It would also be nice to do this for all -L options, not just this one.
6717   if test -n "$x_libraries"; then
6718     X_LIBS="$X_LIBS -L$x_libraries"
6719     # For Solaris; some versions of Sun CC require a space after -R and
6720     # others require no space.  Words are not sufficient . . . .
6721     { $as_echo "$as_me:$LINENO: checking whether -R must be followed by a space" >&5
6722 $as_echo_n "checking whether -R must be followed by a space... " >&6; }
6723     ac_xsave_LIBS=$LIBS; LIBS="$LIBS -R$x_libraries"
6724     ac_xsave_c_werror_flag=$ac_c_werror_flag
6725     ac_c_werror_flag=yes
6726     cat >conftest.$ac_ext <<_ACEOF
6727 /* confdefs.h.  */
6728 _ACEOF
6729 cat confdefs.h >>conftest.$ac_ext
6730 cat >>conftest.$ac_ext <<_ACEOF
6731 /* end confdefs.h.  */
6732
6733 int
6734 main ()
6735 {
6736
6737   ;
6738   return 0;
6739 }
6740 _ACEOF
6741 rm -rf conftest.$ac_objext conftest$ac_exeext
6742 if { (ac_try="$ac_link"
6743 case "(($ac_try" in
6744   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6745   *) ac_try_echo=$ac_try;;
6746 esac
6747 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
6748 $as_echo "$ac_try_echo") >&5
6749   (eval "$ac_link") 2>conftest.er1
6750   ac_status=$?
6751   grep -v '^ *+' conftest.er1 >conftest.err
6752   rm -rf conftest.er1
6753   cat conftest.err >&5
6754   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
6755   (exit $ac_status); } && {
6756          test -z "$ac_c_werror_flag" ||
6757          test ! -s conftest.err
6758        } && test -s conftest$ac_exeext && {
6759          test "$cross_compiling" = yes ||
6760          $as_test_x conftest$ac_exeext
6761        }; then
6762   { $as_echo "$as_me:$LINENO: result: no" >&5
6763 $as_echo "no" >&6; }
6764        X_LIBS="$X_LIBS -R$x_libraries"
6765 else
6766   $as_echo "$as_me: failed program was:" >&5
6767 sed 's/^/| /' conftest.$ac_ext >&5
6768
6769         LIBS="$ac_xsave_LIBS -R $x_libraries"
6770        cat >conftest.$ac_ext <<_ACEOF
6771 /* confdefs.h.  */
6772 _ACEOF
6773 cat confdefs.h >>conftest.$ac_ext
6774 cat >>conftest.$ac_ext <<_ACEOF
6775 /* end confdefs.h.  */
6776
6777 int
6778 main ()
6779 {
6780
6781   ;
6782   return 0;
6783 }
6784 _ACEOF
6785 rm -rf conftest.$ac_objext conftest$ac_exeext
6786 if { (ac_try="$ac_link"
6787 case "(($ac_try" in
6788   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6789   *) ac_try_echo=$ac_try;;
6790 esac
6791 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
6792 $as_echo "$ac_try_echo") >&5
6793   (eval "$ac_link") 2>conftest.er1
6794   ac_status=$?
6795   grep -v '^ *+' conftest.er1 >conftest.err
6796   rm -rf conftest.er1
6797   cat conftest.err >&5
6798   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
6799   (exit $ac_status); } && {
6800          test -z "$ac_c_werror_flag" ||
6801          test ! -s conftest.err
6802        } && test -s conftest$ac_exeext && {
6803          test "$cross_compiling" = yes ||
6804          $as_test_x conftest$ac_exeext
6805        }; then
6806   { $as_echo "$as_me:$LINENO: result: yes" >&5
6807 $as_echo "yes" >&6; }
6808           X_LIBS="$X_LIBS -R $x_libraries"
6809 else
6810   $as_echo "$as_me: failed program was:" >&5
6811 sed 's/^/| /' conftest.$ac_ext >&5
6812
6813         { $as_echo "$as_me:$LINENO: result: neither works" >&5
6814 $as_echo "neither works" >&6; }
6815 fi
6816
6817 rm -rf conftest.dSYM
6818 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
6819       conftest$ac_exeext conftest.$ac_ext
6820 fi
6821
6822 rm -rf conftest.dSYM
6823 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
6824       conftest$ac_exeext conftest.$ac_ext
6825     ac_c_werror_flag=$ac_xsave_c_werror_flag
6826     LIBS=$ac_xsave_LIBS
6827   fi
6828
6829   # Check for system-dependent libraries X programs must link with.
6830   # Do this before checking for the system-independent R6 libraries
6831   # (-lICE), since we may need -lsocket or whatever for X linking.
6832
6833   if test "$ISC" = yes; then
6834     X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl_s -linet"
6835   else
6836     # Martyn Johnson says this is needed for Ultrix, if the X
6837     # libraries were built with DECnet support.  And Karl Berry says
6838     # the Alpha needs dnet_stub (dnet does not exist).
6839     ac_xsave_LIBS="$LIBS"; LIBS="$LIBS $X_LIBS -lX11"
6840     cat >conftest.$ac_ext <<_ACEOF
6841 /* confdefs.h.  */
6842 _ACEOF
6843 cat confdefs.h >>conftest.$ac_ext
6844 cat >>conftest.$ac_ext <<_ACEOF
6845 /* end confdefs.h.  */
6846
6847 /* Override any GCC internal prototype to avoid an error.
6848    Use char because int might match the return type of a GCC
6849    builtin and then its argument prototype would still apply.  */
6850 #ifdef __cplusplus
6851 extern "C"
6852 #endif
6853 char XOpenDisplay ();
6854 int
6855 main ()
6856 {
6857 return XOpenDisplay ();
6858   ;
6859   return 0;
6860 }
6861 _ACEOF
6862 rm -rf conftest.$ac_objext conftest$ac_exeext
6863 if { (ac_try="$ac_link"
6864 case "(($ac_try" in
6865   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6866   *) ac_try_echo=$ac_try;;
6867 esac
6868 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
6869 $as_echo "$ac_try_echo") >&5
6870   (eval "$ac_link") 2>conftest.er1
6871   ac_status=$?
6872   grep -v '^ *+' conftest.er1 >conftest.err
6873   rm -rf conftest.er1
6874   cat conftest.err >&5
6875   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
6876   (exit $ac_status); } && {
6877          test -z "$ac_c_werror_flag" ||
6878          test ! -s conftest.err
6879        } && test -s conftest$ac_exeext && {
6880          test "$cross_compiling" = yes ||
6881          $as_test_x conftest$ac_exeext
6882        }; then
6883   :
6884 else
6885   $as_echo "$as_me: failed program was:" >&5
6886 sed 's/^/| /' conftest.$ac_ext >&5
6887
6888         { $as_echo "$as_me:$LINENO: checking for dnet_ntoa in -ldnet" >&5
6889 $as_echo_n "checking for dnet_ntoa in -ldnet... " >&6; }
6890 if test "${ac_cv_lib_dnet_dnet_ntoa+set}" = set; then
6891   $as_echo_n "(cached) " >&6
6892 else
6893   ac_check_lib_save_LIBS=$LIBS
6894 LIBS="-ldnet  $LIBS"
6895 cat >conftest.$ac_ext <<_ACEOF
6896 /* confdefs.h.  */
6897 _ACEOF
6898 cat confdefs.h >>conftest.$ac_ext
6899 cat >>conftest.$ac_ext <<_ACEOF
6900 /* end confdefs.h.  */
6901
6902 /* Override any GCC internal prototype to avoid an error.
6903    Use char because int might match the return type of a GCC
6904    builtin and then its argument prototype would still apply.  */
6905 #ifdef __cplusplus
6906 extern "C"
6907 #endif
6908 char dnet_ntoa ();
6909 int
6910 main ()
6911 {
6912 return dnet_ntoa ();
6913   ;
6914   return 0;
6915 }
6916 _ACEOF
6917 rm -rf conftest.$ac_objext conftest$ac_exeext
6918 if { (ac_try="$ac_link"
6919 case "(($ac_try" in
6920   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6921   *) ac_try_echo=$ac_try;;
6922 esac
6923 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
6924 $as_echo "$ac_try_echo") >&5
6925   (eval "$ac_link") 2>conftest.er1
6926   ac_status=$?
6927   grep -v '^ *+' conftest.er1 >conftest.err
6928   rm -rf conftest.er1
6929   cat conftest.err >&5
6930   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
6931   (exit $ac_status); } && {
6932          test -z "$ac_c_werror_flag" ||
6933          test ! -s conftest.err
6934        } && test -s conftest$ac_exeext && {
6935          test "$cross_compiling" = yes ||
6936          $as_test_x conftest$ac_exeext
6937        }; then
6938   ac_cv_lib_dnet_dnet_ntoa=yes
6939 else
6940   $as_echo "$as_me: failed program was:" >&5
6941 sed 's/^/| /' conftest.$ac_ext >&5
6942
6943         ac_cv_lib_dnet_dnet_ntoa=no
6944 fi
6945
6946 rm -rf conftest.dSYM
6947 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
6948       conftest$ac_exeext conftest.$ac_ext
6949 LIBS=$ac_check_lib_save_LIBS
6950 fi
6951 { $as_echo "$as_me:$LINENO: result: $ac_cv_lib_dnet_dnet_ntoa" >&5
6952 $as_echo "$ac_cv_lib_dnet_dnet_ntoa" >&6; }
6953 if test "x$ac_cv_lib_dnet_dnet_ntoa" = x""yes; then
6954   X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet"
6955 fi
6956
6957     if test $ac_cv_lib_dnet_dnet_ntoa = no; then
6958       { $as_echo "$as_me:$LINENO: checking for dnet_ntoa in -ldnet_stub" >&5
6959 $as_echo_n "checking for dnet_ntoa in -ldnet_stub... " >&6; }
6960 if test "${ac_cv_lib_dnet_stub_dnet_ntoa+set}" = set; then
6961   $as_echo_n "(cached) " >&6
6962 else
6963   ac_check_lib_save_LIBS=$LIBS
6964 LIBS="-ldnet_stub  $LIBS"
6965 cat >conftest.$ac_ext <<_ACEOF
6966 /* confdefs.h.  */
6967 _ACEOF
6968 cat confdefs.h >>conftest.$ac_ext
6969 cat >>conftest.$ac_ext <<_ACEOF
6970 /* end confdefs.h.  */
6971
6972 /* Override any GCC internal prototype to avoid an error.
6973    Use char because int might match the return type of a GCC
6974    builtin and then its argument prototype would still apply.  */
6975 #ifdef __cplusplus
6976 extern "C"
6977 #endif
6978 char dnet_ntoa ();
6979 int
6980 main ()
6981 {
6982 return dnet_ntoa ();
6983   ;
6984   return 0;
6985 }
6986 _ACEOF
6987 rm -rf conftest.$ac_objext conftest$ac_exeext
6988 if { (ac_try="$ac_link"
6989 case "(($ac_try" in
6990   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6991   *) ac_try_echo=$ac_try;;
6992 esac
6993 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
6994 $as_echo "$ac_try_echo") >&5
6995   (eval "$ac_link") 2>conftest.er1
6996   ac_status=$?
6997   grep -v '^ *+' conftest.er1 >conftest.err
6998   rm -rf conftest.er1
6999   cat conftest.err >&5
7000   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
7001   (exit $ac_status); } && {
7002          test -z "$ac_c_werror_flag" ||
7003          test ! -s conftest.err
7004        } && test -s conftest$ac_exeext && {
7005          test "$cross_compiling" = yes ||
7006          $as_test_x conftest$ac_exeext
7007        }; then
7008   ac_cv_lib_dnet_stub_dnet_ntoa=yes
7009 else
7010   $as_echo "$as_me: failed program was:" >&5
7011 sed 's/^/| /' conftest.$ac_ext >&5
7012
7013         ac_cv_lib_dnet_stub_dnet_ntoa=no
7014 fi
7015
7016 rm -rf conftest.dSYM
7017 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
7018       conftest$ac_exeext conftest.$ac_ext
7019 LIBS=$ac_check_lib_save_LIBS
7020 fi
7021 { $as_echo "$as_me:$LINENO: result: $ac_cv_lib_dnet_stub_dnet_ntoa" >&5
7022 $as_echo "$ac_cv_lib_dnet_stub_dnet_ntoa" >&6; }
7023 if test "x$ac_cv_lib_dnet_stub_dnet_ntoa" = x""yes; then
7024   X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet_stub"
7025 fi
7026
7027     fi
7028 fi
7029
7030 rm -rf conftest.dSYM
7031 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
7032       conftest$ac_exeext conftest.$ac_ext
7033     LIBS="$ac_xsave_LIBS"
7034
7035     # msh@cis.ufl.edu says -lnsl (and -lsocket) are needed for his 386/AT,
7036     # to get the SysV transport functions.
7037     # Chad R. Larson says the Pyramis MIS-ES running DC/OSx (SVR4)
7038     # needs -lnsl.
7039     # The nsl library prevents programs from opening the X display
7040     # on Irix 5.2, according to T.E. Dickey.
7041     # The functions gethostbyname, getservbyname, and inet_addr are
7042     # in -lbsd on LynxOS 3.0.1/i386, according to Lars Hecking.
7043     { $as_echo "$as_me:$LINENO: checking for gethostbyname" >&5
7044 $as_echo_n "checking for gethostbyname... " >&6; }
7045 if test "${ac_cv_func_gethostbyname+set}" = set; then
7046   $as_echo_n "(cached) " >&6
7047 else
7048   cat >conftest.$ac_ext <<_ACEOF
7049 /* confdefs.h.  */
7050 _ACEOF
7051 cat confdefs.h >>conftest.$ac_ext
7052 cat >>conftest.$ac_ext <<_ACEOF
7053 /* end confdefs.h.  */
7054 /* Define gethostbyname to an innocuous variant, in case <limits.h> declares gethostbyname.
7055    For example, HP-UX 11i <limits.h> declares gettimeofday.  */
7056 #define gethostbyname innocuous_gethostbyname
7057
7058 /* System header to define __stub macros and hopefully few prototypes,
7059     which can conflict with char gethostbyname (); below.
7060     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
7061     <limits.h> exists even on freestanding compilers.  */
7062
7063 #ifdef __STDC__
7064 # include <limits.h>
7065 #else
7066 # include <assert.h>
7067 #endif
7068
7069 #undef gethostbyname
7070
7071 /* Override any GCC internal prototype to avoid an error.
7072    Use char because int might match the return type of a GCC
7073    builtin and then its argument prototype would still apply.  */
7074 #ifdef __cplusplus
7075 extern "C"
7076 #endif
7077 char gethostbyname ();
7078 /* The GNU C library defines this for functions which it implements
7079     to always fail with ENOSYS.  Some functions are actually named
7080     something starting with __ and the normal name is an alias.  */
7081 #if defined __stub_gethostbyname || defined __stub___gethostbyname
7082 choke me
7083 #endif
7084
7085 int
7086 main ()
7087 {
7088 return gethostbyname ();
7089   ;
7090   return 0;
7091 }
7092 _ACEOF
7093 rm -rf conftest.$ac_objext conftest$ac_exeext
7094 if { (ac_try="$ac_link"
7095 case "(($ac_try" in
7096   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7097   *) ac_try_echo=$ac_try;;
7098 esac
7099 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
7100 $as_echo "$ac_try_echo") >&5
7101   (eval "$ac_link") 2>conftest.er1
7102   ac_status=$?
7103   grep -v '^ *+' conftest.er1 >conftest.err
7104   rm -rf conftest.er1
7105   cat conftest.err >&5
7106   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
7107   (exit $ac_status); } && {
7108          test -z "$ac_c_werror_flag" ||
7109          test ! -s conftest.err
7110        } && test -s conftest$ac_exeext && {
7111          test "$cross_compiling" = yes ||
7112          $as_test_x conftest$ac_exeext
7113        }; then
7114   ac_cv_func_gethostbyname=yes
7115 else
7116   $as_echo "$as_me: failed program was:" >&5
7117 sed 's/^/| /' conftest.$ac_ext >&5
7118
7119         ac_cv_func_gethostbyname=no
7120 fi
7121
7122 rm -rf conftest.dSYM
7123 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
7124       conftest$ac_exeext conftest.$ac_ext
7125 fi
7126 { $as_echo "$as_me:$LINENO: result: $ac_cv_func_gethostbyname" >&5
7127 $as_echo "$ac_cv_func_gethostbyname" >&6; }
7128
7129     if test $ac_cv_func_gethostbyname = no; then
7130       { $as_echo "$as_me:$LINENO: checking for gethostbyname in -lnsl" >&5
7131 $as_echo_n "checking for gethostbyname in -lnsl... " >&6; }
7132 if test "${ac_cv_lib_nsl_gethostbyname+set}" = set; then
7133   $as_echo_n "(cached) " >&6
7134 else
7135   ac_check_lib_save_LIBS=$LIBS
7136 LIBS="-lnsl  $LIBS"
7137 cat >conftest.$ac_ext <<_ACEOF
7138 /* confdefs.h.  */
7139 _ACEOF
7140 cat confdefs.h >>conftest.$ac_ext
7141 cat >>conftest.$ac_ext <<_ACEOF
7142 /* end confdefs.h.  */
7143
7144 /* Override any GCC internal prototype to avoid an error.
7145    Use char because int might match the return type of a GCC
7146    builtin and then its argument prototype would still apply.  */
7147 #ifdef __cplusplus
7148 extern "C"
7149 #endif
7150 char gethostbyname ();
7151 int
7152 main ()
7153 {
7154 return gethostbyname ();
7155   ;
7156   return 0;
7157 }
7158 _ACEOF
7159 rm -rf conftest.$ac_objext conftest$ac_exeext
7160 if { (ac_try="$ac_link"
7161 case "(($ac_try" in
7162   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7163   *) ac_try_echo=$ac_try;;
7164 esac
7165 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
7166 $as_echo "$ac_try_echo") >&5
7167   (eval "$ac_link") 2>conftest.er1
7168   ac_status=$?
7169   grep -v '^ *+' conftest.er1 >conftest.err
7170   rm -rf conftest.er1
7171   cat conftest.err >&5
7172   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
7173   (exit $ac_status); } && {
7174          test -z "$ac_c_werror_flag" ||
7175          test ! -s conftest.err
7176        } && test -s conftest$ac_exeext && {
7177          test "$cross_compiling" = yes ||
7178          $as_test_x conftest$ac_exeext
7179        }; then
7180   ac_cv_lib_nsl_gethostbyname=yes
7181 else
7182   $as_echo "$as_me: failed program was:" >&5
7183 sed 's/^/| /' conftest.$ac_ext >&5
7184
7185         ac_cv_lib_nsl_gethostbyname=no
7186 fi
7187
7188 rm -rf conftest.dSYM
7189 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
7190       conftest$ac_exeext conftest.$ac_ext
7191 LIBS=$ac_check_lib_save_LIBS
7192 fi
7193 { $as_echo "$as_me:$LINENO: result: $ac_cv_lib_nsl_gethostbyname" >&5
7194 $as_echo "$ac_cv_lib_nsl_gethostbyname" >&6; }
7195 if test "x$ac_cv_lib_nsl_gethostbyname" = x""yes; then
7196   X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl"
7197 fi
7198
7199       if test $ac_cv_lib_nsl_gethostbyname = no; then
7200         { $as_echo "$as_me:$LINENO: checking for gethostbyname in -lbsd" >&5
7201 $as_echo_n "checking for gethostbyname in -lbsd... " >&6; }
7202 if test "${ac_cv_lib_bsd_gethostbyname+set}" = set; then
7203   $as_echo_n "(cached) " >&6
7204 else
7205   ac_check_lib_save_LIBS=$LIBS
7206 LIBS="-lbsd  $LIBS"
7207 cat >conftest.$ac_ext <<_ACEOF
7208 /* confdefs.h.  */
7209 _ACEOF
7210 cat confdefs.h >>conftest.$ac_ext
7211 cat >>conftest.$ac_ext <<_ACEOF
7212 /* end confdefs.h.  */
7213
7214 /* Override any GCC internal prototype to avoid an error.
7215    Use char because int might match the return type of a GCC
7216    builtin and then its argument prototype would still apply.  */
7217 #ifdef __cplusplus
7218 extern "C"
7219 #endif
7220 char gethostbyname ();
7221 int
7222 main ()
7223 {
7224 return gethostbyname ();
7225   ;
7226   return 0;
7227 }
7228 _ACEOF
7229 rm -rf conftest.$ac_objext conftest$ac_exeext
7230 if { (ac_try="$ac_link"
7231 case "(($ac_try" in
7232   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7233   *) ac_try_echo=$ac_try;;
7234 esac
7235 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
7236 $as_echo "$ac_try_echo") >&5
7237   (eval "$ac_link") 2>conftest.er1
7238   ac_status=$?
7239   grep -v '^ *+' conftest.er1 >conftest.err
7240   rm -rf conftest.er1
7241   cat conftest.err >&5
7242   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
7243   (exit $ac_status); } && {
7244          test -z "$ac_c_werror_flag" ||
7245          test ! -s conftest.err
7246        } && test -s conftest$ac_exeext && {
7247          test "$cross_compiling" = yes ||
7248          $as_test_x conftest$ac_exeext
7249        }; then
7250   ac_cv_lib_bsd_gethostbyname=yes
7251 else
7252   $as_echo "$as_me: failed program was:" >&5
7253 sed 's/^/| /' conftest.$ac_ext >&5
7254
7255         ac_cv_lib_bsd_gethostbyname=no
7256 fi
7257
7258 rm -rf conftest.dSYM
7259 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
7260       conftest$ac_exeext conftest.$ac_ext
7261 LIBS=$ac_check_lib_save_LIBS
7262 fi
7263 { $as_echo "$as_me:$LINENO: result: $ac_cv_lib_bsd_gethostbyname" >&5
7264 $as_echo "$ac_cv_lib_bsd_gethostbyname" >&6; }
7265 if test "x$ac_cv_lib_bsd_gethostbyname" = x""yes; then
7266   X_EXTRA_LIBS="$X_EXTRA_LIBS -lbsd"
7267 fi
7268
7269       fi
7270     fi
7271
7272     # lieder@skyler.mavd.honeywell.com says without -lsocket,
7273     # socket/setsockopt and other routines are undefined under SCO ODT
7274     # 2.0.  But -lsocket is broken on IRIX 5.2 (and is not necessary
7275     # on later versions), says Simon Leinen: it contains gethostby*
7276     # variants that don't use the name server (or something).  -lsocket
7277     # must be given before -lnsl if both are needed.  We assume that
7278     # if connect needs -lnsl, so does gethostbyname.
7279     { $as_echo "$as_me:$LINENO: checking for connect" >&5
7280 $as_echo_n "checking for connect... " >&6; }
7281 if test "${ac_cv_func_connect+set}" = set; then
7282   $as_echo_n "(cached) " >&6
7283 else
7284   cat >conftest.$ac_ext <<_ACEOF
7285 /* confdefs.h.  */
7286 _ACEOF
7287 cat confdefs.h >>conftest.$ac_ext
7288 cat >>conftest.$ac_ext <<_ACEOF
7289 /* end confdefs.h.  */
7290 /* Define connect to an innocuous variant, in case <limits.h> declares connect.
7291    For example, HP-UX 11i <limits.h> declares gettimeofday.  */
7292 #define connect innocuous_connect
7293
7294 /* System header to define __stub macros and hopefully few prototypes,
7295     which can conflict with char connect (); below.
7296     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
7297     <limits.h> exists even on freestanding compilers.  */
7298
7299 #ifdef __STDC__
7300 # include <limits.h>
7301 #else
7302 # include <assert.h>
7303 #endif
7304
7305 #undef connect
7306
7307 /* Override any GCC internal prototype to avoid an error.
7308    Use char because int might match the return type of a GCC
7309    builtin and then its argument prototype would still apply.  */
7310 #ifdef __cplusplus
7311 extern "C"
7312 #endif
7313 char connect ();
7314 /* The GNU C library defines this for functions which it implements
7315     to always fail with ENOSYS.  Some functions are actually named
7316     something starting with __ and the normal name is an alias.  */
7317 #if defined __stub_connect || defined __stub___connect
7318 choke me
7319 #endif
7320
7321 int
7322 main ()
7323 {
7324 return connect ();
7325   ;
7326   return 0;
7327 }
7328 _ACEOF
7329 rm -rf conftest.$ac_objext conftest$ac_exeext
7330 if { (ac_try="$ac_link"
7331 case "(($ac_try" in
7332   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7333   *) ac_try_echo=$ac_try;;
7334 esac
7335 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
7336 $as_echo "$ac_try_echo") >&5
7337   (eval "$ac_link") 2>conftest.er1
7338   ac_status=$?
7339   grep -v '^ *+' conftest.er1 >conftest.err
7340   rm -rf conftest.er1
7341   cat conftest.err >&5
7342   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
7343   (exit $ac_status); } && {
7344          test -z "$ac_c_werror_flag" ||
7345          test ! -s conftest.err
7346        } && test -s conftest$ac_exeext && {
7347          test "$cross_compiling" = yes ||
7348          $as_test_x conftest$ac_exeext
7349        }; then
7350   ac_cv_func_connect=yes
7351 else
7352   $as_echo "$as_me: failed program was:" >&5
7353 sed 's/^/| /' conftest.$ac_ext >&5
7354
7355         ac_cv_func_connect=no
7356 fi
7357
7358 rm -rf conftest.dSYM
7359 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
7360       conftest$ac_exeext conftest.$ac_ext
7361 fi
7362 { $as_echo "$as_me:$LINENO: result: $ac_cv_func_connect" >&5
7363 $as_echo "$ac_cv_func_connect" >&6; }
7364
7365     if test $ac_cv_func_connect = no; then
7366       { $as_echo "$as_me:$LINENO: checking for connect in -lsocket" >&5
7367 $as_echo_n "checking for connect in -lsocket... " >&6; }
7368 if test "${ac_cv_lib_socket_connect+set}" = set; then
7369   $as_echo_n "(cached) " >&6
7370 else
7371   ac_check_lib_save_LIBS=$LIBS
7372 LIBS="-lsocket $X_EXTRA_LIBS $LIBS"
7373 cat >conftest.$ac_ext <<_ACEOF
7374 /* confdefs.h.  */
7375 _ACEOF
7376 cat confdefs.h >>conftest.$ac_ext
7377 cat >>conftest.$ac_ext <<_ACEOF
7378 /* end confdefs.h.  */
7379
7380 /* Override any GCC internal prototype to avoid an error.
7381    Use char because int might match the return type of a GCC
7382    builtin and then its argument prototype would still apply.  */
7383 #ifdef __cplusplus
7384 extern "C"
7385 #endif
7386 char connect ();
7387 int
7388 main ()
7389 {
7390 return connect ();
7391   ;
7392   return 0;
7393 }
7394 _ACEOF
7395 rm -rf conftest.$ac_objext conftest$ac_exeext
7396 if { (ac_try="$ac_link"
7397 case "(($ac_try" in
7398   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7399   *) ac_try_echo=$ac_try;;
7400 esac
7401 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
7402 $as_echo "$ac_try_echo") >&5
7403   (eval "$ac_link") 2>conftest.er1
7404   ac_status=$?
7405   grep -v '^ *+' conftest.er1 >conftest.err
7406   rm -rf conftest.er1
7407   cat conftest.err >&5
7408   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
7409   (exit $ac_status); } && {
7410          test -z "$ac_c_werror_flag" ||
7411          test ! -s conftest.err
7412        } && test -s conftest$ac_exeext && {
7413          test "$cross_compiling" = yes ||
7414          $as_test_x conftest$ac_exeext
7415        }; then
7416   ac_cv_lib_socket_connect=yes
7417 else
7418   $as_echo "$as_me: failed program was:" >&5
7419 sed 's/^/| /' conftest.$ac_ext >&5
7420
7421         ac_cv_lib_socket_connect=no
7422 fi
7423
7424 rm -rf conftest.dSYM
7425 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
7426       conftest$ac_exeext conftest.$ac_ext
7427 LIBS=$ac_check_lib_save_LIBS
7428 fi
7429 { $as_echo "$as_me:$LINENO: result: $ac_cv_lib_socket_connect" >&5
7430 $as_echo "$ac_cv_lib_socket_connect" >&6; }
7431 if test "x$ac_cv_lib_socket_connect" = x""yes; then
7432   X_EXTRA_LIBS="-lsocket $X_EXTRA_LIBS"
7433 fi
7434
7435     fi
7436
7437     # Guillermo Gomez says -lposix is necessary on A/UX.
7438     { $as_echo "$as_me:$LINENO: checking for remove" >&5
7439 $as_echo_n "checking for remove... " >&6; }
7440 if test "${ac_cv_func_remove+set}" = set; then
7441   $as_echo_n "(cached) " >&6
7442 else
7443   cat >conftest.$ac_ext <<_ACEOF
7444 /* confdefs.h.  */
7445 _ACEOF
7446 cat confdefs.h >>conftest.$ac_ext
7447 cat >>conftest.$ac_ext <<_ACEOF
7448 /* end confdefs.h.  */
7449 /* Define remove to an innocuous variant, in case <limits.h> declares remove.
7450    For example, HP-UX 11i <limits.h> declares gettimeofday.  */
7451 #define remove innocuous_remove
7452
7453 /* System header to define __stub macros and hopefully few prototypes,
7454     which can conflict with char remove (); below.
7455     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
7456     <limits.h> exists even on freestanding compilers.  */
7457
7458 #ifdef __STDC__
7459 # include <limits.h>
7460 #else
7461 # include <assert.h>
7462 #endif
7463
7464 #undef remove
7465
7466 /* Override any GCC internal prototype to avoid an error.
7467    Use char because int might match the return type of a GCC
7468    builtin and then its argument prototype would still apply.  */
7469 #ifdef __cplusplus
7470 extern "C"
7471 #endif
7472 char remove ();
7473 /* The GNU C library defines this for functions which it implements
7474     to always fail with ENOSYS.  Some functions are actually named
7475     something starting with __ and the normal name is an alias.  */
7476 #if defined __stub_remove || defined __stub___remove
7477 choke me
7478 #endif
7479
7480 int
7481 main ()
7482 {
7483 return remove ();
7484   ;
7485   return 0;
7486 }
7487 _ACEOF
7488 rm -rf conftest.$ac_objext conftest$ac_exeext
7489 if { (ac_try="$ac_link"
7490 case "(($ac_try" in
7491   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7492   *) ac_try_echo=$ac_try;;
7493 esac
7494 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
7495 $as_echo "$ac_try_echo") >&5
7496   (eval "$ac_link") 2>conftest.er1
7497   ac_status=$?
7498   grep -v '^ *+' conftest.er1 >conftest.err
7499   rm -rf conftest.er1
7500   cat conftest.err >&5
7501   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
7502   (exit $ac_status); } && {
7503          test -z "$ac_c_werror_flag" ||
7504          test ! -s conftest.err
7505        } && test -s conftest$ac_exeext && {
7506          test "$cross_compiling" = yes ||
7507          $as_test_x conftest$ac_exeext
7508        }; then
7509   ac_cv_func_remove=yes
7510 else
7511   $as_echo "$as_me: failed program was:" >&5
7512 sed 's/^/| /' conftest.$ac_ext >&5
7513
7514         ac_cv_func_remove=no
7515 fi
7516
7517 rm -rf conftest.dSYM
7518 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
7519       conftest$ac_exeext conftest.$ac_ext
7520 fi
7521 { $as_echo "$as_me:$LINENO: result: $ac_cv_func_remove" >&5
7522 $as_echo "$ac_cv_func_remove" >&6; }
7523
7524     if test $ac_cv_func_remove = no; then
7525       { $as_echo "$as_me:$LINENO: checking for remove in -lposix" >&5
7526 $as_echo_n "checking for remove in -lposix... " >&6; }
7527 if test "${ac_cv_lib_posix_remove+set}" = set; then
7528   $as_echo_n "(cached) " >&6
7529 else
7530   ac_check_lib_save_LIBS=$LIBS
7531 LIBS="-lposix  $LIBS"
7532 cat >conftest.$ac_ext <<_ACEOF
7533 /* confdefs.h.  */
7534 _ACEOF
7535 cat confdefs.h >>conftest.$ac_ext
7536 cat >>conftest.$ac_ext <<_ACEOF
7537 /* end confdefs.h.  */
7538
7539 /* Override any GCC internal prototype to avoid an error.
7540    Use char because int might match the return type of a GCC
7541    builtin and then its argument prototype would still apply.  */
7542 #ifdef __cplusplus
7543 extern "C"
7544 #endif
7545 char remove ();
7546 int
7547 main ()
7548 {
7549 return remove ();
7550   ;
7551   return 0;
7552 }
7553 _ACEOF
7554 rm -rf conftest.$ac_objext conftest$ac_exeext
7555 if { (ac_try="$ac_link"
7556 case "(($ac_try" in
7557   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7558   *) ac_try_echo=$ac_try;;
7559 esac
7560 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
7561 $as_echo "$ac_try_echo") >&5
7562   (eval "$ac_link") 2>conftest.er1
7563   ac_status=$?
7564   grep -v '^ *+' conftest.er1 >conftest.err
7565   rm -rf conftest.er1
7566   cat conftest.err >&5
7567   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
7568   (exit $ac_status); } && {
7569          test -z "$ac_c_werror_flag" ||
7570          test ! -s conftest.err
7571        } && test -s conftest$ac_exeext && {
7572          test "$cross_compiling" = yes ||
7573          $as_test_x conftest$ac_exeext
7574        }; then
7575   ac_cv_lib_posix_remove=yes
7576 else
7577   $as_echo "$as_me: failed program was:" >&5
7578 sed 's/^/| /' conftest.$ac_ext >&5
7579
7580         ac_cv_lib_posix_remove=no
7581 fi
7582
7583 rm -rf conftest.dSYM
7584 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
7585       conftest$ac_exeext conftest.$ac_ext
7586 LIBS=$ac_check_lib_save_LIBS
7587 fi
7588 { $as_echo "$as_me:$LINENO: result: $ac_cv_lib_posix_remove" >&5
7589 $as_echo "$ac_cv_lib_posix_remove" >&6; }
7590 if test "x$ac_cv_lib_posix_remove" = x""yes; then
7591   X_EXTRA_LIBS="$X_EXTRA_LIBS -lposix"
7592 fi
7593
7594     fi
7595
7596     # BSDI BSD/OS 2.1 needs -lipc for XOpenDisplay.
7597     { $as_echo "$as_me:$LINENO: checking for shmat" >&5
7598 $as_echo_n "checking for shmat... " >&6; }
7599 if test "${ac_cv_func_shmat+set}" = set; then
7600   $as_echo_n "(cached) " >&6
7601 else
7602   cat >conftest.$ac_ext <<_ACEOF
7603 /* confdefs.h.  */
7604 _ACEOF
7605 cat confdefs.h >>conftest.$ac_ext
7606 cat >>conftest.$ac_ext <<_ACEOF
7607 /* end confdefs.h.  */
7608 /* Define shmat to an innocuous variant, in case <limits.h> declares shmat.
7609    For example, HP-UX 11i <limits.h> declares gettimeofday.  */
7610 #define shmat innocuous_shmat
7611
7612 /* System header to define __stub macros and hopefully few prototypes,
7613     which can conflict with char shmat (); below.
7614     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
7615     <limits.h> exists even on freestanding compilers.  */
7616
7617 #ifdef __STDC__
7618 # include <limits.h>
7619 #else
7620 # include <assert.h>
7621 #endif
7622
7623 #undef shmat
7624
7625 /* Override any GCC internal prototype to avoid an error.
7626    Use char because int might match the return type of a GCC
7627    builtin and then its argument prototype would still apply.  */
7628 #ifdef __cplusplus
7629 extern "C"
7630 #endif
7631 char shmat ();
7632 /* The GNU C library defines this for functions which it implements
7633     to always fail with ENOSYS.  Some functions are actually named
7634     something starting with __ and the normal name is an alias.  */
7635 #if defined __stub_shmat || defined __stub___shmat
7636 choke me
7637 #endif
7638
7639 int
7640 main ()
7641 {
7642 return shmat ();
7643   ;
7644   return 0;
7645 }
7646 _ACEOF
7647 rm -rf conftest.$ac_objext conftest$ac_exeext
7648 if { (ac_try="$ac_link"
7649 case "(($ac_try" in
7650   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7651   *) ac_try_echo=$ac_try;;
7652 esac
7653 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
7654 $as_echo "$ac_try_echo") >&5
7655   (eval "$ac_link") 2>conftest.er1
7656   ac_status=$?
7657   grep -v '^ *+' conftest.er1 >conftest.err
7658   rm -rf conftest.er1
7659   cat conftest.err >&5
7660   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
7661   (exit $ac_status); } && {
7662          test -z "$ac_c_werror_flag" ||
7663          test ! -s conftest.err
7664        } && test -s conftest$ac_exeext && {
7665          test "$cross_compiling" = yes ||
7666          $as_test_x conftest$ac_exeext
7667        }; then
7668   ac_cv_func_shmat=yes
7669 else
7670   $as_echo "$as_me: failed program was:" >&5
7671 sed 's/^/| /' conftest.$ac_ext >&5
7672
7673         ac_cv_func_shmat=no
7674 fi
7675
7676 rm -rf conftest.dSYM
7677 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
7678       conftest$ac_exeext conftest.$ac_ext
7679 fi
7680 { $as_echo "$as_me:$LINENO: result: $ac_cv_func_shmat" >&5
7681 $as_echo "$ac_cv_func_shmat" >&6; }
7682
7683     if test $ac_cv_func_shmat = no; then
7684       { $as_echo "$as_me:$LINENO: checking for shmat in -lipc" >&5
7685 $as_echo_n "checking for shmat in -lipc... " >&6; }
7686 if test "${ac_cv_lib_ipc_shmat+set}" = set; then
7687   $as_echo_n "(cached) " >&6
7688 else
7689   ac_check_lib_save_LIBS=$LIBS
7690 LIBS="-lipc  $LIBS"
7691 cat >conftest.$ac_ext <<_ACEOF
7692 /* confdefs.h.  */
7693 _ACEOF
7694 cat confdefs.h >>conftest.$ac_ext
7695 cat >>conftest.$ac_ext <<_ACEOF
7696 /* end confdefs.h.  */
7697
7698 /* Override any GCC internal prototype to avoid an error.
7699    Use char because int might match the return type of a GCC
7700    builtin and then its argument prototype would still apply.  */
7701 #ifdef __cplusplus
7702 extern "C"
7703 #endif
7704 char shmat ();
7705 int
7706 main ()
7707 {
7708 return shmat ();
7709   ;
7710   return 0;
7711 }
7712 _ACEOF
7713 rm -rf conftest.$ac_objext conftest$ac_exeext
7714 if { (ac_try="$ac_link"
7715 case "(($ac_try" in
7716   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7717   *) ac_try_echo=$ac_try;;
7718 esac
7719 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
7720 $as_echo "$ac_try_echo") >&5
7721   (eval "$ac_link") 2>conftest.er1
7722   ac_status=$?
7723   grep -v '^ *+' conftest.er1 >conftest.err
7724   rm -rf conftest.er1
7725   cat conftest.err >&5
7726   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
7727   (exit $ac_status); } && {
7728          test -z "$ac_c_werror_flag" ||
7729          test ! -s conftest.err
7730        } && test -s conftest$ac_exeext && {
7731          test "$cross_compiling" = yes ||
7732          $as_test_x conftest$ac_exeext
7733        }; then
7734   ac_cv_lib_ipc_shmat=yes
7735 else
7736   $as_echo "$as_me: failed program was:" >&5
7737 sed 's/^/| /' conftest.$ac_ext >&5
7738
7739         ac_cv_lib_ipc_shmat=no
7740 fi
7741
7742 rm -rf conftest.dSYM
7743 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
7744       conftest$ac_exeext conftest.$ac_ext
7745 LIBS=$ac_check_lib_save_LIBS
7746 fi
7747 { $as_echo "$as_me:$LINENO: result: $ac_cv_lib_ipc_shmat" >&5
7748 $as_echo "$ac_cv_lib_ipc_shmat" >&6; }
7749 if test "x$ac_cv_lib_ipc_shmat" = x""yes; then
7750   X_EXTRA_LIBS="$X_EXTRA_LIBS -lipc"
7751 fi
7752
7753     fi
7754   fi
7755
7756   # Check for libraries that X11R6 Xt/Xaw programs need.
7757   ac_save_LDFLAGS=$LDFLAGS
7758   test -n "$x_libraries" && LDFLAGS="$LDFLAGS -L$x_libraries"
7759   # SM needs ICE to (dynamically) link under SunOS 4.x (so we have to
7760   # check for ICE first), but we must link in the order -lSM -lICE or
7761   # we get undefined symbols.  So assume we have SM if we have ICE.
7762   # These have to be linked with before -lX11, unlike the other
7763   # libraries we check for below, so use a different variable.
7764   # John Interrante, Karl Berry
7765   { $as_echo "$as_me:$LINENO: checking for IceConnectionNumber in -lICE" >&5
7766 $as_echo_n "checking for IceConnectionNumber in -lICE... " >&6; }
7767 if test "${ac_cv_lib_ICE_IceConnectionNumber+set}" = set; then
7768   $as_echo_n "(cached) " >&6
7769 else
7770   ac_check_lib_save_LIBS=$LIBS
7771 LIBS="-lICE $X_EXTRA_LIBS $LIBS"
7772 cat >conftest.$ac_ext <<_ACEOF
7773 /* confdefs.h.  */
7774 _ACEOF
7775 cat confdefs.h >>conftest.$ac_ext
7776 cat >>conftest.$ac_ext <<_ACEOF
7777 /* end confdefs.h.  */
7778
7779 /* Override any GCC internal prototype to avoid an error.
7780    Use char because int might match the return type of a GCC
7781    builtin and then its argument prototype would still apply.  */
7782 #ifdef __cplusplus
7783 extern "C"
7784 #endif
7785 char IceConnectionNumber ();
7786 int
7787 main ()
7788 {
7789 return IceConnectionNumber ();
7790   ;
7791   return 0;
7792 }
7793 _ACEOF
7794 rm -rf conftest.$ac_objext conftest$ac_exeext
7795 if { (ac_try="$ac_link"
7796 case "(($ac_try" in
7797   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7798   *) ac_try_echo=$ac_try;;
7799 esac
7800 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
7801 $as_echo "$ac_try_echo") >&5
7802   (eval "$ac_link") 2>conftest.er1
7803   ac_status=$?
7804   grep -v '^ *+' conftest.er1 >conftest.err
7805   rm -rf conftest.er1
7806   cat conftest.err >&5
7807   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
7808   (exit $ac_status); } && {
7809          test -z "$ac_c_werror_flag" ||
7810          test ! -s conftest.err
7811        } && test -s conftest$ac_exeext && {
7812          test "$cross_compiling" = yes ||
7813          $as_test_x conftest$ac_exeext
7814        }; then
7815   ac_cv_lib_ICE_IceConnectionNumber=yes
7816 else
7817   $as_echo "$as_me: failed program was:" >&5
7818 sed 's/^/| /' conftest.$ac_ext >&5
7819
7820         ac_cv_lib_ICE_IceConnectionNumber=no
7821 fi
7822
7823 rm -rf conftest.dSYM
7824 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
7825       conftest$ac_exeext conftest.$ac_ext
7826 LIBS=$ac_check_lib_save_LIBS
7827 fi
7828 { $as_echo "$as_me:$LINENO: result: $ac_cv_lib_ICE_IceConnectionNumber" >&5
7829 $as_echo "$ac_cv_lib_ICE_IceConnectionNumber" >&6; }
7830 if test "x$ac_cv_lib_ICE_IceConnectionNumber" = x""yes; then
7831   X_PRE_LIBS="$X_PRE_LIBS -lSM -lICE"
7832 fi
7833
7834   LDFLAGS=$ac_save_LDFLAGS
7835
7836 fi
7837
7838
7839 if test "$have_x" != yes; then
7840   { { $as_echo "$as_me:$LINENO: error: Couldn't find X11 headers/libs.  Try \`$0 --help'." >&5
7841 $as_echo "$as_me: error: Couldn't find X11 headers/libs.  Try \`$0 --help'." >&2;}
7842    { (exit 1); exit 1; }; }
7843 fi
7844
7845
7846     { $as_echo "$as_me:$LINENO: checking for X app-defaults directory" >&5
7847 $as_echo_n "checking for X app-defaults directory... " >&6; }
7848 if test "${ac_cv_x_app_defaults+set}" = set; then
7849   $as_echo_n "(cached) " >&6
7850 else
7851
7852   rm -fr conftestdir
7853   if mkdir conftestdir; then
7854     cd conftestdir 2>/dev/null
7855     # Make sure to not put "make" in the Imakefile rules, since we grep it out.
7856     cat > Imakefile <<'EOF'
7857 acfindx:
7858         @echo 'ac_x_app_defaults="${XAPPLOADDIR}"'
7859 EOF
7860     if (xmkmf) >/dev/null 2>&1 && test -f Makefile; then
7861       # GNU make sometimes prints "make[1]: Entering...", which'd confuse us.
7862       eval `${MAKE-make} acfindx 2>/dev/null | grep -v make`
7863     fi
7864     cd .. 2>/dev/null
7865     rm -fr conftestdir
7866   fi
7867       if test x"$ac_x_app_defaults" = x; then
7868
7869   # Look for the directory under a standard set of common directories.
7870   # Check X11 before X11Rn because it's often a symlink to the current release.
7871   for ac_dir in                                 \
7872     /usr/X11/lib/app-defaults                   \
7873     /usr/X11R6/lib/app-defaults                 \
7874     /usr/X11R6/lib/X11/app-defaults             \
7875     /usr/X11R5/lib/app-defaults                 \
7876     /usr/X11R5/lib/X11/app-defaults             \
7877     /usr/X11R4/lib/app-defaults                 \
7878     /usr/X11R4/lib/X11/app-defaults             \
7879                                                 \
7880     /usr/lib/X11/app-defaults                   \
7881     /usr/lib/X11R6/app-defaults                 \
7882     /usr/lib/X11R5/app-defaults                 \
7883     /usr/lib/X11R4/app-defaults                 \
7884                                                 \
7885     /usr/local/X11/lib/app-defaults             \
7886     /usr/local/X11R6/lib/app-defaults           \
7887     /usr/local/X11R5/lib/app-defaults           \
7888     /usr/local/X11R4/lib/app-defaults           \
7889                                                 \
7890     /usr/local/lib/X11/app-defaults             \
7891     /usr/local/lib/X11R6/app-defaults           \
7892     /usr/local/lib/X11R6/X11/app-defaults       \
7893     /usr/local/lib/X11R5/app-defaults           \
7894     /usr/local/lib/X11R5/X11/app-defaults       \
7895     /usr/local/lib/X11R4/app-defaults           \
7896     /usr/local/lib/X11R4/X11/app-defaults       \
7897                                                 \
7898     /usr/X386/lib/X11/app-defaults              \
7899     /usr/x386/lib/X11/app-defaults              \
7900     /usr/XFree86/lib/X11/app-defaults           \
7901                                                 \
7902     /usr/lib/X11/app-defaults                   \
7903     /usr/local/lib/X11/app-defaults             \
7904     /usr/unsupported/lib/X11/app-defaults       \
7905     /usr/athena/lib/X11/app-defaults            \
7906     /usr/local/x11r5/lib/X11/app-defaults       \
7907     /usr/lpp/Xamples/lib/X11/app-defaults       \
7908     /lib/usr/lib/X11/app-defaults               \
7909                                                 \
7910     /usr/openwin/lib/app-defaults               \
7911     /usr/openwin/lib/X11/app-defaults           \
7912     /usr/openwin/share/lib/app-defaults         \
7913     /usr/openwin/share/lib/X11/app-defaults     \
7914                                                 \
7915     /X11R6/lib/app-defaults                     \
7916     /X11R5/lib/app-defaults                     \
7917     /X11R4/lib/app-defaults                     \
7918     ; \
7919   do
7920     if test -d "$ac_dir"; then
7921       ac_x_app_defaults=$ac_dir
7922       break
7923     fi
7924   done
7925
7926       fi
7927       if test x"$ac_x_app_defaults" = x; then
7928         ac_cv_x_app_defaults="/usr/lib/X11/app-defaults"
7929       else
7930         # Record where we found app-defaults for the cache.
7931         ac_cv_x_app_defaults="$ac_x_app_defaults"
7932       fi
7933 fi
7934 { $as_echo "$as_me:$LINENO: result: $ac_cv_x_app_defaults" >&5
7935 $as_echo "$ac_cv_x_app_defaults" >&6; }
7936     eval ac_x_app_defaults="$ac_cv_x_app_defaults"
7937 case "$host" in
7938     *-hpux*)
7939
7940       # The following arcana was gleaned from conversations with
7941       # Eric Schwartz <erics@col.hp.com>:
7942       #
7943       # On HPUX 10.x, the parts of X that HP considers "standard" live in
7944       # /usr/{include,lib}/X11R6/.  The parts that HP doesn't consider
7945       # "standard", notably, Xaw and Xmu, live in /usr/contrib/X11R6/.
7946       # Yet /usr/contrib/X11R6/ comes preinstalled on all HPUX systems.
7947       # Also, there are symlinks from /usr/include/ and /usr/lib/ into
7948       # /usr/{include,lib}/X11R6/, so that (if you don't use Xmu at all)
7949       # you don't need any -I or -L arguments.
7950       #
7951       # On HPUX 9.x, /usr/{include,lib}/X11R5/ and /usr/contrib/X11R5/
7952       # are the same division as 10.x.  However, there are no symlinks to
7953       # the X stuff from /usr/include/ and /usr/lib/, so -I and -L
7954       # arguments are always necessary.
7955       #
7956       # However, X11R6 was available on HPUX 9.x as a patch: if that
7957       # patch was installed, then all of X11R6 went in to
7958       # /usr/contrib/X11R6/ (there was no /usr/{include,lib}/X11R6/.)
7959       #
7960       # HPUX 8.x was the same as 9.x, but was X11R4 instead (I don't know
7961       # whether R5 was available as a patch; R6 undoubtedly was not.)
7962       #
7963       # So.  We try and use the highest numbered pair of
7964       # /usr/{include,lib}/X11R?/ and /usr/contrib/X11R?/{include,lib}/
7965       # that are available.  We do not mix and match different versions
7966       # of X.
7967       #
7968       # Question I still don't know the answer to: (do you?)
7969       #
7970       #   * On HPUX 9.x, where /usr/include/X11R5/ was standard, and
7971       #     /usr/contrib/X11R6/ could be installed as a patch, what was in
7972       #     that contrib directory?  Did it contain so-called "standard"
7973       #     X11R6, or did it include Xaw and Xmu as well?  If the former,
7974       #     where did one find Xaw and Xmu on 9.x R6 systems?  Would this
7975       #     be a situation where one had to reach into the R5 headers and
7976       #     libs to find Xmu?  That is, must both R6 and R5 directories
7977       #     be on the -I and -L lists in that case?
7978       #
7979       for version in X11R6 X11R5 X11R4 ; do
7980         # if either pair of directories exists...
7981         if test -d /usr/include/$version || test -d /usr/contrib/$version/include
7982         then
7983            # if contrib exists, use it...
7984            if test -d /usr/contrib/$version/include ; then
7985              X_CFLAGS="$X_CFLAGS -I/usr/contrib/$version/include"
7986              X_LIBS="$X_LIBS -L/usr/contrib/$version/lib"
7987            fi
7988            # if the "standard" one exists, use it.
7989            if test -d /usr/include/$version ; then
7990              X_CFLAGS="$X_CFLAGS -I/usr/include/$version"
7991              X_LIBS="$X_LIBS -L/usr/lib/$version"
7992            fi
7993            # since at least one of the pair exists, go no farther.
7994            break
7995         fi
7996       done
7997
7998       # Now find Motif.  Thanks for not making xmkmf find this by
7999       # default, you losers.
8000       #
8001       if test -d /usr/include/Motif2.1 ; then
8002         X_CFLAGS="$X_CFLAGS -I/usr/include/Motif2.1"
8003         X_LIBS="$X_LIBS -L/usr/lib/Motif2.1"
8004       elif test -d /usr/include/Motif1.2 ; then
8005         X_CFLAGS="$X_CFLAGS -I/usr/include/Motif1.2"
8006         X_LIBS="$X_LIBS -L/usr/lib/Motif1.2"
8007       elif test -d /usr/include/Motif1.1 ; then
8008         X_CFLAGS="$X_CFLAGS -I/usr/include/Motif1.1"
8009         X_LIBS="$X_LIBS -L/usr/lib/Motif1.1"
8010       fi
8011
8012       # Now let's check for the pseudo-standard locations for OpenGL and XPM.
8013       #
8014       if test -d /opt/graphics/OpenGL/include ; then
8015         # HP-UX 10.20 puts it here
8016         X_CFLAGS="-I/opt/graphics/OpenGL/include $X_CFLAGS"
8017         X_LIBS="-L/opt/graphics/OpenGL/lib $X_LIBS"
8018       elif test -d /opt/Mesa/lib ; then
8019         X_CFLAGS="-I/opt/Mesa/include $X_CFLAGS"
8020         X_LIBS="-L/opt/Mesa/lib $X_LIBS"
8021       fi
8022
8023
8024       if test -d /opt/xpm/lib/X11 ; then
8025         X_CFLAGS="-I/opt/xpm/include $X_CFLAGS"
8026         X_LIBS="-L/opt/xpm/lib/X11 $X_LIBS"
8027       fi
8028
8029       # On HPUX, default to installing in /opt/xscreensaver/ instead of
8030       # in /usr/local/, unless there is already an xscreensaver in
8031       # /usr/local/bin/.  This can be overridden with the --prefix arg
8032       # to configure.  I'm not sure this is the right thing to do, but
8033       # Richard Lloyd says so...
8034       #
8035       if test \! -x /usr/local/bin/xscreensaver ; then
8036         ac_default_prefix=/opt/xscreensaver
8037       fi
8038
8039     ;;
8040     *-solaris*)
8041
8042       # Thanks for not making xmkmf find this by default, pinheads.
8043       # And thanks for moving things around again, too.  Is this
8044       # really the standard location now?  What happened to the
8045       # joke that this kind of thing went in /opt?
8046       # cthomp says "answer: CDE (Common Disorganized Environment)"
8047       #
8048       if test -f /usr/dt/include/Xm/Xm.h ; then
8049         X_CFLAGS="$X_CFLAGS -I/usr/dt/include"
8050         MOTIF_LIBS="$MOTIF_LIBS -L/usr/dt/lib -R/usr/dt/lib"
8051
8052         # Some versions of Slowlaris Motif require -lgen.  But not all.  Why?
8053         { $as_echo "$as_me:$LINENO: checking for regcmp in -lgen" >&5
8054 $as_echo_n "checking for regcmp in -lgen... " >&6; }
8055 if test "${ac_cv_lib_gen_regcmp+set}" = set; then
8056   $as_echo_n "(cached) " >&6
8057 else
8058   ac_check_lib_save_LIBS=$LIBS
8059 LIBS="-lgen  $LIBS"
8060 cat >conftest.$ac_ext <<_ACEOF
8061 /* confdefs.h.  */
8062 _ACEOF
8063 cat confdefs.h >>conftest.$ac_ext
8064 cat >>conftest.$ac_ext <<_ACEOF
8065 /* end confdefs.h.  */
8066
8067 /* Override any GCC internal prototype to avoid an error.
8068    Use char because int might match the return type of a GCC
8069    builtin and then its argument prototype would still apply.  */
8070 #ifdef __cplusplus
8071 extern "C"
8072 #endif
8073 char regcmp ();
8074 int
8075 main ()
8076 {
8077 return regcmp ();
8078   ;
8079   return 0;
8080 }
8081 _ACEOF
8082 rm -rf conftest.$ac_objext conftest$ac_exeext
8083 if { (ac_try="$ac_link"
8084 case "(($ac_try" in
8085   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8086   *) ac_try_echo=$ac_try;;
8087 esac
8088 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
8089 $as_echo "$ac_try_echo") >&5
8090   (eval "$ac_link") 2>conftest.er1
8091   ac_status=$?
8092   grep -v '^ *+' conftest.er1 >conftest.err
8093   rm -rf conftest.er1
8094   cat conftest.err >&5
8095   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
8096   (exit $ac_status); } && {
8097          test -z "$ac_c_werror_flag" ||
8098          test ! -s conftest.err
8099        } && test -s conftest$ac_exeext && {
8100          test "$cross_compiling" = yes ||
8101          $as_test_x conftest$ac_exeext
8102        }; then
8103   ac_cv_lib_gen_regcmp=yes
8104 else
8105   $as_echo "$as_me: failed program was:" >&5
8106 sed 's/^/| /' conftest.$ac_ext >&5
8107
8108         ac_cv_lib_gen_regcmp=no
8109 fi
8110
8111 rm -rf conftest.dSYM
8112 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
8113       conftest$ac_exeext conftest.$ac_ext
8114 LIBS=$ac_check_lib_save_LIBS
8115 fi
8116 { $as_echo "$as_me:$LINENO: result: $ac_cv_lib_gen_regcmp" >&5
8117 $as_echo "$ac_cv_lib_gen_regcmp" >&6; }
8118 if test "x$ac_cv_lib_gen_regcmp" = x""yes; then
8119   MOTIF_LIBS="$MOTIF_LIBS -lgen"
8120 fi
8121
8122       fi
8123
8124     ;;
8125     *-darwin*)
8126
8127       # On MacOS X (10.x with "fink"), many things are under /sw/.
8128       #
8129       if test -d /sw/include ; then
8130         X_CFLAGS="-I/sw/include $X_CFLAGS"
8131         X_LIBS="-L/sw/lib $X_LIBS"
8132       fi
8133     ;;
8134   esac
8135 { $as_echo "$as_me:$LINENO: checking for XPointer" >&5
8136 $as_echo_n "checking for XPointer... " >&6; }
8137 if test "${ac_cv_xpointer+set}" = set; then
8138   $as_echo_n "(cached) " >&6
8139 else
8140
8141   ac_save_CPPFLAGS="$CPPFLAGS"
8142   if test \! -z "$includedir" ; then
8143     CPPFLAGS="$CPPFLAGS -I$includedir"
8144   fi
8145   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
8146   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
8147   cat >conftest.$ac_ext <<_ACEOF
8148 /* confdefs.h.  */
8149 _ACEOF
8150 cat confdefs.h >>conftest.$ac_ext
8151 cat >>conftest.$ac_ext <<_ACEOF
8152 /* end confdefs.h.  */
8153 #include <X11/Xlib.h>
8154 int
8155 main ()
8156 {
8157 XPointer foo = (XPointer) 0;
8158   ;
8159   return 0;
8160 }
8161 _ACEOF
8162 rm -rf conftest.$ac_objext
8163 if { (ac_try="$ac_compile"
8164 case "(($ac_try" in
8165   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8166   *) ac_try_echo=$ac_try;;
8167 esac
8168 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
8169 $as_echo "$ac_try_echo") >&5
8170   (eval "$ac_compile") 2>conftest.er1
8171   ac_status=$?
8172   grep -v '^ *+' conftest.er1 >conftest.err
8173   rm -rf conftest.er1
8174   cat conftest.err >&5
8175   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
8176   (exit $ac_status); } && {
8177          test -z "$ac_c_werror_flag" ||
8178          test ! -s conftest.err
8179        } && test -s conftest.$ac_objext; then
8180   ac_cv_xpointer=yes
8181 else
8182   $as_echo "$as_me: failed program was:" >&5
8183 sed 's/^/| /' conftest.$ac_ext >&5
8184
8185         ac_cv_xpointer=no
8186 fi
8187
8188 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
8189   CPPFLAGS="$ac_save_CPPFLAGS"
8190 fi
8191 { $as_echo "$as_me:$LINENO: result: $ac_cv_xpointer" >&5
8192 $as_echo "$ac_cv_xpointer" >&6; }
8193   if test "$ac_cv_xpointer" != yes; then
8194    cat >>confdefs.h <<\_ACEOF
8195 #define XPointer char*
8196 _ACEOF
8197
8198   fi
8199
8200 { $as_echo "$as_me:$LINENO: checking whether this is MacOS X" >&5
8201 $as_echo_n "checking whether this is MacOS X... " >&6; }
8202   ac_macosx=no
8203   case "$host" in
8204     *-apple-darwin* )
8205       ac_macosx=yes
8206     ;;
8207   esac
8208 { $as_echo "$as_me:$LINENO: result: $ac_macosx" >&5
8209 $as_echo "$ac_macosx" >&6; }
8210
8211
8212 ###############################################################################
8213 #
8214 #       Gettext support
8215 #
8216 ###############################################################################
8217
8218
8219
8220 if test -n ""; then
8221     { $as_echo "$as_me:$LINENO: checking for intltool >= " >&5
8222 $as_echo_n "checking for intltool >= ... " >&6; }
8223
8224     INTLTOOL_REQUIRED_VERSION_AS_INT=`echo  | awk -F. '{ printf "%d", $1 * 100 + $2; }'`
8225     INTLTOOL_APPLIED_VERSION=`awk -F\" '/\\$VERSION / { printf $2; }'  < intltool-update.in`
8226
8227     INTLTOOL_APPLIED_VERSION_AS_INT=`awk -F\" '/\\$VERSION / { split($2, VERSION, "."); printf "%d\n", VERSION[1] * 100 + VERSION[2];}' < intltool-update.in`
8228
8229
8230     if test "$INTLTOOL_APPLIED_VERSION_AS_INT" -ge "$INTLTOOL_REQUIRED_VERSION_AS_INT"; then
8231         { $as_echo "$as_me:$LINENO: result: $INTLTOOL_APPLIED_VERSION found" >&5
8232 $as_echo "$INTLTOOL_APPLIED_VERSION found" >&6; }
8233     else
8234         { $as_echo "$as_me:$LINENO: result: $INTLTOOL_APPLIED_VERSION found. Your intltool is too old.  You need intltool  or later." >&5
8235 $as_echo "$INTLTOOL_APPLIED_VERSION found. Your intltool is too old.  You need intltool  or later." >&6; }
8236         exit 1
8237     fi
8238 fi
8239
8240   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'
8241 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'
8242      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'
8243       INTLTOOL_OAF_RULE='%.oaf:       %.oaf.in       $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; $(INTLTOOL_MERGE) $(top_srcdir)/po $< $@ -o -p'
8244      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'
8245    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'
8246     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'
8247 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'
8248        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'
8249       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'
8250     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'
8251
8252
8253
8254
8255
8256
8257
8258
8259
8260
8261
8262
8263
8264 # Use the tools built into the package, not the ones that are installed.
8265
8266 INTLTOOL_EXTRACT='$(top_builddir)/intltool-extract'
8267 INTLTOOL_MERGE='$(top_builddir)/intltool-merge'
8268 INTLTOOL_UPDATE='$(top_builddir)/intltool-update'
8269
8270
8271
8272
8273
8274 # Extract the first word of "perl", so it can be a program name with args.
8275 set dummy perl; ac_word=$2
8276 { $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
8277 $as_echo_n "checking for $ac_word... " >&6; }
8278 if test "${ac_cv_path_INTLTOOL_PERL+set}" = set; then
8279   $as_echo_n "(cached) " >&6
8280 else
8281   case $INTLTOOL_PERL in
8282   [\\/]* | ?:[\\/]*)
8283   ac_cv_path_INTLTOOL_PERL="$INTLTOOL_PERL" # Let the user override the test with a path.
8284   ;;
8285   *)
8286   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8287 for as_dir in $PATH
8288 do
8289   IFS=$as_save_IFS
8290   test -z "$as_dir" && as_dir=.
8291   for ac_exec_ext in '' $ac_executable_extensions; do
8292   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
8293     ac_cv_path_INTLTOOL_PERL="$as_dir/$ac_word$ac_exec_ext"
8294     $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
8295     break 2
8296   fi
8297 done
8298 done
8299 IFS=$as_save_IFS
8300
8301   ;;
8302 esac
8303 fi
8304 INTLTOOL_PERL=$ac_cv_path_INTLTOOL_PERL
8305 if test -n "$INTLTOOL_PERL"; then
8306   { $as_echo "$as_me:$LINENO: result: $INTLTOOL_PERL" >&5
8307 $as_echo "$INTLTOOL_PERL" >&6; }
8308 else
8309   { $as_echo "$as_me:$LINENO: result: no" >&5
8310 $as_echo "no" >&6; }
8311 fi
8312
8313
8314 if test -z "$INTLTOOL_PERL"; then
8315    { { $as_echo "$as_me:$LINENO: error: perl not found; required for intltool" >&5
8316 $as_echo "$as_me: error: perl not found; required for intltool" >&2;}
8317    { (exit 1); exit 1; }; }
8318 fi
8319 if test -z "`$INTLTOOL_PERL -v | fgrep '5.' 2> /dev/null`"; then
8320    { { $as_echo "$as_me:$LINENO: error: perl 5.x required for intltool" >&5
8321 $as_echo "$as_me: error: perl 5.x required for intltool" >&2;}
8322    { (exit 1); exit 1; }; }
8323 fi
8324
8325 # Remove file type tags (using []) from po/POTFILES.
8326
8327
8328
8329
8330
8331
8332
8333 # Manually sed perl in so people don't have to put the intltool scripts in AC_OUTPUT.
8334
8335 ac_config_commands="$ac_config_commands default-1"
8336
8337
8338
8339 GETTEXT_PACKAGE=xscreensaver
8340
8341 cat >>confdefs.h <<_ACEOF
8342 #define GETTEXT_PACKAGE "$GETTEXT_PACKAGE"
8343 _ACEOF
8344
8345
8346 cat >>confdefs.h <<_ACEOF
8347 #define PACKAGE "$GETTEXT_PACKAGE"
8348 _ACEOF
8349
8350
8351
8352 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"
8353 if test -n "$ac_tool_prefix"; then
8354   # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
8355 set dummy ${ac_tool_prefix}ranlib; ac_word=$2
8356 { $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
8357 $as_echo_n "checking for $ac_word... " >&6; }
8358 if test "${ac_cv_prog_RANLIB+set}" = set; then
8359   $as_echo_n "(cached) " >&6
8360 else
8361   if test -n "$RANLIB"; then
8362   ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
8363 else
8364 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8365 for as_dir in $PATH
8366 do
8367   IFS=$as_save_IFS
8368   test -z "$as_dir" && as_dir=.
8369   for ac_exec_ext in '' $ac_executable_extensions; do
8370   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
8371     ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
8372     $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
8373     break 2
8374   fi
8375 done
8376 done
8377 IFS=$as_save_IFS
8378
8379 fi
8380 fi
8381 RANLIB=$ac_cv_prog_RANLIB
8382 if test -n "$RANLIB"; then
8383   { $as_echo "$as_me:$LINENO: result: $RANLIB" >&5
8384 $as_echo "$RANLIB" >&6; }
8385 else
8386   { $as_echo "$as_me:$LINENO: result: no" >&5
8387 $as_echo "no" >&6; }
8388 fi
8389
8390
8391 fi
8392 if test -z "$ac_cv_prog_RANLIB"; then
8393   ac_ct_RANLIB=$RANLIB
8394   # Extract the first word of "ranlib", so it can be a program name with args.
8395 set dummy ranlib; ac_word=$2
8396 { $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
8397 $as_echo_n "checking for $ac_word... " >&6; }
8398 if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then
8399   $as_echo_n "(cached) " >&6
8400 else
8401   if test -n "$ac_ct_RANLIB"; then
8402   ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
8403 else
8404 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8405 for as_dir in $PATH
8406 do
8407   IFS=$as_save_IFS
8408   test -z "$as_dir" && as_dir=.
8409   for ac_exec_ext in '' $ac_executable_extensions; do
8410   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
8411     ac_cv_prog_ac_ct_RANLIB="ranlib"
8412     $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
8413     break 2
8414   fi
8415 done
8416 done
8417 IFS=$as_save_IFS
8418
8419 fi
8420 fi
8421 ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
8422 if test -n "$ac_ct_RANLIB"; then
8423   { $as_echo "$as_me:$LINENO: result: $ac_ct_RANLIB" >&5
8424 $as_echo "$ac_ct_RANLIB" >&6; }
8425 else
8426   { $as_echo "$as_me:$LINENO: result: no" >&5
8427 $as_echo "no" >&6; }
8428 fi
8429
8430   if test "x$ac_ct_RANLIB" = x; then
8431     RANLIB=":"
8432   else
8433     case $cross_compiling:$ac_tool_warned in
8434 yes:)
8435 { $as_echo "$as_me:$LINENO: WARNING: using cross tools not prefixed with host triplet" >&5
8436 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
8437 ac_tool_warned=yes ;;
8438 esac
8439     RANLIB=$ac_ct_RANLIB
8440   fi
8441 else
8442   RANLIB="$ac_cv_prog_RANLIB"
8443 fi
8444
8445 { $as_echo "$as_me:$LINENO: checking for off_t" >&5
8446 $as_echo_n "checking for off_t... " >&6; }
8447 if test "${ac_cv_type_off_t+set}" = set; then
8448   $as_echo_n "(cached) " >&6
8449 else
8450   ac_cv_type_off_t=no
8451 cat >conftest.$ac_ext <<_ACEOF
8452 /* confdefs.h.  */
8453 _ACEOF
8454 cat confdefs.h >>conftest.$ac_ext
8455 cat >>conftest.$ac_ext <<_ACEOF
8456 /* end confdefs.h.  */
8457 $ac_includes_default
8458 int
8459 main ()
8460 {
8461 if (sizeof (off_t))
8462        return 0;
8463   ;
8464   return 0;
8465 }
8466 _ACEOF
8467 rm -rf conftest.$ac_objext
8468 if { (ac_try="$ac_compile"
8469 case "(($ac_try" in
8470   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8471   *) ac_try_echo=$ac_try;;
8472 esac
8473 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
8474 $as_echo "$ac_try_echo") >&5
8475   (eval "$ac_compile") 2>conftest.er1
8476   ac_status=$?
8477   grep -v '^ *+' conftest.er1 >conftest.err
8478   rm -rf conftest.er1
8479   cat conftest.err >&5
8480   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
8481   (exit $ac_status); } && {
8482          test -z "$ac_c_werror_flag" ||
8483          test ! -s conftest.err
8484        } && test -s conftest.$ac_objext; then
8485   cat >conftest.$ac_ext <<_ACEOF
8486 /* confdefs.h.  */
8487 _ACEOF
8488 cat confdefs.h >>conftest.$ac_ext
8489 cat >>conftest.$ac_ext <<_ACEOF
8490 /* end confdefs.h.  */
8491 $ac_includes_default
8492 int
8493 main ()
8494 {
8495 if (sizeof ((off_t)))
8496           return 0;
8497   ;
8498   return 0;
8499 }
8500 _ACEOF
8501 rm -rf conftest.$ac_objext
8502 if { (ac_try="$ac_compile"
8503 case "(($ac_try" in
8504   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8505   *) ac_try_echo=$ac_try;;
8506 esac
8507 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
8508 $as_echo "$ac_try_echo") >&5
8509   (eval "$ac_compile") 2>conftest.er1
8510   ac_status=$?
8511   grep -v '^ *+' conftest.er1 >conftest.err
8512   rm -rf conftest.er1
8513   cat conftest.err >&5
8514   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
8515   (exit $ac_status); } && {
8516          test -z "$ac_c_werror_flag" ||
8517          test ! -s conftest.err
8518        } && test -s conftest.$ac_objext; then
8519   :
8520 else
8521   $as_echo "$as_me: failed program was:" >&5
8522 sed 's/^/| /' conftest.$ac_ext >&5
8523
8524         ac_cv_type_off_t=yes
8525 fi
8526
8527 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
8528 else
8529   $as_echo "$as_me: failed program was:" >&5
8530 sed 's/^/| /' conftest.$ac_ext >&5
8531
8532
8533 fi
8534
8535 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
8536 fi
8537 { $as_echo "$as_me:$LINENO: result: $ac_cv_type_off_t" >&5
8538 $as_echo "$ac_cv_type_off_t" >&6; }
8539 if test "x$ac_cv_type_off_t" = x""yes; then
8540   :
8541 else
8542
8543 cat >>confdefs.h <<_ACEOF
8544 #define off_t long int
8545 _ACEOF
8546
8547 fi
8548
8549 # The Ultrix 4.2 mips builtin alloca declared by alloca.h only works
8550 # for constant arguments.  Useless!
8551 { $as_echo "$as_me:$LINENO: checking for working alloca.h" >&5
8552 $as_echo_n "checking for working alloca.h... " >&6; }
8553 if test "${ac_cv_working_alloca_h+set}" = set; then
8554   $as_echo_n "(cached) " >&6
8555 else
8556   cat >conftest.$ac_ext <<_ACEOF
8557 /* confdefs.h.  */
8558 _ACEOF
8559 cat confdefs.h >>conftest.$ac_ext
8560 cat >>conftest.$ac_ext <<_ACEOF
8561 /* end confdefs.h.  */
8562 #include <alloca.h>
8563 int
8564 main ()
8565 {
8566 char *p = (char *) alloca (2 * sizeof (int));
8567                           if (p) return 0;
8568   ;
8569   return 0;
8570 }
8571 _ACEOF
8572 rm -rf conftest.$ac_objext conftest$ac_exeext
8573 if { (ac_try="$ac_link"
8574 case "(($ac_try" in
8575   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8576   *) ac_try_echo=$ac_try;;
8577 esac
8578 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
8579 $as_echo "$ac_try_echo") >&5
8580   (eval "$ac_link") 2>conftest.er1
8581   ac_status=$?
8582   grep -v '^ *+' conftest.er1 >conftest.err
8583   rm -rf conftest.er1
8584   cat conftest.err >&5
8585   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
8586   (exit $ac_status); } && {
8587          test -z "$ac_c_werror_flag" ||
8588          test ! -s conftest.err
8589        } && test -s conftest$ac_exeext && {
8590          test "$cross_compiling" = yes ||
8591          $as_test_x conftest$ac_exeext
8592        }; then
8593   ac_cv_working_alloca_h=yes
8594 else
8595   $as_echo "$as_me: failed program was:" >&5
8596 sed 's/^/| /' conftest.$ac_ext >&5
8597
8598         ac_cv_working_alloca_h=no
8599 fi
8600
8601 rm -rf conftest.dSYM
8602 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
8603       conftest$ac_exeext conftest.$ac_ext
8604 fi
8605 { $as_echo "$as_me:$LINENO: result: $ac_cv_working_alloca_h" >&5
8606 $as_echo "$ac_cv_working_alloca_h" >&6; }
8607 if test $ac_cv_working_alloca_h = yes; then
8608
8609 cat >>confdefs.h <<\_ACEOF
8610 #define HAVE_ALLOCA_H 1
8611 _ACEOF
8612
8613 fi
8614
8615 { $as_echo "$as_me:$LINENO: checking for alloca" >&5
8616 $as_echo_n "checking for alloca... " >&6; }
8617 if test "${ac_cv_func_alloca_works+set}" = set; then
8618   $as_echo_n "(cached) " >&6
8619 else
8620   cat >conftest.$ac_ext <<_ACEOF
8621 /* confdefs.h.  */
8622 _ACEOF
8623 cat confdefs.h >>conftest.$ac_ext
8624 cat >>conftest.$ac_ext <<_ACEOF
8625 /* end confdefs.h.  */
8626 #ifdef __GNUC__
8627 # define alloca __builtin_alloca
8628 #else
8629 # ifdef _MSC_VER
8630 #  include <malloc.h>
8631 #  define alloca _alloca
8632 # else
8633 #  ifdef HAVE_ALLOCA_H
8634 #   include <alloca.h>
8635 #  else
8636 #   ifdef _AIX
8637  #pragma alloca
8638 #   else
8639 #    ifndef alloca /* predefined by HP cc +Olibcalls */
8640 char *alloca ();
8641 #    endif
8642 #   endif
8643 #  endif
8644 # endif
8645 #endif
8646
8647 int
8648 main ()
8649 {
8650 char *p = (char *) alloca (1);
8651                                     if (p) return 0;
8652   ;
8653   return 0;
8654 }
8655 _ACEOF
8656 rm -rf conftest.$ac_objext conftest$ac_exeext
8657 if { (ac_try="$ac_link"
8658 case "(($ac_try" in
8659   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8660   *) ac_try_echo=$ac_try;;
8661 esac
8662 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
8663 $as_echo "$ac_try_echo") >&5
8664   (eval "$ac_link") 2>conftest.er1
8665   ac_status=$?
8666   grep -v '^ *+' conftest.er1 >conftest.err
8667   rm -rf conftest.er1
8668   cat conftest.err >&5
8669   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
8670   (exit $ac_status); } && {
8671          test -z "$ac_c_werror_flag" ||
8672          test ! -s conftest.err
8673        } && test -s conftest$ac_exeext && {
8674          test "$cross_compiling" = yes ||
8675          $as_test_x conftest$ac_exeext
8676        }; then
8677   ac_cv_func_alloca_works=yes
8678 else
8679   $as_echo "$as_me: failed program was:" >&5
8680 sed 's/^/| /' conftest.$ac_ext >&5
8681
8682         ac_cv_func_alloca_works=no
8683 fi
8684
8685 rm -rf conftest.dSYM
8686 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
8687       conftest$ac_exeext conftest.$ac_ext
8688 fi
8689 { $as_echo "$as_me:$LINENO: result: $ac_cv_func_alloca_works" >&5
8690 $as_echo "$ac_cv_func_alloca_works" >&6; }
8691
8692 if test $ac_cv_func_alloca_works = yes; then
8693
8694 cat >>confdefs.h <<\_ACEOF
8695 #define HAVE_ALLOCA 1
8696 _ACEOF
8697
8698 else
8699   # The SVR3 libPW and SVR4 libucb both contain incompatible functions
8700 # that cause trouble.  Some versions do not even contain alloca or
8701 # contain a buggy version.  If you still want to use their alloca,
8702 # use ar to extract alloca.o from them instead of compiling alloca.c.
8703
8704 ALLOCA=\${LIBOBJDIR}alloca.$ac_objext
8705
8706 cat >>confdefs.h <<\_ACEOF
8707 #define C_ALLOCA 1
8708 _ACEOF
8709
8710
8711 { $as_echo "$as_me:$LINENO: checking whether \`alloca.c' needs Cray hooks" >&5
8712 $as_echo_n "checking whether \`alloca.c' needs Cray hooks... " >&6; }
8713 if test "${ac_cv_os_cray+set}" = set; then
8714   $as_echo_n "(cached) " >&6
8715 else
8716   cat >conftest.$ac_ext <<_ACEOF
8717 /* confdefs.h.  */
8718 _ACEOF
8719 cat confdefs.h >>conftest.$ac_ext
8720 cat >>conftest.$ac_ext <<_ACEOF
8721 /* end confdefs.h.  */
8722 #if defined CRAY && ! defined CRAY2
8723 webecray
8724 #else
8725 wenotbecray
8726 #endif
8727
8728 _ACEOF
8729 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
8730   $EGREP "webecray" >/dev/null 2>&1; then
8731   ac_cv_os_cray=yes
8732 else
8733   ac_cv_os_cray=no
8734 fi
8735 rm -rf conftest*
8736
8737 fi
8738 { $as_echo "$as_me:$LINENO: result: $ac_cv_os_cray" >&5
8739 $as_echo "$ac_cv_os_cray" >&6; }
8740 if test $ac_cv_os_cray = yes; then
8741   for ac_func in _getb67 GETB67 getb67; do
8742     as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
8743 { $as_echo "$as_me:$LINENO: checking for $ac_func" >&5
8744 $as_echo_n "checking for $ac_func... " >&6; }
8745 if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
8746   $as_echo_n "(cached) " >&6
8747 else
8748   cat >conftest.$ac_ext <<_ACEOF
8749 /* confdefs.h.  */
8750 _ACEOF
8751 cat confdefs.h >>conftest.$ac_ext
8752 cat >>conftest.$ac_ext <<_ACEOF
8753 /* end confdefs.h.  */
8754 /* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
8755    For example, HP-UX 11i <limits.h> declares gettimeofday.  */
8756 #define $ac_func innocuous_$ac_func
8757
8758 /* System header to define __stub macros and hopefully few prototypes,
8759     which can conflict with char $ac_func (); below.
8760     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
8761     <limits.h> exists even on freestanding compilers.  */
8762
8763 #ifdef __STDC__
8764 # include <limits.h>
8765 #else
8766 # include <assert.h>
8767 #endif
8768
8769 #undef $ac_func
8770
8771 /* Override any GCC internal prototype to avoid an error.
8772    Use char because int might match the return type of a GCC
8773    builtin and then its argument prototype would still apply.  */
8774 #ifdef __cplusplus
8775 extern "C"
8776 #endif
8777 char $ac_func ();
8778 /* The GNU C library defines this for functions which it implements
8779     to always fail with ENOSYS.  Some functions are actually named
8780     something starting with __ and the normal name is an alias.  */
8781 #if defined __stub_$ac_func || defined __stub___$ac_func
8782 choke me
8783 #endif
8784
8785 int
8786 main ()
8787 {
8788 return $ac_func ();
8789   ;
8790   return 0;
8791 }
8792 _ACEOF
8793 rm -rf conftest.$ac_objext conftest$ac_exeext
8794 if { (ac_try="$ac_link"
8795 case "(($ac_try" in
8796   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8797   *) ac_try_echo=$ac_try;;
8798 esac
8799 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
8800 $as_echo "$ac_try_echo") >&5
8801   (eval "$ac_link") 2>conftest.er1
8802   ac_status=$?
8803   grep -v '^ *+' conftest.er1 >conftest.err
8804   rm -rf conftest.er1
8805   cat conftest.err >&5
8806   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
8807   (exit $ac_status); } && {
8808          test -z "$ac_c_werror_flag" ||
8809          test ! -s conftest.err
8810        } && test -s conftest$ac_exeext && {
8811          test "$cross_compiling" = yes ||
8812          $as_test_x conftest$ac_exeext
8813        }; then
8814   eval "$as_ac_var=yes"
8815 else
8816   $as_echo "$as_me: failed program was:" >&5
8817 sed 's/^/| /' conftest.$ac_ext >&5
8818
8819         eval "$as_ac_var=no"
8820 fi
8821
8822 rm -rf conftest.dSYM
8823 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
8824       conftest$ac_exeext conftest.$ac_ext
8825 fi
8826 ac_res=`eval 'as_val=${'$as_ac_var'}
8827                  $as_echo "$as_val"'`
8828                { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
8829 $as_echo "$ac_res" >&6; }
8830 as_val=`eval 'as_val=${'$as_ac_var'}
8831                  $as_echo "$as_val"'`
8832    if test "x$as_val" = x""yes; then
8833
8834 cat >>confdefs.h <<_ACEOF
8835 #define CRAY_STACKSEG_END $ac_func
8836 _ACEOF
8837
8838     break
8839 fi
8840
8841   done
8842 fi
8843
8844 { $as_echo "$as_me:$LINENO: checking stack direction for C alloca" >&5
8845 $as_echo_n "checking stack direction for C alloca... " >&6; }
8846 if test "${ac_cv_c_stack_direction+set}" = set; then
8847   $as_echo_n "(cached) " >&6
8848 else
8849   if test "$cross_compiling" = yes; then
8850   ac_cv_c_stack_direction=0
8851 else
8852   cat >conftest.$ac_ext <<_ACEOF
8853 /* confdefs.h.  */
8854 _ACEOF
8855 cat confdefs.h >>conftest.$ac_ext
8856 cat >>conftest.$ac_ext <<_ACEOF
8857 /* end confdefs.h.  */
8858 $ac_includes_default
8859 int
8860 find_stack_direction ()
8861 {
8862   static char *addr = 0;
8863   auto char dummy;
8864   if (addr == 0)
8865     {
8866       addr = &dummy;
8867       return find_stack_direction ();
8868     }
8869   else
8870     return (&dummy > addr) ? 1 : -1;
8871 }
8872
8873 int
8874 main ()
8875 {
8876   return find_stack_direction () < 0;
8877 }
8878 _ACEOF
8879 rm -rf conftest$ac_exeext
8880 if { (ac_try="$ac_link"
8881 case "(($ac_try" in
8882   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8883   *) ac_try_echo=$ac_try;;
8884 esac
8885 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
8886 $as_echo "$ac_try_echo") >&5
8887   (eval "$ac_link") 2>&5
8888   ac_status=$?
8889   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
8890   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
8891   { (case "(($ac_try" in
8892   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8893   *) ac_try_echo=$ac_try;;
8894 esac
8895 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
8896 $as_echo "$ac_try_echo") >&5
8897   (eval "$ac_try") 2>&5
8898   ac_status=$?
8899   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
8900   (exit $ac_status); }; }; then
8901   ac_cv_c_stack_direction=1
8902 else
8903   $as_echo "$as_me: program exited with status $ac_status" >&5
8904 $as_echo "$as_me: failed program was:" >&5
8905 sed 's/^/| /' conftest.$ac_ext >&5
8906
8907 ( exit $ac_status )
8908 ac_cv_c_stack_direction=-1
8909 fi
8910 rm -rf conftest.dSYM
8911 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
8912 fi
8913
8914
8915 fi
8916 { $as_echo "$as_me:$LINENO: result: $ac_cv_c_stack_direction" >&5
8917 $as_echo "$ac_cv_c_stack_direction" >&6; }
8918
8919 cat >>confdefs.h <<_ACEOF
8920 #define STACK_DIRECTION $ac_cv_c_stack_direction
8921 _ACEOF
8922
8923
8924 fi
8925
8926
8927
8928 for ac_header in stdlib.h unistd.h
8929 do
8930 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
8931 if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
8932   { $as_echo "$as_me:$LINENO: checking for $ac_header" >&5
8933 $as_echo_n "checking for $ac_header... " >&6; }
8934 if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
8935   $as_echo_n "(cached) " >&6
8936 fi
8937 ac_res=`eval 'as_val=${'$as_ac_Header'}
8938                  $as_echo "$as_val"'`
8939                { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
8940 $as_echo "$ac_res" >&6; }
8941 else
8942   # Is the header compilable?
8943 { $as_echo "$as_me:$LINENO: checking $ac_header usability" >&5
8944 $as_echo_n "checking $ac_header usability... " >&6; }
8945 cat >conftest.$ac_ext <<_ACEOF
8946 /* confdefs.h.  */
8947 _ACEOF
8948 cat confdefs.h >>conftest.$ac_ext
8949 cat >>conftest.$ac_ext <<_ACEOF
8950 /* end confdefs.h.  */
8951 $ac_includes_default
8952 #include <$ac_header>
8953 _ACEOF
8954 rm -rf conftest.$ac_objext
8955 if { (ac_try="$ac_compile"
8956 case "(($ac_try" in
8957   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8958   *) ac_try_echo=$ac_try;;
8959 esac
8960 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
8961 $as_echo "$ac_try_echo") >&5
8962   (eval "$ac_compile") 2>conftest.er1
8963   ac_status=$?
8964   grep -v '^ *+' conftest.er1 >conftest.err
8965   rm -rf conftest.er1
8966   cat conftest.err >&5
8967   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
8968   (exit $ac_status); } && {
8969          test -z "$ac_c_werror_flag" ||
8970          test ! -s conftest.err
8971        } && test -s conftest.$ac_objext; then
8972   ac_header_compiler=yes
8973 else
8974   $as_echo "$as_me: failed program was:" >&5
8975 sed 's/^/| /' conftest.$ac_ext >&5
8976
8977         ac_header_compiler=no
8978 fi
8979
8980 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
8981 { $as_echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
8982 $as_echo "$ac_header_compiler" >&6; }
8983
8984 # Is the header present?
8985 { $as_echo "$as_me:$LINENO: checking $ac_header presence" >&5
8986 $as_echo_n "checking $ac_header presence... " >&6; }
8987 cat >conftest.$ac_ext <<_ACEOF
8988 /* confdefs.h.  */
8989 _ACEOF
8990 cat confdefs.h >>conftest.$ac_ext
8991 cat >>conftest.$ac_ext <<_ACEOF
8992 /* end confdefs.h.  */
8993 #include <$ac_header>
8994 _ACEOF
8995 if { (ac_try="$ac_cpp conftest.$ac_ext"
8996 case "(($ac_try" in
8997   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8998   *) ac_try_echo=$ac_try;;
8999 esac
9000 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
9001 $as_echo "$ac_try_echo") >&5
9002   (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
9003   ac_status=$?
9004   grep -v '^ *+' conftest.er1 >conftest.err
9005   rm -rf conftest.er1
9006   cat conftest.err >&5
9007   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
9008   (exit $ac_status); } >/dev/null && {
9009          test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
9010          test ! -s conftest.err
9011        }; then
9012   ac_header_preproc=yes
9013 else
9014   $as_echo "$as_me: failed program was:" >&5
9015 sed 's/^/| /' conftest.$ac_ext >&5
9016
9017   ac_header_preproc=no
9018 fi
9019
9020 rm -rf conftest.err conftest.$ac_ext
9021 { $as_echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
9022 $as_echo "$ac_header_preproc" >&6; }
9023
9024 # So?  What about this header?
9025 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
9026   yes:no: )
9027     { $as_echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
9028 $as_echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
9029     { $as_echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
9030 $as_echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
9031     ac_header_preproc=yes
9032     ;;
9033   no:yes:* )
9034     { $as_echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
9035 $as_echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
9036     { $as_echo "$as_me:$LINENO: WARNING: $ac_header:     check for missing prerequisite headers?" >&5
9037 $as_echo "$as_me: WARNING: $ac_header:     check for missing prerequisite headers?" >&2;}
9038     { $as_echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
9039 $as_echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
9040     { $as_echo "$as_me:$LINENO: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&5
9041 $as_echo "$as_me: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&2;}
9042     { $as_echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
9043 $as_echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
9044     { $as_echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
9045 $as_echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
9046
9047     ;;
9048 esac
9049 { $as_echo "$as_me:$LINENO: checking for $ac_header" >&5
9050 $as_echo_n "checking for $ac_header... " >&6; }
9051 if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
9052   $as_echo_n "(cached) " >&6
9053 else
9054   eval "$as_ac_Header=\$ac_header_preproc"
9055 fi
9056 ac_res=`eval 'as_val=${'$as_ac_Header'}
9057                  $as_echo "$as_val"'`
9058                { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
9059 $as_echo "$ac_res" >&6; }
9060
9061 fi
9062 as_val=`eval 'as_val=${'$as_ac_Header'}
9063                  $as_echo "$as_val"'`
9064    if test "x$as_val" = x""yes; then
9065   cat >>confdefs.h <<_ACEOF
9066 #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
9067 _ACEOF
9068
9069 fi
9070
9071 done
9072
9073
9074 for ac_func in getpagesize
9075 do
9076 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
9077 { $as_echo "$as_me:$LINENO: checking for $ac_func" >&5
9078 $as_echo_n "checking for $ac_func... " >&6; }
9079 if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
9080   $as_echo_n "(cached) " >&6
9081 else
9082   cat >conftest.$ac_ext <<_ACEOF
9083 /* confdefs.h.  */
9084 _ACEOF
9085 cat confdefs.h >>conftest.$ac_ext
9086 cat >>conftest.$ac_ext <<_ACEOF
9087 /* end confdefs.h.  */
9088 /* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
9089    For example, HP-UX 11i <limits.h> declares gettimeofday.  */
9090 #define $ac_func innocuous_$ac_func
9091
9092 /* System header to define __stub macros and hopefully few prototypes,
9093     which can conflict with char $ac_func (); below.
9094     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
9095     <limits.h> exists even on freestanding compilers.  */
9096
9097 #ifdef __STDC__
9098 # include <limits.h>
9099 #else
9100 # include <assert.h>
9101 #endif
9102
9103 #undef $ac_func
9104
9105 /* Override any GCC internal prototype to avoid an error.
9106    Use char because int might match the return type of a GCC
9107    builtin and then its argument prototype would still apply.  */
9108 #ifdef __cplusplus
9109 extern "C"
9110 #endif
9111 char $ac_func ();
9112 /* The GNU C library defines this for functions which it implements
9113     to always fail with ENOSYS.  Some functions are actually named
9114     something starting with __ and the normal name is an alias.  */
9115 #if defined __stub_$ac_func || defined __stub___$ac_func
9116 choke me
9117 #endif
9118
9119 int
9120 main ()
9121 {
9122 return $ac_func ();
9123   ;
9124   return 0;
9125 }
9126 _ACEOF
9127 rm -rf conftest.$ac_objext conftest$ac_exeext
9128 if { (ac_try="$ac_link"
9129 case "(($ac_try" in
9130   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9131   *) ac_try_echo=$ac_try;;
9132 esac
9133 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
9134 $as_echo "$ac_try_echo") >&5
9135   (eval "$ac_link") 2>conftest.er1
9136   ac_status=$?
9137   grep -v '^ *+' conftest.er1 >conftest.err
9138   rm -rf conftest.er1
9139   cat conftest.err >&5
9140   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
9141   (exit $ac_status); } && {
9142          test -z "$ac_c_werror_flag" ||
9143          test ! -s conftest.err
9144        } && test -s conftest$ac_exeext && {
9145          test "$cross_compiling" = yes ||
9146          $as_test_x conftest$ac_exeext
9147        }; then
9148   eval "$as_ac_var=yes"
9149 else
9150   $as_echo "$as_me: failed program was:" >&5
9151 sed 's/^/| /' conftest.$ac_ext >&5
9152
9153         eval "$as_ac_var=no"
9154 fi
9155
9156 rm -rf conftest.dSYM
9157 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
9158       conftest$ac_exeext conftest.$ac_ext
9159 fi
9160 ac_res=`eval 'as_val=${'$as_ac_var'}
9161                  $as_echo "$as_val"'`
9162                { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
9163 $as_echo "$ac_res" >&6; }
9164 as_val=`eval 'as_val=${'$as_ac_var'}
9165                  $as_echo "$as_val"'`
9166    if test "x$as_val" = x""yes; then
9167   cat >>confdefs.h <<_ACEOF
9168 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
9169 _ACEOF
9170
9171 fi
9172 done
9173
9174 { $as_echo "$as_me:$LINENO: checking for working mmap" >&5
9175 $as_echo_n "checking for working mmap... " >&6; }
9176 if test "${ac_cv_func_mmap_fixed_mapped+set}" = set; then
9177   $as_echo_n "(cached) " >&6
9178 else
9179   if test "$cross_compiling" = yes; then
9180   ac_cv_func_mmap_fixed_mapped=no
9181 else
9182   cat >conftest.$ac_ext <<_ACEOF
9183 /* confdefs.h.  */
9184 _ACEOF
9185 cat confdefs.h >>conftest.$ac_ext
9186 cat >>conftest.$ac_ext <<_ACEOF
9187 /* end confdefs.h.  */
9188 $ac_includes_default
9189 /* malloc might have been renamed as rpl_malloc. */
9190 #undef malloc
9191
9192 /* Thanks to Mike Haertel and Jim Avera for this test.
9193    Here is a matrix of mmap possibilities:
9194         mmap private not fixed
9195         mmap private fixed at somewhere currently unmapped
9196         mmap private fixed at somewhere already mapped
9197         mmap shared not fixed
9198         mmap shared fixed at somewhere currently unmapped
9199         mmap shared fixed at somewhere already mapped
9200    For private mappings, we should verify that changes cannot be read()
9201    back from the file, nor mmap's back from the file at a different
9202    address.  (There have been systems where private was not correctly
9203    implemented like the infamous i386 svr4.0, and systems where the
9204    VM page cache was not coherent with the file system buffer cache
9205    like early versions of FreeBSD and possibly contemporary NetBSD.)
9206    For shared mappings, we should conversely verify that changes get
9207    propagated back to all the places they're supposed to be.
9208
9209    Grep wants private fixed already mapped.
9210    The main things grep needs to know about mmap are:
9211    * does it exist and is it safe to write into the mmap'd area
9212    * how to use it (BSD variants)  */
9213
9214 #include <fcntl.h>
9215 #include <sys/mman.h>
9216
9217 #if !defined STDC_HEADERS && !defined HAVE_STDLIB_H
9218 char *malloc ();
9219 #endif
9220
9221 /* This mess was copied from the GNU getpagesize.h.  */
9222 #ifndef HAVE_GETPAGESIZE
9223 /* Assume that all systems that can run configure have sys/param.h.  */
9224 # ifndef HAVE_SYS_PARAM_H
9225 #  define HAVE_SYS_PARAM_H 1
9226 # endif
9227
9228 # ifdef _SC_PAGESIZE
9229 #  define getpagesize() sysconf(_SC_PAGESIZE)
9230 # else /* no _SC_PAGESIZE */
9231 #  ifdef HAVE_SYS_PARAM_H
9232 #   include <sys/param.h>
9233 #   ifdef EXEC_PAGESIZE
9234 #    define getpagesize() EXEC_PAGESIZE
9235 #   else /* no EXEC_PAGESIZE */
9236 #    ifdef NBPG
9237 #     define getpagesize() NBPG * CLSIZE
9238 #     ifndef CLSIZE
9239 #      define CLSIZE 1
9240 #     endif /* no CLSIZE */
9241 #    else /* no NBPG */
9242 #     ifdef NBPC
9243 #      define getpagesize() NBPC
9244 #     else /* no NBPC */
9245 #      ifdef PAGESIZE
9246 #       define getpagesize() PAGESIZE
9247 #      endif /* PAGESIZE */
9248 #     endif /* no NBPC */
9249 #    endif /* no NBPG */
9250 #   endif /* no EXEC_PAGESIZE */
9251 #  else /* no HAVE_SYS_PARAM_H */
9252 #   define getpagesize() 8192   /* punt totally */
9253 #  endif /* no HAVE_SYS_PARAM_H */
9254 # endif /* no _SC_PAGESIZE */
9255
9256 #endif /* no HAVE_GETPAGESIZE */
9257
9258 int
9259 main ()
9260 {
9261   char *data, *data2, *data3;
9262   int i, pagesize;
9263   int fd;
9264
9265   pagesize = getpagesize ();
9266
9267   /* First, make a file with some known garbage in it. */
9268   data = (char *) malloc (pagesize);
9269   if (!data)
9270     return 1;
9271   for (i = 0; i < pagesize; ++i)
9272     *(data + i) = rand ();
9273   umask (0);
9274   fd = creat ("conftest.mmap", 0600);
9275   if (fd < 0)
9276     return 1;
9277   if (write (fd, data, pagesize) != pagesize)
9278     return 1;
9279   close (fd);
9280
9281   /* Next, try to mmap the file at a fixed address which already has
9282      something else allocated at it.  If we can, also make sure that
9283      we see the same garbage.  */
9284   fd = open ("conftest.mmap", O_RDWR);
9285   if (fd < 0)
9286     return 1;
9287   data2 = (char *) malloc (2 * pagesize);
9288   if (!data2)
9289     return 1;
9290   data2 += (pagesize - ((long int) data2 & (pagesize - 1))) & (pagesize - 1);
9291   if (data2 != mmap (data2, pagesize, PROT_READ | PROT_WRITE,
9292                      MAP_PRIVATE | MAP_FIXED, fd, 0L))
9293     return 1;
9294   for (i = 0; i < pagesize; ++i)
9295     if (*(data + i) != *(data2 + i))
9296       return 1;
9297
9298   /* Finally, make sure that changes to the mapped area do not
9299      percolate back to the file as seen by read().  (This is a bug on
9300      some variants of i386 svr4.0.)  */
9301   for (i = 0; i < pagesize; ++i)
9302     *(data2 + i) = *(data2 + i) + 1;
9303   data3 = (char *) malloc (pagesize);
9304   if (!data3)
9305     return 1;
9306   if (read (fd, data3, pagesize) != pagesize)
9307     return 1;
9308   for (i = 0; i < pagesize; ++i)
9309     if (*(data + i) != *(data3 + i))
9310       return 1;
9311   close (fd);
9312   return 0;
9313 }
9314 _ACEOF
9315 rm -rf conftest$ac_exeext
9316 if { (ac_try="$ac_link"
9317 case "(($ac_try" in
9318   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9319   *) ac_try_echo=$ac_try;;
9320 esac
9321 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
9322 $as_echo "$ac_try_echo") >&5
9323   (eval "$ac_link") 2>&5
9324   ac_status=$?
9325   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
9326   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
9327   { (case "(($ac_try" in
9328   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9329   *) ac_try_echo=$ac_try;;
9330 esac
9331 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
9332 $as_echo "$ac_try_echo") >&5
9333   (eval "$ac_try") 2>&5
9334   ac_status=$?
9335   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
9336   (exit $ac_status); }; }; then
9337   ac_cv_func_mmap_fixed_mapped=yes
9338 else
9339   $as_echo "$as_me: program exited with status $ac_status" >&5
9340 $as_echo "$as_me: failed program was:" >&5
9341 sed 's/^/| /' conftest.$ac_ext >&5
9342
9343 ( exit $ac_status )
9344 ac_cv_func_mmap_fixed_mapped=no
9345 fi
9346 rm -rf conftest.dSYM
9347 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
9348 fi
9349
9350
9351 fi
9352 { $as_echo "$as_me:$LINENO: result: $ac_cv_func_mmap_fixed_mapped" >&5
9353 $as_echo "$ac_cv_func_mmap_fixed_mapped" >&6; }
9354 if test $ac_cv_func_mmap_fixed_mapped = yes; then
9355
9356 cat >>confdefs.h <<\_ACEOF
9357 #define HAVE_MMAP 1
9358 _ACEOF
9359
9360 fi
9361 rm -rf conftest.mmap
9362
9363
9364
9365
9366
9367
9368
9369
9370
9371
9372 for ac_header in argz.h limits.h locale.h nl_types.h malloc.h string.h \
9373 unistd.h sys/param.h
9374 do
9375 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
9376 if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
9377   { $as_echo "$as_me:$LINENO: checking for $ac_header" >&5
9378 $as_echo_n "checking for $ac_header... " >&6; }
9379 if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
9380   $as_echo_n "(cached) " >&6
9381 fi
9382 ac_res=`eval 'as_val=${'$as_ac_Header'}
9383                  $as_echo "$as_val"'`
9384                { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
9385 $as_echo "$ac_res" >&6; }
9386 else
9387   # Is the header compilable?
9388 { $as_echo "$as_me:$LINENO: checking $ac_header usability" >&5
9389 $as_echo_n "checking $ac_header usability... " >&6; }
9390 cat >conftest.$ac_ext <<_ACEOF
9391 /* confdefs.h.  */
9392 _ACEOF
9393 cat confdefs.h >>conftest.$ac_ext
9394 cat >>conftest.$ac_ext <<_ACEOF
9395 /* end confdefs.h.  */
9396 $ac_includes_default
9397 #include <$ac_header>
9398 _ACEOF
9399 rm -rf conftest.$ac_objext
9400 if { (ac_try="$ac_compile"
9401 case "(($ac_try" in
9402   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9403   *) ac_try_echo=$ac_try;;
9404 esac
9405 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
9406 $as_echo "$ac_try_echo") >&5
9407   (eval "$ac_compile") 2>conftest.er1
9408   ac_status=$?
9409   grep -v '^ *+' conftest.er1 >conftest.err
9410   rm -rf conftest.er1
9411   cat conftest.err >&5
9412   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
9413   (exit $ac_status); } && {
9414          test -z "$ac_c_werror_flag" ||
9415          test ! -s conftest.err
9416        } && test -s conftest.$ac_objext; then
9417   ac_header_compiler=yes
9418 else
9419   $as_echo "$as_me: failed program was:" >&5
9420 sed 's/^/| /' conftest.$ac_ext >&5
9421
9422         ac_header_compiler=no
9423 fi
9424
9425 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9426 { $as_echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
9427 $as_echo "$ac_header_compiler" >&6; }
9428
9429 # Is the header present?
9430 { $as_echo "$as_me:$LINENO: checking $ac_header presence" >&5
9431 $as_echo_n "checking $ac_header presence... " >&6; }
9432 cat >conftest.$ac_ext <<_ACEOF
9433 /* confdefs.h.  */
9434 _ACEOF
9435 cat confdefs.h >>conftest.$ac_ext
9436 cat >>conftest.$ac_ext <<_ACEOF
9437 /* end confdefs.h.  */
9438 #include <$ac_header>
9439 _ACEOF
9440 if { (ac_try="$ac_cpp conftest.$ac_ext"
9441 case "(($ac_try" in
9442   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9443   *) ac_try_echo=$ac_try;;
9444 esac
9445 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
9446 $as_echo "$ac_try_echo") >&5
9447   (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
9448   ac_status=$?
9449   grep -v '^ *+' conftest.er1 >conftest.err
9450   rm -rf conftest.er1
9451   cat conftest.err >&5
9452   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
9453   (exit $ac_status); } >/dev/null && {
9454          test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
9455          test ! -s conftest.err
9456        }; then
9457   ac_header_preproc=yes
9458 else
9459   $as_echo "$as_me: failed program was:" >&5
9460 sed 's/^/| /' conftest.$ac_ext >&5
9461
9462   ac_header_preproc=no
9463 fi
9464
9465 rm -rf conftest.err conftest.$ac_ext
9466 { $as_echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
9467 $as_echo "$ac_header_preproc" >&6; }
9468
9469 # So?  What about this header?
9470 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
9471   yes:no: )
9472     { $as_echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
9473 $as_echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
9474     { $as_echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
9475 $as_echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
9476     ac_header_preproc=yes
9477     ;;
9478   no:yes:* )
9479     { $as_echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
9480 $as_echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
9481     { $as_echo "$as_me:$LINENO: WARNING: $ac_header:     check for missing prerequisite headers?" >&5
9482 $as_echo "$as_me: WARNING: $ac_header:     check for missing prerequisite headers?" >&2;}
9483     { $as_echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
9484 $as_echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
9485     { $as_echo "$as_me:$LINENO: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&5
9486 $as_echo "$as_me: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&2;}
9487     { $as_echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
9488 $as_echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
9489     { $as_echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
9490 $as_echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
9491
9492     ;;
9493 esac
9494 { $as_echo "$as_me:$LINENO: checking for $ac_header" >&5
9495 $as_echo_n "checking for $ac_header... " >&6; }
9496 if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
9497   $as_echo_n "(cached) " >&6
9498 else
9499   eval "$as_ac_Header=\$ac_header_preproc"
9500 fi
9501 ac_res=`eval 'as_val=${'$as_ac_Header'}
9502                  $as_echo "$as_val"'`
9503                { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
9504 $as_echo "$ac_res" >&6; }
9505
9506 fi
9507 as_val=`eval 'as_val=${'$as_ac_Header'}
9508                  $as_echo "$as_val"'`
9509    if test "x$as_val" = x""yes; then
9510   cat >>confdefs.h <<_ACEOF
9511 #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
9512 _ACEOF
9513
9514 fi
9515
9516 done
9517
9518
9519
9520
9521
9522
9523
9524
9525
9526
9527
9528
9529 for ac_func in getcwd munmap putenv setenv setlocale strchr strcasecmp \
9530 strdup __argz_count __argz_stringify __argz_next
9531 do
9532 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
9533 { $as_echo "$as_me:$LINENO: checking for $ac_func" >&5
9534 $as_echo_n "checking for $ac_func... " >&6; }
9535 if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
9536   $as_echo_n "(cached) " >&6
9537 else
9538   cat >conftest.$ac_ext <<_ACEOF
9539 /* confdefs.h.  */
9540 _ACEOF
9541 cat confdefs.h >>conftest.$ac_ext
9542 cat >>conftest.$ac_ext <<_ACEOF
9543 /* end confdefs.h.  */
9544 /* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
9545    For example, HP-UX 11i <limits.h> declares gettimeofday.  */
9546 #define $ac_func innocuous_$ac_func
9547
9548 /* System header to define __stub macros and hopefully few prototypes,
9549     which can conflict with char $ac_func (); below.
9550     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
9551     <limits.h> exists even on freestanding compilers.  */
9552
9553 #ifdef __STDC__
9554 # include <limits.h>
9555 #else
9556 # include <assert.h>
9557 #endif
9558
9559 #undef $ac_func
9560
9561 /* Override any GCC internal prototype to avoid an error.
9562    Use char because int might match the return type of a GCC
9563    builtin and then its argument prototype would still apply.  */
9564 #ifdef __cplusplus
9565 extern "C"
9566 #endif
9567 char $ac_func ();
9568 /* The GNU C library defines this for functions which it implements
9569     to always fail with ENOSYS.  Some functions are actually named
9570     something starting with __ and the normal name is an alias.  */
9571 #if defined __stub_$ac_func || defined __stub___$ac_func
9572 choke me
9573 #endif
9574
9575 int
9576 main ()
9577 {
9578 return $ac_func ();
9579   ;
9580   return 0;
9581 }
9582 _ACEOF
9583 rm -rf conftest.$ac_objext conftest$ac_exeext
9584 if { (ac_try="$ac_link"
9585 case "(($ac_try" in
9586   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9587   *) ac_try_echo=$ac_try;;
9588 esac
9589 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
9590 $as_echo "$ac_try_echo") >&5
9591   (eval "$ac_link") 2>conftest.er1
9592   ac_status=$?
9593   grep -v '^ *+' conftest.er1 >conftest.err
9594   rm -rf conftest.er1
9595   cat conftest.err >&5
9596   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
9597   (exit $ac_status); } && {
9598          test -z "$ac_c_werror_flag" ||
9599          test ! -s conftest.err
9600        } && test -s conftest$ac_exeext && {
9601          test "$cross_compiling" = yes ||
9602          $as_test_x conftest$ac_exeext
9603        }; then
9604   eval "$as_ac_var=yes"
9605 else
9606   $as_echo "$as_me: failed program was:" >&5
9607 sed 's/^/| /' conftest.$ac_ext >&5
9608
9609         eval "$as_ac_var=no"
9610 fi
9611
9612 rm -rf conftest.dSYM
9613 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
9614       conftest$ac_exeext conftest.$ac_ext
9615 fi
9616 ac_res=`eval 'as_val=${'$as_ac_var'}
9617                  $as_echo "$as_val"'`
9618                { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
9619 $as_echo "$ac_res" >&6; }
9620 as_val=`eval 'as_val=${'$as_ac_var'}
9621                  $as_echo "$as_val"'`
9622    if test "x$as_val" = x""yes; then
9623   cat >>confdefs.h <<_ACEOF
9624 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
9625 _ACEOF
9626
9627 fi
9628 done
9629
9630
9631    if test $ac_cv_header_locale_h = yes; then
9632     { $as_echo "$as_me:$LINENO: checking for LC_MESSAGES" >&5
9633 $as_echo_n "checking for LC_MESSAGES... " >&6; }
9634 if test "${am_cv_val_LC_MESSAGES+set}" = set; then
9635   $as_echo_n "(cached) " >&6
9636 else
9637   cat >conftest.$ac_ext <<_ACEOF
9638 /* confdefs.h.  */
9639 _ACEOF
9640 cat confdefs.h >>conftest.$ac_ext
9641 cat >>conftest.$ac_ext <<_ACEOF
9642 /* end confdefs.h.  */
9643 #include <locale.h>
9644 int
9645 main ()
9646 {
9647 return LC_MESSAGES
9648   ;
9649   return 0;
9650 }
9651 _ACEOF
9652 rm -rf conftest.$ac_objext conftest$ac_exeext
9653 if { (ac_try="$ac_link"
9654 case "(($ac_try" in
9655   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9656   *) ac_try_echo=$ac_try;;
9657 esac
9658 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
9659 $as_echo "$ac_try_echo") >&5
9660   (eval "$ac_link") 2>conftest.er1
9661   ac_status=$?
9662   grep -v '^ *+' conftest.er1 >conftest.err
9663   rm -rf conftest.er1
9664   cat conftest.err >&5
9665   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
9666   (exit $ac_status); } && {
9667          test -z "$ac_c_werror_flag" ||
9668          test ! -s conftest.err
9669        } && test -s conftest$ac_exeext && {
9670          test "$cross_compiling" = yes ||
9671          $as_test_x conftest$ac_exeext
9672        }; then
9673   am_cv_val_LC_MESSAGES=yes
9674 else
9675   $as_echo "$as_me: failed program was:" >&5
9676 sed 's/^/| /' conftest.$ac_ext >&5
9677
9678         am_cv_val_LC_MESSAGES=no
9679 fi
9680
9681 rm -rf conftest.dSYM
9682 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
9683       conftest$ac_exeext conftest.$ac_ext
9684 fi
9685 { $as_echo "$as_me:$LINENO: result: $am_cv_val_LC_MESSAGES" >&5
9686 $as_echo "$am_cv_val_LC_MESSAGES" >&6; }
9687     if test $am_cv_val_LC_MESSAGES = yes; then
9688
9689 cat >>confdefs.h <<\_ACEOF
9690 #define HAVE_LC_MESSAGES 1
9691 _ACEOF
9692
9693     fi
9694   fi
9695      USE_NLS=yes
9696
9697
9698         nls_cv_force_use_gnu_gettext="no"
9699
9700     nls_cv_use_gnu_gettext="$nls_cv_force_use_gnu_gettext"
9701     if test "$nls_cv_force_use_gnu_gettext" != "yes"; then
9702                               nls_cv_header_intl=
9703       nls_cv_header_libgt=
9704       CATOBJEXT=NONE
9705
9706       if test "${ac_cv_header_libintl_h+set}" = set; then
9707   { $as_echo "$as_me:$LINENO: checking for libintl.h" >&5
9708 $as_echo_n "checking for libintl.h... " >&6; }
9709 if test "${ac_cv_header_libintl_h+set}" = set; then
9710   $as_echo_n "(cached) " >&6
9711 fi
9712 { $as_echo "$as_me:$LINENO: result: $ac_cv_header_libintl_h" >&5
9713 $as_echo "$ac_cv_header_libintl_h" >&6; }
9714 else
9715   # Is the header compilable?
9716 { $as_echo "$as_me:$LINENO: checking libintl.h usability" >&5
9717 $as_echo_n "checking libintl.h usability... " >&6; }
9718 cat >conftest.$ac_ext <<_ACEOF
9719 /* confdefs.h.  */
9720 _ACEOF
9721 cat confdefs.h >>conftest.$ac_ext
9722 cat >>conftest.$ac_ext <<_ACEOF
9723 /* end confdefs.h.  */
9724 $ac_includes_default
9725 #include <libintl.h>
9726 _ACEOF
9727 rm -rf conftest.$ac_objext
9728 if { (ac_try="$ac_compile"
9729 case "(($ac_try" in
9730   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9731   *) ac_try_echo=$ac_try;;
9732 esac
9733 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
9734 $as_echo "$ac_try_echo") >&5
9735   (eval "$ac_compile") 2>conftest.er1
9736   ac_status=$?
9737   grep -v '^ *+' conftest.er1 >conftest.err
9738   rm -rf conftest.er1
9739   cat conftest.err >&5
9740   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
9741   (exit $ac_status); } && {
9742          test -z "$ac_c_werror_flag" ||
9743          test ! -s conftest.err
9744        } && test -s conftest.$ac_objext; then
9745   ac_header_compiler=yes
9746 else
9747   $as_echo "$as_me: failed program was:" >&5
9748 sed 's/^/| /' conftest.$ac_ext >&5
9749
9750         ac_header_compiler=no
9751 fi
9752
9753 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9754 { $as_echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
9755 $as_echo "$ac_header_compiler" >&6; }
9756
9757 # Is the header present?
9758 { $as_echo "$as_me:$LINENO: checking libintl.h presence" >&5
9759 $as_echo_n "checking libintl.h presence... " >&6; }
9760 cat >conftest.$ac_ext <<_ACEOF
9761 /* confdefs.h.  */
9762 _ACEOF
9763 cat confdefs.h >>conftest.$ac_ext
9764 cat >>conftest.$ac_ext <<_ACEOF
9765 /* end confdefs.h.  */
9766 #include <libintl.h>
9767 _ACEOF
9768 if { (ac_try="$ac_cpp conftest.$ac_ext"
9769 case "(($ac_try" in
9770   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9771   *) ac_try_echo=$ac_try;;
9772 esac
9773 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
9774 $as_echo "$ac_try_echo") >&5
9775   (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
9776   ac_status=$?
9777   grep -v '^ *+' conftest.er1 >conftest.err
9778   rm -rf conftest.er1
9779   cat conftest.err >&5
9780   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
9781   (exit $ac_status); } >/dev/null && {
9782          test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
9783          test ! -s conftest.err
9784        }; then
9785   ac_header_preproc=yes
9786 else
9787   $as_echo "$as_me: failed program was:" >&5
9788 sed 's/^/| /' conftest.$ac_ext >&5
9789
9790   ac_header_preproc=no
9791 fi
9792
9793 rm -rf conftest.err conftest.$ac_ext
9794 { $as_echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
9795 $as_echo "$ac_header_preproc" >&6; }
9796
9797 # So?  What about this header?
9798 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
9799   yes:no: )
9800     { $as_echo "$as_me:$LINENO: WARNING: libintl.h: accepted by the compiler, rejected by the preprocessor!" >&5
9801 $as_echo "$as_me: WARNING: libintl.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
9802     { $as_echo "$as_me:$LINENO: WARNING: libintl.h: proceeding with the compiler's result" >&5
9803 $as_echo "$as_me: WARNING: libintl.h: proceeding with the compiler's result" >&2;}
9804     ac_header_preproc=yes
9805     ;;
9806   no:yes:* )
9807     { $as_echo "$as_me:$LINENO: WARNING: libintl.h: present but cannot be compiled" >&5
9808 $as_echo "$as_me: WARNING: libintl.h: present but cannot be compiled" >&2;}
9809     { $as_echo "$as_me:$LINENO: WARNING: libintl.h:     check for missing prerequisite headers?" >&5
9810 $as_echo "$as_me: WARNING: libintl.h:     check for missing prerequisite headers?" >&2;}
9811     { $as_echo "$as_me:$LINENO: WARNING: libintl.h: see the Autoconf documentation" >&5
9812 $as_echo "$as_me: WARNING: libintl.h: see the Autoconf documentation" >&2;}
9813     { $as_echo "$as_me:$LINENO: WARNING: libintl.h:     section \"Present But Cannot Be Compiled\"" >&5
9814 $as_echo "$as_me: WARNING: libintl.h:     section \"Present But Cannot Be Compiled\"" >&2;}
9815     { $as_echo "$as_me:$LINENO: WARNING: libintl.h: proceeding with the preprocessor's result" >&5
9816 $as_echo "$as_me: WARNING: libintl.h: proceeding with the preprocessor's result" >&2;}
9817     { $as_echo "$as_me:$LINENO: WARNING: libintl.h: in the future, the compiler will take precedence" >&5
9818 $as_echo "$as_me: WARNING: libintl.h: in the future, the compiler will take precedence" >&2;}
9819
9820     ;;
9821 esac
9822 { $as_echo "$as_me:$LINENO: checking for libintl.h" >&5
9823 $as_echo_n "checking for libintl.h... " >&6; }
9824 if test "${ac_cv_header_libintl_h+set}" = set; then
9825   $as_echo_n "(cached) " >&6
9826 else
9827   ac_cv_header_libintl_h=$ac_header_preproc
9828 fi
9829 { $as_echo "$as_me:$LINENO: result: $ac_cv_header_libintl_h" >&5
9830 $as_echo "$ac_cv_header_libintl_h" >&6; }
9831
9832 fi
9833 if test "x$ac_cv_header_libintl_h" = x""yes; then
9834   { $as_echo "$as_me:$LINENO: checking for dgettext in libc" >&5
9835 $as_echo_n "checking for dgettext in libc... " >&6; }
9836 if test "${gt_cv_func_dgettext_libc+set}" = set; then
9837   $as_echo_n "(cached) " >&6
9838 else
9839   cat >conftest.$ac_ext <<_ACEOF
9840 /* confdefs.h.  */
9841 _ACEOF
9842 cat confdefs.h >>conftest.$ac_ext
9843 cat >>conftest.$ac_ext <<_ACEOF
9844 /* end confdefs.h.  */
9845 #include <libintl.h>
9846 int
9847 main ()
9848 {
9849 return (int) dgettext ("","")
9850   ;
9851   return 0;
9852 }
9853 _ACEOF
9854 rm -rf conftest.$ac_objext conftest$ac_exeext
9855 if { (ac_try="$ac_link"
9856 case "(($ac_try" in
9857   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9858   *) ac_try_echo=$ac_try;;
9859 esac
9860 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
9861 $as_echo "$ac_try_echo") >&5
9862   (eval "$ac_link") 2>conftest.er1
9863   ac_status=$?
9864   grep -v '^ *+' conftest.er1 >conftest.err
9865   rm -rf conftest.er1
9866   cat conftest.err >&5
9867   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
9868   (exit $ac_status); } && {
9869          test -z "$ac_c_werror_flag" ||
9870          test ! -s conftest.err
9871        } && test -s conftest$ac_exeext && {
9872          test "$cross_compiling" = yes ||
9873          $as_test_x conftest$ac_exeext
9874        }; then
9875   gt_cv_func_dgettext_libc=yes
9876 else
9877   $as_echo "$as_me: failed program was:" >&5
9878 sed 's/^/| /' conftest.$ac_ext >&5
9879
9880         gt_cv_func_dgettext_libc=no
9881 fi
9882
9883 rm -rf conftest.dSYM
9884 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
9885       conftest$ac_exeext conftest.$ac_ext
9886 fi
9887 { $as_echo "$as_me:$LINENO: result: $gt_cv_func_dgettext_libc" >&5
9888 $as_echo "$gt_cv_func_dgettext_libc" >&6; }
9889
9890           if test "$gt_cv_func_dgettext_libc" != "yes"; then
9891             { $as_echo "$as_me:$LINENO: checking for bindtextdomain in -lintl" >&5
9892 $as_echo_n "checking for bindtextdomain in -lintl... " >&6; }
9893 if test "${ac_cv_lib_intl_bindtextdomain+set}" = set; then
9894   $as_echo_n "(cached) " >&6
9895 else
9896   ac_check_lib_save_LIBS=$LIBS
9897 LIBS="-lintl  $LIBS"
9898 cat >conftest.$ac_ext <<_ACEOF
9899 /* confdefs.h.  */
9900 _ACEOF
9901 cat confdefs.h >>conftest.$ac_ext
9902 cat >>conftest.$ac_ext <<_ACEOF
9903 /* end confdefs.h.  */
9904
9905 /* Override any GCC internal prototype to avoid an error.
9906    Use char because int might match the return type of a GCC
9907    builtin and then its argument prototype would still apply.  */
9908 #ifdef __cplusplus
9909 extern "C"
9910 #endif
9911 char bindtextdomain ();
9912 int
9913 main ()
9914 {
9915 return bindtextdomain ();
9916   ;
9917   return 0;
9918 }
9919 _ACEOF
9920 rm -rf conftest.$ac_objext conftest$ac_exeext
9921 if { (ac_try="$ac_link"
9922 case "(($ac_try" in
9923   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9924   *) ac_try_echo=$ac_try;;
9925 esac
9926 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
9927 $as_echo "$ac_try_echo") >&5
9928   (eval "$ac_link") 2>conftest.er1
9929   ac_status=$?
9930   grep -v '^ *+' conftest.er1 >conftest.err
9931   rm -rf conftest.er1
9932   cat conftest.err >&5
9933   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
9934   (exit $ac_status); } && {
9935          test -z "$ac_c_werror_flag" ||
9936          test ! -s conftest.err
9937        } && test -s conftest$ac_exeext && {
9938          test "$cross_compiling" = yes ||
9939          $as_test_x conftest$ac_exeext
9940        }; then
9941   ac_cv_lib_intl_bindtextdomain=yes
9942 else
9943   $as_echo "$as_me: failed program was:" >&5
9944 sed 's/^/| /' conftest.$ac_ext >&5
9945
9946         ac_cv_lib_intl_bindtextdomain=no
9947 fi
9948
9949 rm -rf conftest.dSYM
9950 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
9951       conftest$ac_exeext conftest.$ac_ext
9952 LIBS=$ac_check_lib_save_LIBS
9953 fi
9954 { $as_echo "$as_me:$LINENO: result: $ac_cv_lib_intl_bindtextdomain" >&5
9955 $as_echo "$ac_cv_lib_intl_bindtextdomain" >&6; }
9956 if test "x$ac_cv_lib_intl_bindtextdomain" = x""yes; then
9957   { $as_echo "$as_me:$LINENO: checking for dgettext in libintl" >&5
9958 $as_echo_n "checking for dgettext in libintl... " >&6; }
9959 if test "${gt_cv_func_dgettext_libintl+set}" = set; then
9960   $as_echo_n "(cached) " >&6
9961 else
9962   { $as_echo "$as_me:$LINENO: checking for dgettext in -lintl" >&5
9963 $as_echo_n "checking for dgettext in -lintl... " >&6; }
9964 if test "${ac_cv_lib_intl_dgettext+set}" = set; then
9965   $as_echo_n "(cached) " >&6
9966 else
9967   ac_check_lib_save_LIBS=$LIBS
9968 LIBS="-lintl  $LIBS"
9969 cat >conftest.$ac_ext <<_ACEOF
9970 /* confdefs.h.  */
9971 _ACEOF
9972 cat confdefs.h >>conftest.$ac_ext
9973 cat >>conftest.$ac_ext <<_ACEOF
9974 /* end confdefs.h.  */
9975
9976 /* Override any GCC internal prototype to avoid an error.
9977    Use char because int might match the return type of a GCC
9978    builtin and then its argument prototype would still apply.  */
9979 #ifdef __cplusplus
9980 extern "C"
9981 #endif
9982 char dgettext ();
9983 int
9984 main ()
9985 {
9986 return dgettext ();
9987   ;
9988   return 0;
9989 }
9990 _ACEOF
9991 rm -rf conftest.$ac_objext conftest$ac_exeext
9992 if { (ac_try="$ac_link"
9993 case "(($ac_try" in
9994   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9995   *) ac_try_echo=$ac_try;;
9996 esac
9997 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
9998 $as_echo "$ac_try_echo") >&5
9999   (eval "$ac_link") 2>conftest.er1
10000   ac_status=$?
10001   grep -v '^ *+' conftest.er1 >conftest.err
10002   rm -rf conftest.er1
10003   cat conftest.err >&5
10004   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
10005   (exit $ac_status); } && {
10006          test -z "$ac_c_werror_flag" ||
10007          test ! -s conftest.err
10008        } && test -s conftest$ac_exeext && {
10009          test "$cross_compiling" = yes ||
10010          $as_test_x conftest$ac_exeext
10011        }; then
10012   ac_cv_lib_intl_dgettext=yes
10013 else
10014   $as_echo "$as_me: failed program was:" >&5
10015 sed 's/^/| /' conftest.$ac_ext >&5
10016
10017         ac_cv_lib_intl_dgettext=no
10018 fi
10019
10020 rm -rf conftest.dSYM
10021 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
10022       conftest$ac_exeext conftest.$ac_ext
10023 LIBS=$ac_check_lib_save_LIBS
10024 fi
10025 { $as_echo "$as_me:$LINENO: result: $ac_cv_lib_intl_dgettext" >&5
10026 $as_echo "$ac_cv_lib_intl_dgettext" >&6; }
10027 if test "x$ac_cv_lib_intl_dgettext" = x""yes; then
10028   gt_cv_func_dgettext_libintl=yes
10029 else
10030   gt_cv_func_dgettext_libintl=no
10031 fi
10032
10033 fi
10034 { $as_echo "$as_me:$LINENO: result: $gt_cv_func_dgettext_libintl" >&5
10035 $as_echo "$gt_cv_func_dgettext_libintl" >&6; }
10036 fi
10037
10038           fi
10039
10040           if test "$gt_cv_func_dgettext_libintl" = "yes"; then
10041             LIBS="$LIBS -lintl";
10042           fi
10043
10044           if test "$gt_cv_func_dgettext_libc" = "yes" \
10045             || test "$gt_cv_func_dgettext_libintl" = "yes"; then
10046
10047 cat >>confdefs.h <<\_ACEOF
10048 #define HAVE_GETTEXT 1
10049 _ACEOF
10050
10051             # Extract the first word of "msgfmt", so it can be a program name with args.
10052 set dummy msgfmt; ac_word=$2
10053 { $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
10054 $as_echo_n "checking for $ac_word... " >&6; }
10055 if test "${ac_cv_path_MSGFMT+set}" = set; then
10056   $as_echo_n "(cached) " >&6
10057 else
10058   case "$MSGFMT" in
10059   /*)
10060   ac_cv_path_MSGFMT="$MSGFMT" # Let the user override the test with a path.
10061   ;;
10062   *)
10063   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
10064   for ac_dir in $PATH; do
10065     test -z "$ac_dir" && ac_dir=.
10066     if test -f $ac_dir/$ac_word; then
10067       if test -z "`$ac_dir/$ac_word -h 2>&1 | grep 'dv '`"; then
10068         ac_cv_path_MSGFMT="$ac_dir/$ac_word"
10069         break
10070       fi
10071     fi
10072   done
10073   IFS="$ac_save_ifs"
10074   test -z "$ac_cv_path_MSGFMT" && ac_cv_path_MSGFMT="no"
10075   ;;
10076 esac
10077 fi
10078 MSGFMT="$ac_cv_path_MSGFMT"
10079 if test -n "$MSGFMT"; then
10080   { $as_echo "$as_me:$LINENO: result: $MSGFMT" >&5
10081 $as_echo "$MSGFMT" >&6; }
10082 else
10083   { $as_echo "$as_me:$LINENO: result: no" >&5
10084 $as_echo "no" >&6; }
10085 fi
10086             if test "$MSGFMT" != "no"; then
10087
10088 for ac_func in dcgettext
10089 do
10090 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
10091 { $as_echo "$as_me:$LINENO: checking for $ac_func" >&5
10092 $as_echo_n "checking for $ac_func... " >&6; }
10093 if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
10094   $as_echo_n "(cached) " >&6
10095 else
10096   cat >conftest.$ac_ext <<_ACEOF
10097 /* confdefs.h.  */
10098 _ACEOF
10099 cat confdefs.h >>conftest.$ac_ext
10100 cat >>conftest.$ac_ext <<_ACEOF
10101 /* end confdefs.h.  */
10102 /* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
10103    For example, HP-UX 11i <limits.h> declares gettimeofday.  */
10104 #define $ac_func innocuous_$ac_func
10105
10106 /* System header to define __stub macros and hopefully few prototypes,
10107     which can conflict with char $ac_func (); below.
10108     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
10109     <limits.h> exists even on freestanding compilers.  */
10110
10111 #ifdef __STDC__
10112 # include <limits.h>
10113 #else
10114 # include <assert.h>
10115 #endif
10116
10117 #undef $ac_func
10118
10119 /* Override any GCC internal prototype to avoid an error.
10120    Use char because int might match the return type of a GCC
10121    builtin and then its argument prototype would still apply.  */
10122 #ifdef __cplusplus
10123 extern "C"
10124 #endif
10125 char $ac_func ();
10126 /* The GNU C library defines this for functions which it implements
10127     to always fail with ENOSYS.  Some functions are actually named
10128     something starting with __ and the normal name is an alias.  */
10129 #if defined __stub_$ac_func || defined __stub___$ac_func
10130 choke me
10131 #endif
10132
10133 int
10134 main ()
10135 {
10136 return $ac_func ();
10137   ;
10138   return 0;
10139 }
10140 _ACEOF
10141 rm -rf conftest.$ac_objext conftest$ac_exeext
10142 if { (ac_try="$ac_link"
10143 case "(($ac_try" in
10144   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10145   *) ac_try_echo=$ac_try;;
10146 esac
10147 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
10148 $as_echo "$ac_try_echo") >&5
10149   (eval "$ac_link") 2>conftest.er1
10150   ac_status=$?
10151   grep -v '^ *+' conftest.er1 >conftest.err
10152   rm -rf conftest.er1
10153   cat conftest.err >&5
10154   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
10155   (exit $ac_status); } && {
10156          test -z "$ac_c_werror_flag" ||
10157          test ! -s conftest.err
10158        } && test -s conftest$ac_exeext && {
10159          test "$cross_compiling" = yes ||
10160          $as_test_x conftest$ac_exeext
10161        }; then
10162   eval "$as_ac_var=yes"
10163 else
10164   $as_echo "$as_me: failed program was:" >&5
10165 sed 's/^/| /' conftest.$ac_ext >&5
10166
10167         eval "$as_ac_var=no"
10168 fi
10169
10170 rm -rf conftest.dSYM
10171 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
10172       conftest$ac_exeext conftest.$ac_ext
10173 fi
10174 ac_res=`eval 'as_val=${'$as_ac_var'}
10175                  $as_echo "$as_val"'`
10176                { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
10177 $as_echo "$ac_res" >&6; }
10178 as_val=`eval 'as_val=${'$as_ac_var'}
10179                  $as_echo "$as_val"'`
10180    if test "x$as_val" = x""yes; then
10181   cat >>confdefs.h <<_ACEOF
10182 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
10183 _ACEOF
10184
10185 fi
10186 done
10187
10188               # Extract the first word of "gmsgfmt", so it can be a program name with args.
10189 set dummy gmsgfmt; ac_word=$2
10190 { $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
10191 $as_echo_n "checking for $ac_word... " >&6; }
10192 if test "${ac_cv_path_GMSGFMT+set}" = set; then
10193   $as_echo_n "(cached) " >&6
10194 else
10195   case $GMSGFMT in
10196   [\\/]* | ?:[\\/]*)
10197   ac_cv_path_GMSGFMT="$GMSGFMT" # Let the user override the test with a path.
10198   ;;
10199   *)
10200   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10201 for as_dir in $PATH
10202 do
10203   IFS=$as_save_IFS
10204   test -z "$as_dir" && as_dir=.
10205   for ac_exec_ext in '' $ac_executable_extensions; do
10206   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
10207     ac_cv_path_GMSGFMT="$as_dir/$ac_word$ac_exec_ext"
10208     $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
10209     break 2
10210   fi
10211 done
10212 done
10213 IFS=$as_save_IFS
10214
10215   test -z "$ac_cv_path_GMSGFMT" && ac_cv_path_GMSGFMT="$MSGFMT"
10216   ;;
10217 esac
10218 fi
10219 GMSGFMT=$ac_cv_path_GMSGFMT
10220 if test -n "$GMSGFMT"; then
10221   { $as_echo "$as_me:$LINENO: result: $GMSGFMT" >&5
10222 $as_echo "$GMSGFMT" >&6; }
10223 else
10224   { $as_echo "$as_me:$LINENO: result: no" >&5
10225 $as_echo "no" >&6; }
10226 fi
10227
10228
10229               # Extract the first word of "xgettext", so it can be a program name with args.
10230 set dummy xgettext; ac_word=$2
10231 { $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
10232 $as_echo_n "checking for $ac_word... " >&6; }
10233 if test "${ac_cv_path_XGETTEXT+set}" = set; then
10234   $as_echo_n "(cached) " >&6
10235 else
10236   case "$XGETTEXT" in
10237   /*)
10238   ac_cv_path_XGETTEXT="$XGETTEXT" # Let the user override the test with a path.
10239   ;;
10240   *)
10241   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
10242   for ac_dir in $PATH; do
10243     test -z "$ac_dir" && ac_dir=.
10244     if test -f $ac_dir/$ac_word; then
10245       if test -z "`$ac_dir/$ac_word -h 2>&1 | grep '(HELP)'`"; then
10246         ac_cv_path_XGETTEXT="$ac_dir/$ac_word"
10247         break
10248       fi
10249     fi
10250   done
10251   IFS="$ac_save_ifs"
10252   test -z "$ac_cv_path_XGETTEXT" && ac_cv_path_XGETTEXT=":"
10253   ;;
10254 esac
10255 fi
10256 XGETTEXT="$ac_cv_path_XGETTEXT"
10257 if test -n "$XGETTEXT"; then
10258   { $as_echo "$as_me:$LINENO: result: $XGETTEXT" >&5
10259 $as_echo "$XGETTEXT" >&6; }
10260 else
10261   { $as_echo "$as_me:$LINENO: result: no" >&5
10262 $as_echo "no" >&6; }
10263 fi
10264
10265               cat >conftest.$ac_ext <<_ACEOF
10266 /* confdefs.h.  */
10267 _ACEOF
10268 cat confdefs.h >>conftest.$ac_ext
10269 cat >>conftest.$ac_ext <<_ACEOF
10270 /* end confdefs.h.  */
10271
10272 int
10273 main ()
10274 {
10275 extern int _nl_msg_cat_cntr;
10276                              return _nl_msg_cat_cntr
10277   ;
10278   return 0;
10279 }
10280 _ACEOF
10281 rm -rf conftest.$ac_objext conftest$ac_exeext
10282 if { (ac_try="$ac_link"
10283 case "(($ac_try" in
10284   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10285   *) ac_try_echo=$ac_try;;
10286 esac
10287 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
10288 $as_echo "$ac_try_echo") >&5
10289   (eval "$ac_link") 2>conftest.er1
10290   ac_status=$?
10291   grep -v '^ *+' conftest.er1 >conftest.err
10292   rm -rf conftest.er1
10293   cat conftest.err >&5
10294   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
10295   (exit $ac_status); } && {
10296          test -z "$ac_c_werror_flag" ||
10297          test ! -s conftest.err
10298        } && test -s conftest$ac_exeext && {
10299          test "$cross_compiling" = yes ||
10300          $as_test_x conftest$ac_exeext
10301        }; then
10302   CATOBJEXT=.gmo
10303                  DATADIRNAME=share
10304 else
10305   $as_echo "$as_me: failed program was:" >&5
10306 sed 's/^/| /' conftest.$ac_ext >&5
10307
10308         CATOBJEXT=.mo
10309                  DATADIRNAME=lib
10310 fi
10311
10312 rm -rf conftest.dSYM
10313 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
10314       conftest$ac_exeext conftest.$ac_ext
10315               INSTOBJEXT=.mo
10316             fi
10317           fi
10318
10319           # Added by Martin Baulig 12/15/98 for libc5 systems
10320           if test "$gt_cv_func_dgettext_libc" != "yes" \
10321             && test "$gt_cv_func_dgettext_libintl" = "yes"; then
10322             INTLLIBS=-lintl
10323             LIBS=`echo $LIBS | sed -e 's/-lintl//'`
10324           fi
10325
10326 fi
10327
10328
10329
10330       if test "$CATOBJEXT" = "NONE"; then
10331                         nls_cv_use_gnu_gettext=yes
10332       fi
10333     fi
10334
10335     if test "$nls_cv_use_gnu_gettext" != "yes"; then
10336
10337 cat >>confdefs.h <<\_ACEOF
10338 #define ENABLE_NLS 1
10339 _ACEOF
10340
10341     else
10342             CATOBJEXT=
10343     fi
10344
10345         if test "$XGETTEXT" != ":"; then
10346                   if $XGETTEXT --omit-header /dev/null 2> /dev/null; then
10347         : ;
10348       else
10349         { $as_echo "$as_me:$LINENO: result: found xgettext program is not GNU xgettext; ignore it" >&5
10350 $as_echo "found xgettext program is not GNU xgettext; ignore it" >&6; }
10351         XGETTEXT=":"
10352       fi
10353     fi
10354
10355     # We need to process the po/ directory.
10356     POSUB=po
10357
10358     ac_config_commands="$ac_config_commands default-2"
10359
10360
10361                 for lang in $ALL_LINGUAS; do
10362       GMOFILES="$GMOFILES $lang.gmo"
10363       POFILES="$POFILES $lang.po"
10364     done
10365
10366
10367
10368
10369
10370
10371
10372
10373
10374
10375
10376
10377
10378    if test "x$CATOBJEXT" != "x"; then
10379      if test "x$ALL_LINGUAS" = "x"; then
10380        LINGUAS=
10381      else
10382        { $as_echo "$as_me:$LINENO: checking for catalogs to be installed" >&5
10383 $as_echo_n "checking for catalogs to be installed... " >&6; }
10384        NEW_LINGUAS=
10385        for lang in ${LINGUAS=$ALL_LINGUAS}; do
10386          case "$ALL_LINGUAS" in
10387           *$lang*) NEW_LINGUAS="$NEW_LINGUAS $lang" ;;
10388          esac
10389        done
10390        LINGUAS=$NEW_LINGUAS
10391        { $as_echo "$as_me:$LINENO: result: $LINGUAS" >&5
10392 $as_echo "$LINGUAS" >&6; }
10393      fi
10394
10395           if test -n "$LINGUAS"; then
10396        for lang in $LINGUAS; do CATALOGS="$CATALOGS $lang$CATOBJEXT"; done
10397      fi
10398    fi
10399
10400             test -d po || mkdir po
10401    if test "$CATOBJEXT" = ".cat"; then
10402      if test "${ac_cv_header_linux_version_h+set}" = set; then
10403   { $as_echo "$as_me:$LINENO: checking for linux/version.h" >&5
10404 $as_echo_n "checking for linux/version.h... " >&6; }
10405 if test "${ac_cv_header_linux_version_h+set}" = set; then
10406   $as_echo_n "(cached) " >&6
10407 fi
10408 { $as_echo "$as_me:$LINENO: result: $ac_cv_header_linux_version_h" >&5
10409 $as_echo "$ac_cv_header_linux_version_h" >&6; }
10410 else
10411   # Is the header compilable?
10412 { $as_echo "$as_me:$LINENO: checking linux/version.h usability" >&5
10413 $as_echo_n "checking linux/version.h usability... " >&6; }
10414 cat >conftest.$ac_ext <<_ACEOF
10415 /* confdefs.h.  */
10416 _ACEOF
10417 cat confdefs.h >>conftest.$ac_ext
10418 cat >>conftest.$ac_ext <<_ACEOF
10419 /* end confdefs.h.  */
10420 $ac_includes_default
10421 #include <linux/version.h>
10422 _ACEOF
10423 rm -rf conftest.$ac_objext
10424 if { (ac_try="$ac_compile"
10425 case "(($ac_try" in
10426   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10427   *) ac_try_echo=$ac_try;;
10428 esac
10429 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
10430 $as_echo "$ac_try_echo") >&5
10431   (eval "$ac_compile") 2>conftest.er1
10432   ac_status=$?
10433   grep -v '^ *+' conftest.er1 >conftest.err
10434   rm -rf conftest.er1
10435   cat conftest.err >&5
10436   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
10437   (exit $ac_status); } && {
10438          test -z "$ac_c_werror_flag" ||
10439          test ! -s conftest.err
10440        } && test -s conftest.$ac_objext; then
10441   ac_header_compiler=yes
10442 else
10443   $as_echo "$as_me: failed program was:" >&5
10444 sed 's/^/| /' conftest.$ac_ext >&5
10445
10446         ac_header_compiler=no
10447 fi
10448
10449 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10450 { $as_echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
10451 $as_echo "$ac_header_compiler" >&6; }
10452
10453 # Is the header present?
10454 { $as_echo "$as_me:$LINENO: checking linux/version.h presence" >&5
10455 $as_echo_n "checking linux/version.h presence... " >&6; }
10456 cat >conftest.$ac_ext <<_ACEOF
10457 /* confdefs.h.  */
10458 _ACEOF
10459 cat confdefs.h >>conftest.$ac_ext
10460 cat >>conftest.$ac_ext <<_ACEOF
10461 /* end confdefs.h.  */
10462 #include <linux/version.h>
10463 _ACEOF
10464 if { (ac_try="$ac_cpp conftest.$ac_ext"
10465 case "(($ac_try" in
10466   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10467   *) ac_try_echo=$ac_try;;
10468 esac
10469 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
10470 $as_echo "$ac_try_echo") >&5
10471   (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
10472   ac_status=$?
10473   grep -v '^ *+' conftest.er1 >conftest.err
10474   rm -rf conftest.er1
10475   cat conftest.err >&5
10476   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
10477   (exit $ac_status); } >/dev/null && {
10478          test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
10479          test ! -s conftest.err
10480        }; then
10481   ac_header_preproc=yes
10482 else
10483   $as_echo "$as_me: failed program was:" >&5
10484 sed 's/^/| /' conftest.$ac_ext >&5
10485
10486   ac_header_preproc=no
10487 fi
10488
10489 rm -rf conftest.err conftest.$ac_ext
10490 { $as_echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
10491 $as_echo "$ac_header_preproc" >&6; }
10492
10493 # So?  What about this header?
10494 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
10495   yes:no: )
10496     { $as_echo "$as_me:$LINENO: WARNING: linux/version.h: accepted by the compiler, rejected by the preprocessor!" >&5
10497 $as_echo "$as_me: WARNING: linux/version.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
10498     { $as_echo "$as_me:$LINENO: WARNING: linux/version.h: proceeding with the compiler's result" >&5
10499 $as_echo "$as_me: WARNING: linux/version.h: proceeding with the compiler's result" >&2;}
10500     ac_header_preproc=yes
10501     ;;
10502   no:yes:* )
10503     { $as_echo "$as_me:$LINENO: WARNING: linux/version.h: present but cannot be compiled" >&5
10504 $as_echo "$as_me: WARNING: linux/version.h: present but cannot be compiled" >&2;}
10505     { $as_echo "$as_me:$LINENO: WARNING: linux/version.h:     check for missing prerequisite headers?" >&5
10506 $as_echo "$as_me: WARNING: linux/version.h:     check for missing prerequisite headers?" >&2;}
10507     { $as_echo "$as_me:$LINENO: WARNING: linux/version.h: see the Autoconf documentation" >&5
10508 $as_echo "$as_me: WARNING: linux/version.h: see the Autoconf documentation" >&2;}
10509     { $as_echo "$as_me:$LINENO: WARNING: linux/version.h:     section \"Present But Cannot Be Compiled\"" >&5
10510 $as_echo "$as_me: WARNING: linux/version.h:     section \"Present But Cannot Be Compiled\"" >&2;}
10511     { $as_echo "$as_me:$LINENO: WARNING: linux/version.h: proceeding with the preprocessor's result" >&5
10512 $as_echo "$as_me: WARNING: linux/version.h: proceeding with the preprocessor's result" >&2;}
10513     { $as_echo "$as_me:$LINENO: WARNING: linux/version.h: in the future, the compiler will take precedence" >&5
10514 $as_echo "$as_me: WARNING: linux/version.h: in the future, the compiler will take precedence" >&2;}
10515
10516     ;;
10517 esac
10518 { $as_echo "$as_me:$LINENO: checking for linux/version.h" >&5
10519 $as_echo_n "checking for linux/version.h... " >&6; }
10520 if test "${ac_cv_header_linux_version_h+set}" = set; then
10521   $as_echo_n "(cached) " >&6
10522 else
10523   ac_cv_header_linux_version_h=$ac_header_preproc
10524 fi
10525 { $as_echo "$as_me:$LINENO: result: $ac_cv_header_linux_version_h" >&5
10526 $as_echo "$ac_cv_header_linux_version_h" >&6; }
10527
10528 fi
10529 if test "x$ac_cv_header_linux_version_h" = x""yes; then
10530   msgformat=linux
10531 else
10532   msgformat=xopen
10533 fi
10534
10535
10536
10537                sed -e '/^#/d' $srcdir/po/$msgformat-msg.sed > po/po2msg.sed
10538    fi
10539
10540             MKINSTALLDIRS=
10541 #
10542 # jwz: fuck this!  it puts hardcoded pathnames into the generated Makefiles!
10543 #
10544 #   if test -n "$ac_aux_dir"; then
10545 #     MKINSTALLDIRS="$ac_aux_dir/mkinstalldirs"
10546 #   fi
10547    if test -z "$MKINSTALLDIRS"; then
10548      MKINSTALLDIRS="\$(top_srcdir)/mkinstalldirs"
10549    fi
10550
10551    # jwz: you know what, screw it.  Let's just use the version that I
10552    # already computed in configure.in, instead of this version that came
10553    # with the i18n crud, ok?
10554    MKINSTALLDIRS="$INSTALL_DIRS"
10555
10556
10557
10558
10559          test -d po || mkdir po
10560    if test "x$srcdir" != "x."; then
10561      if test "x`echo $srcdir | sed 's@/.*@@'`" = "x"; then
10562        posrcprefix="$srcdir/"
10563      else
10564        posrcprefix="../$srcdir/"
10565      fi
10566    else
10567      posrcprefix="../"
10568    fi
10569    rm -f po/POTFILES
10570    sed -e "/^#/d" -e "/^\$/d" -e "s,.*, $posrcprefix& \\\\," -e "\$s/\(.*\) \\\\/\1/" \
10571         < $srcdir/po/POTFILES.in > po/POTFILES
10572
10573 MKINSTALLDIRS="$INSTALL_DIRS"
10574
10575
10576 ###############################################################################
10577 #
10578 #       Check for -lXmu (some fucked up vendors don't ship it...)
10579 #
10580 ###############################################################################
10581
10582 have_xmu=no
10583
10584   ac_save_CPPFLAGS="$CPPFLAGS"
10585   if test \! -z "$includedir" ; then
10586     CPPFLAGS="$CPPFLAGS -I$includedir"
10587   fi
10588   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
10589   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
10590   { $as_echo "$as_me:$LINENO: checking for X11/Xmu/Error.h" >&5
10591 $as_echo_n "checking for X11/Xmu/Error.h... " >&6; }
10592 if test "${ac_cv_header_X11_Xmu_Error_h+set}" = set; then
10593   $as_echo_n "(cached) " >&6
10594 else
10595   cat >conftest.$ac_ext <<_ACEOF
10596 /* confdefs.h.  */
10597 _ACEOF
10598 cat confdefs.h >>conftest.$ac_ext
10599 cat >>conftest.$ac_ext <<_ACEOF
10600 /* end confdefs.h.  */
10601 #include <stdlib.h>
10602                    #include <stdio.h>
10603                    #include <X11/Intrinsic.h>
10604
10605 #include <X11/Xmu/Error.h>
10606 _ACEOF
10607 rm -rf conftest.$ac_objext
10608 if { (ac_try="$ac_compile"
10609 case "(($ac_try" in
10610   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10611   *) ac_try_echo=$ac_try;;
10612 esac
10613 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
10614 $as_echo "$ac_try_echo") >&5
10615   (eval "$ac_compile") 2>conftest.er1
10616   ac_status=$?
10617   grep -v '^ *+' conftest.er1 >conftest.err
10618   rm -rf conftest.er1
10619   cat conftest.err >&5
10620   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
10621   (exit $ac_status); } && {
10622          test -z "$ac_c_werror_flag" ||
10623          test ! -s conftest.err
10624        } && test -s conftest.$ac_objext; then
10625   ac_cv_header_X11_Xmu_Error_h=yes
10626 else
10627   $as_echo "$as_me: failed program was:" >&5
10628 sed 's/^/| /' conftest.$ac_ext >&5
10629
10630         ac_cv_header_X11_Xmu_Error_h=no
10631 fi
10632
10633 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10634 fi
10635 { $as_echo "$as_me:$LINENO: result: $ac_cv_header_X11_Xmu_Error_h" >&5
10636 $as_echo "$ac_cv_header_X11_Xmu_Error_h" >&6; }
10637 if test "x$ac_cv_header_X11_Xmu_Error_h" = x""yes; then
10638   have_xmu=yes
10639 fi
10640
10641
10642   CPPFLAGS="$ac_save_CPPFLAGS"
10643 if test "$have_xmu" = no ; then
10644   XMU_SRCS='$(UTILS_SRC)/xmu.c'
10645   XMU_OBJS='$(UTILS_BIN)/xmu.o'
10646   XMU_LIBS=''
10647 else
10648   XMU_SRCS=''
10649   XMU_OBJS=''
10650   XMU_LIBS='-lXmu'
10651   cat >>confdefs.h <<\_ACEOF
10652 #define HAVE_XMU 1
10653 _ACEOF
10654
10655 fi
10656
10657
10658 ###############################################################################
10659 #
10660 #       Check for the SunOS 4.1.x _get_wmShellWidgetClass bug.
10661 #       See comp.windows.x FAQ question 124.  The right fix is to
10662 #       get OpenWindows 3.0 patches 100512-02 and 100573-03.
10663 #
10664 ###############################################################################
10665
10666 if test "$have_xmu" = yes ; then
10667   case "$host" in
10668     *-sunos4*)
10669     { $as_echo "$as_me:$LINENO: checking for the SunOS 4.1.x _get_wmShellWidgetClass bug" >&5
10670 $as_echo_n "checking for the SunOS 4.1.x _get_wmShellWidgetClass bug... " >&6; }
10671 if test "${ac_cv_sunos_xmu_bug+set}" = set; then
10672   $as_echo_n "(cached) " >&6
10673 else
10674   ac_save_LDFLAGS="$LDFLAGS"
10675                     if test \! -z "$x_libraries" ; then
10676                       LDFLAGS="$LDFLAGS -L$x_libraries"
10677                     fi
10678                     # Note: this trick never works!  (Generally.)
10679                     # We're only getting away with using AC_TRY_LINK
10680                     # with X libraries because we know it's SunOS.
10681                     LDFLAGS="$LDFLAGS -lXmu -lXt -lX11 -lXext -lm"
10682                     cat >conftest.$ac_ext <<_ACEOF
10683 /* confdefs.h.  */
10684 _ACEOF
10685 cat confdefs.h >>conftest.$ac_ext
10686 cat >>conftest.$ac_ext <<_ACEOF
10687 /* end confdefs.h.  */
10688
10689 int
10690 main ()
10691 {
10692
10693   ;
10694   return 0;
10695 }
10696 _ACEOF
10697 rm -rf conftest.$ac_objext conftest$ac_exeext
10698 if { (ac_try="$ac_link"
10699 case "(($ac_try" in
10700   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10701   *) ac_try_echo=$ac_try;;
10702 esac
10703 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
10704 $as_echo "$ac_try_echo") >&5
10705   (eval "$ac_link") 2>conftest.er1
10706   ac_status=$?
10707   grep -v '^ *+' conftest.er1 >conftest.err
10708   rm -rf conftest.er1
10709   cat conftest.err >&5
10710   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
10711   (exit $ac_status); } && {
10712          test -z "$ac_c_werror_flag" ||
10713          test ! -s conftest.err
10714        } && test -s conftest$ac_exeext && {
10715          test "$cross_compiling" = yes ||
10716          $as_test_x conftest$ac_exeext
10717        }; then
10718   ac_cv_sunos_xmu_bug=no
10719 else
10720   $as_echo "$as_me: failed program was:" >&5
10721 sed 's/^/| /' conftest.$ac_ext >&5
10722
10723         ac_cv_sunos_xmu_bug=yes
10724 fi
10725
10726 rm -rf conftest.dSYM
10727 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
10728       conftest$ac_exeext conftest.$ac_ext
10729                     LDFLAGS="$ac_save_LDFLAGS"
10730 fi
10731 { $as_echo "$as_me:$LINENO: result: $ac_cv_sunos_xmu_bug" >&5
10732 $as_echo "$ac_cv_sunos_xmu_bug" >&6; }
10733     if test "$ac_cv_sunos_xmu_bug" = yes ; then
10734       { $as_echo "$as_me:$LINENO: checking whether the compiler understands -static" >&5
10735 $as_echo_n "checking whether the compiler understands -static... " >&6; }
10736 if test "${ac_cv_ld_static+set}" = set; then
10737   $as_echo_n "(cached) " >&6
10738 else
10739   ac_save_LDFLAGS="$LDFLAGS"
10740                       LDFLAGS="$LDFLAGS -static"
10741                       cat >conftest.$ac_ext <<_ACEOF
10742 /* confdefs.h.  */
10743 _ACEOF
10744 cat confdefs.h >>conftest.$ac_ext
10745 cat >>conftest.$ac_ext <<_ACEOF
10746 /* end confdefs.h.  */
10747
10748 int
10749 main ()
10750 {
10751
10752   ;
10753   return 0;
10754 }
10755 _ACEOF
10756 rm -rf conftest.$ac_objext conftest$ac_exeext
10757 if { (ac_try="$ac_link"
10758 case "(($ac_try" in
10759   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10760   *) ac_try_echo=$ac_try;;
10761 esac
10762 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
10763 $as_echo "$ac_try_echo") >&5
10764   (eval "$ac_link") 2>conftest.er1
10765   ac_status=$?
10766   grep -v '^ *+' conftest.er1 >conftest.err
10767   rm -rf conftest.er1
10768   cat conftest.err >&5
10769   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
10770   (exit $ac_status); } && {
10771          test -z "$ac_c_werror_flag" ||
10772          test ! -s conftest.err
10773        } && test -s conftest$ac_exeext && {
10774          test "$cross_compiling" = yes ||
10775          $as_test_x conftest$ac_exeext
10776        }; then
10777   ac_cv_ld_static=yes
10778 else
10779   $as_echo "$as_me: failed program was:" >&5
10780 sed 's/^/| /' conftest.$ac_ext >&5
10781
10782         ac_cv_ld_static=no
10783 fi
10784
10785 rm -rf conftest.dSYM
10786 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
10787       conftest$ac_exeext conftest.$ac_ext
10788                     LDFLAGS="$ac_save_LDFLAGS"
10789 fi
10790 { $as_echo "$as_me:$LINENO: result: $ac_cv_ld_static" >&5
10791 $as_echo "$ac_cv_ld_static" >&6; }
10792       if test "$ac_cv_ld_static" = yes ; then
10793         LDFLAGS="$LDFLAGS -static"
10794       else
10795         LDFLAGS="$LDFLAGS -Bstatic"
10796       fi
10797     fi
10798     ;;
10799   esac
10800 fi
10801
10802
10803 ###############################################################################
10804 #
10805 #       Handle the --with-hackdir option
10806 #
10807 ###############################################################################
10808
10809 have_hackdir=yes
10810 with_hackdir_req=unspecified
10811
10812 # Check whether --with-hackdir was given.
10813 if test "${with_hackdir+set}" = set; then
10814   withval=$with_hackdir; with_hackdir="$withval"; with_hackdir_req="$withval"
10815 else
10816   with_hackdir=yes
10817 fi
10818
10819
10820 if test x"$with_hackdir" = xyes; then
10821   HACKDIR='${libexecdir}/xscreensaver'
10822 elif test x"$with_hackdir" = xno; then
10823   HACKDIR='${bindir}'
10824 else
10825   HACKDIR=$with_hackdir
10826 fi
10827
10828 # canonicalize slashes.
10829 HACKDIR=`echo "${HACKDIR}" | sed 's@/$@@;s@//*@/@g'`
10830
10831 # Expand HACKDIR as HACKDIR_FULL
10832 HACKDIR_FULL=`eval eval eval eval eval eval eval eval eval echo $HACKDIR`
10833
10834 # This option used to be called --enable-subdir; make sure that is no longer
10835 # used, since configure brain-damagedly ignores unknown --enable options.
10836
10837 obsolete_enable=
10838 # Check whether --enable-subdir was given.
10839 if test "${enable_subdir+set}" = set; then
10840   enableval=$enable_subdir; obsolete_enable=yes
10841 fi
10842
10843 if test -n "$obsolete_enable"; then
10844   echo "error: the --enable-subdir option has been replaced with"
10845   echo "       the new --with-hackdir option; see \`configure --help'"
10846   echo "       for more information."
10847   exit 1
10848 fi
10849
10850
10851 ###############################################################################
10852 #
10853 #       Handle the --with-configdir option
10854 #       Help for --with-x-app-defaults option added.
10855 #
10856 ###############################################################################
10857
10858 have_configdir=yes
10859 with_configdir_req=unspecified
10860
10861 # Check whether --with-configdir was given.
10862 if test "${with_configdir+set}" = set; then
10863   withval=$with_configdir; with_configdir="$withval"; with_configdir_req="$withval"
10864 else
10865   with_configdir=yes
10866 fi
10867
10868
10869 if test x"$with_configdir" = xyes; then
10870   HACK_CONF_DIR='${datadir}/xscreensaver/config'
10871 elif test x"$with_configdir" = xno; then
10872   echo "error: must be yes, or a pathname: --with-configdir=$with_configdir"
10873   exit 1
10874 else
10875   # there must be a better way than this...
10876   if test -z "`echo $with_configdir | sed 's@^/.*@@'`" ; then
10877     # absolute path
10878     HACK_CONF_DIR=$with_configdir
10879   else
10880     # relative path
10881     HACK_CONF_DIR="\${exec_prefix}$with_configdir"
10882   fi
10883 fi
10884
10885
10886
10887
10888 ###############################################################################
10889 #
10890 #       Check for the SGI SCREEN_SAVER server extension.
10891 #
10892 ###############################################################################
10893
10894 #have_sgi=no
10895 #with_sgi_req=unspecified
10896 #AC_ARG_WITH(sgi-ext,
10897 #[Except where noted, all of the --with options below can also take a
10898 #directory argument: for example, `--with-motif=/opt/Motif'.  That would
10899 #cause /opt/Motif/include/ to be added to the -I list, and /opt/Motif/lib/
10900 #to be added to the -L list, assuming those directories exist.
10901 #
10902 #By default, support for each of these options will be built in, if the
10903 #relevant library routines exist.  At run time, they will then be used
10904 #only if the X server being used supports them.  Each --with option has
10905 #a corresponding --without option, to override building support for them
10906 #at all.
10907 #
10908 #Screen blanking and idle-detection options:
10909 #
10910 #  --with-sgi-ext          Include support for the SGI SCREEN_SAVER extension.],
10911 #  [with_sgi="$withval"; with_sgi_req="$withval"],[with_sgi=yes])
10912 #
10913 #HANDLE_X_PATH_ARG(with_sgi, --with-sgi-ext, SGI SCREEN_SAVER)
10914 #
10915 #if test "$with_sgi" = yes; then
10916 #  AC_CHECK_X_HEADER(X11/extensions/XScreenSaver.h,
10917 #                    [have_sgi=yes
10918 #                     AC_DEFINE(HAVE_SGI_SAVER_EXTENSION)],,
10919 #                    [#include <X11/Xlib.h>])
10920 #
10921 #elif test "$with_sgi" != no; then
10922 #  echo "error: must be yes or no: --with-sgi-ext=$with_sgi"
10923 #  exit 1
10924 #fi
10925
10926
10927 ###############################################################################
10928 #
10929 #       Check for the XIDLE server extension.
10930 #
10931 ###############################################################################
10932
10933 #have_xidle=no
10934 #with_xidle_req=unspecified
10935 #AC_ARG_WITH(xidle-ext,
10936 #[  --with-xidle-ext        Include support for the XIDLE extension.],
10937 #  [with_xidle="$withval"; with_xidle_req="$withval"],[with_xidle=yes])
10938 #
10939 #HANDLE_X_PATH_ARG(with_xidle, --with-xidle-ext, XIDLE)
10940 #
10941 #if test "$with_xidle" = yes; then
10942 #  AC_CHECK_X_HEADER(X11/extensions/xidle.h,
10943 #                    [have_xidle=yes
10944 #                     AC_DEFINE(HAVE_XIDLE_EXTENSION)],,
10945 #                    [#include <X11/Xlib.h>])
10946 #elif test "$with_xidle" != no; then
10947 #  echo "error: must be yes or no: --with-xidle-ext=$with_xidle"
10948 #  exit 1
10949 #fi
10950
10951
10952 ###############################################################################
10953 #
10954 #       Check for the SGI-VIDEO-CONTROL server extension.
10955 #
10956 ###############################################################################
10957
10958 #have_sgivc=no
10959 #with_sgivc_req=unspecified
10960 #AC_ARG_WITH(sgivc-ext,
10961 #[  --with-sgivc-ext        Include support for the SGI-VIDEO-CONTROL extension.],
10962 #  [with_sgivc="$withval"; with_sgivc_req="$withval"],[with_sgivc=yes])
10963 #
10964 #HANDLE_X_PATH_ARG(with_sgivc, --with-sgivc-ext, SGI-VIDEO-CONTROL)
10965 #
10966 #if test "$with_sgivc" = yes; then
10967 #
10968 #  # first check for XSGIvc.h
10969 #  AC_CHECK_X_HEADER(X11/extensions/XSGIvc.h, [have_sgivc=yes],,
10970 #                    [#include <X11/Xlib.h>])
10971 #
10972 #  # if that succeeded, then check for the -lXsgivc
10973 #  if test "$have_sgivc" = yes; then
10974 #    have_sgivc=no
10975 #    AC_CHECK_X_LIB(Xsgivc, XSGIvcQueryGammaMap,
10976 #                  [have_sgivc=yes; SAVER_LIBS="$SAVER_LIBS -lXsgivc"], [true],
10977 #                  -lXext -lX11)
10978 #  fi
10979 #
10980 #  # if that succeeded, then we've really got it.
10981 #  if test "$have_sgivc" = yes; then
10982 #    AC_DEFINE(HAVE_SGI_VC_EXTENSION)
10983 #  fi
10984 #
10985 #elif test "$with_sgivc" != no; then
10986 #  echo "error: must be yes or no: --with-sgivc-ext=$with_sgivc"
10987 #  exit 1
10988 #fi
10989
10990
10991 ###############################################################################
10992 #
10993 #       Check for the DPMS server extension.
10994 #
10995 ###############################################################################
10996
10997 have_dpms=no
10998 with_dpms_req=unspecified
10999
11000 # Check whether --with-dpms-ext was given.
11001 if test "${with_dpms_ext+set}" = set; then
11002   withval=$with_dpms_ext; with_dpms="$withval"; with_dpms_req="$withval"
11003 else
11004   with_dpms=yes
11005 fi
11006
11007
11008
11009    case "$with_dpms" in
11010     yes) ;;
11011     no)  ;;
11012
11013     /*)
11014      { $as_echo "$as_me:$LINENO: checking for DPMS headers" >&5
11015 $as_echo_n "checking for DPMS headers... " >&6; }
11016      d=$with_dpms/include
11017      if test -d $d; then
11018        X_CFLAGS="-I$d $X_CFLAGS"
11019        { $as_echo "$as_me:$LINENO: result: $d" >&5
11020 $as_echo "$d" >&6; }
11021      else
11022        { $as_echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
11023 $as_echo "not found ($d: no such directory)" >&6; }
11024      fi
11025
11026      { $as_echo "$as_me:$LINENO: checking for DPMS libs" >&5
11027 $as_echo_n "checking for DPMS libs... " >&6; }
11028      d=$with_dpms/lib
11029      if test -d $d; then
11030        X_LIBS="-L$d $X_LIBS"
11031        { $as_echo "$as_me:$LINENO: result: $d" >&5
11032 $as_echo "$d" >&6; }
11033      else
11034        { $as_echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
11035 $as_echo "not found ($d: no such directory)" >&6; }
11036      fi
11037
11038      # replace the directory string with "yes".
11039      with_dpms_req="yes"
11040      with_dpms=$with_dpms_req
11041      ;;
11042
11043     *)
11044      echo ""
11045      echo "error: argument to --with-dpms-ext must be \"yes\", \"no\", or a directory."
11046      echo "       If it is a directory, then \`DIR/include' will be added to"
11047      echo "       the -I list, and \`DIR/lib' will be added to the -L list."
11048      exit 1
11049      ;;
11050    esac
11051
11052
11053 if test "$with_dpms" = yes; then
11054
11055   # first check for dpms.h
11056
11057   ac_save_CPPFLAGS="$CPPFLAGS"
11058   if test \! -z "$includedir" ; then
11059     CPPFLAGS="$CPPFLAGS -I$includedir"
11060   fi
11061   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
11062   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
11063   { $as_echo "$as_me:$LINENO: checking for X11/extensions/dpms.h" >&5
11064 $as_echo_n "checking for X11/extensions/dpms.h... " >&6; }
11065 if test "${ac_cv_header_X11_extensions_dpms_h+set}" = set; then
11066   $as_echo_n "(cached) " >&6
11067 else
11068   cat >conftest.$ac_ext <<_ACEOF
11069 /* confdefs.h.  */
11070 _ACEOF
11071 cat confdefs.h >>conftest.$ac_ext
11072 cat >>conftest.$ac_ext <<_ACEOF
11073 /* end confdefs.h.  */
11074 #include <X11/Xlib.h>
11075                      #include <X11/Xmd.h>
11076
11077 #include <X11/extensions/dpms.h>
11078 _ACEOF
11079 rm -rf conftest.$ac_objext
11080 if { (ac_try="$ac_compile"
11081 case "(($ac_try" in
11082   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11083   *) ac_try_echo=$ac_try;;
11084 esac
11085 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
11086 $as_echo "$ac_try_echo") >&5
11087   (eval "$ac_compile") 2>conftest.er1
11088   ac_status=$?
11089   grep -v '^ *+' conftest.er1 >conftest.err
11090   rm -rf conftest.er1
11091   cat conftest.err >&5
11092   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
11093   (exit $ac_status); } && {
11094          test -z "$ac_c_werror_flag" ||
11095          test ! -s conftest.err
11096        } && test -s conftest.$ac_objext; then
11097   ac_cv_header_X11_extensions_dpms_h=yes
11098 else
11099   $as_echo "$as_me: failed program was:" >&5
11100 sed 's/^/| /' conftest.$ac_ext >&5
11101
11102         ac_cv_header_X11_extensions_dpms_h=no
11103 fi
11104
11105 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11106 fi
11107 { $as_echo "$as_me:$LINENO: result: $ac_cv_header_X11_extensions_dpms_h" >&5
11108 $as_echo "$ac_cv_header_X11_extensions_dpms_h" >&6; }
11109 if test "x$ac_cv_header_X11_extensions_dpms_h" = x""yes; then
11110   have_dpms=yes
11111 fi
11112
11113
11114   CPPFLAGS="$ac_save_CPPFLAGS"
11115
11116   # if that succeeded, then check for the DPMS code in the libraries
11117   if test "$have_dpms" = yes; then
11118
11119     # first look in -lXext (this is where it is with XFree86 4.0)
11120     have_dpms=no
11121
11122   ac_save_CPPFLAGS="$CPPFLAGS"
11123   ac_save_LDFLAGS="$LDFLAGS"
11124 #  ac_save_LIBS="$LIBS"
11125
11126   if test \! -z "$includedir" ; then
11127     CPPFLAGS="$CPPFLAGS -I$includedir"
11128   fi
11129   # note: $X_CFLAGS includes $x_includes
11130   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
11131
11132   if test \! -z "$libdir" ; then
11133     LDFLAGS="$LDFLAGS -L$libdir"
11134   fi
11135   # note: $X_LIBS includes $x_libraries
11136   LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
11137
11138   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
11139   LDFLAGS=`eval eval eval eval eval eval eval eval eval echo $LDFLAGS`
11140   { $as_echo "$as_me:$LINENO: checking for DPMSInfo in -lXext" >&5
11141 $as_echo_n "checking for DPMSInfo in -lXext... " >&6; }
11142 if test "${ac_cv_lib_Xext_DPMSInfo+set}" = set; then
11143   $as_echo_n "(cached) " >&6
11144 else
11145   ac_check_lib_save_LIBS=$LIBS
11146 LIBS="-lXext -lXext -lX11 $LIBS"
11147 cat >conftest.$ac_ext <<_ACEOF
11148 /* confdefs.h.  */
11149 _ACEOF
11150 cat confdefs.h >>conftest.$ac_ext
11151 cat >>conftest.$ac_ext <<_ACEOF
11152 /* end confdefs.h.  */
11153
11154 /* Override any GCC internal prototype to avoid an error.
11155    Use char because int might match the return type of a GCC
11156    builtin and then its argument prototype would still apply.  */
11157 #ifdef __cplusplus
11158 extern "C"
11159 #endif
11160 char DPMSInfo ();
11161 int
11162 main ()
11163 {
11164 return DPMSInfo ();
11165   ;
11166   return 0;
11167 }
11168 _ACEOF
11169 rm -rf conftest.$ac_objext conftest$ac_exeext
11170 if { (ac_try="$ac_link"
11171 case "(($ac_try" in
11172   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11173   *) ac_try_echo=$ac_try;;
11174 esac
11175 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
11176 $as_echo "$ac_try_echo") >&5
11177   (eval "$ac_link") 2>conftest.er1
11178   ac_status=$?
11179   grep -v '^ *+' conftest.er1 >conftest.err
11180   rm -rf conftest.er1
11181   cat conftest.err >&5
11182   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
11183   (exit $ac_status); } && {
11184          test -z "$ac_c_werror_flag" ||
11185          test ! -s conftest.err
11186        } && test -s conftest$ac_exeext && {
11187          test "$cross_compiling" = yes ||
11188          $as_test_x conftest$ac_exeext
11189        }; then
11190   ac_cv_lib_Xext_DPMSInfo=yes
11191 else
11192   $as_echo "$as_me: failed program was:" >&5
11193 sed 's/^/| /' conftest.$ac_ext >&5
11194
11195         ac_cv_lib_Xext_DPMSInfo=no
11196 fi
11197
11198 rm -rf conftest.dSYM
11199 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
11200       conftest$ac_exeext conftest.$ac_ext
11201 LIBS=$ac_check_lib_save_LIBS
11202 fi
11203 { $as_echo "$as_me:$LINENO: result: $ac_cv_lib_Xext_DPMSInfo" >&5
11204 $as_echo "$ac_cv_lib_Xext_DPMSInfo" >&6; }
11205 if test "x$ac_cv_lib_Xext_DPMSInfo" = x""yes; then
11206   have_dpms=yes
11207 else
11208   true
11209 fi
11210
11211   CPPFLAGS="$ac_save_CPPFLAGS"
11212   LDFLAGS="$ac_save_LDFLAGS"
11213 #  LIBS="$ac_save_LIBS"
11214
11215
11216     # if that failed, look in -lXdpms (this is where it was in XFree86 3.x)
11217     if test "$have_dpms" = no; then
11218
11219   ac_save_CPPFLAGS="$CPPFLAGS"
11220   ac_save_LDFLAGS="$LDFLAGS"
11221 #  ac_save_LIBS="$LIBS"
11222
11223   if test \! -z "$includedir" ; then
11224     CPPFLAGS="$CPPFLAGS -I$includedir"
11225   fi
11226   # note: $X_CFLAGS includes $x_includes
11227   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
11228
11229   if test \! -z "$libdir" ; then
11230     LDFLAGS="$LDFLAGS -L$libdir"
11231   fi
11232   # note: $X_LIBS includes $x_libraries
11233   LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
11234
11235   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
11236   LDFLAGS=`eval eval eval eval eval eval eval eval eval echo $LDFLAGS`
11237   { $as_echo "$as_me:$LINENO: checking for DPMSInfo in -lXdpms" >&5
11238 $as_echo_n "checking for DPMSInfo in -lXdpms... " >&6; }
11239 if test "${ac_cv_lib_Xdpms_DPMSInfo+set}" = set; then
11240   $as_echo_n "(cached) " >&6
11241 else
11242   ac_check_lib_save_LIBS=$LIBS
11243 LIBS="-lXdpms -lXext -lX11 $LIBS"
11244 cat >conftest.$ac_ext <<_ACEOF
11245 /* confdefs.h.  */
11246 _ACEOF
11247 cat confdefs.h >>conftest.$ac_ext
11248 cat >>conftest.$ac_ext <<_ACEOF
11249 /* end confdefs.h.  */
11250
11251 /* Override any GCC internal prototype to avoid an error.
11252    Use char because int might match the return type of a GCC
11253    builtin and then its argument prototype would still apply.  */
11254 #ifdef __cplusplus
11255 extern "C"
11256 #endif
11257 char DPMSInfo ();
11258 int
11259 main ()
11260 {
11261 return DPMSInfo ();
11262   ;
11263   return 0;
11264 }
11265 _ACEOF
11266 rm -rf conftest.$ac_objext conftest$ac_exeext
11267 if { (ac_try="$ac_link"
11268 case "(($ac_try" in
11269   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11270   *) ac_try_echo=$ac_try;;
11271 esac
11272 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
11273 $as_echo "$ac_try_echo") >&5
11274   (eval "$ac_link") 2>conftest.er1
11275   ac_status=$?
11276   grep -v '^ *+' conftest.er1 >conftest.err
11277   rm -rf conftest.er1
11278   cat conftest.err >&5
11279   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
11280   (exit $ac_status); } && {
11281          test -z "$ac_c_werror_flag" ||
11282          test ! -s conftest.err
11283        } && test -s conftest$ac_exeext && {
11284          test "$cross_compiling" = yes ||
11285          $as_test_x conftest$ac_exeext
11286        }; then
11287   ac_cv_lib_Xdpms_DPMSInfo=yes
11288 else
11289   $as_echo "$as_me: failed program was:" >&5
11290 sed 's/^/| /' conftest.$ac_ext >&5
11291
11292         ac_cv_lib_Xdpms_DPMSInfo=no
11293 fi
11294
11295 rm -rf conftest.dSYM
11296 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
11297       conftest$ac_exeext conftest.$ac_ext
11298 LIBS=$ac_check_lib_save_LIBS
11299 fi
11300 { $as_echo "$as_me:$LINENO: result: $ac_cv_lib_Xdpms_DPMSInfo" >&5
11301 $as_echo "$ac_cv_lib_Xdpms_DPMSInfo" >&6; }
11302 if test "x$ac_cv_lib_Xdpms_DPMSInfo" = x""yes; then
11303   have_dpms=yes; XDPMS_LIBS="-lXdpms"
11304 else
11305   true
11306 fi
11307
11308   CPPFLAGS="$ac_save_CPPFLAGS"
11309   LDFLAGS="$ac_save_LDFLAGS"
11310 #  LIBS="$ac_save_LIBS"
11311
11312     fi
11313   fi
11314
11315
11316   # if that succeeded, then we've really got it.
11317   if test "$have_dpms" = yes; then
11318     cat >>confdefs.h <<\_ACEOF
11319 #define HAVE_DPMS_EXTENSION 1
11320 _ACEOF
11321
11322   fi
11323
11324 elif test "$with_dpms" != no; then
11325   echo "error: must be yes or no: --with-dpms-ext=$with_dpms"
11326   exit 1
11327 fi
11328
11329
11330 ###############################################################################
11331 #
11332 #       Check for the XINERAMA server extension.
11333 #
11334 ###############################################################################
11335
11336 have_xinerama=no
11337 with_xinerama_req=unspecified
11338
11339 # Check whether --with-xinerama-ext was given.
11340 if test "${with_xinerama_ext+set}" = set; then
11341   withval=$with_xinerama_ext; with_xinerama="$withval"; with_xinerama_req="$withval"
11342 else
11343   with_xinerama=yes
11344 fi
11345
11346
11347
11348    case "$with_xinerama" in
11349     yes) ;;
11350     no)  ;;
11351
11352     /*)
11353      { $as_echo "$as_me:$LINENO: checking for XINERAMA headers" >&5
11354 $as_echo_n "checking for XINERAMA headers... " >&6; }
11355      d=$with_xinerama/include
11356      if test -d $d; then
11357        X_CFLAGS="-I$d $X_CFLAGS"
11358        { $as_echo "$as_me:$LINENO: result: $d" >&5
11359 $as_echo "$d" >&6; }
11360      else
11361        { $as_echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
11362 $as_echo "not found ($d: no such directory)" >&6; }
11363      fi
11364
11365      { $as_echo "$as_me:$LINENO: checking for XINERAMA libs" >&5
11366 $as_echo_n "checking for XINERAMA libs... " >&6; }
11367      d=$with_xinerama/lib
11368      if test -d $d; then
11369        X_LIBS="-L$d $X_LIBS"
11370        { $as_echo "$as_me:$LINENO: result: $d" >&5
11371 $as_echo "$d" >&6; }
11372      else
11373        { $as_echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
11374 $as_echo "not found ($d: no such directory)" >&6; }
11375      fi
11376
11377      # replace the directory string with "yes".
11378      with_xinerama_req="yes"
11379      with_xinerama=$with_xinerama_req
11380      ;;
11381
11382     *)
11383      echo ""
11384      echo "error: argument to --with-xinerama-ext must be \"yes\", \"no\", or a directory."
11385      echo "       If it is a directory, then \`DIR/include' will be added to"
11386      echo "       the -I list, and \`DIR/lib' will be added to the -L list."
11387      exit 1
11388      ;;
11389    esac
11390
11391
11392 if test "$with_xinerama" = yes; then
11393
11394   # first check for Xinerama.h
11395
11396   ac_save_CPPFLAGS="$CPPFLAGS"
11397   if test \! -z "$includedir" ; then
11398     CPPFLAGS="$CPPFLAGS -I$includedir"
11399   fi
11400   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
11401   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
11402   { $as_echo "$as_me:$LINENO: checking for X11/extensions/Xinerama.h" >&5
11403 $as_echo_n "checking for X11/extensions/Xinerama.h... " >&6; }
11404 if test "${ac_cv_header_X11_extensions_Xinerama_h+set}" = set; then
11405   $as_echo_n "(cached) " >&6
11406 else
11407   cat >conftest.$ac_ext <<_ACEOF
11408 /* confdefs.h.  */
11409 _ACEOF
11410 cat confdefs.h >>conftest.$ac_ext
11411 cat >>conftest.$ac_ext <<_ACEOF
11412 /* end confdefs.h.  */
11413 #include <X11/Xlib.h>
11414
11415 #include <X11/extensions/Xinerama.h>
11416 _ACEOF
11417 rm -rf conftest.$ac_objext
11418 if { (ac_try="$ac_compile"
11419 case "(($ac_try" in
11420   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11421   *) ac_try_echo=$ac_try;;
11422 esac
11423 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
11424 $as_echo "$ac_try_echo") >&5
11425   (eval "$ac_compile") 2>conftest.er1
11426   ac_status=$?
11427   grep -v '^ *+' conftest.er1 >conftest.err
11428   rm -rf conftest.er1
11429   cat conftest.err >&5
11430   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
11431   (exit $ac_status); } && {
11432          test -z "$ac_c_werror_flag" ||
11433          test ! -s conftest.err
11434        } && test -s conftest.$ac_objext; then
11435   ac_cv_header_X11_extensions_Xinerama_h=yes
11436 else
11437   $as_echo "$as_me: failed program was:" >&5
11438 sed 's/^/| /' conftest.$ac_ext >&5
11439
11440         ac_cv_header_X11_extensions_Xinerama_h=no
11441 fi
11442
11443 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11444 fi
11445 { $as_echo "$as_me:$LINENO: result: $ac_cv_header_X11_extensions_Xinerama_h" >&5
11446 $as_echo "$ac_cv_header_X11_extensions_Xinerama_h" >&6; }
11447 if test "x$ac_cv_header_X11_extensions_Xinerama_h" = x""yes; then
11448   have_xinerama=yes
11449 fi
11450
11451
11452   CPPFLAGS="$ac_save_CPPFLAGS"
11453
11454   # if that succeeded, then check for the XINERAMA code in the libraries
11455   if test "$have_xinerama" = yes; then
11456
11457     # first look in -lXext
11458     have_xinerama=no
11459
11460   ac_save_CPPFLAGS="$CPPFLAGS"
11461   ac_save_LDFLAGS="$LDFLAGS"
11462 #  ac_save_LIBS="$LIBS"
11463
11464   if test \! -z "$includedir" ; then
11465     CPPFLAGS="$CPPFLAGS -I$includedir"
11466   fi
11467   # note: $X_CFLAGS includes $x_includes
11468   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
11469
11470   if test \! -z "$libdir" ; then
11471     LDFLAGS="$LDFLAGS -L$libdir"
11472   fi
11473   # note: $X_LIBS includes $x_libraries
11474   LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
11475
11476   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
11477   LDFLAGS=`eval eval eval eval eval eval eval eval eval echo $LDFLAGS`
11478   { $as_echo "$as_me:$LINENO: checking for XineramaQueryScreens in -lXext" >&5
11479 $as_echo_n "checking for XineramaQueryScreens in -lXext... " >&6; }
11480 if test "${ac_cv_lib_Xext_XineramaQueryScreens+set}" = set; then
11481   $as_echo_n "(cached) " >&6
11482 else
11483   ac_check_lib_save_LIBS=$LIBS
11484 LIBS="-lXext -lXext -lX11 $LIBS"
11485 cat >conftest.$ac_ext <<_ACEOF
11486 /* confdefs.h.  */
11487 _ACEOF
11488 cat confdefs.h >>conftest.$ac_ext
11489 cat >>conftest.$ac_ext <<_ACEOF
11490 /* end confdefs.h.  */
11491
11492 /* Override any GCC internal prototype to avoid an error.
11493    Use char because int might match the return type of a GCC
11494    builtin and then its argument prototype would still apply.  */
11495 #ifdef __cplusplus
11496 extern "C"
11497 #endif
11498 char XineramaQueryScreens ();
11499 int
11500 main ()
11501 {
11502 return XineramaQueryScreens ();
11503   ;
11504   return 0;
11505 }
11506 _ACEOF
11507 rm -rf conftest.$ac_objext conftest$ac_exeext
11508 if { (ac_try="$ac_link"
11509 case "(($ac_try" in
11510   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11511   *) ac_try_echo=$ac_try;;
11512 esac
11513 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
11514 $as_echo "$ac_try_echo") >&5
11515   (eval "$ac_link") 2>conftest.er1
11516   ac_status=$?
11517   grep -v '^ *+' conftest.er1 >conftest.err
11518   rm -rf conftest.er1
11519   cat conftest.err >&5
11520   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
11521   (exit $ac_status); } && {
11522          test -z "$ac_c_werror_flag" ||
11523          test ! -s conftest.err
11524        } && test -s conftest$ac_exeext && {
11525          test "$cross_compiling" = yes ||
11526          $as_test_x conftest$ac_exeext
11527        }; then
11528   ac_cv_lib_Xext_XineramaQueryScreens=yes
11529 else
11530   $as_echo "$as_me: failed program was:" >&5
11531 sed 's/^/| /' conftest.$ac_ext >&5
11532
11533         ac_cv_lib_Xext_XineramaQueryScreens=no
11534 fi
11535
11536 rm -rf conftest.dSYM
11537 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
11538       conftest$ac_exeext conftest.$ac_ext
11539 LIBS=$ac_check_lib_save_LIBS
11540 fi
11541 { $as_echo "$as_me:$LINENO: result: $ac_cv_lib_Xext_XineramaQueryScreens" >&5
11542 $as_echo "$ac_cv_lib_Xext_XineramaQueryScreens" >&6; }
11543 if test "x$ac_cv_lib_Xext_XineramaQueryScreens" = x""yes; then
11544   have_xinerama=yes
11545 else
11546   true
11547 fi
11548
11549   CPPFLAGS="$ac_save_CPPFLAGS"
11550   LDFLAGS="$ac_save_LDFLAGS"
11551 #  LIBS="$ac_save_LIBS"
11552
11553
11554     # if that failed, look in -lXinerama (this is where it is in XFree86 4.1.)
11555     if test "$have_xinerama" = no; then
11556
11557   ac_save_CPPFLAGS="$CPPFLAGS"
11558   ac_save_LDFLAGS="$LDFLAGS"
11559 #  ac_save_LIBS="$LIBS"
11560
11561   if test \! -z "$includedir" ; then
11562     CPPFLAGS="$CPPFLAGS -I$includedir"
11563   fi
11564   # note: $X_CFLAGS includes $x_includes
11565   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
11566
11567   if test \! -z "$libdir" ; then
11568     LDFLAGS="$LDFLAGS -L$libdir"
11569   fi
11570   # note: $X_LIBS includes $x_libraries
11571   LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
11572
11573   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
11574   LDFLAGS=`eval eval eval eval eval eval eval eval eval echo $LDFLAGS`
11575   { $as_echo "$as_me:$LINENO: checking for XineramaQueryScreens in -lXinerama" >&5
11576 $as_echo_n "checking for XineramaQueryScreens in -lXinerama... " >&6; }
11577 if test "${ac_cv_lib_Xinerama_XineramaQueryScreens+set}" = set; then
11578   $as_echo_n "(cached) " >&6
11579 else
11580   ac_check_lib_save_LIBS=$LIBS
11581 LIBS="-lXinerama -lXext -lX11 $LIBS"
11582 cat >conftest.$ac_ext <<_ACEOF
11583 /* confdefs.h.  */
11584 _ACEOF
11585 cat confdefs.h >>conftest.$ac_ext
11586 cat >>conftest.$ac_ext <<_ACEOF
11587 /* end confdefs.h.  */
11588
11589 /* Override any GCC internal prototype to avoid an error.
11590    Use char because int might match the return type of a GCC
11591    builtin and then its argument prototype would still apply.  */
11592 #ifdef __cplusplus
11593 extern "C"
11594 #endif
11595 char XineramaQueryScreens ();
11596 int
11597 main ()
11598 {
11599 return XineramaQueryScreens ();
11600   ;
11601   return 0;
11602 }
11603 _ACEOF
11604 rm -rf conftest.$ac_objext conftest$ac_exeext
11605 if { (ac_try="$ac_link"
11606 case "(($ac_try" in
11607   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11608   *) ac_try_echo=$ac_try;;
11609 esac
11610 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
11611 $as_echo "$ac_try_echo") >&5
11612   (eval "$ac_link") 2>conftest.er1
11613   ac_status=$?
11614   grep -v '^ *+' conftest.er1 >conftest.err
11615   rm -rf conftest.er1
11616   cat conftest.err >&5
11617   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
11618   (exit $ac_status); } && {
11619          test -z "$ac_c_werror_flag" ||
11620          test ! -s conftest.err
11621        } && test -s conftest$ac_exeext && {
11622          test "$cross_compiling" = yes ||
11623          $as_test_x conftest$ac_exeext
11624        }; then
11625   ac_cv_lib_Xinerama_XineramaQueryScreens=yes
11626 else
11627   $as_echo "$as_me: failed program was:" >&5
11628 sed 's/^/| /' conftest.$ac_ext >&5
11629
11630         ac_cv_lib_Xinerama_XineramaQueryScreens=no
11631 fi
11632
11633 rm -rf conftest.dSYM
11634 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
11635       conftest$ac_exeext conftest.$ac_ext
11636 LIBS=$ac_check_lib_save_LIBS
11637 fi
11638 { $as_echo "$as_me:$LINENO: result: $ac_cv_lib_Xinerama_XineramaQueryScreens" >&5
11639 $as_echo "$ac_cv_lib_Xinerama_XineramaQueryScreens" >&6; }
11640 if test "x$ac_cv_lib_Xinerama_XineramaQueryScreens" = x""yes; then
11641   have_xinerama=yes; XINERAMA_LIBS="-lXinerama"
11642 else
11643   true
11644 fi
11645
11646   CPPFLAGS="$ac_save_CPPFLAGS"
11647   LDFLAGS="$ac_save_LDFLAGS"
11648 #  LIBS="$ac_save_LIBS"
11649
11650     fi
11651   fi
11652
11653   # if that succeeded, then we've really got it.
11654   if test "$have_xinerama" = yes; then
11655     cat >>confdefs.h <<\_ACEOF
11656 #define HAVE_XINERAMA 1
11657 _ACEOF
11658
11659   fi
11660
11661 elif test "$with_xinerama" != no; then
11662   echo "error: must be yes or no: --with-xinerama-ext=$with_xinerama"
11663   exit 1
11664 fi
11665
11666
11667 ###############################################################################
11668 #
11669 #       Check for the XINPUT server extension.
11670 #
11671 ###############################################################################
11672
11673 have_xinput=no
11674 with_xinput_req=unspecified
11675
11676 # Check whether --with-xinput-ext was given.
11677 if test "${with_xinput_ext+set}" = set; then
11678   withval=$with_xinput_ext; with_xinput="$withval"; with_xinput_req="$withval"
11679 else
11680   with_xinput=yes
11681 fi
11682
11683
11684
11685    case "$with_xinput" in
11686     yes) ;;
11687     no)  ;;
11688
11689     /*)
11690      { $as_echo "$as_me:$LINENO: checking for XINPUT headers" >&5
11691 $as_echo_n "checking for XINPUT headers... " >&6; }
11692      d=$with_xinput/include
11693      if test -d $d; then
11694        X_CFLAGS="-I$d $X_CFLAGS"
11695        { $as_echo "$as_me:$LINENO: result: $d" >&5
11696 $as_echo "$d" >&6; }
11697      else
11698        { $as_echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
11699 $as_echo "not found ($d: no such directory)" >&6; }
11700      fi
11701
11702      { $as_echo "$as_me:$LINENO: checking for XINPUT libs" >&5
11703 $as_echo_n "checking for XINPUT libs... " >&6; }
11704      d=$with_xinput/lib
11705      if test -d $d; then
11706        X_LIBS="-L$d $X_LIBS"
11707        { $as_echo "$as_me:$LINENO: result: $d" >&5
11708 $as_echo "$d" >&6; }
11709      else
11710        { $as_echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
11711 $as_echo "not found ($d: no such directory)" >&6; }
11712      fi
11713
11714      # replace the directory string with "yes".
11715      with_xinput_req="yes"
11716      with_xinput=$with_xinput_req
11717      ;;
11718
11719     *)
11720      echo ""
11721      echo "error: argument to --with-xinput-ext must be \"yes\", \"no\", or a directory."
11722      echo "       If it is a directory, then \`DIR/include' will be added to"
11723      echo "       the -I list, and \`DIR/lib' will be added to the -L list."
11724      exit 1
11725      ;;
11726    esac
11727
11728
11729 if test "$with_xinput" = yes; then
11730
11731   # first check for Xinput.h
11732
11733   ac_save_CPPFLAGS="$CPPFLAGS"
11734   if test \! -z "$includedir" ; then
11735     CPPFLAGS="$CPPFLAGS -I$includedir"
11736   fi
11737   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
11738   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
11739   { $as_echo "$as_me:$LINENO: checking for X11/extensions/XInput.h" >&5
11740 $as_echo_n "checking for X11/extensions/XInput.h... " >&6; }
11741 if test "${ac_cv_header_X11_extensions_XInput_h+set}" = set; then
11742   $as_echo_n "(cached) " >&6
11743 else
11744   cat >conftest.$ac_ext <<_ACEOF
11745 /* confdefs.h.  */
11746 _ACEOF
11747 cat confdefs.h >>conftest.$ac_ext
11748 cat >>conftest.$ac_ext <<_ACEOF
11749 /* end confdefs.h.  */
11750 #include <X11/Xlib.h>
11751
11752 #include <X11/extensions/XInput.h>
11753 _ACEOF
11754 rm -rf conftest.$ac_objext
11755 if { (ac_try="$ac_compile"
11756 case "(($ac_try" in
11757   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11758   *) ac_try_echo=$ac_try;;
11759 esac
11760 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
11761 $as_echo "$ac_try_echo") >&5
11762   (eval "$ac_compile") 2>conftest.er1
11763   ac_status=$?
11764   grep -v '^ *+' conftest.er1 >conftest.err
11765   rm -rf conftest.er1
11766   cat conftest.err >&5
11767   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
11768   (exit $ac_status); } && {
11769          test -z "$ac_c_werror_flag" ||
11770          test ! -s conftest.err
11771        } && test -s conftest.$ac_objext; then
11772   ac_cv_header_X11_extensions_XInput_h=yes
11773 else
11774   $as_echo "$as_me: failed program was:" >&5
11775 sed 's/^/| /' conftest.$ac_ext >&5
11776
11777         ac_cv_header_X11_extensions_XInput_h=no
11778 fi
11779
11780 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11781 fi
11782 { $as_echo "$as_me:$LINENO: result: $ac_cv_header_X11_extensions_XInput_h" >&5
11783 $as_echo "$ac_cv_header_X11_extensions_XInput_h" >&6; }
11784 if test "x$ac_cv_header_X11_extensions_XInput_h" = x""yes; then
11785   have_xinput=yes
11786 fi
11787
11788
11789   CPPFLAGS="$ac_save_CPPFLAGS"
11790
11791   # if that succeeded, then check for libXi
11792   if test "$have_xinput" = yes; then
11793     have_xinput=no
11794
11795   ac_save_CPPFLAGS="$CPPFLAGS"
11796   ac_save_LDFLAGS="$LDFLAGS"
11797 #  ac_save_LIBS="$LIBS"
11798
11799   if test \! -z "$includedir" ; then
11800     CPPFLAGS="$CPPFLAGS -I$includedir"
11801   fi
11802   # note: $X_CFLAGS includes $x_includes
11803   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
11804
11805   if test \! -z "$libdir" ; then
11806     LDFLAGS="$LDFLAGS -L$libdir"
11807   fi
11808   # note: $X_LIBS includes $x_libraries
11809   LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
11810
11811   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
11812   LDFLAGS=`eval eval eval eval eval eval eval eval eval echo $LDFLAGS`
11813   { $as_echo "$as_me:$LINENO: checking for XListInputDevices in -lXi" >&5
11814 $as_echo_n "checking for XListInputDevices in -lXi... " >&6; }
11815 if test "${ac_cv_lib_Xi_XListInputDevices+set}" = set; then
11816   $as_echo_n "(cached) " >&6
11817 else
11818   ac_check_lib_save_LIBS=$LIBS
11819 LIBS="-lXi -lXext -lX11 $LIBS"
11820 cat >conftest.$ac_ext <<_ACEOF
11821 /* confdefs.h.  */
11822 _ACEOF
11823 cat confdefs.h >>conftest.$ac_ext
11824 cat >>conftest.$ac_ext <<_ACEOF
11825 /* end confdefs.h.  */
11826
11827 /* Override any GCC internal prototype to avoid an error.
11828    Use char because int might match the return type of a GCC
11829    builtin and then its argument prototype would still apply.  */
11830 #ifdef __cplusplus
11831 extern "C"
11832 #endif
11833 char XListInputDevices ();
11834 int
11835 main ()
11836 {
11837 return XListInputDevices ();
11838   ;
11839   return 0;
11840 }
11841 _ACEOF
11842 rm -rf conftest.$ac_objext conftest$ac_exeext
11843 if { (ac_try="$ac_link"
11844 case "(($ac_try" in
11845   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11846   *) ac_try_echo=$ac_try;;
11847 esac
11848 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
11849 $as_echo "$ac_try_echo") >&5
11850   (eval "$ac_link") 2>conftest.er1
11851   ac_status=$?
11852   grep -v '^ *+' conftest.er1 >conftest.err
11853   rm -rf conftest.er1
11854   cat conftest.err >&5
11855   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
11856   (exit $ac_status); } && {
11857          test -z "$ac_c_werror_flag" ||
11858          test ! -s conftest.err
11859        } && test -s conftest$ac_exeext && {
11860          test "$cross_compiling" = yes ||
11861          $as_test_x conftest$ac_exeext
11862        }; then
11863   ac_cv_lib_Xi_XListInputDevices=yes
11864 else
11865   $as_echo "$as_me: failed program was:" >&5
11866 sed 's/^/| /' conftest.$ac_ext >&5
11867
11868         ac_cv_lib_Xi_XListInputDevices=no
11869 fi
11870
11871 rm -rf conftest.dSYM
11872 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
11873       conftest$ac_exeext conftest.$ac_ext
11874 LIBS=$ac_check_lib_save_LIBS
11875 fi
11876 { $as_echo "$as_me:$LINENO: result: $ac_cv_lib_Xi_XListInputDevices" >&5
11877 $as_echo "$ac_cv_lib_Xi_XListInputDevices" >&6; }
11878 if test "x$ac_cv_lib_Xi_XListInputDevices" = x""yes; then
11879   have_xinput=yes; SAVER_LIBS="$SAVER_LIBS -lXi"
11880 else
11881   true
11882 fi
11883
11884   CPPFLAGS="$ac_save_CPPFLAGS"
11885   LDFLAGS="$ac_save_LDFLAGS"
11886 #  LIBS="$ac_save_LIBS"
11887
11888   fi
11889
11890   # if that succeeded, then we've really got it.
11891   if test "$have_xinput" = yes; then
11892     cat >>confdefs.h <<\_ACEOF
11893 #define HAVE_XINPUT 1
11894 _ACEOF
11895
11896   fi
11897
11898 elif test "$with_xinput" != no; then
11899   echo "error: must be yes or no: --with-xinput-ext=$with_xinput"
11900   exit 1
11901 fi
11902
11903
11904 ###############################################################################
11905 #
11906 #       Check for the XF86VMODE server extension (for virtual screens.)
11907 #
11908 ###############################################################################
11909
11910 have_xf86vmode=no
11911 with_xf86vmode_req=unspecified
11912
11913 # Check whether --with-xf86vmode-ext was given.
11914 if test "${with_xf86vmode_ext+set}" = set; then
11915   withval=$with_xf86vmode_ext; with_xf86vmode="$withval"; with_xf86vmode_req="$withval"
11916 else
11917   with_xf86vmode=yes
11918 fi
11919
11920
11921
11922    case "$with_xf86vmode" in
11923     yes) ;;
11924     no)  ;;
11925
11926     /*)
11927      { $as_echo "$as_me:$LINENO: checking for xf86vmode headers" >&5
11928 $as_echo_n "checking for xf86vmode headers... " >&6; }
11929      d=$with_xf86vmode/include
11930      if test -d $d; then
11931        X_CFLAGS="-I$d $X_CFLAGS"
11932        { $as_echo "$as_me:$LINENO: result: $d" >&5
11933 $as_echo "$d" >&6; }
11934      else
11935        { $as_echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
11936 $as_echo "not found ($d: no such directory)" >&6; }
11937      fi
11938
11939      { $as_echo "$as_me:$LINENO: checking for xf86vmode libs" >&5
11940 $as_echo_n "checking for xf86vmode libs... " >&6; }
11941      d=$with_xf86vmode/lib
11942      if test -d $d; then
11943        X_LIBS="-L$d $X_LIBS"
11944        { $as_echo "$as_me:$LINENO: result: $d" >&5
11945 $as_echo "$d" >&6; }
11946      else
11947        { $as_echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
11948 $as_echo "not found ($d: no such directory)" >&6; }
11949      fi
11950
11951      # replace the directory string with "yes".
11952      with_xf86vmode_req="yes"
11953      with_xf86vmode=$with_xf86vmode_req
11954      ;;
11955
11956     *)
11957      echo ""
11958      echo "error: argument to --with-xf86vmode-ext must be \"yes\", \"no\", or a directory."
11959      echo "       If it is a directory, then \`DIR/include' will be added to"
11960      echo "       the -I list, and \`DIR/lib' will be added to the -L list."
11961      exit 1
11962      ;;
11963    esac
11964
11965
11966 VIDMODE_LIBS=""
11967
11968 if test "$with_xf86vmode" = yes; then
11969
11970   # first check for xf86vmode.h
11971
11972   ac_save_CPPFLAGS="$CPPFLAGS"
11973   if test \! -z "$includedir" ; then
11974     CPPFLAGS="$CPPFLAGS -I$includedir"
11975   fi
11976   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
11977   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
11978   { $as_echo "$as_me:$LINENO: checking for X11/extensions/xf86vmode.h" >&5
11979 $as_echo_n "checking for X11/extensions/xf86vmode.h... " >&6; }
11980 if test "${ac_cv_header_X11_extensions_xf86vmode_h+set}" = set; then
11981   $as_echo_n "(cached) " >&6
11982 else
11983   cat >conftest.$ac_ext <<_ACEOF
11984 /* confdefs.h.  */
11985 _ACEOF
11986 cat confdefs.h >>conftest.$ac_ext
11987 cat >>conftest.$ac_ext <<_ACEOF
11988 /* end confdefs.h.  */
11989 #include <X11/Xlib.h>
11990
11991 #include <X11/extensions/xf86vmode.h>
11992 _ACEOF
11993 rm -rf conftest.$ac_objext
11994 if { (ac_try="$ac_compile"
11995 case "(($ac_try" in
11996   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11997   *) ac_try_echo=$ac_try;;
11998 esac
11999 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
12000 $as_echo "$ac_try_echo") >&5
12001   (eval "$ac_compile") 2>conftest.er1
12002   ac_status=$?
12003   grep -v '^ *+' conftest.er1 >conftest.err
12004   rm -rf conftest.er1
12005   cat conftest.err >&5
12006   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
12007   (exit $ac_status); } && {
12008          test -z "$ac_c_werror_flag" ||
12009          test ! -s conftest.err
12010        } && test -s conftest.$ac_objext; then
12011   ac_cv_header_X11_extensions_xf86vmode_h=yes
12012 else
12013   $as_echo "$as_me: failed program was:" >&5
12014 sed 's/^/| /' conftest.$ac_ext >&5
12015
12016         ac_cv_header_X11_extensions_xf86vmode_h=no
12017 fi
12018
12019 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12020 fi
12021 { $as_echo "$as_me:$LINENO: result: $ac_cv_header_X11_extensions_xf86vmode_h" >&5
12022 $as_echo "$ac_cv_header_X11_extensions_xf86vmode_h" >&6; }
12023 if test "x$ac_cv_header_X11_extensions_xf86vmode_h" = x""yes; then
12024   have_xf86vmode=yes
12025 fi
12026
12027
12028   CPPFLAGS="$ac_save_CPPFLAGS"
12029
12030   # if that succeeded, then check for the -lXxf86vm
12031   if test "$have_xf86vmode" = yes; then
12032     have_xf86vmode=no
12033
12034   ac_save_CPPFLAGS="$CPPFLAGS"
12035   ac_save_LDFLAGS="$LDFLAGS"
12036 #  ac_save_LIBS="$LIBS"
12037
12038   if test \! -z "$includedir" ; then
12039     CPPFLAGS="$CPPFLAGS -I$includedir"
12040   fi
12041   # note: $X_CFLAGS includes $x_includes
12042   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
12043
12044   if test \! -z "$libdir" ; then
12045     LDFLAGS="$LDFLAGS -L$libdir"
12046   fi
12047   # note: $X_LIBS includes $x_libraries
12048   LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
12049
12050   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
12051   LDFLAGS=`eval eval eval eval eval eval eval eval eval echo $LDFLAGS`
12052   { $as_echo "$as_me:$LINENO: checking for XF86VidModeGetViewPort in -lXxf86vm" >&5
12053 $as_echo_n "checking for XF86VidModeGetViewPort in -lXxf86vm... " >&6; }
12054 if test "${ac_cv_lib_Xxf86vm_XF86VidModeGetViewPort+set}" = set; then
12055   $as_echo_n "(cached) " >&6
12056 else
12057   ac_check_lib_save_LIBS=$LIBS
12058 LIBS="-lXxf86vm -lXext -lX11 $LIBS"
12059 cat >conftest.$ac_ext <<_ACEOF
12060 /* confdefs.h.  */
12061 _ACEOF
12062 cat confdefs.h >>conftest.$ac_ext
12063 cat >>conftest.$ac_ext <<_ACEOF
12064 /* end confdefs.h.  */
12065
12066 /* Override any GCC internal prototype to avoid an error.
12067    Use char because int might match the return type of a GCC
12068    builtin and then its argument prototype would still apply.  */
12069 #ifdef __cplusplus
12070 extern "C"
12071 #endif
12072 char XF86VidModeGetViewPort ();
12073 int
12074 main ()
12075 {
12076 return XF86VidModeGetViewPort ();
12077   ;
12078   return 0;
12079 }
12080 _ACEOF
12081 rm -rf conftest.$ac_objext conftest$ac_exeext
12082 if { (ac_try="$ac_link"
12083 case "(($ac_try" in
12084   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12085   *) ac_try_echo=$ac_try;;
12086 esac
12087 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
12088 $as_echo "$ac_try_echo") >&5
12089   (eval "$ac_link") 2>conftest.er1
12090   ac_status=$?
12091   grep -v '^ *+' conftest.er1 >conftest.err
12092   rm -rf conftest.er1
12093   cat conftest.err >&5
12094   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
12095   (exit $ac_status); } && {
12096          test -z "$ac_c_werror_flag" ||
12097          test ! -s conftest.err
12098        } && test -s conftest$ac_exeext && {
12099          test "$cross_compiling" = yes ||
12100          $as_test_x conftest$ac_exeext
12101        }; then
12102   ac_cv_lib_Xxf86vm_XF86VidModeGetViewPort=yes
12103 else
12104   $as_echo "$as_me: failed program was:" >&5
12105 sed 's/^/| /' conftest.$ac_ext >&5
12106
12107         ac_cv_lib_Xxf86vm_XF86VidModeGetViewPort=no
12108 fi
12109
12110 rm -rf conftest.dSYM
12111 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
12112       conftest$ac_exeext conftest.$ac_ext
12113 LIBS=$ac_check_lib_save_LIBS
12114 fi
12115 { $as_echo "$as_me:$LINENO: result: $ac_cv_lib_Xxf86vm_XF86VidModeGetViewPort" >&5
12116 $as_echo "$ac_cv_lib_Xxf86vm_XF86VidModeGetViewPort" >&6; }
12117 if test "x$ac_cv_lib_Xxf86vm_XF86VidModeGetViewPort" = x""yes; then
12118   have_xf86vmode=yes;
12119                    VIDMODE_LIBS="-lXxf86vm";
12120                    SAVER_LIBS="$SAVER_LIBS $VIDMODE_LIBS"
12121 else
12122   true
12123 fi
12124
12125   CPPFLAGS="$ac_save_CPPFLAGS"
12126   LDFLAGS="$ac_save_LDFLAGS"
12127 #  LIBS="$ac_save_LIBS"
12128
12129   fi
12130
12131   # if that succeeded, then we've really got it.
12132   if test "$have_xf86vmode" = yes; then
12133     cat >>confdefs.h <<\_ACEOF
12134 #define HAVE_XF86VMODE 1
12135 _ACEOF
12136
12137   fi
12138
12139 elif test "$with_xf86vmode" != no; then
12140   echo "error: must be yes or no: --with-xf86vmode-ext=$with_xf86vmode"
12141   exit 1
12142 fi
12143
12144
12145 ###############################################################################
12146 #
12147 #       Check for the XF86VMODE server extension (for gamma fading.)
12148 #
12149 ###############################################################################
12150
12151 have_xf86gamma=no
12152 have_xf86gamma_ramp=no
12153 with_xf86gamma_req=unspecified
12154
12155 # Check whether --with-xf86gamma-ext was given.
12156 if test "${with_xf86gamma_ext+set}" = set; then
12157   withval=$with_xf86gamma_ext; with_xf86gamma="$withval"; with_xf86gamma_req="$withval"
12158 else
12159   with_xf86gamma=yes
12160 fi
12161
12162
12163
12164    case "$with_xf86gamma" in
12165     yes) ;;
12166     no)  ;;
12167
12168     /*)
12169      { $as_echo "$as_me:$LINENO: checking for xf86gamma headers" >&5
12170 $as_echo_n "checking for xf86gamma headers... " >&6; }
12171      d=$with_xf86gamma/include
12172      if test -d $d; then
12173        X_CFLAGS="-I$d $X_CFLAGS"
12174        { $as_echo "$as_me:$LINENO: result: $d" >&5
12175 $as_echo "$d" >&6; }
12176      else
12177        { $as_echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
12178 $as_echo "not found ($d: no such directory)" >&6; }
12179      fi
12180
12181      { $as_echo "$as_me:$LINENO: checking for xf86gamma libs" >&5
12182 $as_echo_n "checking for xf86gamma libs... " >&6; }
12183      d=$with_xf86gamma/lib
12184      if test -d $d; then
12185        X_LIBS="-L$d $X_LIBS"
12186        { $as_echo "$as_me:$LINENO: result: $d" >&5
12187 $as_echo "$d" >&6; }
12188      else
12189        { $as_echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
12190 $as_echo "not found ($d: no such directory)" >&6; }
12191      fi
12192
12193      # replace the directory string with "yes".
12194      with_xf86gamma_req="yes"
12195      with_xf86gamma=$with_xf86gamma_req
12196      ;;
12197
12198     *)
12199      echo ""
12200      echo "error: argument to --with-xf86gamma-ext must be \"yes\", \"no\", or a directory."
12201      echo "       If it is a directory, then \`DIR/include' will be added to"
12202      echo "       the -I list, and \`DIR/lib' will be added to the -L list."
12203      exit 1
12204      ;;
12205    esac
12206
12207
12208 if test "$with_xf86gamma" = yes; then
12209
12210   # first check for xf86vmode.h, if we haven't already
12211   if test "$have_xf86vmode" = yes; then
12212     have_xf86gamma=yes
12213   else
12214
12215   ac_save_CPPFLAGS="$CPPFLAGS"
12216   if test \! -z "$includedir" ; then
12217     CPPFLAGS="$CPPFLAGS -I$includedir"
12218   fi
12219   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
12220   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
12221   { $as_echo "$as_me:$LINENO: checking for X11/extensions/xf86vmode.h" >&5
12222 $as_echo_n "checking for X11/extensions/xf86vmode.h... " >&6; }
12223 if test "${ac_cv_header_X11_extensions_xf86vmode_h+set}" = set; then
12224   $as_echo_n "(cached) " >&6
12225 else
12226   cat >conftest.$ac_ext <<_ACEOF
12227 /* confdefs.h.  */
12228 _ACEOF
12229 cat confdefs.h >>conftest.$ac_ext
12230 cat >>conftest.$ac_ext <<_ACEOF
12231 /* end confdefs.h.  */
12232 #include <X11/Xlib.h>
12233
12234 #include <X11/extensions/xf86vmode.h>
12235 _ACEOF
12236 rm -rf conftest.$ac_objext
12237 if { (ac_try="$ac_compile"
12238 case "(($ac_try" in
12239   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12240   *) ac_try_echo=$ac_try;;
12241 esac
12242 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
12243 $as_echo "$ac_try_echo") >&5
12244   (eval "$ac_compile") 2>conftest.er1
12245   ac_status=$?
12246   grep -v '^ *+' conftest.er1 >conftest.err
12247   rm -rf conftest.er1
12248   cat conftest.err >&5
12249   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
12250   (exit $ac_status); } && {
12251          test -z "$ac_c_werror_flag" ||
12252          test ! -s conftest.err
12253        } && test -s conftest.$ac_objext; then
12254   ac_cv_header_X11_extensions_xf86vmode_h=yes
12255 else
12256   $as_echo "$as_me: failed program was:" >&5
12257 sed 's/^/| /' conftest.$ac_ext >&5
12258
12259         ac_cv_header_X11_extensions_xf86vmode_h=no
12260 fi
12261
12262 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12263 fi
12264 { $as_echo "$as_me:$LINENO: result: $ac_cv_header_X11_extensions_xf86vmode_h" >&5
12265 $as_echo "$ac_cv_header_X11_extensions_xf86vmode_h" >&6; }
12266 if test "x$ac_cv_header_X11_extensions_xf86vmode_h" = x""yes; then
12267   have_xf86gamma=yes
12268 fi
12269
12270
12271   CPPFLAGS="$ac_save_CPPFLAGS"
12272   fi
12273
12274   # if that succeeded, then check for the -lXxf86vm
12275   if test "$have_xf86gamma" = yes; then
12276     have_xf86gamma=no
12277
12278   ac_save_CPPFLAGS="$CPPFLAGS"
12279   ac_save_LDFLAGS="$LDFLAGS"
12280 #  ac_save_LIBS="$LIBS"
12281
12282   if test \! -z "$includedir" ; then
12283     CPPFLAGS="$CPPFLAGS -I$includedir"
12284   fi
12285   # note: $X_CFLAGS includes $x_includes
12286   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
12287
12288   if test \! -z "$libdir" ; then
12289     LDFLAGS="$LDFLAGS -L$libdir"
12290   fi
12291   # note: $X_LIBS includes $x_libraries
12292   LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
12293
12294   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
12295   LDFLAGS=`eval eval eval eval eval eval eval eval eval echo $LDFLAGS`
12296   { $as_echo "$as_me:$LINENO: checking for XF86VidModeSetGamma in -lXxf86vm" >&5
12297 $as_echo_n "checking for XF86VidModeSetGamma in -lXxf86vm... " >&6; }
12298 if test "${ac_cv_lib_Xxf86vm_XF86VidModeSetGamma+set}" = set; then
12299   $as_echo_n "(cached) " >&6
12300 else
12301   ac_check_lib_save_LIBS=$LIBS
12302 LIBS="-lXxf86vm -lXext -lX11 $LIBS"
12303 cat >conftest.$ac_ext <<_ACEOF
12304 /* confdefs.h.  */
12305 _ACEOF
12306 cat confdefs.h >>conftest.$ac_ext
12307 cat >>conftest.$ac_ext <<_ACEOF
12308 /* end confdefs.h.  */
12309
12310 /* Override any GCC internal prototype to avoid an error.
12311    Use char because int might match the return type of a GCC
12312    builtin and then its argument prototype would still apply.  */
12313 #ifdef __cplusplus
12314 extern "C"
12315 #endif
12316 char XF86VidModeSetGamma ();
12317 int
12318 main ()
12319 {
12320 return XF86VidModeSetGamma ();
12321   ;
12322   return 0;
12323 }
12324 _ACEOF
12325 rm -rf conftest.$ac_objext conftest$ac_exeext
12326 if { (ac_try="$ac_link"
12327 case "(($ac_try" in
12328   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12329   *) ac_try_echo=$ac_try;;
12330 esac
12331 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
12332 $as_echo "$ac_try_echo") >&5
12333   (eval "$ac_link") 2>conftest.er1
12334   ac_status=$?
12335   grep -v '^ *+' conftest.er1 >conftest.err
12336   rm -rf conftest.er1
12337   cat conftest.err >&5
12338   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
12339   (exit $ac_status); } && {
12340          test -z "$ac_c_werror_flag" ||
12341          test ! -s conftest.err
12342        } && test -s conftest$ac_exeext && {
12343          test "$cross_compiling" = yes ||
12344          $as_test_x conftest$ac_exeext
12345        }; then
12346   ac_cv_lib_Xxf86vm_XF86VidModeSetGamma=yes
12347 else
12348   $as_echo "$as_me: failed program was:" >&5
12349 sed 's/^/| /' conftest.$ac_ext >&5
12350
12351         ac_cv_lib_Xxf86vm_XF86VidModeSetGamma=no
12352 fi
12353
12354 rm -rf conftest.dSYM
12355 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
12356       conftest$ac_exeext conftest.$ac_ext
12357 LIBS=$ac_check_lib_save_LIBS
12358 fi
12359 { $as_echo "$as_me:$LINENO: result: $ac_cv_lib_Xxf86vm_XF86VidModeSetGamma" >&5
12360 $as_echo "$ac_cv_lib_Xxf86vm_XF86VidModeSetGamma" >&6; }
12361 if test "x$ac_cv_lib_Xxf86vm_XF86VidModeSetGamma" = x""yes; then
12362   have_xf86gamma=yes
12363 else
12364   true
12365 fi
12366
12367   CPPFLAGS="$ac_save_CPPFLAGS"
12368   LDFLAGS="$ac_save_LDFLAGS"
12369 #  LIBS="$ac_save_LIBS"
12370
12371   fi
12372
12373   # check for the Ramp versions of the functions too.
12374   if test "$have_xf86gamma" = yes; then
12375     have_xf86gamma_ramp=no
12376
12377   ac_save_CPPFLAGS="$CPPFLAGS"
12378   ac_save_LDFLAGS="$LDFLAGS"
12379 #  ac_save_LIBS="$LIBS"
12380
12381   if test \! -z "$includedir" ; then
12382     CPPFLAGS="$CPPFLAGS -I$includedir"
12383   fi
12384   # note: $X_CFLAGS includes $x_includes
12385   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
12386
12387   if test \! -z "$libdir" ; then
12388     LDFLAGS="$LDFLAGS -L$libdir"
12389   fi
12390   # note: $X_LIBS includes $x_libraries
12391   LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
12392
12393   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
12394   LDFLAGS=`eval eval eval eval eval eval eval eval eval echo $LDFLAGS`
12395   { $as_echo "$as_me:$LINENO: checking for XF86VidModeSetGammaRamp in -lXxf86vm" >&5
12396 $as_echo_n "checking for XF86VidModeSetGammaRamp in -lXxf86vm... " >&6; }
12397 if test "${ac_cv_lib_Xxf86vm_XF86VidModeSetGammaRamp+set}" = set; then
12398   $as_echo_n "(cached) " >&6
12399 else
12400   ac_check_lib_save_LIBS=$LIBS
12401 LIBS="-lXxf86vm -lXext -lX11 $LIBS"
12402 cat >conftest.$ac_ext <<_ACEOF
12403 /* confdefs.h.  */
12404 _ACEOF
12405 cat confdefs.h >>conftest.$ac_ext
12406 cat >>conftest.$ac_ext <<_ACEOF
12407 /* end confdefs.h.  */
12408
12409 /* Override any GCC internal prototype to avoid an error.
12410    Use char because int might match the return type of a GCC
12411    builtin and then its argument prototype would still apply.  */
12412 #ifdef __cplusplus
12413 extern "C"
12414 #endif
12415 char XF86VidModeSetGammaRamp ();
12416 int
12417 main ()
12418 {
12419 return XF86VidModeSetGammaRamp ();
12420   ;
12421   return 0;
12422 }
12423 _ACEOF
12424 rm -rf conftest.$ac_objext conftest$ac_exeext
12425 if { (ac_try="$ac_link"
12426 case "(($ac_try" in
12427   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12428   *) ac_try_echo=$ac_try;;
12429 esac
12430 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
12431 $as_echo "$ac_try_echo") >&5
12432   (eval "$ac_link") 2>conftest.er1
12433   ac_status=$?
12434   grep -v '^ *+' conftest.er1 >conftest.err
12435   rm -rf conftest.er1
12436   cat conftest.err >&5
12437   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
12438   (exit $ac_status); } && {
12439          test -z "$ac_c_werror_flag" ||
12440          test ! -s conftest.err
12441        } && test -s conftest$ac_exeext && {
12442          test "$cross_compiling" = yes ||
12443          $as_test_x conftest$ac_exeext
12444        }; then
12445   ac_cv_lib_Xxf86vm_XF86VidModeSetGammaRamp=yes
12446 else
12447   $as_echo "$as_me: failed program was:" >&5
12448 sed 's/^/| /' conftest.$ac_ext >&5
12449
12450         ac_cv_lib_Xxf86vm_XF86VidModeSetGammaRamp=no
12451 fi
12452
12453 rm -rf conftest.dSYM
12454 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
12455       conftest$ac_exeext conftest.$ac_ext
12456 LIBS=$ac_check_lib_save_LIBS
12457 fi
12458 { $as_echo "$as_me:$LINENO: result: $ac_cv_lib_Xxf86vm_XF86VidModeSetGammaRamp" >&5
12459 $as_echo "$ac_cv_lib_Xxf86vm_XF86VidModeSetGammaRamp" >&6; }
12460 if test "x$ac_cv_lib_Xxf86vm_XF86VidModeSetGammaRamp" = x""yes; then
12461   have_xf86gamma_ramp=yes
12462 else
12463   true
12464 fi
12465
12466   CPPFLAGS="$ac_save_CPPFLAGS"
12467   LDFLAGS="$ac_save_LDFLAGS"
12468 #  LIBS="$ac_save_LIBS"
12469
12470   fi
12471
12472   # if those tests succeeded, then we've really got the functions.
12473   if test "$have_xf86gamma" = yes; then
12474     cat >>confdefs.h <<\_ACEOF
12475 #define HAVE_XF86VMODE_GAMMA 1
12476 _ACEOF
12477
12478   fi
12479
12480   if test "$have_xf86gamma_ramp" = yes; then
12481     cat >>confdefs.h <<\_ACEOF
12482 #define HAVE_XF86VMODE_GAMMA_RAMP 1
12483 _ACEOF
12484
12485   fi
12486
12487   # pull in the lib, if we haven't already
12488   if test "$have_xf86gamma" = yes -a "$have_xf86vmode" = no; then
12489     SAVER_LIBS="$SAVER_LIBS -lXxf86vm"
12490   fi
12491
12492 elif test "$with_xf86gamma" != no; then
12493   echo "error: must be yes or no: --with-xf86gamma-ext=$with_xf86vmode"
12494   exit 1
12495 fi
12496
12497
12498 ###############################################################################
12499 #
12500 #       Check for the RANDR (Resize and Rotate) server extension.
12501 #
12502 #       We need this to detect when the resolution of the desktop
12503 #       has changed out from under us (this is a newer, different
12504 #       mechanism than the XF86VMODE virtual viewports.)
12505 #
12506 ###############################################################################
12507
12508 have_randr=no
12509 with_randr_req=unspecified
12510
12511 # Check whether --with-randr-ext was given.
12512 if test "${with_randr_ext+set}" = set; then
12513   withval=$with_randr_ext; with_randr="$withval"; with_randr_req="$withval"
12514 else
12515   with_randr=yes
12516 fi
12517
12518
12519
12520    case "$with_randr" in
12521     yes) ;;
12522     no)  ;;
12523
12524     /*)
12525      { $as_echo "$as_me:$LINENO: checking for RANDR headers" >&5
12526 $as_echo_n "checking for RANDR headers... " >&6; }
12527      d=$with_randr/include
12528      if test -d $d; then
12529        X_CFLAGS="-I$d $X_CFLAGS"
12530        { $as_echo "$as_me:$LINENO: result: $d" >&5
12531 $as_echo "$d" >&6; }
12532      else
12533        { $as_echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
12534 $as_echo "not found ($d: no such directory)" >&6; }
12535      fi
12536
12537      { $as_echo "$as_me:$LINENO: checking for RANDR libs" >&5
12538 $as_echo_n "checking for RANDR libs... " >&6; }
12539      d=$with_randr/lib
12540      if test -d $d; then
12541        X_LIBS="-L$d $X_LIBS"
12542        { $as_echo "$as_me:$LINENO: result: $d" >&5
12543 $as_echo "$d" >&6; }
12544      else
12545        { $as_echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
12546 $as_echo "not found ($d: no such directory)" >&6; }
12547      fi
12548
12549      # replace the directory string with "yes".
12550      with_randr_req="yes"
12551      with_randr=$with_randr_req
12552      ;;
12553
12554     *)
12555      echo ""
12556      echo "error: argument to --with-randr-ext must be \"yes\", \"no\", or a directory."
12557      echo "       If it is a directory, then \`DIR/include' will be added to"
12558      echo "       the -I list, and \`DIR/lib' will be added to the -L list."
12559      exit 1
12560      ;;
12561    esac
12562
12563
12564 if test "$with_randr" = yes; then
12565
12566   # first check for Xrandr.h
12567
12568   ac_save_CPPFLAGS="$CPPFLAGS"
12569   if test \! -z "$includedir" ; then
12570     CPPFLAGS="$CPPFLAGS -I$includedir"
12571   fi
12572   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
12573   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
12574   { $as_echo "$as_me:$LINENO: checking for X11/extensions/Xrandr.h" >&5
12575 $as_echo_n "checking for X11/extensions/Xrandr.h... " >&6; }
12576 if test "${ac_cv_header_X11_extensions_Xrandr_h+set}" = set; then
12577   $as_echo_n "(cached) " >&6
12578 else
12579   cat >conftest.$ac_ext <<_ACEOF
12580 /* confdefs.h.  */
12581 _ACEOF
12582 cat confdefs.h >>conftest.$ac_ext
12583 cat >>conftest.$ac_ext <<_ACEOF
12584 /* end confdefs.h.  */
12585 #include <X11/Xlib.h>
12586
12587 #include <X11/extensions/Xrandr.h>
12588 _ACEOF
12589 rm -rf conftest.$ac_objext
12590 if { (ac_try="$ac_compile"
12591 case "(($ac_try" in
12592   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12593   *) ac_try_echo=$ac_try;;
12594 esac
12595 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
12596 $as_echo "$ac_try_echo") >&5
12597   (eval "$ac_compile") 2>conftest.er1
12598   ac_status=$?
12599   grep -v '^ *+' conftest.er1 >conftest.err
12600   rm -rf conftest.er1
12601   cat conftest.err >&5
12602   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
12603   (exit $ac_status); } && {
12604          test -z "$ac_c_werror_flag" ||
12605          test ! -s conftest.err
12606        } && test -s conftest.$ac_objext; then
12607   ac_cv_header_X11_extensions_Xrandr_h=yes
12608 else
12609   $as_echo "$as_me: failed program was:" >&5
12610 sed 's/^/| /' conftest.$ac_ext >&5
12611
12612         ac_cv_header_X11_extensions_Xrandr_h=no
12613 fi
12614
12615 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12616 fi
12617 { $as_echo "$as_me:$LINENO: result: $ac_cv_header_X11_extensions_Xrandr_h" >&5
12618 $as_echo "$ac_cv_header_X11_extensions_Xrandr_h" >&6; }
12619 if test "x$ac_cv_header_X11_extensions_Xrandr_h" = x""yes; then
12620   have_randr=yes
12621 fi
12622
12623
12624   CPPFLAGS="$ac_save_CPPFLAGS"
12625
12626   # if that succeeded, then check for the XRR code in the libraries
12627   if test "$have_randr" = yes; then
12628
12629     # RANDR probably needs -lXrender
12630     xrender_libs=
12631
12632   ac_save_CPPFLAGS="$CPPFLAGS"
12633   ac_save_LDFLAGS="$LDFLAGS"
12634 #  ac_save_LIBS="$LIBS"
12635
12636   if test \! -z "$includedir" ; then
12637     CPPFLAGS="$CPPFLAGS -I$includedir"
12638   fi
12639   # note: $X_CFLAGS includes $x_includes
12640   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
12641
12642   if test \! -z "$libdir" ; then
12643     LDFLAGS="$LDFLAGS -L$libdir"
12644   fi
12645   # note: $X_LIBS includes $x_libraries
12646   LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
12647
12648   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
12649   LDFLAGS=`eval eval eval eval eval eval eval eval eval echo $LDFLAGS`
12650   { $as_echo "$as_me:$LINENO: checking for XRenderSetSubpixelOrder in -lXrender" >&5
12651 $as_echo_n "checking for XRenderSetSubpixelOrder in -lXrender... " >&6; }
12652 if test "${ac_cv_lib_Xrender_XRenderSetSubpixelOrder+set}" = set; then
12653   $as_echo_n "(cached) " >&6
12654 else
12655   ac_check_lib_save_LIBS=$LIBS
12656 LIBS="-lXrender -lXext -lX11 $LIBS"
12657 cat >conftest.$ac_ext <<_ACEOF
12658 /* confdefs.h.  */
12659 _ACEOF
12660 cat confdefs.h >>conftest.$ac_ext
12661 cat >>conftest.$ac_ext <<_ACEOF
12662 /* end confdefs.h.  */
12663
12664 /* Override any GCC internal prototype to avoid an error.
12665    Use char because int might match the return type of a GCC
12666    builtin and then its argument prototype would still apply.  */
12667 #ifdef __cplusplus
12668 extern "C"
12669 #endif
12670 char XRenderSetSubpixelOrder ();
12671 int
12672 main ()
12673 {
12674 return XRenderSetSubpixelOrder ();
12675   ;
12676   return 0;
12677 }
12678 _ACEOF
12679 rm -rf conftest.$ac_objext conftest$ac_exeext
12680 if { (ac_try="$ac_link"
12681 case "(($ac_try" in
12682   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12683   *) ac_try_echo=$ac_try;;
12684 esac
12685 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
12686 $as_echo "$ac_try_echo") >&5
12687   (eval "$ac_link") 2>conftest.er1
12688   ac_status=$?
12689   grep -v '^ *+' conftest.er1 >conftest.err
12690   rm -rf conftest.er1
12691   cat conftest.err >&5
12692   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
12693   (exit $ac_status); } && {
12694          test -z "$ac_c_werror_flag" ||
12695          test ! -s conftest.err
12696        } && test -s conftest$ac_exeext && {
12697          test "$cross_compiling" = yes ||
12698          $as_test_x conftest$ac_exeext
12699        }; then
12700   ac_cv_lib_Xrender_XRenderSetSubpixelOrder=yes
12701 else
12702   $as_echo "$as_me: failed program was:" >&5
12703 sed 's/^/| /' conftest.$ac_ext >&5
12704
12705         ac_cv_lib_Xrender_XRenderSetSubpixelOrder=no
12706 fi
12707
12708 rm -rf conftest.dSYM
12709 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
12710       conftest$ac_exeext conftest.$ac_ext
12711 LIBS=$ac_check_lib_save_LIBS
12712 fi
12713 { $as_echo "$as_me:$LINENO: result: $ac_cv_lib_Xrender_XRenderSetSubpixelOrder" >&5
12714 $as_echo "$ac_cv_lib_Xrender_XRenderSetSubpixelOrder" >&6; }
12715 if test "x$ac_cv_lib_Xrender_XRenderSetSubpixelOrder" = x""yes; then
12716   xrender_libs="-lXrender"
12717 else
12718   true
12719 fi
12720
12721   CPPFLAGS="$ac_save_CPPFLAGS"
12722   LDFLAGS="$ac_save_LDFLAGS"
12723 #  LIBS="$ac_save_LIBS"
12724
12725
12726     # first look for RANDR in -lXext
12727     have_randr=no
12728
12729   ac_save_CPPFLAGS="$CPPFLAGS"
12730   ac_save_LDFLAGS="$LDFLAGS"
12731 #  ac_save_LIBS="$LIBS"
12732
12733   if test \! -z "$includedir" ; then
12734     CPPFLAGS="$CPPFLAGS -I$includedir"
12735   fi
12736   # note: $X_CFLAGS includes $x_includes
12737   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
12738
12739   if test \! -z "$libdir" ; then
12740     LDFLAGS="$LDFLAGS -L$libdir"
12741   fi
12742   # note: $X_LIBS includes $x_libraries
12743   LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
12744
12745   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
12746   LDFLAGS=`eval eval eval eval eval eval eval eval eval echo $LDFLAGS`
12747   { $as_echo "$as_me:$LINENO: checking for XRRGetScreenInfo in -lXext" >&5
12748 $as_echo_n "checking for XRRGetScreenInfo in -lXext... " >&6; }
12749 if test "${ac_cv_lib_Xext_XRRGetScreenInfo+set}" = set; then
12750   $as_echo_n "(cached) " >&6
12751 else
12752   ac_check_lib_save_LIBS=$LIBS
12753 LIBS="-lXext $xrender_libs -lXext -lX11 $LIBS"
12754 cat >conftest.$ac_ext <<_ACEOF
12755 /* confdefs.h.  */
12756 _ACEOF
12757 cat confdefs.h >>conftest.$ac_ext
12758 cat >>conftest.$ac_ext <<_ACEOF
12759 /* end confdefs.h.  */
12760
12761 /* Override any GCC internal prototype to avoid an error.
12762    Use char because int might match the return type of a GCC
12763    builtin and then its argument prototype would still apply.  */
12764 #ifdef __cplusplus
12765 extern "C"
12766 #endif
12767 char XRRGetScreenInfo ();
12768 int
12769 main ()
12770 {
12771 return XRRGetScreenInfo ();
12772   ;
12773   return 0;
12774 }
12775 _ACEOF
12776 rm -rf conftest.$ac_objext conftest$ac_exeext
12777 if { (ac_try="$ac_link"
12778 case "(($ac_try" in
12779   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12780   *) ac_try_echo=$ac_try;;
12781 esac
12782 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
12783 $as_echo "$ac_try_echo") >&5
12784   (eval "$ac_link") 2>conftest.er1
12785   ac_status=$?
12786   grep -v '^ *+' conftest.er1 >conftest.err
12787   rm -rf conftest.er1
12788   cat conftest.err >&5
12789   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
12790   (exit $ac_status); } && {
12791          test -z "$ac_c_werror_flag" ||
12792          test ! -s conftest.err
12793        } && test -s conftest$ac_exeext && {
12794          test "$cross_compiling" = yes ||
12795          $as_test_x conftest$ac_exeext
12796        }; then
12797   ac_cv_lib_Xext_XRRGetScreenInfo=yes
12798 else
12799   $as_echo "$as_me: failed program was:" >&5
12800 sed 's/^/| /' conftest.$ac_ext >&5
12801
12802         ac_cv_lib_Xext_XRRGetScreenInfo=no
12803 fi
12804
12805 rm -rf conftest.dSYM
12806 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
12807       conftest$ac_exeext conftest.$ac_ext
12808 LIBS=$ac_check_lib_save_LIBS
12809 fi
12810 { $as_echo "$as_me:$LINENO: result: $ac_cv_lib_Xext_XRRGetScreenInfo" >&5
12811 $as_echo "$ac_cv_lib_Xext_XRRGetScreenInfo" >&6; }
12812 if test "x$ac_cv_lib_Xext_XRRGetScreenInfo" = x""yes; then
12813   have_randr=yes; SAVER_LIBS="$SAVER_LIBS $xrender_libs"
12814 else
12815   true
12816 fi
12817
12818   CPPFLAGS="$ac_save_CPPFLAGS"
12819   LDFLAGS="$ac_save_LDFLAGS"
12820 #  LIBS="$ac_save_LIBS"
12821
12822
12823     # if that failed, look in -lXrandr
12824     if test "$have_randr" = no; then
12825
12826   ac_save_CPPFLAGS="$CPPFLAGS"
12827   ac_save_LDFLAGS="$LDFLAGS"
12828 #  ac_save_LIBS="$LIBS"
12829
12830   if test \! -z "$includedir" ; then
12831     CPPFLAGS="$CPPFLAGS -I$includedir"
12832   fi
12833   # note: $X_CFLAGS includes $x_includes
12834   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
12835
12836   if test \! -z "$libdir" ; then
12837     LDFLAGS="$LDFLAGS -L$libdir"
12838   fi
12839   # note: $X_LIBS includes $x_libraries
12840   LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
12841
12842   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
12843   LDFLAGS=`eval eval eval eval eval eval eval eval eval echo $LDFLAGS`
12844   { $as_echo "$as_me:$LINENO: checking for XRRGetScreenInfo in -lXrandr" >&5
12845 $as_echo_n "checking for XRRGetScreenInfo in -lXrandr... " >&6; }
12846 if test "${ac_cv_lib_Xrandr_XRRGetScreenInfo+set}" = set; then
12847   $as_echo_n "(cached) " >&6
12848 else
12849   ac_check_lib_save_LIBS=$LIBS
12850 LIBS="-lXrandr $xrender_libs -lXext -lX11 $LIBS"
12851 cat >conftest.$ac_ext <<_ACEOF
12852 /* confdefs.h.  */
12853 _ACEOF
12854 cat confdefs.h >>conftest.$ac_ext
12855 cat >>conftest.$ac_ext <<_ACEOF
12856 /* end confdefs.h.  */
12857
12858 /* Override any GCC internal prototype to avoid an error.
12859    Use char because int might match the return type of a GCC
12860    builtin and then its argument prototype would still apply.  */
12861 #ifdef __cplusplus
12862 extern "C"
12863 #endif
12864 char XRRGetScreenInfo ();
12865 int
12866 main ()
12867 {
12868 return XRRGetScreenInfo ();
12869   ;
12870   return 0;
12871 }
12872 _ACEOF
12873 rm -rf conftest.$ac_objext conftest$ac_exeext
12874 if { (ac_try="$ac_link"
12875 case "(($ac_try" in
12876   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12877   *) ac_try_echo=$ac_try;;
12878 esac
12879 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
12880 $as_echo "$ac_try_echo") >&5
12881   (eval "$ac_link") 2>conftest.er1
12882   ac_status=$?
12883   grep -v '^ *+' conftest.er1 >conftest.err
12884   rm -rf conftest.er1
12885   cat conftest.err >&5
12886   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
12887   (exit $ac_status); } && {
12888          test -z "$ac_c_werror_flag" ||
12889          test ! -s conftest.err
12890        } && test -s conftest$ac_exeext && {
12891          test "$cross_compiling" = yes ||
12892          $as_test_x conftest$ac_exeext
12893        }; then
12894   ac_cv_lib_Xrandr_XRRGetScreenInfo=yes
12895 else
12896   $as_echo "$as_me: failed program was:" >&5
12897 sed 's/^/| /' conftest.$ac_ext >&5
12898
12899         ac_cv_lib_Xrandr_XRRGetScreenInfo=no
12900 fi
12901
12902 rm -rf conftest.dSYM
12903 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
12904       conftest$ac_exeext conftest.$ac_ext
12905 LIBS=$ac_check_lib_save_LIBS
12906 fi
12907 { $as_echo "$as_me:$LINENO: result: $ac_cv_lib_Xrandr_XRRGetScreenInfo" >&5
12908 $as_echo "$ac_cv_lib_Xrandr_XRRGetScreenInfo" >&6; }
12909 if test "x$ac_cv_lib_Xrandr_XRRGetScreenInfo" = x""yes; then
12910   have_randr=yes; SAVER_LIBS="$SAVER_LIBS -lXrandr $xrender_libs"
12911 else
12912   true
12913 fi
12914
12915   CPPFLAGS="$ac_save_CPPFLAGS"
12916   LDFLAGS="$ac_save_LDFLAGS"
12917 #  LIBS="$ac_save_LIBS"
12918
12919     fi
12920   fi
12921
12922   # if that succeeded, then we've really got it.
12923   if test "$have_randr" = yes; then
12924     cat >>confdefs.h <<\_ACEOF
12925 #define HAVE_RANDR 1
12926 _ACEOF
12927
12928
12929     # Now check for version 1.2 in the same libs.
12930     # Try to compile, since on MacOS 10.5.7, headers are older than libs!
12931     { $as_echo "$as_me:$LINENO: checking for XRRGetScreenResources" >&5
12932 $as_echo_n "checking for XRRGetScreenResources... " >&6; }
12933 if test "${ac_cv_randr_12+set}" = set; then
12934   $as_echo_n "(cached) " >&6
12935 else
12936   ac_cv_randr_12=no
12937
12938   ac_save_CPPFLAGS="$CPPFLAGS"
12939   if test \! -z "$includedir" ; then
12940     CPPFLAGS="$CPPFLAGS -I$includedir"
12941   fi
12942   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
12943   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
12944   cat >conftest.$ac_ext <<_ACEOF
12945 /* confdefs.h.  */
12946 _ACEOF
12947 cat confdefs.h >>conftest.$ac_ext
12948 cat >>conftest.$ac_ext <<_ACEOF
12949 /* end confdefs.h.  */
12950 #include <stdlib.h>
12951                          #include <X11/Xlib.h>
12952                          #include <X11/extensions/Xrandr.h>
12953 int
12954 main ()
12955 {
12956 XRRScreenResources *res =
12957                            XRRGetScreenResources (0, 0);
12958   ;
12959   return 0;
12960 }
12961 _ACEOF
12962 rm -rf conftest.$ac_objext
12963 if { (ac_try="$ac_compile"
12964 case "(($ac_try" in
12965   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12966   *) ac_try_echo=$ac_try;;
12967 esac
12968 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
12969 $as_echo "$ac_try_echo") >&5
12970   (eval "$ac_compile") 2>conftest.er1
12971   ac_status=$?
12972   grep -v '^ *+' conftest.er1 >conftest.err
12973   rm -rf conftest.er1
12974   cat conftest.err >&5
12975   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
12976   (exit $ac_status); } && {
12977          test -z "$ac_c_werror_flag" ||
12978          test ! -s conftest.err
12979        } && test -s conftest.$ac_objext; then
12980   ac_cv_randr_12=yes
12981 else
12982   $as_echo "$as_me: failed program was:" >&5
12983 sed 's/^/| /' conftest.$ac_ext >&5
12984
12985         ac_cv_randr_12=no
12986 fi
12987
12988 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12989   CPPFLAGS="$ac_save_CPPFLAGS"
12990 fi
12991 { $as_echo "$as_me:$LINENO: result: $ac_cv_randr_12" >&5
12992 $as_echo "$ac_cv_randr_12" >&6; }
12993     if test "$ac_cv_randr_12" = yes ; then
12994       cat >>confdefs.h <<\_ACEOF
12995 #define HAVE_RANDR_12 1
12996 _ACEOF
12997
12998     fi
12999 #   AC_CHECK_X_LIB(c, XRRGetOutputInfo, [AC_DEFINE(HAVE_RANDR_12)],
13000 #                  [true], $SAVER_LIBS)
13001   fi
13002
13003
13004 elif test "$with_randr" != no; then
13005   echo "error: must be yes or no: --with-randr-ext=$with_randr"
13006   exit 1
13007 fi
13008
13009
13010 ###############################################################################
13011 #
13012 #       Check for XF86MiscSetGrabKeysState (but only bother if we are already
13013 #       using other XF86 stuff.)
13014 #
13015 ###############################################################################
13016
13017 have_xf86miscsetgrabkeysstate=no
13018 if test "$have_xf86gamma" = yes -o "$have_xf86vmode" = yes; then
13019
13020   ac_save_CPPFLAGS="$CPPFLAGS"
13021   ac_save_LDFLAGS="$LDFLAGS"
13022 #  ac_save_LIBS="$LIBS"
13023
13024   if test \! -z "$includedir" ; then
13025     CPPFLAGS="$CPPFLAGS -I$includedir"
13026   fi
13027   # note: $X_CFLAGS includes $x_includes
13028   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
13029
13030   if test \! -z "$libdir" ; then
13031     LDFLAGS="$LDFLAGS -L$libdir"
13032   fi
13033   # note: $X_LIBS includes $x_libraries
13034   LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
13035
13036   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
13037   LDFLAGS=`eval eval eval eval eval eval eval eval eval echo $LDFLAGS`
13038   { $as_echo "$as_me:$LINENO: checking for XF86MiscSetGrabKeysState in -lXxf86misc" >&5
13039 $as_echo_n "checking for XF86MiscSetGrabKeysState in -lXxf86misc... " >&6; }
13040 if test "${ac_cv_lib_Xxf86misc_XF86MiscSetGrabKeysState+set}" = set; then
13041   $as_echo_n "(cached) " >&6
13042 else
13043   ac_check_lib_save_LIBS=$LIBS
13044 LIBS="-lXxf86misc -lXext -lX11 $LIBS"
13045 cat >conftest.$ac_ext <<_ACEOF
13046 /* confdefs.h.  */
13047 _ACEOF
13048 cat confdefs.h >>conftest.$ac_ext
13049 cat >>conftest.$ac_ext <<_ACEOF
13050 /* end confdefs.h.  */
13051
13052 /* Override any GCC internal prototype to avoid an error.
13053    Use char because int might match the return type of a GCC
13054    builtin and then its argument prototype would still apply.  */
13055 #ifdef __cplusplus
13056 extern "C"
13057 #endif
13058 char XF86MiscSetGrabKeysState ();
13059 int
13060 main ()
13061 {
13062 return XF86MiscSetGrabKeysState ();
13063   ;
13064   return 0;
13065 }
13066 _ACEOF
13067 rm -rf conftest.$ac_objext conftest$ac_exeext
13068 if { (ac_try="$ac_link"
13069 case "(($ac_try" in
13070   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13071   *) ac_try_echo=$ac_try;;
13072 esac
13073 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
13074 $as_echo "$ac_try_echo") >&5
13075   (eval "$ac_link") 2>conftest.er1
13076   ac_status=$?
13077   grep -v '^ *+' conftest.er1 >conftest.err
13078   rm -rf conftest.er1
13079   cat conftest.err >&5
13080   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
13081   (exit $ac_status); } && {
13082          test -z "$ac_c_werror_flag" ||
13083          test ! -s conftest.err
13084        } && test -s conftest$ac_exeext && {
13085          test "$cross_compiling" = yes ||
13086          $as_test_x conftest$ac_exeext
13087        }; then
13088   ac_cv_lib_Xxf86misc_XF86MiscSetGrabKeysState=yes
13089 else
13090   $as_echo "$as_me: failed program was:" >&5
13091 sed 's/^/| /' conftest.$ac_ext >&5
13092
13093         ac_cv_lib_Xxf86misc_XF86MiscSetGrabKeysState=no
13094 fi
13095
13096 rm -rf conftest.dSYM
13097 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
13098       conftest$ac_exeext conftest.$ac_ext
13099 LIBS=$ac_check_lib_save_LIBS
13100 fi
13101 { $as_echo "$as_me:$LINENO: result: $ac_cv_lib_Xxf86misc_XF86MiscSetGrabKeysState" >&5
13102 $as_echo "$ac_cv_lib_Xxf86misc_XF86MiscSetGrabKeysState" >&6; }
13103 if test "x$ac_cv_lib_Xxf86misc_XF86MiscSetGrabKeysState" = x""yes; then
13104   have_xf86miscsetgrabkeysstate=yes
13105 else
13106   true
13107 fi
13108
13109   CPPFLAGS="$ac_save_CPPFLAGS"
13110   LDFLAGS="$ac_save_LDFLAGS"
13111 #  LIBS="$ac_save_LIBS"
13112
13113   if test "$have_xf86miscsetgrabkeysstate" = yes ; then
13114     SAVER_LIBS="$SAVER_LIBS -lXxf86misc"
13115     cat >>confdefs.h <<\_ACEOF
13116 #define HAVE_XF86MISCSETGRABKEYSSTATE 1
13117 _ACEOF
13118
13119   fi
13120 fi
13121
13122
13123 ###############################################################################
13124 #
13125 #       Check for HP XHPDisableReset and XHPEnableReset.
13126 #
13127 ###############################################################################
13128
13129 { $as_echo "$as_me:$LINENO: checking for XHPDisableReset in X11/XHPlib.h" >&5
13130 $as_echo_n "checking for XHPDisableReset in X11/XHPlib.h... " >&6; }
13131
13132   ac_save_CPPFLAGS="$CPPFLAGS"
13133   if test \! -z "$includedir" ; then
13134     CPPFLAGS="$CPPFLAGS -I$includedir"
13135   fi
13136   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
13137   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
13138   cat >conftest.$ac_ext <<_ACEOF
13139 /* confdefs.h.  */
13140 _ACEOF
13141 cat confdefs.h >>conftest.$ac_ext
13142 cat >>conftest.$ac_ext <<_ACEOF
13143 /* end confdefs.h.  */
13144 #include <X11/XHPlib.h>
13145
13146 _ACEOF
13147 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
13148   $EGREP "XHPDisableReset" >/dev/null 2>&1; then
13149   cat >>confdefs.h <<\_ACEOF
13150 #define HAVE_XHPDISABLERESET 1
13151 _ACEOF
13152
13153                    SAVER_LIBS="-lXhp11 $SAVER_LIBS"
13154                    { $as_echo "$as_me:$LINENO: result: yes" >&5
13155 $as_echo "yes" >&6; }
13156 else
13157   { $as_echo "$as_me:$LINENO: result: no" >&5
13158 $as_echo "no" >&6; }
13159 fi
13160 rm -rf conftest*
13161
13162   CPPFLAGS="$ac_save_CPPFLAGS"
13163
13164
13165 ###############################################################################
13166 #
13167 #       Check for /proc/interrupts.
13168 #
13169 ###############################################################################
13170
13171 have_proc_interrupts=no
13172 with_proc_interrupts_req=unspecified
13173
13174 # Check whether --with-proc-interrupts was given.
13175 if test "${with_proc_interrupts+set}" = set; then
13176   withval=$with_proc_interrupts; with_proc_interrupts="$withval"; with_proc_interrupts_req="$withval"
13177 else
13178   with_proc_interrupts=yes
13179 fi
13180
13181
13182 if test "$with_proc_interrupts" = yes; then
13183
13184   # Note that we may be building in an environment (e.g. Debian buildd chroot)
13185   # without a proper /proc filesystem. If /proc/interrupts exists, then we'll
13186   # check that it has the bits we need, but otherwise we'll just go on faith.
13187   #
13188   have_proc_interrupts=yes
13189
13190   if test -f /proc/interrupts; then
13191    { $as_echo "$as_me:$LINENO: checking whether /proc/interrupts contains keyboard data" >&5
13192 $as_echo_n "checking whether /proc/interrupts contains keyboard data... " >&6; }
13193 if test "${ac_cv_have_proc_interrupts+set}" = set; then
13194   $as_echo_n "(cached) " >&6
13195 else
13196   ac_cv_have_proc_interrupts=no
13197      if grep 'keyboard\|i8042' /proc/interrupts >/dev/null 2>&1 ; then
13198        ac_cv_have_proc_interrupts=yes
13199      fi
13200
13201 fi
13202 { $as_echo "$as_me:$LINENO: result: $ac_cv_have_proc_interrupts" >&5
13203 $as_echo "$ac_cv_have_proc_interrupts" >&6; }
13204    have_proc_interrupts=$ac_cv_have_proc_interrupts
13205   fi
13206
13207   if test "$have_proc_interrupts" = yes; then
13208     cat >>confdefs.h <<\_ACEOF
13209 #define HAVE_PROC_INTERRUPTS 1
13210 _ACEOF
13211
13212   fi
13213
13214 elif test "$with_proc_interrupts" != no; then
13215   echo "error: must be yes or no: --with-proc-interrupts=$with_proc_interrupts"
13216   exit 1
13217 fi
13218
13219
13220 ###############################################################################
13221 #
13222 #       The --enable-locking option
13223 #
13224 ###############################################################################
13225
13226 # Check whether --enable-locking was given.
13227 if test "${enable_locking+set}" = set; then
13228   enableval=$enable_locking; enable_locking="$enableval"
13229 else
13230   if test "$ac_macosx" = yes; then
13231     # We can't lock on MacOS X, so default to not compiling in support for it.
13232     # But allow --enable-locking to override that, so I can debug Linux locking
13233     # under MacOS X11.
13234     enable_locking=no
13235    else
13236     enable_locking=yes
13237    fi
13238 fi
13239
13240 if test "$enable_locking" = yes; then
13241   true
13242 elif test "$enable_locking" = no; then
13243   cat >>confdefs.h <<\_ACEOF
13244 #define NO_LOCKING 1
13245 _ACEOF
13246
13247 else
13248   echo "error: must be yes or no: --enable-locking=$enable_locking"
13249   exit 1
13250 fi
13251
13252
13253 ###############################################################################
13254 #
13255 #       Whether to allow root password to unblank.
13256 #
13257 ###############################################################################
13258 # Check whether --enable-root-passwd was given.
13259 if test "${enable_root_passwd+set}" = set; then
13260   enableval=$enable_root_passwd; enable_root_passwd="$enableval"
13261 else
13262   enable_root_passwd=yes
13263 fi
13264
13265 if test "$enable_root_passwd" = yes; then
13266   cat >>confdefs.h <<\_ACEOF
13267 #define ALLOW_ROOT_PASSWD 1
13268 _ACEOF
13269
13270   true
13271 elif test "$enable_root_passwd" != no; then
13272   echo "error: must be yes or no: --enable-root-passwd=$enable_root_passwd"
13273   exit 1
13274 fi
13275
13276 ###############################################################################
13277 #
13278 #       Check for PAM.
13279 #
13280 ###############################################################################
13281
13282 case "$host" in
13283   *-solaris*)
13284    # Solaris systems tend to come with PAM misconfigured.
13285    #  Don't build it by default, even if the headers exist.
13286    with_pam_default=no
13287    ;;
13288   *)
13289    # Default to building PAM support on all other systems, if it exists.
13290    with_pam_default=yes
13291   ;;
13292 esac
13293
13294 have_pam=no
13295 with_pam_req=unspecified
13296
13297
13298 # Check whether --with-pam was given.
13299 if test "${with_pam+set}" = set; then
13300   withval=$with_pam; with_pam="$withval"; with_pam_req="$withval"
13301 else
13302   with_pam=$with_pam_default
13303 fi
13304
13305
13306
13307 # Check whether --with-pam_service_name was given.
13308 if test "${with_pam_service_name+set}" = set; then
13309   withval=$with_pam_service_name; pam_service_name="$withval"
13310 else
13311   pam_service_name="xscreensaver"
13312 fi
13313
13314
13315 # Check whether --enable-pam-check-account-type was given.
13316 if test "${enable_pam_check_account_type+set}" = set; then
13317   enableval=$enable_pam_check_account_type; enable_pam_check_account_type="$enableval"
13318 else
13319   enable_pam_check_account_type=no
13320 fi
13321
13322 if test "$enable_pam_check_account_type" = yes ; then
13323   cat >>confdefs.h <<\_ACEOF
13324 #define PAM_CHECK_ACCOUNT_TYPE 1
13325 _ACEOF
13326
13327   true
13328 elif test "$enable_pam_check_account_type" != no ; then
13329   echo "error: must be yes or no: --enable-pam-check-account-type=$enable_pam_check_account_type"
13330   exit 1
13331 fi
13332
13333
13334    case "$with_pam" in
13335     yes) ;;
13336     no)  ;;
13337
13338     /*)
13339      { $as_echo "$as_me:$LINENO: checking for PAM headers" >&5
13340 $as_echo_n "checking for PAM headers... " >&6; }
13341      d=$with_pam/include
13342      if test -d $d; then
13343        X_CFLAGS="-I$d $X_CFLAGS"
13344        { $as_echo "$as_me:$LINENO: result: $d" >&5
13345 $as_echo "$d" >&6; }
13346      else
13347        { $as_echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
13348 $as_echo "not found ($d: no such directory)" >&6; }
13349      fi
13350
13351      { $as_echo "$as_me:$LINENO: checking for PAM libs" >&5
13352 $as_echo_n "checking for PAM libs... " >&6; }
13353      d=$with_pam/lib
13354      if test -d $d; then
13355        X_LIBS="-L$d $X_LIBS"
13356        { $as_echo "$as_me:$LINENO: result: $d" >&5
13357 $as_echo "$d" >&6; }
13358      else
13359        { $as_echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
13360 $as_echo "not found ($d: no such directory)" >&6; }
13361      fi
13362
13363      # replace the directory string with "yes".
13364      with_pam_req="yes"
13365      with_pam=$with_pam_req
13366      ;;
13367
13368     *)
13369      echo ""
13370      echo "error: argument to --with-pam must be \"yes\", \"no\", or a directory."
13371      echo "       If it is a directory, then \`DIR/include' will be added to"
13372      echo "       the -I list, and \`DIR/lib' will be added to the -L list."
13373      exit 1
13374      ;;
13375    esac
13376
13377
13378 if test "$enable_locking" = yes -a "$with_pam" = yes; then
13379   { $as_echo "$as_me:$LINENO: checking for PAM" >&5
13380 $as_echo_n "checking for PAM... " >&6; }
13381 if test "${ac_cv_pam+set}" = set; then
13382   $as_echo_n "(cached) " >&6
13383 else
13384
13385   ac_save_CPPFLAGS="$CPPFLAGS"
13386   if test \! -z "$includedir" ; then
13387     CPPFLAGS="$CPPFLAGS -I$includedir"
13388   fi
13389   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
13390   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
13391   cat >conftest.$ac_ext <<_ACEOF
13392 /* confdefs.h.  */
13393 _ACEOF
13394 cat confdefs.h >>conftest.$ac_ext
13395 cat >>conftest.$ac_ext <<_ACEOF
13396 /* end confdefs.h.  */
13397 #include <security/pam_appl.h>
13398 int
13399 main ()
13400 {
13401
13402   ;
13403   return 0;
13404 }
13405 _ACEOF
13406 rm -rf conftest.$ac_objext
13407 if { (ac_try="$ac_compile"
13408 case "(($ac_try" in
13409   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13410   *) ac_try_echo=$ac_try;;
13411 esac
13412 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
13413 $as_echo "$ac_try_echo") >&5
13414   (eval "$ac_compile") 2>conftest.er1
13415   ac_status=$?
13416   grep -v '^ *+' conftest.er1 >conftest.err
13417   rm -rf conftest.er1
13418   cat conftest.err >&5
13419   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
13420   (exit $ac_status); } && {
13421          test -z "$ac_c_werror_flag" ||
13422          test ! -s conftest.err
13423        } && test -s conftest.$ac_objext; then
13424   ac_cv_pam=yes
13425 else
13426   $as_echo "$as_me: failed program was:" >&5
13427 sed 's/^/| /' conftest.$ac_ext >&5
13428
13429         ac_cv_pam=no
13430 fi
13431
13432 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13433   CPPFLAGS="$ac_save_CPPFLAGS"
13434 fi
13435 { $as_echo "$as_me:$LINENO: result: $ac_cv_pam" >&5
13436 $as_echo "$ac_cv_pam" >&6; }
13437   if test "$ac_cv_pam" = yes ; then
13438     have_pam=yes
13439     cat >>confdefs.h <<\_ACEOF
13440 #define HAVE_PAM 1
13441 _ACEOF
13442
13443     cat >>confdefs.h <<_ACEOF
13444 #define PAM_SERVICE_NAME "$pam_service_name"
13445 _ACEOF
13446
13447
13448     PASSWD_LIBS="${PASSWD_LIBS} -lpam"
13449
13450     # libpam typically requires dlopen and dlsym.  On FreeBSD,
13451     # those are in libc.  On Linux and Solaris, they're in libdl.
13452     { $as_echo "$as_me:$LINENO: checking for dlopen in -ldl" >&5
13453 $as_echo_n "checking for dlopen in -ldl... " >&6; }
13454 if test "${ac_cv_lib_dl_dlopen+set}" = set; then
13455   $as_echo_n "(cached) " >&6
13456 else
13457   ac_check_lib_save_LIBS=$LIBS
13458 LIBS="-ldl  $LIBS"
13459 cat >conftest.$ac_ext <<_ACEOF
13460 /* confdefs.h.  */
13461 _ACEOF
13462 cat confdefs.h >>conftest.$ac_ext
13463 cat >>conftest.$ac_ext <<_ACEOF
13464 /* end confdefs.h.  */
13465
13466 /* Override any GCC internal prototype to avoid an error.
13467    Use char because int might match the return type of a GCC
13468    builtin and then its argument prototype would still apply.  */
13469 #ifdef __cplusplus
13470 extern "C"
13471 #endif
13472 char dlopen ();
13473 int
13474 main ()
13475 {
13476 return dlopen ();
13477   ;
13478   return 0;
13479 }
13480 _ACEOF
13481 rm -rf conftest.$ac_objext conftest$ac_exeext
13482 if { (ac_try="$ac_link"
13483 case "(($ac_try" in
13484   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13485   *) ac_try_echo=$ac_try;;
13486 esac
13487 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
13488 $as_echo "$ac_try_echo") >&5
13489   (eval "$ac_link") 2>conftest.er1
13490   ac_status=$?
13491   grep -v '^ *+' conftest.er1 >conftest.err
13492   rm -rf conftest.er1
13493   cat conftest.err >&5
13494   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
13495   (exit $ac_status); } && {
13496          test -z "$ac_c_werror_flag" ||
13497          test ! -s conftest.err
13498        } && test -s conftest$ac_exeext && {
13499          test "$cross_compiling" = yes ||
13500          $as_test_x conftest$ac_exeext
13501        }; then
13502   ac_cv_lib_dl_dlopen=yes
13503 else
13504   $as_echo "$as_me: failed program was:" >&5
13505 sed 's/^/| /' conftest.$ac_ext >&5
13506
13507         ac_cv_lib_dl_dlopen=no
13508 fi
13509
13510 rm -rf conftest.dSYM
13511 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
13512       conftest$ac_exeext conftest.$ac_ext
13513 LIBS=$ac_check_lib_save_LIBS
13514 fi
13515 { $as_echo "$as_me:$LINENO: result: $ac_cv_lib_dl_dlopen" >&5
13516 $as_echo "$ac_cv_lib_dl_dlopen" >&6; }
13517 if test "x$ac_cv_lib_dl_dlopen" = x""yes; then
13518   PASSWD_LIBS="${PASSWD_LIBS} -ldl"
13519 fi
13520
13521
13522     # On Linux, sigtimedwait() is in libc; on Solaris, it's in librt.
13523     have_timedwait=no
13524     { $as_echo "$as_me:$LINENO: checking for sigtimedwait in -lc" >&5
13525 $as_echo_n "checking for sigtimedwait in -lc... " >&6; }
13526 if test "${ac_cv_lib_c_sigtimedwait+set}" = set; then
13527   $as_echo_n "(cached) " >&6
13528 else
13529   ac_check_lib_save_LIBS=$LIBS
13530 LIBS="-lc  $LIBS"
13531 cat >conftest.$ac_ext <<_ACEOF
13532 /* confdefs.h.  */
13533 _ACEOF
13534 cat confdefs.h >>conftest.$ac_ext
13535 cat >>conftest.$ac_ext <<_ACEOF
13536 /* end confdefs.h.  */
13537
13538 /* Override any GCC internal prototype to avoid an error.
13539    Use char because int might match the return type of a GCC
13540    builtin and then its argument prototype would still apply.  */
13541 #ifdef __cplusplus
13542 extern "C"
13543 #endif
13544 char sigtimedwait ();
13545 int
13546 main ()
13547 {
13548 return sigtimedwait ();
13549   ;
13550   return 0;
13551 }
13552 _ACEOF
13553 rm -rf conftest.$ac_objext conftest$ac_exeext
13554 if { (ac_try="$ac_link"
13555 case "(($ac_try" in
13556   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13557   *) ac_try_echo=$ac_try;;
13558 esac
13559 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
13560 $as_echo "$ac_try_echo") >&5
13561   (eval "$ac_link") 2>conftest.er1
13562   ac_status=$?
13563   grep -v '^ *+' conftest.er1 >conftest.err
13564   rm -rf conftest.er1
13565   cat conftest.err >&5
13566   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
13567   (exit $ac_status); } && {
13568          test -z "$ac_c_werror_flag" ||
13569          test ! -s conftest.err
13570        } && test -s conftest$ac_exeext && {
13571          test "$cross_compiling" = yes ||
13572          $as_test_x conftest$ac_exeext
13573        }; then
13574   ac_cv_lib_c_sigtimedwait=yes
13575 else
13576   $as_echo "$as_me: failed program was:" >&5
13577 sed 's/^/| /' conftest.$ac_ext >&5
13578
13579         ac_cv_lib_c_sigtimedwait=no
13580 fi
13581
13582 rm -rf conftest.dSYM
13583 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
13584       conftest$ac_exeext conftest.$ac_ext
13585 LIBS=$ac_check_lib_save_LIBS
13586 fi
13587 { $as_echo "$as_me:$LINENO: result: $ac_cv_lib_c_sigtimedwait" >&5
13588 $as_echo "$ac_cv_lib_c_sigtimedwait" >&6; }
13589 if test "x$ac_cv_lib_c_sigtimedwait" = x""yes; then
13590   have_timedwait=yes
13591                   cat >>confdefs.h <<\_ACEOF
13592 #define HAVE_SIGTIMEDWAIT 1
13593 _ACEOF
13594
13595 fi
13596
13597     if test "$have_timedwait" = no ; then
13598       { $as_echo "$as_me:$LINENO: checking for sigtimedwait in -lrt" >&5
13599 $as_echo_n "checking for sigtimedwait in -lrt... " >&6; }
13600 if test "${ac_cv_lib_rt_sigtimedwait+set}" = set; then
13601   $as_echo_n "(cached) " >&6
13602 else
13603   ac_check_lib_save_LIBS=$LIBS
13604 LIBS="-lrt  $LIBS"
13605 cat >conftest.$ac_ext <<_ACEOF
13606 /* confdefs.h.  */
13607 _ACEOF
13608 cat confdefs.h >>conftest.$ac_ext
13609 cat >>conftest.$ac_ext <<_ACEOF
13610 /* end confdefs.h.  */
13611
13612 /* Override any GCC internal prototype to avoid an error.
13613    Use char because int might match the return type of a GCC
13614    builtin and then its argument prototype would still apply.  */
13615 #ifdef __cplusplus
13616 extern "C"
13617 #endif
13618 char sigtimedwait ();
13619 int
13620 main ()
13621 {
13622 return sigtimedwait ();
13623   ;
13624   return 0;
13625 }
13626 _ACEOF
13627 rm -rf conftest.$ac_objext conftest$ac_exeext
13628 if { (ac_try="$ac_link"
13629 case "(($ac_try" in
13630   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13631   *) ac_try_echo=$ac_try;;
13632 esac
13633 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
13634 $as_echo "$ac_try_echo") >&5
13635   (eval "$ac_link") 2>conftest.er1
13636   ac_status=$?
13637   grep -v '^ *+' conftest.er1 >conftest.err
13638   rm -rf conftest.er1
13639   cat conftest.err >&5
13640   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
13641   (exit $ac_status); } && {
13642          test -z "$ac_c_werror_flag" ||
13643          test ! -s conftest.err
13644        } && test -s conftest$ac_exeext && {
13645          test "$cross_compiling" = yes ||
13646          $as_test_x conftest$ac_exeext
13647        }; then
13648   ac_cv_lib_rt_sigtimedwait=yes
13649 else
13650   $as_echo "$as_me: failed program was:" >&5
13651 sed 's/^/| /' conftest.$ac_ext >&5
13652
13653         ac_cv_lib_rt_sigtimedwait=no
13654 fi
13655
13656 rm -rf conftest.dSYM
13657 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
13658       conftest$ac_exeext conftest.$ac_ext
13659 LIBS=$ac_check_lib_save_LIBS
13660 fi
13661 { $as_echo "$as_me:$LINENO: result: $ac_cv_lib_rt_sigtimedwait" >&5
13662 $as_echo "$ac_cv_lib_rt_sigtimedwait" >&6; }
13663 if test "x$ac_cv_lib_rt_sigtimedwait" = x""yes; then
13664   have_timedwait=yes
13665                                       cat >>confdefs.h <<\_ACEOF
13666 #define HAVE_SIGTIMEDWAIT 1
13667 _ACEOF
13668
13669                                       PASSWD_LIBS="${PASSWD_LIBS} -lrt"
13670 fi
13671
13672     fi
13673
13674     { $as_echo "$as_me:$LINENO: checking how to call pam_strerror" >&5
13675 $as_echo_n "checking how to call pam_strerror... " >&6; }
13676     if test "${ac_cv_pam_strerror_args+set}" = set; then
13677   $as_echo_n "(cached) " >&6
13678 else
13679
13680   ac_save_CPPFLAGS="$CPPFLAGS"
13681   if test \! -z "$includedir" ; then
13682     CPPFLAGS="$CPPFLAGS -I$includedir"
13683   fi
13684   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
13685   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
13686   cat >conftest.$ac_ext <<_ACEOF
13687 /* confdefs.h.  */
13688 _ACEOF
13689 cat confdefs.h >>conftest.$ac_ext
13690 cat >>conftest.$ac_ext <<_ACEOF
13691 /* end confdefs.h.  */
13692 #include <stdio.h>
13693                         #include <stdlib.h>
13694                         #include <security/pam_appl.h>
13695 int
13696 main ()
13697 {
13698 pam_handle_t *pamh = 0;
13699                         char *s = pam_strerror(pamh, PAM_SUCCESS);
13700   ;
13701   return 0;
13702 }
13703 _ACEOF
13704 rm -rf conftest.$ac_objext
13705 if { (ac_try="$ac_compile"
13706 case "(($ac_try" in
13707   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13708   *) ac_try_echo=$ac_try;;
13709 esac
13710 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
13711 $as_echo "$ac_try_echo") >&5
13712   (eval "$ac_compile") 2>conftest.er1
13713   ac_status=$?
13714   grep -v '^ *+' conftest.er1 >conftest.err
13715   rm -rf conftest.er1
13716   cat conftest.err >&5
13717   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
13718   (exit $ac_status); } && {
13719          test -z "$ac_c_werror_flag" ||
13720          test ! -s conftest.err
13721        } && test -s conftest.$ac_objext; then
13722   ac_pam_strerror_args=2
13723 else
13724   $as_echo "$as_me: failed program was:" >&5
13725 sed 's/^/| /' conftest.$ac_ext >&5
13726
13727
13728   ac_save_CPPFLAGS="$CPPFLAGS"
13729   if test \! -z "$includedir" ; then
13730     CPPFLAGS="$CPPFLAGS -I$includedir"
13731   fi
13732   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
13733   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
13734   cat >conftest.$ac_ext <<_ACEOF
13735 /* confdefs.h.  */
13736 _ACEOF
13737 cat confdefs.h >>conftest.$ac_ext
13738 cat >>conftest.$ac_ext <<_ACEOF
13739 /* end confdefs.h.  */
13740 #include <stdio.h>
13741                                           #include <stdlib.h>
13742                                           #include <security/pam_appl.h>
13743 int
13744 main ()
13745 {
13746 char *s =
13747                                            pam_strerror(PAM_SUCCESS);
13748   ;
13749   return 0;
13750 }
13751 _ACEOF
13752 rm -rf conftest.$ac_objext
13753 if { (ac_try="$ac_compile"
13754 case "(($ac_try" in
13755   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13756   *) ac_try_echo=$ac_try;;
13757 esac
13758 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
13759 $as_echo "$ac_try_echo") >&5
13760   (eval "$ac_compile") 2>conftest.er1
13761   ac_status=$?
13762   grep -v '^ *+' conftest.er1 >conftest.err
13763   rm -rf conftest.er1
13764   cat conftest.err >&5
13765   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
13766   (exit $ac_status); } && {
13767          test -z "$ac_c_werror_flag" ||
13768          test ! -s conftest.err
13769        } && test -s conftest.$ac_objext; then
13770   ac_pam_strerror_args=1
13771 else
13772   $as_echo "$as_me: failed program was:" >&5
13773 sed 's/^/| /' conftest.$ac_ext >&5
13774
13775         ac_pam_strerror_args=0
13776 fi
13777
13778 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13779   CPPFLAGS="$ac_save_CPPFLAGS"
13780 fi
13781
13782 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13783   CPPFLAGS="$ac_save_CPPFLAGS"
13784       ac_cv_pam_strerror_args=$ac_pam_strerror_args
13785 fi
13786
13787     ac_pam_strerror_args=$ac_cv_pam_strerror_args
13788     if test "$ac_pam_strerror_args" = 1 ; then
13789       { $as_echo "$as_me:$LINENO: result: one argument" >&5
13790 $as_echo "one argument" >&6; }
13791     elif test "$ac_pam_strerror_args" = 2 ; then
13792       cat >>confdefs.h <<\_ACEOF
13793 #define PAM_STRERROR_TWO_ARGS 1
13794 _ACEOF
13795
13796       { $as_echo "$as_me:$LINENO: result: two arguments" >&5
13797 $as_echo "two arguments" >&6; }
13798     else
13799       { $as_echo "$as_me:$LINENO: result: unknown" >&5
13800 $as_echo "unknown" >&6; }
13801     fi
13802
13803 # Check pam_fail_delay
13804     { $as_echo "$as_me:$LINENO: checking pam_fail_delay in -lpam" >&5
13805 $as_echo_n "checking pam_fail_delay in -lpam... " >&6; }
13806     if test "${ac_cv_pam_fail_delay+set}" = set; then
13807   $as_echo_n "(cached) " >&6
13808 else
13809   ac_save_LDFLAGS="$LDFLAGS"
13810       LDFLAGS="-lpam"
13811       cat >conftest.$ac_ext <<_ACEOF
13812 /* confdefs.h.  */
13813 _ACEOF
13814 cat confdefs.h >>conftest.$ac_ext
13815 cat >>conftest.$ac_ext <<_ACEOF
13816 /* end confdefs.h.  */
13817 #include <security/pam_appl.h>
13818 int
13819 main ()
13820 {
13821 pam_handle_t *pamh = 0;
13822                    unsigned int usec = 1;
13823                    int status = pam_fail_delay (pamh, usec);
13824   ;
13825   return 0;
13826 }
13827 _ACEOF
13828 rm -rf conftest.$ac_objext conftest$ac_exeext
13829 if { (ac_try="$ac_link"
13830 case "(($ac_try" in
13831   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13832   *) ac_try_echo=$ac_try;;
13833 esac
13834 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
13835 $as_echo "$ac_try_echo") >&5
13836   (eval "$ac_link") 2>conftest.er1
13837   ac_status=$?
13838   grep -v '^ *+' conftest.er1 >conftest.err
13839   rm -rf conftest.er1
13840   cat conftest.err >&5
13841   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
13842   (exit $ac_status); } && {
13843          test -z "$ac_c_werror_flag" ||
13844          test ! -s conftest.err
13845        } && test -s conftest$ac_exeext && {
13846          test "$cross_compiling" = yes ||
13847          $as_test_x conftest$ac_exeext
13848        }; then
13849   ac_pam_fail_delay=yes
13850 else
13851   $as_echo "$as_me: failed program was:" >&5
13852 sed 's/^/| /' conftest.$ac_ext >&5
13853
13854         ac_pam_fail_delay=no
13855 fi
13856
13857 rm -rf conftest.dSYM
13858 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
13859       conftest$ac_exeext conftest.$ac_ext
13860       ac_cv_pam_fail_delay=$ac_pam_fail_delay,
13861       LDFLAGS=$ac_save_LDFLAGS
13862 fi
13863
13864
13865       if test "$ac_pam_fail_delay" = yes ; then
13866         { $as_echo "$as_me:$LINENO: result: yes" >&5
13867 $as_echo "yes" >&6; }
13868         cat >>confdefs.h <<\_ACEOF
13869 #define HAVE_PAM_FAIL_DELAY 1
13870 _ACEOF
13871
13872       else
13873         { $as_echo "$as_me:$LINENO: result: no" >&5
13874 $as_echo "no" >&6; }
13875       fi
13876
13877   fi
13878 fi
13879
13880
13881 ###############################################################################
13882 #
13883 #       Check for Kerberos.
13884 #
13885 ###############################################################################
13886
13887 have_kerberos=no
13888 have_kerberos5=no
13889 with_kerberos_req=unspecified
13890
13891
13892 # Check whether --with-kerberos was given.
13893 if test "${with_kerberos+set}" = set; then
13894   withval=$with_kerberos; with_kerberos="$withval"; with_kerberos_req="$withval"
13895 else
13896   with_kerberos=yes
13897 fi
13898
13899
13900
13901    case "$with_kerberos" in
13902     yes) ;;
13903     no)  ;;
13904
13905     /*)
13906      { $as_echo "$as_me:$LINENO: checking for Kerberos headers" >&5
13907 $as_echo_n "checking for Kerberos headers... " >&6; }
13908      d=$with_kerberos/include
13909      if test -d $d; then
13910        X_CFLAGS="-I$d $X_CFLAGS"
13911        { $as_echo "$as_me:$LINENO: result: $d" >&5
13912 $as_echo "$d" >&6; }
13913      else
13914        { $as_echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
13915 $as_echo "not found ($d: no such directory)" >&6; }
13916      fi
13917
13918      { $as_echo "$as_me:$LINENO: checking for Kerberos libs" >&5
13919 $as_echo_n "checking for Kerberos libs... " >&6; }
13920      d=$with_kerberos/lib
13921      if test -d $d; then
13922        X_LIBS="-L$d $X_LIBS"
13923        { $as_echo "$as_me:$LINENO: result: $d" >&5
13924 $as_echo "$d" >&6; }
13925      else
13926        { $as_echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
13927 $as_echo "not found ($d: no such directory)" >&6; }
13928      fi
13929
13930      # replace the directory string with "yes".
13931      with_kerberos_req="yes"
13932      with_kerberos=$with_kerberos_req
13933      ;;
13934
13935     *)
13936      echo ""
13937      echo "error: argument to --with-kerberos must be \"yes\", \"no\", or a directory."
13938      echo "       If it is a directory, then \`DIR/include' will be added to"
13939      echo "       the -I list, and \`DIR/lib' will be added to the -L list."
13940      exit 1
13941      ;;
13942    esac
13943
13944
13945 if test "$enable_locking" = yes -a "$with_kerberos" = yes; then
13946   { $as_echo "$as_me:$LINENO: checking for Kerberos 4" >&5
13947 $as_echo_n "checking for Kerberos 4... " >&6; }
13948 if test "${ac_cv_kerberos+set}" = set; then
13949   $as_echo_n "(cached) " >&6
13950 else
13951
13952   ac_save_CPPFLAGS="$CPPFLAGS"
13953   if test \! -z "$includedir" ; then
13954     CPPFLAGS="$CPPFLAGS -I$includedir"
13955   fi
13956   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
13957   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
13958   cat >conftest.$ac_ext <<_ACEOF
13959 /* confdefs.h.  */
13960 _ACEOF
13961 cat confdefs.h >>conftest.$ac_ext
13962 cat >>conftest.$ac_ext <<_ACEOF
13963 /* end confdefs.h.  */
13964 #include <krb.h>
13965 int
13966 main ()
13967 {
13968
13969   ;
13970   return 0;
13971 }
13972 _ACEOF
13973 rm -rf conftest.$ac_objext
13974 if { (ac_try="$ac_compile"
13975 case "(($ac_try" in
13976   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13977   *) ac_try_echo=$ac_try;;
13978 esac
13979 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
13980 $as_echo "$ac_try_echo") >&5
13981   (eval "$ac_compile") 2>conftest.er1
13982   ac_status=$?
13983   grep -v '^ *+' conftest.er1 >conftest.err
13984   rm -rf conftest.er1
13985   cat conftest.err >&5
13986   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
13987   (exit $ac_status); } && {
13988          test -z "$ac_c_werror_flag" ||
13989          test ! -s conftest.err
13990        } && test -s conftest.$ac_objext; then
13991   ac_cv_kerberos=yes
13992 else
13993   $as_echo "$as_me: failed program was:" >&5
13994 sed 's/^/| /' conftest.$ac_ext >&5
13995
13996         ac_cv_kerberos=no
13997 fi
13998
13999 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14000   CPPFLAGS="$ac_save_CPPFLAGS"
14001 fi
14002 { $as_echo "$as_me:$LINENO: result: $ac_cv_kerberos" >&5
14003 $as_echo "$ac_cv_kerberos" >&6; }
14004   { $as_echo "$as_me:$LINENO: checking for Kerberos 5" >&5
14005 $as_echo_n "checking for Kerberos 5... " >&6; }
14006 if test "${ac_cv_kerberos5+set}" = set; then
14007   $as_echo_n "(cached) " >&6
14008 else
14009
14010   ac_save_CPPFLAGS="$CPPFLAGS"
14011   if test \! -z "$includedir" ; then
14012     CPPFLAGS="$CPPFLAGS -I$includedir"
14013   fi
14014   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
14015   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
14016   cat >conftest.$ac_ext <<_ACEOF
14017 /* confdefs.h.  */
14018 _ACEOF
14019 cat confdefs.h >>conftest.$ac_ext
14020 cat >>conftest.$ac_ext <<_ACEOF
14021 /* end confdefs.h.  */
14022 #include <kerberosIV/krb.h>
14023 int
14024 main ()
14025 {
14026
14027   ;
14028   return 0;
14029 }
14030 _ACEOF
14031 rm -rf conftest.$ac_objext
14032 if { (ac_try="$ac_compile"
14033 case "(($ac_try" in
14034   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14035   *) ac_try_echo=$ac_try;;
14036 esac
14037 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
14038 $as_echo "$ac_try_echo") >&5
14039   (eval "$ac_compile") 2>conftest.er1
14040   ac_status=$?
14041   grep -v '^ *+' conftest.er1 >conftest.err
14042   rm -rf conftest.er1
14043   cat conftest.err >&5
14044   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
14045   (exit $ac_status); } && {
14046          test -z "$ac_c_werror_flag" ||
14047          test ! -s conftest.err
14048        } && test -s conftest.$ac_objext; then
14049   ac_cv_kerberos5=yes
14050 else
14051   $as_echo "$as_me: failed program was:" >&5
14052 sed 's/^/| /' conftest.$ac_ext >&5
14053
14054         ac_cv_kerberos5=no
14055 fi
14056
14057 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14058   CPPFLAGS="$ac_save_CPPFLAGS"
14059 fi
14060 { $as_echo "$as_me:$LINENO: result: $ac_cv_kerberos5" >&5
14061 $as_echo "$ac_cv_kerberos5" >&6; }
14062
14063   if test "$ac_cv_kerberos" = yes ; then
14064     have_kerberos=yes
14065     cat >>confdefs.h <<\_ACEOF
14066 #define HAVE_KERBEROS 1
14067 _ACEOF
14068
14069   fi
14070
14071   if test "$ac_cv_kerberos5" = yes ; then
14072
14073     # Andrew Snare <ajs@pigpond.com> wrote:
14074     #
14075     # You were assuming that if kerberosV (krb5) was found, then kerberosIV
14076     # (krb4) was also available.  This turns out not to be the case with
14077     # mit-krb-1.2.7; apparently backwards-compatibility with KerberosIV
14078     # is optional.
14079     #
14080     # So, disable kerberosV support if libkrb4 can't be found.
14081     # This is not the best solution, but it makes the compile not fail.
14082     #
14083
14084   ac_save_CPPFLAGS="$CPPFLAGS"
14085   ac_save_LDFLAGS="$LDFLAGS"
14086 #  ac_save_LIBS="$LIBS"
14087
14088   if test \! -z "$includedir" ; then
14089     CPPFLAGS="$CPPFLAGS -I$includedir"
14090   fi
14091   # note: $X_CFLAGS includes $x_includes
14092   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
14093
14094   if test \! -z "$libdir" ; then
14095     LDFLAGS="$LDFLAGS -L$libdir"
14096   fi
14097   # note: $X_LIBS includes $x_libraries
14098   LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
14099
14100   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
14101   LDFLAGS=`eval eval eval eval eval eval eval eval eval echo $LDFLAGS`
14102   { $as_echo "$as_me:$LINENO: checking for krb_get_tf_realm in -lkrb4" >&5
14103 $as_echo_n "checking for krb_get_tf_realm in -lkrb4... " >&6; }
14104 if test "${ac_cv_lib_krb4_krb_get_tf_realm+set}" = set; then
14105   $as_echo_n "(cached) " >&6
14106 else
14107   ac_check_lib_save_LIBS=$LIBS
14108 LIBS="-lkrb4  $LIBS"
14109 cat >conftest.$ac_ext <<_ACEOF
14110 /* confdefs.h.  */
14111 _ACEOF
14112 cat confdefs.h >>conftest.$ac_ext
14113 cat >>conftest.$ac_ext <<_ACEOF
14114 /* end confdefs.h.  */
14115
14116 /* Override any GCC internal prototype to avoid an error.
14117    Use char because int might match the return type of a GCC
14118    builtin and then its argument prototype would still apply.  */
14119 #ifdef __cplusplus
14120 extern "C"
14121 #endif
14122 char krb_get_tf_realm ();
14123 int
14124 main ()
14125 {
14126 return krb_get_tf_realm ();
14127   ;
14128   return 0;
14129 }
14130 _ACEOF
14131 rm -rf conftest.$ac_objext conftest$ac_exeext
14132 if { (ac_try="$ac_link"
14133 case "(($ac_try" in
14134   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14135   *) ac_try_echo=$ac_try;;
14136 esac
14137 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
14138 $as_echo "$ac_try_echo") >&5
14139   (eval "$ac_link") 2>conftest.er1
14140   ac_status=$?
14141   grep -v '^ *+' conftest.er1 >conftest.err
14142   rm -rf conftest.er1
14143   cat conftest.err >&5
14144   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
14145   (exit $ac_status); } && {
14146          test -z "$ac_c_werror_flag" ||
14147          test ! -s conftest.err
14148        } && test -s conftest$ac_exeext && {
14149          test "$cross_compiling" = yes ||
14150          $as_test_x conftest$ac_exeext
14151        }; then
14152   ac_cv_lib_krb4_krb_get_tf_realm=yes
14153 else
14154   $as_echo "$as_me: failed program was:" >&5
14155 sed 's/^/| /' conftest.$ac_ext >&5
14156
14157         ac_cv_lib_krb4_krb_get_tf_realm=no
14158 fi
14159
14160 rm -rf conftest.dSYM
14161 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
14162       conftest$ac_exeext conftest.$ac_ext
14163 LIBS=$ac_check_lib_save_LIBS
14164 fi
14165 { $as_echo "$as_me:$LINENO: result: $ac_cv_lib_krb4_krb_get_tf_realm" >&5
14166 $as_echo "$ac_cv_lib_krb4_krb_get_tf_realm" >&6; }
14167 if test "x$ac_cv_lib_krb4_krb_get_tf_realm" = x""yes; then
14168   have_kerberos=yes
14169 else
14170   have_kerberos=no
14171 fi
14172
14173   CPPFLAGS="$ac_save_CPPFLAGS"
14174   LDFLAGS="$ac_save_LDFLAGS"
14175 #  LIBS="$ac_save_LIBS"
14176
14177     if test "$have_kerberos" = yes ; then
14178       have_kerberos5=yes
14179       cat >>confdefs.h <<\_ACEOF
14180 #define HAVE_KERBEROS 1
14181 _ACEOF
14182
14183       cat >>confdefs.h <<\_ACEOF
14184 #define HAVE_KERBEROS5 1
14185 _ACEOF
14186
14187     else
14188       have_kerberos5=no
14189       { $as_echo "$as_me:$LINENO: WARNING: Cannot find compat lib (libkrb4) needed to use Kerberos 5" >&5
14190 $as_echo "$as_me: WARNING: Cannot find compat lib (libkrb4) needed to use Kerberos 5" >&2;}
14191     fi
14192
14193   fi
14194
14195   if test "$have_kerberos5" = yes ; then
14196     # from Matt Knopp <mhat@infocalypse.netlag.com>
14197     # (who got it from amu@mit.edu)
14198
14199     PASSWD_LIBS="$PASSWD_LIBS -lkrb4 -ldes425 -lkrb5 -lk5crypto -lcom_err"
14200
14201     # jwz: MacOS X uses -lkrb5, but not -lcrypt
14202
14203   ac_save_CPPFLAGS="$CPPFLAGS"
14204   ac_save_LDFLAGS="$LDFLAGS"
14205 #  ac_save_LIBS="$LIBS"
14206
14207   if test \! -z "$includedir" ; then
14208     CPPFLAGS="$CPPFLAGS -I$includedir"
14209   fi
14210   # note: $X_CFLAGS includes $x_includes
14211   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
14212
14213   if test \! -z "$libdir" ; then
14214     LDFLAGS="$LDFLAGS -L$libdir"
14215   fi
14216   # note: $X_LIBS includes $x_libraries
14217   LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
14218
14219   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
14220   LDFLAGS=`eval eval eval eval eval eval eval eval eval echo $LDFLAGS`
14221   { $as_echo "$as_me:$LINENO: checking for crypt in -lcrypt" >&5
14222 $as_echo_n "checking for crypt in -lcrypt... " >&6; }
14223 if test "${ac_cv_lib_crypt_crypt+set}" = set; then
14224   $as_echo_n "(cached) " >&6
14225 else
14226   ac_check_lib_save_LIBS=$LIBS
14227 LIBS="-lcrypt  $LIBS"
14228 cat >conftest.$ac_ext <<_ACEOF
14229 /* confdefs.h.  */
14230 _ACEOF
14231 cat confdefs.h >>conftest.$ac_ext
14232 cat >>conftest.$ac_ext <<_ACEOF
14233 /* end confdefs.h.  */
14234
14235 /* Override any GCC internal prototype to avoid an error.
14236    Use char because int might match the return type of a GCC
14237    builtin and then its argument prototype would still apply.  */
14238 #ifdef __cplusplus
14239 extern "C"
14240 #endif
14241 char crypt ();
14242 int
14243 main ()
14244 {
14245 return crypt ();
14246   ;
14247   return 0;
14248 }
14249 _ACEOF
14250 rm -rf conftest.$ac_objext conftest$ac_exeext
14251 if { (ac_try="$ac_link"
14252 case "(($ac_try" in
14253   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14254   *) ac_try_echo=$ac_try;;
14255 esac
14256 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
14257 $as_echo "$ac_try_echo") >&5
14258   (eval "$ac_link") 2>conftest.er1
14259   ac_status=$?
14260   grep -v '^ *+' conftest.er1 >conftest.err
14261   rm -rf conftest.er1
14262   cat conftest.err >&5
14263   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
14264   (exit $ac_status); } && {
14265          test -z "$ac_c_werror_flag" ||
14266          test ! -s conftest.err
14267        } && test -s conftest$ac_exeext && {
14268          test "$cross_compiling" = yes ||
14269          $as_test_x conftest$ac_exeext
14270        }; then
14271   ac_cv_lib_crypt_crypt=yes
14272 else
14273   $as_echo "$as_me: failed program was:" >&5
14274 sed 's/^/| /' conftest.$ac_ext >&5
14275
14276         ac_cv_lib_crypt_crypt=no
14277 fi
14278
14279 rm -rf conftest.dSYM
14280 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
14281       conftest$ac_exeext conftest.$ac_ext
14282 LIBS=$ac_check_lib_save_LIBS
14283 fi
14284 { $as_echo "$as_me:$LINENO: result: $ac_cv_lib_crypt_crypt" >&5
14285 $as_echo "$ac_cv_lib_crypt_crypt" >&6; }
14286 if test "x$ac_cv_lib_crypt_crypt" = x""yes; then
14287   PASSWD_LIBS="$PASSWD_LIBS -lcrypt"
14288 fi
14289
14290   CPPFLAGS="$ac_save_CPPFLAGS"
14291   LDFLAGS="$ac_save_LDFLAGS"
14292 #  LIBS="$ac_save_LIBS"
14293
14294
14295   elif test "$have_kerberos" = yes ; then
14296     # from Tim Showalter <tjs@psaux.com> for FreeBSD 4.2
14297     PASSWD_LIBS="$PASSWD_LIBS -lkrb -ldes -lcom_err"
14298   fi
14299
14300   if test "$have_kerberos" = yes ; then
14301     { $as_echo "$as_me:$LINENO: checking for res_search" >&5
14302 $as_echo_n "checking for res_search... " >&6; }
14303 if test "${ac_cv_func_res_search+set}" = set; then
14304   $as_echo_n "(cached) " >&6
14305 else
14306   cat >conftest.$ac_ext <<_ACEOF
14307 /* confdefs.h.  */
14308 _ACEOF
14309 cat confdefs.h >>conftest.$ac_ext
14310 cat >>conftest.$ac_ext <<_ACEOF
14311 /* end confdefs.h.  */
14312 /* Define res_search to an innocuous variant, in case <limits.h> declares res_search.
14313    For example, HP-UX 11i <limits.h> declares gettimeofday.  */
14314 #define res_search innocuous_res_search
14315
14316 /* System header to define __stub macros and hopefully few prototypes,
14317     which can conflict with char res_search (); below.
14318     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
14319     <limits.h> exists even on freestanding compilers.  */
14320
14321 #ifdef __STDC__
14322 # include <limits.h>
14323 #else
14324 # include <assert.h>
14325 #endif
14326
14327 #undef res_search
14328
14329 /* Override any GCC internal prototype to avoid an error.
14330    Use char because int might match the return type of a GCC
14331    builtin and then its argument prototype would still apply.  */
14332 #ifdef __cplusplus
14333 extern "C"
14334 #endif
14335 char res_search ();
14336 /* The GNU C library defines this for functions which it implements
14337     to always fail with ENOSYS.  Some functions are actually named
14338     something starting with __ and the normal name is an alias.  */
14339 #if defined __stub_res_search || defined __stub___res_search
14340 choke me
14341 #endif
14342
14343 int
14344 main ()
14345 {
14346 return res_search ();
14347   ;
14348   return 0;
14349 }
14350 _ACEOF
14351 rm -rf conftest.$ac_objext conftest$ac_exeext
14352 if { (ac_try="$ac_link"
14353 case "(($ac_try" in
14354   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14355   *) ac_try_echo=$ac_try;;
14356 esac
14357 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
14358 $as_echo "$ac_try_echo") >&5
14359   (eval "$ac_link") 2>conftest.er1
14360   ac_status=$?
14361   grep -v '^ *+' conftest.er1 >conftest.err
14362   rm -rf conftest.er1
14363   cat conftest.err >&5
14364   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
14365   (exit $ac_status); } && {
14366          test -z "$ac_c_werror_flag" ||
14367          test ! -s conftest.err
14368        } && test -s conftest$ac_exeext && {
14369          test "$cross_compiling" = yes ||
14370          $as_test_x conftest$ac_exeext
14371        }; then
14372   ac_cv_func_res_search=yes
14373 else
14374   $as_echo "$as_me: failed program was:" >&5
14375 sed 's/^/| /' conftest.$ac_ext >&5
14376
14377         ac_cv_func_res_search=no
14378 fi
14379
14380 rm -rf conftest.dSYM
14381 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
14382       conftest$ac_exeext conftest.$ac_ext
14383 fi
14384 { $as_echo "$as_me:$LINENO: result: $ac_cv_func_res_search" >&5
14385 $as_echo "$ac_cv_func_res_search" >&6; }
14386 if test "x$ac_cv_func_res_search" = x""yes; then
14387   :
14388 else
14389   { $as_echo "$as_me:$LINENO: checking for res_search in -lresolv" >&5
14390 $as_echo_n "checking for res_search in -lresolv... " >&6; }
14391 if test "${ac_cv_lib_resolv_res_search+set}" = set; then
14392   $as_echo_n "(cached) " >&6
14393 else
14394   ac_check_lib_save_LIBS=$LIBS
14395 LIBS="-lresolv  $LIBS"
14396 cat >conftest.$ac_ext <<_ACEOF
14397 /* confdefs.h.  */
14398 _ACEOF
14399 cat confdefs.h >>conftest.$ac_ext
14400 cat >>conftest.$ac_ext <<_ACEOF
14401 /* end confdefs.h.  */
14402
14403 /* Override any GCC internal prototype to avoid an error.
14404    Use char because int might match the return type of a GCC
14405    builtin and then its argument prototype would still apply.  */
14406 #ifdef __cplusplus
14407 extern "C"
14408 #endif
14409 char res_search ();
14410 int
14411 main ()
14412 {
14413 return res_search ();
14414   ;
14415   return 0;
14416 }
14417 _ACEOF
14418 rm -rf conftest.$ac_objext conftest$ac_exeext
14419 if { (ac_try="$ac_link"
14420 case "(($ac_try" in
14421   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14422   *) ac_try_echo=$ac_try;;
14423 esac
14424 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
14425 $as_echo "$ac_try_echo") >&5
14426   (eval "$ac_link") 2>conftest.er1
14427   ac_status=$?
14428   grep -v '^ *+' conftest.er1 >conftest.err
14429   rm -rf conftest.er1
14430   cat conftest.err >&5
14431   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
14432   (exit $ac_status); } && {
14433          test -z "$ac_c_werror_flag" ||
14434          test ! -s conftest.err
14435        } && test -s conftest$ac_exeext && {
14436          test "$cross_compiling" = yes ||
14437          $as_test_x conftest$ac_exeext
14438        }; then
14439   ac_cv_lib_resolv_res_search=yes
14440 else
14441   $as_echo "$as_me: failed program was:" >&5
14442 sed 's/^/| /' conftest.$ac_ext >&5
14443
14444         ac_cv_lib_resolv_res_search=no
14445 fi
14446
14447 rm -rf conftest.dSYM
14448 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
14449       conftest$ac_exeext conftest.$ac_ext
14450 LIBS=$ac_check_lib_save_LIBS
14451 fi
14452 { $as_echo "$as_me:$LINENO: result: $ac_cv_lib_resolv_res_search" >&5
14453 $as_echo "$ac_cv_lib_resolv_res_search" >&6; }
14454 if test "x$ac_cv_lib_resolv_res_search" = x""yes; then
14455   PASSWD_LIBS="${PASSWD_LIBS} -lresolv"
14456 else
14457   { $as_echo "$as_me:$LINENO: WARNING: Can't find DNS resolver libraries needed for Kerberos" >&5
14458 $as_echo "$as_me: WARNING: Can't find DNS resolver libraries needed for Kerberos" >&2;}
14459
14460 fi
14461
14462 fi
14463
14464   fi
14465 fi
14466
14467
14468 ###############################################################################
14469 #
14470 #       Check for the nine billion variants of shadow passwords...
14471 #
14472 ###############################################################################
14473
14474 need_setuid=no
14475
14476 have_shadow=no
14477 with_shadow_req=unspecified
14478
14479
14480 # Check whether --with-shadow was given.
14481 if test "${with_shadow+set}" = set; then
14482   withval=$with_shadow; with_shadow="$withval"; with_shadow_req="$withval"
14483 else
14484   with_shadow=yes
14485 fi
14486
14487
14488
14489    case "$with_shadow" in
14490     yes) ;;
14491     no)  ;;
14492
14493     /*)
14494      { $as_echo "$as_me:$LINENO: checking for shadow password headers" >&5
14495 $as_echo_n "checking for shadow password headers... " >&6; }
14496      d=$with_shadow/include
14497      if test -d $d; then
14498        X_CFLAGS="-I$d $X_CFLAGS"
14499        { $as_echo "$as_me:$LINENO: result: $d" >&5
14500 $as_echo "$d" >&6; }
14501      else
14502        { $as_echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
14503 $as_echo "not found ($d: no such directory)" >&6; }
14504      fi
14505
14506      { $as_echo "$as_me:$LINENO: checking for shadow password libs" >&5
14507 $as_echo_n "checking for shadow password libs... " >&6; }
14508      d=$with_shadow/lib
14509      if test -d $d; then
14510        X_LIBS="-L$d $X_LIBS"
14511        { $as_echo "$as_me:$LINENO: result: $d" >&5
14512 $as_echo "$d" >&6; }
14513      else
14514        { $as_echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
14515 $as_echo "not found ($d: no such directory)" >&6; }
14516      fi
14517
14518      # replace the directory string with "yes".
14519      with_shadow_req="yes"
14520      with_shadow=$with_shadow_req
14521      ;;
14522
14523     *)
14524      echo ""
14525      echo "error: argument to --with-shadow must be \"yes\", \"no\", or a directory."
14526      echo "       If it is a directory, then \`DIR/include' will be added to"
14527      echo "       the -I list, and \`DIR/lib' will be added to the -L list."
14528      exit 1
14529      ;;
14530    esac
14531
14532
14533 if test "$enable_locking" = no ; then
14534   with_shadow_req=no
14535   with_shadow=no
14536 fi
14537
14538
14539 ###############################################################################
14540 #
14541 #       Check for Sun "adjunct" passwords.
14542 #
14543 ###############################################################################
14544
14545 if test "$with_shadow" = yes ; then
14546   { $as_echo "$as_me:$LINENO: checking for Sun-style shadow passwords" >&5
14547 $as_echo_n "checking for Sun-style shadow passwords... " >&6; }
14548 if test "${ac_cv_sun_adjunct+set}" = set; then
14549   $as_echo_n "(cached) " >&6
14550 else
14551
14552   ac_save_CPPFLAGS="$CPPFLAGS"
14553   if test \! -z "$includedir" ; then
14554     CPPFLAGS="$CPPFLAGS -I$includedir"
14555   fi
14556   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
14557   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
14558   cat >conftest.$ac_ext <<_ACEOF
14559 /* confdefs.h.  */
14560 _ACEOF
14561 cat confdefs.h >>conftest.$ac_ext
14562 cat >>conftest.$ac_ext <<_ACEOF
14563 /* end confdefs.h.  */
14564 #include <stdlib.h>
14565                                     #include <unistd.h>
14566                                     #include <sys/types.h>
14567                                     #include <sys/label.h>
14568                                     #include <sys/audit.h>
14569                                     #include <pwdadj.h>
14570 int
14571 main ()
14572 {
14573 struct passwd_adjunct *p = getpwanam("nobody");
14574                        const char *pw = p->pwa_passwd;
14575   ;
14576   return 0;
14577 }
14578 _ACEOF
14579 rm -rf conftest.$ac_objext
14580 if { (ac_try="$ac_compile"
14581 case "(($ac_try" in
14582   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14583   *) ac_try_echo=$ac_try;;
14584 esac
14585 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
14586 $as_echo "$ac_try_echo") >&5
14587   (eval "$ac_compile") 2>conftest.er1
14588   ac_status=$?
14589   grep -v '^ *+' conftest.er1 >conftest.err
14590   rm -rf conftest.er1
14591   cat conftest.err >&5
14592   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
14593   (exit $ac_status); } && {
14594          test -z "$ac_c_werror_flag" ||
14595          test ! -s conftest.err
14596        } && test -s conftest.$ac_objext; then
14597   ac_cv_sun_adjunct=yes
14598 else
14599   $as_echo "$as_me: failed program was:" >&5
14600 sed 's/^/| /' conftest.$ac_ext >&5
14601
14602         ac_cv_sun_adjunct=no
14603 fi
14604
14605 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14606   CPPFLAGS="$ac_save_CPPFLAGS"
14607 fi
14608 { $as_echo "$as_me:$LINENO: result: $ac_cv_sun_adjunct" >&5
14609 $as_echo "$ac_cv_sun_adjunct" >&6; }
14610   if test "$ac_cv_sun_adjunct" = yes; then
14611     have_shadow_adjunct=yes
14612     have_shadow=yes
14613     need_setuid=yes
14614   fi
14615 fi
14616
14617
14618 ###############################################################################
14619 #
14620 #       Check for DEC and SCO so-called "enhanced" security.
14621 #
14622 ###############################################################################
14623
14624 if test "$with_shadow" = yes ; then
14625   { $as_echo "$as_me:$LINENO: checking for DEC-style shadow passwords" >&5
14626 $as_echo_n "checking for DEC-style shadow passwords... " >&6; }
14627 if test "${ac_cv_enhanced_passwd+set}" = set; then
14628   $as_echo_n "(cached) " >&6
14629 else
14630
14631   ac_save_CPPFLAGS="$CPPFLAGS"
14632   if test \! -z "$includedir" ; then
14633     CPPFLAGS="$CPPFLAGS -I$includedir"
14634   fi
14635   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
14636   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
14637   cat >conftest.$ac_ext <<_ACEOF
14638 /* confdefs.h.  */
14639 _ACEOF
14640 cat confdefs.h >>conftest.$ac_ext
14641 cat >>conftest.$ac_ext <<_ACEOF
14642 /* end confdefs.h.  */
14643 #include <stdlib.h>
14644                                     #include <unistd.h>
14645                                     #include <sys/types.h>
14646                                     #include <pwd.h>
14647                                     #include <sys/security.h>
14648                                     #include <prot.h>
14649 int
14650 main ()
14651 {
14652 struct pr_passwd *p;
14653                        const char *pw;
14654                        set_auth_parameters(0, 0);
14655                        check_auth_parameters();
14656                        p = getprpwnam("nobody");
14657                        pw = p->ufld.fd_encrypt;
14658   ;
14659   return 0;
14660 }
14661 _ACEOF
14662 rm -rf conftest.$ac_objext
14663 if { (ac_try="$ac_compile"
14664 case "(($ac_try" in
14665   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14666   *) ac_try_echo=$ac_try;;
14667 esac
14668 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
14669 $as_echo "$ac_try_echo") >&5
14670   (eval "$ac_compile") 2>conftest.er1
14671   ac_status=$?
14672   grep -v '^ *+' conftest.er1 >conftest.err
14673   rm -rf conftest.er1
14674   cat conftest.err >&5
14675   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
14676   (exit $ac_status); } && {
14677          test -z "$ac_c_werror_flag" ||
14678          test ! -s conftest.err
14679        } && test -s conftest.$ac_objext; then
14680   ac_cv_enhanced_passwd=yes
14681 else
14682   $as_echo "$as_me: failed program was:" >&5
14683 sed 's/^/| /' conftest.$ac_ext >&5
14684
14685         ac_cv_enhanced_passwd=no
14686 fi
14687
14688 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14689   CPPFLAGS="$ac_save_CPPFLAGS"
14690 fi
14691 { $as_echo "$as_me:$LINENO: result: $ac_cv_enhanced_passwd" >&5
14692 $as_echo "$ac_cv_enhanced_passwd" >&6; }
14693   if test $ac_cv_enhanced_passwd = yes; then
14694     have_shadow_enhanced=yes
14695     have_shadow=yes
14696     need_setuid=yes
14697
14698     # On SCO, getprpwnam() is in -lprot (which uses nap() from -lx)
14699     # (I'm told it needs -lcurses too, but I don't understand why.)
14700     # But on DEC, it's in -lsecurity.
14701     #
14702     { $as_echo "$as_me:$LINENO: checking for getprpwnam in -lprot" >&5
14703 $as_echo_n "checking for getprpwnam in -lprot... " >&6; }
14704 if test "${ac_cv_lib_prot_getprpwnam+set}" = set; then
14705   $as_echo_n "(cached) " >&6
14706 else
14707   ac_check_lib_save_LIBS=$LIBS
14708 LIBS="-lprot -lx $LIBS"
14709 cat >conftest.$ac_ext <<_ACEOF
14710 /* confdefs.h.  */
14711 _ACEOF
14712 cat confdefs.h >>conftest.$ac_ext
14713 cat >>conftest.$ac_ext <<_ACEOF
14714 /* end confdefs.h.  */
14715
14716 /* Override any GCC internal prototype to avoid an error.
14717    Use char because int might match the return type of a GCC
14718    builtin and then its argument prototype would still apply.  */
14719 #ifdef __cplusplus
14720 extern "C"
14721 #endif
14722 char getprpwnam ();
14723 int
14724 main ()
14725 {
14726 return getprpwnam ();
14727   ;
14728   return 0;
14729 }
14730 _ACEOF
14731 rm -rf conftest.$ac_objext conftest$ac_exeext
14732 if { (ac_try="$ac_link"
14733 case "(($ac_try" in
14734   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14735   *) ac_try_echo=$ac_try;;
14736 esac
14737 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
14738 $as_echo "$ac_try_echo") >&5
14739   (eval "$ac_link") 2>conftest.er1
14740   ac_status=$?
14741   grep -v '^ *+' conftest.er1 >conftest.err
14742   rm -rf conftest.er1
14743   cat conftest.err >&5
14744   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
14745   (exit $ac_status); } && {
14746          test -z "$ac_c_werror_flag" ||
14747          test ! -s conftest.err
14748        } && test -s conftest$ac_exeext && {
14749          test "$cross_compiling" = yes ||
14750          $as_test_x conftest$ac_exeext
14751        }; then
14752   ac_cv_lib_prot_getprpwnam=yes
14753 else
14754   $as_echo "$as_me: failed program was:" >&5
14755 sed 's/^/| /' conftest.$ac_ext >&5
14756
14757         ac_cv_lib_prot_getprpwnam=no
14758 fi
14759
14760 rm -rf conftest.dSYM
14761 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
14762       conftest$ac_exeext conftest.$ac_ext
14763 LIBS=$ac_check_lib_save_LIBS
14764 fi
14765 { $as_echo "$as_me:$LINENO: result: $ac_cv_lib_prot_getprpwnam" >&5
14766 $as_echo "$ac_cv_lib_prot_getprpwnam" >&6; }
14767 if test "x$ac_cv_lib_prot_getprpwnam" = x""yes; then
14768   PASSWD_LIBS="$PASSWD_LIBS -lprot -lcurses -lx"
14769 else
14770   { $as_echo "$as_me:$LINENO: checking for getprpwnam in -lsecurity" >&5
14771 $as_echo_n "checking for getprpwnam in -lsecurity... " >&6; }
14772 if test "${ac_cv_lib_security_getprpwnam+set}" = set; then
14773   $as_echo_n "(cached) " >&6
14774 else
14775   ac_check_lib_save_LIBS=$LIBS
14776 LIBS="-lsecurity  $LIBS"
14777 cat >conftest.$ac_ext <<_ACEOF
14778 /* confdefs.h.  */
14779 _ACEOF
14780 cat confdefs.h >>conftest.$ac_ext
14781 cat >>conftest.$ac_ext <<_ACEOF
14782 /* end confdefs.h.  */
14783
14784 /* Override any GCC internal prototype to avoid an error.
14785    Use char because int might match the return type of a GCC
14786    builtin and then its argument prototype would still apply.  */
14787 #ifdef __cplusplus
14788 extern "C"
14789 #endif
14790 char getprpwnam ();
14791 int
14792 main ()
14793 {
14794 return getprpwnam ();
14795   ;
14796   return 0;
14797 }
14798 _ACEOF
14799 rm -rf conftest.$ac_objext conftest$ac_exeext
14800 if { (ac_try="$ac_link"
14801 case "(($ac_try" in
14802   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14803   *) ac_try_echo=$ac_try;;
14804 esac
14805 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
14806 $as_echo "$ac_try_echo") >&5
14807   (eval "$ac_link") 2>conftest.er1
14808   ac_status=$?
14809   grep -v '^ *+' conftest.er1 >conftest.err
14810   rm -rf conftest.er1
14811   cat conftest.err >&5
14812   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
14813   (exit $ac_status); } && {
14814          test -z "$ac_c_werror_flag" ||
14815          test ! -s conftest.err
14816        } && test -s conftest$ac_exeext && {
14817          test "$cross_compiling" = yes ||
14818          $as_test_x conftest$ac_exeext
14819        }; then
14820   ac_cv_lib_security_getprpwnam=yes
14821 else
14822   $as_echo "$as_me: failed program was:" >&5
14823 sed 's/^/| /' conftest.$ac_ext >&5
14824
14825         ac_cv_lib_security_getprpwnam=no
14826 fi
14827
14828 rm -rf conftest.dSYM
14829 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
14830       conftest$ac_exeext conftest.$ac_ext
14831 LIBS=$ac_check_lib_save_LIBS
14832 fi
14833 { $as_echo "$as_me:$LINENO: result: $ac_cv_lib_security_getprpwnam" >&5
14834 $as_echo "$ac_cv_lib_security_getprpwnam" >&6; }
14835 if test "x$ac_cv_lib_security_getprpwnam" = x""yes; then
14836   PASSWD_LIBS="$PASSWD_LIBS -lsecurity"
14837 fi
14838
14839 fi
14840
14841   fi
14842 fi
14843
14844 ###############################################################################
14845 #
14846 #       Check for HP's entry in the "Not Invented Here" Sweepstakes.
14847 #
14848 ###############################################################################
14849
14850 if test "$with_shadow" = yes ; then
14851   { $as_echo "$as_me:$LINENO: checking for HP-style shadow passwords" >&5
14852 $as_echo_n "checking for HP-style shadow passwords... " >&6; }
14853 if test "${ac_cv_hpux_passwd+set}" = set; then
14854   $as_echo_n "(cached) " >&6
14855 else
14856
14857   ac_save_CPPFLAGS="$CPPFLAGS"
14858   if test \! -z "$includedir" ; then
14859     CPPFLAGS="$CPPFLAGS -I$includedir"
14860   fi
14861   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
14862   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
14863   cat >conftest.$ac_ext <<_ACEOF
14864 /* confdefs.h.  */
14865 _ACEOF
14866 cat confdefs.h >>conftest.$ac_ext
14867 cat >>conftest.$ac_ext <<_ACEOF
14868 /* end confdefs.h.  */
14869 #include <stdlib.h>
14870                                     #include <unistd.h>
14871                                     #include <sys/types.h>
14872                                     #include <pwd.h>
14873                                     #include <hpsecurity.h>
14874                                     #include <prot.h>
14875 int
14876 main ()
14877 {
14878 struct s_passwd *p = getspwnam("nobody");
14879                        const char *pw = p->pw_passwd;
14880   ;
14881   return 0;
14882 }
14883 _ACEOF
14884 rm -rf conftest.$ac_objext
14885 if { (ac_try="$ac_compile"
14886 case "(($ac_try" in
14887   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14888   *) ac_try_echo=$ac_try;;
14889 esac
14890 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
14891 $as_echo "$ac_try_echo") >&5
14892   (eval "$ac_compile") 2>conftest.er1
14893   ac_status=$?
14894   grep -v '^ *+' conftest.er1 >conftest.err
14895   rm -rf conftest.er1
14896   cat conftest.err >&5
14897   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
14898   (exit $ac_status); } && {
14899          test -z "$ac_c_werror_flag" ||
14900          test ! -s conftest.err
14901        } && test -s conftest.$ac_objext; then
14902   ac_cv_hpux_passwd=yes
14903 else
14904   $as_echo "$as_me: failed program was:" >&5
14905 sed 's/^/| /' conftest.$ac_ext >&5
14906
14907         ac_cv_hpux_passwd=no
14908 fi
14909
14910 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14911   CPPFLAGS="$ac_save_CPPFLAGS"
14912 fi
14913 { $as_echo "$as_me:$LINENO: result: $ac_cv_hpux_passwd" >&5
14914 $as_echo "$ac_cv_hpux_passwd" >&6; }
14915   if test "$ac_cv_hpux_passwd" = yes; then
14916     have_shadow_hpux=yes
14917     have_shadow=yes
14918     need_setuid=yes
14919
14920     # on HPUX, bigcrypt is in -lsec
14921     { $as_echo "$as_me:$LINENO: checking for bigcrypt in -lsec" >&5
14922 $as_echo_n "checking for bigcrypt in -lsec... " >&6; }
14923 if test "${ac_cv_lib_sec_bigcrypt+set}" = set; then
14924   $as_echo_n "(cached) " >&6
14925 else
14926   ac_check_lib_save_LIBS=$LIBS
14927 LIBS="-lsec  $LIBS"
14928 cat >conftest.$ac_ext <<_ACEOF
14929 /* confdefs.h.  */
14930 _ACEOF
14931 cat confdefs.h >>conftest.$ac_ext
14932 cat >>conftest.$ac_ext <<_ACEOF
14933 /* end confdefs.h.  */
14934
14935 /* Override any GCC internal prototype to avoid an error.
14936    Use char because int might match the return type of a GCC
14937    builtin and then its argument prototype would still apply.  */
14938 #ifdef __cplusplus
14939 extern "C"
14940 #endif
14941 char bigcrypt ();
14942 int
14943 main ()
14944 {
14945 return bigcrypt ();
14946   ;
14947   return 0;
14948 }
14949 _ACEOF
14950 rm -rf conftest.$ac_objext conftest$ac_exeext
14951 if { (ac_try="$ac_link"
14952 case "(($ac_try" in
14953   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14954   *) ac_try_echo=$ac_try;;
14955 esac
14956 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
14957 $as_echo "$ac_try_echo") >&5
14958   (eval "$ac_link") 2>conftest.er1
14959   ac_status=$?
14960   grep -v '^ *+' conftest.er1 >conftest.err
14961   rm -rf conftest.er1
14962   cat conftest.err >&5
14963   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
14964   (exit $ac_status); } && {
14965          test -z "$ac_c_werror_flag" ||
14966          test ! -s conftest.err
14967        } && test -s conftest$ac_exeext && {
14968          test "$cross_compiling" = yes ||
14969          $as_test_x conftest$ac_exeext
14970        }; then
14971   ac_cv_lib_sec_bigcrypt=yes
14972 else
14973   $as_echo "$as_me: failed program was:" >&5
14974 sed 's/^/| /' conftest.$ac_ext >&5
14975
14976         ac_cv_lib_sec_bigcrypt=no
14977 fi
14978
14979 rm -rf conftest.dSYM
14980 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
14981       conftest$ac_exeext conftest.$ac_ext
14982 LIBS=$ac_check_lib_save_LIBS
14983 fi
14984 { $as_echo "$as_me:$LINENO: result: $ac_cv_lib_sec_bigcrypt" >&5
14985 $as_echo "$ac_cv_lib_sec_bigcrypt" >&6; }
14986 if test "x$ac_cv_lib_sec_bigcrypt" = x""yes; then
14987   PASSWD_LIBS="$PASSWD_LIBS -lsec"
14988 fi
14989
14990   fi
14991 fi
14992
14993
14994 ###############################################################################
14995 #
14996 #       Check for FreeBSD-style shadow passwords.
14997 #
14998 #       On FreeBSD, getpwnam() and friends work just like on non-shadow-
14999 #       password systems -- except you only get stuff in the pw_passwd field
15000 #       if the running program is setuid.  So, guess that we've got this
15001 #       lossage to contend with if /etc/master.passwd exists, and default to
15002 #       a setuid installation.
15003 #
15004 ###############################################################################
15005
15006 if test "$with_shadow" = yes ; then
15007   { $as_echo "$as_me:$LINENO: checking for FreeBSD-style shadow passwords" >&5
15008 $as_echo_n "checking for FreeBSD-style shadow passwords... " >&6; }
15009 if test "${ac_cv_master_passwd+set}" = set; then
15010   $as_echo_n "(cached) " >&6
15011 else
15012   if test -f /etc/master.passwd ; then
15013                     ac_cv_master_passwd=yes
15014                   else
15015                     ac_cv_master_passwd=no
15016                   fi
15017 fi
15018 { $as_echo "$as_me:$LINENO: result: $ac_cv_master_passwd" >&5
15019 $as_echo "$ac_cv_master_passwd" >&6; }
15020   if test "$ac_cv_master_passwd" = yes; then
15021     need_setuid=yes
15022   fi
15023 fi
15024
15025
15026 ###############################################################################
15027 #
15028 #       Check for traditional (ha!) shadow passwords.
15029 #
15030 ###############################################################################
15031
15032 if test "$with_shadow" = yes ; then
15033   { $as_echo "$as_me:$LINENO: checking for generic shadow passwords" >&5
15034 $as_echo_n "checking for generic shadow passwords... " >&6; }
15035 if test "${ac_cv_shadow+set}" = set; then
15036   $as_echo_n "(cached) " >&6
15037 else
15038
15039   ac_save_CPPFLAGS="$CPPFLAGS"
15040   if test \! -z "$includedir" ; then
15041     CPPFLAGS="$CPPFLAGS -I$includedir"
15042   fi
15043   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
15044   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
15045   cat >conftest.$ac_ext <<_ACEOF
15046 /* confdefs.h.  */
15047 _ACEOF
15048 cat confdefs.h >>conftest.$ac_ext
15049 cat >>conftest.$ac_ext <<_ACEOF
15050 /* end confdefs.h.  */
15051 #include <stdlib.h>
15052                                     #include <unistd.h>
15053                                     #include <sys/types.h>
15054                                     #include <pwd.h>
15055                                     #include <shadow.h>
15056 int
15057 main ()
15058 {
15059 struct spwd *p = getspnam("nobody");
15060                        const char *pw = p->sp_pwdp;
15061   ;
15062   return 0;
15063 }
15064 _ACEOF
15065 rm -rf conftest.$ac_objext
15066 if { (ac_try="$ac_compile"
15067 case "(($ac_try" in
15068   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15069   *) ac_try_echo=$ac_try;;
15070 esac
15071 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
15072 $as_echo "$ac_try_echo") >&5
15073   (eval "$ac_compile") 2>conftest.er1
15074   ac_status=$?
15075   grep -v '^ *+' conftest.er1 >conftest.err
15076   rm -rf conftest.er1
15077   cat conftest.err >&5
15078   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
15079   (exit $ac_status); } && {
15080          test -z "$ac_c_werror_flag" ||
15081          test ! -s conftest.err
15082        } && test -s conftest.$ac_objext; then
15083   ac_cv_shadow=yes
15084 else
15085   $as_echo "$as_me: failed program was:" >&5
15086 sed 's/^/| /' conftest.$ac_ext >&5
15087
15088         ac_cv_shadow=no
15089 fi
15090
15091 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15092   CPPFLAGS="$ac_save_CPPFLAGS"
15093 fi
15094 { $as_echo "$as_me:$LINENO: result: $ac_cv_shadow" >&5
15095 $as_echo "$ac_cv_shadow" >&6; }
15096   if test "$ac_cv_shadow" = yes; then
15097     have_shadow=yes
15098     need_setuid=yes
15099
15100     # On some systems (UnixWare 2.1), getspnam() is in -lgen instead of -lc.
15101     have_getspnam=no
15102     { $as_echo "$as_me:$LINENO: checking for getspnam in -lc" >&5
15103 $as_echo_n "checking for getspnam in -lc... " >&6; }
15104 if test "${ac_cv_lib_c_getspnam+set}" = set; then
15105   $as_echo_n "(cached) " >&6
15106 else
15107   ac_check_lib_save_LIBS=$LIBS
15108 LIBS="-lc  $LIBS"
15109 cat >conftest.$ac_ext <<_ACEOF
15110 /* confdefs.h.  */
15111 _ACEOF
15112 cat confdefs.h >>conftest.$ac_ext
15113 cat >>conftest.$ac_ext <<_ACEOF
15114 /* end confdefs.h.  */
15115
15116 /* Override any GCC internal prototype to avoid an error.
15117    Use char because int might match the return type of a GCC
15118    builtin and then its argument prototype would still apply.  */
15119 #ifdef __cplusplus
15120 extern "C"
15121 #endif
15122 char getspnam ();
15123 int
15124 main ()
15125 {
15126 return getspnam ();
15127   ;
15128   return 0;
15129 }
15130 _ACEOF
15131 rm -rf conftest.$ac_objext conftest$ac_exeext
15132 if { (ac_try="$ac_link"
15133 case "(($ac_try" in
15134   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15135   *) ac_try_echo=$ac_try;;
15136 esac
15137 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
15138 $as_echo "$ac_try_echo") >&5
15139   (eval "$ac_link") 2>conftest.er1
15140   ac_status=$?
15141   grep -v '^ *+' conftest.er1 >conftest.err
15142   rm -rf conftest.er1
15143   cat conftest.err >&5
15144   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
15145   (exit $ac_status); } && {
15146          test -z "$ac_c_werror_flag" ||
15147          test ! -s conftest.err
15148        } && test -s conftest$ac_exeext && {
15149          test "$cross_compiling" = yes ||
15150          $as_test_x conftest$ac_exeext
15151        }; then
15152   ac_cv_lib_c_getspnam=yes
15153 else
15154   $as_echo "$as_me: failed program was:" >&5
15155 sed 's/^/| /' conftest.$ac_ext >&5
15156
15157         ac_cv_lib_c_getspnam=no
15158 fi
15159
15160 rm -rf conftest.dSYM
15161 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
15162       conftest$ac_exeext conftest.$ac_ext
15163 LIBS=$ac_check_lib_save_LIBS
15164 fi
15165 { $as_echo "$as_me:$LINENO: result: $ac_cv_lib_c_getspnam" >&5
15166 $as_echo "$ac_cv_lib_c_getspnam" >&6; }
15167 if test "x$ac_cv_lib_c_getspnam" = x""yes; then
15168   have_getspnam=yes
15169 fi
15170
15171     if test "$have_getspnam" = no ; then
15172       { $as_echo "$as_me:$LINENO: checking for getspnam in -lgen" >&5
15173 $as_echo_n "checking for getspnam in -lgen... " >&6; }
15174 if test "${ac_cv_lib_gen_getspnam+set}" = set; then
15175   $as_echo_n "(cached) " >&6
15176 else
15177   ac_check_lib_save_LIBS=$LIBS
15178 LIBS="-lgen  $LIBS"
15179 cat >conftest.$ac_ext <<_ACEOF
15180 /* confdefs.h.  */
15181 _ACEOF
15182 cat confdefs.h >>conftest.$ac_ext
15183 cat >>conftest.$ac_ext <<_ACEOF
15184 /* end confdefs.h.  */
15185
15186 /* Override any GCC internal prototype to avoid an error.
15187    Use char because int might match the return type of a GCC
15188    builtin and then its argument prototype would still apply.  */
15189 #ifdef __cplusplus
15190 extern "C"
15191 #endif
15192 char getspnam ();
15193 int
15194 main ()
15195 {
15196 return getspnam ();
15197   ;
15198   return 0;
15199 }
15200 _ACEOF
15201 rm -rf conftest.$ac_objext conftest$ac_exeext
15202 if { (ac_try="$ac_link"
15203 case "(($ac_try" in
15204   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15205   *) ac_try_echo=$ac_try;;
15206 esac
15207 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
15208 $as_echo "$ac_try_echo") >&5
15209   (eval "$ac_link") 2>conftest.er1
15210   ac_status=$?
15211   grep -v '^ *+' conftest.er1 >conftest.err
15212   rm -rf conftest.er1
15213   cat conftest.err >&5
15214   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
15215   (exit $ac_status); } && {
15216          test -z "$ac_c_werror_flag" ||
15217          test ! -s conftest.err
15218        } && test -s conftest$ac_exeext && {
15219          test "$cross_compiling" = yes ||
15220          $as_test_x conftest$ac_exeext
15221        }; then
15222   ac_cv_lib_gen_getspnam=yes
15223 else
15224   $as_echo "$as_me: failed program was:" >&5
15225 sed 's/^/| /' conftest.$ac_ext >&5
15226
15227         ac_cv_lib_gen_getspnam=no
15228 fi
15229
15230 rm -rf conftest.dSYM
15231 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
15232       conftest$ac_exeext conftest.$ac_ext
15233 LIBS=$ac_check_lib_save_LIBS
15234 fi
15235 { $as_echo "$as_me:$LINENO: result: $ac_cv_lib_gen_getspnam" >&5
15236 $as_echo "$ac_cv_lib_gen_getspnam" >&6; }
15237 if test "x$ac_cv_lib_gen_getspnam" = x""yes; then
15238   have_getspnam=yes; PASSWD_LIBS="$PASSWD_LIBS -lgen"
15239 fi
15240
15241     fi
15242   fi
15243 fi
15244
15245
15246 ###############################################################################
15247 #
15248 #       Check for other libraries needed for non-shadow passwords.
15249 #
15250 ###############################################################################
15251
15252 if test "$enable_locking" = yes ; then
15253
15254   # On some systems (UnixWare 2.1), crypt() is in -lcrypt instead of -lc.
15255   have_crypt=no
15256   { $as_echo "$as_me:$LINENO: checking for crypt in -lc" >&5
15257 $as_echo_n "checking for crypt in -lc... " >&6; }
15258 if test "${ac_cv_lib_c_crypt+set}" = set; then
15259   $as_echo_n "(cached) " >&6
15260 else
15261   ac_check_lib_save_LIBS=$LIBS
15262 LIBS="-lc  $LIBS"
15263 cat >conftest.$ac_ext <<_ACEOF
15264 /* confdefs.h.  */
15265 _ACEOF
15266 cat confdefs.h >>conftest.$ac_ext
15267 cat >>conftest.$ac_ext <<_ACEOF
15268 /* end confdefs.h.  */
15269
15270 /* Override any GCC internal prototype to avoid an error.
15271    Use char because int might match the return type of a GCC
15272    builtin and then its argument prototype would still apply.  */
15273 #ifdef __cplusplus
15274 extern "C"
15275 #endif
15276 char crypt ();
15277 int
15278 main ()
15279 {
15280 return crypt ();
15281   ;
15282   return 0;
15283 }
15284 _ACEOF
15285 rm -rf conftest.$ac_objext conftest$ac_exeext
15286 if { (ac_try="$ac_link"
15287 case "(($ac_try" in
15288   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15289   *) ac_try_echo=$ac_try;;
15290 esac
15291 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
15292 $as_echo "$ac_try_echo") >&5
15293   (eval "$ac_link") 2>conftest.er1
15294   ac_status=$?
15295   grep -v '^ *+' conftest.er1 >conftest.err
15296   rm -rf conftest.er1
15297   cat conftest.err >&5
15298   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
15299   (exit $ac_status); } && {
15300          test -z "$ac_c_werror_flag" ||
15301          test ! -s conftest.err
15302        } && test -s conftest$ac_exeext && {
15303          test "$cross_compiling" = yes ||
15304          $as_test_x conftest$ac_exeext
15305        }; then
15306   ac_cv_lib_c_crypt=yes
15307 else
15308   $as_echo "$as_me: failed program was:" >&5
15309 sed 's/^/| /' conftest.$ac_ext >&5
15310
15311         ac_cv_lib_c_crypt=no
15312 fi
15313
15314 rm -rf conftest.dSYM
15315 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
15316       conftest$ac_exeext conftest.$ac_ext
15317 LIBS=$ac_check_lib_save_LIBS
15318 fi
15319 { $as_echo "$as_me:$LINENO: result: $ac_cv_lib_c_crypt" >&5
15320 $as_echo "$ac_cv_lib_c_crypt" >&6; }
15321 if test "x$ac_cv_lib_c_crypt" = x""yes; then
15322   have_crypt=yes
15323 fi
15324
15325   if test "$have_crypt" = no ; then
15326     { $as_echo "$as_me:$LINENO: checking for crypt in -lcrypt" >&5
15327 $as_echo_n "checking for crypt in -lcrypt... " >&6; }
15328 if test "${ac_cv_lib_crypt_crypt+set}" = set; then
15329   $as_echo_n "(cached) " >&6
15330 else
15331   ac_check_lib_save_LIBS=$LIBS
15332 LIBS="-lcrypt  $LIBS"
15333 cat >conftest.$ac_ext <<_ACEOF
15334 /* confdefs.h.  */
15335 _ACEOF
15336 cat confdefs.h >>conftest.$ac_ext
15337 cat >>conftest.$ac_ext <<_ACEOF
15338 /* end confdefs.h.  */
15339
15340 /* Override any GCC internal prototype to avoid an error.
15341    Use char because int might match the return type of a GCC
15342    builtin and then its argument prototype would still apply.  */
15343 #ifdef __cplusplus
15344 extern "C"
15345 #endif
15346 char crypt ();
15347 int
15348 main ()
15349 {
15350 return crypt ();
15351   ;
15352   return 0;
15353 }
15354 _ACEOF
15355 rm -rf conftest.$ac_objext conftest$ac_exeext
15356 if { (ac_try="$ac_link"
15357 case "(($ac_try" in
15358   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15359   *) ac_try_echo=$ac_try;;
15360 esac
15361 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
15362 $as_echo "$ac_try_echo") >&5
15363   (eval "$ac_link") 2>conftest.er1
15364   ac_status=$?
15365   grep -v '^ *+' conftest.er1 >conftest.err
15366   rm -rf conftest.er1
15367   cat conftest.err >&5
15368   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
15369   (exit $ac_status); } && {
15370          test -z "$ac_c_werror_flag" ||
15371          test ! -s conftest.err
15372        } && test -s conftest$ac_exeext && {
15373          test "$cross_compiling" = yes ||
15374          $as_test_x conftest$ac_exeext
15375        }; then
15376   ac_cv_lib_crypt_crypt=yes
15377 else
15378   $as_echo "$as_me: failed program was:" >&5
15379 sed 's/^/| /' conftest.$ac_ext >&5
15380
15381         ac_cv_lib_crypt_crypt=no
15382 fi
15383
15384 rm -rf conftest.dSYM
15385 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
15386       conftest$ac_exeext conftest.$ac_ext
15387 LIBS=$ac_check_lib_save_LIBS
15388 fi
15389 { $as_echo "$as_me:$LINENO: result: $ac_cv_lib_crypt_crypt" >&5
15390 $as_echo "$ac_cv_lib_crypt_crypt" >&6; }
15391 if test "x$ac_cv_lib_crypt_crypt" = x""yes; then
15392   have_crypt=yes; PASSWD_LIBS="$PASSWD_LIBS -lcrypt"
15393 fi
15394
15395   fi
15396 fi
15397
15398
15399 # Most of the above shadow mechanisms will have set need_setuid to yes,
15400 # if they were found.  But, on some systems, we need setuid even when
15401 # using plain old vanilla passwords.
15402 #
15403 if test "$enable_locking" = yes ; then
15404   case "$host" in
15405     *-hpux* | *-aix* | *-netbsd* | *-freebsd* | *-openbsd* )
15406       need_setuid=yes
15407     ;;
15408   esac
15409 fi
15410
15411
15412 if test "$have_shadow_adjunct" = yes ; then
15413   cat >>confdefs.h <<\_ACEOF
15414 #define HAVE_ADJUNCT_PASSWD 1
15415 _ACEOF
15416
15417 elif test "$have_shadow_enhanced" = yes ; then
15418   cat >>confdefs.h <<\_ACEOF
15419 #define HAVE_ENHANCED_PASSWD 1
15420 _ACEOF
15421
15422 elif test "$have_shadow_hpux" = yes ; then
15423   cat >>confdefs.h <<\_ACEOF
15424 #define HAVE_HPUX_PASSWD 1
15425 _ACEOF
15426
15427 elif test "$have_shadow" = yes ; then
15428   cat >>confdefs.h <<\_ACEOF
15429 #define HAVE_SHADOW_PASSWD 1
15430 _ACEOF
15431
15432 fi
15433
15434
15435 ###############################################################################
15436 #
15437 #       Check for external password helper
15438 #       On SuSE, instead of having xscreensaver be a setuid program, they
15439 #       fork an external program that takes the password on stdin, and
15440 #       returns true if that password is a valid one.  Then only that
15441 #       smaller program needs to be setuid.
15442 #
15443 #       (Note that this external program is not a GUI: the GUI is still
15444 #       all in xscreensaver itself; the external program just does auth.)
15445 #
15446 ###############################################################################
15447
15448 have_passwd_helper=no
15449 with_passwd_helper_req=unspecified
15450
15451
15452 # Check whether --with-passwd-helper was given.
15453 if test "${with_passwd_helper+set}" = set; then
15454   withval=$with_passwd_helper; with_passwd_helper="$withval"; with_passwd_helper_req="$withval"
15455 else
15456   with_passwd_helper=no
15457 fi
15458
15459 # no HANDLE_X_PATH_ARG for this one
15460
15461 if test "$enable_locking" = no ; then
15462   with_passwd_helper_req=no
15463   with_passwd_helper=no
15464 fi
15465
15466 case "$with_passwd_helper" in
15467   ""|no) : ;;
15468   /*)
15469     cat >>confdefs.h <<_ACEOF
15470 #define PASSWD_HELPER_PROGRAM "$with_passwd_helper"
15471 _ACEOF
15472
15473     have_passwd_helper=yes;;
15474   *)
15475     echo "error: --with-passwd-helper needs full pathname of helper (not '$with_passwd_helper')." >&2
15476     exit 1
15477 esac
15478
15479
15480 ###############################################################################
15481 #
15482 #       Check for a login manager for a "New Login" button on the lock dialog.
15483 #       Usually this will be "/usr/bin/gdmflexiserver".
15484 #
15485 ###############################################################################
15486
15487 with_login_manager_req=unspecified
15488 default_login_manager_1='gdmflexiserver -ls'
15489 default_login_manager_2='kdmctl reserve'
15490
15491
15492 # Check whether --with-login-manager was given.
15493 if test "${with_login_manager+set}" = set; then
15494   withval=$with_login_manager; with_login_manager="$withval"; with_login_manager_req="$withval"
15495 else
15496   with_login_manager=yes
15497 fi
15498
15499 # no HANDLE_X_PATH_ARG for this one
15500
15501 if test "$enable_locking" = no ; then
15502   with_login_manager_req=no
15503   with_login_manager=no
15504 fi
15505
15506 case "$with_login_manager_req" in
15507   no)
15508     with_login_manager=""
15509   ;;
15510
15511   yes|unspecified)
15512     # Try both defaults, use the one that exists.
15513
15514     set dummy $default_login_manager_1 ; login_manager_tmp=$2
15515     unset ac_cv_path_login_manager_tmp  # don't cache
15516     # Extract the first word of "$login_manager_tmp", so it can be a program name with args.
15517 set dummy $login_manager_tmp; ac_word=$2
15518 { $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
15519 $as_echo_n "checking for $ac_word... " >&6; }
15520 if test "${ac_cv_path_login_manager_tmp+set}" = set; then
15521   $as_echo_n "(cached) " >&6
15522 else
15523   case $login_manager_tmp in
15524   [\\/]* | ?:[\\/]*)
15525   ac_cv_path_login_manager_tmp="$login_manager_tmp" # Let the user override the test with a path.
15526   ;;
15527   *)
15528   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
15529 for as_dir in $PATH
15530 do
15531   IFS=$as_save_IFS
15532   test -z "$as_dir" && as_dir=.
15533   for ac_exec_ext in '' $ac_executable_extensions; do
15534   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
15535     ac_cv_path_login_manager_tmp="$as_dir/$ac_word$ac_exec_ext"
15536     $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
15537     break 2
15538   fi
15539 done
15540 done
15541 IFS=$as_save_IFS
15542
15543   ;;
15544 esac
15545 fi
15546 login_manager_tmp=$ac_cv_path_login_manager_tmp
15547 if test -n "$login_manager_tmp"; then
15548   { $as_echo "$as_me:$LINENO: result: $login_manager_tmp" >&5
15549 $as_echo "$login_manager_tmp" >&6; }
15550 else
15551   { $as_echo "$as_me:$LINENO: result: no" >&5
15552 $as_echo "no" >&6; }
15553 fi
15554
15555
15556     if test ! -z "$login_manager_tmp" ; then
15557       with_login_manager="$default_login_manager_1"
15558     else
15559       set dummy $default_login_manager_2 ; login_manager_tmp=$2
15560       unset ac_cv_path_login_manager_tmp  # don't cache
15561       # Extract the first word of "$login_manager_tmp", so it can be a program name with args.
15562 set dummy $login_manager_tmp; ac_word=$2
15563 { $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
15564 $as_echo_n "checking for $ac_word... " >&6; }
15565 if test "${ac_cv_path_login_manager_tmp+set}" = set; then
15566   $as_echo_n "(cached) " >&6
15567 else
15568   case $login_manager_tmp in
15569   [\\/]* | ?:[\\/]*)
15570   ac_cv_path_login_manager_tmp="$login_manager_tmp" # Let the user override the test with a path.
15571   ;;
15572   *)
15573   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
15574 for as_dir in $PATH
15575 do
15576   IFS=$as_save_IFS
15577   test -z "$as_dir" && as_dir=.
15578   for ac_exec_ext in '' $ac_executable_extensions; do
15579   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
15580     ac_cv_path_login_manager_tmp="$as_dir/$ac_word$ac_exec_ext"
15581     $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
15582     break 2
15583   fi
15584 done
15585 done
15586 IFS=$as_save_IFS
15587
15588   ;;
15589 esac
15590 fi
15591 login_manager_tmp=$ac_cv_path_login_manager_tmp
15592 if test -n "$login_manager_tmp"; then
15593   { $as_echo "$as_me:$LINENO: result: $login_manager_tmp" >&5
15594 $as_echo "$login_manager_tmp" >&6; }
15595 else
15596   { $as_echo "$as_me:$LINENO: result: no" >&5
15597 $as_echo "no" >&6; }
15598 fi
15599
15600
15601       if test ! -z "$login_manager_tmp" ; then
15602         with_login_manager="$default_login_manager_2"
15603       else
15604         with_login_manager=""
15605       fi
15606     fi
15607   ;;
15608
15609   /*)
15610     # absolute path specified on cmd line
15611     set dummy $with_login_manager_req ; login_manager_tmp=$2
15612     { $as_echo "$as_me:$LINENO: checking for $login_manager_tmp" >&5
15613 $as_echo_n "checking for $login_manager_tmp... " >&6; }
15614     if test -x "$login_manager_tmp" ; then
15615       { $as_echo "$as_me:$LINENO: result: yes" >&5
15616 $as_echo "yes" >&6; }
15617     else
15618       { $as_echo "$as_me:$LINENO: result: no" >&5
15619 $as_echo "no" >&6; }
15620       with_login_manager=""
15621     fi
15622   ;;
15623
15624   *)
15625     # relative path specified on cmd line
15626     set dummy $with_login_manager_req ; login_manager_tmp=$2
15627     unset ac_cv_path_login_manager_tmp    # don't cache
15628     # Extract the first word of "$login_manager_tmp", so it can be a program name with args.
15629 set dummy $login_manager_tmp; ac_word=$2
15630 { $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
15631 $as_echo_n "checking for $ac_word... " >&6; }
15632 if test "${ac_cv_path_login_manager_tmp+set}" = set; then
15633   $as_echo_n "(cached) " >&6
15634 else
15635   case $login_manager_tmp in
15636   [\\/]* | ?:[\\/]*)
15637   ac_cv_path_login_manager_tmp="$login_manager_tmp" # Let the user override the test with a path.
15638   ;;
15639   *)
15640   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
15641 for as_dir in $PATH
15642 do
15643   IFS=$as_save_IFS
15644   test -z "$as_dir" && as_dir=.
15645   for ac_exec_ext in '' $ac_executable_extensions; do
15646   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
15647     ac_cv_path_login_manager_tmp="$as_dir/$ac_word$ac_exec_ext"
15648     $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
15649     break 2
15650   fi
15651 done
15652 done
15653 IFS=$as_save_IFS
15654
15655   ;;
15656 esac
15657 fi
15658 login_manager_tmp=$ac_cv_path_login_manager_tmp
15659 if test -n "$login_manager_tmp"; then
15660   { $as_echo "$as_me:$LINENO: result: $login_manager_tmp" >&5
15661 $as_echo "$login_manager_tmp" >&6; }
15662 else
15663   { $as_echo "$as_me:$LINENO: result: no" >&5
15664 $as_echo "no" >&6; }
15665 fi
15666
15667
15668     if test -z "$login_manager_tmp" ; then
15669       with_login_manager=""
15670     else
15671       with_login_manager="$login_manager_tmp"
15672     fi
15673   ;;
15674 esac
15675 ac_cv_login_manager_program="$with_login_manager"
15676
15677 NEW_LOGIN_COMMAND_P=''
15678 NEW_LOGIN_COMMAND="$ac_cv_login_manager_program"
15679
15680 { $as_echo "$as_me:$LINENO: checking for login manager" >&5
15681 $as_echo_n "checking for login manager... " >&6; }
15682 if test -z "$NEW_LOGIN_COMMAND" ; then
15683   NEW_LOGIN_COMMAND="$default_login_manager_1"
15684   NEW_LOGIN_COMMAND_P='! '
15685   { $as_echo "$as_me:$LINENO: result: $NEW_LOGIN_COMMAND (disabled)" >&5
15686 $as_echo "$NEW_LOGIN_COMMAND (disabled)" >&6; }
15687 else
15688   { $as_echo "$as_me:$LINENO: result: $NEW_LOGIN_COMMAND" >&5
15689 $as_echo "$NEW_LOGIN_COMMAND" >&6; }
15690 fi
15691
15692
15693 ###############################################################################
15694 #
15695 #       Check for -lgtk (and Gnome stuff)
15696 #
15697 ###############################################################################
15698
15699 have_gtk=no
15700 with_gtk_req=unspecified
15701
15702 # Check whether --with-gtk was given.
15703 if test "${with_gtk+set}" = set; then
15704   withval=$with_gtk; with_gtk="$withval"; with_gtk_req="$withval"
15705 else
15706   with_gtk=yes
15707 fi
15708
15709
15710 # if --with-gtk=/directory/ was specified, remember that directory so that
15711 # we can also look for the `gtk-config' program in that directory.
15712 case "$with_gtk" in
15713   /*)
15714     gtk_dir="$with_gtk"
15715     ;;
15716   *)
15717     gtk_dir=""
15718     ;;
15719 esac
15720
15721
15722    case "$with_gtk" in
15723     yes) ;;
15724     no)  ;;
15725
15726     /*)
15727      { $as_echo "$as_me:$LINENO: checking for Gtk headers" >&5
15728 $as_echo_n "checking for Gtk headers... " >&6; }
15729      d=$with_gtk/include
15730      if test -d $d; then
15731        X_CFLAGS="-I$d $X_CFLAGS"
15732        { $as_echo "$as_me:$LINENO: result: $d" >&5
15733 $as_echo "$d" >&6; }
15734      else
15735        { $as_echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
15736 $as_echo "not found ($d: no such directory)" >&6; }
15737      fi
15738
15739      { $as_echo "$as_me:$LINENO: checking for Gtk libs" >&5
15740 $as_echo_n "checking for Gtk libs... " >&6; }
15741      d=$with_gtk/lib
15742      if test -d $d; then
15743        X_LIBS="-L$d $X_LIBS"
15744        { $as_echo "$as_me:$LINENO: result: $d" >&5
15745 $as_echo "$d" >&6; }
15746      else
15747        { $as_echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
15748 $as_echo "not found ($d: no such directory)" >&6; }
15749      fi
15750
15751      # replace the directory string with "yes".
15752      with_gtk_req="yes"
15753      with_gtk=$with_gtk_req
15754      ;;
15755
15756     *)
15757      echo ""
15758      echo "error: argument to --with-gtk must be \"yes\", \"no\", or a directory."
15759      echo "       If it is a directory, then \`DIR/include' will be added to"
15760      echo "       the -I list, and \`DIR/lib' will be added to the -L list."
15761      exit 1
15762      ;;
15763    esac
15764
15765
15766 if test "$with_gtk" != yes -a "$with_gtk" != no ; then
15767   echo "error: must be yes or no: --with-gtk=$with_gtk"
15768   exit 1
15769 fi
15770
15771
15772 parse_gtk_version_string() {
15773   # M4 sucks!!
15774
15775   maj=`echo $ac_gtk_version_string | sed -n 's/\..*//p'`
15776   min=`echo $ac_gtk_version_string | sed -n 's/[^.]*\.\([^.]*\).*/\1/p'`
15777
15778   ac_gtk_version=`echo "$maj * 1000 + $min" | bc`
15779   if test -z "$ac_gtk_version"; then
15780     ac_gtk_version=unknown
15781     ac_gtk_version_string=unknown
15782   fi
15783 }
15784
15785 # Find pkg-config... (need this for both gtk and gdk_pixbuf.)
15786 # if the user specified --with-gtk=/foo/ then look there.
15787 #
15788 gtk_path="$PATH"
15789 if test ! -z "$gtk_dir"; then
15790   # canonicalize slashes.
15791   foo=`echo "${gtk_dir}/bin" | sed 's@//*@/@g'`
15792   gtk_path="$foo:$gtk_path"
15793 fi
15794
15795 for ac_prog in pkg-config
15796 do
15797   # Extract the first word of "$ac_prog", so it can be a program name with args.
15798 set dummy $ac_prog; ac_word=$2
15799 { $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
15800 $as_echo_n "checking for $ac_word... " >&6; }
15801 if test "${ac_cv_path_pkg_config+set}" = set; then
15802   $as_echo_n "(cached) " >&6
15803 else
15804   case $pkg_config in
15805   [\\/]* | ?:[\\/]*)
15806   ac_cv_path_pkg_config="$pkg_config" # Let the user override the test with a path.
15807   ;;
15808   *)
15809   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
15810 for as_dir in $gtk_path
15811 do
15812   IFS=$as_save_IFS
15813   test -z "$as_dir" && as_dir=.
15814   for ac_exec_ext in '' $ac_executable_extensions; do
15815   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
15816     ac_cv_path_pkg_config="$as_dir/$ac_word$ac_exec_ext"
15817     $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
15818     break 2
15819   fi
15820 done
15821 done
15822 IFS=$as_save_IFS
15823
15824   ;;
15825 esac
15826 fi
15827 pkg_config=$ac_cv_path_pkg_config
15828 if test -n "$pkg_config"; then
15829   { $as_echo "$as_me:$LINENO: result: $pkg_config" >&5
15830 $as_echo "$pkg_config" >&6; }
15831 else
15832   { $as_echo "$as_me:$LINENO: result: no" >&5
15833 $as_echo "no" >&6; }
15834 fi
15835
15836
15837   test -n "$pkg_config" && break
15838 done
15839
15840
15841 if test -z "$pkg_config" ; then
15842   { $as_echo "$as_me:$LINENO: WARNING: pkg-config not found!" >&5
15843 $as_echo "$as_me: WARNING: pkg-config not found!" >&2;}
15844   pkg_config="false"
15845 fi
15846
15847
15848 # Utility function for running pkg-config-based tests...
15849 #
15850 pkgs=''
15851 pkg_check_version() {
15852   if test "$ok" = yes ; then
15853     req="$1"
15854     min="$2"
15855     { $as_echo "$as_me:$LINENO: checking for $req" >&5
15856 $as_echo_n "checking for $req... " >&6; }
15857     if $pkg_config --exists "$req" ; then
15858       vers=`$pkg_config --modversion "$req"`
15859       if $pkg_config --exists "$req >= $min" ; then
15860         { $as_echo "$as_me:$LINENO: result: $vers" >&5
15861 $as_echo "$vers" >&6; }
15862         pkgs="$pkgs $req"
15863         return 1
15864       else
15865         { $as_echo "$as_me:$LINENO: result: $vers (wanted >= $min)" >&5
15866 $as_echo "$vers (wanted >= $min)" >&6; }
15867         ok=no
15868         return 0
15869       fi
15870     else
15871       { $as_echo "$as_me:$LINENO: result: no" >&5
15872 $as_echo "no" >&6; }
15873       ok=no
15874       return 0
15875     fi
15876   fi
15877 }
15878
15879
15880 jurassic_gtk=no
15881 gtk_halfassed=no
15882
15883 if test "$with_gtk" = yes; then
15884   have_gtk=no
15885
15886   ok="yes"
15887   pkg_check_version            gtk+-2.0  2.0.1  ; ac_gtk_version_string="$vers"
15888   pkg_check_version         gmodule-2.0  2.0.0
15889   pkg_check_version          libxml-2.0  2.4.6
15890   pkg_check_version        libglade-2.0  1.99.0
15891   pkg_check_version      gdk-pixbuf-2.0  2.0.0
15892   pkg_check_version gdk-pixbuf-xlib-2.0  2.0.0
15893   have_gtk="$ok"
15894
15895   if test "$have_gtk" = no; then
15896     if test -n "$ac_gtk_version_string" ; then
15897       gtk_halfassed="$ac_gtk_version_string"
15898       gtk_halfassed_lib="$req"
15899     fi
15900   fi
15901
15902   if test "$have_gtk" = yes; then
15903     parse_gtk_version_string
15904     jurassic_gtk=no
15905   fi
15906
15907   if test "$have_gtk" = yes; then
15908     { $as_echo "$as_me:$LINENO: checking for Gtk includes" >&5
15909 $as_echo_n "checking for Gtk includes... " >&6; }
15910 if test "${ac_cv_gtk_config_cflags+set}" = set; then
15911   $as_echo_n "(cached) " >&6
15912 else
15913   ac_cv_gtk_config_cflags=`$pkg_config --cflags $pkgs`
15914 fi
15915 { $as_echo "$as_me:$LINENO: result: $ac_cv_gtk_config_cflags" >&5
15916 $as_echo "$ac_cv_gtk_config_cflags" >&6; }
15917     { $as_echo "$as_me:$LINENO: checking for Gtk libs" >&5
15918 $as_echo_n "checking for Gtk libs... " >&6; }
15919 if test "${ac_cv_gtk_config_libs+set}" = set; then
15920   $as_echo_n "(cached) " >&6
15921 else
15922   ac_cv_gtk_config_libs=`$pkg_config --libs $pkgs`
15923 fi
15924 { $as_echo "$as_me:$LINENO: result: $ac_cv_gtk_config_libs" >&5
15925 $as_echo "$ac_cv_gtk_config_libs" >&6; }
15926   fi
15927
15928   ac_gtk_config_cflags=$ac_cv_gtk_config_cflags
15929   ac_gtk_config_libs=$ac_cv_gtk_config_libs
15930
15931   GTK_EXTRA_OBJS=""
15932   GTK_DATADIR=""
15933   if test "$have_gtk" = yes; then
15934     GTK_DATADIR=`$pkg_config --variable=prefix gtk+-2.0`
15935     GTK_DATADIR="$GTK_DATADIR/share"
15936   fi
15937
15938   if test "$have_gtk" = yes; then
15939     INCLUDES="$INCLUDES $ac_gtk_config_cflags"
15940     GTK_LIBS="$GTK_LIBS $ac_gtk_config_libs"
15941     cat >>confdefs.h <<\_ACEOF
15942 #define HAVE_GTK 1
15943 _ACEOF
15944
15945     cat >>confdefs.h <<\_ACEOF
15946 #define HAVE_GTK2 1
15947 _ACEOF
15948
15949     cat >>confdefs.h <<\_ACEOF
15950 #define HAVE_XML 1
15951 _ACEOF
15952
15953   fi
15954
15955 fi
15956
15957
15958 # Check for the various Gnome help and URL loading programs.
15959 #
15960 WITH_BROWSER=gnome-open
15961 if test "$have_gtk" = yes; then
15962   for ac_prog in gnome-open
15963 do
15964   # Extract the first word of "$ac_prog", so it can be a program name with args.
15965 set dummy $ac_prog; ac_word=$2
15966 { $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
15967 $as_echo_n "checking for $ac_word... " >&6; }
15968 if test "${ac_cv_prog_gnome_open_program+set}" = set; then
15969   $as_echo_n "(cached) " >&6
15970 else
15971   if test -n "$gnome_open_program"; then
15972   ac_cv_prog_gnome_open_program="$gnome_open_program" # Let the user override the test.
15973 else
15974 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
15975 for as_dir in $PATH
15976 do
15977   IFS=$as_save_IFS
15978   test -z "$as_dir" && as_dir=.
15979   for ac_exec_ext in '' $ac_executable_extensions; do
15980   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
15981     ac_cv_prog_gnome_open_program="$ac_prog"
15982     $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
15983     break 2
15984   fi
15985 done
15986 done
15987 IFS=$as_save_IFS
15988
15989 fi
15990 fi
15991 gnome_open_program=$ac_cv_prog_gnome_open_program
15992 if test -n "$gnome_open_program"; then
15993   { $as_echo "$as_me:$LINENO: result: $gnome_open_program" >&5
15994 $as_echo "$gnome_open_program" >&6; }
15995 else
15996   { $as_echo "$as_me:$LINENO: result: no" >&5
15997 $as_echo "no" >&6; }
15998 fi
15999
16000
16001   test -n "$gnome_open_program" && break
16002 done
16003
16004   for ac_prog in gnome-url-show
16005 do
16006   # Extract the first word of "$ac_prog", so it can be a program name with args.
16007 set dummy $ac_prog; ac_word=$2
16008 { $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
16009 $as_echo_n "checking for $ac_word... " >&6; }
16010 if test "${ac_cv_prog_gnome_url_show_program+set}" = set; then
16011   $as_echo_n "(cached) " >&6
16012 else
16013   if test -n "$gnome_url_show_program"; then
16014   ac_cv_prog_gnome_url_show_program="$gnome_url_show_program" # Let the user override the test.
16015 else
16016 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
16017 for as_dir in $PATH
16018 do
16019   IFS=$as_save_IFS
16020   test -z "$as_dir" && as_dir=.
16021   for ac_exec_ext in '' $ac_executable_extensions; do
16022   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
16023     ac_cv_prog_gnome_url_show_program="$ac_prog"
16024     $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
16025     break 2
16026   fi
16027 done
16028 done
16029 IFS=$as_save_IFS
16030
16031 fi
16032 fi
16033 gnome_url_show_program=$ac_cv_prog_gnome_url_show_program
16034 if test -n "$gnome_url_show_program"; then
16035   { $as_echo "$as_me:$LINENO: result: $gnome_url_show_program" >&5
16036 $as_echo "$gnome_url_show_program" >&6; }
16037 else
16038   { $as_echo "$as_me:$LINENO: result: no" >&5
16039 $as_echo "no" >&6; }
16040 fi
16041
16042
16043   test -n "$gnome_url_show_program" && break
16044 done
16045
16046 fi
16047
16048
16049 ###############################################################################
16050 #
16051 #       Check for -lXm.
16052 #
16053 ###############################################################################
16054
16055 have_motif=no
16056 with_motif_req=unspecified
16057
16058 # Check whether --with-motif was given.
16059 if test "${with_motif+set}" = set; then
16060   withval=$with_motif; with_motif="$withval"; with_motif_req="$withval"
16061 else
16062   with_motif=no
16063 fi
16064
16065
16066
16067    case "$with_motif" in
16068     yes) ;;
16069     no)  ;;
16070
16071     /*)
16072      { $as_echo "$as_me:$LINENO: checking for Motif headers" >&5
16073 $as_echo_n "checking for Motif headers... " >&6; }
16074      d=$with_motif/include
16075      if test -d $d; then
16076        X_CFLAGS="-I$d $X_CFLAGS"
16077        { $as_echo "$as_me:$LINENO: result: $d" >&5
16078 $as_echo "$d" >&6; }
16079      else
16080        { $as_echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
16081 $as_echo "not found ($d: no such directory)" >&6; }
16082      fi
16083
16084      { $as_echo "$as_me:$LINENO: checking for Motif libs" >&5
16085 $as_echo_n "checking for Motif libs... " >&6; }
16086      d=$with_motif/lib
16087      if test -d $d; then
16088        X_LIBS="-L$d $X_LIBS"
16089        { $as_echo "$as_me:$LINENO: result: $d" >&5
16090 $as_echo "$d" >&6; }
16091      else
16092        { $as_echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
16093 $as_echo "not found ($d: no such directory)" >&6; }
16094      fi
16095
16096      # replace the directory string with "yes".
16097      with_motif_req="yes"
16098      with_motif=$with_motif_req
16099      ;;
16100
16101     *)
16102      echo ""
16103      echo "error: argument to --with-motif must be \"yes\", \"no\", or a directory."
16104      echo "       If it is a directory, then \`DIR/include' will be added to"
16105      echo "       the -I list, and \`DIR/lib' will be added to the -L list."
16106      exit 1
16107      ;;
16108    esac
16109
16110
16111 if test "$with_motif" != yes -a "$with_motif" != no ; then
16112   echo "error: must be yes or no: --with-motif=$with_motif"
16113   exit 1
16114 fi
16115
16116 if test "$with_motif" = yes; then
16117   have_motif=no
16118
16119   ac_save_CPPFLAGS="$CPPFLAGS"
16120   if test \! -z "$includedir" ; then
16121     CPPFLAGS="$CPPFLAGS -I$includedir"
16122   fi
16123   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
16124   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
16125   { $as_echo "$as_me:$LINENO: checking for Xm/Xm.h" >&5
16126 $as_echo_n "checking for Xm/Xm.h... " >&6; }
16127 if test "${ac_cv_header_Xm_Xm_h+set}" = set; then
16128   $as_echo_n "(cached) " >&6
16129 else
16130   cat >conftest.$ac_ext <<_ACEOF
16131 /* confdefs.h.  */
16132 _ACEOF
16133 cat confdefs.h >>conftest.$ac_ext
16134 cat >>conftest.$ac_ext <<_ACEOF
16135 /* end confdefs.h.  */
16136 #include <stdlib.h>
16137                      #include <stdio.h>
16138                      #include <X11/Intrinsic.h>
16139
16140 #include <Xm/Xm.h>
16141 _ACEOF
16142 rm -rf conftest.$ac_objext
16143 if { (ac_try="$ac_compile"
16144 case "(($ac_try" in
16145   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16146   *) ac_try_echo=$ac_try;;
16147 esac
16148 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
16149 $as_echo "$ac_try_echo") >&5
16150   (eval "$ac_compile") 2>conftest.er1
16151   ac_status=$?
16152   grep -v '^ *+' conftest.er1 >conftest.err
16153   rm -rf conftest.er1
16154   cat conftest.err >&5
16155   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
16156   (exit $ac_status); } && {
16157          test -z "$ac_c_werror_flag" ||
16158          test ! -s conftest.err
16159        } && test -s conftest.$ac_objext; then
16160   ac_cv_header_Xm_Xm_h=yes
16161 else
16162   $as_echo "$as_me: failed program was:" >&5
16163 sed 's/^/| /' conftest.$ac_ext >&5
16164
16165         ac_cv_header_Xm_Xm_h=no
16166 fi
16167
16168 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16169 fi
16170 { $as_echo "$as_me:$LINENO: result: $ac_cv_header_Xm_Xm_h" >&5
16171 $as_echo "$ac_cv_header_Xm_Xm_h" >&6; }
16172 if test "x$ac_cv_header_Xm_Xm_h" = x""yes; then
16173   have_motif=yes
16174                      cat >>confdefs.h <<\_ACEOF
16175 #define HAVE_MOTIF 1
16176 _ACEOF
16177
16178                      MOTIF_LIBS="$MOTIF_LIBS -lXm"
16179 fi
16180
16181
16182   CPPFLAGS="$ac_save_CPPFLAGS"
16183 fi
16184
16185
16186 if test "$have_motif" = yes; then
16187
16188   ac_save_CPPFLAGS="$CPPFLAGS"
16189   if test \! -z "$includedir" ; then
16190     CPPFLAGS="$CPPFLAGS -I$includedir"
16191   fi
16192   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
16193   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
16194   { $as_echo "$as_me:$LINENO: checking for Xm/ComboBox.h" >&5
16195 $as_echo_n "checking for Xm/ComboBox.h... " >&6; }
16196 if test "${ac_cv_header_Xm_ComboBox_h+set}" = set; then
16197   $as_echo_n "(cached) " >&6
16198 else
16199   cat >conftest.$ac_ext <<_ACEOF
16200 /* confdefs.h.  */
16201 _ACEOF
16202 cat confdefs.h >>conftest.$ac_ext
16203 cat >>conftest.$ac_ext <<_ACEOF
16204 /* end confdefs.h.  */
16205 #include <stdlib.h>
16206                      #include <stdio.h>
16207                      #include <X11/Intrinsic.h>
16208
16209 #include <Xm/ComboBox.h>
16210 _ACEOF
16211 rm -rf conftest.$ac_objext
16212 if { (ac_try="$ac_compile"
16213 case "(($ac_try" in
16214   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16215   *) ac_try_echo=$ac_try;;
16216 esac
16217 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
16218 $as_echo "$ac_try_echo") >&5
16219   (eval "$ac_compile") 2>conftest.er1
16220   ac_status=$?
16221   grep -v '^ *+' conftest.er1 >conftest.err
16222   rm -rf conftest.er1
16223   cat conftest.err >&5
16224   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
16225   (exit $ac_status); } && {
16226          test -z "$ac_c_werror_flag" ||
16227          test ! -s conftest.err
16228        } && test -s conftest.$ac_objext; then
16229   ac_cv_header_Xm_ComboBox_h=yes
16230 else
16231   $as_echo "$as_me: failed program was:" >&5
16232 sed 's/^/| /' conftest.$ac_ext >&5
16233
16234         ac_cv_header_Xm_ComboBox_h=no
16235 fi
16236
16237 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16238 fi
16239 { $as_echo "$as_me:$LINENO: result: $ac_cv_header_Xm_ComboBox_h" >&5
16240 $as_echo "$ac_cv_header_Xm_ComboBox_h" >&6; }
16241 if test "x$ac_cv_header_Xm_ComboBox_h" = x""yes; then
16242   cat >>confdefs.h <<\_ACEOF
16243 #define HAVE_XMCOMBOBOX 1
16244 _ACEOF
16245
16246 fi
16247
16248
16249   CPPFLAGS="$ac_save_CPPFLAGS"
16250 fi
16251
16252
16253 ###############################################################################
16254 #
16255 #       Checking whether Motif is really Lesstif.
16256 #
16257 ###############################################################################
16258
16259 have_lesstif=no
16260 if test "$have_motif" = yes ; then
16261   { $as_echo "$as_me:$LINENO: checking whether Motif is really LessTif" >&5
16262 $as_echo_n "checking whether Motif is really LessTif... " >&6; }
16263 if test "${ac_cv_have_lesstif+set}" = set; then
16264   $as_echo_n "(cached) " >&6
16265 else
16266
16267   ac_save_CPPFLAGS="$CPPFLAGS"
16268   if test \! -z "$includedir" ; then
16269     CPPFLAGS="$CPPFLAGS -I$includedir"
16270   fi
16271   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
16272   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
16273   cat >conftest.$ac_ext <<_ACEOF
16274 /* confdefs.h.  */
16275 _ACEOF
16276 cat confdefs.h >>conftest.$ac_ext
16277 cat >>conftest.$ac_ext <<_ACEOF
16278 /* end confdefs.h.  */
16279 #include <Xm/Xm.h>
16280 int
16281 main ()
16282 {
16283 long vers = LesstifVersion;
16284   ;
16285   return 0;
16286 }
16287 _ACEOF
16288 rm -rf conftest.$ac_objext
16289 if { (ac_try="$ac_compile"
16290 case "(($ac_try" in
16291   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16292   *) ac_try_echo=$ac_try;;
16293 esac
16294 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
16295 $as_echo "$ac_try_echo") >&5
16296   (eval "$ac_compile") 2>conftest.er1
16297   ac_status=$?
16298   grep -v '^ *+' conftest.er1 >conftest.err
16299   rm -rf conftest.er1
16300   cat conftest.err >&5
16301   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
16302   (exit $ac_status); } && {
16303          test -z "$ac_c_werror_flag" ||
16304          test ! -s conftest.err
16305        } && test -s conftest.$ac_objext; then
16306   ac_cv_have_lesstif=yes
16307 else
16308   $as_echo "$as_me: failed program was:" >&5
16309 sed 's/^/| /' conftest.$ac_ext >&5
16310
16311         ac_cv_have_lesstif=no
16312 fi
16313
16314 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16315   CPPFLAGS="$ac_save_CPPFLAGS"
16316 fi
16317 { $as_echo "$as_me:$LINENO: result: $ac_cv_have_lesstif" >&5
16318 $as_echo "$ac_cv_have_lesstif" >&6; }
16319   have_lesstif=$ac_cv_have_lesstif
16320 fi
16321
16322
16323 lesstif_version=unknown
16324 lesstif_version_string=unknown
16325
16326 if test "$have_lesstif" = yes ; then
16327   ltv=unknown
16328   echo unknown > conftest-lt
16329   { $as_echo "$as_me:$LINENO: checking LessTif version number" >&5
16330 $as_echo_n "checking LessTif version number... " >&6; }
16331 if test "${ac_cv_lesstif_version_string+set}" = set; then
16332   $as_echo_n "(cached) " >&6
16333 else
16334
16335   ac_save_CPPFLAGS="$CPPFLAGS"
16336   if test \! -z "$includedir" ; then
16337     CPPFLAGS="$CPPFLAGS -I$includedir"
16338   fi
16339   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
16340   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
16341   if test "$cross_compiling" = yes; then
16342   ac_cv_lesstif_version=unknown
16343                      ac_cv_lesstif_version_string=unknown
16344 else
16345   cat >conftest.$ac_ext <<_ACEOF
16346 /* confdefs.h.  */
16347 _ACEOF
16348 cat confdefs.h >>conftest.$ac_ext
16349 cat >>conftest.$ac_ext <<_ACEOF
16350 /* end confdefs.h.  */
16351 #include <stdio.h>
16352                      #include <Xm/Xm.h>
16353                      int main() {
16354                        FILE *f = fopen("conftest-lt", "w");
16355                        if (!f) exit(1);
16356                        fprintf(f, "%d %d.%d\n", LesstifVersion,
16357                           LESSTIF_VERSION, LESSTIF_REVISION);
16358                        fclose(f);
16359                        exit(0);
16360                      }
16361 _ACEOF
16362 rm -rf conftest$ac_exeext
16363 if { (ac_try="$ac_link"
16364 case "(($ac_try" in
16365   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16366   *) ac_try_echo=$ac_try;;
16367 esac
16368 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
16369 $as_echo "$ac_try_echo") >&5
16370   (eval "$ac_link") 2>&5
16371   ac_status=$?
16372   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
16373   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
16374   { (case "(($ac_try" in
16375   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16376   *) ac_try_echo=$ac_try;;
16377 esac
16378 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
16379 $as_echo "$ac_try_echo") >&5
16380   (eval "$ac_try") 2>&5
16381   ac_status=$?
16382   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
16383   (exit $ac_status); }; }; then
16384   ltv=`cat conftest-lt`
16385                      ac_cv_lesstif_version=`echo $ltv | sed 's/ .*//'`
16386                      ac_cv_lesstif_version_string=`echo $ltv | sed 's/.* //'`
16387 else
16388   $as_echo "$as_me: program exited with status $ac_status" >&5
16389 $as_echo "$as_me: failed program was:" >&5
16390 sed 's/^/| /' conftest.$ac_ext >&5
16391
16392 ( exit $ac_status )
16393 ac_cv_lesstif_version=unknown
16394                      ac_cv_lesstif_version_string=unknown
16395 fi
16396 rm -rf conftest.dSYM
16397 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
16398 fi
16399
16400
16401   CPPFLAGS="$ac_save_CPPFLAGS"
16402 fi
16403 { $as_echo "$as_me:$LINENO: result: $ac_cv_lesstif_version_string" >&5
16404 $as_echo "$ac_cv_lesstif_version_string" >&6; }
16405   rm -rf conftest-lt
16406   lesstif_version=$ac_cv_lesstif_version
16407   lesstif_version_string=$ac_cv_lesstif_version_string
16408
16409 fi
16410
16411
16412 if test "$have_motif" = yes ; then
16413   mtv=unknown
16414   echo unknown > conftest-mt
16415   { $as_echo "$as_me:$LINENO: checking Motif version number" >&5
16416 $as_echo_n "checking Motif version number... " >&6; }
16417 if test "${ac_cv_motif_version_string+set}" = set; then
16418   $as_echo_n "(cached) " >&6
16419 else
16420
16421   ac_save_CPPFLAGS="$CPPFLAGS"
16422   if test \! -z "$includedir" ; then
16423     CPPFLAGS="$CPPFLAGS -I$includedir"
16424   fi
16425   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
16426   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
16427   if test "$cross_compiling" = yes; then
16428   ac_cv_motif_version=unknown
16429                      ac_cv_motif_version_string=unknown
16430 else
16431   cat >conftest.$ac_ext <<_ACEOF
16432 /* confdefs.h.  */
16433 _ACEOF
16434 cat confdefs.h >>conftest.$ac_ext
16435 cat >>conftest.$ac_ext <<_ACEOF
16436 /* end confdefs.h.  */
16437 #include <stdio.h>
16438                      #include <Xm/Xm.h>
16439                      int main() {
16440                        FILE *f = fopen("conftest-mt", "w");
16441                        if (!f) exit(1);
16442                        fprintf(f, "%d %d.%d\n", XmVersion,
16443                           XmVERSION, XmREVISION);
16444                        fclose(f);
16445                        exit(0);
16446                      }
16447 _ACEOF
16448 rm -rf conftest$ac_exeext
16449 if { (ac_try="$ac_link"
16450 case "(($ac_try" in
16451   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16452   *) ac_try_echo=$ac_try;;
16453 esac
16454 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
16455 $as_echo "$ac_try_echo") >&5
16456   (eval "$ac_link") 2>&5
16457   ac_status=$?
16458   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
16459   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
16460   { (case "(($ac_try" in
16461   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16462   *) ac_try_echo=$ac_try;;
16463 esac
16464 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
16465 $as_echo "$ac_try_echo") >&5
16466   (eval "$ac_try") 2>&5
16467   ac_status=$?
16468   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
16469   (exit $ac_status); }; }; then
16470   mtv=`cat conftest-mt`
16471                      ac_cv_motif_version=`echo $mtv | sed 's/ .*//'`
16472                      ac_cv_motif_version_string=`echo $mtv | sed 's/.* //'`
16473 else
16474   $as_echo "$as_me: program exited with status $ac_status" >&5
16475 $as_echo "$as_me: failed program was:" >&5
16476 sed 's/^/| /' conftest.$ac_ext >&5
16477
16478 ( exit $ac_status )
16479 ac_cv_motif_version=unknown
16480                      ac_cv_motif_version_string=unknown
16481 fi
16482 rm -rf conftest.dSYM
16483 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
16484 fi
16485
16486
16487   CPPFLAGS="$ac_save_CPPFLAGS"
16488 fi
16489 { $as_echo "$as_me:$LINENO: result: $ac_cv_motif_version_string" >&5
16490 $as_echo "$ac_cv_motif_version_string" >&6; }
16491   rm -rf conftest-mt
16492   motif_version=$ac_cv_motif_version
16493   motif_version_string=$ac_cv_motif_version_string
16494
16495 fi
16496
16497
16498 ###############################################################################
16499 #
16500 #       Checking whether Motif requires -lXpm.
16501 #
16502 #       If this is Motif 2.x, and we have XPM, then link against XPM as well.
16503 #       The deal is, Motif 2.x requires XPM -- but it's a compilation option
16504 #       of the library whether to build the XPM code into libXm, or whether
16505 #       to rely on an external libXm.  So the only way to tell whether XPM is
16506 #       a link-time requirement is to examine libXm.a, which is very
16507 #       difficult to do in an autoconf script.  So... if it's Motif 2.x, we
16508 #       always link against XPM if the XPM lib exists (and this will be a
16509 #       no-op if libXm happens to already have the XPM code in it.)
16510 #
16511 ###############################################################################
16512
16513 motif_requires_xpm=no
16514 if test "$have_motif" = yes ; then
16515    { $as_echo "$as_me:$LINENO: checking whether Motif requires XPM" >&5
16516 $as_echo_n "checking whether Motif requires XPM... " >&6; }
16517    if test "$motif_version" = "unknown" || test "$motif_version" -ge 2000
16518    then
16519      motif_requires_xpm=yes
16520      { $as_echo "$as_me:$LINENO: result: maybe" >&5
16521 $as_echo "maybe" >&6; }
16522    else
16523      { $as_echo "$as_me:$LINENO: result: no" >&5
16524 $as_echo "no" >&6; }
16525    fi
16526 fi
16527
16528
16529 ###############################################################################
16530 #
16531 #       Checking whether Motif requires -lXp.
16532 #
16533 #       Some versions of Motif (2.1.0, at least) require -lXp, the "X Printing
16534 #       Extension".   Why this extension isn't in -lXext with all the others,
16535 #       I have no idea.
16536 #
16537 ###############################################################################
16538
16539 have_xp_ext=no
16540 if test "$have_motif" = yes ; then
16541    have_xp_ext=no
16542
16543   ac_save_CPPFLAGS="$CPPFLAGS"
16544   ac_save_LDFLAGS="$LDFLAGS"
16545 #  ac_save_LIBS="$LIBS"
16546
16547   if test \! -z "$includedir" ; then
16548     CPPFLAGS="$CPPFLAGS -I$includedir"
16549   fi
16550   # note: $X_CFLAGS includes $x_includes
16551   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
16552
16553   if test \! -z "$libdir" ; then
16554     LDFLAGS="$LDFLAGS -L$libdir"
16555   fi
16556   # note: $X_LIBS includes $x_libraries
16557   LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
16558
16559   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
16560   LDFLAGS=`eval eval eval eval eval eval eval eval eval echo $LDFLAGS`
16561   { $as_echo "$as_me:$LINENO: checking for XpQueryExtension in -lXp" >&5
16562 $as_echo_n "checking for XpQueryExtension in -lXp... " >&6; }
16563 if test "${ac_cv_lib_Xp_XpQueryExtension+set}" = set; then
16564   $as_echo_n "(cached) " >&6
16565 else
16566   ac_check_lib_save_LIBS=$LIBS
16567 LIBS="-lXp -lX11 -lXext -lm $LIBS"
16568 cat >conftest.$ac_ext <<_ACEOF
16569 /* confdefs.h.  */
16570 _ACEOF
16571 cat confdefs.h >>conftest.$ac_ext
16572 cat >>conftest.$ac_ext <<_ACEOF
16573 /* end confdefs.h.  */
16574
16575 /* Override any GCC internal prototype to avoid an error.
16576    Use char because int might match the return type of a GCC
16577    builtin and then its argument prototype would still apply.  */
16578 #ifdef __cplusplus
16579 extern "C"
16580 #endif
16581 char XpQueryExtension ();
16582 int
16583 main ()
16584 {
16585 return XpQueryExtension ();
16586   ;
16587   return 0;
16588 }
16589 _ACEOF
16590 rm -rf conftest.$ac_objext conftest$ac_exeext
16591 if { (ac_try="$ac_link"
16592 case "(($ac_try" in
16593   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16594   *) ac_try_echo=$ac_try;;
16595 esac
16596 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
16597 $as_echo "$ac_try_echo") >&5
16598   (eval "$ac_link") 2>conftest.er1
16599   ac_status=$?
16600   grep -v '^ *+' conftest.er1 >conftest.err
16601   rm -rf conftest.er1
16602   cat conftest.err >&5
16603   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
16604   (exit $ac_status); } && {
16605          test -z "$ac_c_werror_flag" ||
16606          test ! -s conftest.err
16607        } && test -s conftest$ac_exeext && {
16608          test "$cross_compiling" = yes ||
16609          $as_test_x conftest$ac_exeext
16610        }; then
16611   ac_cv_lib_Xp_XpQueryExtension=yes
16612 else
16613   $as_echo "$as_me: failed program was:" >&5
16614 sed 's/^/| /' conftest.$ac_ext >&5
16615
16616         ac_cv_lib_Xp_XpQueryExtension=no
16617 fi
16618
16619 rm -rf conftest.dSYM
16620 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
16621       conftest$ac_exeext conftest.$ac_ext
16622 LIBS=$ac_check_lib_save_LIBS
16623 fi
16624 { $as_echo "$as_me:$LINENO: result: $ac_cv_lib_Xp_XpQueryExtension" >&5
16625 $as_echo "$ac_cv_lib_Xp_XpQueryExtension" >&6; }
16626 if test "x$ac_cv_lib_Xp_XpQueryExtension" = x""yes; then
16627   have_xp_ext=yes; MOTIF_LIBS="$MOTIF_LIBS -lXp"
16628 else
16629   true
16630 fi
16631
16632   CPPFLAGS="$ac_save_CPPFLAGS"
16633   LDFLAGS="$ac_save_LDFLAGS"
16634 #  LIBS="$ac_save_LIBS"
16635
16636 fi
16637
16638
16639 ###############################################################################
16640 #
16641 #       Checking whether Motif requires -lXintl (for _Xsetlocale.)
16642 #
16643 ###############################################################################
16644
16645 have_xintl=no
16646 if test "$have_motif" = yes ; then
16647
16648   ac_save_CPPFLAGS="$CPPFLAGS"
16649   ac_save_LDFLAGS="$LDFLAGS"
16650 #  ac_save_LIBS="$LIBS"
16651
16652   if test \! -z "$includedir" ; then
16653     CPPFLAGS="$CPPFLAGS -I$includedir"
16654   fi
16655   # note: $X_CFLAGS includes $x_includes
16656   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
16657
16658   if test \! -z "$libdir" ; then
16659     LDFLAGS="$LDFLAGS -L$libdir"
16660   fi
16661   # note: $X_LIBS includes $x_libraries
16662   LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
16663
16664   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
16665   LDFLAGS=`eval eval eval eval eval eval eval eval eval echo $LDFLAGS`
16666   { $as_echo "$as_me:$LINENO: checking for _Xsetlocale in -lXintl" >&5
16667 $as_echo_n "checking for _Xsetlocale in -lXintl... " >&6; }
16668 if test "${ac_cv_lib_Xintl__Xsetlocale+set}" = set; then
16669   $as_echo_n "(cached) " >&6
16670 else
16671   ac_check_lib_save_LIBS=$LIBS
16672 LIBS="-lXintl -lX11 -lXext -lm $LIBS"
16673 cat >conftest.$ac_ext <<_ACEOF
16674 /* confdefs.h.  */
16675 _ACEOF
16676 cat confdefs.h >>conftest.$ac_ext
16677 cat >>conftest.$ac_ext <<_ACEOF
16678 /* end confdefs.h.  */
16679
16680 /* Override any GCC internal prototype to avoid an error.
16681    Use char because int might match the return type of a GCC
16682    builtin and then its argument prototype would still apply.  */
16683 #ifdef __cplusplus
16684 extern "C"
16685 #endif
16686 char _Xsetlocale ();
16687 int
16688 main ()
16689 {
16690 return _Xsetlocale ();
16691   ;
16692   return 0;
16693 }
16694 _ACEOF
16695 rm -rf conftest.$ac_objext conftest$ac_exeext
16696 if { (ac_try="$ac_link"
16697 case "(($ac_try" in
16698   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16699   *) ac_try_echo=$ac_try;;
16700 esac
16701 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
16702 $as_echo "$ac_try_echo") >&5
16703   (eval "$ac_link") 2>conftest.er1
16704   ac_status=$?
16705   grep -v '^ *+' conftest.er1 >conftest.err
16706   rm -rf conftest.er1
16707   cat conftest.err >&5
16708   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
16709   (exit $ac_status); } && {
16710          test -z "$ac_c_werror_flag" ||
16711          test ! -s conftest.err
16712        } && test -s conftest$ac_exeext && {
16713          test "$cross_compiling" = yes ||
16714          $as_test_x conftest$ac_exeext
16715        }; then
16716   ac_cv_lib_Xintl__Xsetlocale=yes
16717 else
16718   $as_echo "$as_me: failed program was:" >&5
16719 sed 's/^/| /' conftest.$ac_ext >&5
16720
16721         ac_cv_lib_Xintl__Xsetlocale=no
16722 fi
16723
16724 rm -rf conftest.dSYM
16725 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
16726       conftest$ac_exeext conftest.$ac_ext
16727 LIBS=$ac_check_lib_save_LIBS
16728 fi
16729 { $as_echo "$as_me:$LINENO: result: $ac_cv_lib_Xintl__Xsetlocale" >&5
16730 $as_echo "$ac_cv_lib_Xintl__Xsetlocale" >&6; }
16731 if test "x$ac_cv_lib_Xintl__Xsetlocale" = x""yes; then
16732   have_xintl=yes
16733 else
16734   have_xintl=no
16735 fi
16736
16737   CPPFLAGS="$ac_save_CPPFLAGS"
16738   LDFLAGS="$ac_save_LDFLAGS"
16739 #  LIBS="$ac_save_LIBS"
16740
16741   if test "$have_xintl" = yes; then
16742     MOTIF_LIBS="$MOTIF_LIBS -lXintl"
16743   fi
16744 fi
16745
16746
16747 ###############################################################################
16748 #
16749 #       Check for -lGL or -lMesaGL.
16750 #
16751 ###############################################################################
16752
16753 have_gl=no
16754 ac_have_mesa_gl=no
16755 with_gl_req=unspecified
16756 gl_halfassed=no
16757
16758 # Check whether --with-gl was given.
16759 if test "${with_gl+set}" = set; then
16760   withval=$with_gl; with_gl="$withval"; with_gl_req="$withval"
16761 else
16762   with_gl=yes
16763 fi
16764
16765
16766
16767    case "$with_gl" in
16768     yes) ;;
16769     no)  ;;
16770
16771     /*)
16772      { $as_echo "$as_me:$LINENO: checking for GL headers" >&5
16773 $as_echo_n "checking for GL headers... " >&6; }
16774      d=$with_gl/include
16775      if test -d $d; then
16776        X_CFLAGS="-I$d $X_CFLAGS"
16777        { $as_echo "$as_me:$LINENO: result: $d" >&5
16778 $as_echo "$d" >&6; }
16779      else
16780        { $as_echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
16781 $as_echo "not found ($d: no such directory)" >&6; }
16782      fi
16783
16784      { $as_echo "$as_me:$LINENO: checking for GL libs" >&5
16785 $as_echo_n "checking for GL libs... " >&6; }
16786      d=$with_gl/lib
16787      if test -d $d; then
16788        X_LIBS="-L$d $X_LIBS"
16789        { $as_echo "$as_me:$LINENO: result: $d" >&5
16790 $as_echo "$d" >&6; }
16791      else
16792        { $as_echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
16793 $as_echo "not found ($d: no such directory)" >&6; }
16794      fi
16795
16796      # replace the directory string with "yes".
16797      with_gl_req="yes"
16798      with_gl=$with_gl_req
16799      ;;
16800
16801     *)
16802      echo ""
16803      echo "error: argument to --with-gl must be \"yes\", \"no\", or a directory."
16804      echo "       If it is a directory, then \`DIR/include' will be added to"
16805      echo "       the -I list, and \`DIR/lib' will be added to the -L list."
16806      exit 1
16807      ;;
16808    esac
16809
16810
16811 ac_mesagl_version=unknown
16812 ac_mesagl_version_string=unknown
16813
16814 if test "$with_gl" = yes; then
16815
16816   ac_save_CPPFLAGS="$CPPFLAGS"
16817   if test \! -z "$includedir" ; then
16818     CPPFLAGS="$CPPFLAGS -I$includedir"
16819   fi
16820   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
16821   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
16822   if test "${ac_cv_header_GL_gl_h+set}" = set; then
16823   { $as_echo "$as_me:$LINENO: checking for GL/gl.h" >&5
16824 $as_echo_n "checking for GL/gl.h... " >&6; }
16825 if test "${ac_cv_header_GL_gl_h+set}" = set; then
16826   $as_echo_n "(cached) " >&6
16827 fi
16828 { $as_echo "$as_me:$LINENO: result: $ac_cv_header_GL_gl_h" >&5
16829 $as_echo "$ac_cv_header_GL_gl_h" >&6; }
16830 else
16831   # Is the header compilable?
16832 { $as_echo "$as_me:$LINENO: checking GL/gl.h usability" >&5
16833 $as_echo_n "checking GL/gl.h usability... " >&6; }
16834 cat >conftest.$ac_ext <<_ACEOF
16835 /* confdefs.h.  */
16836 _ACEOF
16837 cat confdefs.h >>conftest.$ac_ext
16838 cat >>conftest.$ac_ext <<_ACEOF
16839 /* end confdefs.h.  */
16840 $ac_includes_default
16841 #include <GL/gl.h>
16842 _ACEOF
16843 rm -rf conftest.$ac_objext
16844 if { (ac_try="$ac_compile"
16845 case "(($ac_try" in
16846   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16847   *) ac_try_echo=$ac_try;;
16848 esac
16849 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
16850 $as_echo "$ac_try_echo") >&5
16851   (eval "$ac_compile") 2>conftest.er1
16852   ac_status=$?
16853   grep -v '^ *+' conftest.er1 >conftest.err
16854   rm -rf conftest.er1
16855   cat conftest.err >&5
16856   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
16857   (exit $ac_status); } && {
16858          test -z "$ac_c_werror_flag" ||
16859          test ! -s conftest.err
16860        } && test -s conftest.$ac_objext; then
16861   ac_header_compiler=yes
16862 else
16863   $as_echo "$as_me: failed program was:" >&5
16864 sed 's/^/| /' conftest.$ac_ext >&5
16865
16866         ac_header_compiler=no
16867 fi
16868
16869 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16870 { $as_echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
16871 $as_echo "$ac_header_compiler" >&6; }
16872
16873 # Is the header present?
16874 { $as_echo "$as_me:$LINENO: checking GL/gl.h presence" >&5
16875 $as_echo_n "checking GL/gl.h presence... " >&6; }
16876 cat >conftest.$ac_ext <<_ACEOF
16877 /* confdefs.h.  */
16878 _ACEOF
16879 cat confdefs.h >>conftest.$ac_ext
16880 cat >>conftest.$ac_ext <<_ACEOF
16881 /* end confdefs.h.  */
16882 #include <GL/gl.h>
16883 _ACEOF
16884 if { (ac_try="$ac_cpp conftest.$ac_ext"
16885 case "(($ac_try" in
16886   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16887   *) ac_try_echo=$ac_try;;
16888 esac
16889 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
16890 $as_echo "$ac_try_echo") >&5
16891   (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
16892   ac_status=$?
16893   grep -v '^ *+' conftest.er1 >conftest.err
16894   rm -rf conftest.er1
16895   cat conftest.err >&5
16896   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
16897   (exit $ac_status); } >/dev/null && {
16898          test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
16899          test ! -s conftest.err
16900        }; then
16901   ac_header_preproc=yes
16902 else
16903   $as_echo "$as_me: failed program was:" >&5
16904 sed 's/^/| /' conftest.$ac_ext >&5
16905
16906   ac_header_preproc=no
16907 fi
16908
16909 rm -rf conftest.err conftest.$ac_ext
16910 { $as_echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
16911 $as_echo "$ac_header_preproc" >&6; }
16912
16913 # So?  What about this header?
16914 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
16915   yes:no: )
16916     { $as_echo "$as_me:$LINENO: WARNING: GL/gl.h: accepted by the compiler, rejected by the preprocessor!" >&5
16917 $as_echo "$as_me: WARNING: GL/gl.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
16918     { $as_echo "$as_me:$LINENO: WARNING: GL/gl.h: proceeding with the compiler's result" >&5
16919 $as_echo "$as_me: WARNING: GL/gl.h: proceeding with the compiler's result" >&2;}
16920     ac_header_preproc=yes
16921     ;;
16922   no:yes:* )
16923     { $as_echo "$as_me:$LINENO: WARNING: GL/gl.h: present but cannot be compiled" >&5
16924 $as_echo "$as_me: WARNING: GL/gl.h: present but cannot be compiled" >&2;}
16925     { $as_echo "$as_me:$LINENO: WARNING: GL/gl.h:     check for missing prerequisite headers?" >&5
16926 $as_echo "$as_me: WARNING: GL/gl.h:     check for missing prerequisite headers?" >&2;}
16927     { $as_echo "$as_me:$LINENO: WARNING: GL/gl.h: see the Autoconf documentation" >&5
16928 $as_echo "$as_me: WARNING: GL/gl.h: see the Autoconf documentation" >&2;}
16929     { $as_echo "$as_me:$LINENO: WARNING: GL/gl.h:     section \"Present But Cannot Be Compiled\"" >&5
16930 $as_echo "$as_me: WARNING: GL/gl.h:     section \"Present But Cannot Be Compiled\"" >&2;}
16931     { $as_echo "$as_me:$LINENO: WARNING: GL/gl.h: proceeding with the preprocessor's result" >&5
16932 $as_echo "$as_me: WARNING: GL/gl.h: proceeding with the preprocessor's result" >&2;}
16933     { $as_echo "$as_me:$LINENO: WARNING: GL/gl.h: in the future, the compiler will take precedence" >&5
16934 $as_echo "$as_me: WARNING: GL/gl.h: in the future, the compiler will take precedence" >&2;}
16935
16936     ;;
16937 esac
16938 { $as_echo "$as_me:$LINENO: checking for GL/gl.h" >&5
16939 $as_echo_n "checking for GL/gl.h... " >&6; }
16940 if test "${ac_cv_header_GL_gl_h+set}" = set; then
16941   $as_echo_n "(cached) " >&6
16942 else
16943   ac_cv_header_GL_gl_h=$ac_header_preproc
16944 fi
16945 { $as_echo "$as_me:$LINENO: result: $ac_cv_header_GL_gl_h" >&5
16946 $as_echo "$ac_cv_header_GL_gl_h" >&6; }
16947
16948 fi
16949 if test "x$ac_cv_header_GL_gl_h" = x""yes; then
16950   have_gl=yes
16951 else
16952   have_gl=no
16953 fi
16954
16955
16956   CPPFLAGS="$ac_save_CPPFLAGS"
16957   if test "$have_gl" = yes ; then
16958
16959   ac_save_CPPFLAGS="$CPPFLAGS"
16960   if test \! -z "$includedir" ; then
16961     CPPFLAGS="$CPPFLAGS -I$includedir"
16962   fi
16963   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
16964   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
16965   { $as_echo "$as_me:$LINENO: checking for GL/glx.h" >&5
16966 $as_echo_n "checking for GL/glx.h... " >&6; }
16967 if test "${ac_cv_header_GL_glx_h+set}" = set; then
16968   $as_echo_n "(cached) " >&6
16969 else
16970   cat >conftest.$ac_ext <<_ACEOF
16971 /* confdefs.h.  */
16972 _ACEOF
16973 cat confdefs.h >>conftest.$ac_ext
16974 cat >>conftest.$ac_ext <<_ACEOF
16975 /* end confdefs.h.  */
16976 #include <GL/gl.h>
16977
16978 #include <GL/glx.h>
16979 _ACEOF
16980 rm -rf conftest.$ac_objext
16981 if { (ac_try="$ac_compile"
16982 case "(($ac_try" in
16983   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16984   *) ac_try_echo=$ac_try;;
16985 esac
16986 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
16987 $as_echo "$ac_try_echo") >&5
16988   (eval "$ac_compile") 2>conftest.er1
16989   ac_status=$?
16990   grep -v '^ *+' conftest.er1 >conftest.err
16991   rm -rf conftest.er1
16992   cat conftest.err >&5
16993   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
16994   (exit $ac_status); } && {
16995          test -z "$ac_c_werror_flag" ||
16996          test ! -s conftest.err
16997        } && test -s conftest.$ac_objext; then
16998   ac_cv_header_GL_glx_h=yes
16999 else
17000   $as_echo "$as_me: failed program was:" >&5
17001 sed 's/^/| /' conftest.$ac_ext >&5
17002
17003         ac_cv_header_GL_glx_h=no
17004 fi
17005
17006 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
17007 fi
17008 { $as_echo "$as_me:$LINENO: result: $ac_cv_header_GL_glx_h" >&5
17009 $as_echo "$ac_cv_header_GL_glx_h" >&6; }
17010 if test "x$ac_cv_header_GL_glx_h" = x""yes; then
17011   have_gl=yes
17012 else
17013   have_gl=no
17014 fi
17015
17016
17017   CPPFLAGS="$ac_save_CPPFLAGS"
17018   fi
17019
17020   # If we have the headers, try and figure out which vendor it's from.
17021   #
17022   if test "$have_gl" = yes ; then
17023
17024     # We need to know whether it's MesaGL so that we know which libraries
17025     # to link against.
17026     #
17027     { $as_echo "$as_me:$LINENO: checking whether GL is really MesaGL" >&5
17028 $as_echo_n "checking whether GL is really MesaGL... " >&6; }
17029 if test "${ac_cv_have_mesa_gl+set}" = set; then
17030   $as_echo_n "(cached) " >&6
17031 else
17032   ac_cv_have_mesa_gl=no
17033        if test "$ac_macosx" = no; then
17034          # WTF! MacOS 10.5.0 ships the Mesa GL headers!
17035          # It's not really Mesa, is it?
17036
17037   ac_save_CPPFLAGS="$CPPFLAGS"
17038   if test \! -z "$includedir" ; then
17039     CPPFLAGS="$CPPFLAGS -I$includedir"
17040   fi
17041   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
17042   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
17043   cat >conftest.$ac_ext <<_ACEOF
17044 /* confdefs.h.  */
17045 _ACEOF
17046 cat confdefs.h >>conftest.$ac_ext
17047 cat >>conftest.$ac_ext <<_ACEOF
17048 /* end confdefs.h.  */
17049 #include <GL/glx.h>
17050
17051 _ACEOF
17052 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
17053   $EGREP "Mesa|MESA" >/dev/null 2>&1; then
17054   ac_cv_have_mesa_gl=yes
17055 fi
17056 rm -rf conftest*
17057
17058   CPPFLAGS="$ac_save_CPPFLAGS"
17059        fi
17060 fi
17061 { $as_echo "$as_me:$LINENO: result: $ac_cv_have_mesa_gl" >&5
17062 $as_echo "$ac_cv_have_mesa_gl" >&6; }
17063     ac_have_mesa_gl=$ac_cv_have_mesa_gl
17064
17065     gl_lib_1=""
17066     GL_LIBS=""
17067
17068     if test "$ac_macosx" = yes; then
17069
17070       # Without these, every link against libGL gets a bunch of useless
17071       # warnings.
17072       #
17073       osx_crud="-bind_at_load -multiply_defined suppress"
17074       { $as_echo "$as_me:$LINENO: result: adding \"$osx_crud\" to GL_LIBS" >&5
17075 $as_echo "adding \"$osx_crud\" to GL_LIBS" >&6; }
17076       GL_LIBS="$GL_LIBS $osx_crud"
17077       unset osx_crud
17078
17079       # New lossage in 10.5.0: without this, we get:
17080       #   ld: cycle in dylib re-exports with /usr/X11/lib/libGL.dylib
17081       #
17082       osx_crud="/System/Library/Frameworks/OpenGL.framework/Versions/A/Libraries/libGL.dylib"
17083       osx_crud="-Wl,-dylib_file,${osx_crud}:${osx_crud}"
17084
17085       { $as_echo "$as_me:$LINENO: result: adding \"$osx_crud\" to GL_LIBS" >&5
17086 $as_echo "adding \"$osx_crud\" to GL_LIBS" >&6; }
17087       GL_LIBS="$GL_LIBS $osx_crud"
17088       unset osx_crud
17089
17090       # New lossage in 10.6.8: we can't allow -L/opt/local/lib to be in the
17091       # link line, or at runtime XQueryExtension gets a segv due to some kind
17092       # of library version skew.  Libs must come from /usr/X11/lib even if
17093       # $prefix and/or $exec_prefix are set to /opt/local/.
17094       #
17095       { $as_echo "$as_me:$LINENO: result: omitting \"$libdir\" from LDFLAGS" >&5
17096 $as_echo "omitting \"$libdir\" from LDFLAGS" >&6; }
17097       libdir=''
17098
17099     fi
17100
17101
17102     # Some versions of MesaGL are compiled to require -lpthread.
17103     # So if the Mesa headers exist, and -lpthread exists, then always
17104     # link -lpthread after the Mesa libs (be they named -lGL or -lMesaGL.)
17105     #
17106     if test "$ac_have_mesa_gl" = yes; then
17107       { $as_echo "$as_me:$LINENO: checking for pthread_create in -lpthread" >&5
17108 $as_echo_n "checking for pthread_create in -lpthread... " >&6; }
17109 if test "${ac_cv_lib_pthread_pthread_create+set}" = set; then
17110   $as_echo_n "(cached) " >&6
17111 else
17112   ac_check_lib_save_LIBS=$LIBS
17113 LIBS="-lpthread  $LIBS"
17114 cat >conftest.$ac_ext <<_ACEOF
17115 /* confdefs.h.  */
17116 _ACEOF
17117 cat confdefs.h >>conftest.$ac_ext
17118 cat >>conftest.$ac_ext <<_ACEOF
17119 /* end confdefs.h.  */
17120
17121 /* Override any GCC internal prototype to avoid an error.
17122    Use char because int might match the return type of a GCC
17123    builtin and then its argument prototype would still apply.  */
17124 #ifdef __cplusplus
17125 extern "C"
17126 #endif
17127 char pthread_create ();
17128 int
17129 main ()
17130 {
17131 return pthread_create ();
17132   ;
17133   return 0;
17134 }
17135 _ACEOF
17136 rm -rf conftest.$ac_objext conftest$ac_exeext
17137 if { (ac_try="$ac_link"
17138 case "(($ac_try" in
17139   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17140   *) ac_try_echo=$ac_try;;
17141 esac
17142 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
17143 $as_echo "$ac_try_echo") >&5
17144   (eval "$ac_link") 2>conftest.er1
17145   ac_status=$?
17146   grep -v '^ *+' conftest.er1 >conftest.err
17147   rm -rf conftest.er1
17148   cat conftest.err >&5
17149   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
17150   (exit $ac_status); } && {
17151          test -z "$ac_c_werror_flag" ||
17152          test ! -s conftest.err
17153        } && test -s conftest$ac_exeext && {
17154          test "$cross_compiling" = yes ||
17155          $as_test_x conftest$ac_exeext
17156        }; then
17157   ac_cv_lib_pthread_pthread_create=yes
17158 else
17159   $as_echo "$as_me: failed program was:" >&5
17160 sed 's/^/| /' conftest.$ac_ext >&5
17161
17162         ac_cv_lib_pthread_pthread_create=no
17163 fi
17164
17165 rm -rf conftest.dSYM
17166 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
17167       conftest$ac_exeext conftest.$ac_ext
17168 LIBS=$ac_check_lib_save_LIBS
17169 fi
17170 { $as_echo "$as_me:$LINENO: result: $ac_cv_lib_pthread_pthread_create" >&5
17171 $as_echo "$ac_cv_lib_pthread_pthread_create" >&6; }
17172 if test "x$ac_cv_lib_pthread_pthread_create" = x""yes; then
17173   GL_LIBS="-lpthread"
17174 fi
17175
17176     fi
17177
17178
17179     # If we have Mesa headers, check to see if we can link against -lMesaGL.
17180     # If we don't have Mesa headers, or we don't have -lMesaGL, try -lGL.
17181     # Else, warn that GL is busted.  (We have the headers, but no libs.)
17182     #
17183
17184     if test "$ac_have_mesa_gl" = yes ; then
17185
17186   ac_save_CPPFLAGS="$CPPFLAGS"
17187   ac_save_LDFLAGS="$LDFLAGS"
17188 #  ac_save_LIBS="$LIBS"
17189
17190   if test \! -z "$includedir" ; then
17191     CPPFLAGS="$CPPFLAGS -I$includedir"
17192   fi
17193   # note: $X_CFLAGS includes $x_includes
17194   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
17195
17196   if test \! -z "$libdir" ; then
17197     LDFLAGS="$LDFLAGS -L$libdir"
17198   fi
17199   # note: $X_LIBS includes $x_libraries
17200   LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
17201
17202   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
17203   LDFLAGS=`eval eval eval eval eval eval eval eval eval echo $LDFLAGS`
17204   { $as_echo "$as_me:$LINENO: checking for glXCreateContext in -lMesaGL" >&5
17205 $as_echo_n "checking for glXCreateContext in -lMesaGL... " >&6; }
17206 if test "${ac_cv_lib_MesaGL_glXCreateContext+set}" = set; then
17207   $as_echo_n "(cached) " >&6
17208 else
17209   ac_check_lib_save_LIBS=$LIBS
17210 LIBS="-lMesaGL -lMesaGLU $GL_LIBS -lX11 -lXext $VIDMODE_LIBS -lm $LIBS"
17211 cat >conftest.$ac_ext <<_ACEOF
17212 /* confdefs.h.  */
17213 _ACEOF
17214 cat confdefs.h >>conftest.$ac_ext
17215 cat >>conftest.$ac_ext <<_ACEOF
17216 /* end confdefs.h.  */
17217
17218 /* Override any GCC internal prototype to avoid an error.
17219    Use char because int might match the return type of a GCC
17220    builtin and then its argument prototype would still apply.  */
17221 #ifdef __cplusplus
17222 extern "C"
17223 #endif
17224 char glXCreateContext ();
17225 int
17226 main ()
17227 {
17228 return glXCreateContext ();
17229   ;
17230   return 0;
17231 }
17232 _ACEOF
17233 rm -rf conftest.$ac_objext conftest$ac_exeext
17234 if { (ac_try="$ac_link"
17235 case "(($ac_try" in
17236   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17237   *) ac_try_echo=$ac_try;;
17238 esac
17239 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
17240 $as_echo "$ac_try_echo") >&5
17241   (eval "$ac_link") 2>conftest.er1
17242   ac_status=$?
17243   grep -v '^ *+' conftest.er1 >conftest.err
17244   rm -rf conftest.er1
17245   cat conftest.err >&5
17246   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
17247   (exit $ac_status); } && {
17248          test -z "$ac_c_werror_flag" ||
17249          test ! -s conftest.err
17250        } && test -s conftest$ac_exeext && {
17251          test "$cross_compiling" = yes ||
17252          $as_test_x conftest$ac_exeext
17253        }; then
17254   ac_cv_lib_MesaGL_glXCreateContext=yes
17255 else
17256   $as_echo "$as_me: failed program was:" >&5
17257 sed 's/^/| /' conftest.$ac_ext >&5
17258
17259         ac_cv_lib_MesaGL_glXCreateContext=no
17260 fi
17261
17262 rm -rf conftest.dSYM
17263 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
17264       conftest$ac_exeext conftest.$ac_ext
17265 LIBS=$ac_check_lib_save_LIBS
17266 fi
17267 { $as_echo "$as_me:$LINENO: result: $ac_cv_lib_MesaGL_glXCreateContext" >&5
17268 $as_echo "$ac_cv_lib_MesaGL_glXCreateContext" >&6; }
17269 if test "x$ac_cv_lib_MesaGL_glXCreateContext" = x""yes; then
17270   gl_lib_1="MesaGL"
17271                       GL_LIBS="-lMesaGL -lMesaGLU $VIDMODE_LIBS $GL_LIBS"
17272 fi
17273
17274   CPPFLAGS="$ac_save_CPPFLAGS"
17275   LDFLAGS="$ac_save_LDFLAGS"
17276 #  LIBS="$ac_save_LIBS"
17277
17278     fi
17279
17280     if test "$gl_lib_1" = "" ; then
17281
17282   ac_save_CPPFLAGS="$CPPFLAGS"
17283   ac_save_LDFLAGS="$LDFLAGS"
17284 #  ac_save_LIBS="$LIBS"
17285
17286   if test \! -z "$includedir" ; then
17287     CPPFLAGS="$CPPFLAGS -I$includedir"
17288   fi
17289   # note: $X_CFLAGS includes $x_includes
17290   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
17291
17292   if test \! -z "$libdir" ; then
17293     LDFLAGS="$LDFLAGS -L$libdir"
17294   fi
17295   # note: $X_LIBS includes $x_libraries
17296   LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
17297
17298   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
17299   LDFLAGS=`eval eval eval eval eval eval eval eval eval echo $LDFLAGS`
17300   { $as_echo "$as_me:$LINENO: checking for glXCreateContext in -lGL" >&5
17301 $as_echo_n "checking for glXCreateContext in -lGL... " >&6; }
17302 if test "${ac_cv_lib_GL_glXCreateContext+set}" = set; then
17303   $as_echo_n "(cached) " >&6
17304 else
17305   ac_check_lib_save_LIBS=$LIBS
17306 LIBS="-lGL -lGLU $GL_LIBS -lX11 -lXext $VIDMODE_LIBS -lm $LIBS"
17307 cat >conftest.$ac_ext <<_ACEOF
17308 /* confdefs.h.  */
17309 _ACEOF
17310 cat confdefs.h >>conftest.$ac_ext
17311 cat >>conftest.$ac_ext <<_ACEOF
17312 /* end confdefs.h.  */
17313
17314 /* Override any GCC internal prototype to avoid an error.
17315    Use char because int might match the return type of a GCC
17316    builtin and then its argument prototype would still apply.  */
17317 #ifdef __cplusplus
17318 extern "C"
17319 #endif
17320 char glXCreateContext ();
17321 int
17322 main ()
17323 {
17324 return glXCreateContext ();
17325   ;
17326   return 0;
17327 }
17328 _ACEOF
17329 rm -rf conftest.$ac_objext conftest$ac_exeext
17330 if { (ac_try="$ac_link"
17331 case "(($ac_try" in
17332   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17333   *) ac_try_echo=$ac_try;;
17334 esac
17335 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
17336 $as_echo "$ac_try_echo") >&5
17337   (eval "$ac_link") 2>conftest.er1
17338   ac_status=$?
17339   grep -v '^ *+' conftest.er1 >conftest.err
17340   rm -rf conftest.er1
17341   cat conftest.err >&5
17342   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
17343   (exit $ac_status); } && {
17344          test -z "$ac_c_werror_flag" ||
17345          test ! -s conftest.err
17346        } && test -s conftest$ac_exeext && {
17347          test "$cross_compiling" = yes ||
17348          $as_test_x conftest$ac_exeext
17349        }; then
17350   ac_cv_lib_GL_glXCreateContext=yes
17351 else
17352   $as_echo "$as_me: failed program was:" >&5
17353 sed 's/^/| /' conftest.$ac_ext >&5
17354
17355         ac_cv_lib_GL_glXCreateContext=no
17356 fi
17357
17358 rm -rf conftest.dSYM
17359 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
17360       conftest$ac_exeext conftest.$ac_ext
17361 LIBS=$ac_check_lib_save_LIBS
17362 fi
17363 { $as_echo "$as_me:$LINENO: result: $ac_cv_lib_GL_glXCreateContext" >&5
17364 $as_echo "$ac_cv_lib_GL_glXCreateContext" >&6; }
17365 if test "x$ac_cv_lib_GL_glXCreateContext" = x""yes; then
17366   gl_lib_1="GL"
17367                       GL_LIBS="-lGL -lGLU $VIDMODE_LIBS $GL_LIBS"
17368 fi
17369
17370   CPPFLAGS="$ac_save_CPPFLAGS"
17371   LDFLAGS="$ac_save_LDFLAGS"
17372 #  LIBS="$ac_save_LIBS"
17373
17374     fi
17375
17376     if test "$gl_lib_1" = "" ; then
17377       # we have headers, but no libs -- bail.
17378       have_gl=no
17379       ac_have_mesa_gl=no
17380       gl_halfassed=yes
17381     else
17382       # linking works -- we can build the GL hacks.
17383       cat >>confdefs.h <<\_ACEOF
17384 #define HAVE_GL 1
17385 _ACEOF
17386
17387       if test "$ac_have_mesa_gl" = yes ; then
17388         cat >>confdefs.h <<\_ACEOF
17389 #define HAVE_MESA_GL 1
17390 _ACEOF
17391
17392       fi
17393     fi
17394   fi
17395
17396
17397   # Now that we know we have GL headers and libs, do some more GL testing.
17398   #
17399
17400   if test "$have_gl" = yes ; then
17401     # If it's MesaGL, we'd like to issue a warning if the version number
17402     # is less than or equal to 2.6, because that version had a security bug.
17403     #
17404     if test "$ac_have_mesa_gl" = yes; then
17405
17406       { $as_echo "$as_me:$LINENO: checking MesaGL version number" >&5
17407 $as_echo_n "checking MesaGL version number... " >&6; }
17408 if test "${ac_cv_mesagl_version_string+set}" = set; then
17409   $as_echo_n "(cached) " >&6
17410 else
17411   cat > conftest.$ac_ext <<EOF
17412 #line 17416 "configure"
17413 #include "confdefs.h"
17414 #include <GL/gl.h>
17415 #ifndef MESA_MAJOR_VERSION
17416 # include <GL/xmesa.h>
17417 # ifdef XMESA_MAJOR_VERSION
17418    /* Around Mesa 3.2, they took out the Mesa version number, so instead,
17419       we have to check the XMesa version number (the number of the X protocol
17420       support, which seems to be the same as the Mesa version number.)
17421     */
17422 #  define MESA_MAJOR_VERSION XMESA_MAJOR_VERSION
17423 #  define MESA_MINOR_VERSION XMESA_MINOR_VERSION
17424 # else
17425    /* Oh great.  Some time after 3.4, they took out the xmesa.h header file,
17426       so we have no way of telling what version of Mesa this is at all.
17427       So, we'll guess that the osmesa version (the "offscreen protocol")
17428       is less than or equal to the real mesa version number.  Except that
17429       if OSmesa is 3.3, assume at least Mesa 3.4, since OSmesa was 3.3 in
17430       Mesa 3.4.  And Mesa 3.3 had xmesa.h.  What a complete load of shit!
17431     */
17432 # include <GL/osmesa.h>
17433 #  define MESA_MAJOR_VERSION OSMESA_MAJOR_VERSION
17434 #  define MESA_MINOR_VERSION OSMESA_MINOR_VERSION or newer, probably?
17435 #  if OSMESA_MAJOR_VERSION == 3 && OSMESA_MINOR_VERSION == 3
17436 #   undef MESA_MINOR_VERSION
17437 #   define MESA_MINOR_VERSION 4 or newer, probably?
17438 #  endif
17439 # endif
17440 #endif
17441 configure: MESA_MAJOR_VERSION MESA_MINOR_VERSION
17442 EOF
17443
17444          ac_save_CPPFLAGS="$CPPFLAGS"
17445          if test \! -z "$includedir" ; then
17446            CPPFLAGS="$CPPFLAGS -I$includedir"
17447          fi
17448          CPPFLAGS="$CPPFLAGS $X_CFLAGS"
17449
17450          mglv=`(eval "$ac_cpp conftest.$ac_ext") 2>&5 | grep configure:`
17451
17452          # M4 sucks!!
17453
17454           mglv=`echo "$mglv" | sed -n \
17455              's/^configure: *\([0-9][0-9]*\)  *\([0-9].*\)$/\1.\2/p'`
17456
17457
17458          rm -rf conftest.$ac_ext
17459
17460          CPPFLAGS="$ac_save_CPPFLAGS"
17461
17462          if test "$mglv" = ""; then
17463            ac_mesagl_version=unknown
17464            ac_mesagl_version_string=unknown
17465          else
17466            ac_mesagl_version_string="$mglv"
17467            # M4 sucks!!
17468
17469            maj=`echo "$mglv" | sed -n 's/^\([0-9][0-9]*\)\..*$/\1/p'`
17470            min=`echo "$mglv" | sed -n 's/^.*\.\([0-9][0-9]*\).*$/\1/p'`
17471
17472            ac_mesagl_version=`echo "$maj * 1000 + $min" | bc`
17473            if test -z "$ac_mesagl_version"; then
17474              ac_mesagl_version=unknown
17475              ac_mesagl_version_string=unknown
17476            fi
17477          fi
17478          ac_cv_mesagl_version=$ac_mesagl_version
17479          ac_cv_mesagl_version_string=$ac_mesagl_version_string
17480
17481 fi
17482 { $as_echo "$as_me:$LINENO: result: $ac_cv_mesagl_version_string" >&5
17483 $as_echo "$ac_cv_mesagl_version_string" >&6; }
17484       ac_mesagl_version=$ac_cv_mesagl_version
17485       ac_mesagl_version_string=$ac_cv_mesagl_version_string
17486     fi
17487
17488
17489     # Check for OpenGL 1.1 features.
17490     #
17491
17492   ac_save_CPPFLAGS="$CPPFLAGS"
17493   ac_save_LDFLAGS="$LDFLAGS"
17494 #  ac_save_LIBS="$LIBS"
17495
17496   if test \! -z "$includedir" ; then
17497     CPPFLAGS="$CPPFLAGS -I$includedir"
17498   fi
17499   # note: $X_CFLAGS includes $x_includes
17500   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
17501
17502   if test \! -z "$libdir" ; then
17503     LDFLAGS="$LDFLAGS -L$libdir"
17504   fi
17505   # note: $X_LIBS includes $x_libraries
17506   LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
17507
17508   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
17509   LDFLAGS=`eval eval eval eval eval eval eval eval eval echo $LDFLAGS`
17510   as_ac_Lib=`$as_echo "ac_cv_lib_$gl_lib_1''_glBindTexture" | $as_tr_sh`
17511 { $as_echo "$as_me:$LINENO: checking for glBindTexture in -l$gl_lib_1" >&5
17512 $as_echo_n "checking for glBindTexture in -l$gl_lib_1... " >&6; }
17513 if { as_var=$as_ac_Lib; eval "test \"\${$as_var+set}\" = set"; }; then
17514   $as_echo_n "(cached) " >&6
17515 else
17516   ac_check_lib_save_LIBS=$LIBS
17517 LIBS="-l$gl_lib_1 $GL_LIBS -lX11 -lXext -lm $LIBS"
17518 cat >conftest.$ac_ext <<_ACEOF
17519 /* confdefs.h.  */
17520 _ACEOF
17521 cat confdefs.h >>conftest.$ac_ext
17522 cat >>conftest.$ac_ext <<_ACEOF
17523 /* end confdefs.h.  */
17524
17525 /* Override any GCC internal prototype to avoid an error.
17526    Use char because int might match the return type of a GCC
17527    builtin and then its argument prototype would still apply.  */
17528 #ifdef __cplusplus
17529 extern "C"
17530 #endif
17531 char glBindTexture ();
17532 int
17533 main ()
17534 {
17535 return glBindTexture ();
17536   ;
17537   return 0;
17538 }
17539 _ACEOF
17540 rm -rf conftest.$ac_objext conftest$ac_exeext
17541 if { (ac_try="$ac_link"
17542 case "(($ac_try" in
17543   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17544   *) ac_try_echo=$ac_try;;
17545 esac
17546 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
17547 $as_echo "$ac_try_echo") >&5
17548   (eval "$ac_link") 2>conftest.er1
17549   ac_status=$?
17550   grep -v '^ *+' conftest.er1 >conftest.err
17551   rm -rf conftest.er1
17552   cat conftest.err >&5
17553   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
17554   (exit $ac_status); } && {
17555          test -z "$ac_c_werror_flag" ||
17556          test ! -s conftest.err
17557        } && test -s conftest$ac_exeext && {
17558          test "$cross_compiling" = yes ||
17559          $as_test_x conftest$ac_exeext
17560        }; then
17561   eval "$as_ac_Lib=yes"
17562 else
17563   $as_echo "$as_me: failed program was:" >&5
17564 sed 's/^/| /' conftest.$ac_ext >&5
17565
17566         eval "$as_ac_Lib=no"
17567 fi
17568
17569 rm -rf conftest.dSYM
17570 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
17571       conftest$ac_exeext conftest.$ac_ext
17572 LIBS=$ac_check_lib_save_LIBS
17573 fi
17574 ac_res=`eval 'as_val=${'$as_ac_Lib'}
17575                  $as_echo "$as_val"'`
17576                { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
17577 $as_echo "$ac_res" >&6; }
17578 as_val=`eval 'as_val=${'$as_ac_Lib'}
17579                  $as_echo "$as_val"'`
17580    if test "x$as_val" = x""yes; then
17581   cat >>confdefs.h <<\_ACEOF
17582 #define HAVE_GLBINDTEXTURE 1
17583 _ACEOF
17584
17585 else
17586   true
17587 fi
17588
17589   CPPFLAGS="$ac_save_CPPFLAGS"
17590   LDFLAGS="$ac_save_LDFLAGS"
17591 #  LIBS="$ac_save_LIBS"
17592
17593   fi
17594
17595 elif test "$with_gl" != no; then
17596   echo "error: must be yes or no: --with-gl=$with_gl"
17597   exit 1
17598 fi
17599
17600
17601 ###############################################################################
17602 #
17603 #       Check for -lgle.
17604 #
17605 ###############################################################################
17606
17607 have_gle=no
17608 with_gle_req=unspecified
17609 gle_halfassed=no
17610
17611 # Check whether --with-gle was given.
17612 if test "${with_gle+set}" = set; then
17613   withval=$with_gle; with_gle="$withval"; with_gle_req="$withval"
17614 else
17615   with_gle=yes
17616 fi
17617
17618
17619
17620    case "$with_gle" in
17621     yes) ;;
17622     no)  ;;
17623
17624     /*)
17625      { $as_echo "$as_me:$LINENO: checking for GLE headers" >&5
17626 $as_echo_n "checking for GLE headers... " >&6; }
17627      d=$with_gle/include
17628      if test -d $d; then
17629        X_CFLAGS="-I$d $X_CFLAGS"
17630        { $as_echo "$as_me:$LINENO: result: $d" >&5
17631 $as_echo "$d" >&6; }
17632      else
17633        { $as_echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
17634 $as_echo "not found ($d: no such directory)" >&6; }
17635      fi
17636
17637      { $as_echo "$as_me:$LINENO: checking for GLE libs" >&5
17638 $as_echo_n "checking for GLE libs... " >&6; }
17639      d=$with_gle/lib
17640      if test -d $d; then
17641        X_LIBS="-L$d $X_LIBS"
17642        { $as_echo "$as_me:$LINENO: result: $d" >&5
17643 $as_echo "$d" >&6; }
17644      else
17645        { $as_echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
17646 $as_echo "not found ($d: no such directory)" >&6; }
17647      fi
17648
17649      # replace the directory string with "yes".
17650      with_gle_req="yes"
17651      with_gle=$with_gle_req
17652      ;;
17653
17654     *)
17655      echo ""
17656      echo "error: argument to --with-gle must be \"yes\", \"no\", or a directory."
17657      echo "       If it is a directory, then \`DIR/include' will be added to"
17658      echo "       the -I list, and \`DIR/lib' will be added to the -L list."
17659      exit 1
17660      ;;
17661    esac
17662
17663
17664 GLE_LIBS=""
17665
17666 if test "$have_gl" = no ; then
17667  true
17668 elif test "$with_gle" = yes; then
17669
17670
17671   ac_save_CPPFLAGS="$CPPFLAGS"
17672   if test \! -z "$includedir" ; then
17673     CPPFLAGS="$CPPFLAGS -I$includedir"
17674   fi
17675   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
17676   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
17677   { $as_echo "$as_me:$LINENO: checking for GL/gle.h" >&5
17678 $as_echo_n "checking for GL/gle.h... " >&6; }
17679 if test "${ac_cv_header_GL_gle_h+set}" = set; then
17680   $as_echo_n "(cached) " >&6
17681 else
17682   cat >conftest.$ac_ext <<_ACEOF
17683 /* confdefs.h.  */
17684 _ACEOF
17685 cat confdefs.h >>conftest.$ac_ext
17686 cat >>conftest.$ac_ext <<_ACEOF
17687 /* end confdefs.h.  */
17688 #include <GL/gl.h>
17689
17690 #include <GL/gle.h>
17691 _ACEOF
17692 rm -rf conftest.$ac_objext
17693 if { (ac_try="$ac_compile"
17694 case "(($ac_try" in
17695   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17696   *) ac_try_echo=$ac_try;;
17697 esac
17698 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
17699 $as_echo "$ac_try_echo") >&5
17700   (eval "$ac_compile") 2>conftest.er1
17701   ac_status=$?
17702   grep -v '^ *+' conftest.er1 >conftest.err
17703   rm -rf conftest.er1
17704   cat conftest.err >&5
17705   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
17706   (exit $ac_status); } && {
17707          test -z "$ac_c_werror_flag" ||
17708          test ! -s conftest.err
17709        } && test -s conftest.$ac_objext; then
17710   ac_cv_header_GL_gle_h=yes
17711 else
17712   $as_echo "$as_me: failed program was:" >&5
17713 sed 's/^/| /' conftest.$ac_ext >&5
17714
17715         ac_cv_header_GL_gle_h=no
17716 fi
17717
17718 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
17719 fi
17720 { $as_echo "$as_me:$LINENO: result: $ac_cv_header_GL_gle_h" >&5
17721 $as_echo "$ac_cv_header_GL_gle_h" >&6; }
17722 if test "x$ac_cv_header_GL_gle_h" = x""yes; then
17723   have_gle3=yes
17724 else
17725   have_gle3=no
17726 fi
17727
17728
17729   CPPFLAGS="$ac_save_CPPFLAGS"
17730   if test "$have_gle3" = yes ; then
17731     have_gle=yes;
17732   else
17733
17734   ac_save_CPPFLAGS="$CPPFLAGS"
17735   if test \! -z "$includedir" ; then
17736     CPPFLAGS="$CPPFLAGS -I$includedir"
17737   fi
17738   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
17739   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
17740   { $as_echo "$as_me:$LINENO: checking for GL/gutil.h" >&5
17741 $as_echo_n "checking for GL/gutil.h... " >&6; }
17742 if test "${ac_cv_header_GL_gutil_h+set}" = set; then
17743   $as_echo_n "(cached) " >&6
17744 else
17745   cat >conftest.$ac_ext <<_ACEOF
17746 /* confdefs.h.  */
17747 _ACEOF
17748 cat confdefs.h >>conftest.$ac_ext
17749 cat >>conftest.$ac_ext <<_ACEOF
17750 /* end confdefs.h.  */
17751 #include <GL/gl.h>
17752
17753 #include <GL/gutil.h>
17754 _ACEOF
17755 rm -rf conftest.$ac_objext
17756 if { (ac_try="$ac_compile"
17757 case "(($ac_try" in
17758   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17759   *) ac_try_echo=$ac_try;;
17760 esac
17761 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
17762 $as_echo "$ac_try_echo") >&5
17763   (eval "$ac_compile") 2>conftest.er1
17764   ac_status=$?
17765   grep -v '^ *+' conftest.er1 >conftest.err
17766   rm -rf conftest.er1
17767   cat conftest.err >&5
17768   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
17769   (exit $ac_status); } && {
17770          test -z "$ac_c_werror_flag" ||
17771          test ! -s conftest.err
17772        } && test -s conftest.$ac_objext; then
17773   ac_cv_header_GL_gutil_h=yes
17774 else
17775   $as_echo "$as_me: failed program was:" >&5
17776 sed 's/^/| /' conftest.$ac_ext >&5
17777
17778         ac_cv_header_GL_gutil_h=no
17779 fi
17780
17781 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
17782 fi
17783 { $as_echo "$as_me:$LINENO: result: $ac_cv_header_GL_gutil_h" >&5
17784 $as_echo "$ac_cv_header_GL_gutil_h" >&6; }
17785 if test "x$ac_cv_header_GL_gutil_h" = x""yes; then
17786   have_gle=yes
17787 else
17788   have_gle=no
17789 fi
17790
17791
17792   CPPFLAGS="$ac_save_CPPFLAGS"
17793     if test "$have_gle" = yes ; then
17794
17795   ac_save_CPPFLAGS="$CPPFLAGS"
17796   if test \! -z "$includedir" ; then
17797     CPPFLAGS="$CPPFLAGS -I$includedir"
17798   fi
17799   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
17800   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
17801   { $as_echo "$as_me:$LINENO: checking for GL/tube.h" >&5
17802 $as_echo_n "checking for GL/tube.h... " >&6; }
17803 if test "${ac_cv_header_GL_tube_h+set}" = set; then
17804   $as_echo_n "(cached) " >&6
17805 else
17806   cat >conftest.$ac_ext <<_ACEOF
17807 /* confdefs.h.  */
17808 _ACEOF
17809 cat confdefs.h >>conftest.$ac_ext
17810 cat >>conftest.$ac_ext <<_ACEOF
17811 /* end confdefs.h.  */
17812 #include <GL/gl.h>
17813
17814 #include <GL/tube.h>
17815 _ACEOF
17816 rm -rf conftest.$ac_objext
17817 if { (ac_try="$ac_compile"
17818 case "(($ac_try" in
17819   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17820   *) ac_try_echo=$ac_try;;
17821 esac
17822 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
17823 $as_echo "$ac_try_echo") >&5
17824   (eval "$ac_compile") 2>conftest.er1
17825   ac_status=$?
17826   grep -v '^ *+' conftest.er1 >conftest.err
17827   rm -rf conftest.er1
17828   cat conftest.err >&5
17829   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
17830   (exit $ac_status); } && {
17831          test -z "$ac_c_werror_flag" ||
17832          test ! -s conftest.err
17833        } && test -s conftest.$ac_objext; then
17834   ac_cv_header_GL_tube_h=yes
17835 else
17836   $as_echo "$as_me: failed program was:" >&5
17837 sed 's/^/| /' conftest.$ac_ext >&5
17838
17839         ac_cv_header_GL_tube_h=no
17840 fi
17841
17842 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
17843 fi
17844 { $as_echo "$as_me:$LINENO: result: $ac_cv_header_GL_tube_h" >&5
17845 $as_echo "$ac_cv_header_GL_tube_h" >&6; }
17846 if test "x$ac_cv_header_GL_tube_h" = x""yes; then
17847   have_gle=yes
17848 else
17849   have_gle=no
17850 fi
17851
17852
17853   CPPFLAGS="$ac_save_CPPFLAGS"
17854     fi
17855   fi
17856
17857   if test "$have_gle" = yes ; then
17858     have_gle=no
17859     gle_halfassed=yes
17860
17861   ac_save_CPPFLAGS="$CPPFLAGS"
17862   ac_save_LDFLAGS="$LDFLAGS"
17863 #  ac_save_LIBS="$LIBS"
17864
17865   if test \! -z "$includedir" ; then
17866     CPPFLAGS="$CPPFLAGS -I$includedir"
17867   fi
17868   # note: $X_CFLAGS includes $x_includes
17869   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
17870
17871   if test \! -z "$libdir" ; then
17872     LDFLAGS="$LDFLAGS -L$libdir"
17873   fi
17874   # note: $X_LIBS includes $x_libraries
17875   LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
17876
17877   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
17878   LDFLAGS=`eval eval eval eval eval eval eval eval eval echo $LDFLAGS`
17879   { $as_echo "$as_me:$LINENO: checking for gleCreateGC in -lgle" >&5
17880 $as_echo_n "checking for gleCreateGC in -lgle... " >&6; }
17881 if test "${ac_cv_lib_gle_gleCreateGC+set}" = set; then
17882   $as_echo_n "(cached) " >&6
17883 else
17884   ac_check_lib_save_LIBS=$LIBS
17885 LIBS="-lgle $GL_LIBS -lX11 -lXext -lm $LIBS"
17886 cat >conftest.$ac_ext <<_ACEOF
17887 /* confdefs.h.  */
17888 _ACEOF
17889 cat confdefs.h >>conftest.$ac_ext
17890 cat >>conftest.$ac_ext <<_ACEOF
17891 /* end confdefs.h.  */
17892
17893 /* Override any GCC internal prototype to avoid an error.
17894    Use char because int might match the return type of a GCC
17895    builtin and then its argument prototype would still apply.  */
17896 #ifdef __cplusplus
17897 extern "C"
17898 #endif
17899 char gleCreateGC ();
17900 int
17901 main ()
17902 {
17903 return gleCreateGC ();
17904   ;
17905   return 0;
17906 }
17907 _ACEOF
17908 rm -rf conftest.$ac_objext conftest$ac_exeext
17909 if { (ac_try="$ac_link"
17910 case "(($ac_try" in
17911   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17912   *) ac_try_echo=$ac_try;;
17913 esac
17914 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
17915 $as_echo "$ac_try_echo") >&5
17916   (eval "$ac_link") 2>conftest.er1
17917   ac_status=$?
17918   grep -v '^ *+' conftest.er1 >conftest.err
17919   rm -rf conftest.er1
17920   cat conftest.err >&5
17921   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
17922   (exit $ac_status); } && {
17923          test -z "$ac_c_werror_flag" ||
17924          test ! -s conftest.err
17925        } && test -s conftest$ac_exeext && {
17926          test "$cross_compiling" = yes ||
17927          $as_test_x conftest$ac_exeext
17928        }; then
17929   ac_cv_lib_gle_gleCreateGC=yes
17930 else
17931   $as_echo "$as_me: failed program was:" >&5
17932 sed 's/^/| /' conftest.$ac_ext >&5
17933
17934         ac_cv_lib_gle_gleCreateGC=no
17935 fi
17936
17937 rm -rf conftest.dSYM
17938 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
17939       conftest$ac_exeext conftest.$ac_ext
17940 LIBS=$ac_check_lib_save_LIBS
17941 fi
17942 { $as_echo "$as_me:$LINENO: result: $ac_cv_lib_gle_gleCreateGC" >&5
17943 $as_echo "$ac_cv_lib_gle_gleCreateGC" >&6; }
17944 if test "x$ac_cv_lib_gle_gleCreateGC" = x""yes; then
17945   have_gle=yes; gle_halfassed=no; GLE_LIBS="-lgle"
17946 fi
17947
17948   CPPFLAGS="$ac_save_CPPFLAGS"
17949   LDFLAGS="$ac_save_LDFLAGS"
17950 #  LIBS="$ac_save_LIBS"
17951
17952   fi
17953   if test "$have_gle" = yes ; then
17954     have_gle=no
17955     gle_halfassed=yes
17956
17957     # sometimes the libmatrix stuff is included in libgle.  look there first.
17958 #
17959 # I don't get it.  For some reason, this test passes on SGI, as if
17960 # uview_direction_d() was in libgle -- but it's not, it's in libmatrix.
17961 # Yet the link is succeeding.  Why???
17962 #
17963 #    AC_CHECK_X_LIB(gle, uview_direction_d,
17964 #                   [have_gle=yes; gle_halfassed=no],
17965 #                   [], $GL_LIBS -lX11 -lXext -lm)
17966
17967     # As of GLE 3 this is in libgle, and has changed name to uview_direction!
17968     # *sigh*
17969     if test "$have_gle3" = yes ; then
17970
17971   ac_save_CPPFLAGS="$CPPFLAGS"
17972   ac_save_LDFLAGS="$LDFLAGS"
17973 #  ac_save_LIBS="$LIBS"
17974
17975   if test \! -z "$includedir" ; then
17976     CPPFLAGS="$CPPFLAGS -I$includedir"
17977   fi
17978   # note: $X_CFLAGS includes $x_includes
17979   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
17980
17981   if test \! -z "$libdir" ; then
17982     LDFLAGS="$LDFLAGS -L$libdir"
17983   fi
17984   # note: $X_LIBS includes $x_libraries
17985   LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
17986
17987   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
17988   LDFLAGS=`eval eval eval eval eval eval eval eval eval echo $LDFLAGS`
17989   { $as_echo "$as_me:$LINENO: checking for uview_direction in -lgle" >&5
17990 $as_echo_n "checking for uview_direction in -lgle... " >&6; }
17991 if test "${ac_cv_lib_gle_uview_direction+set}" = set; then
17992   $as_echo_n "(cached) " >&6
17993 else
17994   ac_check_lib_save_LIBS=$LIBS
17995 LIBS="-lgle $GL_LIBS -lX11 -lXext -lm $LIBS"
17996 cat >conftest.$ac_ext <<_ACEOF
17997 /* confdefs.h.  */
17998 _ACEOF
17999 cat confdefs.h >>conftest.$ac_ext
18000 cat >>conftest.$ac_ext <<_ACEOF
18001 /* end confdefs.h.  */
18002
18003 /* Override any GCC internal prototype to avoid an error.
18004    Use char because int might match the return type of a GCC
18005    builtin and then its argument prototype would still apply.  */
18006 #ifdef __cplusplus
18007 extern "C"
18008 #endif
18009 char uview_direction ();
18010 int
18011 main ()
18012 {
18013 return uview_direction ();
18014   ;
18015   return 0;
18016 }
18017 _ACEOF
18018 rm -rf conftest.$ac_objext conftest$ac_exeext
18019 if { (ac_try="$ac_link"
18020 case "(($ac_try" in
18021   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18022   *) ac_try_echo=$ac_try;;
18023 esac
18024 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
18025 $as_echo "$ac_try_echo") >&5
18026   (eval "$ac_link") 2>conftest.er1
18027   ac_status=$?
18028   grep -v '^ *+' conftest.er1 >conftest.err
18029   rm -rf conftest.er1
18030   cat conftest.err >&5
18031   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
18032   (exit $ac_status); } && {
18033          test -z "$ac_c_werror_flag" ||
18034          test ! -s conftest.err
18035        } && test -s conftest$ac_exeext && {
18036          test "$cross_compiling" = yes ||
18037          $as_test_x conftest$ac_exeext
18038        }; then
18039   ac_cv_lib_gle_uview_direction=yes
18040 else
18041   $as_echo "$as_me: failed program was:" >&5
18042 sed 's/^/| /' conftest.$ac_ext >&5
18043
18044         ac_cv_lib_gle_uview_direction=no
18045 fi
18046
18047 rm -rf conftest.dSYM
18048 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
18049       conftest$ac_exeext conftest.$ac_ext
18050 LIBS=$ac_check_lib_save_LIBS
18051 fi
18052 { $as_echo "$as_me:$LINENO: result: $ac_cv_lib_gle_uview_direction" >&5
18053 $as_echo "$ac_cv_lib_gle_uview_direction" >&6; }
18054 if test "x$ac_cv_lib_gle_uview_direction" = x""yes; then
18055   have_gle=yes; gle_halfassed=no
18056 fi
18057
18058   CPPFLAGS="$ac_save_CPPFLAGS"
18059   LDFLAGS="$ac_save_LDFLAGS"
18060 #  LIBS="$ac_save_LIBS"
18061
18062     fi
18063     # if it wasn't in libgle, then look in libmatrix.
18064     if test "$have_gle" = no ; then
18065
18066   ac_save_CPPFLAGS="$CPPFLAGS"
18067   ac_save_LDFLAGS="$LDFLAGS"
18068 #  ac_save_LIBS="$LIBS"
18069
18070   if test \! -z "$includedir" ; then
18071     CPPFLAGS="$CPPFLAGS -I$includedir"
18072   fi
18073   # note: $X_CFLAGS includes $x_includes
18074   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
18075
18076   if test \! -z "$libdir" ; then
18077     LDFLAGS="$LDFLAGS -L$libdir"
18078   fi
18079   # note: $X_LIBS includes $x_libraries
18080   LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
18081
18082   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
18083   LDFLAGS=`eval eval eval eval eval eval eval eval eval echo $LDFLAGS`
18084   { $as_echo "$as_me:$LINENO: checking for uview_direction_d in -lmatrix" >&5
18085 $as_echo_n "checking for uview_direction_d in -lmatrix... " >&6; }
18086 if test "${ac_cv_lib_matrix_uview_direction_d+set}" = set; then
18087   $as_echo_n "(cached) " >&6
18088 else
18089   ac_check_lib_save_LIBS=$LIBS
18090 LIBS="-lmatrix $GL_LIBS -lX11 -lXext -lm $LIBS"
18091 cat >conftest.$ac_ext <<_ACEOF
18092 /* confdefs.h.  */
18093 _ACEOF
18094 cat confdefs.h >>conftest.$ac_ext
18095 cat >>conftest.$ac_ext <<_ACEOF
18096 /* end confdefs.h.  */
18097
18098 /* Override any GCC internal prototype to avoid an error.
18099    Use char because int might match the return type of a GCC
18100    builtin and then its argument prototype would still apply.  */
18101 #ifdef __cplusplus
18102 extern "C"
18103 #endif
18104 char uview_direction_d ();
18105 int
18106 main ()
18107 {
18108 return uview_direction_d ();
18109   ;
18110   return 0;
18111 }
18112 _ACEOF
18113 rm -rf conftest.$ac_objext conftest$ac_exeext
18114 if { (ac_try="$ac_link"
18115 case "(($ac_try" in
18116   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18117   *) ac_try_echo=$ac_try;;
18118 esac
18119 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
18120 $as_echo "$ac_try_echo") >&5
18121   (eval "$ac_link") 2>conftest.er1
18122   ac_status=$?
18123   grep -v '^ *+' conftest.er1 >conftest.err
18124   rm -rf conftest.er1
18125   cat conftest.err >&5
18126   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
18127   (exit $ac_status); } && {
18128          test -z "$ac_c_werror_flag" ||
18129          test ! -s conftest.err
18130        } && test -s conftest$ac_exeext && {
18131          test "$cross_compiling" = yes ||
18132          $as_test_x conftest$ac_exeext
18133        }; then
18134   ac_cv_lib_matrix_uview_direction_d=yes
18135 else
18136   $as_echo "$as_me: failed program was:" >&5
18137 sed 's/^/| /' conftest.$ac_ext >&5
18138
18139         ac_cv_lib_matrix_uview_direction_d=no
18140 fi
18141
18142 rm -rf conftest.dSYM
18143 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
18144       conftest$ac_exeext conftest.$ac_ext
18145 LIBS=$ac_check_lib_save_LIBS
18146 fi
18147 { $as_echo "$as_me:$LINENO: result: $ac_cv_lib_matrix_uview_direction_d" >&5
18148 $as_echo "$ac_cv_lib_matrix_uview_direction_d" >&6; }
18149 if test "x$ac_cv_lib_matrix_uview_direction_d" = x""yes; then
18150   have_gle=yes; gle_halfassed=no;
18151                       GLE_LIBS="$GLE_LIBS -lmatrix"
18152 fi
18153
18154   CPPFLAGS="$ac_save_CPPFLAGS"
18155   LDFLAGS="$ac_save_LDFLAGS"
18156 #  LIBS="$ac_save_LIBS"
18157
18158     fi
18159   fi
18160
18161   if test "$have_gle" = yes ; then
18162     cat >>confdefs.h <<\_ACEOF
18163 #define HAVE_GLE 1
18164 _ACEOF
18165
18166     if test "$have_gle3" = yes ; then
18167       cat >>confdefs.h <<\_ACEOF
18168 #define HAVE_GLE3 1
18169 _ACEOF
18170
18171     fi
18172   fi
18173
18174 elif test "$with_gle" != no; then
18175   echo "error: must be yes or no: --with-gle=$with_gle"
18176   exit 1
18177
18178 fi
18179
18180
18181 ###############################################################################
18182 #
18183 #       Handle --with-gles
18184 #
18185 ###############################################################################
18186
18187 with_gles_req=unspecified
18188
18189 # Check whether --with-gles was given.
18190 if test "${with_gles+set}" = set; then
18191   withval=$with_gles; with_gles="$withval"; with_gles_req="$withval"
18192 else
18193   with_gles=no
18194 fi
18195
18196
18197
18198    case "$with_gles" in
18199     yes) ;;
18200     no)  ;;
18201
18202     /*)
18203      { $as_echo "$as_me:$LINENO: checking for JWZGLES headers" >&5
18204 $as_echo_n "checking for JWZGLES headers... " >&6; }
18205      d=$with_gles/include
18206      if test -d $d; then
18207        X_CFLAGS="-I$d $X_CFLAGS"
18208        { $as_echo "$as_me:$LINENO: result: $d" >&5
18209 $as_echo "$d" >&6; }
18210      else
18211        { $as_echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
18212 $as_echo "not found ($d: no such directory)" >&6; }
18213      fi
18214
18215      { $as_echo "$as_me:$LINENO: checking for JWZGLES libs" >&5
18216 $as_echo_n "checking for JWZGLES libs... " >&6; }
18217      d=$with_gles/lib
18218      if test -d $d; then
18219        X_LIBS="-L$d $X_LIBS"
18220        { $as_echo "$as_me:$LINENO: result: $d" >&5
18221 $as_echo "$d" >&6; }
18222      else
18223        { $as_echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
18224 $as_echo "not found ($d: no such directory)" >&6; }
18225      fi
18226
18227      # replace the directory string with "yes".
18228      with_gles_req="yes"
18229      with_gles=$with_gles_req
18230      ;;
18231
18232     *)
18233      echo ""
18234      echo "error: argument to --with-gles must be \"yes\", \"no\", or a directory."
18235      echo "       If it is a directory, then \`DIR/include' will be added to"
18236      echo "       the -I list, and \`DIR/lib' will be added to the -L list."
18237      exit 1
18238      ;;
18239    esac
18240
18241
18242 if test "$with_gles" = yes; then
18243   have_gles=yes
18244   cat >>confdefs.h <<\_ACEOF
18245 #define HAVE_JWZGLES 1
18246 _ACEOF
18247
18248   JWZGLES_OBJS="jwzgles.o"
18249   { $as_echo "$as_me:$LINENO: result: using OpenGL ES compatiblity shim" >&5
18250 $as_echo "using OpenGL ES compatiblity shim" >&6; }
18251 elif test "$with_gles" != no; then
18252   echo "error: must be yes or no: --with-gles=$with_xpm"
18253   exit 1
18254 fi
18255
18256 # May want to phase out glBitmap even in a non-GLES world.
18257 #
18258 if test "$have_gles" = yes; then
18259   GLFPS_OBJS="fps-gl.o glxfonts.o texfont.o"
18260   GLFONT_OBJS=""
18261 else
18262   cat >>confdefs.h <<\_ACEOF
18263 #define HAVE_GLBITMAP 1
18264 _ACEOF
18265
18266   GLFPS_OBJS="fps-gl.o glxfonts.o"
18267   GLFONT_OBJS="texfont.o"
18268 fi
18269
18270
18271 ###############################################################################
18272 #
18273 #       Check for -lgdk_pixbuf.
18274 #       These tests are for gdk_pixbuf usage of the hacks,
18275 #       not xscreensaver-demo (thus we have to test again to get
18276 #       the libraries right: don't want to pull in all of GTK
18277 #       for the hacks.)
18278 #
18279 ###############################################################################
18280
18281 have_gdk_pixbuf=no
18282 with_gdk_pixbuf_req=unspecified
18283
18284 # Check whether --with-pixbuf was given.
18285 if test "${with_pixbuf+set}" = set; then
18286   withval=$with_pixbuf; with_gdk_pixbuf="$withval"; with_gdk_pixbuf_req="$withval"
18287 else
18288   with_gdk_pixbuf=yes
18289 fi
18290
18291
18292 # if --with-pixbuf=/directory/ was specified, remember that directory so that
18293 # we can also look for the `gdk-pixbuf-config' program in that directory.
18294 case "$with_gdk_pixbuf" in
18295   /*)
18296     gdk_pixbuf_dir="$with_gdk_pixbuf"
18297     ;;
18298   *)
18299     gdk_pixbuf_dir=""
18300     ;;
18301 esac
18302
18303
18304    case "$with_gdk_pixbuf" in
18305     yes) ;;
18306     no)  ;;
18307
18308     /*)
18309      { $as_echo "$as_me:$LINENO: checking for GDK_PIXBUF headers" >&5
18310 $as_echo_n "checking for GDK_PIXBUF headers... " >&6; }
18311      d=$with_gdk_pixbuf/include
18312      if test -d $d; then
18313        X_CFLAGS="-I$d $X_CFLAGS"
18314        { $as_echo "$as_me:$LINENO: result: $d" >&5
18315 $as_echo "$d" >&6; }
18316      else
18317        { $as_echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
18318 $as_echo "not found ($d: no such directory)" >&6; }
18319      fi
18320
18321      { $as_echo "$as_me:$LINENO: checking for GDK_PIXBUF libs" >&5
18322 $as_echo_n "checking for GDK_PIXBUF libs... " >&6; }
18323      d=$with_gdk_pixbuf/lib
18324      if test -d $d; then
18325        X_LIBS="-L$d $X_LIBS"
18326        { $as_echo "$as_me:$LINENO: result: $d" >&5
18327 $as_echo "$d" >&6; }
18328      else
18329        { $as_echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
18330 $as_echo "not found ($d: no such directory)" >&6; }
18331      fi
18332
18333      # replace the directory string with "yes".
18334      with_gdk_pixbuf_req="yes"
18335      with_gdk_pixbuf=$with_gdk_pixbuf_req
18336      ;;
18337
18338     *)
18339      echo ""
18340      echo "error: argument to --with-pixbuf must be \"yes\", \"no\", or a directory."
18341      echo "       If it is a directory, then \`DIR/include' will be added to"
18342      echo "       the -I list, and \`DIR/lib' will be added to the -L list."
18343      exit 1
18344      ;;
18345    esac
18346
18347
18348 if test "$with_gdk_pixbuf" != yes -a "$with_gdk_pixbuf" != no ; then
18349   echo "error: must be yes or no: --with-pixbuf=$with_gdk_pixbuf"
18350   exit 1
18351 fi
18352
18353 if test "$with_gdk_pixbuf" = yes; then
18354   have_gdk_pixbuf=no
18355
18356   pkgs=''
18357   ok="yes"
18358
18359   pkg_check_version gdk-pixbuf-2.0      2.0.0
18360   pkg_check_version gdk-pixbuf-xlib-2.0 2.0.0
18361   have_gdk_pixbuf="$ok"
18362
18363   if test "$have_gdk_pixbuf" = yes; then
18364     { $as_echo "$as_me:$LINENO: checking for gdk-pixbuf includes" >&5
18365 $as_echo_n "checking for gdk-pixbuf includes... " >&6; }
18366 if test "${ac_cv_gdk_pixbuf_config_cflags+set}" = set; then
18367   $as_echo_n "(cached) " >&6
18368 else
18369   ac_cv_gdk_pixbuf_config_cflags=`$pkg_config --cflags $pkgs`
18370 fi
18371 { $as_echo "$as_me:$LINENO: result: $ac_cv_gdk_pixbuf_config_cflags" >&5
18372 $as_echo "$ac_cv_gdk_pixbuf_config_cflags" >&6; }
18373     { $as_echo "$as_me:$LINENO: checking for gdk-pixbuf libs" >&5
18374 $as_echo_n "checking for gdk-pixbuf libs... " >&6; }
18375 if test "${ac_cv_gdk_pixbuf_config_libs+set}" = set; then
18376   $as_echo_n "(cached) " >&6
18377 else
18378   ac_cv_gdk_pixbuf_config_libs=`$pkg_config --libs $pkgs`
18379 fi
18380 { $as_echo "$as_me:$LINENO: result: $ac_cv_gdk_pixbuf_config_libs" >&5
18381 $as_echo "$ac_cv_gdk_pixbuf_config_libs" >&6; }
18382   fi
18383
18384   ac_gdk_pixbuf_config_cflags=$ac_cv_gdk_pixbuf_config_cflags
18385   ac_gdk_pixbuf_config_libs=$ac_cv_gdk_pixbuf_config_libs
18386
18387
18388   if test "$have_gdk_pixbuf" = yes; then
18389     #
18390     # we appear to have pixbuf; check for headers/libs to be sure.
18391     #
18392     ac_save_gdk_pixbuf_CPPFLAGS="$CPPFLAGS"
18393     CPPFLAGS="$CPPFLAGS $ac_gdk_pixbuf_config_cflags"
18394
18395     have_gdk_pixbuf=no
18396
18397     # check for header A...
18398
18399   ac_save_CPPFLAGS="$CPPFLAGS"
18400   if test \! -z "$includedir" ; then
18401     CPPFLAGS="$CPPFLAGS -I$includedir"
18402   fi
18403   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
18404   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
18405   if test "${ac_cv_header_gdk_pixbuf_gdk_pixbuf_h+set}" = set; then
18406   { $as_echo "$as_me:$LINENO: checking for gdk-pixbuf/gdk-pixbuf.h" >&5
18407 $as_echo_n "checking for gdk-pixbuf/gdk-pixbuf.h... " >&6; }
18408 if test "${ac_cv_header_gdk_pixbuf_gdk_pixbuf_h+set}" = set; then
18409   $as_echo_n "(cached) " >&6
18410 fi
18411 { $as_echo "$as_me:$LINENO: result: $ac_cv_header_gdk_pixbuf_gdk_pixbuf_h" >&5
18412 $as_echo "$ac_cv_header_gdk_pixbuf_gdk_pixbuf_h" >&6; }
18413 else
18414   # Is the header compilable?
18415 { $as_echo "$as_me:$LINENO: checking gdk-pixbuf/gdk-pixbuf.h usability" >&5
18416 $as_echo_n "checking gdk-pixbuf/gdk-pixbuf.h usability... " >&6; }
18417 cat >conftest.$ac_ext <<_ACEOF
18418 /* confdefs.h.  */
18419 _ACEOF
18420 cat confdefs.h >>conftest.$ac_ext
18421 cat >>conftest.$ac_ext <<_ACEOF
18422 /* end confdefs.h.  */
18423 $ac_includes_default
18424 #include <gdk-pixbuf/gdk-pixbuf.h>
18425 _ACEOF
18426 rm -rf conftest.$ac_objext
18427 if { (ac_try="$ac_compile"
18428 case "(($ac_try" in
18429   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18430   *) ac_try_echo=$ac_try;;
18431 esac
18432 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
18433 $as_echo "$ac_try_echo") >&5
18434   (eval "$ac_compile") 2>conftest.er1
18435   ac_status=$?
18436   grep -v '^ *+' conftest.er1 >conftest.err
18437   rm -rf conftest.er1
18438   cat conftest.err >&5
18439   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
18440   (exit $ac_status); } && {
18441          test -z "$ac_c_werror_flag" ||
18442          test ! -s conftest.err
18443        } && test -s conftest.$ac_objext; then
18444   ac_header_compiler=yes
18445 else
18446   $as_echo "$as_me: failed program was:" >&5
18447 sed 's/^/| /' conftest.$ac_ext >&5
18448
18449         ac_header_compiler=no
18450 fi
18451
18452 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
18453 { $as_echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
18454 $as_echo "$ac_header_compiler" >&6; }
18455
18456 # Is the header present?
18457 { $as_echo "$as_me:$LINENO: checking gdk-pixbuf/gdk-pixbuf.h presence" >&5
18458 $as_echo_n "checking gdk-pixbuf/gdk-pixbuf.h presence... " >&6; }
18459 cat >conftest.$ac_ext <<_ACEOF
18460 /* confdefs.h.  */
18461 _ACEOF
18462 cat confdefs.h >>conftest.$ac_ext
18463 cat >>conftest.$ac_ext <<_ACEOF
18464 /* end confdefs.h.  */
18465 #include <gdk-pixbuf/gdk-pixbuf.h>
18466 _ACEOF
18467 if { (ac_try="$ac_cpp conftest.$ac_ext"
18468 case "(($ac_try" in
18469   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18470   *) ac_try_echo=$ac_try;;
18471 esac
18472 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
18473 $as_echo "$ac_try_echo") >&5
18474   (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
18475   ac_status=$?
18476   grep -v '^ *+' conftest.er1 >conftest.err
18477   rm -rf conftest.er1
18478   cat conftest.err >&5
18479   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
18480   (exit $ac_status); } >/dev/null && {
18481          test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
18482          test ! -s conftest.err
18483        }; then
18484   ac_header_preproc=yes
18485 else
18486   $as_echo "$as_me: failed program was:" >&5
18487 sed 's/^/| /' conftest.$ac_ext >&5
18488
18489   ac_header_preproc=no
18490 fi
18491
18492 rm -rf conftest.err conftest.$ac_ext
18493 { $as_echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
18494 $as_echo "$ac_header_preproc" >&6; }
18495
18496 # So?  What about this header?
18497 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
18498   yes:no: )
18499     { $as_echo "$as_me:$LINENO: WARNING: gdk-pixbuf/gdk-pixbuf.h: accepted by the compiler, rejected by the preprocessor!" >&5
18500 $as_echo "$as_me: WARNING: gdk-pixbuf/gdk-pixbuf.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
18501     { $as_echo "$as_me:$LINENO: WARNING: gdk-pixbuf/gdk-pixbuf.h: proceeding with the compiler's result" >&5
18502 $as_echo "$as_me: WARNING: gdk-pixbuf/gdk-pixbuf.h: proceeding with the compiler's result" >&2;}
18503     ac_header_preproc=yes
18504     ;;
18505   no:yes:* )
18506     { $as_echo "$as_me:$LINENO: WARNING: gdk-pixbuf/gdk-pixbuf.h: present but cannot be compiled" >&5
18507 $as_echo "$as_me: WARNING: gdk-pixbuf/gdk-pixbuf.h: present but cannot be compiled" >&2;}
18508     { $as_echo "$as_me:$LINENO: WARNING: gdk-pixbuf/gdk-pixbuf.h:     check for missing prerequisite headers?" >&5
18509 $as_echo "$as_me: WARNING: gdk-pixbuf/gdk-pixbuf.h:     check for missing prerequisite headers?" >&2;}
18510     { $as_echo "$as_me:$LINENO: WARNING: gdk-pixbuf/gdk-pixbuf.h: see the Autoconf documentation" >&5
18511 $as_echo "$as_me: WARNING: gdk-pixbuf/gdk-pixbuf.h: see the Autoconf documentation" >&2;}
18512     { $as_echo "$as_me:$LINENO: WARNING: gdk-pixbuf/gdk-pixbuf.h:     section \"Present But Cannot Be Compiled\"" >&5
18513 $as_echo "$as_me: WARNING: gdk-pixbuf/gdk-pixbuf.h:     section \"Present But Cannot Be Compiled\"" >&2;}
18514     { $as_echo "$as_me:$LINENO: WARNING: gdk-pixbuf/gdk-pixbuf.h: proceeding with the preprocessor's result" >&5
18515 $as_echo "$as_me: WARNING: gdk-pixbuf/gdk-pixbuf.h: proceeding with the preprocessor's result" >&2;}
18516     { $as_echo "$as_me:$LINENO: WARNING: gdk-pixbuf/gdk-pixbuf.h: in the future, the compiler will take precedence" >&5
18517 $as_echo "$as_me: WARNING: gdk-pixbuf/gdk-pixbuf.h: in the future, the compiler will take precedence" >&2;}
18518
18519     ;;
18520 esac
18521 { $as_echo "$as_me:$LINENO: checking for gdk-pixbuf/gdk-pixbuf.h" >&5
18522 $as_echo_n "checking for gdk-pixbuf/gdk-pixbuf.h... " >&6; }
18523 if test "${ac_cv_header_gdk_pixbuf_gdk_pixbuf_h+set}" = set; then
18524   $as_echo_n "(cached) " >&6
18525 else
18526   ac_cv_header_gdk_pixbuf_gdk_pixbuf_h=$ac_header_preproc
18527 fi
18528 { $as_echo "$as_me:$LINENO: result: $ac_cv_header_gdk_pixbuf_gdk_pixbuf_h" >&5
18529 $as_echo "$ac_cv_header_gdk_pixbuf_gdk_pixbuf_h" >&6; }
18530
18531 fi
18532 if test "x$ac_cv_header_gdk_pixbuf_gdk_pixbuf_h" = x""yes; then
18533   have_gdk_pixbuf=yes
18534 fi
18535
18536
18537   CPPFLAGS="$ac_save_CPPFLAGS"
18538
18539     # if that worked, check for header B...
18540     if test "$have_gdk_pixbuf" = yes; then
18541       have_gdk_pixbuf=no
18542       gdk_pixbuf_halfassed=yes
18543
18544   ac_save_CPPFLAGS="$CPPFLAGS"
18545   if test \! -z "$includedir" ; then
18546     CPPFLAGS="$CPPFLAGS -I$includedir"
18547   fi
18548   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
18549   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
18550   if test "${ac_cv_header_gdk_pixbuf_gdk_pixbuf_xlib_h+set}" = set; then
18551   { $as_echo "$as_me:$LINENO: checking for gdk-pixbuf/gdk-pixbuf-xlib.h" >&5
18552 $as_echo_n "checking for gdk-pixbuf/gdk-pixbuf-xlib.h... " >&6; }
18553 if test "${ac_cv_header_gdk_pixbuf_gdk_pixbuf_xlib_h+set}" = set; then
18554   $as_echo_n "(cached) " >&6
18555 fi
18556 { $as_echo "$as_me:$LINENO: result: $ac_cv_header_gdk_pixbuf_gdk_pixbuf_xlib_h" >&5
18557 $as_echo "$ac_cv_header_gdk_pixbuf_gdk_pixbuf_xlib_h" >&6; }
18558 else
18559   # Is the header compilable?
18560 { $as_echo "$as_me:$LINENO: checking gdk-pixbuf/gdk-pixbuf-xlib.h usability" >&5
18561 $as_echo_n "checking gdk-pixbuf/gdk-pixbuf-xlib.h usability... " >&6; }
18562 cat >conftest.$ac_ext <<_ACEOF
18563 /* confdefs.h.  */
18564 _ACEOF
18565 cat confdefs.h >>conftest.$ac_ext
18566 cat >>conftest.$ac_ext <<_ACEOF
18567 /* end confdefs.h.  */
18568 $ac_includes_default
18569 #include <gdk-pixbuf/gdk-pixbuf-xlib.h>
18570 _ACEOF
18571 rm -rf conftest.$ac_objext
18572 if { (ac_try="$ac_compile"
18573 case "(($ac_try" in
18574   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18575   *) ac_try_echo=$ac_try;;
18576 esac
18577 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
18578 $as_echo "$ac_try_echo") >&5
18579   (eval "$ac_compile") 2>conftest.er1
18580   ac_status=$?
18581   grep -v '^ *+' conftest.er1 >conftest.err
18582   rm -rf conftest.er1
18583   cat conftest.err >&5
18584   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
18585   (exit $ac_status); } && {
18586          test -z "$ac_c_werror_flag" ||
18587          test ! -s conftest.err
18588        } && test -s conftest.$ac_objext; then
18589   ac_header_compiler=yes
18590 else
18591   $as_echo "$as_me: failed program was:" >&5
18592 sed 's/^/| /' conftest.$ac_ext >&5
18593
18594         ac_header_compiler=no
18595 fi
18596
18597 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
18598 { $as_echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
18599 $as_echo "$ac_header_compiler" >&6; }
18600
18601 # Is the header present?
18602 { $as_echo "$as_me:$LINENO: checking gdk-pixbuf/gdk-pixbuf-xlib.h presence" >&5
18603 $as_echo_n "checking gdk-pixbuf/gdk-pixbuf-xlib.h presence... " >&6; }
18604 cat >conftest.$ac_ext <<_ACEOF
18605 /* confdefs.h.  */
18606 _ACEOF
18607 cat confdefs.h >>conftest.$ac_ext
18608 cat >>conftest.$ac_ext <<_ACEOF
18609 /* end confdefs.h.  */
18610 #include <gdk-pixbuf/gdk-pixbuf-xlib.h>
18611 _ACEOF
18612 if { (ac_try="$ac_cpp conftest.$ac_ext"
18613 case "(($ac_try" in
18614   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18615   *) ac_try_echo=$ac_try;;
18616 esac
18617 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
18618 $as_echo "$ac_try_echo") >&5
18619   (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
18620   ac_status=$?
18621   grep -v '^ *+' conftest.er1 >conftest.err
18622   rm -rf conftest.er1
18623   cat conftest.err >&5
18624   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
18625   (exit $ac_status); } >/dev/null && {
18626          test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
18627          test ! -s conftest.err
18628        }; then
18629   ac_header_preproc=yes
18630 else
18631   $as_echo "$as_me: failed program was:" >&5
18632 sed 's/^/| /' conftest.$ac_ext >&5
18633
18634   ac_header_preproc=no
18635 fi
18636
18637 rm -rf conftest.err conftest.$ac_ext
18638 { $as_echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
18639 $as_echo "$ac_header_preproc" >&6; }
18640
18641 # So?  What about this header?
18642 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
18643   yes:no: )
18644     { $as_echo "$as_me:$LINENO: WARNING: gdk-pixbuf/gdk-pixbuf-xlib.h: accepted by the compiler, rejected by the preprocessor!" >&5
18645 $as_echo "$as_me: WARNING: gdk-pixbuf/gdk-pixbuf-xlib.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
18646     { $as_echo "$as_me:$LINENO: WARNING: gdk-pixbuf/gdk-pixbuf-xlib.h: proceeding with the compiler's result" >&5
18647 $as_echo "$as_me: WARNING: gdk-pixbuf/gdk-pixbuf-xlib.h: proceeding with the compiler's result" >&2;}
18648     ac_header_preproc=yes
18649     ;;
18650   no:yes:* )
18651     { $as_echo "$as_me:$LINENO: WARNING: gdk-pixbuf/gdk-pixbuf-xlib.h: present but cannot be compiled" >&5
18652 $as_echo "$as_me: WARNING: gdk-pixbuf/gdk-pixbuf-xlib.h: present but cannot be compiled" >&2;}
18653     { $as_echo "$as_me:$LINENO: WARNING: gdk-pixbuf/gdk-pixbuf-xlib.h:     check for missing prerequisite headers?" >&5
18654 $as_echo "$as_me: WARNING: gdk-pixbuf/gdk-pixbuf-xlib.h:     check for missing prerequisite headers?" >&2;}
18655     { $as_echo "$as_me:$LINENO: WARNING: gdk-pixbuf/gdk-pixbuf-xlib.h: see the Autoconf documentation" >&5
18656 $as_echo "$as_me: WARNING: gdk-pixbuf/gdk-pixbuf-xlib.h: see the Autoconf documentation" >&2;}
18657     { $as_echo "$as_me:$LINENO: WARNING: gdk-pixbuf/gdk-pixbuf-xlib.h:     section \"Present But Cannot Be Compiled\"" >&5
18658 $as_echo "$as_me: WARNING: gdk-pixbuf/gdk-pixbuf-xlib.h:     section \"Present But Cannot Be Compiled\"" >&2;}
18659     { $as_echo "$as_me:$LINENO: WARNING: gdk-pixbuf/gdk-pixbuf-xlib.h: proceeding with the preprocessor's result" >&5
18660 $as_echo "$as_me: WARNING: gdk-pixbuf/gdk-pixbuf-xlib.h: proceeding with the preprocessor's result" >&2;}
18661     { $as_echo "$as_me:$LINENO: WARNING: gdk-pixbuf/gdk-pixbuf-xlib.h: in the future, the compiler will take precedence" >&5
18662 $as_echo "$as_me: WARNING: gdk-pixbuf/gdk-pixbuf-xlib.h: in the future, the compiler will take precedence" >&2;}
18663
18664     ;;
18665 esac
18666 { $as_echo "$as_me:$LINENO: checking for gdk-pixbuf/gdk-pixbuf-xlib.h" >&5
18667 $as_echo_n "checking for gdk-pixbuf/gdk-pixbuf-xlib.h... " >&6; }
18668 if test "${ac_cv_header_gdk_pixbuf_gdk_pixbuf_xlib_h+set}" = set; then
18669   $as_echo_n "(cached) " >&6
18670 else
18671   ac_cv_header_gdk_pixbuf_gdk_pixbuf_xlib_h=$ac_header_preproc
18672 fi
18673 { $as_echo "$as_me:$LINENO: result: $ac_cv_header_gdk_pixbuf_gdk_pixbuf_xlib_h" >&5
18674 $as_echo "$ac_cv_header_gdk_pixbuf_gdk_pixbuf_xlib_h" >&6; }
18675
18676 fi
18677 if test "x$ac_cv_header_gdk_pixbuf_gdk_pixbuf_xlib_h" = x""yes; then
18678   have_gdk_pixbuf=yes
18679                          gdk_pixbuf_halfassed=no
18680 fi
18681
18682
18683   CPPFLAGS="$ac_save_CPPFLAGS"
18684
18685       # yay, it has a new name in Gtk 2.x...
18686       if test "$have_gdk_pixbuf" = no; then
18687         have_gdk_pixbuf=no
18688         gdk_pixbuf_halfassed=yes
18689
18690   ac_save_CPPFLAGS="$CPPFLAGS"
18691   if test \! -z "$includedir" ; then
18692     CPPFLAGS="$CPPFLAGS -I$includedir"
18693   fi
18694   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
18695   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
18696   if test "${ac_cv_header_gdk_pixbuf_xlib_gdk_pixbuf_xlib_h+set}" = set; then
18697   { $as_echo "$as_me:$LINENO: checking for gdk-pixbuf-xlib/gdk-pixbuf-xlib.h" >&5
18698 $as_echo_n "checking for gdk-pixbuf-xlib/gdk-pixbuf-xlib.h... " >&6; }
18699 if test "${ac_cv_header_gdk_pixbuf_xlib_gdk_pixbuf_xlib_h+set}" = set; then
18700   $as_echo_n "(cached) " >&6
18701 fi
18702 { $as_echo "$as_me:$LINENO: result: $ac_cv_header_gdk_pixbuf_xlib_gdk_pixbuf_xlib_h" >&5
18703 $as_echo "$ac_cv_header_gdk_pixbuf_xlib_gdk_pixbuf_xlib_h" >&6; }
18704 else
18705   # Is the header compilable?
18706 { $as_echo "$as_me:$LINENO: checking gdk-pixbuf-xlib/gdk-pixbuf-xlib.h usability" >&5
18707 $as_echo_n "checking gdk-pixbuf-xlib/gdk-pixbuf-xlib.h usability... " >&6; }
18708 cat >conftest.$ac_ext <<_ACEOF
18709 /* confdefs.h.  */
18710 _ACEOF
18711 cat confdefs.h >>conftest.$ac_ext
18712 cat >>conftest.$ac_ext <<_ACEOF
18713 /* end confdefs.h.  */
18714 $ac_includes_default
18715 #include <gdk-pixbuf-xlib/gdk-pixbuf-xlib.h>
18716 _ACEOF
18717 rm -rf conftest.$ac_objext
18718 if { (ac_try="$ac_compile"
18719 case "(($ac_try" in
18720   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18721   *) ac_try_echo=$ac_try;;
18722 esac
18723 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
18724 $as_echo "$ac_try_echo") >&5
18725   (eval "$ac_compile") 2>conftest.er1
18726   ac_status=$?
18727   grep -v '^ *+' conftest.er1 >conftest.err
18728   rm -rf conftest.er1
18729   cat conftest.err >&5
18730   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
18731   (exit $ac_status); } && {
18732          test -z "$ac_c_werror_flag" ||
18733          test ! -s conftest.err
18734        } && test -s conftest.$ac_objext; then
18735   ac_header_compiler=yes
18736 else
18737   $as_echo "$as_me: failed program was:" >&5
18738 sed 's/^/| /' conftest.$ac_ext >&5
18739
18740         ac_header_compiler=no
18741 fi
18742
18743 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
18744 { $as_echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
18745 $as_echo "$ac_header_compiler" >&6; }
18746
18747 # Is the header present?
18748 { $as_echo "$as_me:$LINENO: checking gdk-pixbuf-xlib/gdk-pixbuf-xlib.h presence" >&5
18749 $as_echo_n "checking gdk-pixbuf-xlib/gdk-pixbuf-xlib.h presence... " >&6; }
18750 cat >conftest.$ac_ext <<_ACEOF
18751 /* confdefs.h.  */
18752 _ACEOF
18753 cat confdefs.h >>conftest.$ac_ext
18754 cat >>conftest.$ac_ext <<_ACEOF
18755 /* end confdefs.h.  */
18756 #include <gdk-pixbuf-xlib/gdk-pixbuf-xlib.h>
18757 _ACEOF
18758 if { (ac_try="$ac_cpp conftest.$ac_ext"
18759 case "(($ac_try" in
18760   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18761   *) ac_try_echo=$ac_try;;
18762 esac
18763 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
18764 $as_echo "$ac_try_echo") >&5
18765   (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
18766   ac_status=$?
18767   grep -v '^ *+' conftest.er1 >conftest.err
18768   rm -rf conftest.er1
18769   cat conftest.err >&5
18770   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
18771   (exit $ac_status); } >/dev/null && {
18772          test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
18773          test ! -s conftest.err
18774        }; then
18775   ac_header_preproc=yes
18776 else
18777   $as_echo "$as_me: failed program was:" >&5
18778 sed 's/^/| /' conftest.$ac_ext >&5
18779
18780   ac_header_preproc=no
18781 fi
18782
18783 rm -rf conftest.err conftest.$ac_ext
18784 { $as_echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
18785 $as_echo "$ac_header_preproc" >&6; }
18786
18787 # So?  What about this header?
18788 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
18789   yes:no: )
18790     { $as_echo "$as_me:$LINENO: WARNING: gdk-pixbuf-xlib/gdk-pixbuf-xlib.h: accepted by the compiler, rejected by the preprocessor!" >&5
18791 $as_echo "$as_me: WARNING: gdk-pixbuf-xlib/gdk-pixbuf-xlib.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
18792     { $as_echo "$as_me:$LINENO: WARNING: gdk-pixbuf-xlib/gdk-pixbuf-xlib.h: proceeding with the compiler's result" >&5
18793 $as_echo "$as_me: WARNING: gdk-pixbuf-xlib/gdk-pixbuf-xlib.h: proceeding with the compiler's result" >&2;}
18794     ac_header_preproc=yes
18795     ;;
18796   no:yes:* )
18797     { $as_echo "$as_me:$LINENO: WARNING: gdk-pixbuf-xlib/gdk-pixbuf-xlib.h: present but cannot be compiled" >&5
18798 $as_echo "$as_me: WARNING: gdk-pixbuf-xlib/gdk-pixbuf-xlib.h: present but cannot be compiled" >&2;}
18799     { $as_echo "$as_me:$LINENO: WARNING: gdk-pixbuf-xlib/gdk-pixbuf-xlib.h:     check for missing prerequisite headers?" >&5
18800 $as_echo "$as_me: WARNING: gdk-pixbuf-xlib/gdk-pixbuf-xlib.h:     check for missing prerequisite headers?" >&2;}
18801     { $as_echo "$as_me:$LINENO: WARNING: gdk-pixbuf-xlib/gdk-pixbuf-xlib.h: see the Autoconf documentation" >&5
18802 $as_echo "$as_me: WARNING: gdk-pixbuf-xlib/gdk-pixbuf-xlib.h: see the Autoconf documentation" >&2;}
18803     { $as_echo "$as_me:$LINENO: WARNING: gdk-pixbuf-xlib/gdk-pixbuf-xlib.h:     section \"Present But Cannot Be Compiled\"" >&5
18804 $as_echo "$as_me: WARNING: gdk-pixbuf-xlib/gdk-pixbuf-xlib.h:     section \"Present But Cannot Be Compiled\"" >&2;}
18805     { $as_echo "$as_me:$LINENO: WARNING: gdk-pixbuf-xlib/gdk-pixbuf-xlib.h: proceeding with the preprocessor's result" >&5
18806 $as_echo "$as_me: WARNING: gdk-pixbuf-xlib/gdk-pixbuf-xlib.h: proceeding with the preprocessor's result" >&2;}
18807     { $as_echo "$as_me:$LINENO: WARNING: gdk-pixbuf-xlib/gdk-pixbuf-xlib.h: in the future, the compiler will take precedence" >&5
18808 $as_echo "$as_me: WARNING: gdk-pixbuf-xlib/gdk-pixbuf-xlib.h: in the future, the compiler will take precedence" >&2;}
18809
18810     ;;
18811 esac
18812 { $as_echo "$as_me:$LINENO: checking for gdk-pixbuf-xlib/gdk-pixbuf-xlib.h" >&5
18813 $as_echo_n "checking for gdk-pixbuf-xlib/gdk-pixbuf-xlib.h... " >&6; }
18814 if test "${ac_cv_header_gdk_pixbuf_xlib_gdk_pixbuf_xlib_h+set}" = set; then
18815   $as_echo_n "(cached) " >&6
18816 else
18817   ac_cv_header_gdk_pixbuf_xlib_gdk_pixbuf_xlib_h=$ac_header_preproc
18818 fi
18819 { $as_echo "$as_me:$LINENO: result: $ac_cv_header_gdk_pixbuf_xlib_gdk_pixbuf_xlib_h" >&5
18820 $as_echo "$ac_cv_header_gdk_pixbuf_xlib_gdk_pixbuf_xlib_h" >&6; }
18821
18822 fi
18823 if test "x$ac_cv_header_gdk_pixbuf_xlib_gdk_pixbuf_xlib_h" = x""yes; then
18824   have_gdk_pixbuf=yes
18825                            gdk_pixbuf_halfassed=no
18826 fi
18827
18828
18829   CPPFLAGS="$ac_save_CPPFLAGS"
18830       fi
18831     fi
18832     CPPFLAGS="$ac_save_gdk_pixbuf_CPPFLAGS"
18833   fi
18834
18835   if test "$have_gdk_pixbuf" = yes; then
18836     # we have the headers, now check for the libraries
18837     have_gdk_pixbuf=no
18838     gdk_pixbuf_halfassed=yes
18839
18840     { $as_echo "$as_me:$LINENO: result: checking for gdk_pixbuf usability..." >&5
18841 $as_echo "checking for gdk_pixbuf usability..." >&6; }
18842
18843     # library A...
18844
18845   ac_save_CPPFLAGS="$CPPFLAGS"
18846   ac_save_LDFLAGS="$LDFLAGS"
18847 #  ac_save_LIBS="$LIBS"
18848
18849   if test \! -z "$includedir" ; then
18850     CPPFLAGS="$CPPFLAGS -I$includedir"
18851   fi
18852   # note: $X_CFLAGS includes $x_includes
18853   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
18854
18855   if test \! -z "$libdir" ; then
18856     LDFLAGS="$LDFLAGS -L$libdir"
18857   fi
18858   # note: $X_LIBS includes $x_libraries
18859   LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
18860
18861   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
18862   LDFLAGS=`eval eval eval eval eval eval eval eval eval echo $LDFLAGS`
18863   { $as_echo "$as_me:$LINENO: checking for gdk_pixbuf_new_from_file in -lc" >&5
18864 $as_echo_n "checking for gdk_pixbuf_new_from_file in -lc... " >&6; }
18865 if test "${ac_cv_lib_c_gdk_pixbuf_new_from_file+set}" = set; then
18866   $as_echo_n "(cached) " >&6
18867 else
18868   ac_check_lib_save_LIBS=$LIBS
18869 LIBS="-lc $ac_gdk_pixbuf_config_libs -lX11 -lXext -lm $LIBS"
18870 cat >conftest.$ac_ext <<_ACEOF
18871 /* confdefs.h.  */
18872 _ACEOF
18873 cat confdefs.h >>conftest.$ac_ext
18874 cat >>conftest.$ac_ext <<_ACEOF
18875 /* end confdefs.h.  */
18876
18877 /* Override any GCC internal prototype to avoid an error.
18878    Use char because int might match the return type of a GCC
18879    builtin and then its argument prototype would still apply.  */
18880 #ifdef __cplusplus
18881 extern "C"
18882 #endif
18883 char gdk_pixbuf_new_from_file ();
18884 int
18885 main ()
18886 {
18887 return gdk_pixbuf_new_from_file ();
18888   ;
18889   return 0;
18890 }
18891 _ACEOF
18892 rm -rf conftest.$ac_objext conftest$ac_exeext
18893 if { (ac_try="$ac_link"
18894 case "(($ac_try" in
18895   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18896   *) ac_try_echo=$ac_try;;
18897 esac
18898 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
18899 $as_echo "$ac_try_echo") >&5
18900   (eval "$ac_link") 2>conftest.er1
18901   ac_status=$?
18902   grep -v '^ *+' conftest.er1 >conftest.err
18903   rm -rf conftest.er1
18904   cat conftest.err >&5
18905   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
18906   (exit $ac_status); } && {
18907          test -z "$ac_c_werror_flag" ||
18908          test ! -s conftest.err
18909        } && test -s conftest$ac_exeext && {
18910          test "$cross_compiling" = yes ||
18911          $as_test_x conftest$ac_exeext
18912        }; then
18913   ac_cv_lib_c_gdk_pixbuf_new_from_file=yes
18914 else
18915   $as_echo "$as_me: failed program was:" >&5
18916 sed 's/^/| /' conftest.$ac_ext >&5
18917
18918         ac_cv_lib_c_gdk_pixbuf_new_from_file=no
18919 fi
18920
18921 rm -rf conftest.dSYM
18922 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
18923       conftest$ac_exeext conftest.$ac_ext
18924 LIBS=$ac_check_lib_save_LIBS
18925 fi
18926 { $as_echo "$as_me:$LINENO: result: $ac_cv_lib_c_gdk_pixbuf_new_from_file" >&5
18927 $as_echo "$ac_cv_lib_c_gdk_pixbuf_new_from_file" >&6; }
18928 if test "x$ac_cv_lib_c_gdk_pixbuf_new_from_file" = x""yes; then
18929   have_gdk_pixbuf=yes
18930 fi
18931
18932   CPPFLAGS="$ac_save_CPPFLAGS"
18933   LDFLAGS="$ac_save_LDFLAGS"
18934 #  LIBS="$ac_save_LIBS"
18935
18936     # library B...
18937     if test "$have_gdk_pixbuf" = yes; then
18938       have_gdk_pixbuf=no
18939
18940   ac_save_CPPFLAGS="$CPPFLAGS"
18941   ac_save_LDFLAGS="$LDFLAGS"
18942 #  ac_save_LIBS="$LIBS"
18943
18944   if test \! -z "$includedir" ; then
18945     CPPFLAGS="$CPPFLAGS -I$includedir"
18946   fi
18947   # note: $X_CFLAGS includes $x_includes
18948   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
18949
18950   if test \! -z "$libdir" ; then
18951     LDFLAGS="$LDFLAGS -L$libdir"
18952   fi
18953   # note: $X_LIBS includes $x_libraries
18954   LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
18955
18956   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
18957   LDFLAGS=`eval eval eval eval eval eval eval eval eval echo $LDFLAGS`
18958   { $as_echo "$as_me:$LINENO: checking for gdk_pixbuf_xlib_init in -lc" >&5
18959 $as_echo_n "checking for gdk_pixbuf_xlib_init in -lc... " >&6; }
18960 if test "${ac_cv_lib_c_gdk_pixbuf_xlib_init+set}" = set; then
18961   $as_echo_n "(cached) " >&6
18962 else
18963   ac_check_lib_save_LIBS=$LIBS
18964 LIBS="-lc $ac_gdk_pixbuf_config_libs -lX11 -lXext -lm $LIBS"
18965 cat >conftest.$ac_ext <<_ACEOF
18966 /* confdefs.h.  */
18967 _ACEOF
18968 cat confdefs.h >>conftest.$ac_ext
18969 cat >>conftest.$ac_ext <<_ACEOF
18970 /* end confdefs.h.  */
18971
18972 /* Override any GCC internal prototype to avoid an error.
18973    Use char because int might match the return type of a GCC
18974    builtin and then its argument prototype would still apply.  */
18975 #ifdef __cplusplus
18976 extern "C"
18977 #endif
18978 char gdk_pixbuf_xlib_init ();
18979 int
18980 main ()
18981 {
18982 return gdk_pixbuf_xlib_init ();
18983   ;
18984   return 0;
18985 }
18986 _ACEOF
18987 rm -rf conftest.$ac_objext conftest$ac_exeext
18988 if { (ac_try="$ac_link"
18989 case "(($ac_try" in
18990   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18991   *) ac_try_echo=$ac_try;;
18992 esac
18993 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
18994 $as_echo "$ac_try_echo") >&5
18995   (eval "$ac_link") 2>conftest.er1
18996   ac_status=$?
18997   grep -v '^ *+' conftest.er1 >conftest.err
18998   rm -rf conftest.er1
18999   cat conftest.err >&5
19000   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
19001   (exit $ac_status); } && {
19002          test -z "$ac_c_werror_flag" ||
19003          test ! -s conftest.err
19004        } && test -s conftest$ac_exeext && {
19005          test "$cross_compiling" = yes ||
19006          $as_test_x conftest$ac_exeext
19007        }; then
19008   ac_cv_lib_c_gdk_pixbuf_xlib_init=yes
19009 else
19010   $as_echo "$as_me: failed program was:" >&5
19011 sed 's/^/| /' conftest.$ac_ext >&5
19012
19013         ac_cv_lib_c_gdk_pixbuf_xlib_init=no
19014 fi
19015
19016 rm -rf conftest.dSYM
19017 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
19018       conftest$ac_exeext conftest.$ac_ext
19019 LIBS=$ac_check_lib_save_LIBS
19020 fi
19021 { $as_echo "$as_me:$LINENO: result: $ac_cv_lib_c_gdk_pixbuf_xlib_init" >&5
19022 $as_echo "$ac_cv_lib_c_gdk_pixbuf_xlib_init" >&6; }
19023 if test "x$ac_cv_lib_c_gdk_pixbuf_xlib_init" = x""yes; then
19024   have_gdk_pixbuf=yes
19025                       gdk_pixbuf_halfassed=no
19026 fi
19027
19028   CPPFLAGS="$ac_save_CPPFLAGS"
19029   LDFLAGS="$ac_save_LDFLAGS"
19030 #  LIBS="$ac_save_LIBS"
19031
19032     fi
19033   fi
19034
19035   if test "$have_gdk_pixbuf" = yes; then
19036     INCLUDES="$INCLUDES $ac_gdk_pixbuf_config_cflags"
19037     XPM_LIBS="$ac_gdk_pixbuf_config_libs"
19038     cat >>confdefs.h <<\_ACEOF
19039 #define HAVE_GDK_PIXBUF 1
19040 _ACEOF
19041
19042   else
19043     { $as_echo "$as_me:$LINENO: result: checking for gdk_pixbuf usability... no" >&5
19044 $as_echo "checking for gdk_pixbuf usability... no" >&6; }
19045   fi
19046
19047   if test "$have_gdk_pixbuf" = yes; then
19048
19049   ac_save_CPPFLAGS="$CPPFLAGS"
19050   ac_save_LDFLAGS="$LDFLAGS"
19051 #  ac_save_LIBS="$LIBS"
19052
19053   if test \! -z "$includedir" ; then
19054     CPPFLAGS="$CPPFLAGS -I$includedir"
19055   fi
19056   # note: $X_CFLAGS includes $x_includes
19057   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
19058
19059   if test \! -z "$libdir" ; then
19060     LDFLAGS="$LDFLAGS -L$libdir"
19061   fi
19062   # note: $X_LIBS includes $x_libraries
19063   LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
19064
19065   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
19066   LDFLAGS=`eval eval eval eval eval eval eval eval eval echo $LDFLAGS`
19067   { $as_echo "$as_me:$LINENO: checking for gdk_pixbuf_apply_embedded_orientation in -lc" >&5
19068 $as_echo_n "checking for gdk_pixbuf_apply_embedded_orientation in -lc... " >&6; }
19069 if test "${ac_cv_lib_c_gdk_pixbuf_apply_embedded_orientation+set}" = set; then
19070   $as_echo_n "(cached) " >&6
19071 else
19072   ac_check_lib_save_LIBS=$LIBS
19073 LIBS="-lc $ac_gdk_pixbuf_config_libs -lX11 -lXext -lm $LIBS"
19074 cat >conftest.$ac_ext <<_ACEOF
19075 /* confdefs.h.  */
19076 _ACEOF
19077 cat confdefs.h >>conftest.$ac_ext
19078 cat >>conftest.$ac_ext <<_ACEOF
19079 /* end confdefs.h.  */
19080
19081 /* Override any GCC internal prototype to avoid an error.
19082    Use char because int might match the return type of a GCC
19083    builtin and then its argument prototype would still apply.  */
19084 #ifdef __cplusplus
19085 extern "C"
19086 #endif
19087 char gdk_pixbuf_apply_embedded_orientation ();
19088 int
19089 main ()
19090 {
19091 return gdk_pixbuf_apply_embedded_orientation ();
19092   ;
19093   return 0;
19094 }
19095 _ACEOF
19096 rm -rf conftest.$ac_objext conftest$ac_exeext
19097 if { (ac_try="$ac_link"
19098 case "(($ac_try" in
19099   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19100   *) ac_try_echo=$ac_try;;
19101 esac
19102 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
19103 $as_echo "$ac_try_echo") >&5
19104   (eval "$ac_link") 2>conftest.er1
19105   ac_status=$?
19106   grep -v '^ *+' conftest.er1 >conftest.err
19107   rm -rf conftest.er1
19108   cat conftest.err >&5
19109   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
19110   (exit $ac_status); } && {
19111          test -z "$ac_c_werror_flag" ||
19112          test ! -s conftest.err
19113        } && test -s conftest$ac_exeext && {
19114          test "$cross_compiling" = yes ||
19115          $as_test_x conftest$ac_exeext
19116        }; then
19117   ac_cv_lib_c_gdk_pixbuf_apply_embedded_orientation=yes
19118 else
19119   $as_echo "$as_me: failed program was:" >&5
19120 sed 's/^/| /' conftest.$ac_ext >&5
19121
19122         ac_cv_lib_c_gdk_pixbuf_apply_embedded_orientation=no
19123 fi
19124
19125 rm -rf conftest.dSYM
19126 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
19127       conftest$ac_exeext conftest.$ac_ext
19128 LIBS=$ac_check_lib_save_LIBS
19129 fi
19130 { $as_echo "$as_me:$LINENO: result: $ac_cv_lib_c_gdk_pixbuf_apply_embedded_orientation" >&5
19131 $as_echo "$ac_cv_lib_c_gdk_pixbuf_apply_embedded_orientation" >&6; }
19132 if test "x$ac_cv_lib_c_gdk_pixbuf_apply_embedded_orientation" = x""yes; then
19133   cat >>confdefs.h <<\_ACEOF
19134 #define HAVE_GDK_PIXBUF_APPLY_EMBEDDED_ORIENTATION 1
19135 _ACEOF
19136
19137 fi
19138
19139   CPPFLAGS="$ac_save_CPPFLAGS"
19140   LDFLAGS="$ac_save_LDFLAGS"
19141 #  LIBS="$ac_save_LIBS"
19142
19143   fi
19144 fi
19145
19146
19147 ###############################################################################
19148 #
19149 #       Check for -lXpm.
19150 #
19151 ###############################################################################
19152
19153 have_xpm=no
19154 with_xpm_req=unspecified
19155
19156 # Check whether --with-xpm was given.
19157 if test "${with_xpm+set}" = set; then
19158   withval=$with_xpm; with_xpm="$withval"; with_xpm_req="$withval"
19159 else
19160   with_xpm=yes
19161 fi
19162
19163
19164
19165    case "$with_xpm" in
19166     yes) ;;
19167     no)  ;;
19168
19169     /*)
19170      { $as_echo "$as_me:$LINENO: checking for XPM headers" >&5
19171 $as_echo_n "checking for XPM headers... " >&6; }
19172      d=$with_xpm/include
19173      if test -d $d; then
19174        X_CFLAGS="-I$d $X_CFLAGS"
19175        { $as_echo "$as_me:$LINENO: result: $d" >&5
19176 $as_echo "$d" >&6; }
19177      else
19178        { $as_echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
19179 $as_echo "not found ($d: no such directory)" >&6; }
19180      fi
19181
19182      { $as_echo "$as_me:$LINENO: checking for XPM libs" >&5
19183 $as_echo_n "checking for XPM libs... " >&6; }
19184      d=$with_xpm/lib
19185      if test -d $d; then
19186        X_LIBS="-L$d $X_LIBS"
19187        { $as_echo "$as_me:$LINENO: result: $d" >&5
19188 $as_echo "$d" >&6; }
19189      else
19190        { $as_echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
19191 $as_echo "not found ($d: no such directory)" >&6; }
19192      fi
19193
19194      # replace the directory string with "yes".
19195      with_xpm_req="yes"
19196      with_xpm=$with_xpm_req
19197      ;;
19198
19199     *)
19200      echo ""
19201      echo "error: argument to --with-xpm must be \"yes\", \"no\", or a directory."
19202      echo "       If it is a directory, then \`DIR/include' will be added to"
19203      echo "       the -I list, and \`DIR/lib' will be added to the -L list."
19204      exit 1
19205      ;;
19206    esac
19207
19208
19209 if test "$with_xpm" = yes; then
19210
19211   ac_save_CPPFLAGS="$CPPFLAGS"
19212   if test \! -z "$includedir" ; then
19213     CPPFLAGS="$CPPFLAGS -I$includedir"
19214   fi
19215   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
19216   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
19217   { $as_echo "$as_me:$LINENO: checking for X11/xpm.h" >&5
19218 $as_echo_n "checking for X11/xpm.h... " >&6; }
19219 if test "${ac_cv_header_X11_xpm_h+set}" = set; then
19220   $as_echo_n "(cached) " >&6
19221 else
19222   cat >conftest.$ac_ext <<_ACEOF
19223 /* confdefs.h.  */
19224 _ACEOF
19225 cat confdefs.h >>conftest.$ac_ext
19226 cat >>conftest.$ac_ext <<_ACEOF
19227 /* end confdefs.h.  */
19228 #include <X11/Xlib.h>
19229
19230 #include <X11/xpm.h>
19231 _ACEOF
19232 rm -rf conftest.$ac_objext
19233 if { (ac_try="$ac_compile"
19234 case "(($ac_try" in
19235   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19236   *) ac_try_echo=$ac_try;;
19237 esac
19238 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
19239 $as_echo "$ac_try_echo") >&5
19240   (eval "$ac_compile") 2>conftest.er1
19241   ac_status=$?
19242   grep -v '^ *+' conftest.er1 >conftest.err
19243   rm -rf conftest.er1
19244   cat conftest.err >&5
19245   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
19246   (exit $ac_status); } && {
19247          test -z "$ac_c_werror_flag" ||
19248          test ! -s conftest.err
19249        } && test -s conftest.$ac_objext; then
19250   ac_cv_header_X11_xpm_h=yes
19251 else
19252   $as_echo "$as_me: failed program was:" >&5
19253 sed 's/^/| /' conftest.$ac_ext >&5
19254
19255         ac_cv_header_X11_xpm_h=no
19256 fi
19257
19258 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
19259 fi
19260 { $as_echo "$as_me:$LINENO: result: $ac_cv_header_X11_xpm_h" >&5
19261 $as_echo "$ac_cv_header_X11_xpm_h" >&6; }
19262 if test "x$ac_cv_header_X11_xpm_h" = x""yes; then
19263   have_xpm=yes
19264                     cat >>confdefs.h <<\_ACEOF
19265 #define HAVE_XPM 1
19266 _ACEOF
19267
19268                     XPM_LIBS="-lXpm $XPM_LIBS"
19269 fi
19270
19271
19272   CPPFLAGS="$ac_save_CPPFLAGS"
19273 elif test "$with_xpm" != no; then
19274   echo "error: must be yes or no: --with-xpm=$with_xpm"
19275   exit 1
19276 fi
19277
19278 # See comment near $motif_requires_xpm, above.
19279 # Need to do this here, after both Motif and XPM have been checked for.
19280 #
19281 if test "$have_motif" = yes -a "$have_xpm" = yes ; then
19282   if test "$motif_requires_xpm" = yes ; then
19283     MOTIF_LIBS="$MOTIF_LIBS $XPM_LIBS"
19284   fi
19285 fi
19286
19287 if test "$XPM_LIBS" = "" ; then
19288   XPM_LIBS=$(MINIXPM)
19289 fi
19290
19291
19292 ###############################################################################
19293 #
19294 #       Check for -ljpeg
19295 #
19296 ###############################################################################
19297
19298 have_jpeg=no
19299 with_jpeg_req=unspecified
19300 jpeg_halfassed=no
19301
19302 # Check whether --with-jpeg was given.
19303 if test "${with_jpeg+set}" = set; then
19304   withval=$with_jpeg; with_jpeg="$withval"; with_jpeg_req="$withval"
19305 else
19306   with_jpeg=yes
19307 fi
19308
19309
19310
19311    case "$with_jpeg" in
19312     yes) ;;
19313     no)  ;;
19314
19315     /*)
19316      { $as_echo "$as_me:$LINENO: checking for JPEG headers" >&5
19317 $as_echo_n "checking for JPEG headers... " >&6; }
19318      d=$with_jpeg/include
19319      if test -d $d; then
19320        X_CFLAGS="-I$d $X_CFLAGS"
19321        { $as_echo "$as_me:$LINENO: result: $d" >&5
19322 $as_echo "$d" >&6; }
19323      else
19324        { $as_echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
19325 $as_echo "not found ($d: no such directory)" >&6; }
19326      fi
19327
19328      { $as_echo "$as_me:$LINENO: checking for JPEG libs" >&5
19329 $as_echo_n "checking for JPEG libs... " >&6; }
19330      d=$with_jpeg/lib
19331      if test -d $d; then
19332        X_LIBS="-L$d $X_LIBS"
19333        { $as_echo "$as_me:$LINENO: result: $d" >&5
19334 $as_echo "$d" >&6; }
19335      else
19336        { $as_echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
19337 $as_echo "not found ($d: no such directory)" >&6; }
19338      fi
19339
19340      # replace the directory string with "yes".
19341      with_jpeg_req="yes"
19342      with_jpeg=$with_jpeg_req
19343      ;;
19344
19345     *)
19346      echo ""
19347      echo "error: argument to --with-jpeg must be \"yes\", \"no\", or a directory."
19348      echo "       If it is a directory, then \`DIR/include' will be added to"
19349      echo "       the -I list, and \`DIR/lib' will be added to the -L list."
19350      exit 1
19351      ;;
19352    esac
19353
19354
19355 if test "$with_jpeg" != yes -a "$with_jpeg" != no ; then
19356   echo "error: must be yes or no: --with-jpeg=$with_jpeg"
19357   exit 1
19358 fi
19359
19360 if test "$with_jpeg" = yes; then
19361
19362   have_jpeg=no
19363
19364   ac_save_CPPFLAGS="$CPPFLAGS"
19365   if test \! -z "$includedir" ; then
19366     CPPFLAGS="$CPPFLAGS -I$includedir"
19367   fi
19368   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
19369   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
19370   if test "${ac_cv_header_jpeglib_h+set}" = set; then
19371   { $as_echo "$as_me:$LINENO: checking for jpeglib.h" >&5
19372 $as_echo_n "checking for jpeglib.h... " >&6; }
19373 if test "${ac_cv_header_jpeglib_h+set}" = set; then
19374   $as_echo_n "(cached) " >&6
19375 fi
19376 { $as_echo "$as_me:$LINENO: result: $ac_cv_header_jpeglib_h" >&5
19377 $as_echo "$ac_cv_header_jpeglib_h" >&6; }
19378 else
19379   # Is the header compilable?
19380 { $as_echo "$as_me:$LINENO: checking jpeglib.h usability" >&5
19381 $as_echo_n "checking jpeglib.h usability... " >&6; }
19382 cat >conftest.$ac_ext <<_ACEOF
19383 /* confdefs.h.  */
19384 _ACEOF
19385 cat confdefs.h >>conftest.$ac_ext
19386 cat >>conftest.$ac_ext <<_ACEOF
19387 /* end confdefs.h.  */
19388 $ac_includes_default
19389 #include <jpeglib.h>
19390 _ACEOF
19391 rm -rf conftest.$ac_objext
19392 if { (ac_try="$ac_compile"
19393 case "(($ac_try" in
19394   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19395   *) ac_try_echo=$ac_try;;
19396 esac
19397 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
19398 $as_echo "$ac_try_echo") >&5
19399   (eval "$ac_compile") 2>conftest.er1
19400   ac_status=$?
19401   grep -v '^ *+' conftest.er1 >conftest.err
19402   rm -rf conftest.er1
19403   cat conftest.err >&5
19404   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
19405   (exit $ac_status); } && {
19406          test -z "$ac_c_werror_flag" ||
19407          test ! -s conftest.err
19408        } && test -s conftest.$ac_objext; then
19409   ac_header_compiler=yes
19410 else
19411   $as_echo "$as_me: failed program was:" >&5
19412 sed 's/^/| /' conftest.$ac_ext >&5
19413
19414         ac_header_compiler=no
19415 fi
19416
19417 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
19418 { $as_echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
19419 $as_echo "$ac_header_compiler" >&6; }
19420
19421 # Is the header present?
19422 { $as_echo "$as_me:$LINENO: checking jpeglib.h presence" >&5
19423 $as_echo_n "checking jpeglib.h presence... " >&6; }
19424 cat >conftest.$ac_ext <<_ACEOF
19425 /* confdefs.h.  */
19426 _ACEOF
19427 cat confdefs.h >>conftest.$ac_ext
19428 cat >>conftest.$ac_ext <<_ACEOF
19429 /* end confdefs.h.  */
19430 #include <jpeglib.h>
19431 _ACEOF
19432 if { (ac_try="$ac_cpp conftest.$ac_ext"
19433 case "(($ac_try" in
19434   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19435   *) ac_try_echo=$ac_try;;
19436 esac
19437 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
19438 $as_echo "$ac_try_echo") >&5
19439   (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
19440   ac_status=$?
19441   grep -v '^ *+' conftest.er1 >conftest.err
19442   rm -rf conftest.er1
19443   cat conftest.err >&5
19444   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
19445   (exit $ac_status); } >/dev/null && {
19446          test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
19447          test ! -s conftest.err
19448        }; then
19449   ac_header_preproc=yes
19450 else
19451   $as_echo "$as_me: failed program was:" >&5
19452 sed 's/^/| /' conftest.$ac_ext >&5
19453
19454   ac_header_preproc=no
19455 fi
19456
19457 rm -rf conftest.err conftest.$ac_ext
19458 { $as_echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
19459 $as_echo "$ac_header_preproc" >&6; }
19460
19461 # So?  What about this header?
19462 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
19463   yes:no: )
19464     { $as_echo "$as_me:$LINENO: WARNING: jpeglib.h: accepted by the compiler, rejected by the preprocessor!" >&5
19465 $as_echo "$as_me: WARNING: jpeglib.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
19466     { $as_echo "$as_me:$LINENO: WARNING: jpeglib.h: proceeding with the compiler's result" >&5
19467 $as_echo "$as_me: WARNING: jpeglib.h: proceeding with the compiler's result" >&2;}
19468     ac_header_preproc=yes
19469     ;;
19470   no:yes:* )
19471     { $as_echo "$as_me:$LINENO: WARNING: jpeglib.h: present but cannot be compiled" >&5
19472 $as_echo "$as_me: WARNING: jpeglib.h: present but cannot be compiled" >&2;}
19473     { $as_echo "$as_me:$LINENO: WARNING: jpeglib.h:     check for missing prerequisite headers?" >&5
19474 $as_echo "$as_me: WARNING: jpeglib.h:     check for missing prerequisite headers?" >&2;}
19475     { $as_echo "$as_me:$LINENO: WARNING: jpeglib.h: see the Autoconf documentation" >&5
19476 $as_echo "$as_me: WARNING: jpeglib.h: see the Autoconf documentation" >&2;}
19477     { $as_echo "$as_me:$LINENO: WARNING: jpeglib.h:     section \"Present But Cannot Be Compiled\"" >&5
19478 $as_echo "$as_me: WARNING: jpeglib.h:     section \"Present But Cannot Be Compiled\"" >&2;}
19479     { $as_echo "$as_me:$LINENO: WARNING: jpeglib.h: proceeding with the preprocessor's result" >&5
19480 $as_echo "$as_me: WARNING: jpeglib.h: proceeding with the preprocessor's result" >&2;}
19481     { $as_echo "$as_me:$LINENO: WARNING: jpeglib.h: in the future, the compiler will take precedence" >&5
19482 $as_echo "$as_me: WARNING: jpeglib.h: in the future, the compiler will take precedence" >&2;}
19483
19484     ;;
19485 esac
19486 { $as_echo "$as_me:$LINENO: checking for jpeglib.h" >&5
19487 $as_echo_n "checking for jpeglib.h... " >&6; }
19488 if test "${ac_cv_header_jpeglib_h+set}" = set; then
19489   $as_echo_n "(cached) " >&6
19490 else
19491   ac_cv_header_jpeglib_h=$ac_header_preproc
19492 fi
19493 { $as_echo "$as_me:$LINENO: result: $ac_cv_header_jpeglib_h" >&5
19494 $as_echo "$ac_cv_header_jpeglib_h" >&6; }
19495
19496 fi
19497 if test "x$ac_cv_header_jpeglib_h" = x""yes; then
19498   have_jpeg=yes
19499 fi
19500
19501
19502   CPPFLAGS="$ac_save_CPPFLAGS"
19503
19504   if test "$have_jpeg" = yes; then
19505     # we have the header, now check for the library
19506     have_jpeg=no
19507     jpeg_halfassed=yes
19508
19509   ac_save_CPPFLAGS="$CPPFLAGS"
19510   ac_save_LDFLAGS="$LDFLAGS"
19511 #  ac_save_LIBS="$LIBS"
19512
19513   if test \! -z "$includedir" ; then
19514     CPPFLAGS="$CPPFLAGS -I$includedir"
19515   fi
19516   # note: $X_CFLAGS includes $x_includes
19517   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
19518
19519   if test \! -z "$libdir" ; then
19520     LDFLAGS="$LDFLAGS -L$libdir"
19521   fi
19522   # note: $X_LIBS includes $x_libraries
19523   LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
19524
19525   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
19526   LDFLAGS=`eval eval eval eval eval eval eval eval eval echo $LDFLAGS`
19527   { $as_echo "$as_me:$LINENO: checking for jpeg_start_compress in -ljpeg" >&5
19528 $as_echo_n "checking for jpeg_start_compress in -ljpeg... " >&6; }
19529 if test "${ac_cv_lib_jpeg_jpeg_start_compress+set}" = set; then
19530   $as_echo_n "(cached) " >&6
19531 else
19532   ac_check_lib_save_LIBS=$LIBS
19533 LIBS="-ljpeg  $LIBS"
19534 cat >conftest.$ac_ext <<_ACEOF
19535 /* confdefs.h.  */
19536 _ACEOF
19537 cat confdefs.h >>conftest.$ac_ext
19538 cat >>conftest.$ac_ext <<_ACEOF
19539 /* end confdefs.h.  */
19540
19541 /* Override any GCC internal prototype to avoid an error.
19542    Use char because int might match the return type of a GCC
19543    builtin and then its argument prototype would still apply.  */
19544 #ifdef __cplusplus
19545 extern "C"
19546 #endif
19547 char jpeg_start_compress ();
19548 int
19549 main ()
19550 {
19551 return jpeg_start_compress ();
19552   ;
19553   return 0;
19554 }
19555 _ACEOF
19556 rm -rf conftest.$ac_objext conftest$ac_exeext
19557 if { (ac_try="$ac_link"
19558 case "(($ac_try" in
19559   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19560   *) ac_try_echo=$ac_try;;
19561 esac
19562 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
19563 $as_echo "$ac_try_echo") >&5
19564   (eval "$ac_link") 2>conftest.er1
19565   ac_status=$?
19566   grep -v '^ *+' conftest.er1 >conftest.err
19567   rm -rf conftest.er1
19568   cat conftest.err >&5
19569   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
19570   (exit $ac_status); } && {
19571          test -z "$ac_c_werror_flag" ||
19572          test ! -s conftest.err
19573        } && test -s conftest$ac_exeext && {
19574          test "$cross_compiling" = yes ||
19575          $as_test_x conftest$ac_exeext
19576        }; then
19577   ac_cv_lib_jpeg_jpeg_start_compress=yes
19578 else
19579   $as_echo "$as_me: failed program was:" >&5
19580 sed 's/^/| /' conftest.$ac_ext >&5
19581
19582         ac_cv_lib_jpeg_jpeg_start_compress=no
19583 fi
19584
19585 rm -rf conftest.dSYM
19586 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
19587       conftest$ac_exeext conftest.$ac_ext
19588 LIBS=$ac_check_lib_save_LIBS
19589 fi
19590 { $as_echo "$as_me:$LINENO: result: $ac_cv_lib_jpeg_jpeg_start_compress" >&5
19591 $as_echo "$ac_cv_lib_jpeg_jpeg_start_compress" >&6; }
19592 if test "x$ac_cv_lib_jpeg_jpeg_start_compress" = x""yes; then
19593   have_jpeg=yes
19594                     jpeg_halfassed=no
19595                     JPEG_LIBS="-ljpeg"
19596                     cat >>confdefs.h <<\_ACEOF
19597 #define HAVE_JPEGLIB 1
19598 _ACEOF
19599
19600 fi
19601
19602   CPPFLAGS="$ac_save_CPPFLAGS"
19603   LDFLAGS="$ac_save_LDFLAGS"
19604 #  LIBS="$ac_save_LIBS"
19605
19606   fi
19607 fi
19608
19609
19610 ###############################################################################
19611 #
19612 #       Check for pty support: this allows 'phosphor' and 'apple2'
19613 #       to run curses-based programs, or be used as terminal windows.
19614 #
19615 ###############################################################################
19616
19617 PTY_LIBS=
19618
19619
19620 for ac_header in pty.h util.h
19621 do
19622 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
19623 if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
19624   { $as_echo "$as_me:$LINENO: checking for $ac_header" >&5
19625 $as_echo_n "checking for $ac_header... " >&6; }
19626 if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
19627   $as_echo_n "(cached) " >&6
19628 fi
19629 ac_res=`eval 'as_val=${'$as_ac_Header'}
19630                  $as_echo "$as_val"'`
19631                { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
19632 $as_echo "$ac_res" >&6; }
19633 else
19634   # Is the header compilable?
19635 { $as_echo "$as_me:$LINENO: checking $ac_header usability" >&5
19636 $as_echo_n "checking $ac_header usability... " >&6; }
19637 cat >conftest.$ac_ext <<_ACEOF
19638 /* confdefs.h.  */
19639 _ACEOF
19640 cat confdefs.h >>conftest.$ac_ext
19641 cat >>conftest.$ac_ext <<_ACEOF
19642 /* end confdefs.h.  */
19643 $ac_includes_default
19644 #include <$ac_header>
19645 _ACEOF
19646 rm -rf conftest.$ac_objext
19647 if { (ac_try="$ac_compile"
19648 case "(($ac_try" in
19649   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19650   *) ac_try_echo=$ac_try;;
19651 esac
19652 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
19653 $as_echo "$ac_try_echo") >&5
19654   (eval "$ac_compile") 2>conftest.er1
19655   ac_status=$?
19656   grep -v '^ *+' conftest.er1 >conftest.err
19657   rm -rf conftest.er1
19658   cat conftest.err >&5
19659   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
19660   (exit $ac_status); } && {
19661          test -z "$ac_c_werror_flag" ||
19662          test ! -s conftest.err
19663        } && test -s conftest.$ac_objext; then
19664   ac_header_compiler=yes
19665 else
19666   $as_echo "$as_me: failed program was:" >&5
19667 sed 's/^/| /' conftest.$ac_ext >&5
19668
19669         ac_header_compiler=no
19670 fi
19671
19672 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
19673 { $as_echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
19674 $as_echo "$ac_header_compiler" >&6; }
19675
19676 # Is the header present?
19677 { $as_echo "$as_me:$LINENO: checking $ac_header presence" >&5
19678 $as_echo_n "checking $ac_header presence... " >&6; }
19679 cat >conftest.$ac_ext <<_ACEOF
19680 /* confdefs.h.  */
19681 _ACEOF
19682 cat confdefs.h >>conftest.$ac_ext
19683 cat >>conftest.$ac_ext <<_ACEOF
19684 /* end confdefs.h.  */
19685 #include <$ac_header>
19686 _ACEOF
19687 if { (ac_try="$ac_cpp conftest.$ac_ext"
19688 case "(($ac_try" in
19689   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19690   *) ac_try_echo=$ac_try;;
19691 esac
19692 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
19693 $as_echo "$ac_try_echo") >&5
19694   (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
19695   ac_status=$?
19696   grep -v '^ *+' conftest.er1 >conftest.err
19697   rm -rf conftest.er1
19698   cat conftest.err >&5
19699   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
19700   (exit $ac_status); } >/dev/null && {
19701          test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
19702          test ! -s conftest.err
19703        }; then
19704   ac_header_preproc=yes
19705 else
19706   $as_echo "$as_me: failed program was:" >&5
19707 sed 's/^/| /' conftest.$ac_ext >&5
19708
19709   ac_header_preproc=no
19710 fi
19711
19712 rm -rf conftest.err conftest.$ac_ext
19713 { $as_echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
19714 $as_echo "$ac_header_preproc" >&6; }
19715
19716 # So?  What about this header?
19717 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
19718   yes:no: )
19719     { $as_echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
19720 $as_echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
19721     { $as_echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
19722 $as_echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
19723     ac_header_preproc=yes
19724     ;;
19725   no:yes:* )
19726     { $as_echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
19727 $as_echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
19728     { $as_echo "$as_me:$LINENO: WARNING: $ac_header:     check for missing prerequisite headers?" >&5
19729 $as_echo "$as_me: WARNING: $ac_header:     check for missing prerequisite headers?" >&2;}
19730     { $as_echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
19731 $as_echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
19732     { $as_echo "$as_me:$LINENO: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&5
19733 $as_echo "$as_me: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&2;}
19734     { $as_echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
19735 $as_echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
19736     { $as_echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
19737 $as_echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
19738
19739     ;;
19740 esac
19741 { $as_echo "$as_me:$LINENO: checking for $ac_header" >&5
19742 $as_echo_n "checking for $ac_header... " >&6; }
19743 if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
19744   $as_echo_n "(cached) " >&6
19745 else
19746   eval "$as_ac_Header=\$ac_header_preproc"
19747 fi
19748 ac_res=`eval 'as_val=${'$as_ac_Header'}
19749                  $as_echo "$as_val"'`
19750                { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
19751 $as_echo "$ac_res" >&6; }
19752
19753 fi
19754 as_val=`eval 'as_val=${'$as_ac_Header'}
19755                  $as_echo "$as_val"'`
19756    if test "x$as_val" = x""yes; then
19757   cat >>confdefs.h <<_ACEOF
19758 #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
19759 _ACEOF
19760
19761 fi
19762
19763 done
19764
19765
19766   ac_save_CPPFLAGS="$CPPFLAGS"
19767   ac_save_LDFLAGS="$LDFLAGS"
19768 #  ac_save_LIBS="$LIBS"
19769
19770   if test \! -z "$includedir" ; then
19771     CPPFLAGS="$CPPFLAGS -I$includedir"
19772   fi
19773   # note: $X_CFLAGS includes $x_includes
19774   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
19775
19776   if test \! -z "$libdir" ; then
19777     LDFLAGS="$LDFLAGS -L$libdir"
19778   fi
19779   # note: $X_LIBS includes $x_libraries
19780   LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
19781
19782   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
19783   LDFLAGS=`eval eval eval eval eval eval eval eval eval echo $LDFLAGS`
19784   { $as_echo "$as_me:$LINENO: checking for forkpty in -lutil" >&5
19785 $as_echo_n "checking for forkpty in -lutil... " >&6; }
19786 if test "${ac_cv_lib_util_forkpty+set}" = set; then
19787   $as_echo_n "(cached) " >&6
19788 else
19789   ac_check_lib_save_LIBS=$LIBS
19790 LIBS="-lutil  $LIBS"
19791 cat >conftest.$ac_ext <<_ACEOF
19792 /* confdefs.h.  */
19793 _ACEOF
19794 cat confdefs.h >>conftest.$ac_ext
19795 cat >>conftest.$ac_ext <<_ACEOF
19796 /* end confdefs.h.  */
19797
19798 /* Override any GCC internal prototype to avoid an error.
19799    Use char because int might match the return type of a GCC
19800    builtin and then its argument prototype would still apply.  */
19801 #ifdef __cplusplus
19802 extern "C"
19803 #endif
19804 char forkpty ();
19805 int
19806 main ()
19807 {
19808 return forkpty ();
19809   ;
19810   return 0;
19811 }
19812 _ACEOF
19813 rm -rf conftest.$ac_objext conftest$ac_exeext
19814 if { (ac_try="$ac_link"
19815 case "(($ac_try" in
19816   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19817   *) ac_try_echo=$ac_try;;
19818 esac
19819 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
19820 $as_echo "$ac_try_echo") >&5
19821   (eval "$ac_link") 2>conftest.er1
19822   ac_status=$?
19823   grep -v '^ *+' conftest.er1 >conftest.err
19824   rm -rf conftest.er1
19825   cat conftest.err >&5
19826   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
19827   (exit $ac_status); } && {
19828          test -z "$ac_c_werror_flag" ||
19829          test ! -s conftest.err
19830        } && test -s conftest$ac_exeext && {
19831          test "$cross_compiling" = yes ||
19832          $as_test_x conftest$ac_exeext
19833        }; then
19834   ac_cv_lib_util_forkpty=yes
19835 else
19836   $as_echo "$as_me: failed program was:" >&5
19837 sed 's/^/| /' conftest.$ac_ext >&5
19838
19839         ac_cv_lib_util_forkpty=no
19840 fi
19841
19842 rm -rf conftest.dSYM
19843 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
19844       conftest$ac_exeext conftest.$ac_ext
19845 LIBS=$ac_check_lib_save_LIBS
19846 fi
19847 { $as_echo "$as_me:$LINENO: result: $ac_cv_lib_util_forkpty" >&5
19848 $as_echo "$ac_cv_lib_util_forkpty" >&6; }
19849 if test "x$ac_cv_lib_util_forkpty" = x""yes; then
19850   PTY_LIBS="-lutil"
19851                 ac_have_forkpty=yes
19852                 cat >>confdefs.h <<\_ACEOF
19853 #define HAVE_FORKPTY 1
19854 _ACEOF
19855
19856 fi
19857
19858   CPPFLAGS="$ac_save_CPPFLAGS"
19859   LDFLAGS="$ac_save_LDFLAGS"
19860 #  LIBS="$ac_save_LIBS"
19861
19862
19863 if test "$ac_have_forkpty" != yes ; then
19864   # we don't need (or have) -lutil on MacOS 10.4.2...
19865
19866   ac_save_CPPFLAGS="$CPPFLAGS"
19867   ac_save_LDFLAGS="$LDFLAGS"
19868 #  ac_save_LIBS="$LIBS"
19869
19870   if test \! -z "$includedir" ; then
19871     CPPFLAGS="$CPPFLAGS -I$includedir"
19872   fi
19873   # note: $X_CFLAGS includes $x_includes
19874   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
19875
19876   if test \! -z "$libdir" ; then
19877     LDFLAGS="$LDFLAGS -L$libdir"
19878   fi
19879   # note: $X_LIBS includes $x_libraries
19880   LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
19881
19882   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
19883   LDFLAGS=`eval eval eval eval eval eval eval eval eval echo $LDFLAGS`
19884   { $as_echo "$as_me:$LINENO: checking for forkpty in -lc" >&5
19885 $as_echo_n "checking for forkpty in -lc... " >&6; }
19886 if test "${ac_cv_lib_c_forkpty+set}" = set; then
19887   $as_echo_n "(cached) " >&6
19888 else
19889   ac_check_lib_save_LIBS=$LIBS
19890 LIBS="-lc  $LIBS"
19891 cat >conftest.$ac_ext <<_ACEOF
19892 /* confdefs.h.  */
19893 _ACEOF
19894 cat confdefs.h >>conftest.$ac_ext
19895 cat >>conftest.$ac_ext <<_ACEOF
19896 /* end confdefs.h.  */
19897
19898 /* Override any GCC internal prototype to avoid an error.
19899    Use char because int might match the return type of a GCC
19900    builtin and then its argument prototype would still apply.  */
19901 #ifdef __cplusplus
19902 extern "C"
19903 #endif
19904 char forkpty ();
19905 int
19906 main ()
19907 {
19908 return forkpty ();
19909   ;
19910   return 0;
19911 }
19912 _ACEOF
19913 rm -rf conftest.$ac_objext conftest$ac_exeext
19914 if { (ac_try="$ac_link"
19915 case "(($ac_try" in
19916   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19917   *) ac_try_echo=$ac_try;;
19918 esac
19919 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
19920 $as_echo "$ac_try_echo") >&5
19921   (eval "$ac_link") 2>conftest.er1
19922   ac_status=$?
19923   grep -v '^ *+' conftest.er1 >conftest.err
19924   rm -rf conftest.er1
19925   cat conftest.err >&5
19926   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
19927   (exit $ac_status); } && {
19928          test -z "$ac_c_werror_flag" ||
19929          test ! -s conftest.err
19930        } && test -s conftest$ac_exeext && {
19931          test "$cross_compiling" = yes ||
19932          $as_test_x conftest$ac_exeext
19933        }; then
19934   ac_cv_lib_c_forkpty=yes
19935 else
19936   $as_echo "$as_me: failed program was:" >&5
19937 sed 's/^/| /' conftest.$ac_ext >&5
19938
19939         ac_cv_lib_c_forkpty=no
19940 fi
19941
19942 rm -rf conftest.dSYM
19943 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
19944       conftest$ac_exeext conftest.$ac_ext
19945 LIBS=$ac_check_lib_save_LIBS
19946 fi
19947 { $as_echo "$as_me:$LINENO: result: $ac_cv_lib_c_forkpty" >&5
19948 $as_echo "$ac_cv_lib_c_forkpty" >&6; }
19949 if test "x$ac_cv_lib_c_forkpty" = x""yes; then
19950   PTY_LIBS=""
19951                   cat >>confdefs.h <<\_ACEOF
19952 #define HAVE_FORKPTY 1
19953 _ACEOF
19954
19955 fi
19956
19957   CPPFLAGS="$ac_save_CPPFLAGS"
19958   LDFLAGS="$ac_save_LDFLAGS"
19959 #  LIBS="$ac_save_LIBS"
19960
19961 fi
19962
19963 ###############################################################################
19964 #
19965 #       Check for the XSHM server extension.
19966 #
19967 ###############################################################################
19968
19969 have_xshm=no
19970 with_xshm_req=unspecified
19971
19972 # Check whether --with-xshm-ext was given.
19973 if test "${with_xshm_ext+set}" = set; then
19974   withval=$with_xshm_ext; with_xshm="$withval"; with_xshm_req="$withval"
19975 else
19976   with_xshm=yes
19977 fi
19978
19979
19980
19981    case "$with_xshm" in
19982     yes) ;;
19983     no)  ;;
19984
19985     /*)
19986      { $as_echo "$as_me:$LINENO: checking for XSHM headers" >&5
19987 $as_echo_n "checking for XSHM headers... " >&6; }
19988      d=$with_xshm/include
19989      if test -d $d; then
19990        X_CFLAGS="-I$d $X_CFLAGS"
19991        { $as_echo "$as_me:$LINENO: result: $d" >&5
19992 $as_echo "$d" >&6; }
19993      else
19994        { $as_echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
19995 $as_echo "not found ($d: no such directory)" >&6; }
19996      fi
19997
19998      { $as_echo "$as_me:$LINENO: checking for XSHM libs" >&5
19999 $as_echo_n "checking for XSHM libs... " >&6; }
20000      d=$with_xshm/lib
20001      if test -d $d; then
20002        X_LIBS="-L$d $X_LIBS"
20003        { $as_echo "$as_me:$LINENO: result: $d" >&5
20004 $as_echo "$d" >&6; }
20005      else
20006        { $as_echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
20007 $as_echo "not found ($d: no such directory)" >&6; }
20008      fi
20009
20010      # replace the directory string with "yes".
20011      with_xshm_req="yes"
20012      with_xshm=$with_xshm_req
20013      ;;
20014
20015     *)
20016      echo ""
20017      echo "error: argument to --with-xshm-ext must be \"yes\", \"no\", or a directory."
20018      echo "       If it is a directory, then \`DIR/include' will be added to"
20019      echo "       the -I list, and \`DIR/lib' will be added to the -L list."
20020      exit 1
20021      ;;
20022    esac
20023
20024
20025 if test "$with_xshm" = yes; then
20026
20027   # first check for Xshm.h.
20028
20029   ac_save_CPPFLAGS="$CPPFLAGS"
20030   if test \! -z "$includedir" ; then
20031     CPPFLAGS="$CPPFLAGS -I$includedir"
20032   fi
20033   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
20034   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
20035   { $as_echo "$as_me:$LINENO: checking for X11/extensions/XShm.h" >&5
20036 $as_echo_n "checking for X11/extensions/XShm.h... " >&6; }
20037 if test "${ac_cv_header_X11_extensions_XShm_h+set}" = set; then
20038   $as_echo_n "(cached) " >&6
20039 else
20040   cat >conftest.$ac_ext <<_ACEOF
20041 /* confdefs.h.  */
20042 _ACEOF
20043 cat confdefs.h >>conftest.$ac_ext
20044 cat >>conftest.$ac_ext <<_ACEOF
20045 /* end confdefs.h.  */
20046 #include <X11/Xlib.h>
20047
20048 #include <X11/extensions/XShm.h>
20049 _ACEOF
20050 rm -rf conftest.$ac_objext
20051 if { (ac_try="$ac_compile"
20052 case "(($ac_try" in
20053   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20054   *) ac_try_echo=$ac_try;;
20055 esac
20056 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
20057 $as_echo "$ac_try_echo") >&5
20058   (eval "$ac_compile") 2>conftest.er1
20059   ac_status=$?
20060   grep -v '^ *+' conftest.er1 >conftest.err
20061   rm -rf conftest.er1
20062   cat conftest.err >&5
20063   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
20064   (exit $ac_status); } && {
20065          test -z "$ac_c_werror_flag" ||
20066          test ! -s conftest.err
20067        } && test -s conftest.$ac_objext; then
20068   ac_cv_header_X11_extensions_XShm_h=yes
20069 else
20070   $as_echo "$as_me: failed program was:" >&5
20071 sed 's/^/| /' conftest.$ac_ext >&5
20072
20073         ac_cv_header_X11_extensions_XShm_h=no
20074 fi
20075
20076 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
20077 fi
20078 { $as_echo "$as_me:$LINENO: result: $ac_cv_header_X11_extensions_XShm_h" >&5
20079 $as_echo "$ac_cv_header_X11_extensions_XShm_h" >&6; }
20080 if test "x$ac_cv_header_X11_extensions_XShm_h" = x""yes; then
20081   have_xshm=yes
20082 fi
20083
20084
20085   CPPFLAGS="$ac_save_CPPFLAGS"
20086
20087   # if that succeeded, then check for sys/ipc.h.
20088   if test "$have_xshm" = yes; then
20089     have_xshm=no
20090
20091   ac_save_CPPFLAGS="$CPPFLAGS"
20092   if test \! -z "$includedir" ; then
20093     CPPFLAGS="$CPPFLAGS -I$includedir"
20094   fi
20095   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
20096   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
20097   if test "${ac_cv_header_sys_ipc_h+set}" = set; then
20098   { $as_echo "$as_me:$LINENO: checking for sys/ipc.h" >&5
20099 $as_echo_n "checking for sys/ipc.h... " >&6; }
20100 if test "${ac_cv_header_sys_ipc_h+set}" = set; then
20101   $as_echo_n "(cached) " >&6
20102 fi
20103 { $as_echo "$as_me:$LINENO: result: $ac_cv_header_sys_ipc_h" >&5
20104 $as_echo "$ac_cv_header_sys_ipc_h" >&6; }
20105 else
20106   # Is the header compilable?
20107 { $as_echo "$as_me:$LINENO: checking sys/ipc.h usability" >&5
20108 $as_echo_n "checking sys/ipc.h usability... " >&6; }
20109 cat >conftest.$ac_ext <<_ACEOF
20110 /* confdefs.h.  */
20111 _ACEOF
20112 cat confdefs.h >>conftest.$ac_ext
20113 cat >>conftest.$ac_ext <<_ACEOF
20114 /* end confdefs.h.  */
20115 $ac_includes_default
20116 #include <sys/ipc.h>
20117 _ACEOF
20118 rm -rf conftest.$ac_objext
20119 if { (ac_try="$ac_compile"
20120 case "(($ac_try" in
20121   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20122   *) ac_try_echo=$ac_try;;
20123 esac
20124 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
20125 $as_echo "$ac_try_echo") >&5
20126   (eval "$ac_compile") 2>conftest.er1
20127   ac_status=$?
20128   grep -v '^ *+' conftest.er1 >conftest.err
20129   rm -rf conftest.er1
20130   cat conftest.err >&5
20131   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
20132   (exit $ac_status); } && {
20133          test -z "$ac_c_werror_flag" ||
20134          test ! -s conftest.err
20135        } && test -s conftest.$ac_objext; then
20136   ac_header_compiler=yes
20137 else
20138   $as_echo "$as_me: failed program was:" >&5
20139 sed 's/^/| /' conftest.$ac_ext >&5
20140
20141         ac_header_compiler=no
20142 fi
20143
20144 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
20145 { $as_echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
20146 $as_echo "$ac_header_compiler" >&6; }
20147
20148 # Is the header present?
20149 { $as_echo "$as_me:$LINENO: checking sys/ipc.h presence" >&5
20150 $as_echo_n "checking sys/ipc.h presence... " >&6; }
20151 cat >conftest.$ac_ext <<_ACEOF
20152 /* confdefs.h.  */
20153 _ACEOF
20154 cat confdefs.h >>conftest.$ac_ext
20155 cat >>conftest.$ac_ext <<_ACEOF
20156 /* end confdefs.h.  */
20157 #include <sys/ipc.h>
20158 _ACEOF
20159 if { (ac_try="$ac_cpp conftest.$ac_ext"
20160 case "(($ac_try" in
20161   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20162   *) ac_try_echo=$ac_try;;
20163 esac
20164 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
20165 $as_echo "$ac_try_echo") >&5
20166   (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
20167   ac_status=$?
20168   grep -v '^ *+' conftest.er1 >conftest.err
20169   rm -rf conftest.er1
20170   cat conftest.err >&5
20171   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
20172   (exit $ac_status); } >/dev/null && {
20173          test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
20174          test ! -s conftest.err
20175        }; then
20176   ac_header_preproc=yes
20177 else
20178   $as_echo "$as_me: failed program was:" >&5
20179 sed 's/^/| /' conftest.$ac_ext >&5
20180
20181   ac_header_preproc=no
20182 fi
20183
20184 rm -rf conftest.err conftest.$ac_ext
20185 { $as_echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
20186 $as_echo "$ac_header_preproc" >&6; }
20187
20188 # So?  What about this header?
20189 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
20190   yes:no: )
20191     { $as_echo "$as_me:$LINENO: WARNING: sys/ipc.h: accepted by the compiler, rejected by the preprocessor!" >&5
20192 $as_echo "$as_me: WARNING: sys/ipc.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
20193     { $as_echo "$as_me:$LINENO: WARNING: sys/ipc.h: proceeding with the compiler's result" >&5
20194 $as_echo "$as_me: WARNING: sys/ipc.h: proceeding with the compiler's result" >&2;}
20195     ac_header_preproc=yes
20196     ;;
20197   no:yes:* )
20198     { $as_echo "$as_me:$LINENO: WARNING: sys/ipc.h: present but cannot be compiled" >&5
20199 $as_echo "$as_me: WARNING: sys/ipc.h: present but cannot be compiled" >&2;}
20200     { $as_echo "$as_me:$LINENO: WARNING: sys/ipc.h:     check for missing prerequisite headers?" >&5
20201 $as_echo "$as_me: WARNING: sys/ipc.h:     check for missing prerequisite headers?" >&2;}
20202     { $as_echo "$as_me:$LINENO: WARNING: sys/ipc.h: see the Autoconf documentation" >&5
20203 $as_echo "$as_me: WARNING: sys/ipc.h: see the Autoconf documentation" >&2;}
20204     { $as_echo "$as_me:$LINENO: WARNING: sys/ipc.h:     section \"Present But Cannot Be Compiled\"" >&5
20205 $as_echo "$as_me: WARNING: sys/ipc.h:     section \"Present But Cannot Be Compiled\"" >&2;}
20206     { $as_echo "$as_me:$LINENO: WARNING: sys/ipc.h: proceeding with the preprocessor's result" >&5
20207 $as_echo "$as_me: WARNING: sys/ipc.h: proceeding with the preprocessor's result" >&2;}
20208     { $as_echo "$as_me:$LINENO: WARNING: sys/ipc.h: in the future, the compiler will take precedence" >&5
20209 $as_echo "$as_me: WARNING: sys/ipc.h: in the future, the compiler will take precedence" >&2;}
20210
20211     ;;
20212 esac
20213 { $as_echo "$as_me:$LINENO: checking for sys/ipc.h" >&5
20214 $as_echo_n "checking for sys/ipc.h... " >&6; }
20215 if test "${ac_cv_header_sys_ipc_h+set}" = set; then
20216   $as_echo_n "(cached) " >&6
20217 else
20218   ac_cv_header_sys_ipc_h=$ac_header_preproc
20219 fi
20220 { $as_echo "$as_me:$LINENO: result: $ac_cv_header_sys_ipc_h" >&5
20221 $as_echo "$ac_cv_header_sys_ipc_h" >&6; }
20222
20223 fi
20224 if test "x$ac_cv_header_sys_ipc_h" = x""yes; then
20225   have_xshm=yes
20226 fi
20227
20228
20229   CPPFLAGS="$ac_save_CPPFLAGS"
20230   fi
20231
20232   # if that succeeded, then check for sys/shm.h.
20233   if test "$have_xshm" = yes; then
20234     have_xshm=no
20235
20236   ac_save_CPPFLAGS="$CPPFLAGS"
20237   if test \! -z "$includedir" ; then
20238     CPPFLAGS="$CPPFLAGS -I$includedir"
20239   fi
20240   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
20241   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
20242   if test "${ac_cv_header_sys_shm_h+set}" = set; then
20243   { $as_echo "$as_me:$LINENO: checking for sys/shm.h" >&5
20244 $as_echo_n "checking for sys/shm.h... " >&6; }
20245 if test "${ac_cv_header_sys_shm_h+set}" = set; then
20246   $as_echo_n "(cached) " >&6
20247 fi
20248 { $as_echo "$as_me:$LINENO: result: $ac_cv_header_sys_shm_h" >&5
20249 $as_echo "$ac_cv_header_sys_shm_h" >&6; }
20250 else
20251   # Is the header compilable?
20252 { $as_echo "$as_me:$LINENO: checking sys/shm.h usability" >&5
20253 $as_echo_n "checking sys/shm.h usability... " >&6; }
20254 cat >conftest.$ac_ext <<_ACEOF
20255 /* confdefs.h.  */
20256 _ACEOF
20257 cat confdefs.h >>conftest.$ac_ext
20258 cat >>conftest.$ac_ext <<_ACEOF
20259 /* end confdefs.h.  */
20260 $ac_includes_default
20261 #include <sys/shm.h>
20262 _ACEOF
20263 rm -rf conftest.$ac_objext
20264 if { (ac_try="$ac_compile"
20265 case "(($ac_try" in
20266   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20267   *) ac_try_echo=$ac_try;;
20268 esac
20269 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
20270 $as_echo "$ac_try_echo") >&5
20271   (eval "$ac_compile") 2>conftest.er1
20272   ac_status=$?
20273   grep -v '^ *+' conftest.er1 >conftest.err
20274   rm -rf conftest.er1
20275   cat conftest.err >&5
20276   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
20277   (exit $ac_status); } && {
20278          test -z "$ac_c_werror_flag" ||
20279          test ! -s conftest.err
20280        } && test -s conftest.$ac_objext; then
20281   ac_header_compiler=yes
20282 else
20283   $as_echo "$as_me: failed program was:" >&5
20284 sed 's/^/| /' conftest.$ac_ext >&5
20285
20286         ac_header_compiler=no
20287 fi
20288
20289 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
20290 { $as_echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
20291 $as_echo "$ac_header_compiler" >&6; }
20292
20293 # Is the header present?
20294 { $as_echo "$as_me:$LINENO: checking sys/shm.h presence" >&5
20295 $as_echo_n "checking sys/shm.h presence... " >&6; }
20296 cat >conftest.$ac_ext <<_ACEOF
20297 /* confdefs.h.  */
20298 _ACEOF
20299 cat confdefs.h >>conftest.$ac_ext
20300 cat >>conftest.$ac_ext <<_ACEOF
20301 /* end confdefs.h.  */
20302 #include <sys/shm.h>
20303 _ACEOF
20304 if { (ac_try="$ac_cpp conftest.$ac_ext"
20305 case "(($ac_try" in
20306   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20307   *) ac_try_echo=$ac_try;;
20308 esac
20309 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
20310 $as_echo "$ac_try_echo") >&5
20311   (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
20312   ac_status=$?
20313   grep -v '^ *+' conftest.er1 >conftest.err
20314   rm -rf conftest.er1
20315   cat conftest.err >&5
20316   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
20317   (exit $ac_status); } >/dev/null && {
20318          test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
20319          test ! -s conftest.err
20320        }; then
20321   ac_header_preproc=yes
20322 else
20323   $as_echo "$as_me: failed program was:" >&5
20324 sed 's/^/| /' conftest.$ac_ext >&5
20325
20326   ac_header_preproc=no
20327 fi
20328
20329 rm -rf conftest.err conftest.$ac_ext
20330 { $as_echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
20331 $as_echo "$ac_header_preproc" >&6; }
20332
20333 # So?  What about this header?
20334 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
20335   yes:no: )
20336     { $as_echo "$as_me:$LINENO: WARNING: sys/shm.h: accepted by the compiler, rejected by the preprocessor!" >&5
20337 $as_echo "$as_me: WARNING: sys/shm.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
20338     { $as_echo "$as_me:$LINENO: WARNING: sys/shm.h: proceeding with the compiler's result" >&5
20339 $as_echo "$as_me: WARNING: sys/shm.h: proceeding with the compiler's result" >&2;}
20340     ac_header_preproc=yes
20341     ;;
20342   no:yes:* )
20343     { $as_echo "$as_me:$LINENO: WARNING: sys/shm.h: present but cannot be compiled" >&5
20344 $as_echo "$as_me: WARNING: sys/shm.h: present but cannot be compiled" >&2;}
20345     { $as_echo "$as_me:$LINENO: WARNING: sys/shm.h:     check for missing prerequisite headers?" >&5
20346 $as_echo "$as_me: WARNING: sys/shm.h:     check for missing prerequisite headers?" >&2;}
20347     { $as_echo "$as_me:$LINENO: WARNING: sys/shm.h: see the Autoconf documentation" >&5
20348 $as_echo "$as_me: WARNING: sys/shm.h: see the Autoconf documentation" >&2;}
20349     { $as_echo "$as_me:$LINENO: WARNING: sys/shm.h:     section \"Present But Cannot Be Compiled\"" >&5
20350 $as_echo "$as_me: WARNING: sys/shm.h:     section \"Present But Cannot Be Compiled\"" >&2;}
20351     { $as_echo "$as_me:$LINENO: WARNING: sys/shm.h: proceeding with the preprocessor's result" >&5
20352 $as_echo "$as_me: WARNING: sys/shm.h: proceeding with the preprocessor's result" >&2;}
20353     { $as_echo "$as_me:$LINENO: WARNING: sys/shm.h: in the future, the compiler will take precedence" >&5
20354 $as_echo "$as_me: WARNING: sys/shm.h: in the future, the compiler will take precedence" >&2;}
20355
20356     ;;
20357 esac
20358 { $as_echo "$as_me:$LINENO: checking for sys/shm.h" >&5
20359 $as_echo_n "checking for sys/shm.h... " >&6; }
20360 if test "${ac_cv_header_sys_shm_h+set}" = set; then
20361   $as_echo_n "(cached) " >&6
20362 else
20363   ac_cv_header_sys_shm_h=$ac_header_preproc
20364 fi
20365 { $as_echo "$as_me:$LINENO: result: $ac_cv_header_sys_shm_h" >&5
20366 $as_echo "$ac_cv_header_sys_shm_h" >&6; }
20367
20368 fi
20369 if test "x$ac_cv_header_sys_shm_h" = x""yes; then
20370   have_xshm=yes
20371 fi
20372
20373
20374   CPPFLAGS="$ac_save_CPPFLAGS"
20375   fi
20376
20377   # AIX is pathological, as usual: apparently it's normal for the Xshm headers
20378   # to exist, but the library code to not exist.  And even better, the library
20379   # code is in its own library: libXextSam.a.  So, if we're on AIX, and that
20380   # lib doesn't exist, give up.  (This lib gets added to X_EXTRA_LIBS, and
20381   # that's not quite right, but close enough.)
20382   #
20383   case "$host" in
20384     *-aix*)
20385       if  `uname -v` -eq 3 ; then
20386         have_xshm=no
20387
20388   ac_save_CPPFLAGS="$CPPFLAGS"
20389   ac_save_LDFLAGS="$LDFLAGS"
20390 #  ac_save_LIBS="$LIBS"
20391
20392   if test \! -z "$includedir" ; then
20393     CPPFLAGS="$CPPFLAGS -I$includedir"
20394   fi
20395   # note: $X_CFLAGS includes $x_includes
20396   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
20397
20398   if test \! -z "$libdir" ; then
20399     LDFLAGS="$LDFLAGS -L$libdir"
20400   fi
20401   # note: $X_LIBS includes $x_libraries
20402   LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
20403
20404   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
20405   LDFLAGS=`eval eval eval eval eval eval eval eval eval echo $LDFLAGS`
20406   { $as_echo "$as_me:$LINENO: checking for XShmQueryExtension in -lXextSam" >&5
20407 $as_echo_n "checking for XShmQueryExtension in -lXextSam... " >&6; }
20408 if test "${ac_cv_lib_XextSam_XShmQueryExtension+set}" = set; then
20409   $as_echo_n "(cached) " >&6
20410 else
20411   ac_check_lib_save_LIBS=$LIBS
20412 LIBS="-lXextSam -lX11 -lXext -lm $LIBS"
20413 cat >conftest.$ac_ext <<_ACEOF
20414 /* confdefs.h.  */
20415 _ACEOF
20416 cat confdefs.h >>conftest.$ac_ext
20417 cat >>conftest.$ac_ext <<_ACEOF
20418 /* end confdefs.h.  */
20419
20420 /* Override any GCC internal prototype to avoid an error.
20421    Use char because int might match the return type of a GCC
20422    builtin and then its argument prototype would still apply.  */
20423 #ifdef __cplusplus
20424 extern "C"
20425 #endif
20426 char XShmQueryExtension ();
20427 int
20428 main ()
20429 {
20430 return XShmQueryExtension ();
20431   ;
20432   return 0;
20433 }
20434 _ACEOF
20435 rm -rf conftest.$ac_objext conftest$ac_exeext
20436 if { (ac_try="$ac_link"
20437 case "(($ac_try" in
20438   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20439   *) ac_try_echo=$ac_try;;
20440 esac
20441 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
20442 $as_echo "$ac_try_echo") >&5
20443   (eval "$ac_link") 2>conftest.er1
20444   ac_status=$?
20445   grep -v '^ *+' conftest.er1 >conftest.err
20446   rm -rf conftest.er1
20447   cat conftest.err >&5
20448   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
20449   (exit $ac_status); } && {
20450          test -z "$ac_c_werror_flag" ||
20451          test ! -s conftest.err
20452        } && test -s conftest$ac_exeext && {
20453          test "$cross_compiling" = yes ||
20454          $as_test_x conftest$ac_exeext
20455        }; then
20456   ac_cv_lib_XextSam_XShmQueryExtension=yes
20457 else
20458   $as_echo "$as_me: failed program was:" >&5
20459 sed 's/^/| /' conftest.$ac_ext >&5
20460
20461         ac_cv_lib_XextSam_XShmQueryExtension=no
20462 fi
20463
20464 rm -rf conftest.dSYM
20465 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
20466       conftest$ac_exeext conftest.$ac_ext
20467 LIBS=$ac_check_lib_save_LIBS
20468 fi
20469 { $as_echo "$as_me:$LINENO: result: $ac_cv_lib_XextSam_XShmQueryExtension" >&5
20470 $as_echo "$ac_cv_lib_XextSam_XShmQueryExtension" >&6; }
20471 if test "x$ac_cv_lib_XextSam_XShmQueryExtension" = x""yes; then
20472   have_xshm=yes; X_EXTRA_LIBS="$X_EXTRA_LIBS -lXextSam"
20473 else
20474   true
20475 fi
20476
20477   CPPFLAGS="$ac_save_CPPFLAGS"
20478   LDFLAGS="$ac_save_LDFLAGS"
20479 #  LIBS="$ac_save_LIBS"
20480
20481       fi
20482     ;;
20483   esac
20484
20485   # if that succeeded, then we've really got it.
20486   if test "$have_xshm" = yes; then
20487     cat >>confdefs.h <<\_ACEOF
20488 #define HAVE_XSHM_EXTENSION 1
20489 _ACEOF
20490
20491   fi
20492
20493 elif test "$with_xshm" != no; then
20494   echo "error: must be yes or no: --with-xshm-ext=$with_xshm"
20495   exit 1
20496 fi
20497
20498
20499 ###############################################################################
20500 #
20501 #       Check for the DOUBLE-BUFFER server extension.
20502 #
20503 ###############################################################################
20504
20505 have_xdbe=no
20506 with_xdbe_req=unspecified
20507
20508 # Check whether --with-xdbe-ext was given.
20509 if test "${with_xdbe_ext+set}" = set; then
20510   withval=$with_xdbe_ext; with_xdbe="$withval"; with_xdbe_req="$withval"
20511 else
20512   with_xdbe=yes
20513 fi
20514
20515
20516
20517    case "$with_xdbe" in
20518     yes) ;;
20519     no)  ;;
20520
20521     /*)
20522      { $as_echo "$as_me:$LINENO: checking for DOUBLE-BUFFER headers" >&5
20523 $as_echo_n "checking for DOUBLE-BUFFER headers... " >&6; }
20524      d=$with_xdbe/include
20525      if test -d $d; then
20526        X_CFLAGS="-I$d $X_CFLAGS"
20527        { $as_echo "$as_me:$LINENO: result: $d" >&5
20528 $as_echo "$d" >&6; }
20529      else
20530        { $as_echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
20531 $as_echo "not found ($d: no such directory)" >&6; }
20532      fi
20533
20534      { $as_echo "$as_me:$LINENO: checking for DOUBLE-BUFFER libs" >&5
20535 $as_echo_n "checking for DOUBLE-BUFFER libs... " >&6; }
20536      d=$with_xdbe/lib
20537      if test -d $d; then
20538        X_LIBS="-L$d $X_LIBS"
20539        { $as_echo "$as_me:$LINENO: result: $d" >&5
20540 $as_echo "$d" >&6; }
20541      else
20542        { $as_echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
20543 $as_echo "not found ($d: no such directory)" >&6; }
20544      fi
20545
20546      # replace the directory string with "yes".
20547      with_xdbe_req="yes"
20548      with_xdbe=$with_xdbe_req
20549      ;;
20550
20551     *)
20552      echo ""
20553      echo "error: argument to --with-xdbe-ext must be \"yes\", \"no\", or a directory."
20554      echo "       If it is a directory, then \`DIR/include' will be added to"
20555      echo "       the -I list, and \`DIR/lib' will be added to the -L list."
20556      exit 1
20557      ;;
20558    esac
20559
20560
20561 if test "$with_xdbe" = yes; then
20562
20563
20564   ac_save_CPPFLAGS="$CPPFLAGS"
20565   if test \! -z "$includedir" ; then
20566     CPPFLAGS="$CPPFLAGS -I$includedir"
20567   fi
20568   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
20569   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
20570   { $as_echo "$as_me:$LINENO: checking for X11/extensions/Xdbe.h" >&5
20571 $as_echo_n "checking for X11/extensions/Xdbe.h... " >&6; }
20572 if test "${ac_cv_header_X11_extensions_Xdbe_h+set}" = set; then
20573   $as_echo_n "(cached) " >&6
20574 else
20575   cat >conftest.$ac_ext <<_ACEOF
20576 /* confdefs.h.  */
20577 _ACEOF
20578 cat confdefs.h >>conftest.$ac_ext
20579 cat >>conftest.$ac_ext <<_ACEOF
20580 /* end confdefs.h.  */
20581 #include <X11/Xlib.h>
20582
20583 #include <X11/extensions/Xdbe.h>
20584 _ACEOF
20585 rm -rf conftest.$ac_objext
20586 if { (ac_try="$ac_compile"
20587 case "(($ac_try" in
20588   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20589   *) ac_try_echo=$ac_try;;
20590 esac
20591 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
20592 $as_echo "$ac_try_echo") >&5
20593   (eval "$ac_compile") 2>conftest.er1
20594   ac_status=$?
20595   grep -v '^ *+' conftest.er1 >conftest.err
20596   rm -rf conftest.er1
20597   cat conftest.err >&5
20598   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
20599   (exit $ac_status); } && {
20600          test -z "$ac_c_werror_flag" ||
20601          test ! -s conftest.err
20602        } && test -s conftest.$ac_objext; then
20603   ac_cv_header_X11_extensions_Xdbe_h=yes
20604 else
20605   $as_echo "$as_me: failed program was:" >&5
20606 sed 's/^/| /' conftest.$ac_ext >&5
20607
20608         ac_cv_header_X11_extensions_Xdbe_h=no
20609 fi
20610
20611 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
20612 fi
20613 { $as_echo "$as_me:$LINENO: result: $ac_cv_header_X11_extensions_Xdbe_h" >&5
20614 $as_echo "$ac_cv_header_X11_extensions_Xdbe_h" >&6; }
20615 if test "x$ac_cv_header_X11_extensions_Xdbe_h" = x""yes; then
20616   have_xdbe=yes
20617 fi
20618
20619
20620   CPPFLAGS="$ac_save_CPPFLAGS"
20621   if test "$have_xdbe" = yes; then
20622     cat >>confdefs.h <<\_ACEOF
20623 #define HAVE_DOUBLE_BUFFER_EXTENSION 1
20624 _ACEOF
20625
20626   fi
20627
20628 elif test "$with_xdbe" != no; then
20629   echo "error: must be yes or no: --with-xdbe-ext=$with_xshm"
20630   exit 1
20631 fi
20632
20633
20634 ###############################################################################
20635 #
20636 #       Check for the SGI XReadDisplay server extension.
20637 #
20638 #       Note: this has to be down here, rather than up with the other server
20639 #       extension tests, so that the output of `configure --help' is in the
20640 #       right order.  Arrgh!
20641 #
20642 ###############################################################################
20643
20644 have_readdisplay=no
20645 with_readdisplay_req=unspecified
20646
20647 # Check whether --with-readdisplay was given.
20648 if test "${with_readdisplay+set}" = set; then
20649   withval=$with_readdisplay; with_readdisplay="$withval"; with_readdisplay_req="$withval"
20650 else
20651   with_readdisplay=yes
20652 fi
20653
20654
20655
20656    case "$with_readdisplay" in
20657     yes) ;;
20658     no)  ;;
20659
20660     /*)
20661      { $as_echo "$as_me:$LINENO: checking for XReadDisplay headers" >&5
20662 $as_echo_n "checking for XReadDisplay headers... " >&6; }
20663      d=$with_readdisplay/include
20664      if test -d $d; then
20665        X_CFLAGS="-I$d $X_CFLAGS"
20666        { $as_echo "$as_me:$LINENO: result: $d" >&5
20667 $as_echo "$d" >&6; }
20668      else
20669        { $as_echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
20670 $as_echo "not found ($d: no such directory)" >&6; }
20671      fi
20672
20673      { $as_echo "$as_me:$LINENO: checking for XReadDisplay libs" >&5
20674 $as_echo_n "checking for XReadDisplay libs... " >&6; }
20675      d=$with_readdisplay/lib
20676      if test -d $d; then
20677        X_LIBS="-L$d $X_LIBS"
20678        { $as_echo "$as_me:$LINENO: result: $d" >&5
20679 $as_echo "$d" >&6; }
20680      else
20681        { $as_echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
20682 $as_echo "not found ($d: no such directory)" >&6; }
20683      fi
20684
20685      # replace the directory string with "yes".
20686      with_readdisplay_req="yes"
20687      with_readdisplay=$with_readdisplay_req
20688      ;;
20689
20690     *)
20691      echo ""
20692      echo "error: argument to --with-readdisplay must be \"yes\", \"no\", or a directory."
20693      echo "       If it is a directory, then \`DIR/include' will be added to"
20694      echo "       the -I list, and \`DIR/lib' will be added to the -L list."
20695      exit 1
20696      ;;
20697    esac
20698
20699
20700 if test "$with_readdisplay" = yes; then
20701
20702   ac_save_CPPFLAGS="$CPPFLAGS"
20703   if test \! -z "$includedir" ; then
20704     CPPFLAGS="$CPPFLAGS -I$includedir"
20705   fi
20706   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
20707   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
20708   { $as_echo "$as_me:$LINENO: checking for X11/extensions/readdisplay.h" >&5
20709 $as_echo_n "checking for X11/extensions/readdisplay.h... " >&6; }
20710 if test "${ac_cv_header_X11_extensions_readdisplay_h+set}" = set; then
20711   $as_echo_n "(cached) " >&6
20712 else
20713   cat >conftest.$ac_ext <<_ACEOF
20714 /* confdefs.h.  */
20715 _ACEOF
20716 cat confdefs.h >>conftest.$ac_ext
20717 cat >>conftest.$ac_ext <<_ACEOF
20718 /* end confdefs.h.  */
20719 #include <X11/Xlib.h>
20720
20721 #include <X11/extensions/readdisplay.h>
20722 _ACEOF
20723 rm -rf conftest.$ac_objext
20724 if { (ac_try="$ac_compile"
20725 case "(($ac_try" in
20726   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20727   *) ac_try_echo=$ac_try;;
20728 esac
20729 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
20730 $as_echo "$ac_try_echo") >&5
20731   (eval "$ac_compile") 2>conftest.er1
20732   ac_status=$?
20733   grep -v '^ *+' conftest.er1 >conftest.err
20734   rm -rf conftest.er1
20735   cat conftest.err >&5
20736   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
20737   (exit $ac_status); } && {
20738          test -z "$ac_c_werror_flag" ||
20739          test ! -s conftest.err
20740        } && test -s conftest.$ac_objext; then
20741   ac_cv_header_X11_extensions_readdisplay_h=yes
20742 else
20743   $as_echo "$as_me: failed program was:" >&5
20744 sed 's/^/| /' conftest.$ac_ext >&5
20745
20746         ac_cv_header_X11_extensions_readdisplay_h=no
20747 fi
20748
20749 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
20750 fi
20751 { $as_echo "$as_me:$LINENO: result: $ac_cv_header_X11_extensions_readdisplay_h" >&5
20752 $as_echo "$ac_cv_header_X11_extensions_readdisplay_h" >&6; }
20753 if test "x$ac_cv_header_X11_extensions_readdisplay_h" = x""yes; then
20754   cat >>confdefs.h <<\_ACEOF
20755 #define HAVE_READ_DISPLAY_EXTENSION 1
20756 _ACEOF
20757
20758 fi
20759
20760
20761   CPPFLAGS="$ac_save_CPPFLAGS"
20762 elif test "$with_readdisplay" != no; then
20763   echo "error: must be yes or no: --with-readdisplay=$with_readdisplay"
20764   exit 1
20765 fi
20766
20767
20768 ###############################################################################
20769 #
20770 #       Check for a directory full of images to use as the default value
20771 #       of the "imageDirectory" preference.
20772 #
20773 ###############################################################################
20774
20775 have_imagedir=no
20776 with_imagedir_req=unspecified
20777
20778
20779 # Check whether --with-image-directory was given.
20780 if test "${with_image_directory+set}" = set; then
20781   withval=$with_image_directory; with_imagedir="$withval"; with_imagedir_req="$withval"
20782 else
20783   with_imagedir=yes
20784 fi
20785
20786 # no HANDLE_X_PATH_ARG for this one
20787
20788 case "$with_imagedir" in
20789   /*)
20790     # absolute path
20791     { $as_echo "$as_me:$LINENO: checking for image directory $with_imagedir" >&5
20792 $as_echo_n "checking for image directory $with_imagedir... " >&6; }
20793     if test -d "$with_imagedir" ; then
20794       { $as_echo "$as_me:$LINENO: result: yes" >&5
20795 $as_echo "yes" >&6; }
20796     else
20797       { $as_echo "$as_me:$LINENO: result: no" >&5
20798 $as_echo "no" >&6; }
20799       with_imagedir=""
20800     fi
20801   ;;
20802   yes)
20803     with_imagedir=""
20804
20805     #### Could use some more defaults here...
20806     for dd in \
20807       "/usr/share/backgrounds/images/"          \
20808       "/usr/share/wallpapers/"                  \
20809       "/Library/Desktop Pictures/"              \
20810     ; do
20811       if test -z "$with_imagedir"; then
20812         { $as_echo "$as_me:$LINENO: checking for image directory $dd" >&5
20813 $as_echo_n "checking for image directory $dd... " >&6; }
20814         if test -d "$dd" ; then
20815           { $as_echo "$as_me:$LINENO: result: yes" >&5
20816 $as_echo "yes" >&6; }
20817           with_imagedir="$dd"
20818         else
20819           { $as_echo "$as_me:$LINENO: result: no" >&5
20820 $as_echo "no" >&6; }
20821         fi
20822       fi
20823     done
20824
20825   ;;
20826   no)
20827     with_imagedir=""
20828   ;;
20829
20830   *)
20831     echo "error: must be an absolute path: --with-image-directory=$with_imagedir_req"
20832     exit 1
20833   ;;
20834 esac
20835 ac_cv_imagedir="$with_imagedir"
20836
20837 DEFAULT_IMAGES_P='True'
20838 DEFAULT_IMAGE_DIRECTORY="$ac_cv_imagedir"
20839
20840 if test -z "$DEFAULT_IMAGE_DIRECTORY" ; then
20841   DEFAULT_IMAGES_P='False'
20842 fi
20843
20844
20845 ###############################################################################
20846 #
20847 #       Pick a text file to use as the default of the "textFile" preference.
20848 #       Any old file will do, but preferably one that will make interesting
20849 #       shapes when displayed by "starwars" and "fontglide".
20850 #
20851 ###############################################################################
20852
20853 have_textfile=no
20854 with_textfile_req=unspecified
20855
20856
20857 # Check whether --with-text-file was given.
20858 if test "${with_text_file+set}" = set; then
20859   withval=$with_text_file; with_textfile="$withval"; with_textfile_req="$withval"
20860 else
20861   with_textfile=yes
20862 fi
20863
20864 # no HANDLE_X_PATH_ARG for this one
20865
20866 case "$with_textfile" in
20867   /*)
20868     # absolute path
20869     { $as_echo "$as_me:$LINENO: checking for text file $with_textfile" >&5
20870 $as_echo_n "checking for text file $with_textfile... " >&6; }
20871     if test -f "$with_textfile" ; then
20872       { $as_echo "$as_me:$LINENO: result: yes" >&5
20873 $as_echo "yes" >&6; }
20874     else
20875       { $as_echo "$as_me:$LINENO: result: no" >&5
20876 $as_echo "no" >&6; }
20877       with_textfile=""
20878     fi
20879   ;;
20880   yes)
20881     with_textfile=""
20882
20883     #### Could use some more defaults here...
20884     for f in \
20885       "/usr/X11R6/lib/X11/doc/README"              \
20886       "/usr/share/doc/xserver-common/copyright"    \
20887       "/usr/share/doc/xserver-xorg-core/copyright" \
20888       "/usr/X11R6/README"                          \
20889       "/usr/share/doc/libX11*/COPYING"             \
20890       "/usr/X11/share/X11/doc/README*"             \
20891       "/usr/share/doc/debian/debian-manifesto"     \
20892     ; do
20893       if test -z "$with_textfile"; then
20894         { $as_echo "$as_me:$LINENO: checking for text file $f" >&5
20895 $as_echo_n "checking for text file $f... " >&6; }
20896         f=`/bin/ls $f 2>&- | head -1`
20897         if test -f "$f" ; then
20898           { $as_echo "$as_me:$LINENO: result: yes" >&5
20899 $as_echo "yes" >&6; }
20900           with_textfile="$f"
20901         else
20902           { $as_echo "$as_me:$LINENO: result: no" >&5
20903 $as_echo "no" >&6; }
20904         fi
20905       fi
20906     done
20907
20908   ;;
20909   no)
20910     with_textfile=""
20911   ;;
20912
20913   *)
20914     echo "error: must be an absolute path: --with-text-file=$with_textfile_req"
20915     exit 1
20916   ;;
20917 esac
20918 ac_cv_textfile="$with_textfile"
20919
20920 DEFAULT_TEXT_FILE="$ac_cv_textfile"
20921
20922
20923 ###############################################################################
20924 #
20925 #       Check the browser to see help URL
20926 #
20927 ###############################################################################
20928
20929 have_browser=no
20930 with_browser_req=unspecified
20931
20932
20933 # Check whether --with-browser was given.
20934 if test "${with_browser+set}" = set; then
20935   withval=$with_browser; with_browser="$withval"; with_browser_req="$withval"
20936 else
20937   with_browser=no
20938 fi
20939
20940 # no HANDLE_X_PATH_ARG for this one
20941
20942 case "$with_browser" in
20943   no )
20944   ;;
20945   * )
20946     WITH_BROWSER=$with_browser
20947     gnome_open_program=$with_browser
20948     { $as_echo "$as_me:$LINENO: checking for browser $with_browser" >&5
20949 $as_echo_n "checking for browser $with_browser... " >&6; }
20950     with_browser_fullpath=`which $with_browser 2>/dev/null`
20951     case $with_browser_fullpath in
20952          /* )
20953                 { $as_echo "$as_me:$LINENO: result: yes" >&5
20954 $as_echo "yes" >&6; }
20955                  have_browser=yes
20956                  ;;
20957         * )
20958                { $as_echo "$as_me:$LINENO: result: no" >&5
20959 $as_echo "no" >&6; }
20960 # Only warning: we don't want to install all packages for the
20961 # dependency of the browser in building stage...
20962                echo "WARNING: browser not found: --with-browser=$with_browser"
20963                ;;
20964     esac
20965   ;;
20966 esac
20967 ac_cv_browser="$with_browser"
20968
20969 ###############################################################################
20970 #
20971 #       Check whether it's ok to install some hacks as setuid (e.g., "sonar")
20972 #       This should be safe, but let's give people the option.
20973 #
20974 ###############################################################################
20975
20976 setuid_hacks_default=no
20977 setuid_hacks="$setuid_hacks_default"
20978
20979 # Check whether --with-setuid-hacks was given.
20980 if test "${with_setuid_hacks+set}" = set; then
20981   withval=$with_setuid_hacks; setuid_hacks="$withval"
20982 else
20983   setuid_hacks="$setuid_hacks_default"
20984 fi
20985
20986
20987
20988    case "$setuid_hacks" in
20989     yes) ;;
20990     no)  ;;
20991
20992     /*)
20993      { $as_echo "$as_me:$LINENO: checking for setuid hacks headers" >&5
20994 $as_echo_n "checking for setuid hacks headers... " >&6; }
20995      d=$setuid_hacks/include
20996      if test -d $d; then
20997        X_CFLAGS="-I$d $X_CFLAGS"
20998        { $as_echo "$as_me:$LINENO: result: $d" >&5
20999 $as_echo "$d" >&6; }
21000      else
21001        { $as_echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
21002 $as_echo "not found ($d: no such directory)" >&6; }
21003      fi
21004
21005      { $as_echo "$as_me:$LINENO: checking for setuid hacks libs" >&5
21006 $as_echo_n "checking for setuid hacks libs... " >&6; }
21007      d=$setuid_hacks/lib
21008      if test -d $d; then
21009        X_LIBS="-L$d $X_LIBS"
21010        { $as_echo "$as_me:$LINENO: result: $d" >&5
21011 $as_echo "$d" >&6; }
21012      else
21013        { $as_echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
21014 $as_echo "not found ($d: no such directory)" >&6; }
21015      fi
21016
21017      # replace the directory string with "yes".
21018      setuid_hacks_req="yes"
21019      setuid_hacks=$setuid_hacks_req
21020      ;;
21021
21022     *)
21023      echo ""
21024      echo "error: argument to --with-setuid-hacks must be \"yes\", \"no\", or a directory."
21025      echo "       If it is a directory, then \`DIR/include' will be added to"
21026      echo "       the -I list, and \`DIR/lib' will be added to the -L list."
21027      exit 1
21028      ;;
21029    esac
21030
21031
21032 if test "$setuid_hacks" = yes; then
21033   true
21034 elif test "$setuid_hacks" != no; then
21035   echo "error: must be yes or no: --with-setuid-hacks=$setuid_hacks"
21036   exit 1
21037 fi
21038
21039
21040 ###############################################################################
21041 #
21042 #       Done testing.  Now, set up the various -I and -L variables,
21043 #       and decide which GUI program to build by default.
21044 #
21045 ###############################################################################
21046
21047 DEPEND=makedepend
21048 DEPEND_FLAGS=
21049 DEPEND_DEFINES=
21050
21051
21052 if test \! -z "$includedir" ; then
21053   INCLUDES="$INCLUDES -I$includedir"
21054 fi
21055
21056 if test \! -z "$libdir" ; then
21057   LDFLAGS="$LDFLAGS -L$libdir"
21058 fi
21059
21060
21061 PREFERRED_DEMO_PROGRAM=''
21062 ALL_DEMO_PROGRAMS=
21063 if test "$have_motif" = yes; then
21064   PREFERRED_DEMO_PROGRAM=xscreensaver-demo-Xm
21065   ALL_DEMO_PROGRAMS="$PREFERRED_DEMO_PROGRAM $ALL_DEMO_PROGRAMS"
21066 fi
21067 if test "$have_gtk" = yes; then
21068   PREFERRED_DEMO_PROGRAM=xscreensaver-demo-Gtk
21069   ALL_DEMO_PROGRAMS="$PREFERRED_DEMO_PROGRAM $ALL_DEMO_PROGRAMS"
21070 fi
21071
21072
21073 if test "$have_kerberos" = yes; then
21074   PASSWD_SRCS="$PASSWD_SRCS \$(KERBEROS_SRCS)"
21075   PASSWD_OBJS="$PASSWD_OBJS \$(KERBEROS_OBJS)"
21076 fi
21077 if test "$have_pam" = yes; then
21078   PASSWD_SRCS="$PASSWD_SRCS \$(PAM_SRCS)"
21079   PASSWD_OBJS="$PASSWD_OBJS \$(PAM_OBJS)"
21080   INSTALL_PAM="install-pam"
21081 fi
21082 if test "$enable_pam_check_account_type" = yes; then
21083   COMMENT_PAM_CHECK_ACCOUNT=""
21084 else
21085   COMMENT_PAM_CHECK_ACCOUNT="#"
21086 fi
21087 if test "$have_passwd_helper" = yes; then
21088   PASSWD_SRCS="$PASSWD_SRCS \$(PWHELPER_SRCS)"
21089   PASSWD_OBJS="$PASSWD_OBJS \$(PWHELPER_OBJS)"
21090 fi
21091   PASSWD_SRCS="$PASSWD_SRCS \$(PWENT_SRCS)"
21092   PASSWD_OBJS="$PASSWD_OBJS \$(PWENT_OBJS)"
21093
21094
21095 if test "$enable_locking" = yes; then
21096   LOCK_SRCS='$(LOCK_SRCS_1) $(PASSWD_SRCS)'
21097   LOCK_OBJS='$(LOCK_OBJS_1) $(PASSWD_OBJS)'
21098 else
21099   LOCK_SRCS='$(NOLOCK_SRCS_1)'
21100   LOCK_OBJS='$(NOLOCK_OBJS_1)'
21101 fi
21102
21103 if test "$ac_macosx" = yes; then
21104   EXES_OSX='$(EXES_OSX)'
21105   SCRIPTS_OSX='$(SCRIPTS_OSX)'
21106   MEN_OSX='$(MEN_OSX)'
21107 else
21108   EXES_OSX=
21109   SCRIPTS_OSX=
21110   MEN_OSX=
21111 fi
21112
21113
21114 INSTALL_SETUID='$(INSTALL_PROGRAM) $(SUID_FLAGS)'
21115
21116 if test "$need_setuid" = yes; then
21117   NEED_SETUID=yes
21118 else
21119   NEED_SETUID=no
21120 fi
21121
21122 if test "$setuid_hacks" = yes; then
21123   SETUID_HACKS=yes
21124 else
21125   SETUID_HACKS=no
21126 fi
21127
21128 tab='   '
21129 if test "$have_gl" = yes; then
21130   GL_EXES='$(GL_EXES)'
21131   SUID_EXES='$(SUID_EXES)'
21132   RETIRED_GL_EXES='$(RETIRED_GL_EXES)'
21133   GL_UTIL_EXES='$(GL_UTIL_EXES)'
21134   GL_MEN='$(GL_MEN)'
21135   GL_KLUDGE=" "
21136 else
21137   GL_KLUDGE="-"
21138 fi
21139
21140 if test "$have_gle" = yes; then
21141   GLE_EXES='$(GLE_EXES)'
21142   GLE_KLUDGE=" "
21143 else
21144   GLE_KLUDGE="-"
21145 fi
21146
21147 if test "$have_jpeg" = yes -a "$have_gdk_pixbuf" = yes; then
21148  JPEG_EXES='$(JPEG_EXES)'
21149 fi
21150
21151
21152 # Another substitution in the XScreenSaver.ad.in file:
21153 #
21154 if test "$gnome_open_program" != ''; then
21155   GNOME24=''
21156   GNOME22='!    '
21157   NOGNOME='!    '
21158 elif test "$gnome_url_show_program" != ''; then
21159   GNOME24='!    '
21160   GNOME22=''
21161   NOGNOME='!    '
21162 else
21163   GNOME24='!    '
21164   GNOME22='!    '
21165   NOGNOME=''
21166 fi
21167
21168
21169 # Set PO_DATADIR to something sensible.
21170 #
21171 { $as_echo "$as_me:$LINENO: checking for locale directory" >&5
21172 $as_echo_n "checking for locale directory... " >&6; }
21173 if test -n "$GTK_DATADIR" ; then
21174   PO_DATADIR="$GTK_DATADIR"
21175 elif test "$have_gtk" = yes; then
21176   PO_DATADIR=`$pkg_config --variable=prefix gtk+-2.0`
21177   PO_DATADIR="$PO_DATADIR/share"
21178 fi
21179
21180 if test -z "$PO_DATADIR" ; then
21181   #
21182   # #### Total fucking kludge --
21183   # Map /build/prefix/usr/X11R6/share/ to /build/prefix/usr/share/
21184   # but of course we need to expand all the nested variables to do that...
21185   #
21186   dd=`eval eval eval eval eval eval eval eval eval eval eval echo $datadir`
21187   PO_DATADIR=`echo $dd | sed 's@/X11R6/@/@'`
21188 fi
21189
21190 { $as_echo "$as_me:$LINENO: result: $PO_DATADIR/locale" >&5
21191 $as_echo "$PO_DATADIR/locale" >&6; }
21192
21193
21194 # canonicalize slashes.
21195 HACK_CONF_DIR=`echo "${HACK_CONF_DIR}" | sed 's@/$@@;s@//*@/@g'`
21196
21197 # gcc 3.0 likes to issue this warning for every file:
21198 #
21199 # cc1: warning: changing search order for system directory "/usr/local/include"
21200 # cc1: warning:   as it has already been specified as a non-system directory
21201 #
21202 # Yay.  We can only avoid that by deleting "-I${prefix}/include" from the list.
21203 # Which *should* be totally redundant, and thus an ok thing to delete?
21204 #
21205 INCLUDES=`echo "$INCLUDES" | sed 's@ -I${prefix}/include@@g;'`
21206
21207
21208 ###############################################################################
21209 #
21210 #       Perform substitutions and write Makefiles.
21211 #
21212 ###############################################################################
21213
21214
21215
21216
21217
21218
21219
21220
21221
21222
21223
21224
21225
21226
21227
21228
21229
21230
21231
21232
21233
21234
21235
21236
21237
21238
21239
21240
21241
21242
21243
21244
21245
21246
21247
21248
21249
21250
21251
21252
21253
21254
21255
21256
21257
21258
21259
21260
21261
21262
21263
21264
21265
21266
21267
21268
21269
21270
21271
21272
21273
21274
21275
21276
21277
21278
21279
21280
21281
21282 APPDEFAULTS=$ac_x_app_defaults
21283
21284
21285
21286
21287
21288
21289
21290 ac_config_files="$ac_config_files Makefile utils/Makefile driver/Makefile driver/xscreensaver.pam hacks/Makefile hacks/glx/Makefile po/Makefile.in driver/XScreenSaver.ad"
21291
21292 cat >confcache <<\_ACEOF
21293 # This file is a shell script that caches the results of configure
21294 # tests run on this system so they can be shared between configure
21295 # scripts and configure runs, see configure's option --config-cache.
21296 # It is not useful on other systems.  If it contains results you don't
21297 # want to keep, you may remove or edit it.
21298 #
21299 # config.status only pays attention to the cache file if you give it
21300 # the --recheck option to rerun configure.
21301 #
21302 # `ac_cv_env_foo' variables (set or unset) will be overridden when
21303 # loading this file, other *unset* `ac_cv_foo' will be assigned the
21304 # following values.
21305
21306 _ACEOF
21307
21308 # The following way of writing the cache mishandles newlines in values,
21309 # but we know of no workaround that is simple, portable, and efficient.
21310 # So, we kill variables containing newlines.
21311 # Ultrix sh set writes to stderr and can't be redirected directly,
21312 # and sets the high bit in the cache file unless we assign to the vars.
21313 (
21314   for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
21315     eval ac_val=\$$ac_var
21316     case $ac_val in #(
21317     *${as_nl}*)
21318       case $ac_var in #(
21319       *_cv_*) { $as_echo "$as_me:$LINENO: WARNING: cache variable $ac_var contains a newline" >&5
21320 $as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
21321       esac
21322       case $ac_var in #(
21323       _ | IFS | as_nl) ;; #(
21324       BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
21325       *) $as_unset $ac_var ;;
21326       esac ;;
21327     esac
21328   done
21329
21330   (set) 2>&1 |
21331     case $as_nl`(ac_space=' '; set) 2>&1` in #(
21332     *${as_nl}ac_space=\ *)
21333       # `set' does not quote correctly, so add quotes (double-quote
21334       # substitution turns \\\\ into \\, and sed turns \\ into \).
21335       sed -n \
21336         "s/'/'\\\\''/g;
21337           s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
21338       ;; #(
21339     *)
21340       # `set' quotes correctly as required by POSIX, so do not add quotes.
21341       sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
21342       ;;
21343     esac |
21344     sort
21345 ) |
21346   sed '
21347      /^ac_cv_env_/b end
21348      t clear
21349      :clear
21350      s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
21351      t end
21352      s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
21353      :end' >>confcache
21354 if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
21355   if test -w "$cache_file"; then
21356     test "x$cache_file" != "x/dev/null" &&
21357       { $as_echo "$as_me:$LINENO: updating cache $cache_file" >&5
21358 $as_echo "$as_me: updating cache $cache_file" >&6;}
21359     cat confcache >$cache_file
21360   else
21361     { $as_echo "$as_me:$LINENO: not updating unwritable cache $cache_file" >&5
21362 $as_echo "$as_me: not updating unwritable cache $cache_file" >&6;}
21363   fi
21364 fi
21365 rm -f confcache
21366
21367 test "x$prefix" = xNONE && prefix=$ac_default_prefix
21368 # Let make expand exec_prefix.
21369 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
21370
21371 DEFS=-DHAVE_CONFIG_H
21372
21373 ac_libobjs=
21374 ac_ltlibobjs=
21375 for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
21376   # 1. Remove the extension, and $U if already installed.
21377   ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
21378   ac_i=`$as_echo "$ac_i" | sed "$ac_script"`
21379   # 2. Prepend LIBOBJDIR.  When used with automake>=1.10 LIBOBJDIR
21380   #    will be set to the directory where LIBOBJS objects are built.
21381   ac_libobjs="$ac_libobjs \${LIBOBJDIR}$ac_i\$U.$ac_objext"
21382   ac_ltlibobjs="$ac_ltlibobjs \${LIBOBJDIR}$ac_i"'$U.lo'
21383 done
21384 LIBOBJS=$ac_libobjs
21385
21386 LTLIBOBJS=$ac_ltlibobjs
21387
21388
21389
21390
21391         mv -f po/POTFILES po/POTFILES.tmp
21392         sed -e 's/\[.*\] *//' < po/POTFILES.tmp > po/POTFILES
21393         rm -f po/POTFILES.tmp
21394
21395
21396
21397 : ${CONFIG_STATUS=./config.status}
21398 ac_write_fail=0
21399 ac_clean_files_save=$ac_clean_files
21400 ac_clean_files="$ac_clean_files $CONFIG_STATUS"
21401 { $as_echo "$as_me:$LINENO: creating $CONFIG_STATUS" >&5
21402 $as_echo "$as_me: creating $CONFIG_STATUS" >&6;}
21403 cat >$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
21404 #! $SHELL
21405 # Generated by $as_me.
21406 # Run this file to recreate the current configuration.
21407 # Compiler output produced by configure, useful for debugging
21408 # configure, is in config.log if it exists.
21409
21410 debug=false
21411 ac_cs_recheck=false
21412 ac_cs_silent=false
21413 SHELL=\${CONFIG_SHELL-$SHELL}
21414 _ACEOF
21415
21416 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
21417 ## --------------------- ##
21418 ## M4sh Initialization.  ##
21419 ## --------------------- ##
21420
21421 # Be more Bourne compatible
21422 DUALCASE=1; export DUALCASE # for MKS sh
21423 if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
21424   emulate sh
21425   NULLCMD=:
21426   # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
21427   # is contrary to our usage.  Disable this feature.
21428   alias -g '${1+"$@"}'='"$@"'
21429   setopt NO_GLOB_SUBST
21430 else
21431   case `(set -o) 2>/dev/null` in
21432   *posix*) set -o posix ;;
21433 esac
21434
21435 fi
21436
21437
21438
21439
21440 # PATH needs CR
21441 # Avoid depending upon Character Ranges.
21442 as_cr_letters='abcdefghijklmnopqrstuvwxyz'
21443 as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
21444 as_cr_Letters=$as_cr_letters$as_cr_LETTERS
21445 as_cr_digits='0123456789'
21446 as_cr_alnum=$as_cr_Letters$as_cr_digits
21447
21448 as_nl='
21449 '
21450 export as_nl
21451 # Printing a long string crashes Solaris 7 /usr/bin/printf.
21452 as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
21453 as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
21454 as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
21455 if (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
21456   as_echo='printf %s\n'
21457   as_echo_n='printf %s'
21458 else
21459   if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
21460     as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
21461     as_echo_n='/usr/ucb/echo -n'
21462   else
21463     as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
21464     as_echo_n_body='eval
21465       arg=$1;
21466       case $arg in
21467       *"$as_nl"*)
21468         expr "X$arg" : "X\\(.*\\)$as_nl";
21469         arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
21470       esac;
21471       expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
21472     '
21473     export as_echo_n_body
21474     as_echo_n='sh -c $as_echo_n_body as_echo'
21475   fi
21476   export as_echo_body
21477   as_echo='sh -c $as_echo_body as_echo'
21478 fi
21479
21480 # The user is always right.
21481 if test "${PATH_SEPARATOR+set}" != set; then
21482   PATH_SEPARATOR=:
21483   (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
21484     (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
21485       PATH_SEPARATOR=';'
21486   }
21487 fi
21488
21489 # Support unset when possible.
21490 if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then
21491   as_unset=unset
21492 else
21493   as_unset=false
21494 fi
21495
21496
21497 # IFS
21498 # We need space, tab and new line, in precisely that order.  Quoting is
21499 # there to prevent editors from complaining about space-tab.
21500 # (If _AS_PATH_WALK were called with IFS unset, it would disable word
21501 # splitting by setting IFS to empty value.)
21502 IFS=" ""        $as_nl"
21503
21504 # Find who we are.  Look in the path if we contain no directory separator.
21505 case $0 in
21506   *[\\/]* ) as_myself=$0 ;;
21507   *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21508 for as_dir in $PATH
21509 do
21510   IFS=$as_save_IFS
21511   test -z "$as_dir" && as_dir=.
21512   test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
21513 done
21514 IFS=$as_save_IFS
21515
21516      ;;
21517 esac
21518 # We did not find ourselves, most probably we were run as `sh COMMAND'
21519 # in which case we are not to be found in the path.
21520 if test "x$as_myself" = x; then
21521   as_myself=$0
21522 fi
21523 if test ! -f "$as_myself"; then
21524   $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
21525   { (exit 1); exit 1; }
21526 fi
21527
21528 # Work around bugs in pre-3.0 UWIN ksh.
21529 for as_var in ENV MAIL MAILPATH
21530 do ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var
21531 done
21532 PS1='$ '
21533 PS2='> '
21534 PS4='+ '
21535
21536 # NLS nuisances.
21537 LC_ALL=C
21538 export LC_ALL
21539 LANGUAGE=C
21540 export LANGUAGE
21541
21542 # Required to use basename.
21543 if expr a : '\(a\)' >/dev/null 2>&1 &&
21544    test "X`expr 00001 : '.*\(...\)'`" = X001; then
21545   as_expr=expr
21546 else
21547   as_expr=false
21548 fi
21549
21550 if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
21551   as_basename=basename
21552 else
21553   as_basename=false
21554 fi
21555
21556
21557 # Name of the executable.
21558 as_me=`$as_basename -- "$0" ||
21559 $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
21560          X"$0" : 'X\(//\)$' \| \
21561          X"$0" : 'X\(/\)' \| . 2>/dev/null ||
21562 $as_echo X/"$0" |
21563     sed '/^.*\/\([^/][^/]*\)\/*$/{
21564             s//\1/
21565             q
21566           }
21567           /^X\/\(\/\/\)$/{
21568             s//\1/
21569             q
21570           }
21571           /^X\/\(\/\).*/{
21572             s//\1/
21573             q
21574           }
21575           s/.*/./; q'`
21576
21577 # CDPATH.
21578 $as_unset CDPATH
21579
21580
21581
21582   as_lineno_1=$LINENO
21583   as_lineno_2=$LINENO
21584   test "x$as_lineno_1" != "x$as_lineno_2" &&
21585   test "x`expr $as_lineno_1 + 1`" = "x$as_lineno_2" || {
21586
21587   # Create $as_me.lineno as a copy of $as_myself, but with $LINENO
21588   # uniformly replaced by the line number.  The first 'sed' inserts a
21589   # line-number line after each line using $LINENO; the second 'sed'
21590   # does the real work.  The second script uses 'N' to pair each
21591   # line-number line with the line containing $LINENO, and appends
21592   # trailing '-' during substitution so that $LINENO is not a special
21593   # case at line end.
21594   # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the
21595   # scripts with optimization help from Paolo Bonzini.  Blame Lee
21596   # E. McMahon (1931-1989) for sed's syntax.  :-)
21597   sed -n '
21598     p
21599     /[$]LINENO/=
21600   ' <$as_myself |
21601     sed '
21602       s/[$]LINENO.*/&-/
21603       t lineno
21604       b
21605       :lineno
21606       N
21607       :loop
21608       s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/
21609       t loop
21610       s/-\n.*//
21611     ' >$as_me.lineno &&
21612   chmod +x "$as_me.lineno" ||
21613     { $as_echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2
21614    { (exit 1); exit 1; }; }
21615
21616   # Don't try to exec as it changes $[0], causing all sort of problems
21617   # (the dirname of $[0] is not the place where we might find the
21618   # original and so on.  Autoconf is especially sensitive to this).
21619   . "./$as_me.lineno"
21620   # Exit status is that of the last command.
21621   exit
21622 }
21623
21624
21625 if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
21626   as_dirname=dirname
21627 else
21628   as_dirname=false
21629 fi
21630
21631 ECHO_C= ECHO_N= ECHO_T=
21632 case `echo -n x` in
21633 -n*)
21634   case `echo 'x\c'` in
21635   *c*) ECHO_T=' ';;     # ECHO_T is single tab character.
21636   *)   ECHO_C='\c';;
21637   esac;;
21638 *)
21639   ECHO_N='-n';;
21640 esac
21641 if expr a : '\(a\)' >/dev/null 2>&1 &&
21642    test "X`expr 00001 : '.*\(...\)'`" = X001; then
21643   as_expr=expr
21644 else
21645   as_expr=false
21646 fi
21647
21648 rm -f conf$$ conf$$.exe conf$$.file
21649 if test -d conf$$.dir; then
21650   rm -f conf$$.dir/conf$$.file
21651 else
21652   rm -f conf$$.dir
21653   mkdir conf$$.dir 2>/dev/null
21654 fi
21655 if (echo >conf$$.file) 2>/dev/null; then
21656   if ln -s conf$$.file conf$$ 2>/dev/null; then
21657     as_ln_s='ln -s'
21658     # ... but there are two gotchas:
21659     # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
21660     # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
21661     # In both cases, we have to default to `cp -p'.
21662     ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
21663       as_ln_s='cp -p'
21664   elif ln conf$$.file conf$$ 2>/dev/null; then
21665     as_ln_s=ln
21666   else
21667     as_ln_s='cp -p'
21668   fi
21669 else
21670   as_ln_s='cp -p'
21671 fi
21672 rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
21673 rmdir conf$$.dir 2>/dev/null
21674
21675 if mkdir -p . 2>/dev/null; then
21676   as_mkdir_p=:
21677 else
21678   test -d ./-p && rmdir ./-p
21679   as_mkdir_p=false
21680 fi
21681
21682 if test -x / >/dev/null 2>&1; then
21683   as_test_x='test -x'
21684 else
21685   if ls -dL / >/dev/null 2>&1; then
21686     as_ls_L_option=L
21687   else
21688     as_ls_L_option=
21689   fi
21690   as_test_x='
21691     eval sh -c '\''
21692       if test -d "$1"; then
21693         test -d "$1/.";
21694       else
21695         case $1 in
21696         -*)set "./$1";;
21697         esac;
21698         case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in
21699         ???[sx]*):;;*)false;;esac;fi
21700     '\'' sh
21701   '
21702 fi
21703 as_executable_p=$as_test_x
21704
21705 # Sed expression to map a string onto a valid CPP name.
21706 as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
21707
21708 # Sed expression to map a string onto a valid variable name.
21709 as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
21710
21711
21712 exec 6>&1
21713
21714 # Save the log message, to keep $[0] and so on meaningful, and to
21715 # report actual input values of CONFIG_FILES etc. instead of their
21716 # values after options handling.
21717 ac_log="
21718 This file was extended by $as_me, which was
21719 generated by GNU Autoconf 2.63.  Invocation command line was
21720
21721   CONFIG_FILES    = $CONFIG_FILES
21722   CONFIG_HEADERS  = $CONFIG_HEADERS
21723   CONFIG_LINKS    = $CONFIG_LINKS
21724   CONFIG_COMMANDS = $CONFIG_COMMANDS
21725   $ $0 $@
21726
21727 on `(hostname || uname -n) 2>/dev/null | sed 1q`
21728 "
21729
21730 _ACEOF
21731
21732 case $ac_config_files in *"
21733 "*) set x $ac_config_files; shift; ac_config_files=$*;;
21734 esac
21735
21736 case $ac_config_headers in *"
21737 "*) set x $ac_config_headers; shift; ac_config_headers=$*;;
21738 esac
21739
21740
21741 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
21742 # Files that config.status was made for.
21743 config_files="$ac_config_files"
21744 config_headers="$ac_config_headers"
21745 config_commands="$ac_config_commands"
21746
21747 _ACEOF
21748
21749 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
21750 ac_cs_usage="\
21751 \`$as_me' instantiates files from templates according to the
21752 current configuration.
21753
21754 Usage: $0 [OPTION]... [FILE]...
21755
21756   -h, --help       print this help, then exit
21757   -V, --version    print version number and configuration settings, then exit
21758   -q, --quiet, --silent
21759                    do not print progress messages
21760   -d, --debug      don't remove temporary files
21761       --recheck    update $as_me by reconfiguring in the same conditions
21762       --file=FILE[:TEMPLATE]
21763                    instantiate the configuration file FILE
21764       --header=FILE[:TEMPLATE]
21765                    instantiate the configuration header FILE
21766
21767 Configuration files:
21768 $config_files
21769
21770 Configuration headers:
21771 $config_headers
21772
21773 Configuration commands:
21774 $config_commands
21775
21776 Report bugs to <bug-autoconf@gnu.org>."
21777
21778 _ACEOF
21779 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
21780 ac_cs_version="\\
21781 config.status
21782 configured by $0, generated by GNU Autoconf 2.63,
21783   with options \\"`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`\\"
21784
21785 Copyright (C) 2008 Free Software Foundation, Inc.
21786 This config.status script is free software; the Free Software Foundation
21787 gives unlimited permission to copy, distribute and modify it."
21788
21789 ac_pwd='$ac_pwd'
21790 srcdir='$srcdir'
21791 INSTALL='$INSTALL'
21792 test -n "\$AWK" || AWK=awk
21793 _ACEOF
21794
21795 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
21796 # The default lists apply if the user does not specify any file.
21797 ac_need_defaults=:
21798 while test $# != 0
21799 do
21800   case $1 in
21801   --*=*)
21802     ac_option=`expr "X$1" : 'X\([^=]*\)='`
21803     ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
21804     ac_shift=:
21805     ;;
21806   *)
21807     ac_option=$1
21808     ac_optarg=$2
21809     ac_shift=shift
21810     ;;
21811   esac
21812
21813   case $ac_option in
21814   # Handling of the options.
21815   -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
21816     ac_cs_recheck=: ;;
21817   --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
21818     $as_echo "$ac_cs_version"; exit ;;
21819   --debug | --debu | --deb | --de | --d | -d )
21820     debug=: ;;
21821   --file | --fil | --fi | --f )
21822     $ac_shift
21823     case $ac_optarg in
21824     *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
21825     esac
21826     CONFIG_FILES="$CONFIG_FILES '$ac_optarg'"
21827     ac_need_defaults=false;;
21828   --header | --heade | --head | --hea )
21829     $ac_shift
21830     case $ac_optarg in
21831     *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
21832     esac
21833     CONFIG_HEADERS="$CONFIG_HEADERS '$ac_optarg'"
21834     ac_need_defaults=false;;
21835   --he | --h)
21836     # Conflict between --help and --header
21837     { $as_echo "$as_me: error: ambiguous option: $1
21838 Try \`$0 --help' for more information." >&2
21839    { (exit 1); exit 1; }; };;
21840   --help | --hel | -h )
21841     $as_echo "$ac_cs_usage"; exit ;;
21842   -q | -quiet | --quiet | --quie | --qui | --qu | --q \
21843   | -silent | --silent | --silen | --sile | --sil | --si | --s)
21844     ac_cs_silent=: ;;
21845
21846   # This is an error.
21847   -*) { $as_echo "$as_me: error: unrecognized option: $1
21848 Try \`$0 --help' for more information." >&2
21849    { (exit 1); exit 1; }; } ;;
21850
21851   *) ac_config_targets="$ac_config_targets $1"
21852      ac_need_defaults=false ;;
21853
21854   esac
21855   shift
21856 done
21857
21858 ac_configure_extra_args=
21859
21860 if $ac_cs_silent; then
21861   exec 6>/dev/null
21862   ac_configure_extra_args="$ac_configure_extra_args --silent"
21863 fi
21864
21865 _ACEOF
21866 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
21867 if \$ac_cs_recheck; then
21868   set X '$SHELL' '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
21869   shift
21870   \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6
21871   CONFIG_SHELL='$SHELL'
21872   export CONFIG_SHELL
21873   exec "\$@"
21874 fi
21875
21876 _ACEOF
21877 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
21878 exec 5>>config.log
21879 {
21880   echo
21881   sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
21882 ## Running $as_me. ##
21883 _ASBOX
21884   $as_echo "$ac_log"
21885 } >&5
21886
21887 _ACEOF
21888 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
21889 #
21890 # INIT-COMMANDS
21891 #
21892 INTLTOOL_PERL=${INTLTOOL_PERL}
21893
21894
21895 _ACEOF
21896
21897 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
21898
21899 # Handling of arguments.
21900 for ac_config_target in $ac_config_targets
21901 do
21902   case $ac_config_target in
21903     "config.h") CONFIG_HEADERS="$CONFIG_HEADERS config.h" ;;
21904     "default-1") CONFIG_COMMANDS="$CONFIG_COMMANDS default-1" ;;
21905     "default-2") CONFIG_COMMANDS="$CONFIG_COMMANDS default-2" ;;
21906     "Makefile") CONFIG_FILES="$CONFIG_FILES Makefile" ;;
21907     "utils/Makefile") CONFIG_FILES="$CONFIG_FILES utils/Makefile" ;;
21908     "driver/Makefile") CONFIG_FILES="$CONFIG_FILES driver/Makefile" ;;
21909     "driver/xscreensaver.pam") CONFIG_FILES="$CONFIG_FILES driver/xscreensaver.pam" ;;
21910     "hacks/Makefile") CONFIG_FILES="$CONFIG_FILES hacks/Makefile" ;;
21911     "hacks/glx/Makefile") CONFIG_FILES="$CONFIG_FILES hacks/glx/Makefile" ;;
21912     "po/Makefile.in") CONFIG_FILES="$CONFIG_FILES po/Makefile.in" ;;
21913     "driver/XScreenSaver.ad") CONFIG_FILES="$CONFIG_FILES driver/XScreenSaver.ad" ;;
21914
21915   *) { { $as_echo "$as_me:$LINENO: error: invalid argument: $ac_config_target" >&5
21916 $as_echo "$as_me: error: invalid argument: $ac_config_target" >&2;}
21917    { (exit 1); exit 1; }; };;
21918   esac
21919 done
21920
21921
21922 # If the user did not use the arguments to specify the items to instantiate,
21923 # then the envvar interface is used.  Set only those that are not.
21924 # We use the long form for the default assignment because of an extremely
21925 # bizarre bug on SunOS 4.1.3.
21926 if $ac_need_defaults; then
21927   test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
21928   test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
21929   test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands
21930 fi
21931
21932 # Have a temporary directory for convenience.  Make it in the build tree
21933 # simply because there is no reason against having it here, and in addition,
21934 # creating and moving files from /tmp can sometimes cause problems.
21935 # Hook for its removal unless debugging.
21936 # Note that there is a small window in which the directory will not be cleaned:
21937 # after its creation but before its name has been assigned to `$tmp'.
21938 $debug ||
21939 {
21940   tmp=
21941   trap 'exit_status=$?
21942   { test -z "$tmp" || test ! -d "$tmp" || rm -fr "$tmp"; } && exit $exit_status
21943 ' 0
21944   trap '{ (exit 1); exit 1; }' 1 2 13 15
21945 }
21946 # Create a (secure) tmp directory for tmp files.
21947
21948 {
21949   tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
21950   test -n "$tmp" && test -d "$tmp"
21951 }  ||
21952 {
21953   tmp=./conf$$-$RANDOM
21954   (umask 077 && mkdir "$tmp")
21955 } ||
21956 {
21957    $as_echo "$as_me: cannot create a temporary directory in ." >&2
21958    { (exit 1); exit 1; }
21959 }
21960
21961 # Set up the scripts for CONFIG_FILES section.
21962 # No need to generate them if there are no CONFIG_FILES.
21963 # This happens for instance with `./config.status config.h'.
21964 if test -n "$CONFIG_FILES"; then
21965
21966
21967 ac_cr='\r'
21968 ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null`
21969 if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then
21970   ac_cs_awk_cr='\\r'
21971 else
21972   ac_cs_awk_cr=$ac_cr
21973 fi
21974
21975 echo 'BEGIN {' >"$tmp/subs1.awk" &&
21976 _ACEOF
21977
21978
21979 {
21980   echo "cat >conf$$subs.awk <<_ACEOF" &&
21981   echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' &&
21982   echo "_ACEOF"
21983 } >conf$$subs.sh ||
21984   { { $as_echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5
21985 $as_echo "$as_me: error: could not make $CONFIG_STATUS" >&2;}
21986    { (exit 1); exit 1; }; }
21987 ac_delim_num=`echo "$ac_subst_vars" | grep -c '$'`
21988 ac_delim='%!_!# '
21989 for ac_last_try in false false false false false :; do
21990   . ./conf$$subs.sh ||
21991     { { $as_echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5
21992 $as_echo "$as_me: error: could not make $CONFIG_STATUS" >&2;}
21993    { (exit 1); exit 1; }; }
21994
21995   ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X`
21996   if test $ac_delim_n = $ac_delim_num; then
21997     break
21998   elif $ac_last_try; then
21999     { { $as_echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5
22000 $as_echo "$as_me: error: could not make $CONFIG_STATUS" >&2;}
22001    { (exit 1); exit 1; }; }
22002   else
22003     ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
22004   fi
22005 done
22006 rm -f conf$$subs.sh
22007
22008 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
22009 cat >>"\$tmp/subs1.awk" <<\\_ACAWK &&
22010 _ACEOF
22011 sed -n '
22012 h
22013 s/^/S["/; s/!.*/"]=/
22014 p
22015 g
22016 s/^[^!]*!//
22017 :repl
22018 t repl
22019 s/'"$ac_delim"'$//
22020 t delim
22021 :nl
22022 h
22023 s/\(.\{148\}\).*/\1/
22024 t more1
22025 s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/
22026 p
22027 n
22028 b repl
22029 :more1
22030 s/["\\]/\\&/g; s/^/"/; s/$/"\\/
22031 p
22032 g
22033 s/.\{148\}//
22034 t nl
22035 :delim
22036 h
22037 s/\(.\{148\}\).*/\1/
22038 t more2
22039 s/["\\]/\\&/g; s/^/"/; s/$/"/
22040 p
22041 b
22042 :more2
22043 s/["\\]/\\&/g; s/^/"/; s/$/"\\/
22044 p
22045 g
22046 s/.\{148\}//
22047 t delim
22048 ' <conf$$subs.awk | sed '
22049 /^[^""]/{
22050   N
22051   s/\n//
22052 }
22053 ' >>$CONFIG_STATUS || ac_write_fail=1
22054 rm -f conf$$subs.awk
22055 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
22056 _ACAWK
22057 cat >>"\$tmp/subs1.awk" <<_ACAWK &&
22058   for (key in S) S_is_set[key] = 1
22059   FS = "\a"
22060
22061 }
22062 {
22063   line = $ 0
22064   nfields = split(line, field, "@")
22065   substed = 0
22066   len = length(field[1])
22067   for (i = 2; i < nfields; i++) {
22068     key = field[i]
22069     keylen = length(key)
22070     if (S_is_set[key]) {
22071       value = S[key]
22072       line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3)
22073       len += length(value) + length(field[++i])
22074       substed = 1
22075     } else
22076       len += 1 + keylen
22077   }
22078
22079   print line
22080 }
22081
22082 _ACAWK
22083 _ACEOF
22084 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
22085 if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then
22086   sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g"
22087 else
22088   cat
22089 fi < "$tmp/subs1.awk" > "$tmp/subs.awk" \
22090   || { { $as_echo "$as_me:$LINENO: error: could not setup config files machinery" >&5
22091 $as_echo "$as_me: error: could not setup config files machinery" >&2;}
22092    { (exit 1); exit 1; }; }
22093 _ACEOF
22094
22095 # VPATH may cause trouble with some makes, so we remove $(srcdir),
22096 # ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and
22097 # trailing colons and then remove the whole line if VPATH becomes empty
22098 # (actually we leave an empty line to preserve line numbers).
22099 if test "x$srcdir" = x.; then
22100   ac_vpsub='/^[  ]*VPATH[        ]*=/{
22101 s/:*\$(srcdir):*/:/
22102 s/:*\${srcdir}:*/:/
22103 s/:*@srcdir@:*/:/
22104 s/^\([^=]*=[     ]*\):*/\1/
22105 s/:*$//
22106 s/^[^=]*=[       ]*$//
22107 }'
22108 fi
22109
22110 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
22111 fi # test -n "$CONFIG_FILES"
22112
22113 # Set up the scripts for CONFIG_HEADERS section.
22114 # No need to generate them if there are no CONFIG_HEADERS.
22115 # This happens for instance with `./config.status Makefile'.
22116 if test -n "$CONFIG_HEADERS"; then
22117 cat >"$tmp/defines.awk" <<\_ACAWK ||
22118 BEGIN {
22119 _ACEOF
22120
22121 # Transform confdefs.h into an awk script `defines.awk', embedded as
22122 # here-document in config.status, that substitutes the proper values into
22123 # config.h.in to produce config.h.
22124
22125 # Create a delimiter string that does not exist in confdefs.h, to ease
22126 # handling of long lines.
22127 ac_delim='%!_!# '
22128 for ac_last_try in false false :; do
22129   ac_t=`sed -n "/$ac_delim/p" confdefs.h`
22130   if test -z "$ac_t"; then
22131     break
22132   elif $ac_last_try; then
22133     { { $as_echo "$as_me:$LINENO: error: could not make $CONFIG_HEADERS" >&5
22134 $as_echo "$as_me: error: could not make $CONFIG_HEADERS" >&2;}
22135    { (exit 1); exit 1; }; }
22136   else
22137     ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
22138   fi
22139 done
22140
22141 # For the awk script, D is an array of macro values keyed by name,
22142 # likewise P contains macro parameters if any.  Preserve backslash
22143 # newline sequences.
22144
22145 ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]*
22146 sed -n '
22147 s/.\{148\}/&'"$ac_delim"'/g
22148 t rset
22149 :rset
22150 s/^[     ]*#[    ]*define[       ][      ]*/ /
22151 t def
22152 d
22153 :def
22154 s/\\$//
22155 t bsnl
22156 s/["\\]/\\&/g
22157 s/^ \('"$ac_word_re"'\)\(([^()]*)\)[     ]*\(.*\)/P["\1"]="\2"\
22158 D["\1"]=" \3"/p
22159 s/^ \('"$ac_word_re"'\)[         ]*\(.*\)/D["\1"]=" \2"/p
22160 d
22161 :bsnl
22162 s/["\\]/\\&/g
22163 s/^ \('"$ac_word_re"'\)\(([^()]*)\)[     ]*\(.*\)/P["\1"]="\2"\
22164 D["\1"]=" \3\\\\\\n"\\/p
22165 t cont
22166 s/^ \('"$ac_word_re"'\)[         ]*\(.*\)/D["\1"]=" \2\\\\\\n"\\/p
22167 t cont
22168 d
22169 :cont
22170 n
22171 s/.\{148\}/&'"$ac_delim"'/g
22172 t clear
22173 :clear
22174 s/\\$//
22175 t bsnlc
22176 s/["\\]/\\&/g; s/^/"/; s/$/"/p
22177 d
22178 :bsnlc
22179 s/["\\]/\\&/g; s/^/"/; s/$/\\\\\\n"\\/p
22180 b cont
22181 ' <confdefs.h | sed '
22182 s/'"$ac_delim"'/"\\\
22183 "/g' >>$CONFIG_STATUS || ac_write_fail=1
22184
22185 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
22186   for (key in D) D_is_set[key] = 1
22187   FS = "\a"
22188 }
22189 /^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\$)/ {
22190   line = \$ 0
22191   split(line, arg, " ")
22192   if (arg[1] == "#") {
22193     defundef = arg[2]
22194     mac1 = arg[3]
22195   } else {
22196     defundef = substr(arg[1], 2)
22197     mac1 = arg[2]
22198   }
22199   split(mac1, mac2, "(") #)
22200   macro = mac2[1]
22201   prefix = substr(line, 1, index(line, defundef) - 1)
22202   if (D_is_set[macro]) {
22203     # Preserve the white space surrounding the "#".
22204     print prefix "define", macro P[macro] D[macro]
22205     next
22206   } else {
22207     # Replace #undef with comments.  This is necessary, for example,
22208     # in the case of _POSIX_SOURCE, which is predefined and required
22209     # on some systems where configure will not decide to define it.
22210     if (defundef == "undef") {
22211       print "/*", prefix defundef, macro, "*/"
22212       next
22213     }
22214   }
22215 }
22216 { print }
22217 _ACAWK
22218 _ACEOF
22219 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
22220   { { $as_echo "$as_me:$LINENO: error: could not setup config headers machinery" >&5
22221 $as_echo "$as_me: error: could not setup config headers machinery" >&2;}
22222    { (exit 1); exit 1; }; }
22223 fi # test -n "$CONFIG_HEADERS"
22224
22225
22226 eval set X "  :F $CONFIG_FILES  :H $CONFIG_HEADERS    :C $CONFIG_COMMANDS"
22227 shift
22228 for ac_tag
22229 do
22230   case $ac_tag in
22231   :[FHLC]) ac_mode=$ac_tag; continue;;
22232   esac
22233   case $ac_mode$ac_tag in
22234   :[FHL]*:*);;
22235   :L* | :C*:*) { { $as_echo "$as_me:$LINENO: error: invalid tag $ac_tag" >&5
22236 $as_echo "$as_me: error: invalid tag $ac_tag" >&2;}
22237    { (exit 1); exit 1; }; };;
22238   :[FH]-) ac_tag=-:-;;
22239   :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
22240   esac
22241   ac_save_IFS=$IFS
22242   IFS=:
22243   set x $ac_tag
22244   IFS=$ac_save_IFS
22245   shift
22246   ac_file=$1
22247   shift
22248
22249   case $ac_mode in
22250   :L) ac_source=$1;;
22251   :[FH])
22252     ac_file_inputs=
22253     for ac_f
22254     do
22255       case $ac_f in
22256       -) ac_f="$tmp/stdin";;
22257       *) # Look for the file first in the build tree, then in the source tree
22258          # (if the path is not absolute).  The absolute path cannot be DOS-style,
22259          # because $ac_f cannot contain `:'.
22260          test -f "$ac_f" ||
22261            case $ac_f in
22262            [\\/$]*) false;;
22263            *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
22264            esac ||
22265            { { $as_echo "$as_me:$LINENO: error: cannot find input file: $ac_f" >&5
22266 $as_echo "$as_me: error: cannot find input file: $ac_f" >&2;}
22267    { (exit 1); exit 1; }; };;
22268       esac
22269       case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
22270       ac_file_inputs="$ac_file_inputs '$ac_f'"
22271     done
22272
22273     # Let's still pretend it is `configure' which instantiates (i.e., don't
22274     # use $as_me), people would be surprised to read:
22275     #    /* config.h.  Generated by config.status.  */
22276     configure_input='Generated from '`
22277           $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g'
22278         `' by configure.'
22279     if test x"$ac_file" != x-; then
22280       configure_input="$ac_file.  $configure_input"
22281       { $as_echo "$as_me:$LINENO: creating $ac_file" >&5
22282 $as_echo "$as_me: creating $ac_file" >&6;}
22283     fi
22284     # Neutralize special characters interpreted by sed in replacement strings.
22285     case $configure_input in #(
22286     *\&* | *\|* | *\\* )
22287        ac_sed_conf_input=`$as_echo "$configure_input" |
22288        sed 's/[\\\\&|]/\\\\&/g'`;; #(
22289     *) ac_sed_conf_input=$configure_input;;
22290     esac
22291
22292     case $ac_tag in
22293     *:-:* | *:-) cat >"$tmp/stdin" \
22294       || { { $as_echo "$as_me:$LINENO: error: could not create $ac_file" >&5
22295 $as_echo "$as_me: error: could not create $ac_file" >&2;}
22296    { (exit 1); exit 1; }; } ;;
22297     esac
22298     ;;
22299   esac
22300
22301   ac_dir=`$as_dirname -- "$ac_file" ||
22302 $as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
22303          X"$ac_file" : 'X\(//\)[^/]' \| \
22304          X"$ac_file" : 'X\(//\)$' \| \
22305          X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
22306 $as_echo X"$ac_file" |
22307     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
22308             s//\1/
22309             q
22310           }
22311           /^X\(\/\/\)[^/].*/{
22312             s//\1/
22313             q
22314           }
22315           /^X\(\/\/\)$/{
22316             s//\1/
22317             q
22318           }
22319           /^X\(\/\).*/{
22320             s//\1/
22321             q
22322           }
22323           s/.*/./; q'`
22324   { as_dir="$ac_dir"
22325   case $as_dir in #(
22326   -*) as_dir=./$as_dir;;
22327   esac
22328   test -d "$as_dir" || { $as_mkdir_p && mkdir -p "$as_dir"; } || {
22329     as_dirs=
22330     while :; do
22331       case $as_dir in #(
22332       *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
22333       *) as_qdir=$as_dir;;
22334       esac
22335       as_dirs="'$as_qdir' $as_dirs"
22336       as_dir=`$as_dirname -- "$as_dir" ||
22337 $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
22338          X"$as_dir" : 'X\(//\)[^/]' \| \
22339          X"$as_dir" : 'X\(//\)$' \| \
22340          X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
22341 $as_echo X"$as_dir" |
22342     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
22343             s//\1/
22344             q
22345           }
22346           /^X\(\/\/\)[^/].*/{
22347             s//\1/
22348             q
22349           }
22350           /^X\(\/\/\)$/{
22351             s//\1/
22352             q
22353           }
22354           /^X\(\/\).*/{
22355             s//\1/
22356             q
22357           }
22358           s/.*/./; q'`
22359       test -d "$as_dir" && break
22360     done
22361     test -z "$as_dirs" || eval "mkdir $as_dirs"
22362   } || test -d "$as_dir" || { { $as_echo "$as_me:$LINENO: error: cannot create directory $as_dir" >&5
22363 $as_echo "$as_me: error: cannot create directory $as_dir" >&2;}
22364    { (exit 1); exit 1; }; }; }
22365   ac_builddir=.
22366
22367 case "$ac_dir" in
22368 .) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
22369 *)
22370   ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
22371   # A ".." for each directory in $ac_dir_suffix.
22372   ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
22373   case $ac_top_builddir_sub in
22374   "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
22375   *)  ac_top_build_prefix=$ac_top_builddir_sub/ ;;
22376   esac ;;
22377 esac
22378 ac_abs_top_builddir=$ac_pwd
22379 ac_abs_builddir=$ac_pwd$ac_dir_suffix
22380 # for backward compatibility:
22381 ac_top_builddir=$ac_top_build_prefix
22382
22383 case $srcdir in
22384   .)  # We are building in place.
22385     ac_srcdir=.
22386     ac_top_srcdir=$ac_top_builddir_sub
22387     ac_abs_top_srcdir=$ac_pwd ;;
22388   [\\/]* | ?:[\\/]* )  # Absolute name.
22389     ac_srcdir=$srcdir$ac_dir_suffix;
22390     ac_top_srcdir=$srcdir
22391     ac_abs_top_srcdir=$srcdir ;;
22392   *) # Relative name.
22393     ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
22394     ac_top_srcdir=$ac_top_build_prefix$srcdir
22395     ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
22396 esac
22397 ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
22398
22399
22400   case $ac_mode in
22401   :F)
22402   #
22403   # CONFIG_FILE
22404   #
22405
22406   case $INSTALL in
22407   [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
22408   *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;;
22409   esac
22410 _ACEOF
22411
22412 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
22413 # If the template does not know about datarootdir, expand it.
22414 # FIXME: This hack should be removed a few years after 2.60.
22415 ac_datarootdir_hack=; ac_datarootdir_seen=
22416
22417 ac_sed_dataroot='
22418 /datarootdir/ {
22419   p
22420   q
22421 }
22422 /@datadir@/p
22423 /@docdir@/p
22424 /@infodir@/p
22425 /@localedir@/p
22426 /@mandir@/p
22427 '
22428 case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in
22429 *datarootdir*) ac_datarootdir_seen=yes;;
22430 *@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
22431   { $as_echo "$as_me:$LINENO: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
22432 $as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
22433 _ACEOF
22434 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
22435   ac_datarootdir_hack='
22436   s&@datadir@&$datadir&g
22437   s&@docdir@&$docdir&g
22438   s&@infodir@&$infodir&g
22439   s&@localedir@&$localedir&g
22440   s&@mandir@&$mandir&g
22441     s&\\\${datarootdir}&$datarootdir&g' ;;
22442 esac
22443 _ACEOF
22444
22445 # Neutralize VPATH when `$srcdir' = `.'.
22446 # Shell code in configure.ac might set extrasub.
22447 # FIXME: do we really want to maintain this feature?
22448 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
22449 ac_sed_extra="$ac_vpsub
22450 $extrasub
22451 _ACEOF
22452 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
22453 :t
22454 /@[a-zA-Z_][a-zA-Z_0-9]*@/!b
22455 s|@configure_input@|$ac_sed_conf_input|;t t
22456 s&@top_builddir@&$ac_top_builddir_sub&;t t
22457 s&@top_build_prefix@&$ac_top_build_prefix&;t t
22458 s&@srcdir@&$ac_srcdir&;t t
22459 s&@abs_srcdir@&$ac_abs_srcdir&;t t
22460 s&@top_srcdir@&$ac_top_srcdir&;t t
22461 s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
22462 s&@builddir@&$ac_builddir&;t t
22463 s&@abs_builddir@&$ac_abs_builddir&;t t
22464 s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
22465 s&@INSTALL@&$ac_INSTALL&;t t
22466 $ac_datarootdir_hack
22467 "
22468 eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$tmp/subs.awk" >$tmp/out \
22469   || { { $as_echo "$as_me:$LINENO: error: could not create $ac_file" >&5
22470 $as_echo "$as_me: error: could not create $ac_file" >&2;}
22471    { (exit 1); exit 1; }; }
22472
22473 test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
22474   { ac_out=`sed -n '/\${datarootdir}/p' "$tmp/out"`; test -n "$ac_out"; } &&
22475   { ac_out=`sed -n '/^[  ]*datarootdir[  ]*:*=/p' "$tmp/out"`; test -z "$ac_out"; } &&
22476   { $as_echo "$as_me:$LINENO: WARNING: $ac_file contains a reference to the variable \`datarootdir'
22477 which seems to be undefined.  Please make sure it is defined." >&5
22478 $as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
22479 which seems to be undefined.  Please make sure it is defined." >&2;}
22480
22481   rm -f "$tmp/stdin"
22482   case $ac_file in
22483   -) cat "$tmp/out" && rm -f "$tmp/out";;
22484   *) rm -f "$ac_file" && mv "$tmp/out" "$ac_file";;
22485   esac \
22486   || { { $as_echo "$as_me:$LINENO: error: could not create $ac_file" >&5
22487 $as_echo "$as_me: error: could not create $ac_file" >&2;}
22488    { (exit 1); exit 1; }; }
22489  ;;
22490   :H)
22491   #
22492   # CONFIG_HEADER
22493   #
22494   if test x"$ac_file" != x-; then
22495     {
22496       $as_echo "/* $configure_input  */" \
22497       && eval '$AWK -f "$tmp/defines.awk"' "$ac_file_inputs"
22498     } >"$tmp/config.h" \
22499       || { { $as_echo "$as_me:$LINENO: error: could not create $ac_file" >&5
22500 $as_echo "$as_me: error: could not create $ac_file" >&2;}
22501    { (exit 1); exit 1; }; }
22502     if diff "$ac_file" "$tmp/config.h" >/dev/null 2>&1; then
22503       { $as_echo "$as_me:$LINENO: $ac_file is unchanged" >&5
22504 $as_echo "$as_me: $ac_file is unchanged" >&6;}
22505     else
22506       rm -f "$ac_file"
22507       mv "$tmp/config.h" "$ac_file" \
22508         || { { $as_echo "$as_me:$LINENO: error: could not create $ac_file" >&5
22509 $as_echo "$as_me: error: could not create $ac_file" >&2;}
22510    { (exit 1); exit 1; }; }
22511     fi
22512   else
22513     $as_echo "/* $configure_input  */" \
22514       && eval '$AWK -f "$tmp/defines.awk"' "$ac_file_inputs" \
22515       || { { $as_echo "$as_me:$LINENO: error: could not create -" >&5
22516 $as_echo "$as_me: error: could not create -" >&2;}
22517    { (exit 1); exit 1; }; }
22518   fi
22519  ;;
22520
22521   :C)  { $as_echo "$as_me:$LINENO: executing $ac_file commands" >&5
22522 $as_echo "$as_me: executing $ac_file commands" >&6;}
22523  ;;
22524   esac
22525
22526
22527   case $ac_file$ac_mode in
22528     "default-1":C)
22529
22530 sed -e "s:@INTLTOOL_PERL@:${INTLTOOL_PERL}:;" < ${srcdir}/intltool-extract.in > intltool-extract.out
22531 if cmp -s intltool-extract intltool-extract.out 2>/dev/null; then
22532   rm -f intltool-extract.out
22533 else
22534   mv -f intltool-extract.out intltool-extract
22535 fi
22536 chmod ugo+x intltool-extract
22537 chmod u+w intltool-extract
22538
22539 sed -e "s:@INTLTOOL_PERL@:${INTLTOOL_PERL}:;" < ${srcdir}/intltool-merge.in > intltool-merge.out
22540 if cmp -s intltool-merge intltool-merge.out 2>/dev/null; then
22541   rm -f intltool-merge.out
22542 else
22543   mv -f intltool-merge.out intltool-merge
22544 fi
22545 chmod ugo+x intltool-merge
22546 chmod u+w intltool-merge
22547
22548 sed -e "s:@INTLTOOL_PERL@:${INTLTOOL_PERL}:;" < ${srcdir}/intltool-update.in > intltool-update.out
22549 if cmp -s intltool-update intltool-update.out 2>/dev/null; then
22550   rm -f intltool-update.out
22551 else
22552   mv -f intltool-update.out intltool-update
22553 fi
22554 chmod ugo+x intltool-update
22555 chmod u+w intltool-update
22556
22557  ;;
22558     "default-2":C) case "$CONFIG_FILES" in *po/Makefile.in*)
22559         rm -f po/stamp-it po/stamp-it.tmp
22560         > po/stamp-it.tmp
22561         sed -e "/POTFILES =/r po/POTFILES" po/Makefile.in > po/Makefile
22562         mv po/stamp-it.tmp po/stamp-it
22563       esac ;;
22564
22565   esac
22566 done # for ac_tag
22567
22568
22569 { (exit 0); exit 0; }
22570 _ACEOF
22571 chmod +x $CONFIG_STATUS
22572 ac_clean_files=$ac_clean_files_save
22573
22574 test $ac_write_fail = 0 ||
22575   { { $as_echo "$as_me:$LINENO: error: write failure creating $CONFIG_STATUS" >&5
22576 $as_echo "$as_me: error: write failure creating $CONFIG_STATUS" >&2;}
22577    { (exit 1); exit 1; }; }
22578
22579
22580 # configure is writing to config.log, and then calls config.status.
22581 # config.status does its own redirection, appending to config.log.
22582 # Unfortunately, on DOS this fails, as config.log is still kept open
22583 # by configure, so config.status won't be able to write to it; its
22584 # output is simply discarded.  So we exec the FD to /dev/null,
22585 # effectively closing config.log, so it can be properly (re)opened and
22586 # appended to by config.status.  When coming back to configure, we
22587 # need to make the FD available again.
22588 if test "$no_create" != yes; then
22589   ac_cs_success=:
22590   ac_config_status_args=
22591   test "$silent" = yes &&
22592     ac_config_status_args="$ac_config_status_args --quiet"
22593   exec 5>/dev/null
22594   $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
22595   exec 5>>config.log
22596   # Use ||, not &&, to avoid exiting from the if with $? = 1, which
22597   # would make configure fail if this is the last instruction.
22598   $ac_cs_success || { (exit 1); exit 1; }
22599 fi
22600 if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
22601   { $as_echo "$as_me:$LINENO: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
22602 $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}
22603 fi
22604
22605
22606 ###############################################################################
22607 #
22608 #       Print some warnings at the end.
22609 #
22610 ###############################################################################
22611
22612 warn_prefix_1="    Warning:"
22613 warn_prefix_2="       Note:"
22614 warn_prefix="$warn_prefix_1"
22615
22616 warning=no
22617 warnsep='    #################################################################'
22618
22619 warnpre() {
22620   if test "$warning" = no ; then
22621     echo '' ; echo "$warnsep" ; echo ''
22622     warning=yes
22623   fi
22624 }
22625
22626 warn() {
22627   warnpre
22628   if test "$warning" = long ; then echo '' ; fi
22629   warning=yes
22630   rest="$@"
22631   echo "$warn_prefix $rest"
22632 }
22633
22634 warnL() {
22635   was=$warning
22636   warnpre
22637   warning=yes
22638   if test "$was" != no ; then echo '' ; fi
22639   rest="$@"
22640   echo "$warn_prefix $rest"
22641 }
22642
22643 warn2() {
22644   rest="$@"
22645   echo "             $rest"
22646   warning=long
22647 }
22648
22649 note() {
22650   warn_prefix="$warn_prefix_2"
22651   warn $@
22652   warn_prefix="$warn_prefix_1"
22653 }
22654
22655 noteL() {
22656   warn_prefix="$warn_prefix_2"
22657   warnL $@
22658   warn_prefix="$warn_prefix_1"
22659 }
22660
22661
22662 if test "$with_sgi_req" = yes -a "$have_sgi" = no ; then
22663   warn 'The SGI saver extension was requested, but was not found.'
22664 fi
22665
22666 if test "$with_xidle_req" = yes -a "$have_xidle" = no ; then
22667   warn 'The XIdle extension was requested, but was not found.'
22668 fi
22669
22670 if test "$with_xshm_req" = yes -a "$have_xshm" = no ; then
22671   warn 'The XSHM extension was requested, but was not found.'
22672 fi
22673
22674 if test "$with_xdbe_req" = yes -a "$have_xdbe" = no ; then
22675   warn 'The DOUBLE-BUFFER extension was requested, but was not found.'
22676 fi
22677
22678 if test "$with_sgivc_req" = yes -a "$have_sgivc" = no ; then
22679   warn 'The SGI-VIDEO-CONTROL extension was requested, but was not found.'
22680 fi
22681
22682 if test "$with_dpms_req" = yes -a "$have_dpms" = no ; then
22683   warn 'The DPMS extension was requested, but was not found.'
22684 fi
22685
22686 if test "$with_xinerama_req" = yes -a "$have_xinerama" = no ; then
22687   warn 'The Xinerama extension was requested, but was not found.'
22688 fi
22689
22690 if test "$with_xf86vmode_req" = yes -a "$have_xf86vmode" = no ; then
22691   warn 'The XF86VMODE extension was requested, but was not found.'
22692 fi
22693
22694 if test "$with_randr_req" = yes -a "$have_randr" = no ; then
22695   warn 'The RANDR extension was requested, but was not found.'
22696 fi
22697
22698 if test "$with_proc_interrupts_req" = yes -a "$have_proc_interrupts" = no; then
22699   warn "Checking of /proc/interrupts was requested, but it's bogus."
22700 fi
22701
22702 if test "$pkg_config" = false ; then
22703   warnL 'The "pkg-config" program was not found.  Without that,'
22704   warn2 "detection of the various GTK libraries won't work."
22705 else
22706   pkgerr=`$pkg_config --list-all 2>&1 >/dev/null`
22707   if test "x$pkgerr" != "x" ; then
22708     warnL 'The "pkg-config" program produces errors.  This often causes'
22709     warn2 "detection of the various GTK libraries to malfunction."
22710     warn2 "The errors are:"
22711     echo ''
22712     echo "$pkgerr" | sed 's/^/             > /g'
22713   fi
22714 fi
22715
22716 if test "$gtk_halfassed" != no ; then
22717   warnL "GTK version $gtk_halfassed was found, but at least one supporting"
22718   warn2 "library ($gtk_halfassed_lib) was not, so GTK can't be used."
22719   warn2 "Perhaps some of the development packages are not installed?"
22720   if test "$have_gtk" = yes ; then
22721     v="$ac_gtk_version_string"
22722     warn2 "GTK $v is also installed, so it will be used instead."
22723     warn2 "Please read the above output and the \`config.log' file"
22724     warn2 "for more details."
22725   fi
22726 fi
22727
22728 motif_warn2() {
22729   warn2 'Though the Motif front-end to xscreensaver is still'
22730   warn2 'maintained, it is no longer being updated with new'
22731   warn2 'features: all new development on the xscreensaver-demo'
22732   warn2 'program is happening in the GTK version, and not in the'
22733   warn2 'Motif version.  It is recommended that you build against'
22734   warn2 'GTK instead of Motif.  See <http://www.gtk.org/>.'
22735 }
22736
22737 if test "$have_motif" = no -a "$have_gtk" = no; then
22738
22739   if test "$with_motif" = yes; then
22740     warnL "Neither the GTK nor Motif libraries were found; the"
22741     warn2 "\`xscreensaver-demo' program requires one of these."
22742     echo ''
22743     motif_warn2
22744   else
22745     warnL "The GTK libraries do not seem to be available; the"
22746     warn2 "\`xscreensaver-demo' program requires them."
22747 #   echo ''
22748 #   warn2 'You can use Motif or Lesstif instead of GTK (use the'
22749 #   warn2 "\`--with-motif' option) but that is NOT recommended."
22750 #   motif_warn2
22751   fi
22752
22753 elif test "$with_motif_req" = yes -a "$have_motif" = no ; then
22754   warnL "Use of Motif was requested, but it wasn't found;"
22755   warn2 "Gtk will be used instead."
22756
22757 elif test "$jurassic_gtk" = yes ; then
22758
22759   pref_gtk=2.0
22760
22761   v="$ac_gtk_version_string"
22762   if test "$with_gtk_req" = yes -a "$ac_gtk_version" = "unknown" ; then
22763     warnL "Use of Gtk was requested, but its version number is unknown;"
22764   elif test "$with_gtk_req" = yes ; then
22765     warnL "Use of Gtk was requested, but it is version $v;"
22766   else
22767     warnL "Gtk was found on this system, but it is version $v;"
22768   fi
22769
22770   warn2 "Gtk $pref_gtk or newer is required."
22771
22772 elif test "$with_gtk_req" = yes -a "$have_gtk" = no ; then
22773   warnL "Use of Gtk was requested, but it wasn't found."
22774 fi
22775
22776
22777 if test "$have_gtk" = yes -a "$have_gdk_pixbuf" = no ; then
22778   warn  "GTK is being used, but the GDK-Pixbuf library and/or"
22779   warn2 "headers were not found.  That can't be good.  Please"
22780   warn2 "install the GDK-Pixbuf development kit and re-configure."
22781 fi
22782
22783 if test "$have_motif" = yes -a "$have_lesstif" = yes ; then
22784
22785   preferred_lesstif=0.92
22786
22787   if test "$lesstif_version" = unknown; then
22788     warnL "Unable to determine the LessTif version number!"
22789     warn2 "Make sure you are using version $preferred_lesstif or newer."
22790     warn2 "See <http://www.lesstif.org/>."
22791
22792   elif test \! $lesstif_version -gt 82; then
22793     warnL "LessTif version $lesstif_version_string is being used."
22794     warn2 "LessTif versions 0.82 and earlier are too buggy to"
22795     warn2 "use with XScreenSaver; it is strongly recommended"
22796     warn2 "that you upgrade to at least version $preferred_lesstif!"
22797     warn2 "See <http://www.lesstif.org/>."
22798   fi
22799 fi
22800
22801
22802 if test "$have_motif" = yes -a "$have_gtk" = no ; then
22803   warn  'Motif is being used, and GTK is not.'
22804   echo  ''
22805   motif_warn2
22806 fi
22807
22808
22809 if test "$with_xpm_req" = yes -a "$have_xpm" = no; then
22810   warnL 'Use of XPM was requested, but it was not found.'
22811 fi
22812
22813 if test "$with_gdk_pixbuf_req" = yes  -a "$have_gdk_pixbuf" = no; then
22814   warnL 'Use of GDK-Pixbuf was requested, but it was not found.'
22815 fi
22816
22817 if test "$have_gdk_pixbuf" = no -o "$gdk_pixbuf_halfassed" = yes || \
22818    test "$have_gdk_pixbuf" = no -a "$have_xpm" = no ; then
22819
22820   if test "$with_gdk_pixbuf_req" = yes ; then
22821     true
22822   elif test "$with_gdk_pixbuf_req" = no ; then
22823     warnL 'The GDK-Pixbuf library is not being used.'
22824   else
22825     warnL 'The GDK-Pixbuf library was not found.'
22826   fi
22827
22828   if test "$with_xpm_req" = yes -o "$have_xpm" = yes ; then
22829     true
22830   elif test "$with_xpm_req" = no ; then
22831     warnL 'The XPM library is not being used.'
22832   else
22833     warnL 'The XPM library was not found.'
22834   fi
22835
22836   if test "$have_gdk_pixbuf" = no -a "$have_xpm" = yes ; then
22837     warn2 'The XPM library is being used instead.'
22838   fi
22839
22840   if test "$gdk_pixbuf_halfassed" = yes ; then
22841     echo ''
22842     warn2 'More specifically, we found the headers, but not the'
22843     warn2 'libraries; so either GDK-Pixbuf is half-installed on this'
22844     warn2 "system, or something else went wrong.  The \`config.log'"
22845     warn2 'file might contain some clues.'
22846   fi
22847
22848   echo ''
22849   warn2 'Some of the demos will not use images as much as they could.'
22850   warn2 'You should consider installing GDK-Pixbuf and re-running'
22851   warn2 'configure.  (GDK-Pixbuf is recommended over XPM, as it'
22852   warn2 'provides support for more image formats.)'
22853 fi
22854
22855
22856 if test "$have_jpeg" = no ; then
22857   if test "$with_jpeg_req" = yes ; then
22858     warnL 'Use of libjpeg was requested, but it was not found.'
22859   elif test "$with_jpeg_req" = no ; then
22860     noteL 'The JPEG library is not being used.'
22861   else
22862     noteL 'The JPEG library was not found.'
22863   fi
22864
22865   if test "$jpeg_halfassed" = yes ; then
22866     echo ''
22867     warn2 'More specifically, we found the headers, but not the'
22868     warn2 'library; so either JPEG is half-installed on this'
22869     warn2 "system, or something else went wrong.  The \`config.log'"
22870     warn2 'file might contain some clues.'
22871     echo ''
22872   fi
22873
22874   if test "$have_gdk_pixbuf" = no ; then
22875     warn2 "This means that it won't be possible for the image-manipulating"
22876     warn2 "display modes to load files from disk; and it also means that"
22877     warn2 "the \`webcollage' program will be much slower."
22878   else
22879     warn2 "This means the \`webcollage' program will be much slower."
22880   fi
22881 fi
22882
22883
22884 if test "$have_gl" = yes -a "$ac_have_mesa_gl" = yes ; then
22885   preferred_mesagl=3.4
22886   mgv="$ac_mesagl_version_string"
22887   pgl="$preferred_mesagl"
22888
22889   if test "$ac_mesagl_version" = unknown; then
22890     true
22891     # warnL "Unable to determine the MesaGL version number!"
22892     # warn2 "Make sure you are using version $preferred_mesagl or newer."
22893
22894   elif test \! "$ac_mesagl_version" -gt 2006; then
22895     warnL "MesaGL version number is $mgv --"
22896     warn2 "MesaGL 2.6 and earlier have a security bug.  It is strongly"
22897     warn2 "recommended that you upgrade to at least version $preferred_mesagl."
22898
22899   elif test \! "$ac_mesagl_version" -gt 3003; then
22900     warnL "MesaGL version number is $mgv --"
22901     warn2 "MesaGL 3.3 and earlier have some bugs; it is recommended"
22902     warn2 "that you upgrade to $pgl or newer."
22903   fi
22904 fi
22905
22906 if test "$have_gl" = no ; then
22907   if test "$with_gl_req" = yes ; then
22908     warnL 'Use of GL was requested, but it was not found.'
22909   elif test "$with_gl_req" = no ; then
22910     noteL 'The OpenGL 3D library is not being used.'
22911   else
22912     noteL 'The OpenGL 3D library was not found.'
22913   fi
22914
22915   if test "$gl_halfassed" = yes ; then
22916     echo ''
22917     warn2 'More specifically, we found the headers, but not the'
22918     warn2 'libraries; so either GL is half-installed on this'
22919     warn2 "system, or something else went wrong.  The \`config.log'"
22920     warn2 'file might contain some clues.'
22921   fi
22922
22923   echo ''
22924   warn2 'Those demos which use 3D will not be built or installed.'
22925   warn2 'You might want to consider installing OpenGL and'
22926   warn2 "re-running configure.  If your vendor doesn't ship"
22927   warn2 'their own implementation of OpenGL, you can get a free'
22928   warn2 'version at <http://www.mesa3d.org/>.  For general OpenGL'
22929   warn2 'info, see <http://www.opengl.org/>.'
22930
22931 fi
22932
22933
22934 if test "$have_gl" = yes -a "$have_gle" = no ; then
22935
22936  # nobody cares about this; don't print the warning unless it was
22937  # requested and not found, or halfway-found.
22938  if test "$with_gle_req" = yes -o "$gle_halfassed" = yes ; then
22939
22940   if test "$with_gle_req" = yes ; then
22941     noteL 'Use of the GLE (GL Extrusion) library was requested, but'
22942     warn2 'it was not found (though the OpenGL library was found, and'
22943     warn2 'is being used.)'
22944   elif test "$with_gle_req" = no ; then
22945     noteL 'The OpenGL Library is being used, but the GLE (GL Extrusion)'
22946     warn2 'library is not.'
22947   else
22948     noteL 'The OpenGL Library was found, but the GLE (GL Extrusion)'
22949     warn2 'was not.'
22950   fi
22951
22952   if test "$gle_halfassed" = yes ; then
22953     echo ''
22954     warn2 'More specifically, we found the headers, but not the'
22955     warn2 'libraries; so either GLE is half-installed on this'
22956     warn2 "system, or something else went wrong.  The \`config.log'"
22957     warn2 'file might contain some clues.'
22958   fi
22959
22960   echo ''
22961   warn2 'Some of the OpenGL (3D) demos (those that depend on GLE)'
22962   warn2 'will not be built or installed.  You might want to consider'
22963   warn2 'installing GLE and re-running configure.  You can find the'
22964   warn2 'GLE library at <http://www.linas.org/gle/>.  For general'
22965   warn2 'OpenGL info, see <http://www.opengl.org/>.'
22966
22967  fi
22968 fi
22969
22970
22971 if test "$with_readdisplay_req" = yes -a "$have_readdisplay" = no ; then
22972   warn 'Use of XReadDisplay was requested, but it was not found.'
22973 fi
22974
22975 if test "$with_kerberos_req" = yes -a "$have_kerberos" = no ; then
22976   warn 'Use of Kerberos was requested, but it was not found.'
22977 fi
22978
22979 if test "$with_pam_req" = yes -a "$have_pam" = no ; then
22980   warn 'Use of PAM was requested, but it was not found.'
22981 fi
22982
22983 if test "$with_shadow_req" = yes -a "$have_shadow" = no ; then
22984   warn 'Use of shadow passwords was requested, but they were not found.'
22985 fi
22986
22987 if test "$ac_macosx" = yes ; then
22988   if test "$enable_locking" = yes ; then
22989     warn  "You have specified --enable-locking on MacOS X."
22990     warn2 "THIS DOES NOT WORK!  Don't do this!"
22991   fi
22992 fi
22993
22994
22995 # You are in a twisty maze of namespaces and syntaxes, all alike.
22996 # Fuck the skull of Unix.
22997 #
22998 bindir=`eval eval eval eval eval eval eval echo $bindir`
22999 HACKDIR=`eval eval eval eval eval eval eval echo $HACKDIR`
23000 HACK_CONF_DIR=`eval eval eval eval eval eval eval echo $HACK_CONF_DIR`
23001
23002 # canonicalize slashes.
23003 bindir=`echo  "${bindir}"              | sed 's@/$@@;s@//*@/@g'`
23004 HACKDIR=`echo "${HACKDIR}"             | sed 's@/$@@;s@//*@/@g'`
23005 HACK_CONF_DIR=`echo "${HACK_CONF_DIR}" | sed 's@/$@@;s@//*@/@g'`
23006
23007
23008 # Sanity check the hackdir
23009 for bad_choice in xscreensaver xscreensaver-demo xscreensaver-command ; do
23010   if test "${HACKDIR}" = "${bindir}/${bad_choice}" ; then
23011     echo ""
23012     { { $as_echo "$as_me:$LINENO: error: \"--with-hackdir=${bindir}/${bad_choice}\" won't work.
23013                    There will be an executable installed with that name, so
23014                    that can't be the name of a directory as well.  Please
23015                    re-configure with a different directory name." >&5
23016 $as_echo "$as_me: error: \"--with-hackdir=${bindir}/${bad_choice}\" won't work.
23017                    There will be an executable installed with that name, so
23018                    that can't be the name of a directory as well.  Please
23019                    re-configure with a different directory name." >&2;}
23020    { (exit 1); exit 1; }; }
23021   fi
23022 done
23023
23024
23025 do_dir_warning=no
23026
23027 # Now let's warn if there's a previous RPM version already installed.
23028 # But don't bother with this test if we are currently *building* an RPM.
23029
23030 if test -z "$RPM_PACKAGE_VERSION" ; then
23031
23032   rpmnames="xscreensaver xscreensaver-base xscreensaver-extras"
23033
23034   # M4 sucks!!
23035
23036   rpmv=`(rpm -qv $rpmnames) 2>/dev/null | \
23037         sed -n 's/^[-a-z]*-\([0-9][0-9]*[.][0-9][0-9a-z]*\)-.*$/\1/p' | \
23038         head -1`
23039
23040
23041   if test \! -z "$rpmv" ; then
23042     rpmbdir=`rpm -ql $rpmnames | sed -n 's@^\(.*\)/xscreensaver-demo$@\1@p'`
23043     rpmhdir=`rpm -ql $rpmnames | sed -n 's@^\(.*\)/popsquares$@\1@p'`
23044
23045     warning=no
23046     warnL "There is already an installed RPM of xscreensaver $rpmv"
23047     warn2 'on this system.  You might want to remove it ("rpm -ve")'
23048     warn2 'before running "make install" in this directory.'
23049     echo ""
23050     warn2 "Alternately, you could build this version of xscreensaver"
23051     warn2 'as an RPM, and then install that.  An "xscreensaver.spec"'
23052     warn2 'file is included.  Try "rpmbuild -v -ba xscreensaver.spec".'
23053     warn2 "See the RPM documentation for more info."
23054     echo ""
23055
23056     if test "$rpmbdir" = "$rpmhdir" ; then
23057       warn2 "The RPM version was installed in $rpmbdir/."
23058       do_dir_warning=yes
23059     else
23060       warn2 "The RPM version was installed in $rpmbdir/,"
23061       warn2 "with demos in $rpmhdir/."
23062     fi
23063   fi
23064 fi
23065
23066 # Also warn if there's a Debian package installed.
23067 #
23068 debnames="xscreensaver xscreensaver-data xscreensaver-data-extra"
23069 debv=''
23070 for dpkg in $debnames ; do
23071   if test -z "$debv"; then
23072     debv=`dpkg -s $dpkg 2>/dev/null | sed -n 's/^Version: \(.*\)$/\1/p'`
23073   fi
23074 done
23075
23076 if test \! -z "$debv" ; then
23077   debbdir=`dpkg -L $debnames 2>/dev/null | \
23078             sed -n 's@^\(.*/bin/\)xscreensaver$@\1@p'`
23079   debhdir=`dpkg -L $debnames 2>/dev/null | \
23080             sed -n 's@^\(.*/\)popsquares$@\1@p'`
23081   if test -z "$debbdir" ; then debbdir='???'; fi
23082   if test -z "$debhdir" ; then debhdir='???'; fi
23083
23084   warning=no
23085   warnL "There is already an installed dpkg of xscreensaver"
23086   warn2 "version \"$debv\" on this system."
23087   echo ""
23088   warn2 "The dpkg was installed in $debbdir,"
23089   warn2 "with demos in $debhdir."
23090 fi
23091
23092
23093 if test "${bindir}" = "${HACKDIR}" ; then
23094   do_dir_warning=yes
23095 fi
23096
23097 if test "$do_dir_warning" = yes; then
23098   echo ""
23099   echo "$warnsep"
23100   echo ""
23101   echo '      When you run "make install", the "xscreensaver",'
23102   echo '      "xscreensaver-demo", and "xscreensaver-command" executables'
23103   echo "      will be installed in ${bindir}/."
23104   echo ""
23105   echo "      The various graphics demos (190+ different executables) will"
23106   echo "      be installed in ${HACKDIR}/."
23107   echo ""
23108   echo "      If you would prefer the demos to be installed elsewhere,"
23109   echo "      you should re-run configure with the --with-hackdir=DIR"
23110   echo "      option.  For more information, run \`./configure --help'."
23111   warning=yes
23112 fi
23113
23114 if test "$warning" != no; then
23115   echo '' ; echo "$warnsep" ; echo ''
23116 fi
23117
23118 if test "$do_dir_warning" = no; then
23119   if test "$warning" = no; then
23120     echo ''
23121   fi
23122   echo "User programs will be installed in ${bindir}/"
23123   echo "Screen savers will be installed in ${HACKDIR}/"
23124   echo "Configuration dialogs will be installed in ${HACK_CONF_DIR}/"
23125   echo "System-wide default settings will be installed in ${APPDEFAULTS}/"
23126   echo ''
23127 fi