1#! /bin/sh
2# Guess values for system-dependent variables and create Makefiles.
3# Generated by GNU Autoconf 2.69.
4#
5#
6# Copyright (C) 1992-1996, 1998-2012 Free Software Foundation, Inc.
7#
8#
9# This configure script is free software; the Free Software Foundation
10# gives unlimited permission to copy, distribute and modify it.
11## -------------------- ##
12## M4sh Initialization. ##
13## -------------------- ##
14
15# Be more Bourne compatible
16DUALCASE=1; export DUALCASE # for MKS sh
17if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
18  emulate sh
19  NULLCMD=:
20  # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
21  # is contrary to our usage.  Disable this feature.
22  alias -g '${1+"$@"}'='"$@"'
23  setopt NO_GLOB_SUBST
24else
25  case `(set -o) 2>/dev/null` in #(
26  *posix*) :
27    set -o posix ;; #(
28  *) :
29     ;;
30esac
31fi
32
33
34as_nl='
35'
36export as_nl
37# Printing a long string crashes Solaris 7 /usr/bin/printf.
38as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
39as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
40as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
41# Prefer a ksh shell builtin over an external printf program on Solaris,
42# but without wasting forks for bash or zsh.
43if test -z "$BASH_VERSION$ZSH_VERSION" \
44    && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
45  as_echo='print -r --'
46  as_echo_n='print -rn --'
47elif (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'
50else
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'
70fi
71
72# The user is always right.
73if 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  }
79fi
80
81
82# IFS
83# We need space, tab and new line, in precisely that order.  Quoting is
84# there to prevent editors from complaining about space-tab.
85# (If _AS_PATH_WALK were called with IFS unset, it would disable word
86# splitting by setting IFS to empty value.)
87IFS=" ""	$as_nl"
88
89# Find who we are.  Look in the path if we contain no directory separator.
90as_myself=
91case $0 in #((
92  *[\\/]* ) as_myself=$0 ;;
93  *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
94for as_dir in $PATH
95do
96  IFS=$as_save_IFS
97  test -z "$as_dir" && as_dir=.
98    test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
99  done
100IFS=$as_save_IFS
101
102     ;;
103esac
104# We did not find ourselves, most probably we were run as `sh COMMAND'
105# in which case we are not to be found in the path.
106if test "x$as_myself" = x; then
107  as_myself=$0
108fi
109if test ! -f "$as_myself"; then
110  $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
111  exit 1
112fi
113
114# Unset variables that we do not need and which cause bugs (e.g. in
115# pre-3.0 UWIN ksh).  But do not cause bugs in bash 2.01; the "|| exit 1"
116# suppresses any "Segmentation fault" message there.  '((' could
117# trigger a bug in pdksh 5.2.14.
118for as_var in BASH_ENV ENV MAIL MAILPATH
119do eval test x\${$as_var+set} = xset \
120  && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
121done
122PS1='$ '
123PS2='> '
124PS4='+ '
125
126# NLS nuisances.
127LC_ALL=C
128export LC_ALL
129LANGUAGE=C
130export LANGUAGE
131
132# CDPATH.
133(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
134
135# Use a proper internal environment variable to ensure we don't fall
136  # into an infinite loop, continuously re-executing ourselves.
137  if test x"${_as_can_reexec}" != xno && test "x$CONFIG_SHELL" != x; then
138    _as_can_reexec=no; export _as_can_reexec;
139    # We cannot yet assume a decent shell, so we have to provide a
140# neutralization value for shells without unset; and this also
141# works around shells that cannot unset nonexistent variables.
142# Preserve -v and -x to the replacement shell.
143BASH_ENV=/dev/null
144ENV=/dev/null
145(unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV
146case $- in # ((((
147  *v*x* | *x*v* ) as_opts=-vx ;;
148  *v* ) as_opts=-v ;;
149  *x* ) as_opts=-x ;;
150  * ) as_opts= ;;
151esac
152exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"}
153# Admittedly, this is quite paranoid, since all the known shells bail
154# out after a failed `exec'.
155$as_echo "$0: could not re-execute with $CONFIG_SHELL" >&2
156as_fn_exit 255
157  fi
158  # We don't want this to propagate to other subprocesses.
159          { _as_can_reexec=; unset _as_can_reexec;}
160if test "x$CONFIG_SHELL" = x; then
161  as_bourne_compatible="if test -n \"\${ZSH_VERSION+set}\" && (emulate sh) >/dev/null 2>&1; then :
162  emulate sh
163  NULLCMD=:
164  # Pre-4.2 versions of Zsh do word splitting on \${1+\"\$@\"}, which
165  # is contrary to our usage.  Disable this feature.
166  alias -g '\${1+\"\$@\"}'='\"\$@\"'
167  setopt NO_GLOB_SUBST
168else
169  case \`(set -o) 2>/dev/null\` in #(
170  *posix*) :
171    set -o posix ;; #(
172  *) :
173     ;;
174esac
175fi
176"
177  as_required="as_fn_return () { (exit \$1); }
178as_fn_success () { as_fn_return 0; }
179as_fn_failure () { as_fn_return 1; }
180as_fn_ret_success () { return 0; }
181as_fn_ret_failure () { return 1; }
182
183exitcode=0
184as_fn_success || { exitcode=1; echo as_fn_success failed.; }
185as_fn_failure && { exitcode=1; echo as_fn_failure succeeded.; }
186as_fn_ret_success || { exitcode=1; echo as_fn_ret_success failed.; }
187as_fn_ret_failure && { exitcode=1; echo as_fn_ret_failure succeeded.; }
188if ( set x; as_fn_ret_success y && test x = \"\$1\" ); then :
189
190else
191  exitcode=1; echo positional parameters were not saved.
192fi
193test x\$exitcode = x0 || exit 1
194test -x / || exit 1"
195  as_suggested="  as_lineno_1=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_1a=\$LINENO
196  as_lineno_2=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_2a=\$LINENO
197  eval 'test \"x\$as_lineno_1'\$as_run'\" != \"x\$as_lineno_2'\$as_run'\" &&
198  test \"x\`expr \$as_lineno_1'\$as_run' + 1\`\" = \"x\$as_lineno_2'\$as_run'\"' || exit 1
199test \$(( 1 + 1 )) = 2 || exit 1"
200  if (eval "$as_required") 2>/dev/null; then :
201  as_have_required=yes
202else
203  as_have_required=no
204fi
205  if test x$as_have_required = xyes && (eval "$as_suggested") 2>/dev/null; then :
206
207else
208  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
209as_found=false
210for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH
211do
212  IFS=$as_save_IFS
213  test -z "$as_dir" && as_dir=.
214  as_found=:
215  case $as_dir in #(
216	 /*)
217	   for as_base in sh bash ksh sh5; do
218	     # Try only shells that exist, to save several forks.
219	     as_shell=$as_dir/$as_base
220	     if { test -f "$as_shell" || test -f "$as_shell.exe"; } &&
221		    { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$as_shell"; } 2>/dev/null; then :
222  CONFIG_SHELL=$as_shell as_have_required=yes
223		   if { $as_echo "$as_bourne_compatible""$as_suggested" | as_run=a "$as_shell"; } 2>/dev/null; then :
224  break 2
225fi
226fi
227	   done;;
228       esac
229  as_found=false
230done
231$as_found || { if { test -f "$SHELL" || test -f "$SHELL.exe"; } &&
232	      { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$SHELL"; } 2>/dev/null; then :
233  CONFIG_SHELL=$SHELL as_have_required=yes
234fi; }
235IFS=$as_save_IFS
236
237
238      if test "x$CONFIG_SHELL" != x; then :
239  export CONFIG_SHELL
240             # We cannot yet assume a decent shell, so we have to provide a
241# neutralization value for shells without unset; and this also
242# works around shells that cannot unset nonexistent variables.
243# Preserve -v and -x to the replacement shell.
244BASH_ENV=/dev/null
245ENV=/dev/null
246(unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV
247case $- in # ((((
248  *v*x* | *x*v* ) as_opts=-vx ;;
249  *v* ) as_opts=-v ;;
250  *x* ) as_opts=-x ;;
251  * ) as_opts= ;;
252esac
253exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"}
254# Admittedly, this is quite paranoid, since all the known shells bail
255# out after a failed `exec'.
256$as_echo "$0: could not re-execute with $CONFIG_SHELL" >&2
257exit 255
258fi
259
260    if test x$as_have_required = xno; then :
261  $as_echo "$0: This script requires a shell more modern than all"
262  $as_echo "$0: the shells that I found on your system."
263  if test x${ZSH_VERSION+set} = xset ; then
264    $as_echo "$0: In particular, zsh $ZSH_VERSION has bugs and should"
265    $as_echo "$0: be upgraded to zsh 4.3.4 or later."
266  else
267    $as_echo "$0: Please tell bug-autoconf@gnu.org about your system,
268$0: including any error possibly output before this
269$0: message. Then install a modern shell, or manually run
270$0: the script under such a shell if you do have one."
271  fi
272  exit 1
273fi
274fi
275fi
276SHELL=${CONFIG_SHELL-/bin/sh}
277export SHELL
278# Unset more variables known to interfere with behavior of common tools.
279CLICOLOR_FORCE= GREP_OPTIONS=
280unset CLICOLOR_FORCE GREP_OPTIONS
281
282## --------------------- ##
283## M4sh Shell Functions. ##
284## --------------------- ##
285# as_fn_unset VAR
286# ---------------
287# Portably unset VAR.
288as_fn_unset ()
289{
290  { eval $1=; unset $1;}
291}
292as_unset=as_fn_unset
293
294# as_fn_set_status STATUS
295# -----------------------
296# Set $? to STATUS, without forking.
297as_fn_set_status ()
298{
299  return $1
300} # as_fn_set_status
301
302# as_fn_exit STATUS
303# -----------------
304# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
305as_fn_exit ()
306{
307  set +e
308  as_fn_set_status $1
309  exit $1
310} # as_fn_exit
311
312# as_fn_mkdir_p
313# -------------
314# Create "$as_dir" as a directory, including parents if necessary.
315as_fn_mkdir_p ()
316{
317
318  case $as_dir in #(
319  -*) as_dir=./$as_dir;;
320  esac
321  test -d "$as_dir" || eval $as_mkdir_p || {
322    as_dirs=
323    while :; do
324      case $as_dir in #(
325      *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
326      *) as_qdir=$as_dir;;
327      esac
328      as_dirs="'$as_qdir' $as_dirs"
329      as_dir=`$as_dirname -- "$as_dir" ||
330$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
331	 X"$as_dir" : 'X\(//\)[^/]' \| \
332	 X"$as_dir" : 'X\(//\)$' \| \
333	 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
334$as_echo X"$as_dir" |
335    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
336	    s//\1/
337	    q
338	  }
339	  /^X\(\/\/\)[^/].*/{
340	    s//\1/
341	    q
342	  }
343	  /^X\(\/\/\)$/{
344	    s//\1/
345	    q
346	  }
347	  /^X\(\/\).*/{
348	    s//\1/
349	    q
350	  }
351	  s/.*/./; q'`
352      test -d "$as_dir" && break
353    done
354    test -z "$as_dirs" || eval "mkdir $as_dirs"
355  } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
356
357
358} # as_fn_mkdir_p
359
360# as_fn_executable_p FILE
361# -----------------------
362# Test if FILE is an executable regular file.
363as_fn_executable_p ()
364{
365  test -f "$1" && test -x "$1"
366} # as_fn_executable_p
367# as_fn_append VAR VALUE
368# ----------------------
369# Append the text in VALUE to the end of the definition contained in VAR. Take
370# advantage of any shell optimizations that allow amortized linear growth over
371# repeated appends, instead of the typical quadratic growth present in naive
372# implementations.
373if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
374  eval 'as_fn_append ()
375  {
376    eval $1+=\$2
377  }'
378else
379  as_fn_append ()
380  {
381    eval $1=\$$1\$2
382  }
383fi # as_fn_append
384
385# as_fn_arith ARG...
386# ------------------
387# Perform arithmetic evaluation on the ARGs, and store the result in the
388# global $as_val. Take advantage of shells that can avoid forks. The arguments
389# must be portable across $(()) and expr.
390if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
391  eval 'as_fn_arith ()
392  {
393    as_val=$(( $* ))
394  }'
395else
396  as_fn_arith ()
397  {
398    as_val=`expr "$@" || test $? -eq 1`
399  }
400fi # as_fn_arith
401
402
403# as_fn_error STATUS ERROR [LINENO LOG_FD]
404# ----------------------------------------
405# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
406# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
407# script with STATUS, using 1 if that was 0.
408as_fn_error ()
409{
410  as_status=$1; test $as_status -eq 0 && as_status=1
411  if test "$4"; then
412    as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
413    $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
414  fi
415  $as_echo "$as_me: error: $2" >&2
416  as_fn_exit $as_status
417} # as_fn_error
418
419if expr a : '\(a\)' >/dev/null 2>&1 &&
420   test "X`expr 00001 : '.*\(...\)'`" = X001; then
421  as_expr=expr
422else
423  as_expr=false
424fi
425
426if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
427  as_basename=basename
428else
429  as_basename=false
430fi
431
432if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
433  as_dirname=dirname
434else
435  as_dirname=false
436fi
437
438as_me=`$as_basename -- "$0" ||
439$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
440	 X"$0" : 'X\(//\)$' \| \
441	 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
442$as_echo X/"$0" |
443    sed '/^.*\/\([^/][^/]*\)\/*$/{
444	    s//\1/
445	    q
446	  }
447	  /^X\/\(\/\/\)$/{
448	    s//\1/
449	    q
450	  }
451	  /^X\/\(\/\).*/{
452	    s//\1/
453	    q
454	  }
455	  s/.*/./; q'`
456
457# Avoid depending upon Character Ranges.
458as_cr_letters='abcdefghijklmnopqrstuvwxyz'
459as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
460as_cr_Letters=$as_cr_letters$as_cr_LETTERS
461as_cr_digits='0123456789'
462as_cr_alnum=$as_cr_Letters$as_cr_digits
463
464
465  as_lineno_1=$LINENO as_lineno_1a=$LINENO
466  as_lineno_2=$LINENO as_lineno_2a=$LINENO
467  eval 'test "x$as_lineno_1'$as_run'" != "x$as_lineno_2'$as_run'" &&
468  test "x`expr $as_lineno_1'$as_run' + 1`" = "x$as_lineno_2'$as_run'"' || {
469  # Blame Lee E. McMahon (1931-1989) for sed's syntax.  :-)
470  sed -n '
471    p
472    /[$]LINENO/=
473  ' <$as_myself |
474    sed '
475      s/[$]LINENO.*/&-/
476      t lineno
477      b
478      :lineno
479      N
480      :loop
481      s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/
482      t loop
483      s/-\n.*//
484    ' >$as_me.lineno &&
485  chmod +x "$as_me.lineno" ||
486    { $as_echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2; as_fn_exit 1; }
487
488  # If we had to re-execute with $CONFIG_SHELL, we're ensured to have
489  # already done that, so ensure we don't try to do so again and fall
490  # in an infinite loop.  This has already happened in practice.
491  _as_can_reexec=no; export _as_can_reexec
492  # Don't try to exec as it changes $[0], causing all sort of problems
493  # (the dirname of $[0] is not the place where we might find the
494  # original and so on.  Autoconf is especially sensitive to this).
495  . "./$as_me.lineno"
496  # Exit status is that of the last command.
497  exit
498}
499
500ECHO_C= ECHO_N= ECHO_T=
501case `echo -n x` in #(((((
502-n*)
503  case `echo 'xy\c'` in
504  *c*) ECHO_T='	';;	# ECHO_T is single tab character.
505  xy)  ECHO_C='\c';;
506  *)   echo `echo ksh88 bug on AIX 6.1` > /dev/null
507       ECHO_T='	';;
508  esac;;
509*)
510  ECHO_N='-n';;
511esac
512
513rm -f conf$$ conf$$.exe conf$$.file
514if test -d conf$$.dir; then
515  rm -f conf$$.dir/conf$$.file
516else
517  rm -f conf$$.dir
518  mkdir conf$$.dir 2>/dev/null
519fi
520if (echo >conf$$.file) 2>/dev/null; then
521  if ln -s conf$$.file conf$$ 2>/dev/null; then
522    as_ln_s='ln -s'
523    # ... but there are two gotchas:
524    # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
525    # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
526    # In both cases, we have to default to `cp -pR'.
527    ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
528      as_ln_s='cp -pR'
529  elif ln conf$$.file conf$$ 2>/dev/null; then
530    as_ln_s=ln
531  else
532    as_ln_s='cp -pR'
533  fi
534else
535  as_ln_s='cp -pR'
536fi
537rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
538rmdir conf$$.dir 2>/dev/null
539
540if mkdir -p . 2>/dev/null; then
541  as_mkdir_p='mkdir -p "$as_dir"'
542else
543  test -d ./-p && rmdir ./-p
544  as_mkdir_p=false
545fi
546
547as_test_x='test -x'
548as_executable_p=as_fn_executable_p
549
550# Sed expression to map a string onto a valid CPP name.
551as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
552
553# Sed expression to map a string onto a valid variable name.
554as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
555
556
557test -n "$DJDIR" || exec 7<&0 </dev/null
558exec 6>&1
559
560# Name of the host.
561# hostname on some systems (SVR3.2, old GNU/Linux) returns a bogus exit status,
562# so uname gets run too.
563ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q`
564
565#
566# Initializations.
567#
568ac_default_prefix=/usr/local
569ac_clean_files=
570ac_config_libobj_dir=.
571LIBOBJS=
572cross_compiling=no
573subdirs=
574MFLAGS=
575MAKEFLAGS=
576
577# Identity of this package.
578PACKAGE_NAME=
579PACKAGE_TARNAME=
580PACKAGE_VERSION=
581PACKAGE_STRING=
582PACKAGE_BUGREPORT=
583PACKAGE_URL=
584
585ac_unique_file="driver/subprocs.c"
586# Factoring default headers for most tests.
587ac_includes_default="\
588#include <stdio.h>
589#ifdef HAVE_SYS_TYPES_H
590# include <sys/types.h>
591#endif
592#ifdef HAVE_SYS_STAT_H
593# include <sys/stat.h>
594#endif
595#ifdef STDC_HEADERS
596# include <stdlib.h>
597# include <stddef.h>
598#else
599# ifdef HAVE_STDLIB_H
600#  include <stdlib.h>
601# endif
602#endif
603#ifdef HAVE_STRING_H
604# if !defined STDC_HEADERS && defined HAVE_MEMORY_H
605#  include <memory.h>
606# endif
607# include <string.h>
608#endif
609#ifdef HAVE_STRINGS_H
610# include <strings.h>
611#endif
612#ifdef HAVE_INTTYPES_H
613# include <inttypes.h>
614#endif
615#ifdef HAVE_STDINT_H
616# include <stdint.h>
617#endif
618#ifdef HAVE_UNISTD_H
619# include <unistd.h>
620#endif"
621
622ac_subst_vars='LTLIBOBJS
623LIBOBJS
624DEPEND_DEFINES
625DEPEND_FLAGS
626DEPEND
627APPDEFAULTS
628ANIM_LIBS
629ANIM_OBJS
630FONT_DIR
631HACK_CONF_DIR
632PO_DATADIR
633GTK_DATADIR
634HACKDIR_FULL
635HACKDIR
636NOGNOME
637GNOME22
638GNOME24
639JWZGLES_OBJS
640GLE_KLUDGE
641GLE_EXES
642GL_KLUDGE
643GL_MEN
644GL_UTIL_EXES
645SUID_EXES
646RETIRED_GL_EXES
647GL_EXES
648JPEG_EXES
649LOCK_OBJS
650LOCK_SRCS
651XFT_LIBS
652XFT_OBJS
653XFT_SRCS
654PASSWD_OBJS
655PASSWD_SRCS
656MEN_OSX
657SCRIPTS_OSX
658SYSTEMD_LIBS
659EXES_SYSTEMD
660EXES_OSX
661WITH_BROWSER
662DEFAULT_TEXT_FILE
663DEFAULT_IMAGE_DIRECTORY
664DEFAULT_IMAGES_P
665NEW_LOGIN_COMMAND_P
666NEW_LOGIN_COMMAND
667COMMENT_PAM_CHECK_ACCOUNT
668HAVE_PAM_FAIL_DELAY
669INSTALL_PAM
670INSTALL_DIRS
671SETCAP_HACKS
672SETUID_HACKS
673SETUID_AUTH
674PROG_SETCAP
675LIBCAP_LIBS
676LIBCAP_CFLAGS
677PASSWD_LIBS
678XINERAMA_LIBS
679XDPMS_LIBS
680GLE_LIBS
681GL_LIBS
682PTY_LIBS
683HACK_LIBS
684JPEG_LIBS
685PNG_LIBS
686XML_LIBS
687GTK_LIBS
688MOTIF_LIBS
689SAVER_LIBS
690ALL_DEMO_PROGRAMS
691PREFERRED_DEMO_PROGRAM
692INCLUDES
693PTHREAD_CFLAGS
694PTHREAD_LIBS
695PTHREAD_CXX
696PTHREAD_CC
697ax_pthread_config
698SED
699target_os
700target_vendor
701target_cpu
702target
703login_manager_tmp
704gnome_url_show_program
705gnome_open_program
706MKINSTALLDIRS
707POSUB
708POFILES
709PO_IN_DATADIR_FALSE
710PO_IN_DATADIR_TRUE
711INTLLIBS
712INSTOBJEXT
713GMOFILES
714DATADIRNAME
715CATOBJEXT
716CATALOGS
717MSGFMT_OPTS
718INTL_MACOSX_LIBS
719GETTEXT_PACKAGE
720ALL_LINGUAS
721GMSGFMT
722MSGFMT
723MSGMERGE
724XGETTEXT
725INTLTOOL_POLICY_RULE
726INTLTOOL_SERVICE_RULE
727INTLTOOL_THEME_RULE
728INTLTOOL_SCHEMAS_RULE
729INTLTOOL_CAVES_RULE
730INTLTOOL_XML_NOMERGE_RULE
731INTLTOOL_XML_RULE
732INTLTOOL_KBD_RULE
733INTLTOOL_XAM_RULE
734INTLTOOL_UI_RULE
735INTLTOOL_SOUNDLIST_RULE
736INTLTOOL_SHEET_RULE
737INTLTOOL_SERVER_RULE
738INTLTOOL_PONG_RULE
739INTLTOOL_OAF_RULE
740INTLTOOL_PROP_RULE
741INTLTOOL_KEYS_RULE
742INTLTOOL_DIRECTORY_RULE
743INTLTOOL_DESKTOP_RULE
744intltool__v_merge_options_0
745intltool__v_merge_options_
746INTLTOOL_V_MERGE_OPTIONS
747INTLTOOL__v_MERGE_0
748INTLTOOL__v_MERGE_
749INTLTOOL_V_MERGE
750AM_DEFAULT_VERBOSITY
751INTLTOOL_EXTRACT
752INTLTOOL_MERGE
753INTLTOOL_UPDATE
754USE_NLS
755pkg_config
756X_EXTRA_LIBS
757X_LIBS
758X_PRE_LIBS
759X_CFLAGS
760XMKMF
761PERL
762EGREP
763GREP
764SET_MAKE
765INSTALL_DATA
766INSTALL_SCRIPT
767INSTALL_PROGRAM
768CPP
769OBJEXT
770EXEEXT
771ac_ct_CC
772CPPFLAGS
773LDFLAGS
774CFLAGS
775CC
776host_os
777host_vendor
778host_cpu
779host
780build_os
781build_vendor
782build_cpu
783build
784target_alias
785host_alias
786build_alias
787LIBS
788ECHO_T
789ECHO_N
790ECHO_C
791DEFS
792mandir
793localedir
794libdir
795psdir
796pdfdir
797dvidir
798htmldir
799infodir
800docdir
801oldincludedir
802includedir
803runstatedir
804localstatedir
805sharedstatedir
806sysconfdir
807datadir
808datarootdir
809libexecdir
810sbindir
811bindir
812program_transform_name
813prefix
814exec_prefix
815PACKAGE_URL
816PACKAGE_BUGREPORT
817PACKAGE_STRING
818PACKAGE_VERSION
819PACKAGE_TARNAME
820PACKAGE_NAME
821PATH_SEPARATOR
822SHELL'
823ac_subst_files=''
824ac_user_opts='
825enable_option_checking
826enable_largefile
827with_x
828enable_nls
829with_app_defaults
830with_hackdir
831enable_subdir
832with_configdir
833with_fontdir
834with_dpms_ext
835with_xf86vmode_ext
836with_xinerama_ext
837with_randr_ext
838with_xinput_ext
839with_xf86gamma_ext
840with_xidle_ext
841with_sgi_ext
842with_sgivc_ext
843with_readdisplay
844with_xshm_ext
845with_xdbe_ext
846with_xkb_ext
847with_proc_interrupts
848with_proc_oom
849with_systemd
850with_elogind
851enable_locking
852enable_root_passwd
853with_pam
854with_pam_service_name
855enable_pam_check_account_type
856with_kerberos
857with_shadow
858with_gtk
859with_motif
860with_login_manager
861with_image_directory
862with_text_file
863with_browser
864with_pthread
865with_gles
866with_gl
867with_glx
868with_gle
869with_jpeg
870with_png
871with_pixbuf
872with_xft
873with_setuid_hacks
874with_record_animation
875'
876      ac_precious_vars='build_alias
877host_alias
878target_alias
879CC
880CFLAGS
881LDFLAGS
882LIBS
883CPPFLAGS
884CPP
885XMKMF'
886
887
888# Initialize some variables set by options.
889ac_init_help=
890ac_init_version=false
891ac_unrecognized_opts=
892ac_unrecognized_sep=
893# The variables have the same names as the options, with
894# dashes changed to underlines.
895cache_file=/dev/null
896exec_prefix=NONE
897no_create=
898no_recursion=
899prefix=NONE
900program_prefix=NONE
901program_suffix=NONE
902program_transform_name=s,x,x,
903silent=
904site=
905srcdir=
906verbose=
907x_includes=NONE
908x_libraries=NONE
909
910# Installation directory options.
911# These are left unexpanded so users can "make install exec_prefix=/foo"
912# and all the variables that are supposed to be based on exec_prefix
913# by default will actually change.
914# Use braces instead of parens because sh, perl, etc. also accept them.
915# (The list follows the same order as the GNU Coding Standards.)
916bindir='${exec_prefix}/bin'
917sbindir='${exec_prefix}/sbin'
918libexecdir='${exec_prefix}/libexec'
919datarootdir='${prefix}/share'
920datadir='${datarootdir}'
921sysconfdir='${prefix}/etc'
922sharedstatedir='${prefix}/com'
923localstatedir='${prefix}/var'
924runstatedir='${localstatedir}/run'
925includedir='${prefix}/include'
926oldincludedir='/usr/include'
927docdir='${datarootdir}/doc/${PACKAGE}'
928infodir='${datarootdir}/info'
929htmldir='${docdir}'
930dvidir='${docdir}'
931pdfdir='${docdir}'
932psdir='${docdir}'
933libdir='${exec_prefix}/lib'
934localedir='${datarootdir}/locale'
935mandir='${datarootdir}/man'
936
937ac_prev=
938ac_dashdash=
939for ac_option
940do
941  # If the previous option needs an argument, assign it.
942  if test -n "$ac_prev"; then
943    eval $ac_prev=\$ac_option
944    ac_prev=
945    continue
946  fi
947
948  case $ac_option in
949  *=?*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
950  *=)   ac_optarg= ;;
951  *)    ac_optarg=yes ;;
952  esac
953
954  # Accept the important Cygnus configure options, so we can diagnose typos.
955
956  case $ac_dashdash$ac_option in
957  --)
958    ac_dashdash=yes ;;
959
960  -bindir | --bindir | --bindi | --bind | --bin | --bi)
961    ac_prev=bindir ;;
962  -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
963    bindir=$ac_optarg ;;
964
965  -build | --build | --buil | --bui | --bu)
966    ac_prev=build_alias ;;
967  -build=* | --build=* | --buil=* | --bui=* | --bu=*)
968    build_alias=$ac_optarg ;;
969
970  -cache-file | --cache-file | --cache-fil | --cache-fi \
971  | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
972    ac_prev=cache_file ;;
973  -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
974  | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
975    cache_file=$ac_optarg ;;
976
977  --config-cache | -C)
978    cache_file=config.cache ;;
979
980  -datadir | --datadir | --datadi | --datad)
981    ac_prev=datadir ;;
982  -datadir=* | --datadir=* | --datadi=* | --datad=*)
983    datadir=$ac_optarg ;;
984
985  -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
986  | --dataroo | --dataro | --datar)
987    ac_prev=datarootdir ;;
988  -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
989  | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
990    datarootdir=$ac_optarg ;;
991
992  -disable-* | --disable-*)
993    ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
994    # Reject names that are not valid shell variable names.
995    expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
996      as_fn_error $? "invalid feature name: $ac_useropt"
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--disable-$ac_useropt_orig"
1004	 ac_unrecognized_sep=', ';;
1005    esac
1006    eval enable_$ac_useropt=no ;;
1007
1008  -docdir | --docdir | --docdi | --doc | --do)
1009    ac_prev=docdir ;;
1010  -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*)
1011    docdir=$ac_optarg ;;
1012
1013  -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv)
1014    ac_prev=dvidir ;;
1015  -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*)
1016    dvidir=$ac_optarg ;;
1017
1018  -enable-* | --enable-*)
1019    ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
1020    # Reject names that are not valid shell variable names.
1021    expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1022      as_fn_error $? "invalid feature name: $ac_useropt"
1023    ac_useropt_orig=$ac_useropt
1024    ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1025    case $ac_user_opts in
1026      *"
1027"enable_$ac_useropt"
1028"*) ;;
1029      *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig"
1030	 ac_unrecognized_sep=', ';;
1031    esac
1032    eval enable_$ac_useropt=\$ac_optarg ;;
1033
1034  -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
1035  | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
1036  | --exec | --exe | --ex)
1037    ac_prev=exec_prefix ;;
1038  -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
1039  | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
1040  | --exec=* | --exe=* | --ex=*)
1041    exec_prefix=$ac_optarg ;;
1042
1043  -gas | --gas | --ga | --g)
1044    # Obsolete; use --with-gas.
1045    with_gas=yes ;;
1046
1047  -help | --help | --hel | --he | -h)
1048    ac_init_help=long ;;
1049  -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
1050    ac_init_help=recursive ;;
1051  -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
1052    ac_init_help=short ;;
1053
1054  -host | --host | --hos | --ho)
1055    ac_prev=host_alias ;;
1056  -host=* | --host=* | --hos=* | --ho=*)
1057    host_alias=$ac_optarg ;;
1058
1059  -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht)
1060    ac_prev=htmldir ;;
1061  -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \
1062  | --ht=*)
1063    htmldir=$ac_optarg ;;
1064
1065  -includedir | --includedir | --includedi | --included | --include \
1066  | --includ | --inclu | --incl | --inc)
1067    ac_prev=includedir ;;
1068  -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
1069  | --includ=* | --inclu=* | --incl=* | --inc=*)
1070    includedir=$ac_optarg ;;
1071
1072  -infodir | --infodir | --infodi | --infod | --info | --inf)
1073    ac_prev=infodir ;;
1074  -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
1075    infodir=$ac_optarg ;;
1076
1077  -libdir | --libdir | --libdi | --libd)
1078    ac_prev=libdir ;;
1079  -libdir=* | --libdir=* | --libdi=* | --libd=*)
1080    libdir=$ac_optarg ;;
1081
1082  -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
1083  | --libexe | --libex | --libe)
1084    ac_prev=libexecdir ;;
1085  -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
1086  | --libexe=* | --libex=* | --libe=*)
1087    libexecdir=$ac_optarg ;;
1088
1089  -localedir | --localedir | --localedi | --localed | --locale)
1090    ac_prev=localedir ;;
1091  -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*)
1092    localedir=$ac_optarg ;;
1093
1094  -localstatedir | --localstatedir | --localstatedi | --localstated \
1095  | --localstate | --localstat | --localsta | --localst | --locals)
1096    ac_prev=localstatedir ;;
1097  -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
1098  | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*)
1099    localstatedir=$ac_optarg ;;
1100
1101  -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
1102    ac_prev=mandir ;;
1103  -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
1104    mandir=$ac_optarg ;;
1105
1106  -nfp | --nfp | --nf)
1107    # Obsolete; use --without-fp.
1108    with_fp=no ;;
1109
1110  -no-create | --no-create | --no-creat | --no-crea | --no-cre \
1111  | --no-cr | --no-c | -n)
1112    no_create=yes ;;
1113
1114  -no-recursion | --no-recursion | --no-recursio | --no-recursi \
1115  | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
1116    no_recursion=yes ;;
1117
1118  -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
1119  | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
1120  | --oldin | --oldi | --old | --ol | --o)
1121    ac_prev=oldincludedir ;;
1122  -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
1123  | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
1124  | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
1125    oldincludedir=$ac_optarg ;;
1126
1127  -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
1128    ac_prev=prefix ;;
1129  -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
1130    prefix=$ac_optarg ;;
1131
1132  -program-prefix | --program-prefix | --program-prefi | --program-pref \
1133  | --program-pre | --program-pr | --program-p)
1134    ac_prev=program_prefix ;;
1135  -program-prefix=* | --program-prefix=* | --program-prefi=* \
1136  | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
1137    program_prefix=$ac_optarg ;;
1138
1139  -program-suffix | --program-suffix | --program-suffi | --program-suff \
1140  | --program-suf | --program-su | --program-s)
1141    ac_prev=program_suffix ;;
1142  -program-suffix=* | --program-suffix=* | --program-suffi=* \
1143  | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
1144    program_suffix=$ac_optarg ;;
1145
1146  -program-transform-name | --program-transform-name \
1147  | --program-transform-nam | --program-transform-na \
1148  | --program-transform-n | --program-transform- \
1149  | --program-transform | --program-transfor \
1150  | --program-transfo | --program-transf \
1151  | --program-trans | --program-tran \
1152  | --progr-tra | --program-tr | --program-t)
1153    ac_prev=program_transform_name ;;
1154  -program-transform-name=* | --program-transform-name=* \
1155  | --program-transform-nam=* | --program-transform-na=* \
1156  | --program-transform-n=* | --program-transform-=* \
1157  | --program-transform=* | --program-transfor=* \
1158  | --program-transfo=* | --program-transf=* \
1159  | --program-trans=* | --program-tran=* \
1160  | --progr-tra=* | --program-tr=* | --program-t=*)
1161    program_transform_name=$ac_optarg ;;
1162
1163  -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd)
1164    ac_prev=pdfdir ;;
1165  -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*)
1166    pdfdir=$ac_optarg ;;
1167
1168  -psdir | --psdir | --psdi | --psd | --ps)
1169    ac_prev=psdir ;;
1170  -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*)
1171    psdir=$ac_optarg ;;
1172
1173  -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1174  | -silent | --silent | --silen | --sile | --sil)
1175    silent=yes ;;
1176
1177  -runstatedir | --runstatedir | --runstatedi | --runstated \
1178  | --runstate | --runstat | --runsta | --runst | --runs \
1179  | --run | --ru | --r)
1180    ac_prev=runstatedir ;;
1181  -runstatedir=* | --runstatedir=* | --runstatedi=* | --runstated=* \
1182  | --runstate=* | --runstat=* | --runsta=* | --runst=* | --runs=* \
1183  | --run=* | --ru=* | --r=*)
1184    runstatedir=$ac_optarg ;;
1185
1186  -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
1187    ac_prev=sbindir ;;
1188  -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
1189  | --sbi=* | --sb=*)
1190    sbindir=$ac_optarg ;;
1191
1192  -sharedstatedir | --sharedstatedir | --sharedstatedi \
1193  | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
1194  | --sharedst | --shareds | --shared | --share | --shar \
1195  | --sha | --sh)
1196    ac_prev=sharedstatedir ;;
1197  -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
1198  | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
1199  | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
1200  | --sha=* | --sh=*)
1201    sharedstatedir=$ac_optarg ;;
1202
1203  -site | --site | --sit)
1204    ac_prev=site ;;
1205  -site=* | --site=* | --sit=*)
1206    site=$ac_optarg ;;
1207
1208  -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
1209    ac_prev=srcdir ;;
1210  -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
1211    srcdir=$ac_optarg ;;
1212
1213  -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
1214  | --syscon | --sysco | --sysc | --sys | --sy)
1215    ac_prev=sysconfdir ;;
1216  -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
1217  | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
1218    sysconfdir=$ac_optarg ;;
1219
1220  -target | --target | --targe | --targ | --tar | --ta | --t)
1221    ac_prev=target_alias ;;
1222  -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
1223    target_alias=$ac_optarg ;;
1224
1225  -v | -verbose | --verbose | --verbos | --verbo | --verb)
1226    verbose=yes ;;
1227
1228  -version | --version | --versio | --versi | --vers | -V)
1229    ac_init_version=: ;;
1230
1231  -with-* | --with-*)
1232    ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
1233    # Reject names that are not valid shell variable names.
1234    expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1235      as_fn_error $? "invalid package name: $ac_useropt"
1236    ac_useropt_orig=$ac_useropt
1237    ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1238    case $ac_user_opts in
1239      *"
1240"with_$ac_useropt"
1241"*) ;;
1242      *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig"
1243	 ac_unrecognized_sep=', ';;
1244    esac
1245    eval with_$ac_useropt=\$ac_optarg ;;
1246
1247  -without-* | --without-*)
1248    ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'`
1249    # Reject names that are not valid shell variable names.
1250    expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1251      as_fn_error $? "invalid package name: $ac_useropt"
1252    ac_useropt_orig=$ac_useropt
1253    ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1254    case $ac_user_opts in
1255      *"
1256"with_$ac_useropt"
1257"*) ;;
1258      *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig"
1259	 ac_unrecognized_sep=', ';;
1260    esac
1261    eval with_$ac_useropt=no ;;
1262
1263  --x)
1264    # Obsolete; use --with-x.
1265    with_x=yes ;;
1266
1267  -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
1268  | --x-incl | --x-inc | --x-in | --x-i)
1269    ac_prev=x_includes ;;
1270  -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
1271  | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
1272    x_includes=$ac_optarg ;;
1273
1274  -x-libraries | --x-libraries | --x-librarie | --x-librari \
1275  | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
1276    ac_prev=x_libraries ;;
1277  -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
1278  | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
1279    x_libraries=$ac_optarg ;;
1280
1281  -*) as_fn_error $? "unrecognized option: \`$ac_option'
1282Try \`$0 --help' for more information"
1283    ;;
1284
1285  *=*)
1286    ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
1287    # Reject names that are not valid shell variable names.
1288    case $ac_envvar in #(
1289      '' | [0-9]* | *[!_$as_cr_alnum]* )
1290      as_fn_error $? "invalid variable name: \`$ac_envvar'" ;;
1291    esac
1292    eval $ac_envvar=\$ac_optarg
1293    export $ac_envvar ;;
1294
1295  *)
1296    # FIXME: should be removed in autoconf 3.0.
1297    $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2
1298    expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
1299      $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2
1300    : "${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}"
1301    ;;
1302
1303  esac
1304done
1305
1306if test -n "$ac_prev"; then
1307  ac_option=--`echo $ac_prev | sed 's/_/-/g'`
1308  as_fn_error $? "missing argument to $ac_option"
1309fi
1310
1311if test -n "$ac_unrecognized_opts"; then
1312  case $enable_option_checking in
1313    no) ;;
1314    fatal) as_fn_error $? "unrecognized options: $ac_unrecognized_opts" ;;
1315    *)     $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;;
1316  esac
1317fi
1318
1319# Check all directory arguments for consistency.
1320for ac_var in	exec_prefix prefix bindir sbindir libexecdir datarootdir \
1321		datadir sysconfdir sharedstatedir localstatedir includedir \
1322		oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
1323		libdir localedir mandir runstatedir
1324do
1325  eval ac_val=\$$ac_var
1326  # Remove trailing slashes.
1327  case $ac_val in
1328    */ )
1329      ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'`
1330      eval $ac_var=\$ac_val;;
1331  esac
1332  # Be sure to have absolute directory names.
1333  case $ac_val in
1334    [\\/$]* | ?:[\\/]* )  continue;;
1335    NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
1336  esac
1337  as_fn_error $? "expected an absolute directory name for --$ac_var: $ac_val"
1338done
1339
1340# There might be people who depend on the old broken behavior: `$host'
1341# used to hold the argument of --host etc.
1342# FIXME: To remove some day.
1343build=$build_alias
1344host=$host_alias
1345target=$target_alias
1346
1347# FIXME: To remove some day.
1348if test "x$host_alias" != x; then
1349  if test "x$build_alias" = x; then
1350    cross_compiling=maybe
1351  elif test "x$build_alias" != "x$host_alias"; then
1352    cross_compiling=yes
1353  fi
1354fi
1355
1356ac_tool_prefix=
1357test -n "$host_alias" && ac_tool_prefix=$host_alias-
1358
1359test "$silent" = yes && exec 6>/dev/null
1360
1361
1362ac_pwd=`pwd` && test -n "$ac_pwd" &&
1363ac_ls_di=`ls -di .` &&
1364ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` ||
1365  as_fn_error $? "working directory cannot be determined"
1366test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
1367  as_fn_error $? "pwd does not report name of working directory"
1368
1369
1370# Find the source files, if location was not specified.
1371if test -z "$srcdir"; then
1372  ac_srcdir_defaulted=yes
1373  # Try the directory containing this script, then the parent directory.
1374  ac_confdir=`$as_dirname -- "$as_myself" ||
1375$as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
1376	 X"$as_myself" : 'X\(//\)[^/]' \| \
1377	 X"$as_myself" : 'X\(//\)$' \| \
1378	 X"$as_myself" : 'X\(/\)' \| . 2>/dev/null ||
1379$as_echo X"$as_myself" |
1380    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
1381	    s//\1/
1382	    q
1383	  }
1384	  /^X\(\/\/\)[^/].*/{
1385	    s//\1/
1386	    q
1387	  }
1388	  /^X\(\/\/\)$/{
1389	    s//\1/
1390	    q
1391	  }
1392	  /^X\(\/\).*/{
1393	    s//\1/
1394	    q
1395	  }
1396	  s/.*/./; q'`
1397  srcdir=$ac_confdir
1398  if test ! -r "$srcdir/$ac_unique_file"; then
1399    srcdir=..
1400  fi
1401else
1402  ac_srcdir_defaulted=no
1403fi
1404if test ! -r "$srcdir/$ac_unique_file"; then
1405  test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
1406  as_fn_error $? "cannot find sources ($ac_unique_file) in $srcdir"
1407fi
1408ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work"
1409ac_abs_confdir=`(
1410	cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error $? "$ac_msg"
1411	pwd)`
1412# When building in place, set srcdir=.
1413if test "$ac_abs_confdir" = "$ac_pwd"; then
1414  srcdir=.
1415fi
1416# Remove unnecessary trailing slashes from srcdir.
1417# Double slashes in file names in object file debugging info
1418# mess up M-x gdb in Emacs.
1419case $srcdir in
1420*/) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;;
1421esac
1422for ac_var in $ac_precious_vars; do
1423  eval ac_env_${ac_var}_set=\${${ac_var}+set}
1424  eval ac_env_${ac_var}_value=\$${ac_var}
1425  eval ac_cv_env_${ac_var}_set=\${${ac_var}+set}
1426  eval ac_cv_env_${ac_var}_value=\$${ac_var}
1427done
1428
1429#
1430# Report the --help message.
1431#
1432if test "$ac_init_help" = "long"; then
1433  # Omit some internal or obsolete options to make the list less imposing.
1434  # This message is too long to be a string in the A/UX 3.1 sh.
1435  cat <<_ACEOF
1436\`configure' configures this package to adapt to many kinds of systems.
1437
1438Usage: $0 [OPTION]... [VAR=VALUE]...
1439
1440To assign environment variables (e.g., CC, CFLAGS...), specify them as
1441VAR=VALUE.  See below for descriptions of some of the useful variables.
1442
1443Defaults for the options are specified in brackets.
1444
1445Configuration:
1446  -h, --help              display this help and exit
1447      --help=short        display options specific to this package
1448      --help=recursive    display the short help of all the included packages
1449  -V, --version           display version information and exit
1450  -q, --quiet, --silent   do not print \`checking ...' messages
1451      --cache-file=FILE   cache test results in FILE [disabled]
1452  -C, --config-cache      alias for \`--cache-file=config.cache'
1453  -n, --no-create         do not create output files
1454      --srcdir=DIR        find the sources in DIR [configure dir or \`..']
1455
1456Installation directories:
1457  --prefix=PREFIX         install architecture-independent files in PREFIX
1458                          [$ac_default_prefix]
1459  --exec-prefix=EPREFIX   install architecture-dependent files in EPREFIX
1460                          [PREFIX]
1461
1462By default, \`make install' will install all the files in
1463\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc.  You can specify
1464an installation prefix other than \`$ac_default_prefix' using \`--prefix',
1465for instance \`--prefix=\$HOME'.
1466
1467For better control, use the options below.
1468
1469Fine tuning of the installation directories:
1470  --bindir=DIR            user executables [EPREFIX/bin]
1471  --sbindir=DIR           system admin executables [EPREFIX/sbin]
1472  --libexecdir=DIR        program executables [EPREFIX/libexec]
1473  --sysconfdir=DIR        read-only single-machine data [PREFIX/etc]
1474  --sharedstatedir=DIR    modifiable architecture-independent data [PREFIX/com]
1475  --localstatedir=DIR     modifiable single-machine data [PREFIX/var]
1476  --runstatedir=DIR       modifiable per-process data [LOCALSTATEDIR/run]
1477  --libdir=DIR            object code libraries [EPREFIX/lib]
1478  --includedir=DIR        C header files [PREFIX/include]
1479  --oldincludedir=DIR     C header files for non-gcc [/usr/include]
1480  --datarootdir=DIR       read-only arch.-independent data root [PREFIX/share]
1481  --datadir=DIR           read-only architecture-independent data [DATAROOTDIR]
1482  --infodir=DIR           info documentation [DATAROOTDIR/info]
1483  --localedir=DIR         locale-dependent data [DATAROOTDIR/locale]
1484  --mandir=DIR            man documentation [DATAROOTDIR/man]
1485  --docdir=DIR            documentation root [DATAROOTDIR/doc/PACKAGE]
1486  --htmldir=DIR           html documentation [DOCDIR]
1487  --dvidir=DIR            dvi documentation [DOCDIR]
1488  --pdfdir=DIR            pdf documentation [DOCDIR]
1489  --psdir=DIR             ps documentation [DOCDIR]
1490_ACEOF
1491
1492  cat <<\_ACEOF
1493
1494X features:
1495  --x-includes=DIR    X include files are in DIR
1496  --x-libraries=DIR   X library files are in DIR
1497
1498System types:
1499  --build=BUILD     configure for building on BUILD [guessed]
1500  --host=HOST       cross-compile to build programs to run on HOST [BUILD]
1501  --target=TARGET   configure for building compilers for TARGET [HOST]
1502_ACEOF
1503fi
1504
1505if test -n "$ac_init_help"; then
1506
1507  cat <<\_ACEOF
1508
1509Optional Features:
1510  --disable-option-checking  ignore unrecognized --enable/--with options
1511  --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)
1512  --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
1513  --disable-largefile     omit support for large files
1514  --disable-nls           do not use Native Language Support
1515
1516
1517Optional Packages:
1518  --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
1519  --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
1520  --with-x                use the X Window System
1521
1522Installation Options:
1523
1524  --prefix=PREFIX         Install root of architecture-independent files.
1525  --exec-prefix=EPREFIX   Install root of architecture-dependent files.
1526  --with-app-defaults=DIR Where to install the default settings file.
1527  --with-hackdir=DIR      Where to install the hundreds of demo executables.
1528  --with-configdir=DIR    Where to install the GUI configuration files.
1529  --with-fontdir=DIR      Where to install the extra font files.
1530
1531Server Extension Options:
1532
1533  --with-dpms-ext         Include support for power management.
1534  --with-xf86vmode-ext    Include support for virtual screens.
1535  --with-xinerama-ext     Include support for multiple monitors.
1536  --with-randr-ext        Include support for multiple monitors.
1537  --with-xinput-ext       Include support for the XInput2 extension.
1538  --with-xf86gamma-ext    Include support for XFree86 gamma fading.
1539  --with-xidle-ext        Include support for the X11R5 XIDLE extension.
1540  --with-sgi-ext          Include support for the SGI SCREEN_SAVER extension.
1541  --with-sgivc-ext        Include support for the SGI-VIDEO-CONTROL extension.
1542  --with-readdisplay      Include support for the SGI XReadDisplay extension.
1543  --with-xshm-ext         Include support for the Shared Memory extension.
1544  --with-xdbe-ext         Include support for the DOUBLE-BUFFER extension.
1545  --with-xkb-ext          Include support for the X Keyboard extension.
1546  --with-proc-interrupts  Include support for consulting /proc/interrupts to
1547                          notice activity on PS/2 keyboards and mice.
1548  --with-proc-oom         Include support to duck the out-of-memory killer.
1549  --with-systemd          Support systemd requests to lock on suspend, and to
1550                          allow video players to inhibit the screen saver.
1551  --with-elogind          Use elogind instead of systemd.
1552
1553Screen Locking Options:
1554
1555  --disable-locking       Do not allow locking of the display at all.
1556  --with-pam              Include support for PAM (Pluggable Auth Modules).
1557  --with-pam-service-name Set the name of the xscreensaver PAM service.
1558  --enable-pam-account    Whether PAM should check the result of account
1559	    		  modules when authenticating.  Only do this if you
1560	    		  have "account" modules configured on your system.
1561  --enable-root-passwd	  Allow the root passwd to unlock, if not using PAM.
1562  --with-kerberos         Include support for Kerberos authentication.
1563  --with-shadow           Include support for shadow password authentication.
1564
1565User Interface Options:
1566
1567  --with-gtk              Use the Gtk toolkit for the user interface.
1568  --with-motif            Use the Motif toolkit for the user interface.
1569  --with-login-manager    Put a "New Login" button on the unlock dialog that
1570                          runs a login manager like gdmflexiserver or kdmctl.
1571  --with-image-directory  Some demos will display random images from here.
1572  --with-text-file=FILE   Some demos will use this as a source of text.
1573  --with-browser=BROWSER  The web browser used to open the "Help" URL.
1574
1575
1576Graphics Options:
1577
1578  --with-gl               Build those demos which depend on OpenGL.
1579  --with-gles             Emulate OpenGL 1.3 in terms of OpenGL ES 1.x.
1580  --with-glx              Use GLX to interface OpenGL and X11 instead of EGL.
1581  --with-gle              Include support for the GL Extrusion library.
1582  --with-jpeg             Include support for the JPEG library.
1583  --with-png              Include support for the PNG library.
1584  --with-pixbuf           Include support for the GDK-Pixbuf library, which
1585                          allows the display of JPEG, PNG, GIF and SVG images.
1586  --with-xft              Include support for the X Freetype library.
1587  --with-pthread          Enables POSIX threads, for SMP support.
1588  --with-setuid-hacks     Install the "sonar" demo as setuid root, which is
1589                          needed in order to ping other hosts.
1590  --with-record-animation Include code for generating MP4 videos.
1591
1592Some influential environment variables:
1593  CC          C compiler command
1594  CFLAGS      C compiler flags
1595  LDFLAGS     linker flags, e.g. -L<lib dir> if you have libraries in a
1596              nonstandard directory <lib dir>
1597  LIBS        libraries to pass to the linker, e.g. -l<library>
1598  CPPFLAGS    (Objective) C/C++ preprocessor flags, e.g. -I<include dir> if
1599              you have headers in a nonstandard directory <include dir>
1600  CPP         C preprocessor
1601  XMKMF       Path to xmkmf, Makefile generator for X Window System
1602
1603Use these variables to override the choices made by `configure' or to help
1604it to find libraries and programs with nonstandard names/locations.
1605
1606Report bugs to the package provider.
1607_ACEOF
1608ac_status=$?
1609fi
1610
1611if test "$ac_init_help" = "recursive"; then
1612  # If there are subdirs, report their specific --help.
1613  for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
1614    test -d "$ac_dir" ||
1615      { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } ||
1616      continue
1617    ac_builddir=.
1618
1619case "$ac_dir" in
1620.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
1621*)
1622  ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
1623  # A ".." for each directory in $ac_dir_suffix.
1624  ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
1625  case $ac_top_builddir_sub in
1626  "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
1627  *)  ac_top_build_prefix=$ac_top_builddir_sub/ ;;
1628  esac ;;
1629esac
1630ac_abs_top_builddir=$ac_pwd
1631ac_abs_builddir=$ac_pwd$ac_dir_suffix
1632# for backward compatibility:
1633ac_top_builddir=$ac_top_build_prefix
1634
1635case $srcdir in
1636  .)  # We are building in place.
1637    ac_srcdir=.
1638    ac_top_srcdir=$ac_top_builddir_sub
1639    ac_abs_top_srcdir=$ac_pwd ;;
1640  [\\/]* | ?:[\\/]* )  # Absolute name.
1641    ac_srcdir=$srcdir$ac_dir_suffix;
1642    ac_top_srcdir=$srcdir
1643    ac_abs_top_srcdir=$srcdir ;;
1644  *) # Relative name.
1645    ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
1646    ac_top_srcdir=$ac_top_build_prefix$srcdir
1647    ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
1648esac
1649ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
1650
1651    cd "$ac_dir" || { ac_status=$?; continue; }
1652    # Check for guested configure.
1653    if test -f "$ac_srcdir/configure.gnu"; then
1654      echo &&
1655      $SHELL "$ac_srcdir/configure.gnu" --help=recursive
1656    elif test -f "$ac_srcdir/configure"; then
1657      echo &&
1658      $SHELL "$ac_srcdir/configure" --help=recursive
1659    else
1660      $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
1661    fi || ac_status=$?
1662    cd "$ac_pwd" || { ac_status=$?; break; }
1663  done
1664fi
1665
1666test -n "$ac_init_help" && exit $ac_status
1667if $ac_init_version; then
1668  cat <<\_ACEOF
1669configure
1670generated by GNU Autoconf 2.69
1671
1672Copyright (C) 2012 Free Software Foundation, Inc.
1673This configure script is free software; the Free Software Foundation
1674gives unlimited permission to copy, distribute and modify it.
1675_ACEOF
1676  exit
1677fi
1678
1679## ------------------------ ##
1680## Autoconf initialization. ##
1681## ------------------------ ##
1682
1683# ac_fn_c_try_compile LINENO
1684# --------------------------
1685# Try to compile conftest.$ac_ext, and return whether this succeeded.
1686ac_fn_c_try_compile ()
1687{
1688  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1689  rm -f conftest.$ac_objext
1690  if { { ac_try="$ac_compile"
1691case "(($ac_try" in
1692  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1693  *) ac_try_echo=$ac_try;;
1694esac
1695eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1696$as_echo "$ac_try_echo"; } >&5
1697  (eval "$ac_compile") 2>conftest.err
1698  ac_status=$?
1699  if test -s conftest.err; then
1700    grep -v '^ *+' conftest.err >conftest.er1
1701    cat conftest.er1 >&5
1702    mv -f conftest.er1 conftest.err
1703  fi
1704  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1705  test $ac_status = 0; } && {
1706	 test -z "$ac_c_werror_flag" ||
1707	 test ! -s conftest.err
1708       } && test -s conftest.$ac_objext; then :
1709  ac_retval=0
1710else
1711  $as_echo "$as_me: failed program was:" >&5
1712sed 's/^/| /' conftest.$ac_ext >&5
1713
1714	ac_retval=1
1715fi
1716  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1717  as_fn_set_status $ac_retval
1718
1719} # ac_fn_c_try_compile
1720
1721# ac_fn_c_try_cpp LINENO
1722# ----------------------
1723# Try to preprocess conftest.$ac_ext, and return whether this succeeded.
1724ac_fn_c_try_cpp ()
1725{
1726  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1727  if { { ac_try="$ac_cpp conftest.$ac_ext"
1728case "(($ac_try" in
1729  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1730  *) ac_try_echo=$ac_try;;
1731esac
1732eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1733$as_echo "$ac_try_echo"; } >&5
1734  (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
1735  ac_status=$?
1736  if test -s conftest.err; then
1737    grep -v '^ *+' conftest.err >conftest.er1
1738    cat conftest.er1 >&5
1739    mv -f conftest.er1 conftest.err
1740  fi
1741  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1742  test $ac_status = 0; } > conftest.i && {
1743	 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
1744	 test ! -s conftest.err
1745       }; then :
1746  ac_retval=0
1747else
1748  $as_echo "$as_me: failed program was:" >&5
1749sed 's/^/| /' conftest.$ac_ext >&5
1750
1751    ac_retval=1
1752fi
1753  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1754  as_fn_set_status $ac_retval
1755
1756} # ac_fn_c_try_cpp
1757
1758# ac_fn_c_check_header_mongrel LINENO HEADER VAR INCLUDES
1759# -------------------------------------------------------
1760# Tests whether HEADER exists, giving a warning if it cannot be compiled using
1761# the include files in INCLUDES and setting the cache variable VAR
1762# accordingly.
1763ac_fn_c_check_header_mongrel ()
1764{
1765  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1766  if eval \${$3+:} false; then :
1767  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1768$as_echo_n "checking for $2... " >&6; }
1769if eval \${$3+:} false; then :
1770  $as_echo_n "(cached) " >&6
1771fi
1772eval ac_res=\$$3
1773	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1774$as_echo "$ac_res" >&6; }
1775else
1776  # Is the header compilable?
1777{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5
1778$as_echo_n "checking $2 usability... " >&6; }
1779cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1780/* end confdefs.h.  */
1781$4
1782#include <$2>
1783_ACEOF
1784if ac_fn_c_try_compile "$LINENO"; then :
1785  ac_header_compiler=yes
1786else
1787  ac_header_compiler=no
1788fi
1789rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1790{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5
1791$as_echo "$ac_header_compiler" >&6; }
1792
1793# Is the header present?
1794{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5
1795$as_echo_n "checking $2 presence... " >&6; }
1796cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1797/* end confdefs.h.  */
1798#include <$2>
1799_ACEOF
1800if ac_fn_c_try_cpp "$LINENO"; then :
1801  ac_header_preproc=yes
1802else
1803  ac_header_preproc=no
1804fi
1805rm -f conftest.err conftest.i conftest.$ac_ext
1806{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5
1807$as_echo "$ac_header_preproc" >&6; }
1808
1809# So?  What about this header?
1810case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in #((
1811  yes:no: )
1812    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5
1813$as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;}
1814    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
1815$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
1816    ;;
1817  no:yes:* )
1818    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5
1819$as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;}
1820    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2:     check for missing prerequisite headers?" >&5
1821$as_echo "$as_me: WARNING: $2:     check for missing prerequisite headers?" >&2;}
1822    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5
1823$as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;}
1824    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2:     section \"Present But Cannot Be Compiled\"" >&5
1825$as_echo "$as_me: WARNING: $2:     section \"Present But Cannot Be Compiled\"" >&2;}
1826    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
1827$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
1828    ;;
1829esac
1830  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1831$as_echo_n "checking for $2... " >&6; }
1832if eval \${$3+:} false; then :
1833  $as_echo_n "(cached) " >&6
1834else
1835  eval "$3=\$ac_header_compiler"
1836fi
1837eval ac_res=\$$3
1838	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1839$as_echo "$ac_res" >&6; }
1840fi
1841  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1842
1843} # ac_fn_c_check_header_mongrel
1844
1845# ac_fn_c_try_run LINENO
1846# ----------------------
1847# Try to link conftest.$ac_ext, and return whether this succeeded. Assumes
1848# that executables *can* be run.
1849ac_fn_c_try_run ()
1850{
1851  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1852  if { { ac_try="$ac_link"
1853case "(($ac_try" in
1854  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1855  *) ac_try_echo=$ac_try;;
1856esac
1857eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1858$as_echo "$ac_try_echo"; } >&5
1859  (eval "$ac_link") 2>&5
1860  ac_status=$?
1861  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1862  test $ac_status = 0; } && { ac_try='./conftest$ac_exeext'
1863  { { case "(($ac_try" in
1864  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1865  *) ac_try_echo=$ac_try;;
1866esac
1867eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1868$as_echo "$ac_try_echo"; } >&5
1869  (eval "$ac_try") 2>&5
1870  ac_status=$?
1871  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1872  test $ac_status = 0; }; }; then :
1873  ac_retval=0
1874else
1875  $as_echo "$as_me: program exited with status $ac_status" >&5
1876       $as_echo "$as_me: failed program was:" >&5
1877sed 's/^/| /' conftest.$ac_ext >&5
1878
1879       ac_retval=$ac_status
1880fi
1881  rm -rf conftest.dSYM conftest_ipa8_conftest.oo
1882  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1883  as_fn_set_status $ac_retval
1884
1885} # ac_fn_c_try_run
1886
1887# ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES
1888# -------------------------------------------------------
1889# Tests whether HEADER exists and can be compiled using the include files in
1890# INCLUDES, setting the cache variable VAR accordingly.
1891ac_fn_c_check_header_compile ()
1892{
1893  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1894  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1895$as_echo_n "checking for $2... " >&6; }
1896if eval \${$3+:} false; then :
1897  $as_echo_n "(cached) " >&6
1898else
1899  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1900/* end confdefs.h.  */
1901$4
1902#include <$2>
1903_ACEOF
1904if ac_fn_c_try_compile "$LINENO"; then :
1905  eval "$3=yes"
1906else
1907  eval "$3=no"
1908fi
1909rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1910fi
1911eval ac_res=\$$3
1912	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1913$as_echo "$ac_res" >&6; }
1914  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1915
1916} # ac_fn_c_check_header_compile
1917
1918# ac_fn_c_check_type LINENO TYPE VAR INCLUDES
1919# -------------------------------------------
1920# Tests whether TYPE exists after having included INCLUDES, setting cache
1921# variable VAR accordingly.
1922ac_fn_c_check_type ()
1923{
1924  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1925  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1926$as_echo_n "checking for $2... " >&6; }
1927if eval \${$3+:} false; then :
1928  $as_echo_n "(cached) " >&6
1929else
1930  eval "$3=no"
1931  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1932/* end confdefs.h.  */
1933$4
1934int
1935main ()
1936{
1937if (sizeof ($2))
1938	 return 0;
1939  ;
1940  return 0;
1941}
1942_ACEOF
1943if ac_fn_c_try_compile "$LINENO"; then :
1944  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1945/* end confdefs.h.  */
1946$4
1947int
1948main ()
1949{
1950if (sizeof (($2)))
1951	    return 0;
1952  ;
1953  return 0;
1954}
1955_ACEOF
1956if ac_fn_c_try_compile "$LINENO"; then :
1957
1958else
1959  eval "$3=yes"
1960fi
1961rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1962fi
1963rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1964fi
1965eval ac_res=\$$3
1966	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1967$as_echo "$ac_res" >&6; }
1968  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1969
1970} # ac_fn_c_check_type
1971
1972# ac_fn_c_try_link LINENO
1973# -----------------------
1974# Try to link conftest.$ac_ext, and return whether this succeeded.
1975ac_fn_c_try_link ()
1976{
1977  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1978  rm -f conftest.$ac_objext conftest$ac_exeext
1979  if { { ac_try="$ac_link"
1980case "(($ac_try" in
1981  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1982  *) ac_try_echo=$ac_try;;
1983esac
1984eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1985$as_echo "$ac_try_echo"; } >&5
1986  (eval "$ac_link") 2>conftest.err
1987  ac_status=$?
1988  if test -s conftest.err; then
1989    grep -v '^ *+' conftest.err >conftest.er1
1990    cat conftest.er1 >&5
1991    mv -f conftest.er1 conftest.err
1992  fi
1993  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1994  test $ac_status = 0; } && {
1995	 test -z "$ac_c_werror_flag" ||
1996	 test ! -s conftest.err
1997       } && test -s conftest$ac_exeext && {
1998	 test "$cross_compiling" = yes ||
1999	 test -x conftest$ac_exeext
2000       }; then :
2001  ac_retval=0
2002else
2003  $as_echo "$as_me: failed program was:" >&5
2004sed 's/^/| /' conftest.$ac_ext >&5
2005
2006	ac_retval=1
2007fi
2008  # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
2009  # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
2010  # interfere with the next link command; also delete a directory that is
2011  # left behind by Apple's compiler.  We do this before executing the actions.
2012  rm -rf conftest.dSYM conftest_ipa8_conftest.oo
2013  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2014  as_fn_set_status $ac_retval
2015
2016} # ac_fn_c_try_link
2017
2018# ac_fn_c_check_func LINENO FUNC VAR
2019# ----------------------------------
2020# Tests whether FUNC exists, setting the cache variable VAR accordingly
2021ac_fn_c_check_func ()
2022{
2023  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2024  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2025$as_echo_n "checking for $2... " >&6; }
2026if eval \${$3+:} false; then :
2027  $as_echo_n "(cached) " >&6
2028else
2029  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2030/* end confdefs.h.  */
2031/* Define $2 to an innocuous variant, in case <limits.h> declares $2.
2032   For example, HP-UX 11i <limits.h> declares gettimeofday.  */
2033#define $2 innocuous_$2
2034
2035/* System header to define __stub macros and hopefully few prototypes,
2036    which can conflict with char $2 (); below.
2037    Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
2038    <limits.h> exists even on freestanding compilers.  */
2039
2040#ifdef __STDC__
2041# include <limits.h>
2042#else
2043# include <assert.h>
2044#endif
2045
2046#undef $2
2047
2048/* Override any GCC internal prototype to avoid an error.
2049   Use char because int might match the return type of a GCC
2050   builtin and then its argument prototype would still apply.  */
2051#ifdef __cplusplus
2052extern "C"
2053#endif
2054char $2 ();
2055/* The GNU C library defines this for functions which it implements
2056    to always fail with ENOSYS.  Some functions are actually named
2057    something starting with __ and the normal name is an alias.  */
2058#if defined __stub_$2 || defined __stub___$2
2059choke me
2060#endif
2061
2062int
2063main ()
2064{
2065return $2 ();
2066  ;
2067  return 0;
2068}
2069_ACEOF
2070if ac_fn_c_try_link "$LINENO"; then :
2071  eval "$3=yes"
2072else
2073  eval "$3=no"
2074fi
2075rm -f core conftest.err conftest.$ac_objext \
2076    conftest$ac_exeext conftest.$ac_ext
2077fi
2078eval ac_res=\$$3
2079	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2080$as_echo "$ac_res" >&6; }
2081  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2082
2083} # ac_fn_c_check_func
2084
2085# ac_fn_c_check_member LINENO AGGR MEMBER VAR INCLUDES
2086# ----------------------------------------------------
2087# Tries to find if the field MEMBER exists in type AGGR, after including
2088# INCLUDES, setting cache variable VAR accordingly.
2089ac_fn_c_check_member ()
2090{
2091  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2092  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2.$3" >&5
2093$as_echo_n "checking for $2.$3... " >&6; }
2094if eval \${$4+:} false; then :
2095  $as_echo_n "(cached) " >&6
2096else
2097  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2098/* end confdefs.h.  */
2099$5
2100int
2101main ()
2102{
2103static $2 ac_aggr;
2104if (ac_aggr.$3)
2105return 0;
2106  ;
2107  return 0;
2108}
2109_ACEOF
2110if ac_fn_c_try_compile "$LINENO"; then :
2111  eval "$4=yes"
2112else
2113  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2114/* end confdefs.h.  */
2115$5
2116int
2117main ()
2118{
2119static $2 ac_aggr;
2120if (sizeof ac_aggr.$3)
2121return 0;
2122  ;
2123  return 0;
2124}
2125_ACEOF
2126if ac_fn_c_try_compile "$LINENO"; then :
2127  eval "$4=yes"
2128else
2129  eval "$4=no"
2130fi
2131rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2132fi
2133rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2134fi
2135eval ac_res=\$$4
2136	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2137$as_echo "$ac_res" >&6; }
2138  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2139
2140} # ac_fn_c_check_member
2141cat >config.log <<_ACEOF
2142This file contains any messages produced by compilers while
2143running configure, to aid debugging if configure makes a mistake.
2144
2145It was created by $as_me, which was
2146generated by GNU Autoconf 2.69.  Invocation command line was
2147
2148  $ $0 $@
2149
2150_ACEOF
2151exec 5>>config.log
2152{
2153cat <<_ASUNAME
2154## --------- ##
2155## Platform. ##
2156## --------- ##
2157
2158hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
2159uname -m = `(uname -m) 2>/dev/null || echo unknown`
2160uname -r = `(uname -r) 2>/dev/null || echo unknown`
2161uname -s = `(uname -s) 2>/dev/null || echo unknown`
2162uname -v = `(uname -v) 2>/dev/null || echo unknown`
2163
2164/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
2165/bin/uname -X     = `(/bin/uname -X) 2>/dev/null     || echo unknown`
2166
2167/bin/arch              = `(/bin/arch) 2>/dev/null              || echo unknown`
2168/usr/bin/arch -k       = `(/usr/bin/arch -k) 2>/dev/null       || echo unknown`
2169/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
2170/usr/bin/hostinfo      = `(/usr/bin/hostinfo) 2>/dev/null      || echo unknown`
2171/bin/machine           = `(/bin/machine) 2>/dev/null           || echo unknown`
2172/usr/bin/oslevel       = `(/usr/bin/oslevel) 2>/dev/null       || echo unknown`
2173/bin/universe          = `(/bin/universe) 2>/dev/null          || echo unknown`
2174
2175_ASUNAME
2176
2177as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2178for as_dir in $PATH
2179do
2180  IFS=$as_save_IFS
2181  test -z "$as_dir" && as_dir=.
2182    $as_echo "PATH: $as_dir"
2183  done
2184IFS=$as_save_IFS
2185
2186} >&5
2187
2188cat >&5 <<_ACEOF
2189
2190
2191## ----------- ##
2192## Core tests. ##
2193## ----------- ##
2194
2195_ACEOF
2196
2197
2198# Keep a trace of the command line.
2199# Strip out --no-create and --no-recursion so they do not pile up.
2200# Strip out --silent because we don't want to record it for future runs.
2201# Also quote any args containing shell meta-characters.
2202# Make two passes to allow for proper duplicate-argument suppression.
2203ac_configure_args=
2204ac_configure_args0=
2205ac_configure_args1=
2206ac_must_keep_next=false
2207for ac_pass in 1 2
2208do
2209  for ac_arg
2210  do
2211    case $ac_arg in
2212    -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
2213    -q | -quiet | --quiet | --quie | --qui | --qu | --q \
2214    | -silent | --silent | --silen | --sile | --sil)
2215      continue ;;
2216    *\'*)
2217      ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
2218    esac
2219    case $ac_pass in
2220    1) as_fn_append ac_configure_args0 " '$ac_arg'" ;;
2221    2)
2222      as_fn_append ac_configure_args1 " '$ac_arg'"
2223      if test $ac_must_keep_next = true; then
2224	ac_must_keep_next=false # Got value, back to normal.
2225      else
2226	case $ac_arg in
2227	  *=* | --config-cache | -C | -disable-* | --disable-* \
2228	  | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
2229	  | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
2230	  | -with-* | --with-* | -without-* | --without-* | --x)
2231	    case "$ac_configure_args0 " in
2232	      "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
2233	    esac
2234	    ;;
2235	  -* ) ac_must_keep_next=true ;;
2236	esac
2237      fi
2238      as_fn_append ac_configure_args " '$ac_arg'"
2239      ;;
2240    esac
2241  done
2242done
2243{ ac_configure_args0=; unset ac_configure_args0;}
2244{ ac_configure_args1=; unset ac_configure_args1;}
2245
2246# When interrupted or exit'd, cleanup temporary files, and complete
2247# config.log.  We remove comments because anyway the quotes in there
2248# would cause problems or look ugly.
2249# WARNING: Use '\'' to represent an apostrophe within the trap.
2250# WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug.
2251trap 'exit_status=$?
2252  # Save into config.log some information that might help in debugging.
2253  {
2254    echo
2255
2256    $as_echo "## ---------------- ##
2257## Cache variables. ##
2258## ---------------- ##"
2259    echo
2260    # The following way of writing the cache mishandles newlines in values,
2261(
2262  for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do
2263    eval ac_val=\$$ac_var
2264    case $ac_val in #(
2265    *${as_nl}*)
2266      case $ac_var in #(
2267      *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
2268$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
2269      esac
2270      case $ac_var in #(
2271      _ | IFS | as_nl) ;; #(
2272      BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
2273      *) { eval $ac_var=; unset $ac_var;} ;;
2274      esac ;;
2275    esac
2276  done
2277  (set) 2>&1 |
2278    case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #(
2279    *${as_nl}ac_space=\ *)
2280      sed -n \
2281	"s/'\''/'\''\\\\'\'''\''/g;
2282	  s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p"
2283      ;; #(
2284    *)
2285      sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
2286      ;;
2287    esac |
2288    sort
2289)
2290    echo
2291
2292    $as_echo "## ----------------- ##
2293## Output variables. ##
2294## ----------------- ##"
2295    echo
2296    for ac_var in $ac_subst_vars
2297    do
2298      eval ac_val=\$$ac_var
2299      case $ac_val in
2300      *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
2301      esac
2302      $as_echo "$ac_var='\''$ac_val'\''"
2303    done | sort
2304    echo
2305
2306    if test -n "$ac_subst_files"; then
2307      $as_echo "## ------------------- ##
2308## File substitutions. ##
2309## ------------------- ##"
2310      echo
2311      for ac_var in $ac_subst_files
2312      do
2313	eval ac_val=\$$ac_var
2314	case $ac_val in
2315	*\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
2316	esac
2317	$as_echo "$ac_var='\''$ac_val'\''"
2318      done | sort
2319      echo
2320    fi
2321
2322    if test -s confdefs.h; then
2323      $as_echo "## ----------- ##
2324## confdefs.h. ##
2325## ----------- ##"
2326      echo
2327      cat confdefs.h
2328      echo
2329    fi
2330    test "$ac_signal" != 0 &&
2331      $as_echo "$as_me: caught signal $ac_signal"
2332    $as_echo "$as_me: exit $exit_status"
2333  } >&5
2334  rm -f core *.core core.conftest.* &&
2335    rm -f -r conftest* confdefs* conf$$* $ac_clean_files &&
2336    exit $exit_status
2337' 0
2338for ac_signal in 1 2 13 15; do
2339  trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal
2340done
2341ac_signal=0
2342
2343# confdefs.h avoids OS command line length limits that DEFS can exceed.
2344rm -f -r conftest* confdefs.h
2345
2346$as_echo "/* confdefs.h */" > confdefs.h
2347
2348# Predefined preprocessor variables.
2349
2350cat >>confdefs.h <<_ACEOF
2351#define PACKAGE_NAME "$PACKAGE_NAME"
2352_ACEOF
2353
2354cat >>confdefs.h <<_ACEOF
2355#define PACKAGE_TARNAME "$PACKAGE_TARNAME"
2356_ACEOF
2357
2358cat >>confdefs.h <<_ACEOF
2359#define PACKAGE_VERSION "$PACKAGE_VERSION"
2360_ACEOF
2361
2362cat >>confdefs.h <<_ACEOF
2363#define PACKAGE_STRING "$PACKAGE_STRING"
2364_ACEOF
2365
2366cat >>confdefs.h <<_ACEOF
2367#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
2368_ACEOF
2369
2370cat >>confdefs.h <<_ACEOF
2371#define PACKAGE_URL "$PACKAGE_URL"
2372_ACEOF
2373
2374
2375# Let the site file select an alternate cache file if it wants to.
2376# Prefer an explicitly selected file to automatically selected ones.
2377ac_site_file1=NONE
2378ac_site_file2=NONE
2379if test -n "$CONFIG_SITE"; then
2380  # We do not want a PATH search for config.site.
2381  case $CONFIG_SITE in #((
2382    -*)  ac_site_file1=./$CONFIG_SITE;;
2383    */*) ac_site_file1=$CONFIG_SITE;;
2384    *)   ac_site_file1=./$CONFIG_SITE;;
2385  esac
2386elif test "x$prefix" != xNONE; then
2387  ac_site_file1=$prefix/share/config.site
2388  ac_site_file2=$prefix/etc/config.site
2389else
2390  ac_site_file1=$ac_default_prefix/share/config.site
2391  ac_site_file2=$ac_default_prefix/etc/config.site
2392fi
2393for ac_site_file in "$ac_site_file1" "$ac_site_file2"
2394do
2395  test "x$ac_site_file" = xNONE && continue
2396  if test /dev/null != "$ac_site_file" && test -r "$ac_site_file"; then
2397    { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5
2398$as_echo "$as_me: loading site script $ac_site_file" >&6;}
2399    sed 's/^/| /' "$ac_site_file" >&5
2400    . "$ac_site_file" \
2401      || { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2402$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2403as_fn_error $? "failed to load site script $ac_site_file
2404See \`config.log' for more details" "$LINENO" 5; }
2405  fi
2406done
2407
2408if test -r "$cache_file"; then
2409  # Some versions of bash will fail to source /dev/null (special files
2410  # actually), so we avoid doing that.  DJGPP emulates it as a regular file.
2411  if test /dev/null != "$cache_file" && test -f "$cache_file"; then
2412    { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5
2413$as_echo "$as_me: loading cache $cache_file" >&6;}
2414    case $cache_file in
2415      [\\/]* | ?:[\\/]* ) . "$cache_file";;
2416      *)                      . "./$cache_file";;
2417    esac
2418  fi
2419else
2420  { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5
2421$as_echo "$as_me: creating cache $cache_file" >&6;}
2422  >$cache_file
2423fi
2424
2425# Check that the precious variables saved in the cache have kept the same
2426# value.
2427ac_cache_corrupted=false
2428for ac_var in $ac_precious_vars; do
2429  eval ac_old_set=\$ac_cv_env_${ac_var}_set
2430  eval ac_new_set=\$ac_env_${ac_var}_set
2431  eval ac_old_val=\$ac_cv_env_${ac_var}_value
2432  eval ac_new_val=\$ac_env_${ac_var}_value
2433  case $ac_old_set,$ac_new_set in
2434    set,)
2435      { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
2436$as_echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
2437      ac_cache_corrupted=: ;;
2438    ,set)
2439      { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5
2440$as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
2441      ac_cache_corrupted=: ;;
2442    ,);;
2443    *)
2444      if test "x$ac_old_val" != "x$ac_new_val"; then
2445	# differences in whitespace do not lead to failure.
2446	ac_old_val_w=`echo x $ac_old_val`
2447	ac_new_val_w=`echo x $ac_new_val`
2448	if test "$ac_old_val_w" != "$ac_new_val_w"; then
2449	  { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5
2450$as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
2451	  ac_cache_corrupted=:
2452	else
2453	  { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5
2454$as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;}
2455	  eval $ac_var=\$ac_old_val
2456	fi
2457	{ $as_echo "$as_me:${as_lineno-$LINENO}:   former value:  \`$ac_old_val'" >&5
2458$as_echo "$as_me:   former value:  \`$ac_old_val'" >&2;}
2459	{ $as_echo "$as_me:${as_lineno-$LINENO}:   current value: \`$ac_new_val'" >&5
2460$as_echo "$as_me:   current value: \`$ac_new_val'" >&2;}
2461      fi;;
2462  esac
2463  # Pass precious variables to config.status.
2464  if test "$ac_new_set" = set; then
2465    case $ac_new_val in
2466    *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
2467    *) ac_arg=$ac_var=$ac_new_val ;;
2468    esac
2469    case " $ac_configure_args " in
2470      *" '$ac_arg' "*) ;; # Avoid dups.  Use of quotes ensures accuracy.
2471      *) as_fn_append ac_configure_args " '$ac_arg'" ;;
2472    esac
2473  fi
2474done
2475if $ac_cache_corrupted; then
2476  { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2477$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2478  { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5
2479$as_echo "$as_me: error: changes in the environment can compromise the build" >&2;}
2480  as_fn_error $? "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5
2481fi
2482## -------------------- ##
2483## Main body of script. ##
2484## -------------------- ##
2485
2486ac_ext=c
2487ac_cpp='$CPP $CPPFLAGS'
2488ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2489ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2490ac_compiler_gnu=$ac_cv_c_compiler_gnu
2491
2492
2493
2494ac_config_headers="$ac_config_headers config.h"
2495
2496
2497echo "current directory: `pwd`"
2498echo "command line was: $0 $@"
2499
2500###############################################################################
2501#
2502#       Autoheader stuff
2503#
2504###############################################################################
2505
2506
2507
2508# Defines in config.h are dumped out alphabetically rather than in any kind
2509# of sane order, sigh.
2510
2511#
2512# OS stuff.
2513#
2514
2515
2516
2517
2518
2519
2520
2521
2522
2523
2524
2525
2526
2527
2528
2529
2530
2531
2532#
2533# X11 server stuff.
2534#
2535
2536
2537
2538
2539
2540
2541# This only ever existed in X11R4 and X11R5.
2542
2543
2544# This only ever existed on SGI hardware.
2545
2546
2547# This only ever existed on SGI hardware.
2548
2549
2550
2551
2552
2553
2554
2555
2556
2557
2558
2559
2560
2561
2562
2563
2564
2565
2566
2567
2568
2569
2570
2571
2572#AH_TEMPLATE([HAVE_XCOMPOSITE_EXTENSION],
2573#	    [Define this if you have the X Composite Extension.])
2574
2575
2576
2577
2578
2579
2580
2581
2582
2583
2584
2585#
2586# GUI stuff.
2587#
2588
2589
2590
2591
2592
2593
2594
2595
2596
2597
2598
2599
2600
2601
2602
2603
2604
2605
2606
2607#
2608# Image loading.
2609#
2610
2611
2612
2613
2614
2615
2616
2617
2618#
2619# Graphics libraries.
2620#
2621
2622
2623
2624
2625
2626
2627
2628
2629
2630
2631
2632
2633
2634
2635
2636
2637
2638
2639
2640
2641
2642
2643
2644#
2645# Locking.
2646#
2647
2648
2649
2650
2651
2652
2653
2654
2655
2656
2657
2658
2659
2660
2661
2662
2663
2664
2665
2666
2667
2668
2669
2670
2671
2672
2673
2674
2675#AH_TEMPLATE([PASSWD_HELPER_PROGRAM],
2676#	    [Define this to use a third-party password helper program.])
2677
2678
2679
2680
2681# After checking to see that --srcdir is correct (which AC_INIT does)
2682# check for some random other files that come later in the tar file,
2683# to make sure everything is here.
2684#
2685for d in utils jwxyz hacks xlockmore/xlock xlockmore/modes xlockmore/modes/glx hacks/glx driver ; do
2686  f=$srcdir/$d/Makefile.in
2687  if test \! -r $f ; then
2688    echo ""
2689    echo "ERROR: The package is incomplete: $f does not exist."
2690    echo "       This probably means that your download was truncated."
2691    echo ""
2692    exit 1
2693  fi
2694done
2695
2696###############################################################################
2697#
2698#       Check for availability of various gcc command-line options.
2699#
2700###############################################################################
2701
2702
2703
2704
2705###############################################################################
2706#
2707#       Function to figure out how to run the compiler.
2708#
2709###############################################################################
2710
2711
2712
2713
2714###############################################################################
2715#
2716#       Function to figure out how to create directory trees.
2717#
2718###############################################################################
2719
2720
2721
2722
2723###############################################################################
2724#
2725#       Function to check whether gettimeofday() exists, and how to call it.
2726#	This may define HAVE_GETTIMEOFDAY and GETTIMEOFDAY_TWO_ARGS.
2727#
2728###############################################################################
2729
2730
2731
2732
2733###############################################################################
2734#
2735#       Function to find perl5 (defines PERL and PERL_VERSION.)
2736#
2737###############################################################################
2738
2739# M4 sucks!!  perl sucks too!!
2740
2741perl_version_cmd='print $]'
2742
2743
2744
2745
2746
2747###############################################################################
2748#
2749#       Functions to check how to do ICMP PING requests.
2750#
2751###############################################################################
2752
2753
2754
2755
2756
2757
2758###############################################################################
2759#
2760#       Functions to check for various X11 crap.
2761#
2762###############################################################################
2763
2764# Try and find the app-defaults directory.
2765# It sucks that autoconf doesn't do this already...
2766# (AC_PATH_X_APP_DEFAULTS_XMKMF is no longer used.)
2767#
2768
2769
2770
2771
2772
2773
2774
2775
2776
2777
2778
2779
2780# Random special-cases for X on certain pathological OSes.
2781# You know who you are.
2782#
2783
2784
2785
2786
2787
2788
2789###############################################################################
2790#
2791#       Some utility functions to make checking for X things easier.
2792#
2793###############################################################################
2794
2795# Like AC_CHECK_HEADER, but it uses the already-computed -I directories.
2796#
2797
2798
2799# Like AC_EGREP_HEADER, but it uses the already-computed -I directories.
2800#
2801
2802
2803# Like AC_COMPILE_IFELSE but it uses the already-computed -I directories.
2804#
2805
2806
2807
2808# Like AC_CHECK_LIB, but it uses the already-computed -I and -L directories.
2809# Use this sparingly; it probably doesn't work very well on X programs.
2810#
2811
2812
2813# Like AC_RUN_IFELSE but it uses the already-computed -I directories.
2814# (But not the -L directories!)
2815#
2816
2817
2818
2819
2820# Usage: HANDLE_X_PATH_ARG([variable_name],
2821#                          [--command-line-option],
2822#                          [descriptive string])
2823#
2824# All of the --with options take three forms:
2825#
2826#   --with-foo (or --with-foo=yes)
2827#   --without-foo (or --with-foo=no)
2828#   --with-foo=/DIR
2829#
2830# This function, HANDLE_X_PATH_ARG, deals with the /DIR case.  When it sees
2831# a directory (string beginning with a slash) it checks to see whether
2832# /DIR/include and /DIR/lib exist, and adds them to $X_CFLAGS and $X_LIBS
2833# as appropriate.
2834#
2835
2836
2837
2838###############################################################################
2839###############################################################################
2840#
2841#       End of function definitions.  Now start actually executing stuff.
2842#
2843###############################################################################
2844###############################################################################
2845
2846# Default $PATH might not contain /sbin and thus miss /sbin/setcap.
2847#
2848export PATH="$PATH:/usr/bin:/bin:/usr/sbin:/sbin"
2849
2850
2851# WTF!  autoconf emits this *way* too late.  Do it earlier.
2852test "x$prefix" = xNONE && prefix=$ac_default_prefix
2853test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
2854
2855# random compiler setup
2856ac_aux_dir=
2857for ac_dir in "$srcdir" "$srcdir/.." "$srcdir/../.."; do
2858  if test -f "$ac_dir/install-sh"; then
2859    ac_aux_dir=$ac_dir
2860    ac_install_sh="$ac_aux_dir/install-sh -c"
2861    break
2862  elif test -f "$ac_dir/install.sh"; then
2863    ac_aux_dir=$ac_dir
2864    ac_install_sh="$ac_aux_dir/install.sh -c"
2865    break
2866  elif test -f "$ac_dir/shtool"; then
2867    ac_aux_dir=$ac_dir
2868    ac_install_sh="$ac_aux_dir/shtool install -c"
2869    break
2870  fi
2871done
2872if test -z "$ac_aux_dir"; then
2873  as_fn_error $? "cannot find install-sh, install.sh, or shtool in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" "$LINENO" 5
2874fi
2875
2876# These three variables are undocumented and unsupported,
2877# and are intended to be withdrawn in a future Autoconf release.
2878# They can cause serious problems if a builder's source tree is in a directory
2879# whose full name contains unusual characters.
2880ac_config_guess="$SHELL $ac_aux_dir/config.guess"  # Please don't use this var.
2881ac_config_sub="$SHELL $ac_aux_dir/config.sub"  # Please don't use this var.
2882ac_configure="$SHELL $ac_aux_dir/configure"  # Please don't use this var.
2883
2884
2885# Make sure we can run config.sub.
2886$SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 ||
2887  as_fn_error $? "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5
2888
2889{ $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5
2890$as_echo_n "checking build system type... " >&6; }
2891if ${ac_cv_build+:} false; then :
2892  $as_echo_n "(cached) " >&6
2893else
2894  ac_build_alias=$build_alias
2895test "x$ac_build_alias" = x &&
2896  ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"`
2897test "x$ac_build_alias" = x &&
2898  as_fn_error $? "cannot guess build type; you must specify one" "$LINENO" 5
2899ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` ||
2900  as_fn_error $? "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5
2901
2902fi
2903{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5
2904$as_echo "$ac_cv_build" >&6; }
2905case $ac_cv_build in
2906*-*-*) ;;
2907*) as_fn_error $? "invalid value of canonical build" "$LINENO" 5;;
2908esac
2909build=$ac_cv_build
2910ac_save_IFS=$IFS; IFS='-'
2911set x $ac_cv_build
2912shift
2913build_cpu=$1
2914build_vendor=$2
2915shift; shift
2916# Remember, the first character of IFS is used to create $*,
2917# except with old shells:
2918build_os=$*
2919IFS=$ac_save_IFS
2920case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac
2921
2922
2923{ $as_echo "$as_me:${as_lineno-$LINENO}: checking host system type" >&5
2924$as_echo_n "checking host system type... " >&6; }
2925if ${ac_cv_host+:} false; then :
2926  $as_echo_n "(cached) " >&6
2927else
2928  if test "x$host_alias" = x; then
2929  ac_cv_host=$ac_cv_build
2930else
2931  ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` ||
2932    as_fn_error $? "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5
2933fi
2934
2935fi
2936{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5
2937$as_echo "$ac_cv_host" >&6; }
2938case $ac_cv_host in
2939*-*-*) ;;
2940*) as_fn_error $? "invalid value of canonical host" "$LINENO" 5;;
2941esac
2942host=$ac_cv_host
2943ac_save_IFS=$IFS; IFS='-'
2944set x $ac_cv_host
2945shift
2946host_cpu=$1
2947host_vendor=$2
2948shift; shift
2949# Remember, the first character of IFS is used to create $*,
2950# except with old shells:
2951host_os=$*
2952IFS=$ac_save_IFS
2953case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac
2954
2955
2956
2957ac_original_cc=$CC
2958ac_ext=c
2959ac_cpp='$CPP $CPPFLAGS'
2960ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2961ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2962ac_compiler_gnu=$ac_cv_c_compiler_gnu
2963if test -n "$ac_tool_prefix"; then
2964  # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
2965set dummy ${ac_tool_prefix}gcc; ac_word=$2
2966{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
2967$as_echo_n "checking for $ac_word... " >&6; }
2968if ${ac_cv_prog_CC+:} false; then :
2969  $as_echo_n "(cached) " >&6
2970else
2971  if test -n "$CC"; then
2972  ac_cv_prog_CC="$CC" # Let the user override the test.
2973else
2974as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2975for as_dir in $PATH
2976do
2977  IFS=$as_save_IFS
2978  test -z "$as_dir" && as_dir=.
2979    for ac_exec_ext in '' $ac_executable_extensions; do
2980  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
2981    ac_cv_prog_CC="${ac_tool_prefix}gcc"
2982    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
2983    break 2
2984  fi
2985done
2986  done
2987IFS=$as_save_IFS
2988
2989fi
2990fi
2991CC=$ac_cv_prog_CC
2992if test -n "$CC"; then
2993  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
2994$as_echo "$CC" >&6; }
2995else
2996  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
2997$as_echo "no" >&6; }
2998fi
2999
3000
3001fi
3002if test -z "$ac_cv_prog_CC"; then
3003  ac_ct_CC=$CC
3004  # Extract the first word of "gcc", so it can be a program name with args.
3005set dummy gcc; ac_word=$2
3006{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3007$as_echo_n "checking for $ac_word... " >&6; }
3008if ${ac_cv_prog_ac_ct_CC+:} false; then :
3009  $as_echo_n "(cached) " >&6
3010else
3011  if test -n "$ac_ct_CC"; then
3012  ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
3013else
3014as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3015for as_dir in $PATH
3016do
3017  IFS=$as_save_IFS
3018  test -z "$as_dir" && as_dir=.
3019    for ac_exec_ext in '' $ac_executable_extensions; do
3020  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3021    ac_cv_prog_ac_ct_CC="gcc"
3022    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3023    break 2
3024  fi
3025done
3026  done
3027IFS=$as_save_IFS
3028
3029fi
3030fi
3031ac_ct_CC=$ac_cv_prog_ac_ct_CC
3032if test -n "$ac_ct_CC"; then
3033  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
3034$as_echo "$ac_ct_CC" >&6; }
3035else
3036  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3037$as_echo "no" >&6; }
3038fi
3039
3040  if test "x$ac_ct_CC" = x; then
3041    CC=""
3042  else
3043    case $cross_compiling:$ac_tool_warned in
3044yes:)
3045{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
3046$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
3047ac_tool_warned=yes ;;
3048esac
3049    CC=$ac_ct_CC
3050  fi
3051else
3052  CC="$ac_cv_prog_CC"
3053fi
3054
3055if test -z "$CC"; then
3056          if test -n "$ac_tool_prefix"; then
3057    # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args.
3058set dummy ${ac_tool_prefix}cc; ac_word=$2
3059{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3060$as_echo_n "checking for $ac_word... " >&6; }
3061if ${ac_cv_prog_CC+:} false; then :
3062  $as_echo_n "(cached) " >&6
3063else
3064  if test -n "$CC"; then
3065  ac_cv_prog_CC="$CC" # Let the user override the test.
3066else
3067as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3068for as_dir in $PATH
3069do
3070  IFS=$as_save_IFS
3071  test -z "$as_dir" && as_dir=.
3072    for ac_exec_ext in '' $ac_executable_extensions; do
3073  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3074    ac_cv_prog_CC="${ac_tool_prefix}cc"
3075    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3076    break 2
3077  fi
3078done
3079  done
3080IFS=$as_save_IFS
3081
3082fi
3083fi
3084CC=$ac_cv_prog_CC
3085if test -n "$CC"; then
3086  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3087$as_echo "$CC" >&6; }
3088else
3089  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3090$as_echo "no" >&6; }
3091fi
3092
3093
3094  fi
3095fi
3096if test -z "$CC"; then
3097  # Extract the first word of "cc", so it can be a program name with args.
3098set dummy cc; ac_word=$2
3099{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3100$as_echo_n "checking for $ac_word... " >&6; }
3101if ${ac_cv_prog_CC+:} false; then :
3102  $as_echo_n "(cached) " >&6
3103else
3104  if test -n "$CC"; then
3105  ac_cv_prog_CC="$CC" # Let the user override the test.
3106else
3107  ac_prog_rejected=no
3108as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3109for as_dir in $PATH
3110do
3111  IFS=$as_save_IFS
3112  test -z "$as_dir" && as_dir=.
3113    for ac_exec_ext in '' $ac_executable_extensions; do
3114  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3115    if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
3116       ac_prog_rejected=yes
3117       continue
3118     fi
3119    ac_cv_prog_CC="cc"
3120    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3121    break 2
3122  fi
3123done
3124  done
3125IFS=$as_save_IFS
3126
3127if test $ac_prog_rejected = yes; then
3128  # We found a bogon in the path, so make sure we never use it.
3129  set dummy $ac_cv_prog_CC
3130  shift
3131  if test $# != 0; then
3132    # We chose a different compiler from the bogus one.
3133    # However, it has the same basename, so the bogon will be chosen
3134    # first if we set CC to just the basename; use the full file name.
3135    shift
3136    ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@"
3137  fi
3138fi
3139fi
3140fi
3141CC=$ac_cv_prog_CC
3142if test -n "$CC"; then
3143  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3144$as_echo "$CC" >&6; }
3145else
3146  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3147$as_echo "no" >&6; }
3148fi
3149
3150
3151fi
3152if test -z "$CC"; then
3153  if test -n "$ac_tool_prefix"; then
3154  for ac_prog in cl.exe
3155  do
3156    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
3157set dummy $ac_tool_prefix$ac_prog; ac_word=$2
3158{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3159$as_echo_n "checking for $ac_word... " >&6; }
3160if ${ac_cv_prog_CC+:} false; then :
3161  $as_echo_n "(cached) " >&6
3162else
3163  if test -n "$CC"; then
3164  ac_cv_prog_CC="$CC" # Let the user override the test.
3165else
3166as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3167for as_dir in $PATH
3168do
3169  IFS=$as_save_IFS
3170  test -z "$as_dir" && as_dir=.
3171    for ac_exec_ext in '' $ac_executable_extensions; do
3172  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3173    ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
3174    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3175    break 2
3176  fi
3177done
3178  done
3179IFS=$as_save_IFS
3180
3181fi
3182fi
3183CC=$ac_cv_prog_CC
3184if test -n "$CC"; then
3185  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3186$as_echo "$CC" >&6; }
3187else
3188  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3189$as_echo "no" >&6; }
3190fi
3191
3192
3193    test -n "$CC" && break
3194  done
3195fi
3196if test -z "$CC"; then
3197  ac_ct_CC=$CC
3198  for ac_prog in cl.exe
3199do
3200  # Extract the first word of "$ac_prog", so it can be a program name with args.
3201set dummy $ac_prog; ac_word=$2
3202{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3203$as_echo_n "checking for $ac_word... " >&6; }
3204if ${ac_cv_prog_ac_ct_CC+:} false; then :
3205  $as_echo_n "(cached) " >&6
3206else
3207  if test -n "$ac_ct_CC"; then
3208  ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
3209else
3210as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3211for as_dir in $PATH
3212do
3213  IFS=$as_save_IFS
3214  test -z "$as_dir" && as_dir=.
3215    for ac_exec_ext in '' $ac_executable_extensions; do
3216  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3217    ac_cv_prog_ac_ct_CC="$ac_prog"
3218    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3219    break 2
3220  fi
3221done
3222  done
3223IFS=$as_save_IFS
3224
3225fi
3226fi
3227ac_ct_CC=$ac_cv_prog_ac_ct_CC
3228if test -n "$ac_ct_CC"; then
3229  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
3230$as_echo "$ac_ct_CC" >&6; }
3231else
3232  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3233$as_echo "no" >&6; }
3234fi
3235
3236
3237  test -n "$ac_ct_CC" && break
3238done
3239
3240  if test "x$ac_ct_CC" = x; then
3241    CC=""
3242  else
3243    case $cross_compiling:$ac_tool_warned in
3244yes:)
3245{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
3246$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
3247ac_tool_warned=yes ;;
3248esac
3249    CC=$ac_ct_CC
3250  fi
3251fi
3252
3253fi
3254
3255
3256test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3257$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3258as_fn_error $? "no acceptable C compiler found in \$PATH
3259See \`config.log' for more details" "$LINENO" 5; }
3260
3261# Provide some information about the compiler.
3262$as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
3263set X $ac_compile
3264ac_compiler=$2
3265for ac_option in --version -v -V -qversion; do
3266  { { ac_try="$ac_compiler $ac_option >&5"
3267case "(($ac_try" in
3268  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3269  *) ac_try_echo=$ac_try;;
3270esac
3271eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3272$as_echo "$ac_try_echo"; } >&5
3273  (eval "$ac_compiler $ac_option >&5") 2>conftest.err
3274  ac_status=$?
3275  if test -s conftest.err; then
3276    sed '10a\
3277... rest of stderr output deleted ...
3278         10q' conftest.err >conftest.er1
3279    cat conftest.er1 >&5
3280  fi
3281  rm -f conftest.er1 conftest.err
3282  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3283  test $ac_status = 0; }
3284done
3285
3286cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3287/* end confdefs.h.  */
3288
3289int
3290main ()
3291{
3292
3293  ;
3294  return 0;
3295}
3296_ACEOF
3297ac_clean_files_save=$ac_clean_files
3298ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out"
3299# Try to create an executable without -o first, disregard a.out.
3300# It will help us diagnose broken compilers, and finding out an intuition
3301# of exeext.
3302{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5
3303$as_echo_n "checking whether the C compiler works... " >&6; }
3304ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
3305
3306# The possible output files:
3307ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*"
3308
3309ac_rmfiles=
3310for ac_file in $ac_files
3311do
3312  case $ac_file in
3313    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
3314    * ) ac_rmfiles="$ac_rmfiles $ac_file";;
3315  esac
3316done
3317rm -f $ac_rmfiles
3318
3319if { { ac_try="$ac_link_default"
3320case "(($ac_try" in
3321  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3322  *) ac_try_echo=$ac_try;;
3323esac
3324eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3325$as_echo "$ac_try_echo"; } >&5
3326  (eval "$ac_link_default") 2>&5
3327  ac_status=$?
3328  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3329  test $ac_status = 0; }; then :
3330  # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
3331# So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
3332# in a Makefile.  We should not override ac_cv_exeext if it was cached,
3333# so that the user can short-circuit this test for compilers unknown to
3334# Autoconf.
3335for ac_file in $ac_files ''
3336do
3337  test -f "$ac_file" || continue
3338  case $ac_file in
3339    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj )
3340	;;
3341    [ab].out )
3342	# We found the default executable, but exeext='' is most
3343	# certainly right.
3344	break;;
3345    *.* )
3346	if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no;
3347	then :; else
3348	   ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
3349	fi
3350	# We set ac_cv_exeext here because the later test for it is not
3351	# safe: cross compilers may not add the suffix if given an `-o'
3352	# argument, so we may need to know it at that point already.
3353	# Even if this section looks crufty: it has the advantage of
3354	# actually working.
3355	break;;
3356    * )
3357	break;;
3358  esac
3359done
3360test "$ac_cv_exeext" = no && ac_cv_exeext=
3361
3362else
3363  ac_file=''
3364fi
3365if test -z "$ac_file"; then :
3366  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3367$as_echo "no" >&6; }
3368$as_echo "$as_me: failed program was:" >&5
3369sed 's/^/| /' conftest.$ac_ext >&5
3370
3371{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3372$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3373as_fn_error 77 "C compiler cannot create executables
3374See \`config.log' for more details" "$LINENO" 5; }
3375else
3376  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
3377$as_echo "yes" >&6; }
3378fi
3379{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5
3380$as_echo_n "checking for C compiler default output file name... " >&6; }
3381{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5
3382$as_echo "$ac_file" >&6; }
3383ac_exeext=$ac_cv_exeext
3384
3385rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out
3386ac_clean_files=$ac_clean_files_save
3387{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5
3388$as_echo_n "checking for suffix of executables... " >&6; }
3389if { { ac_try="$ac_link"
3390case "(($ac_try" in
3391  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3392  *) ac_try_echo=$ac_try;;
3393esac
3394eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3395$as_echo "$ac_try_echo"; } >&5
3396  (eval "$ac_link") 2>&5
3397  ac_status=$?
3398  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3399  test $ac_status = 0; }; then :
3400  # If both `conftest.exe' and `conftest' are `present' (well, observable)
3401# catch `conftest.exe'.  For instance with Cygwin, `ls conftest' will
3402# work properly (i.e., refer to `conftest.exe'), while it won't with
3403# `rm'.
3404for ac_file in conftest.exe conftest conftest.*; do
3405  test -f "$ac_file" || continue
3406  case $ac_file in
3407    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
3408    *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
3409	  break;;
3410    * ) break;;
3411  esac
3412done
3413else
3414  { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3415$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3416as_fn_error $? "cannot compute suffix of executables: cannot compile and link
3417See \`config.log' for more details" "$LINENO" 5; }
3418fi
3419rm -f conftest conftest$ac_cv_exeext
3420{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5
3421$as_echo "$ac_cv_exeext" >&6; }
3422
3423rm -f conftest.$ac_ext
3424EXEEXT=$ac_cv_exeext
3425ac_exeext=$EXEEXT
3426cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3427/* end confdefs.h.  */
3428#include <stdio.h>
3429int
3430main ()
3431{
3432FILE *f = fopen ("conftest.out", "w");
3433 return ferror (f) || fclose (f) != 0;
3434
3435  ;
3436  return 0;
3437}
3438_ACEOF
3439ac_clean_files="$ac_clean_files conftest.out"
3440# Check that the compiler produces executables we can run.  If not, either
3441# the compiler is broken, or we cross compile.
3442{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5
3443$as_echo_n "checking whether we are cross compiling... " >&6; }
3444if test "$cross_compiling" != yes; then
3445  { { ac_try="$ac_link"
3446case "(($ac_try" in
3447  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3448  *) ac_try_echo=$ac_try;;
3449esac
3450eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3451$as_echo "$ac_try_echo"; } >&5
3452  (eval "$ac_link") 2>&5
3453  ac_status=$?
3454  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3455  test $ac_status = 0; }
3456  if { ac_try='./conftest$ac_cv_exeext'
3457  { { case "(($ac_try" in
3458  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3459  *) ac_try_echo=$ac_try;;
3460esac
3461eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3462$as_echo "$ac_try_echo"; } >&5
3463  (eval "$ac_try") 2>&5
3464  ac_status=$?
3465  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3466  test $ac_status = 0; }; }; then
3467    cross_compiling=no
3468  else
3469    if test "$cross_compiling" = maybe; then
3470	cross_compiling=yes
3471    else
3472	{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3473$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3474as_fn_error $? "cannot run C compiled programs.
3475If you meant to cross compile, use \`--host'.
3476See \`config.log' for more details" "$LINENO" 5; }
3477    fi
3478  fi
3479fi
3480{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5
3481$as_echo "$cross_compiling" >&6; }
3482
3483rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out
3484ac_clean_files=$ac_clean_files_save
3485{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5
3486$as_echo_n "checking for suffix of object files... " >&6; }
3487if ${ac_cv_objext+:} false; then :
3488  $as_echo_n "(cached) " >&6
3489else
3490  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3491/* end confdefs.h.  */
3492
3493int
3494main ()
3495{
3496
3497  ;
3498  return 0;
3499}
3500_ACEOF
3501rm -f conftest.o conftest.obj
3502if { { ac_try="$ac_compile"
3503case "(($ac_try" in
3504  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3505  *) ac_try_echo=$ac_try;;
3506esac
3507eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3508$as_echo "$ac_try_echo"; } >&5
3509  (eval "$ac_compile") 2>&5
3510  ac_status=$?
3511  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3512  test $ac_status = 0; }; then :
3513  for ac_file in conftest.o conftest.obj conftest.*; do
3514  test -f "$ac_file" || continue;
3515  case $ac_file in
3516    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;;
3517    *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
3518       break;;
3519  esac
3520done
3521else
3522  $as_echo "$as_me: failed program was:" >&5
3523sed 's/^/| /' conftest.$ac_ext >&5
3524
3525{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3526$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3527as_fn_error $? "cannot compute suffix of object files: cannot compile
3528See \`config.log' for more details" "$LINENO" 5; }
3529fi
3530rm -f conftest.$ac_cv_objext conftest.$ac_ext
3531fi
3532{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5
3533$as_echo "$ac_cv_objext" >&6; }
3534OBJEXT=$ac_cv_objext
3535ac_objext=$OBJEXT
3536{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5
3537$as_echo_n "checking whether we are using the GNU C compiler... " >&6; }
3538if ${ac_cv_c_compiler_gnu+:} false; then :
3539  $as_echo_n "(cached) " >&6
3540else
3541  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3542/* end confdefs.h.  */
3543
3544int
3545main ()
3546{
3547#ifndef __GNUC__
3548       choke me
3549#endif
3550
3551  ;
3552  return 0;
3553}
3554_ACEOF
3555if ac_fn_c_try_compile "$LINENO"; then :
3556  ac_compiler_gnu=yes
3557else
3558  ac_compiler_gnu=no
3559fi
3560rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3561ac_cv_c_compiler_gnu=$ac_compiler_gnu
3562
3563fi
3564{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5
3565$as_echo "$ac_cv_c_compiler_gnu" >&6; }
3566if test $ac_compiler_gnu = yes; then
3567  GCC=yes
3568else
3569  GCC=
3570fi
3571ac_test_CFLAGS=${CFLAGS+set}
3572ac_save_CFLAGS=$CFLAGS
3573{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5
3574$as_echo_n "checking whether $CC accepts -g... " >&6; }
3575if ${ac_cv_prog_cc_g+:} false; then :
3576  $as_echo_n "(cached) " >&6
3577else
3578  ac_save_c_werror_flag=$ac_c_werror_flag
3579   ac_c_werror_flag=yes
3580   ac_cv_prog_cc_g=no
3581   CFLAGS="-g"
3582   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3583/* end confdefs.h.  */
3584
3585int
3586main ()
3587{
3588
3589  ;
3590  return 0;
3591}
3592_ACEOF
3593if ac_fn_c_try_compile "$LINENO"; then :
3594  ac_cv_prog_cc_g=yes
3595else
3596  CFLAGS=""
3597      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3598/* end confdefs.h.  */
3599
3600int
3601main ()
3602{
3603
3604  ;
3605  return 0;
3606}
3607_ACEOF
3608if ac_fn_c_try_compile "$LINENO"; then :
3609
3610else
3611  ac_c_werror_flag=$ac_save_c_werror_flag
3612	 CFLAGS="-g"
3613	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3614/* end confdefs.h.  */
3615
3616int
3617main ()
3618{
3619
3620  ;
3621  return 0;
3622}
3623_ACEOF
3624if ac_fn_c_try_compile "$LINENO"; then :
3625  ac_cv_prog_cc_g=yes
3626fi
3627rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3628fi
3629rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3630fi
3631rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3632   ac_c_werror_flag=$ac_save_c_werror_flag
3633fi
3634{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5
3635$as_echo "$ac_cv_prog_cc_g" >&6; }
3636if test "$ac_test_CFLAGS" = set; then
3637  CFLAGS=$ac_save_CFLAGS
3638elif test $ac_cv_prog_cc_g = yes; then
3639  if test "$GCC" = yes; then
3640    CFLAGS="-g -O2"
3641  else
3642    CFLAGS="-g"
3643  fi
3644else
3645  if test "$GCC" = yes; then
3646    CFLAGS="-O2"
3647  else
3648    CFLAGS=
3649  fi
3650fi
3651{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5
3652$as_echo_n "checking for $CC option to accept ISO C89... " >&6; }
3653if ${ac_cv_prog_cc_c89+:} false; then :
3654  $as_echo_n "(cached) " >&6
3655else
3656  ac_cv_prog_cc_c89=no
3657ac_save_CC=$CC
3658cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3659/* end confdefs.h.  */
3660#include <stdarg.h>
3661#include <stdio.h>
3662struct stat;
3663/* Most of the following tests are stolen from RCS 5.7's src/conf.sh.  */
3664struct buf { int x; };
3665FILE * (*rcsopen) (struct buf *, struct stat *, int);
3666static char *e (p, i)
3667     char **p;
3668     int i;
3669{
3670  return p[i];
3671}
3672static char *f (char * (*g) (char **, int), char **p, ...)
3673{
3674  char *s;
3675  va_list v;
3676  va_start (v,p);
3677  s = g (p, va_arg (v,int));
3678  va_end (v);
3679  return s;
3680}
3681
3682/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default.  It has
3683   function prototypes and stuff, but not '\xHH' hex character constants.
3684   These don't provoke an error unfortunately, instead are silently treated
3685   as 'x'.  The following induces an error, until -std is added to get
3686   proper ANSI mode.  Curiously '\x00'!='x' always comes out true, for an
3687   array size at least.  It's necessary to write '\x00'==0 to get something
3688   that's true only with -std.  */
3689int osf4_cc_array ['\x00' == 0 ? 1 : -1];
3690
3691/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
3692   inside strings and character constants.  */
3693#define FOO(x) 'x'
3694int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
3695
3696int test (int i, double x);
3697struct s1 {int (*f) (int a);};
3698struct s2 {int (*f) (double a);};
3699int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
3700int argc;
3701char **argv;
3702int
3703main ()
3704{
3705return f (e, argv, 0) != argv[0]  ||  f (e, argv, 1) != argv[1];
3706  ;
3707  return 0;
3708}
3709_ACEOF
3710for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
3711	-Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
3712do
3713  CC="$ac_save_CC $ac_arg"
3714  if ac_fn_c_try_compile "$LINENO"; then :
3715  ac_cv_prog_cc_c89=$ac_arg
3716fi
3717rm -f core conftest.err conftest.$ac_objext
3718  test "x$ac_cv_prog_cc_c89" != "xno" && break
3719done
3720rm -f conftest.$ac_ext
3721CC=$ac_save_CC
3722
3723fi
3724# AC_CACHE_VAL
3725case "x$ac_cv_prog_cc_c89" in
3726  x)
3727    { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
3728$as_echo "none needed" >&6; } ;;
3729  xno)
3730    { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
3731$as_echo "unsupported" >&6; } ;;
3732  *)
3733    CC="$CC $ac_cv_prog_cc_c89"
3734    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
3735$as_echo "$ac_cv_prog_cc_c89" >&6; } ;;
3736esac
3737if test "x$ac_cv_prog_cc_c89" != xno; then :
3738
3739fi
3740
3741ac_ext=c
3742ac_cpp='$CPP $CPPFLAGS'
3743ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3744ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3745ac_compiler_gnu=$ac_cv_c_compiler_gnu
3746
3747
3748
3749  if test -z "$GCC"; then
3750    # not using GCC
3751    { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to request ANSI compilation" >&5
3752$as_echo_n "checking how to request ANSI compilation... " >&6; }
3753    case "$host" in
3754      *-hpux* )
3755        { $as_echo "$as_me:${as_lineno-$LINENO}: result: HPUX: adding -Ae" >&5
3756$as_echo "HPUX: adding -Ae" >&6; }
3757        CC="$CC -Ae"
3758      ;;
3759      *-aix* )
3760        { $as_echo "$as_me:${as_lineno-$LINENO}: result: AIX: adding -qlanglvl=ansi -qhalt=e" >&5
3761$as_echo "AIX: adding -qlanglvl=ansi -qhalt=e" >&6; }
3762        CC="$CC -qlanglvl=ansi -qhalt=e"
3763      ;;
3764      *-dec-* )
3765        { $as_echo "$as_me:${as_lineno-$LINENO}: result: DEC: adding -std1 -ieee" >&5
3766$as_echo "DEC: adding -std1 -ieee" >&6; }
3767        CC="$CC -std1"
3768      ;;
3769      *)
3770        { $as_echo "$as_me:${as_lineno-$LINENO}: result: no idea" >&5
3771$as_echo "no idea" >&6; }
3772      ;;
3773    esac
3774  else
3775    # using GCC
3776    case "$host" in
3777      *-solaris*)
3778        { $as_echo "$as_me:${as_lineno-$LINENO}: result: Solaris: adding -D__EXTENSIONS__" >&5
3779$as_echo "Solaris: adding -D__EXTENSIONS__" >&6; }
3780        CC="$CC -D__EXTENSIONS__"
3781      ;;
3782    esac
3783
3784    # Prior to 1996, XScreenSaver was written in K&R C, because ANSI C
3785    # compilers (function prototypes!) were not yet universally deployed.
3786    # And even after the conversion to ANSI C, GNU C's various non-standard
3787    # extensions (such as allowing C++ style "//" comments in C code, and
3788    # declarations after statements) were not supported by non-gcc compilers
3789    # for many years, so we continued to use "-std=c89" to prevent those
3790    # GNU-isms from sneaking in to the code.  Well, these days various
3791    # vendors have sloppily allowed non-ANSI syntax to slip into their
3792    # library header files.  GTK and OpenGL have been major offenders in this
3793    # way.  So... as of 2021, I guess we are forced to use "-std=gnu89", to
3794    # allow those extensions, and hope that the warnings generated by
3795    # "-pedantic" are heeded.
3796    #
3797    if test -n "$GCC"; then
3798   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether gcc accepts -std=gnu89" >&5
3799$as_echo_n "checking whether gcc accepts -std=gnu89... " >&6; }
3800if ${ac_cv_gcc_accepts_gnu89+:} false; then :
3801  $as_echo_n "(cached) " >&6
3802else
3803  rm -rf conftest.$ac_ext
3804     touch conftest.$ac_ext
3805     if ( ( gcc -c -std=gnu89 conftest.$ac_ext -o/dev/null >/dev/null ) 2>&1 | \
3806          grep unrecognized >/dev/null ); then
3807       ac_cv_gcc_accepts_gnu89=no
3808     else
3809       ac_cv_gcc_accepts_gnu89=yes
3810       CC="$CC -std=gnu89"
3811     fi
3812fi
3813{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_gcc_accepts_gnu89" >&5
3814$as_echo "$ac_cv_gcc_accepts_gnu89" >&6; }
3815   ac_gcc_accepts_gnu89="$ac_cv_gcc_accepts_gnu89"
3816  fi
3817
3818    if test -n "$GCC"; then
3819   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether gcc accepts -pedantic" >&5
3820$as_echo_n "checking whether gcc accepts -pedantic... " >&6; }
3821if ${ac_cv_gcc_accepts_pedantic+:} false; then :
3822  $as_echo_n "(cached) " >&6
3823else
3824  rm -rf conftest.$ac_ext
3825     touch conftest.$ac_ext
3826     if ( ( gcc -c -pedantic conftest.$ac_ext -o/dev/null >/dev/null ) 2>&1 | \
3827          grep unrecognized >/dev/null ); then
3828       ac_cv_gcc_accepts_pedantic=no
3829     else
3830       ac_cv_gcc_accepts_pedantic=yes
3831       CC="$CC -pedantic"
3832     fi
3833fi
3834{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_gcc_accepts_pedantic" >&5
3835$as_echo "$ac_cv_gcc_accepts_pedantic" >&6; }
3836   ac_gcc_accepts_pedantic="$ac_cv_gcc_accepts_pedantic"
3837  fi
3838
3839    if test -n "$GCC"; then
3840   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether gcc accepts -Wall" >&5
3841$as_echo_n "checking whether gcc accepts -Wall... " >&6; }
3842if ${ac_cv_gcc_accepts_Wall+:} false; then :
3843  $as_echo_n "(cached) " >&6
3844else
3845  rm -rf conftest.$ac_ext
3846     touch conftest.$ac_ext
3847     if ( ( gcc -c -Wall conftest.$ac_ext -o/dev/null >/dev/null ) 2>&1 | \
3848          grep unrecognized >/dev/null ); then
3849       ac_cv_gcc_accepts_Wall=no
3850     else
3851       ac_cv_gcc_accepts_Wall=yes
3852       CC="$CC -Wall"
3853     fi
3854fi
3855{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_gcc_accepts_Wall" >&5
3856$as_echo "$ac_cv_gcc_accepts_Wall" >&6; }
3857   ac_gcc_accepts_Wall="$ac_cv_gcc_accepts_Wall"
3858  fi
3859
3860    if test -n "$GCC"; then
3861   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether gcc accepts -Wnested-externs" >&5
3862$as_echo_n "checking whether gcc accepts -Wnested-externs... " >&6; }
3863if ${ac_cv_gcc_accepts_wnested_externs+:} false; then :
3864  $as_echo_n "(cached) " >&6
3865else
3866  rm -rf conftest.$ac_ext
3867     touch conftest.$ac_ext
3868     if ( ( gcc -c -Wnested-externs conftest.$ac_ext -o/dev/null >/dev/null ) 2>&1 | \
3869          grep unrecognized >/dev/null ); then
3870       ac_cv_gcc_accepts_wnested_externs=no
3871     else
3872       ac_cv_gcc_accepts_wnested_externs=yes
3873       CC="$CC -Wnested-externs"
3874     fi
3875fi
3876{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_gcc_accepts_wnested_externs" >&5
3877$as_echo "$ac_cv_gcc_accepts_wnested_externs" >&6; }
3878   ac_gcc_accepts_wnested_externs="$ac_cv_gcc_accepts_wnested_externs"
3879  fi
3880
3881    if test -n "$GCC"; then
3882   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether gcc accepts -Wstrict-prototypes" >&5
3883$as_echo_n "checking whether gcc accepts -Wstrict-prototypes... " >&6; }
3884if ${ac_cv_gcc_accepts_wstrict_prototypes+:} false; then :
3885  $as_echo_n "(cached) " >&6
3886else
3887  rm -rf conftest.$ac_ext
3888     touch conftest.$ac_ext
3889     if ( ( gcc -c -Wstrict-prototypes conftest.$ac_ext -o/dev/null >/dev/null ) 2>&1 | \
3890          grep unrecognized >/dev/null ); then
3891       ac_cv_gcc_accepts_wstrict_prototypes=no
3892     else
3893       ac_cv_gcc_accepts_wstrict_prototypes=yes
3894       CC="$CC -Wstrict-prototypes"
3895     fi
3896fi
3897{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_gcc_accepts_wstrict_prototypes" >&5
3898$as_echo "$ac_cv_gcc_accepts_wstrict_prototypes" >&6; }
3899   ac_gcc_accepts_wstrict_prototypes="$ac_cv_gcc_accepts_wstrict_prototypes"
3900  fi
3901
3902    if test -n "$GCC"; then
3903   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether gcc accepts -Wmissing-prototypes" >&5
3904$as_echo_n "checking whether gcc accepts -Wmissing-prototypes... " >&6; }
3905if ${ac_cv_gcc_accepts_wmissing_prototypes+:} false; then :
3906  $as_echo_n "(cached) " >&6
3907else
3908  rm -rf conftest.$ac_ext
3909     touch conftest.$ac_ext
3910     if ( ( gcc -c -Wmissing-prototypes conftest.$ac_ext -o/dev/null >/dev/null ) 2>&1 | \
3911          grep unrecognized >/dev/null ); then
3912       ac_cv_gcc_accepts_wmissing_prototypes=no
3913     else
3914       ac_cv_gcc_accepts_wmissing_prototypes=yes
3915       CC="$CC -Wmissing-prototypes"
3916     fi
3917fi
3918{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_gcc_accepts_wmissing_prototypes" >&5
3919$as_echo "$ac_cv_gcc_accepts_wmissing_prototypes" >&6; }
3920   ac_gcc_accepts_wmissing_prototypes="$ac_cv_gcc_accepts_wmissing_prototypes"
3921  fi
3922
3923    if test -n "$GCC"; then
3924   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether gcc accepts -Wdeclaration-after-statement" >&5
3925$as_echo_n "checking whether gcc accepts -Wdeclaration-after-statement... " >&6; }
3926if ${ac_cv_gcc_accepts_declaration_after+:} false; then :
3927  $as_echo_n "(cached) " >&6
3928else
3929  rm -rf conftest.$ac_ext
3930     touch conftest.$ac_ext
3931     if ( ( gcc -c -Wdeclaration-after-statement conftest.$ac_ext -o/dev/null >/dev/null ) 2>&1 | \
3932          grep unrecognized >/dev/null ); then
3933       ac_cv_gcc_accepts_declaration_after=no
3934     else
3935       ac_cv_gcc_accepts_declaration_after=yes
3936       CC="$CC -Wdeclaration-after-statement"
3937     fi
3938fi
3939{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_gcc_accepts_declaration_after" >&5
3940$as_echo "$ac_cv_gcc_accepts_declaration_after" >&6; }
3941   ac_gcc_accepts_declaration_after="$ac_cv_gcc_accepts_declaration_after"
3942  fi
3943
3944    # "string length is greater than ISO C89 compilers required to support"
3945    if test -n "$GCC"; then
3946   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether gcc accepts -Wno-overlength-strings" >&5
3947$as_echo_n "checking whether gcc accepts -Wno-overlength-strings... " >&6; }
3948if ${ac_cv_gcc_accepts_no_overlength_strings+:} false; then :
3949  $as_echo_n "(cached) " >&6
3950else
3951  rm -rf conftest.$ac_ext
3952     touch conftest.$ac_ext
3953     if ( ( gcc -c -Wno-overlength-strings conftest.$ac_ext -o/dev/null >/dev/null ) 2>&1 | \
3954          grep unrecognized >/dev/null ); then
3955       ac_cv_gcc_accepts_no_overlength_strings=no
3956     else
3957       ac_cv_gcc_accepts_no_overlength_strings=yes
3958       CC="$CC -Wno-overlength-strings"
3959     fi
3960fi
3961{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_gcc_accepts_no_overlength_strings" >&5
3962$as_echo "$ac_cv_gcc_accepts_no_overlength_strings" >&6; }
3963   ac_gcc_accepts_no_overlength_strings="$ac_cv_gcc_accepts_no_overlength_strings"
3964  fi
3965
3966    # Ignore warnings about using "inline"
3967    if test -n "$GCC"; then
3968   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether gcc accepts -Wno-language-extension-token" >&5
3969$as_echo_n "checking whether gcc accepts -Wno-language-extension-token... " >&6; }
3970if ${ac_cv_gcc_accepts_no_language_ext_token+:} false; then :
3971  $as_echo_n "(cached) " >&6
3972else
3973  rm -rf conftest.$ac_ext
3974     touch conftest.$ac_ext
3975     if ( ( gcc -c -Wno-language-extension-token conftest.$ac_ext -o/dev/null >/dev/null ) 2>&1 | \
3976          grep unrecognized >/dev/null ); then
3977       ac_cv_gcc_accepts_no_language_ext_token=no
3978     else
3979       ac_cv_gcc_accepts_no_language_ext_token=yes
3980       CC="$CC -Wno-language-extension-token"
3981     fi
3982fi
3983{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_gcc_accepts_no_language_ext_token" >&5
3984$as_echo "$ac_cv_gcc_accepts_no_language_ext_token" >&6; }
3985   ac_gcc_accepts_no_language_ext_token="$ac_cv_gcc_accepts_no_language_ext_token"
3986  fi
3987
3988    # Xlib headers use named variadic macros.
3989    if test -n "$GCC"; then
3990   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether gcc accepts -Wno-variadic-macros" >&5
3991$as_echo_n "checking whether gcc accepts -Wno-variadic-macros... " >&6; }
3992if ${ac_cv_gcc_accepts_no_variadic_macros+:} false; then :
3993  $as_echo_n "(cached) " >&6
3994else
3995  rm -rf conftest.$ac_ext
3996     touch conftest.$ac_ext
3997     if ( ( gcc -c -Wno-variadic-macros conftest.$ac_ext -o/dev/null >/dev/null ) 2>&1 | \
3998          grep unrecognized >/dev/null ); then
3999       ac_cv_gcc_accepts_no_variadic_macros=no
4000     else
4001       ac_cv_gcc_accepts_no_variadic_macros=yes
4002       CC="$CC -Wno-variadic-macros"
4003     fi
4004fi
4005{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_gcc_accepts_no_variadic_macros" >&5
4006$as_echo "$ac_cv_gcc_accepts_no_variadic_macros" >&6; }
4007   ac_gcc_accepts_no_variadic_macros="$ac_cv_gcc_accepts_no_variadic_macros"
4008  fi
4009
4010  fi
4011
4012ac_ext=c
4013ac_cpp='$CPP $CPPFLAGS'
4014ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4015ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4016ac_compiler_gnu=$ac_cv_c_compiler_gnu
4017{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5
4018$as_echo_n "checking how to run the C preprocessor... " >&6; }
4019# On Suns, sometimes $CPP names a directory.
4020if test -n "$CPP" && test -d "$CPP"; then
4021  CPP=
4022fi
4023if test -z "$CPP"; then
4024  if ${ac_cv_prog_CPP+:} false; then :
4025  $as_echo_n "(cached) " >&6
4026else
4027      # Double quotes because CPP needs to be expanded
4028    for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
4029    do
4030      ac_preproc_ok=false
4031for ac_c_preproc_warn_flag in '' yes
4032do
4033  # Use a header file that comes with gcc, so configuring glibc
4034  # with a fresh cross-compiler works.
4035  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
4036  # <limits.h> exists even on freestanding compilers.
4037  # On the NeXT, cc -E runs the code through the compiler's parser,
4038  # not just through cpp. "Syntax error" is here to catch this case.
4039  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4040/* end confdefs.h.  */
4041#ifdef __STDC__
4042# include <limits.h>
4043#else
4044# include <assert.h>
4045#endif
4046		     Syntax error
4047_ACEOF
4048if ac_fn_c_try_cpp "$LINENO"; then :
4049
4050else
4051  # Broken: fails on valid input.
4052continue
4053fi
4054rm -f conftest.err conftest.i conftest.$ac_ext
4055
4056  # OK, works on sane cases.  Now check whether nonexistent headers
4057  # can be detected and how.
4058  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4059/* end confdefs.h.  */
4060#include <ac_nonexistent.h>
4061_ACEOF
4062if ac_fn_c_try_cpp "$LINENO"; then :
4063  # Broken: success on invalid input.
4064continue
4065else
4066  # Passes both tests.
4067ac_preproc_ok=:
4068break
4069fi
4070rm -f conftest.err conftest.i conftest.$ac_ext
4071
4072done
4073# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
4074rm -f conftest.i conftest.err conftest.$ac_ext
4075if $ac_preproc_ok; then :
4076  break
4077fi
4078
4079    done
4080    ac_cv_prog_CPP=$CPP
4081
4082fi
4083  CPP=$ac_cv_prog_CPP
4084else
4085  ac_cv_prog_CPP=$CPP
4086fi
4087{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5
4088$as_echo "$CPP" >&6; }
4089ac_preproc_ok=false
4090for ac_c_preproc_warn_flag in '' yes
4091do
4092  # Use a header file that comes with gcc, so configuring glibc
4093  # with a fresh cross-compiler works.
4094  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
4095  # <limits.h> exists even on freestanding compilers.
4096  # On the NeXT, cc -E runs the code through the compiler's parser,
4097  # not just through cpp. "Syntax error" is here to catch this case.
4098  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4099/* end confdefs.h.  */
4100#ifdef __STDC__
4101# include <limits.h>
4102#else
4103# include <assert.h>
4104#endif
4105		     Syntax error
4106_ACEOF
4107if ac_fn_c_try_cpp "$LINENO"; then :
4108
4109else
4110  # Broken: fails on valid input.
4111continue
4112fi
4113rm -f conftest.err conftest.i conftest.$ac_ext
4114
4115  # OK, works on sane cases.  Now check whether nonexistent headers
4116  # can be detected and how.
4117  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4118/* end confdefs.h.  */
4119#include <ac_nonexistent.h>
4120_ACEOF
4121if ac_fn_c_try_cpp "$LINENO"; then :
4122  # Broken: success on invalid input.
4123continue
4124else
4125  # Passes both tests.
4126ac_preproc_ok=:
4127break
4128fi
4129rm -f conftest.err conftest.i conftest.$ac_ext
4130
4131done
4132# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
4133rm -f conftest.i conftest.err conftest.$ac_ext
4134if $ac_preproc_ok; then :
4135
4136else
4137  { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4138$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
4139as_fn_error $? "C preprocessor \"$CPP\" fails sanity check
4140See \`config.log' for more details" "$LINENO" 5; }
4141fi
4142
4143ac_ext=c
4144ac_cpp='$CPP $CPPFLAGS'
4145ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4146ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4147ac_compiler_gnu=$ac_cv_c_compiler_gnu
4148
4149
4150{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for an ANSI C-conforming const" >&5
4151$as_echo_n "checking for an ANSI C-conforming const... " >&6; }
4152if ${ac_cv_c_const+:} false; then :
4153  $as_echo_n "(cached) " >&6
4154else
4155  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4156/* end confdefs.h.  */
4157
4158int
4159main ()
4160{
4161
4162#ifndef __cplusplus
4163  /* Ultrix mips cc rejects this sort of thing.  */
4164  typedef int charset[2];
4165  const charset cs = { 0, 0 };
4166  /* SunOS 4.1.1 cc rejects this.  */
4167  char const *const *pcpcc;
4168  char **ppc;
4169  /* NEC SVR4.0.2 mips cc rejects this.  */
4170  struct point {int x, y;};
4171  static struct point const zero = {0,0};
4172  /* AIX XL C 1.02.0.0 rejects this.
4173     It does not let you subtract one const X* pointer from another in
4174     an arm of an if-expression whose if-part is not a constant
4175     expression */
4176  const char *g = "string";
4177  pcpcc = &g + (g ? g-g : 0);
4178  /* HPUX 7.0 cc rejects these. */
4179  ++pcpcc;
4180  ppc = (char**) pcpcc;
4181  pcpcc = (char const *const *) ppc;
4182  { /* SCO 3.2v4 cc rejects this sort of thing.  */
4183    char tx;
4184    char *t = &tx;
4185    char const *s = 0 ? (char *) 0 : (char const *) 0;
4186
4187    *t++ = 0;
4188    if (s) return 0;
4189  }
4190  { /* Someone thinks the Sun supposedly-ANSI compiler will reject this.  */
4191    int x[] = {25, 17};
4192    const int *foo = &x[0];
4193    ++foo;
4194  }
4195  { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
4196    typedef const int *iptr;
4197    iptr p = 0;
4198    ++p;
4199  }
4200  { /* AIX XL C 1.02.0.0 rejects this sort of thing, saying
4201       "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
4202    struct s { int j; const int *ap[3]; } bx;
4203    struct s *b = &bx; b->j = 5;
4204  }
4205  { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
4206    const int foo = 10;
4207    if (!foo) return 0;
4208  }
4209  return !cs[0] && !zero.x;
4210#endif
4211
4212  ;
4213  return 0;
4214}
4215_ACEOF
4216if ac_fn_c_try_compile "$LINENO"; then :
4217  ac_cv_c_const=yes
4218else
4219  ac_cv_c_const=no
4220fi
4221rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4222fi
4223{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_const" >&5
4224$as_echo "$ac_cv_c_const" >&6; }
4225if test $ac_cv_c_const = no; then
4226
4227$as_echo "#define const /**/" >>confdefs.h
4228
4229fi
4230
4231{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inline" >&5
4232$as_echo_n "checking for inline... " >&6; }
4233if ${ac_cv_c_inline+:} false; then :
4234  $as_echo_n "(cached) " >&6
4235else
4236  ac_cv_c_inline=no
4237for ac_kw in inline __inline__ __inline; do
4238  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4239/* end confdefs.h.  */
4240#ifndef __cplusplus
4241typedef int foo_t;
4242static $ac_kw foo_t static_foo () {return 0; }
4243$ac_kw foo_t foo () {return 0; }
4244#endif
4245
4246_ACEOF
4247if ac_fn_c_try_compile "$LINENO"; then :
4248  ac_cv_c_inline=$ac_kw
4249fi
4250rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4251  test "$ac_cv_c_inline" != no && break
4252done
4253
4254fi
4255{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_inline" >&5
4256$as_echo "$ac_cv_c_inline" >&6; }
4257
4258case $ac_cv_c_inline in
4259  inline | yes) ;;
4260  *)
4261    case $ac_cv_c_inline in
4262      no) ac_val=;;
4263      *) ac_val=$ac_cv_c_inline;;
4264    esac
4265    cat >>confdefs.h <<_ACEOF
4266#ifndef __cplusplus
4267#define inline $ac_val
4268#endif
4269_ACEOF
4270    ;;
4271esac
4272
4273
4274
4275# stuff for Makefiles
4276# Find a good install program.  We prefer a C program (faster),
4277# so one script is as good as another.  But avoid the broken or
4278# incompatible versions:
4279# SysV /etc/install, /usr/sbin/install
4280# SunOS /usr/etc/install
4281# IRIX /sbin/install
4282# AIX /bin/install
4283# AmigaOS /C/install, which installs bootblocks on floppy discs
4284# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
4285# AFS /usr/afsws/bin/install, which mishandles nonexistent args
4286# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
4287# OS/2's system install, which has a completely different semantic
4288# ./install, which can be erroneously created by make from ./install.sh.
4289# Reject install programs that cannot install multiple files.
4290{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a BSD-compatible install" >&5
4291$as_echo_n "checking for a BSD-compatible install... " >&6; }
4292if test -z "$INSTALL"; then
4293if ${ac_cv_path_install+:} false; then :
4294  $as_echo_n "(cached) " >&6
4295else
4296  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4297for as_dir in $PATH
4298do
4299  IFS=$as_save_IFS
4300  test -z "$as_dir" && as_dir=.
4301    # Account for people who put trailing slashes in PATH elements.
4302case $as_dir/ in #((
4303  ./ | .// | /[cC]/* | \
4304  /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \
4305  ?:[\\/]os2[\\/]install[\\/]* | ?:[\\/]OS2[\\/]INSTALL[\\/]* | \
4306  /usr/ucb/* ) ;;
4307  *)
4308    # OSF1 and SCO ODT 3.0 have their own names for install.
4309    # Don't use installbsd from OSF since it installs stuff as root
4310    # by default.
4311    for ac_prog in ginstall scoinst install; do
4312      for ac_exec_ext in '' $ac_executable_extensions; do
4313	if as_fn_executable_p "$as_dir/$ac_prog$ac_exec_ext"; then
4314	  if test $ac_prog = install &&
4315	    grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
4316	    # AIX install.  It has an incompatible calling convention.
4317	    :
4318	  elif test $ac_prog = install &&
4319	    grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
4320	    # program-specific install script used by HP pwplus--don't use.
4321	    :
4322	  else
4323	    rm -rf conftest.one conftest.two conftest.dir
4324	    echo one > conftest.one
4325	    echo two > conftest.two
4326	    mkdir conftest.dir
4327	    if "$as_dir/$ac_prog$ac_exec_ext" -c conftest.one conftest.two "`pwd`/conftest.dir" &&
4328	      test -s conftest.one && test -s conftest.two &&
4329	      test -s conftest.dir/conftest.one &&
4330	      test -s conftest.dir/conftest.two
4331	    then
4332	      ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c"
4333	      break 3
4334	    fi
4335	  fi
4336	fi
4337      done
4338    done
4339    ;;
4340esac
4341
4342  done
4343IFS=$as_save_IFS
4344
4345rm -rf conftest.one conftest.two conftest.dir
4346
4347fi
4348  if test "${ac_cv_path_install+set}" = set; then
4349    INSTALL=$ac_cv_path_install
4350  else
4351    # As a last resort, use the slow shell script.  Don't cache a
4352    # value for INSTALL within a source directory, because that will
4353    # break other packages using the cache if that directory is
4354    # removed, or if the value is a relative name.
4355    INSTALL=$ac_install_sh
4356  fi
4357fi
4358{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $INSTALL" >&5
4359$as_echo "$INSTALL" >&6; }
4360
4361# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
4362# It thinks the first close brace ends the variable substitution.
4363test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
4364
4365test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
4366
4367test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
4368
4369{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether \"\${INSTALL} -d\" creates intermediate directories" >&5
4370$as_echo_n "checking whether \"\${INSTALL} -d\" creates intermediate directories... " >&6; }
4371if ${ac_cv_install_d_creates_dirs+:} false; then :
4372  $as_echo_n "(cached) " >&6
4373else
4374  ac_cv_install_d_creates_dirs=no
4375     rm -rf conftestdir
4376     if mkdir conftestdir; then
4377       cd conftestdir 2>/dev/null
4378       ${INSTALL} -d `pwd`/dir1/dir2 >/dev/null 2>&1
4379       if test -d dir1/dir2/. ; then
4380         ac_cv_install_d_creates_dirs=yes
4381       fi
4382       cd .. 2>/dev/null
4383       rm -rf conftestdir
4384     fi
4385
4386fi
4387{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_install_d_creates_dirs" >&5
4388$as_echo "$ac_cv_install_d_creates_dirs" >&6; }
4389
4390  if test "$ac_cv_install_d_creates_dirs" = no ; then
4391    { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether \"mkdir -p\" creates intermediate directories" >&5
4392$as_echo_n "checking whether \"mkdir -p\" creates intermediate directories... " >&6; }
4393if ${ac_cv_mkdir_p_creates_dirs+:} false; then :
4394  $as_echo_n "(cached) " >&6
4395else
4396  ac_cv_mkdir_p_creates_dirs=no
4397       rm -rf conftestdir
4398       if mkdir conftestdir; then
4399         cd conftestdir 2>/dev/null
4400         mkdir -p dir1/dir2 >/dev/null 2>&1
4401         if test -d dir1/dir2/. ; then
4402           ac_cv_mkdir_p_creates_dirs=yes
4403         fi
4404         cd .. 2>/dev/null
4405         rm -rf conftestdir
4406       fi
4407
4408fi
4409{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_mkdir_p_creates_dirs" >&5
4410$as_echo "$ac_cv_mkdir_p_creates_dirs" >&6; }
4411  fi
4412
4413  if test "$ac_cv_install_d_creates_dirs" = yes ; then
4414    INSTALL_DIRS='${INSTALL} -d'
4415  elif test "$ac_cv_mkdir_p_creates_dirs" = yes ; then
4416    INSTALL_DIRS='mkdir -p'
4417  else
4418    # any other ideas?
4419    INSTALL_DIRS='${INSTALL} -d'
4420  fi
4421
4422{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${MAKE-make} sets \$(MAKE)" >&5
4423$as_echo_n "checking whether ${MAKE-make} sets \$(MAKE)... " >&6; }
4424set x ${MAKE-make}
4425ac_make=`$as_echo "$2" | sed 's/+/p/g; s/[^a-zA-Z0-9_]/_/g'`
4426if eval \${ac_cv_prog_make_${ac_make}_set+:} false; then :
4427  $as_echo_n "(cached) " >&6
4428else
4429  cat >conftest.make <<\_ACEOF
4430SHELL = /bin/sh
4431all:
4432	@echo '@@@%%%=$(MAKE)=@@@%%%'
4433_ACEOF
4434# GNU make sometimes prints "make[1]: Entering ...", which would confuse us.
4435case `${MAKE-make} -f conftest.make 2>/dev/null` in
4436  *@@@%%%=?*=@@@%%%*)
4437    eval ac_cv_prog_make_${ac_make}_set=yes;;
4438  *)
4439    eval ac_cv_prog_make_${ac_make}_set=no;;
4440esac
4441rm -f conftest.make
4442fi
4443if eval test \$ac_cv_prog_make_${ac_make}_set = yes; then
4444  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
4445$as_echo "yes" >&6; }
4446  SET_MAKE=
4447else
4448  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4449$as_echo "no" >&6; }
4450  SET_MAKE="MAKE=${MAKE-make}"
4451fi
4452
4453
4454# By default, autoconf sets INSTALL_SCRIPT to '${INSTALL_PROGRAM}'.
4455# That's wrong: it should be set to '${INSTALL}', so that one can
4456# implement the "install-strip" target properly (strip executables,
4457# but do not try to strip scripts.)
4458#
4459INSTALL_SCRIPT='${INSTALL}'
4460
4461# random libc stuff
4462
4463{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
4464$as_echo_n "checking for grep that handles long lines and -e... " >&6; }
4465if ${ac_cv_path_GREP+:} false; then :
4466  $as_echo_n "(cached) " >&6
4467else
4468  if test -z "$GREP"; then
4469  ac_path_GREP_found=false
4470  # Loop through the user's path and test for each of PROGNAME-LIST
4471  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4472for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
4473do
4474  IFS=$as_save_IFS
4475  test -z "$as_dir" && as_dir=.
4476    for ac_prog in grep ggrep; do
4477    for ac_exec_ext in '' $ac_executable_extensions; do
4478      ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
4479      as_fn_executable_p "$ac_path_GREP" || continue
4480# Check for GNU ac_path_GREP and select it if it is found.
4481  # Check for GNU $ac_path_GREP
4482case `"$ac_path_GREP" --version 2>&1` in
4483*GNU*)
4484  ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
4485*)
4486  ac_count=0
4487  $as_echo_n 0123456789 >"conftest.in"
4488  while :
4489  do
4490    cat "conftest.in" "conftest.in" >"conftest.tmp"
4491    mv "conftest.tmp" "conftest.in"
4492    cp "conftest.in" "conftest.nl"
4493    $as_echo 'GREP' >> "conftest.nl"
4494    "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
4495    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
4496    as_fn_arith $ac_count + 1 && ac_count=$as_val
4497    if test $ac_count -gt ${ac_path_GREP_max-0}; then
4498      # Best one so far, save it but keep looking for a better one
4499      ac_cv_path_GREP="$ac_path_GREP"
4500      ac_path_GREP_max=$ac_count
4501    fi
4502    # 10*(2^10) chars as input seems more than enough
4503    test $ac_count -gt 10 && break
4504  done
4505  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
4506esac
4507
4508      $ac_path_GREP_found && break 3
4509    done
4510  done
4511  done
4512IFS=$as_save_IFS
4513  if test -z "$ac_cv_path_GREP"; then
4514    as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
4515  fi
4516else
4517  ac_cv_path_GREP=$GREP
4518fi
4519
4520fi
4521{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
4522$as_echo "$ac_cv_path_GREP" >&6; }
4523 GREP="$ac_cv_path_GREP"
4524
4525
4526{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
4527$as_echo_n "checking for egrep... " >&6; }
4528if ${ac_cv_path_EGREP+:} false; then :
4529  $as_echo_n "(cached) " >&6
4530else
4531  if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
4532   then ac_cv_path_EGREP="$GREP -E"
4533   else
4534     if test -z "$EGREP"; then
4535  ac_path_EGREP_found=false
4536  # Loop through the user's path and test for each of PROGNAME-LIST
4537  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4538for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
4539do
4540  IFS=$as_save_IFS
4541  test -z "$as_dir" && as_dir=.
4542    for ac_prog in egrep; do
4543    for ac_exec_ext in '' $ac_executable_extensions; do
4544      ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
4545      as_fn_executable_p "$ac_path_EGREP" || continue
4546# Check for GNU ac_path_EGREP and select it if it is found.
4547  # Check for GNU $ac_path_EGREP
4548case `"$ac_path_EGREP" --version 2>&1` in
4549*GNU*)
4550  ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
4551*)
4552  ac_count=0
4553  $as_echo_n 0123456789 >"conftest.in"
4554  while :
4555  do
4556    cat "conftest.in" "conftest.in" >"conftest.tmp"
4557    mv "conftest.tmp" "conftest.in"
4558    cp "conftest.in" "conftest.nl"
4559    $as_echo 'EGREP' >> "conftest.nl"
4560    "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
4561    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
4562    as_fn_arith $ac_count + 1 && ac_count=$as_val
4563    if test $ac_count -gt ${ac_path_EGREP_max-0}; then
4564      # Best one so far, save it but keep looking for a better one
4565      ac_cv_path_EGREP="$ac_path_EGREP"
4566      ac_path_EGREP_max=$ac_count
4567    fi
4568    # 10*(2^10) chars as input seems more than enough
4569    test $ac_count -gt 10 && break
4570  done
4571  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
4572esac
4573
4574      $ac_path_EGREP_found && break 3
4575    done
4576  done
4577  done
4578IFS=$as_save_IFS
4579  if test -z "$ac_cv_path_EGREP"; then
4580    as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
4581  fi
4582else
4583  ac_cv_path_EGREP=$EGREP
4584fi
4585
4586   fi
4587fi
4588{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
4589$as_echo "$ac_cv_path_EGREP" >&6; }
4590 EGREP="$ac_cv_path_EGREP"
4591
4592
4593{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
4594$as_echo_n "checking for ANSI C header files... " >&6; }
4595if ${ac_cv_header_stdc+:} false; then :
4596  $as_echo_n "(cached) " >&6
4597else
4598  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4599/* end confdefs.h.  */
4600#include <stdlib.h>
4601#include <stdarg.h>
4602#include <string.h>
4603#include <float.h>
4604
4605int
4606main ()
4607{
4608
4609  ;
4610  return 0;
4611}
4612_ACEOF
4613if ac_fn_c_try_compile "$LINENO"; then :
4614  ac_cv_header_stdc=yes
4615else
4616  ac_cv_header_stdc=no
4617fi
4618rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4619
4620if test $ac_cv_header_stdc = yes; then
4621  # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
4622  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4623/* end confdefs.h.  */
4624#include <string.h>
4625
4626_ACEOF
4627if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4628  $EGREP "memchr" >/dev/null 2>&1; then :
4629
4630else
4631  ac_cv_header_stdc=no
4632fi
4633rm -f conftest*
4634
4635fi
4636
4637if test $ac_cv_header_stdc = yes; then
4638  # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
4639  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4640/* end confdefs.h.  */
4641#include <stdlib.h>
4642
4643_ACEOF
4644if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4645  $EGREP "free" >/dev/null 2>&1; then :
4646
4647else
4648  ac_cv_header_stdc=no
4649fi
4650rm -f conftest*
4651
4652fi
4653
4654if test $ac_cv_header_stdc = yes; then
4655  # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
4656  if test "$cross_compiling" = yes; then :
4657  :
4658else
4659  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4660/* end confdefs.h.  */
4661#include <ctype.h>
4662#include <stdlib.h>
4663#if ((' ' & 0x0FF) == 0x020)
4664# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
4665# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
4666#else
4667# define ISLOWER(c) \
4668		   (('a' <= (c) && (c) <= 'i') \
4669		     || ('j' <= (c) && (c) <= 'r') \
4670		     || ('s' <= (c) && (c) <= 'z'))
4671# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
4672#endif
4673
4674#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
4675int
4676main ()
4677{
4678  int i;
4679  for (i = 0; i < 256; i++)
4680    if (XOR (islower (i), ISLOWER (i))
4681	|| toupper (i) != TOUPPER (i))
4682      return 2;
4683  return 0;
4684}
4685_ACEOF
4686if ac_fn_c_try_run "$LINENO"; then :
4687
4688else
4689  ac_cv_header_stdc=no
4690fi
4691rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
4692  conftest.$ac_objext conftest.beam conftest.$ac_ext
4693fi
4694
4695fi
4696fi
4697{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
4698$as_echo "$ac_cv_header_stdc" >&6; }
4699if test $ac_cv_header_stdc = yes; then
4700
4701$as_echo "#define STDC_HEADERS 1" >>confdefs.h
4702
4703fi
4704
4705# On IRIX 5.3, sys/types and inttypes.h are conflicting.
4706for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
4707		  inttypes.h stdint.h unistd.h
4708do :
4709  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
4710ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
4711"
4712if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
4713  cat >>confdefs.h <<_ACEOF
4714#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
4715_ACEOF
4716
4717fi
4718
4719done
4720
4721
4722for ac_header in unistd.h inttypes.h
4723do :
4724  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
4725ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
4726if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
4727  cat >>confdefs.h <<_ACEOF
4728#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
4729_ACEOF
4730
4731fi
4732
4733done
4734
4735ac_fn_c_check_type "$LINENO" "mode_t" "ac_cv_type_mode_t" "$ac_includes_default"
4736if test "x$ac_cv_type_mode_t" = xyes; then :
4737
4738else
4739
4740cat >>confdefs.h <<_ACEOF
4741#define mode_t int
4742_ACEOF
4743
4744fi
4745
4746ac_fn_c_check_type "$LINENO" "pid_t" "ac_cv_type_pid_t" "$ac_includes_default"
4747if test "x$ac_cv_type_pid_t" = xyes; then :
4748
4749else
4750
4751cat >>confdefs.h <<_ACEOF
4752#define pid_t int
4753_ACEOF
4754
4755fi
4756
4757ac_fn_c_check_type "$LINENO" "size_t" "ac_cv_type_size_t" "$ac_includes_default"
4758if test "x$ac_cv_type_size_t" = xyes; then :
4759
4760else
4761
4762cat >>confdefs.h <<_ACEOF
4763#define size_t unsigned int
4764_ACEOF
4765
4766fi
4767
4768
4769cat >>confdefs.h <<_ACEOF
4770#define RETSIGTYPE void
4771_ACEOF
4772
4773{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for sys/wait.h that is POSIX.1 compatible" >&5
4774$as_echo_n "checking for sys/wait.h that is POSIX.1 compatible... " >&6; }
4775if ${ac_cv_header_sys_wait_h+:} false; then :
4776  $as_echo_n "(cached) " >&6
4777else
4778  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4779/* end confdefs.h.  */
4780#include <sys/types.h>
4781#include <sys/wait.h>
4782#ifndef WEXITSTATUS
4783# define WEXITSTATUS(stat_val) ((unsigned int) (stat_val) >> 8)
4784#endif
4785#ifndef WIFEXITED
4786# define WIFEXITED(stat_val) (((stat_val) & 255) == 0)
4787#endif
4788
4789int
4790main ()
4791{
4792  int s;
4793  wait (&s);
4794  s = WIFEXITED (s) ? WEXITSTATUS (s) : 1;
4795  ;
4796  return 0;
4797}
4798_ACEOF
4799if ac_fn_c_try_compile "$LINENO"; then :
4800  ac_cv_header_sys_wait_h=yes
4801else
4802  ac_cv_header_sys_wait_h=no
4803fi
4804rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4805fi
4806{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_sys_wait_h" >&5
4807$as_echo "$ac_cv_header_sys_wait_h" >&6; }
4808if test $ac_cv_header_sys_wait_h = yes; then
4809
4810$as_echo "#define HAVE_SYS_WAIT_H 1" >>confdefs.h
4811
4812fi
4813
4814ac_header_dirent=no
4815for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h; do
4816  as_ac_Header=`$as_echo "ac_cv_header_dirent_$ac_hdr" | $as_tr_sh`
4817{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_hdr that defines DIR" >&5
4818$as_echo_n "checking for $ac_hdr that defines DIR... " >&6; }
4819if eval \${$as_ac_Header+:} false; then :
4820  $as_echo_n "(cached) " >&6
4821else
4822  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4823/* end confdefs.h.  */
4824#include <sys/types.h>
4825#include <$ac_hdr>
4826
4827int
4828main ()
4829{
4830if ((DIR *) 0)
4831return 0;
4832  ;
4833  return 0;
4834}
4835_ACEOF
4836if ac_fn_c_try_compile "$LINENO"; then :
4837  eval "$as_ac_Header=yes"
4838else
4839  eval "$as_ac_Header=no"
4840fi
4841rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4842fi
4843eval ac_res=\$$as_ac_Header
4844	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
4845$as_echo "$ac_res" >&6; }
4846if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
4847  cat >>confdefs.h <<_ACEOF
4848#define `$as_echo "HAVE_$ac_hdr" | $as_tr_cpp` 1
4849_ACEOF
4850
4851ac_header_dirent=$ac_hdr; break
4852fi
4853
4854done
4855# Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
4856if test $ac_header_dirent = dirent.h; then
4857  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing opendir" >&5
4858$as_echo_n "checking for library containing opendir... " >&6; }
4859if ${ac_cv_search_opendir+:} false; then :
4860  $as_echo_n "(cached) " >&6
4861else
4862  ac_func_search_save_LIBS=$LIBS
4863cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4864/* end confdefs.h.  */
4865
4866/* Override any GCC internal prototype to avoid an error.
4867   Use char because int might match the return type of a GCC
4868   builtin and then its argument prototype would still apply.  */
4869#ifdef __cplusplus
4870extern "C"
4871#endif
4872char opendir ();
4873int
4874main ()
4875{
4876return opendir ();
4877  ;
4878  return 0;
4879}
4880_ACEOF
4881for ac_lib in '' dir; do
4882  if test -z "$ac_lib"; then
4883    ac_res="none required"
4884  else
4885    ac_res=-l$ac_lib
4886    LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
4887  fi
4888  if ac_fn_c_try_link "$LINENO"; then :
4889  ac_cv_search_opendir=$ac_res
4890fi
4891rm -f core conftest.err conftest.$ac_objext \
4892    conftest$ac_exeext
4893  if ${ac_cv_search_opendir+:} false; then :
4894  break
4895fi
4896done
4897if ${ac_cv_search_opendir+:} false; then :
4898
4899else
4900  ac_cv_search_opendir=no
4901fi
4902rm conftest.$ac_ext
4903LIBS=$ac_func_search_save_LIBS
4904fi
4905{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_opendir" >&5
4906$as_echo "$ac_cv_search_opendir" >&6; }
4907ac_res=$ac_cv_search_opendir
4908if test "$ac_res" != no; then :
4909  test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
4910
4911fi
4912
4913else
4914  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing opendir" >&5
4915$as_echo_n "checking for library containing opendir... " >&6; }
4916if ${ac_cv_search_opendir+:} false; then :
4917  $as_echo_n "(cached) " >&6
4918else
4919  ac_func_search_save_LIBS=$LIBS
4920cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4921/* end confdefs.h.  */
4922
4923/* Override any GCC internal prototype to avoid an error.
4924   Use char because int might match the return type of a GCC
4925   builtin and then its argument prototype would still apply.  */
4926#ifdef __cplusplus
4927extern "C"
4928#endif
4929char opendir ();
4930int
4931main ()
4932{
4933return opendir ();
4934  ;
4935  return 0;
4936}
4937_ACEOF
4938for ac_lib in '' x; do
4939  if test -z "$ac_lib"; then
4940    ac_res="none required"
4941  else
4942    ac_res=-l$ac_lib
4943    LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
4944  fi
4945  if ac_fn_c_try_link "$LINENO"; then :
4946  ac_cv_search_opendir=$ac_res
4947fi
4948rm -f core conftest.err conftest.$ac_objext \
4949    conftest$ac_exeext
4950  if ${ac_cv_search_opendir+:} false; then :
4951  break
4952fi
4953done
4954if ${ac_cv_search_opendir+:} false; then :
4955
4956else
4957  ac_cv_search_opendir=no
4958fi
4959rm conftest.$ac_ext
4960LIBS=$ac_func_search_save_LIBS
4961fi
4962{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_opendir" >&5
4963$as_echo "$ac_cv_search_opendir" >&6; }
4964ac_res=$ac_cv_search_opendir
4965if test "$ac_res" != no; then :
4966  test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
4967
4968fi
4969
4970fi
4971
4972{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to call gettimeofday" >&5
4973$as_echo_n "checking how to call gettimeofday... " >&6; }
4974  if ${ac_cv_gettimeofday_args+:} false; then :
4975  $as_echo_n "(cached) " >&6
4976else
4977  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4978/* end confdefs.h.  */
4979#include <stdlib.h>
4980                    #include <sys/time.h>
4981int
4982main ()
4983{
4984struct timeval tv; struct timezone tzp;
4985                    gettimeofday(&tv, &tzp);
4986  ;
4987  return 0;
4988}
4989_ACEOF
4990if ac_fn_c_try_compile "$LINENO"; then :
4991  ac_gettimeofday_args=2
4992else
4993  ac_gettimeofday_args=1
4994fi
4995rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4996    ac_cv_gettimeofday_args=$ac_gettimeofday_args
4997fi
4998
4999  ac_gettimeofday_args=$ac_cv_gettimeofday_args
5000  if test "$ac_gettimeofday_args" = 1 ; then
5001    $as_echo "#define HAVE_GETTIMEOFDAY 1" >>confdefs.h
5002
5003    { $as_echo "$as_me:${as_lineno-$LINENO}: result: one argument" >&5
5004$as_echo "one argument" >&6; }
5005  elif test "$ac_gettimeofday_args" = 2 ; then
5006    $as_echo "#define HAVE_GETTIMEOFDAY 1" >>confdefs.h
5007
5008    $as_echo "#define GETTIMEOFDAY_TWO_ARGS 1" >>confdefs.h
5009
5010    { $as_echo "$as_me:${as_lineno-$LINENO}: result: two arguments" >&5
5011$as_echo "two arguments" >&6; }
5012  else
5013    { $as_echo "$as_me:${as_lineno-$LINENO}: result: unknown" >&5
5014$as_echo "unknown" >&6; }
5015  fi
5016
5017# Check whether --enable-largefile was given.
5018if test "${enable_largefile+set}" = set; then :
5019  enableval=$enable_largefile;
5020fi
5021
5022if test "$enable_largefile" != no; then
5023
5024  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for special C compiler options needed for large files" >&5
5025$as_echo_n "checking for special C compiler options needed for large files... " >&6; }
5026if ${ac_cv_sys_largefile_CC+:} false; then :
5027  $as_echo_n "(cached) " >&6
5028else
5029  ac_cv_sys_largefile_CC=no
5030     if test "$GCC" != yes; then
5031       ac_save_CC=$CC
5032       while :; do
5033	 # IRIX 6.2 and later do not support large files by default,
5034	 # so use the C compiler's -n32 option if that helps.
5035	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5036/* end confdefs.h.  */
5037#include <sys/types.h>
5038 /* Check that off_t can represent 2**63 - 1 correctly.
5039    We can't simply define LARGE_OFF_T to be 9223372036854775807,
5040    since some C++ compilers masquerading as C compilers
5041    incorrectly reject 9223372036854775807.  */
5042#define LARGE_OFF_T ((((off_t) 1 << 31) << 31) - 1 + (((off_t) 1 << 31) << 31))
5043  int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
5044		       && LARGE_OFF_T % 2147483647 == 1)
5045		      ? 1 : -1];
5046int
5047main ()
5048{
5049
5050  ;
5051  return 0;
5052}
5053_ACEOF
5054	 if ac_fn_c_try_compile "$LINENO"; then :
5055  break
5056fi
5057rm -f core conftest.err conftest.$ac_objext
5058	 CC="$CC -n32"
5059	 if ac_fn_c_try_compile "$LINENO"; then :
5060  ac_cv_sys_largefile_CC=' -n32'; break
5061fi
5062rm -f core conftest.err conftest.$ac_objext
5063	 break
5064       done
5065       CC=$ac_save_CC
5066       rm -f conftest.$ac_ext
5067    fi
5068fi
5069{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_largefile_CC" >&5
5070$as_echo "$ac_cv_sys_largefile_CC" >&6; }
5071  if test "$ac_cv_sys_largefile_CC" != no; then
5072    CC=$CC$ac_cv_sys_largefile_CC
5073  fi
5074
5075  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _FILE_OFFSET_BITS value needed for large files" >&5
5076$as_echo_n "checking for _FILE_OFFSET_BITS value needed for large files... " >&6; }
5077if ${ac_cv_sys_file_offset_bits+:} false; then :
5078  $as_echo_n "(cached) " >&6
5079else
5080  while :; do
5081  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5082/* end confdefs.h.  */
5083#include <sys/types.h>
5084 /* Check that off_t can represent 2**63 - 1 correctly.
5085    We can't simply define LARGE_OFF_T to be 9223372036854775807,
5086    since some C++ compilers masquerading as C compilers
5087    incorrectly reject 9223372036854775807.  */
5088#define LARGE_OFF_T ((((off_t) 1 << 31) << 31) - 1 + (((off_t) 1 << 31) << 31))
5089  int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
5090		       && LARGE_OFF_T % 2147483647 == 1)
5091		      ? 1 : -1];
5092int
5093main ()
5094{
5095
5096  ;
5097  return 0;
5098}
5099_ACEOF
5100if ac_fn_c_try_compile "$LINENO"; then :
5101  ac_cv_sys_file_offset_bits=no; break
5102fi
5103rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5104  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5105/* end confdefs.h.  */
5106#define _FILE_OFFSET_BITS 64
5107#include <sys/types.h>
5108 /* Check that off_t can represent 2**63 - 1 correctly.
5109    We can't simply define LARGE_OFF_T to be 9223372036854775807,
5110    since some C++ compilers masquerading as C compilers
5111    incorrectly reject 9223372036854775807.  */
5112#define LARGE_OFF_T ((((off_t) 1 << 31) << 31) - 1 + (((off_t) 1 << 31) << 31))
5113  int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
5114		       && LARGE_OFF_T % 2147483647 == 1)
5115		      ? 1 : -1];
5116int
5117main ()
5118{
5119
5120  ;
5121  return 0;
5122}
5123_ACEOF
5124if ac_fn_c_try_compile "$LINENO"; then :
5125  ac_cv_sys_file_offset_bits=64; break
5126fi
5127rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5128  ac_cv_sys_file_offset_bits=unknown
5129  break
5130done
5131fi
5132{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_file_offset_bits" >&5
5133$as_echo "$ac_cv_sys_file_offset_bits" >&6; }
5134case $ac_cv_sys_file_offset_bits in #(
5135  no | unknown) ;;
5136  *)
5137cat >>confdefs.h <<_ACEOF
5138#define _FILE_OFFSET_BITS $ac_cv_sys_file_offset_bits
5139_ACEOF
5140;;
5141esac
5142rm -rf conftest*
5143  if test $ac_cv_sys_file_offset_bits = unknown; then
5144    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _LARGE_FILES value needed for large files" >&5
5145$as_echo_n "checking for _LARGE_FILES value needed for large files... " >&6; }
5146if ${ac_cv_sys_large_files+:} false; then :
5147  $as_echo_n "(cached) " >&6
5148else
5149  while :; do
5150  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5151/* end confdefs.h.  */
5152#include <sys/types.h>
5153 /* Check that off_t can represent 2**63 - 1 correctly.
5154    We can't simply define LARGE_OFF_T to be 9223372036854775807,
5155    since some C++ compilers masquerading as C compilers
5156    incorrectly reject 9223372036854775807.  */
5157#define LARGE_OFF_T ((((off_t) 1 << 31) << 31) - 1 + (((off_t) 1 << 31) << 31))
5158  int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
5159		       && LARGE_OFF_T % 2147483647 == 1)
5160		      ? 1 : -1];
5161int
5162main ()
5163{
5164
5165  ;
5166  return 0;
5167}
5168_ACEOF
5169if ac_fn_c_try_compile "$LINENO"; then :
5170  ac_cv_sys_large_files=no; break
5171fi
5172rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5173  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5174/* end confdefs.h.  */
5175#define _LARGE_FILES 1
5176#include <sys/types.h>
5177 /* Check that off_t can represent 2**63 - 1 correctly.
5178    We can't simply define LARGE_OFF_T to be 9223372036854775807,
5179    since some C++ compilers masquerading as C compilers
5180    incorrectly reject 9223372036854775807.  */
5181#define LARGE_OFF_T ((((off_t) 1 << 31) << 31) - 1 + (((off_t) 1 << 31) << 31))
5182  int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
5183		       && LARGE_OFF_T % 2147483647 == 1)
5184		      ? 1 : -1];
5185int
5186main ()
5187{
5188
5189  ;
5190  return 0;
5191}
5192_ACEOF
5193if ac_fn_c_try_compile "$LINENO"; then :
5194  ac_cv_sys_large_files=1; break
5195fi
5196rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5197  ac_cv_sys_large_files=unknown
5198  break
5199done
5200fi
5201{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_large_files" >&5
5202$as_echo "$ac_cv_sys_large_files" >&6; }
5203case $ac_cv_sys_large_files in #(
5204  no | unknown) ;;
5205  *)
5206cat >>confdefs.h <<_ACEOF
5207#define _LARGE_FILES $ac_cv_sys_large_files
5208_ACEOF
5209;;
5210esac
5211rm -rf conftest*
5212  fi
5213
5214
5215fi
5216
5217for ac_func in select fcntl uname nice setpriority getcwd getwd putenv sbrk
5218do :
5219  as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
5220ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
5221if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
5222  cat >>confdefs.h <<_ACEOF
5223#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
5224_ACEOF
5225
5226fi
5227done
5228
5229for ac_func in sigaction syslog realpath setrlimit
5230do :
5231  as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
5232ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
5233if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
5234  cat >>confdefs.h <<_ACEOF
5235#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
5236_ACEOF
5237
5238fi
5239done
5240
5241for ac_func in setlocale sqrtf
5242do :
5243  as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
5244ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
5245if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
5246  cat >>confdefs.h <<_ACEOF
5247#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
5248_ACEOF
5249
5250fi
5251done
5252
5253for ac_func in getaddrinfo
5254do :
5255  ac_fn_c_check_func "$LINENO" "getaddrinfo" "ac_cv_func_getaddrinfo"
5256if test "x$ac_cv_func_getaddrinfo" = xyes; then :
5257  cat >>confdefs.h <<_ACEOF
5258#define HAVE_GETADDRINFO 1
5259_ACEOF
5260
5261fi
5262done
5263
5264ac_fn_c_check_member "$LINENO" "struct sockaddr" "sa_len" "ac_cv_member_struct_sockaddr_sa_len" "#include <sys/socket.h>
5265"
5266if test "x$ac_cv_member_struct_sockaddr_sa_len" = xyes; then :
5267
5268cat >>confdefs.h <<_ACEOF
5269#define HAVE_STRUCT_SOCKADDR_SA_LEN 1
5270_ACEOF
5271
5272
5273fi
5274
5275{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for struct icmp" >&5
5276$as_echo_n "checking for struct icmp... " >&6; }
5277if ${ac_cv_have_icmp+:} false; then :
5278  $as_echo_n "(cached) " >&6
5279else
5280  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5281/* end confdefs.h.  */
5282#include <stdlib.h>
5283                   #include <stdio.h>
5284                   #include <math.h>
5285                   #include <unistd.h>
5286                   #include <limits.h>
5287                   #include <signal.h>
5288                   #include <fcntl.h>
5289                   #include <sys/types.h>
5290                   #include <sys/time.h>
5291                   #include <sys/ipc.h>
5292                   #include <sys/shm.h>
5293                   #include <sys/socket.h>
5294                   #include <netinet/in_systm.h>
5295                   #include <netinet/in.h>
5296                   #include <netinet/ip.h>
5297                   #include <netinet/ip_icmp.h>
5298                   #include <netinet/udp.h>
5299                   #include <arpa/inet.h>
5300                   #include <netdb.h>
5301int
5302main ()
5303{
5304struct icmp i;
5305                   struct sockaddr s;
5306                   struct sockaddr_in si;
5307                   struct ip ip;
5308                   i.icmp_type = ICMP_ECHO;
5309                   i.icmp_code = 0;
5310                   i.icmp_cksum = 0;
5311                   i.icmp_id = 0;
5312                   i.icmp_seq = 0;
5313                   si.sin_family = AF_INET;
5314                   #if defined(__DECC) || defined(_IP_VHL)
5315                   ip.ip_vhl = 0;
5316                   #else
5317                   ip.ip_hl = 0;
5318                   #endif
5319
5320  ;
5321  return 0;
5322}
5323_ACEOF
5324if ac_fn_c_try_compile "$LINENO"; then :
5325  ac_cv_have_icmp=yes
5326else
5327  ac_cv_have_icmp=no
5328fi
5329rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5330fi
5331{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_icmp" >&5
5332$as_echo "$ac_cv_have_icmp" >&6; }
5333 if test "$ac_cv_have_icmp" = yes ; then
5334   $as_echo "#define HAVE_ICMP 1" >>confdefs.h
5335
5336 fi
5337{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for struct icmphdr" >&5
5338$as_echo_n "checking for struct icmphdr... " >&6; }
5339if ${ac_cv_have_icmphdr+:} false; then :
5340  $as_echo_n "(cached) " >&6
5341else
5342  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5343/* end confdefs.h.  */
5344#include <stdlib.h>
5345                   #include <stdio.h>
5346                   #include <math.h>
5347                   #include <unistd.h>
5348                   #include <limits.h>
5349                   #include <signal.h>
5350                   #include <fcntl.h>
5351                   #include <sys/types.h>
5352                   #include <sys/time.h>
5353                   #include <sys/ipc.h>
5354                   #include <sys/shm.h>
5355                   #include <sys/socket.h>
5356                   #include <netinet/in_systm.h>
5357                   #include <netinet/in.h>
5358                   #include <netinet/ip.h>
5359                   #include <netinet/ip_icmp.h>
5360                   #include <netinet/udp.h>
5361                   #include <arpa/inet.h>
5362                   #include <netdb.h>
5363int
5364main ()
5365{
5366struct icmphdr i;
5367                   struct sockaddr s;
5368                   struct sockaddr_in si;
5369                   struct ip ip;
5370                   i.type = ICMP_ECHO;
5371                   i.code = 0;
5372                   i.checksum = 0;
5373                   i.un.echo.id = 0;
5374                   i.un.echo.sequence = 0;
5375                   si.sin_family = AF_INET;
5376                   ip.ip_hl = 0;
5377  ;
5378  return 0;
5379}
5380_ACEOF
5381if ac_fn_c_try_compile "$LINENO"; then :
5382  ac_cv_have_icmphdr=yes
5383else
5384  ac_cv_have_icmphdr=no
5385fi
5386rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5387fi
5388{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_icmphdr" >&5
5389$as_echo "$ac_cv_have_icmphdr" >&6; }
5390 if test "$ac_cv_have_icmphdr" = yes ; then
5391   $as_echo "#define HAVE_ICMPHDR 1" >>confdefs.h
5392
5393 fi
5394{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for getifaddrs" >&5
5395$as_echo_n "checking for getifaddrs... " >&6; }
5396if ${ac_cv_have_getifaddrs+:} false; then :
5397  $as_echo_n "(cached) " >&6
5398else
5399  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5400/* end confdefs.h.  */
5401#include <stdlib.h>
5402                   #include <unistd.h>
5403                   #include <arpa/inet.h>
5404                   #include <ifaddrs.h>
5405int
5406main ()
5407{
5408struct ifaddrs *ifa;
5409                   getifaddrs (&ifa);
5410                   ifa->ifa_next = 0;
5411                   ifa->ifa_addr->sa_family = 0;
5412  ;
5413  return 0;
5414}
5415_ACEOF
5416if ac_fn_c_try_compile "$LINENO"; then :
5417  ac_cv_have_getifaddrs=yes
5418else
5419  ac_cv_have_getifaddrs=no
5420fi
5421rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5422fi
5423{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_getifaddrs" >&5
5424$as_echo "$ac_cv_have_getifaddrs" >&6; }
5425 if test "$ac_cv_have_getifaddrs" = yes ; then
5426   $as_echo "#define HAVE_GETIFADDRS 1" >>confdefs.h
5427
5428 fi
5429{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for socklen_t" >&5
5430$as_echo_n "checking for socklen_t... " >&6; }
5431if ${ac_cv_type_socklen_t+:} false; then :
5432  $as_echo_n "(cached) " >&6
5433else
5434  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5435/* end confdefs.h.  */
5436
5437      #include <sys/types.h>
5438      #include <sys/socket.h>
5439int
5440main ()
5441{
5442socklen_t socklen;
5443  ;
5444  return 0;
5445}
5446_ACEOF
5447if ac_fn_c_try_compile "$LINENO"; then :
5448  ac_cv_type_socklen_t=yes
5449else
5450  ac_cv_type_socklen_t=no
5451fi
5452rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5453fi
5454{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_socklen_t" >&5
5455$as_echo "$ac_cv_type_socklen_t" >&6; }
5456  if test "$ac_cv_type_socklen_t" != yes; then
5457
5458$as_echo "#define socklen_t int" >>confdefs.h
5459
5460  fi
5461for ac_header in crypt.h sys/select.h
5462do :
5463  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
5464ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
5465if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
5466  cat >>confdefs.h <<_ACEOF
5467#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
5468_ACEOF
5469
5470fi
5471
5472done
5473
5474for ac_prog in perl5 perl
5475do
5476  # Extract the first word of "$ac_prog", so it can be a program name with args.
5477set dummy $ac_prog; ac_word=$2
5478{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5479$as_echo_n "checking for $ac_word... " >&6; }
5480if ${ac_cv_path_PERL+:} false; then :
5481  $as_echo_n "(cached) " >&6
5482else
5483  case $PERL in
5484  [\\/]* | ?:[\\/]*)
5485  ac_cv_path_PERL="$PERL" # Let the user override the test with a path.
5486  ;;
5487  *)
5488  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5489for as_dir in $PATH
5490do
5491  IFS=$as_save_IFS
5492  test -z "$as_dir" && as_dir=.
5493    for ac_exec_ext in '' $ac_executable_extensions; do
5494  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5495    ac_cv_path_PERL="$as_dir/$ac_word$ac_exec_ext"
5496    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5497    break 2
5498  fi
5499done
5500  done
5501IFS=$as_save_IFS
5502
5503  ;;
5504esac
5505fi
5506PERL=$ac_cv_path_PERL
5507if test -n "$PERL"; then
5508  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PERL" >&5
5509$as_echo "$PERL" >&6; }
5510else
5511  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5512$as_echo "no" >&6; }
5513fi
5514
5515
5516  test -n "$PERL" && break
5517done
5518
5519  if test -z "$PERL" ; then
5520    PERL_VERSION=0
5521  else
5522    { $as_echo "$as_me:${as_lineno-$LINENO}: checking perl version" >&5
5523$as_echo_n "checking perl version... " >&6; }
5524if ${ac_cv_perl_version+:} false; then :
5525  $as_echo_n "(cached) " >&6
5526else
5527  ac_cv_perl_version=`$PERL -e "$perl_version_cmd"`
5528fi
5529{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_perl_version" >&5
5530$as_echo "$ac_cv_perl_version" >&6; }
5531    PERL_VERSION=$ac_cv_perl_version
5532  fi
5533
5534
5535if test -z "$PERL" ; then
5536  # don't let it be blank...
5537  PERL=/usr/bin/perl
5538fi
5539
5540{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for X" >&5
5541$as_echo_n "checking for X... " >&6; }
5542
5543
5544# Check whether --with-x was given.
5545if test "${with_x+set}" = set; then :
5546  withval=$with_x;
5547fi
5548
5549# $have_x is `yes', `no', `disabled', or empty when we do not yet know.
5550if test "x$with_x" = xno; then
5551  # The user explicitly disabled X.
5552  have_x=disabled
5553else
5554  case $x_includes,$x_libraries in #(
5555    *\'*) as_fn_error $? "cannot use X directory names containing '" "$LINENO" 5;; #(
5556    *,NONE | NONE,*) if ${ac_cv_have_x+:} false; then :
5557  $as_echo_n "(cached) " >&6
5558else
5559  # One or both of the vars are not set, and there is no cached value.
5560ac_x_includes=no ac_x_libraries=no
5561rm -f -r conftest.dir
5562if mkdir conftest.dir; then
5563  cd conftest.dir
5564  cat >Imakefile <<'_ACEOF'
5565incroot:
5566	@echo incroot='${INCROOT}'
5567usrlibdir:
5568	@echo usrlibdir='${USRLIBDIR}'
5569libdir:
5570	@echo libdir='${LIBDIR}'
5571_ACEOF
5572  if (export CC; ${XMKMF-xmkmf}) >/dev/null 2>/dev/null && test -f Makefile; then
5573    # GNU make sometimes prints "make[1]: Entering ...", which would confuse us.
5574    for ac_var in incroot usrlibdir libdir; do
5575      eval "ac_im_$ac_var=\`\${MAKE-make} $ac_var 2>/dev/null | sed -n 's/^$ac_var=//p'\`"
5576    done
5577    # Open Windows xmkmf reportedly sets LIBDIR instead of USRLIBDIR.
5578    for ac_extension in a so sl dylib la dll; do
5579      if test ! -f "$ac_im_usrlibdir/libX11.$ac_extension" &&
5580	 test -f "$ac_im_libdir/libX11.$ac_extension"; then
5581	ac_im_usrlibdir=$ac_im_libdir; break
5582      fi
5583    done
5584    # Screen out bogus values from the imake configuration.  They are
5585    # bogus both because they are the default anyway, and because
5586    # using them would break gcc on systems where it needs fixed includes.
5587    case $ac_im_incroot in
5588	/usr/include) ac_x_includes= ;;
5589	*) test -f "$ac_im_incroot/X11/Xos.h" && ac_x_includes=$ac_im_incroot;;
5590    esac
5591    case $ac_im_usrlibdir in
5592	/usr/lib | /usr/lib64 | /lib | /lib64) ;;
5593	*) test -d "$ac_im_usrlibdir" && ac_x_libraries=$ac_im_usrlibdir ;;
5594    esac
5595  fi
5596  cd ..
5597  rm -f -r conftest.dir
5598fi
5599
5600# Standard set of common directories for X headers.
5601# Check X11 before X11Rn because it is often a symlink to the current release.
5602ac_x_header_dirs='
5603/usr/X11/include
5604/usr/X11R7/include
5605/usr/X11R6/include
5606/usr/X11R5/include
5607/usr/X11R4/include
5608
5609/usr/include/X11
5610/usr/include/X11R7
5611/usr/include/X11R6
5612/usr/include/X11R5
5613/usr/include/X11R4
5614
5615/usr/local/X11/include
5616/usr/local/X11R7/include
5617/usr/local/X11R6/include
5618/usr/local/X11R5/include
5619/usr/local/X11R4/include
5620
5621/usr/local/include/X11
5622/usr/local/include/X11R7
5623/usr/local/include/X11R6
5624/usr/local/include/X11R5
5625/usr/local/include/X11R4
5626
5627/usr/X386/include
5628/usr/x386/include
5629/usr/XFree86/include/X11
5630
5631/usr/include
5632/usr/local/include
5633/usr/unsupported/include
5634/usr/athena/include
5635/usr/local/x11r5/include
5636/usr/lpp/Xamples/include
5637
5638/usr/openwin/include
5639/usr/openwin/share/include'
5640
5641if test "$ac_x_includes" = no; then
5642  # Guess where to find include files, by looking for Xlib.h.
5643  # First, try using that file with no special directory specified.
5644  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5645/* end confdefs.h.  */
5646#include <X11/Xlib.h>
5647_ACEOF
5648if ac_fn_c_try_cpp "$LINENO"; then :
5649  # We can compile using X headers with no special include directory.
5650ac_x_includes=
5651else
5652  for ac_dir in $ac_x_header_dirs; do
5653  if test -r "$ac_dir/X11/Xlib.h"; then
5654    ac_x_includes=$ac_dir
5655    break
5656  fi
5657done
5658fi
5659rm -f conftest.err conftest.i conftest.$ac_ext
5660fi # $ac_x_includes = no
5661
5662if test "$ac_x_libraries" = no; then
5663  # Check for the libraries.
5664  # See if we find them without any special options.
5665  # Don't add to $LIBS permanently.
5666  ac_save_LIBS=$LIBS
5667  LIBS="-lX11 $LIBS"
5668  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5669/* end confdefs.h.  */
5670#include <X11/Xlib.h>
5671int
5672main ()
5673{
5674XrmInitialize ()
5675  ;
5676  return 0;
5677}
5678_ACEOF
5679if ac_fn_c_try_link "$LINENO"; then :
5680  LIBS=$ac_save_LIBS
5681# We can link X programs with no special library path.
5682ac_x_libraries=
5683else
5684  LIBS=$ac_save_LIBS
5685for ac_dir in `$as_echo "$ac_x_includes $ac_x_header_dirs" | sed s/include/lib/g`
5686do
5687  # Don't even attempt the hair of trying to link an X program!
5688  for ac_extension in a so sl dylib la dll; do
5689    if test -r "$ac_dir/libX11.$ac_extension"; then
5690      ac_x_libraries=$ac_dir
5691      break 2
5692    fi
5693  done
5694done
5695fi
5696rm -f core conftest.err conftest.$ac_objext \
5697    conftest$ac_exeext conftest.$ac_ext
5698fi # $ac_x_libraries = no
5699
5700case $ac_x_includes,$ac_x_libraries in #(
5701  no,* | *,no | *\'*)
5702    # Didn't find X, or a directory has "'" in its name.
5703    ac_cv_have_x="have_x=no";; #(
5704  *)
5705    # Record where we found X for the cache.
5706    ac_cv_have_x="have_x=yes\
5707	ac_x_includes='$ac_x_includes'\
5708	ac_x_libraries='$ac_x_libraries'"
5709esac
5710fi
5711;; #(
5712    *) have_x=yes;;
5713  esac
5714  eval "$ac_cv_have_x"
5715fi # $with_x != no
5716
5717if test "$have_x" != yes; then
5718  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_x" >&5
5719$as_echo "$have_x" >&6; }
5720  no_x=yes
5721else
5722  # If each of the values was on the command line, it overrides each guess.
5723  test "x$x_includes" = xNONE && x_includes=$ac_x_includes
5724  test "x$x_libraries" = xNONE && x_libraries=$ac_x_libraries
5725  # Update the cache value to reflect the command line values.
5726  ac_cv_have_x="have_x=yes\
5727	ac_x_includes='$x_includes'\
5728	ac_x_libraries='$x_libraries'"
5729  { $as_echo "$as_me:${as_lineno-$LINENO}: result: libraries $x_libraries, headers $x_includes" >&5
5730$as_echo "libraries $x_libraries, headers $x_includes" >&6; }
5731fi
5732
5733if test "$no_x" = yes; then
5734  # Not all programs may use this symbol, but it does not hurt to define it.
5735
5736$as_echo "#define X_DISPLAY_MISSING 1" >>confdefs.h
5737
5738  X_CFLAGS= X_PRE_LIBS= X_LIBS= X_EXTRA_LIBS=
5739else
5740  if test -n "$x_includes"; then
5741    X_CFLAGS="$X_CFLAGS -I$x_includes"
5742  fi
5743
5744  # It would also be nice to do this for all -L options, not just this one.
5745  if test -n "$x_libraries"; then
5746    X_LIBS="$X_LIBS -L$x_libraries"
5747    # For Solaris; some versions of Sun CC require a space after -R and
5748    # others require no space.  Words are not sufficient . . . .
5749    { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether -R must be followed by a space" >&5
5750$as_echo_n "checking whether -R must be followed by a space... " >&6; }
5751    ac_xsave_LIBS=$LIBS; LIBS="$LIBS -R$x_libraries"
5752    ac_xsave_c_werror_flag=$ac_c_werror_flag
5753    ac_c_werror_flag=yes
5754    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5755/* end confdefs.h.  */
5756
5757int
5758main ()
5759{
5760
5761  ;
5762  return 0;
5763}
5764_ACEOF
5765if ac_fn_c_try_link "$LINENO"; then :
5766  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5767$as_echo "no" >&6; }
5768       X_LIBS="$X_LIBS -R$x_libraries"
5769else
5770  LIBS="$ac_xsave_LIBS -R $x_libraries"
5771       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5772/* end confdefs.h.  */
5773
5774int
5775main ()
5776{
5777
5778  ;
5779  return 0;
5780}
5781_ACEOF
5782if ac_fn_c_try_link "$LINENO"; then :
5783  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5784$as_echo "yes" >&6; }
5785	  X_LIBS="$X_LIBS -R $x_libraries"
5786else
5787  { $as_echo "$as_me:${as_lineno-$LINENO}: result: neither works" >&5
5788$as_echo "neither works" >&6; }
5789fi
5790rm -f core conftest.err conftest.$ac_objext \
5791    conftest$ac_exeext conftest.$ac_ext
5792fi
5793rm -f core conftest.err conftest.$ac_objext \
5794    conftest$ac_exeext conftest.$ac_ext
5795    ac_c_werror_flag=$ac_xsave_c_werror_flag
5796    LIBS=$ac_xsave_LIBS
5797  fi
5798
5799  # Check for system-dependent libraries X programs must link with.
5800  # Do this before checking for the system-independent R6 libraries
5801  # (-lICE), since we may need -lsocket or whatever for X linking.
5802
5803  if test "$ISC" = yes; then
5804    X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl_s -linet"
5805  else
5806    # Martyn Johnson says this is needed for Ultrix, if the X
5807    # libraries were built with DECnet support.  And Karl Berry says
5808    # the Alpha needs dnet_stub (dnet does not exist).
5809    ac_xsave_LIBS="$LIBS"; LIBS="$LIBS $X_LIBS -lX11"
5810    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5811/* end confdefs.h.  */
5812
5813/* Override any GCC internal prototype to avoid an error.
5814   Use char because int might match the return type of a GCC
5815   builtin and then its argument prototype would still apply.  */
5816#ifdef __cplusplus
5817extern "C"
5818#endif
5819char XOpenDisplay ();
5820int
5821main ()
5822{
5823return XOpenDisplay ();
5824  ;
5825  return 0;
5826}
5827_ACEOF
5828if ac_fn_c_try_link "$LINENO"; then :
5829
5830else
5831  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dnet_ntoa in -ldnet" >&5
5832$as_echo_n "checking for dnet_ntoa in -ldnet... " >&6; }
5833if ${ac_cv_lib_dnet_dnet_ntoa+:} false; then :
5834  $as_echo_n "(cached) " >&6
5835else
5836  ac_check_lib_save_LIBS=$LIBS
5837LIBS="-ldnet  $LIBS"
5838cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5839/* end confdefs.h.  */
5840
5841/* Override any GCC internal prototype to avoid an error.
5842   Use char because int might match the return type of a GCC
5843   builtin and then its argument prototype would still apply.  */
5844#ifdef __cplusplus
5845extern "C"
5846#endif
5847char dnet_ntoa ();
5848int
5849main ()
5850{
5851return dnet_ntoa ();
5852  ;
5853  return 0;
5854}
5855_ACEOF
5856if ac_fn_c_try_link "$LINENO"; then :
5857  ac_cv_lib_dnet_dnet_ntoa=yes
5858else
5859  ac_cv_lib_dnet_dnet_ntoa=no
5860fi
5861rm -f core conftest.err conftest.$ac_objext \
5862    conftest$ac_exeext conftest.$ac_ext
5863LIBS=$ac_check_lib_save_LIBS
5864fi
5865{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dnet_dnet_ntoa" >&5
5866$as_echo "$ac_cv_lib_dnet_dnet_ntoa" >&6; }
5867if test "x$ac_cv_lib_dnet_dnet_ntoa" = xyes; then :
5868  X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet"
5869fi
5870
5871    if test $ac_cv_lib_dnet_dnet_ntoa = no; then
5872      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dnet_ntoa in -ldnet_stub" >&5
5873$as_echo_n "checking for dnet_ntoa in -ldnet_stub... " >&6; }
5874if ${ac_cv_lib_dnet_stub_dnet_ntoa+:} false; then :
5875  $as_echo_n "(cached) " >&6
5876else
5877  ac_check_lib_save_LIBS=$LIBS
5878LIBS="-ldnet_stub  $LIBS"
5879cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5880/* end confdefs.h.  */
5881
5882/* Override any GCC internal prototype to avoid an error.
5883   Use char because int might match the return type of a GCC
5884   builtin and then its argument prototype would still apply.  */
5885#ifdef __cplusplus
5886extern "C"
5887#endif
5888char dnet_ntoa ();
5889int
5890main ()
5891{
5892return dnet_ntoa ();
5893  ;
5894  return 0;
5895}
5896_ACEOF
5897if ac_fn_c_try_link "$LINENO"; then :
5898  ac_cv_lib_dnet_stub_dnet_ntoa=yes
5899else
5900  ac_cv_lib_dnet_stub_dnet_ntoa=no
5901fi
5902rm -f core conftest.err conftest.$ac_objext \
5903    conftest$ac_exeext conftest.$ac_ext
5904LIBS=$ac_check_lib_save_LIBS
5905fi
5906{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dnet_stub_dnet_ntoa" >&5
5907$as_echo "$ac_cv_lib_dnet_stub_dnet_ntoa" >&6; }
5908if test "x$ac_cv_lib_dnet_stub_dnet_ntoa" = xyes; then :
5909  X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet_stub"
5910fi
5911
5912    fi
5913fi
5914rm -f core conftest.err conftest.$ac_objext \
5915    conftest$ac_exeext conftest.$ac_ext
5916    LIBS="$ac_xsave_LIBS"
5917
5918    # msh@cis.ufl.edu says -lnsl (and -lsocket) are needed for his 386/AT,
5919    # to get the SysV transport functions.
5920    # Chad R. Larson says the Pyramis MIS-ES running DC/OSx (SVR4)
5921    # needs -lnsl.
5922    # The nsl library prevents programs from opening the X display
5923    # on Irix 5.2, according to T.E. Dickey.
5924    # The functions gethostbyname, getservbyname, and inet_addr are
5925    # in -lbsd on LynxOS 3.0.1/i386, according to Lars Hecking.
5926    ac_fn_c_check_func "$LINENO" "gethostbyname" "ac_cv_func_gethostbyname"
5927if test "x$ac_cv_func_gethostbyname" = xyes; then :
5928
5929fi
5930
5931    if test $ac_cv_func_gethostbyname = no; then
5932      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gethostbyname in -lnsl" >&5
5933$as_echo_n "checking for gethostbyname in -lnsl... " >&6; }
5934if ${ac_cv_lib_nsl_gethostbyname+:} false; then :
5935  $as_echo_n "(cached) " >&6
5936else
5937  ac_check_lib_save_LIBS=$LIBS
5938LIBS="-lnsl  $LIBS"
5939cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5940/* end confdefs.h.  */
5941
5942/* Override any GCC internal prototype to avoid an error.
5943   Use char because int might match the return type of a GCC
5944   builtin and then its argument prototype would still apply.  */
5945#ifdef __cplusplus
5946extern "C"
5947#endif
5948char gethostbyname ();
5949int
5950main ()
5951{
5952return gethostbyname ();
5953  ;
5954  return 0;
5955}
5956_ACEOF
5957if ac_fn_c_try_link "$LINENO"; then :
5958  ac_cv_lib_nsl_gethostbyname=yes
5959else
5960  ac_cv_lib_nsl_gethostbyname=no
5961fi
5962rm -f core conftest.err conftest.$ac_objext \
5963    conftest$ac_exeext conftest.$ac_ext
5964LIBS=$ac_check_lib_save_LIBS
5965fi
5966{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_nsl_gethostbyname" >&5
5967$as_echo "$ac_cv_lib_nsl_gethostbyname" >&6; }
5968if test "x$ac_cv_lib_nsl_gethostbyname" = xyes; then :
5969  X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl"
5970fi
5971
5972      if test $ac_cv_lib_nsl_gethostbyname = no; then
5973	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for gethostbyname in -lbsd" >&5
5974$as_echo_n "checking for gethostbyname in -lbsd... " >&6; }
5975if ${ac_cv_lib_bsd_gethostbyname+:} false; then :
5976  $as_echo_n "(cached) " >&6
5977else
5978  ac_check_lib_save_LIBS=$LIBS
5979LIBS="-lbsd  $LIBS"
5980cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5981/* end confdefs.h.  */
5982
5983/* Override any GCC internal prototype to avoid an error.
5984   Use char because int might match the return type of a GCC
5985   builtin and then its argument prototype would still apply.  */
5986#ifdef __cplusplus
5987extern "C"
5988#endif
5989char gethostbyname ();
5990int
5991main ()
5992{
5993return gethostbyname ();
5994  ;
5995  return 0;
5996}
5997_ACEOF
5998if ac_fn_c_try_link "$LINENO"; then :
5999  ac_cv_lib_bsd_gethostbyname=yes
6000else
6001  ac_cv_lib_bsd_gethostbyname=no
6002fi
6003rm -f core conftest.err conftest.$ac_objext \
6004    conftest$ac_exeext conftest.$ac_ext
6005LIBS=$ac_check_lib_save_LIBS
6006fi
6007{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_gethostbyname" >&5
6008$as_echo "$ac_cv_lib_bsd_gethostbyname" >&6; }
6009if test "x$ac_cv_lib_bsd_gethostbyname" = xyes; then :
6010  X_EXTRA_LIBS="$X_EXTRA_LIBS -lbsd"
6011fi
6012
6013      fi
6014    fi
6015
6016    # lieder@skyler.mavd.honeywell.com says without -lsocket,
6017    # socket/setsockopt and other routines are undefined under SCO ODT
6018    # 2.0.  But -lsocket is broken on IRIX 5.2 (and is not necessary
6019    # on later versions), says Simon Leinen: it contains gethostby*
6020    # variants that don't use the name server (or something).  -lsocket
6021    # must be given before -lnsl if both are needed.  We assume that
6022    # if connect needs -lnsl, so does gethostbyname.
6023    ac_fn_c_check_func "$LINENO" "connect" "ac_cv_func_connect"
6024if test "x$ac_cv_func_connect" = xyes; then :
6025
6026fi
6027
6028    if test $ac_cv_func_connect = no; then
6029      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for connect in -lsocket" >&5
6030$as_echo_n "checking for connect in -lsocket... " >&6; }
6031if ${ac_cv_lib_socket_connect+:} false; then :
6032  $as_echo_n "(cached) " >&6
6033else
6034  ac_check_lib_save_LIBS=$LIBS
6035LIBS="-lsocket $X_EXTRA_LIBS $LIBS"
6036cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6037/* end confdefs.h.  */
6038
6039/* Override any GCC internal prototype to avoid an error.
6040   Use char because int might match the return type of a GCC
6041   builtin and then its argument prototype would still apply.  */
6042#ifdef __cplusplus
6043extern "C"
6044#endif
6045char connect ();
6046int
6047main ()
6048{
6049return connect ();
6050  ;
6051  return 0;
6052}
6053_ACEOF
6054if ac_fn_c_try_link "$LINENO"; then :
6055  ac_cv_lib_socket_connect=yes
6056else
6057  ac_cv_lib_socket_connect=no
6058fi
6059rm -f core conftest.err conftest.$ac_objext \
6060    conftest$ac_exeext conftest.$ac_ext
6061LIBS=$ac_check_lib_save_LIBS
6062fi
6063{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_socket_connect" >&5
6064$as_echo "$ac_cv_lib_socket_connect" >&6; }
6065if test "x$ac_cv_lib_socket_connect" = xyes; then :
6066  X_EXTRA_LIBS="-lsocket $X_EXTRA_LIBS"
6067fi
6068
6069    fi
6070
6071    # Guillermo Gomez says -lposix is necessary on A/UX.
6072    ac_fn_c_check_func "$LINENO" "remove" "ac_cv_func_remove"
6073if test "x$ac_cv_func_remove" = xyes; then :
6074
6075fi
6076
6077    if test $ac_cv_func_remove = no; then
6078      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for remove in -lposix" >&5
6079$as_echo_n "checking for remove in -lposix... " >&6; }
6080if ${ac_cv_lib_posix_remove+:} false; then :
6081  $as_echo_n "(cached) " >&6
6082else
6083  ac_check_lib_save_LIBS=$LIBS
6084LIBS="-lposix  $LIBS"
6085cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6086/* end confdefs.h.  */
6087
6088/* Override any GCC internal prototype to avoid an error.
6089   Use char because int might match the return type of a GCC
6090   builtin and then its argument prototype would still apply.  */
6091#ifdef __cplusplus
6092extern "C"
6093#endif
6094char remove ();
6095int
6096main ()
6097{
6098return remove ();
6099  ;
6100  return 0;
6101}
6102_ACEOF
6103if ac_fn_c_try_link "$LINENO"; then :
6104  ac_cv_lib_posix_remove=yes
6105else
6106  ac_cv_lib_posix_remove=no
6107fi
6108rm -f core conftest.err conftest.$ac_objext \
6109    conftest$ac_exeext conftest.$ac_ext
6110LIBS=$ac_check_lib_save_LIBS
6111fi
6112{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_posix_remove" >&5
6113$as_echo "$ac_cv_lib_posix_remove" >&6; }
6114if test "x$ac_cv_lib_posix_remove" = xyes; then :
6115  X_EXTRA_LIBS="$X_EXTRA_LIBS -lposix"
6116fi
6117
6118    fi
6119
6120    # BSDI BSD/OS 2.1 needs -lipc for XOpenDisplay.
6121    ac_fn_c_check_func "$LINENO" "shmat" "ac_cv_func_shmat"
6122if test "x$ac_cv_func_shmat" = xyes; then :
6123
6124fi
6125
6126    if test $ac_cv_func_shmat = no; then
6127      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for shmat in -lipc" >&5
6128$as_echo_n "checking for shmat in -lipc... " >&6; }
6129if ${ac_cv_lib_ipc_shmat+:} false; then :
6130  $as_echo_n "(cached) " >&6
6131else
6132  ac_check_lib_save_LIBS=$LIBS
6133LIBS="-lipc  $LIBS"
6134cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6135/* end confdefs.h.  */
6136
6137/* Override any GCC internal prototype to avoid an error.
6138   Use char because int might match the return type of a GCC
6139   builtin and then its argument prototype would still apply.  */
6140#ifdef __cplusplus
6141extern "C"
6142#endif
6143char shmat ();
6144int
6145main ()
6146{
6147return shmat ();
6148  ;
6149  return 0;
6150}
6151_ACEOF
6152if ac_fn_c_try_link "$LINENO"; then :
6153  ac_cv_lib_ipc_shmat=yes
6154else
6155  ac_cv_lib_ipc_shmat=no
6156fi
6157rm -f core conftest.err conftest.$ac_objext \
6158    conftest$ac_exeext conftest.$ac_ext
6159LIBS=$ac_check_lib_save_LIBS
6160fi
6161{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ipc_shmat" >&5
6162$as_echo "$ac_cv_lib_ipc_shmat" >&6; }
6163if test "x$ac_cv_lib_ipc_shmat" = xyes; then :
6164  X_EXTRA_LIBS="$X_EXTRA_LIBS -lipc"
6165fi
6166
6167    fi
6168  fi
6169
6170  # Check for libraries that X11R6 Xt/Xaw programs need.
6171  ac_save_LDFLAGS=$LDFLAGS
6172  test -n "$x_libraries" && LDFLAGS="$LDFLAGS -L$x_libraries"
6173  # SM needs ICE to (dynamically) link under SunOS 4.x (so we have to
6174  # check for ICE first), but we must link in the order -lSM -lICE or
6175  # we get undefined symbols.  So assume we have SM if we have ICE.
6176  # These have to be linked with before -lX11, unlike the other
6177  # libraries we check for below, so use a different variable.
6178  # John Interrante, Karl Berry
6179  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for IceConnectionNumber in -lICE" >&5
6180$as_echo_n "checking for IceConnectionNumber in -lICE... " >&6; }
6181if ${ac_cv_lib_ICE_IceConnectionNumber+:} false; then :
6182  $as_echo_n "(cached) " >&6
6183else
6184  ac_check_lib_save_LIBS=$LIBS
6185LIBS="-lICE $X_EXTRA_LIBS $LIBS"
6186cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6187/* end confdefs.h.  */
6188
6189/* Override any GCC internal prototype to avoid an error.
6190   Use char because int might match the return type of a GCC
6191   builtin and then its argument prototype would still apply.  */
6192#ifdef __cplusplus
6193extern "C"
6194#endif
6195char IceConnectionNumber ();
6196int
6197main ()
6198{
6199return IceConnectionNumber ();
6200  ;
6201  return 0;
6202}
6203_ACEOF
6204if ac_fn_c_try_link "$LINENO"; then :
6205  ac_cv_lib_ICE_IceConnectionNumber=yes
6206else
6207  ac_cv_lib_ICE_IceConnectionNumber=no
6208fi
6209rm -f core conftest.err conftest.$ac_objext \
6210    conftest$ac_exeext conftest.$ac_ext
6211LIBS=$ac_check_lib_save_LIBS
6212fi
6213{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ICE_IceConnectionNumber" >&5
6214$as_echo "$ac_cv_lib_ICE_IceConnectionNumber" >&6; }
6215if test "x$ac_cv_lib_ICE_IceConnectionNumber" = xyes; then :
6216  X_PRE_LIBS="$X_PRE_LIBS -lSM -lICE"
6217fi
6218
6219  LDFLAGS=$ac_save_LDFLAGS
6220
6221fi
6222
6223
6224if test "$have_x" != yes; then
6225  as_fn_error $? "Couldn't find X11 headers/libs.  Try \`$0 --help'." "$LINENO" 5
6226fi
6227
6228case "$host" in
6229    *-hpux*)
6230
6231      # The following arcana was gleaned from conversations with
6232      # Eric Schwartz <erics@col.hp.com>:
6233      #
6234      # On HPUX 10.x, the parts of X that HP considers "standard" live in
6235      # /usr/{include,lib}/X11R6/.  The parts that HP doesn't consider
6236      # "standard", notably, Xaw and Xmu, live in /usr/contrib/X11R6/.
6237      # Yet /usr/contrib/X11R6/ comes preinstalled on all HPUX systems.
6238      # Also, there are symlinks from /usr/include/ and /usr/lib/ into
6239      # /usr/{include,lib}/X11R6/, so that (if you don't use Xmu at all)
6240      # you don't need any -I or -L arguments.
6241      #
6242      # On HPUX 9.x, /usr/{include,lib}/X11R5/ and /usr/contrib/X11R5/
6243      # are the same division as 10.x.  However, there are no symlinks to
6244      # the X stuff from /usr/include/ and /usr/lib/, so -I and -L
6245      # arguments are always necessary.
6246      #
6247      # However, X11R6 was available on HPUX 9.x as a patch: if that
6248      # patch was installed, then all of X11R6 went in to
6249      # /usr/contrib/X11R6/ (there was no /usr/{include,lib}/X11R6/.)
6250      #
6251      # HPUX 8.x was the same as 9.x, but was X11R4 instead (I don't know
6252      # whether R5 was available as a patch; R6 undoubtedly was not.)
6253      #
6254      # So.  We try and use the highest numbered pair of
6255      # /usr/{include,lib}/X11R?/ and /usr/contrib/X11R?/{include,lib}/
6256      # that are available.  We do not mix and match different versions
6257      # of X.
6258      #
6259      # Question I still don't know the answer to: (do you?)
6260      #
6261      #   * On HPUX 9.x, where /usr/include/X11R5/ was standard, and
6262      #     /usr/contrib/X11R6/ could be installed as a patch, what was in
6263      #     that contrib directory?  Did it contain so-called "standard"
6264      #     X11R6, or did it include Xaw and Xmu as well?  If the former,
6265      #     where did one find Xaw and Xmu on 9.x R6 systems?  Would this
6266      #     be a situation where one had to reach into the R5 headers and
6267      #     libs to find Xmu?  That is, must both R6 and R5 directories
6268      #     be on the -I and -L lists in that case?
6269      #
6270      for version in X11R6 X11R5 X11R4 ; do
6271        # if either pair of directories exists...
6272        if test -d /usr/include/$version || test -d /usr/contrib/$version/include
6273        then
6274           # if contrib exists, use it...
6275           if test -d /usr/contrib/$version/include ; then
6276             X_CFLAGS="$X_CFLAGS -I/usr/contrib/$version/include"
6277             X_LIBS="$X_LIBS -L/usr/contrib/$version/lib"
6278           fi
6279           # if the "standard" one exists, use it.
6280           if test -d /usr/include/$version ; then
6281             X_CFLAGS="$X_CFLAGS -I/usr/include/$version"
6282             X_LIBS="$X_LIBS -L/usr/lib/$version"
6283           fi
6284           # since at least one of the pair exists, go no farther.
6285           break
6286        fi
6287      done
6288
6289      # Now find Motif.  Thanks for not making xmkmf find this by
6290      # default, you losers.
6291      #
6292      if test -d /usr/include/Motif2.1 ; then
6293        X_CFLAGS="$X_CFLAGS -I/usr/include/Motif2.1"
6294        X_LIBS="$X_LIBS -L/usr/lib/Motif2.1"
6295      elif test -d /usr/include/Motif1.2 ; then
6296        X_CFLAGS="$X_CFLAGS -I/usr/include/Motif1.2"
6297        X_LIBS="$X_LIBS -L/usr/lib/Motif1.2"
6298      elif test -d /usr/include/Motif1.1 ; then
6299        X_CFLAGS="$X_CFLAGS -I/usr/include/Motif1.1"
6300        X_LIBS="$X_LIBS -L/usr/lib/Motif1.1"
6301      fi
6302
6303      # Now let's check for the pseudo-standard locations for OpenGL.
6304      #
6305      if test -d /opt/graphics/OpenGL/include ; then
6306        # HP-UX 10.20 puts it here
6307        X_CFLAGS="-I/opt/graphics/OpenGL/include $X_CFLAGS"
6308        X_LIBS="-L/opt/graphics/OpenGL/lib $X_LIBS"
6309      elif test -d /opt/Mesa/lib ; then
6310        X_CFLAGS="-I/opt/Mesa/include $X_CFLAGS"
6311        X_LIBS="-L/opt/Mesa/lib $X_LIBS"
6312      fi
6313
6314
6315      # On HPUX, default to installing in /opt/xscreensaver/ instead of
6316      # in /usr/local/, unless there is already an xscreensaver in
6317      # /usr/local/bin/.  This can be overridden with the --prefix arg
6318      # to configure.  I'm not sure this is the right thing to do, but
6319      # Richard Lloyd says so...
6320      #
6321      if test \! -x /usr/local/bin/xscreensaver ; then
6322        ac_default_prefix=/opt/xscreensaver
6323      fi
6324
6325    ;;
6326    *-solaris*)
6327
6328      # Thanks for not making xmkmf find this by default, pinheads.
6329      # And thanks for moving things around again, too.  Is this
6330      # really the standard location now?  What happened to the
6331      # joke that this kind of thing went in /opt?
6332      # cthomp says "answer: CDE (Common Disorganized Environment)"
6333      #
6334      if test -f /usr/dt/include/Xm/Xm.h ; then
6335        X_CFLAGS="$X_CFLAGS -I/usr/dt/include"
6336        MOTIF_LIBS="$MOTIF_LIBS -L/usr/dt/lib -R/usr/dt/lib"
6337
6338        # Some versions of Slowlaris Motif require -lgen.  But not all.  Why?
6339        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for regcmp in -lgen" >&5
6340$as_echo_n "checking for regcmp in -lgen... " >&6; }
6341if ${ac_cv_lib_gen_regcmp+:} false; then :
6342  $as_echo_n "(cached) " >&6
6343else
6344  ac_check_lib_save_LIBS=$LIBS
6345LIBS="-lgen  $LIBS"
6346cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6347/* end confdefs.h.  */
6348
6349/* Override any GCC internal prototype to avoid an error.
6350   Use char because int might match the return type of a GCC
6351   builtin and then its argument prototype would still apply.  */
6352#ifdef __cplusplus
6353extern "C"
6354#endif
6355char regcmp ();
6356int
6357main ()
6358{
6359return regcmp ();
6360  ;
6361  return 0;
6362}
6363_ACEOF
6364if ac_fn_c_try_link "$LINENO"; then :
6365  ac_cv_lib_gen_regcmp=yes
6366else
6367  ac_cv_lib_gen_regcmp=no
6368fi
6369rm -f core conftest.err conftest.$ac_objext \
6370    conftest$ac_exeext conftest.$ac_ext
6371LIBS=$ac_check_lib_save_LIBS
6372fi
6373{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_gen_regcmp" >&5
6374$as_echo "$ac_cv_lib_gen_regcmp" >&6; }
6375if test "x$ac_cv_lib_gen_regcmp" = xyes; then :
6376  MOTIF_LIBS="$MOTIF_LIBS -lgen"
6377fi
6378
6379      fi
6380
6381    ;;
6382    *-darwin*)
6383
6384      # MacPorts on macOS
6385      if test -d /opt/local/include ; then
6386        X_CFLAGS="-I/opt/local/include $X_CFLAGS"
6387          X_LIBS="-L/opt/local/lib $X_LIBS"
6388      fi
6389
6390      # Fink on macOS
6391      if test -d /sw/include ; then
6392        X_CFLAGS="-I/sw/include $X_CFLAGS"
6393          X_LIBS="-L/sw/lib $X_LIBS"
6394      fi
6395
6396      # Homebrew on macOS Intel
6397      if test -d /usr/local/include ; then
6398        X_CFLAGS="-I/usr/local/include $X_CFLAGS"
6399          X_LIBS="-L/usr/local/lib $X_LIBS"
6400      fi
6401
6402      # Homebrew on macOS ARM
6403      if test -d /opt/homebrew/include ; then
6404        X_CFLAGS="-I/opt/homebrew/include $X_CFLAGS"
6405          X_LIBS="-L/opt/homebrew/lib $X_LIBS"
6406      fi
6407    ;;
6408  esac
6409{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for XPointer" >&5
6410$as_echo_n "checking for XPointer... " >&6; }
6411if ${ac_cv_xpointer+:} false; then :
6412  $as_echo_n "(cached) " >&6
6413else
6414
6415  ac_save_CPPFLAGS="$CPPFLAGS"
6416  if test \! -z "$includedir" ; then
6417    CPPFLAGS="$CPPFLAGS -I$includedir"
6418  fi
6419  CPPFLAGS="$CPPFLAGS $X_CFLAGS"
6420  CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
6421  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6422/* end confdefs.h.  */
6423#include <X11/Xlib.h>
6424int
6425main ()
6426{
6427XPointer foo = (XPointer) 0;
6428  ;
6429  return 0;
6430}
6431_ACEOF
6432if ac_fn_c_try_compile "$LINENO"; then :
6433  ac_cv_xpointer=yes
6434else
6435  ac_cv_xpointer=no
6436fi
6437rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6438  CPPFLAGS="$ac_save_CPPFLAGS"
6439fi
6440{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_xpointer" >&5
6441$as_echo "$ac_cv_xpointer" >&6; }
6442  if test "$ac_cv_xpointer" != yes; then
6443   $as_echo "#define XPointer char*" >>confdefs.h
6444
6445  fi
6446{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for Xt" >&5
6447$as_echo_n "checking for Xt... " >&6; }
6448if ${ac_cv_libxt+:} false; then :
6449  $as_echo_n "(cached) " >&6
6450else
6451
6452  ac_save_CPPFLAGS="$CPPFLAGS"
6453  if test \! -z "$includedir" ; then
6454    CPPFLAGS="$CPPFLAGS -I$includedir"
6455  fi
6456  CPPFLAGS="$CPPFLAGS $X_CFLAGS"
6457  CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
6458  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6459/* end confdefs.h.  */
6460#include <X11/Xlib.h>
6461                                    #include <X11/Intrinsic.h>
6462int
6463main ()
6464{
6465Widget foo = (Widget) 0;
6466  ;
6467  return 0;
6468}
6469_ACEOF
6470if ac_fn_c_try_compile "$LINENO"; then :
6471  ac_cv_libxt=yes
6472else
6473  ac_cv_libxt=no
6474fi
6475rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6476  CPPFLAGS="$ac_save_CPPFLAGS"
6477fi
6478{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_libxt" >&5
6479$as_echo "$ac_cv_libxt" >&6; }
6480
6481
6482{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether this is macOS" >&5
6483$as_echo_n "checking whether this is macOS... " >&6; }
6484  ac_macosx=no
6485  ac_irix=no
6486  case "$host" in
6487    *-apple-darwin* )
6488      ac_macosx=yes
6489    ;;
6490    *-irix* )
6491      ac_irix=yes
6492    ;;
6493  esac
6494{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_macosx" >&5
6495$as_echo "$ac_macosx" >&6; }
6496
6497
6498###############################################################################
6499#
6500#       pkg-config
6501#
6502###############################################################################
6503
6504if test -n "$ac_tool_prefix"; then
6505  # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
6506set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
6507{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6508$as_echo_n "checking for $ac_word... " >&6; }
6509if ${ac_cv_path_pkg_config+:} false; then :
6510  $as_echo_n "(cached) " >&6
6511else
6512  case $pkg_config in
6513  [\\/]* | ?:[\\/]*)
6514  ac_cv_path_pkg_config="$pkg_config" # Let the user override the test with a path.
6515  ;;
6516  *)
6517  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6518for as_dir in $PATH
6519do
6520  IFS=$as_save_IFS
6521  test -z "$as_dir" && as_dir=.
6522    for ac_exec_ext in '' $ac_executable_extensions; do
6523  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6524    ac_cv_path_pkg_config="$as_dir/$ac_word$ac_exec_ext"
6525    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6526    break 2
6527  fi
6528done
6529  done
6530IFS=$as_save_IFS
6531
6532  ;;
6533esac
6534fi
6535pkg_config=$ac_cv_path_pkg_config
6536if test -n "$pkg_config"; then
6537  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pkg_config" >&5
6538$as_echo "$pkg_config" >&6; }
6539else
6540  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6541$as_echo "no" >&6; }
6542fi
6543
6544
6545fi
6546if test -z "$ac_cv_path_pkg_config"; then
6547  ac_pt_pkg_config=$pkg_config
6548  # Extract the first word of "pkg-config", so it can be a program name with args.
6549set dummy pkg-config; ac_word=$2
6550{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6551$as_echo_n "checking for $ac_word... " >&6; }
6552if ${ac_cv_path_ac_pt_pkg_config+:} false; then :
6553  $as_echo_n "(cached) " >&6
6554else
6555  case $ac_pt_pkg_config in
6556  [\\/]* | ?:[\\/]*)
6557  ac_cv_path_ac_pt_pkg_config="$ac_pt_pkg_config" # Let the user override the test with a path.
6558  ;;
6559  *)
6560  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6561for as_dir in $PATH
6562do
6563  IFS=$as_save_IFS
6564  test -z "$as_dir" && as_dir=.
6565    for ac_exec_ext in '' $ac_executable_extensions; do
6566  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6567    ac_cv_path_ac_pt_pkg_config="$as_dir/$ac_word$ac_exec_ext"
6568    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6569    break 2
6570  fi
6571done
6572  done
6573IFS=$as_save_IFS
6574
6575  ;;
6576esac
6577fi
6578ac_pt_pkg_config=$ac_cv_path_ac_pt_pkg_config
6579if test -n "$ac_pt_pkg_config"; then
6580  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_pkg_config" >&5
6581$as_echo "$ac_pt_pkg_config" >&6; }
6582else
6583  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6584$as_echo "no" >&6; }
6585fi
6586
6587  if test "x$ac_pt_pkg_config" = x; then
6588    pkg_config=""
6589  else
6590    case $cross_compiling:$ac_tool_warned in
6591yes:)
6592{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
6593$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
6594ac_tool_warned=yes ;;
6595esac
6596    pkg_config=$ac_pt_pkg_config
6597  fi
6598else
6599  pkg_config="$ac_cv_path_pkg_config"
6600fi
6601
6602
6603if test -z "$pkg_config" ; then
6604  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: pkg-config not found!" >&5
6605$as_echo "$as_me: WARNING: pkg-config not found!" >&2;}
6606  pkg_config="false"
6607fi
6608
6609
6610# Utility function for running pkg-config-based tests...
6611#
6612pkgs=''
6613pkg_check_version() {
6614  if test "$ok" = yes ; then
6615    req="$1"
6616    min="$2"
6617    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $req" >&5
6618$as_echo_n "checking for $req... " >&6; }
6619    if $pkg_config --exists "$req" ; then
6620      vers=`$pkg_config --modversion "$req"`
6621      if $pkg_config --exists "$req >= $min" ; then
6622        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $vers" >&5
6623$as_echo "$vers" >&6; }
6624        pkgs="$pkgs $req"
6625        return 1
6626      else
6627        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $vers (wanted >= $min)" >&5
6628$as_echo "$vers (wanted >= $min)" >&6; }
6629        ok=no
6630        return 0
6631      fi
6632    else
6633      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6634$as_echo "no" >&6; }
6635      ok=no
6636      return 0
6637    fi
6638  fi
6639}
6640
6641
6642###############################################################################
6643#
6644#       Gettext support
6645#
6646###############################################################################
6647
6648# Wow, this is complete madness.  Why does po/Makefile.in.in exist??  Why does
6649# aclocal.m4 exist??  Why can't I upgrade it without everything breaking??
6650# This IT_PROG_INTLTOOL nonsense has so many self-modifying levels of insanity
6651# that it *must* have been written by RMS.  Or an equally demented protégé.
6652# Won't someone please have mercy on us all and write a normal po/Makefile.in
6653# that uses wildcards, and write a sane set of rules to detect gettext(3) and
6654# msgfmt(1) and just do the obviously straightforward thing?
6655
6656
6657  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether NLS is requested" >&5
6658$as_echo_n "checking whether NLS is requested... " >&6; }
6659    # Check whether --enable-nls was given.
6660if test "${enable_nls+set}" = set; then :
6661  enableval=$enable_nls; USE_NLS=$enableval
6662else
6663  USE_NLS=yes
6664fi
6665
6666  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $USE_NLS" >&5
6667$as_echo "$USE_NLS" >&6; }
6668
6669
6670
6671
6672case "$am__api_version" in
6673    1.01234)
6674	as_fn_error $? "Automake 1.5 or newer is required to use intltool" "$LINENO" 5
6675    ;;
6676    *)
6677    ;;
6678esac
6679
6680INTLTOOL_REQUIRED_VERSION_AS_INT=`echo  | awk -F. '{ print $ 1 * 1000 + $ 2 * 100 + $ 3; }'`
6681INTLTOOL_APPLIED_VERSION=`intltool-update --version | head -1 | cut -d" " -f3`
6682INTLTOOL_APPLIED_VERSION_AS_INT=`echo $INTLTOOL_APPLIED_VERSION | awk -F. '{ print $ 1 * 1000 + $ 2 * 100 + $ 3; }'`
6683if test -n ""; then
6684    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for intltool >= " >&5
6685$as_echo_n "checking for intltool >= ... " >&6; }
6686    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $INTLTOOL_APPLIED_VERSION found" >&5
6687$as_echo "$INTLTOOL_APPLIED_VERSION found" >&6; }
6688    test "$INTLTOOL_APPLIED_VERSION_AS_INT" -ge "$INTLTOOL_REQUIRED_VERSION_AS_INT" ||
6689	as_fn_error $? "Your intltool is too old.  You need intltool  or later." "$LINENO" 5
6690fi
6691
6692# Extract the first word of "intltool-update", so it can be a program name with args.
6693set dummy intltool-update; ac_word=$2
6694{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6695$as_echo_n "checking for $ac_word... " >&6; }
6696if ${ac_cv_path_INTLTOOL_UPDATE+:} false; then :
6697  $as_echo_n "(cached) " >&6
6698else
6699  case $INTLTOOL_UPDATE in
6700  [\\/]* | ?:[\\/]*)
6701  ac_cv_path_INTLTOOL_UPDATE="$INTLTOOL_UPDATE" # Let the user override the test with a path.
6702  ;;
6703  *)
6704  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6705for as_dir in $PATH
6706do
6707  IFS=$as_save_IFS
6708  test -z "$as_dir" && as_dir=.
6709    for ac_exec_ext in '' $ac_executable_extensions; do
6710  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6711    ac_cv_path_INTLTOOL_UPDATE="$as_dir/$ac_word$ac_exec_ext"
6712    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6713    break 2
6714  fi
6715done
6716  done
6717IFS=$as_save_IFS
6718
6719  ;;
6720esac
6721fi
6722INTLTOOL_UPDATE=$ac_cv_path_INTLTOOL_UPDATE
6723if test -n "$INTLTOOL_UPDATE"; then
6724  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $INTLTOOL_UPDATE" >&5
6725$as_echo "$INTLTOOL_UPDATE" >&6; }
6726else
6727  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6728$as_echo "no" >&6; }
6729fi
6730
6731
6732# Extract the first word of "intltool-merge", so it can be a program name with args.
6733set dummy intltool-merge; ac_word=$2
6734{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6735$as_echo_n "checking for $ac_word... " >&6; }
6736if ${ac_cv_path_INTLTOOL_MERGE+:} false; then :
6737  $as_echo_n "(cached) " >&6
6738else
6739  case $INTLTOOL_MERGE in
6740  [\\/]* | ?:[\\/]*)
6741  ac_cv_path_INTLTOOL_MERGE="$INTLTOOL_MERGE" # Let the user override the test with a path.
6742  ;;
6743  *)
6744  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6745for as_dir in $PATH
6746do
6747  IFS=$as_save_IFS
6748  test -z "$as_dir" && as_dir=.
6749    for ac_exec_ext in '' $ac_executable_extensions; do
6750  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6751    ac_cv_path_INTLTOOL_MERGE="$as_dir/$ac_word$ac_exec_ext"
6752    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6753    break 2
6754  fi
6755done
6756  done
6757IFS=$as_save_IFS
6758
6759  ;;
6760esac
6761fi
6762INTLTOOL_MERGE=$ac_cv_path_INTLTOOL_MERGE
6763if test -n "$INTLTOOL_MERGE"; then
6764  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $INTLTOOL_MERGE" >&5
6765$as_echo "$INTLTOOL_MERGE" >&6; }
6766else
6767  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6768$as_echo "no" >&6; }
6769fi
6770
6771
6772# Extract the first word of "intltool-extract", so it can be a program name with args.
6773set dummy intltool-extract; ac_word=$2
6774{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6775$as_echo_n "checking for $ac_word... " >&6; }
6776if ${ac_cv_path_INTLTOOL_EXTRACT+:} false; then :
6777  $as_echo_n "(cached) " >&6
6778else
6779  case $INTLTOOL_EXTRACT in
6780  [\\/]* | ?:[\\/]*)
6781  ac_cv_path_INTLTOOL_EXTRACT="$INTLTOOL_EXTRACT" # Let the user override the test with a path.
6782  ;;
6783  *)
6784  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6785for as_dir in $PATH
6786do
6787  IFS=$as_save_IFS
6788  test -z "$as_dir" && as_dir=.
6789    for ac_exec_ext in '' $ac_executable_extensions; do
6790  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6791    ac_cv_path_INTLTOOL_EXTRACT="$as_dir/$ac_word$ac_exec_ext"
6792    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6793    break 2
6794  fi
6795done
6796  done
6797IFS=$as_save_IFS
6798
6799  ;;
6800esac
6801fi
6802INTLTOOL_EXTRACT=$ac_cv_path_INTLTOOL_EXTRACT
6803if test -n "$INTLTOOL_EXTRACT"; then
6804  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $INTLTOOL_EXTRACT" >&5
6805$as_echo "$INTLTOOL_EXTRACT" >&6; }
6806else
6807  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6808$as_echo "no" >&6; }
6809fi
6810
6811
6812if test -z "$INTLTOOL_UPDATE" -o -z "$INTLTOOL_MERGE" -o -z "$INTLTOOL_EXTRACT"; then
6813    as_fn_error $? "The intltool scripts were not found. Please install intltool." "$LINENO" 5
6814fi
6815
6816if test -z "$AM_DEFAULT_VERBOSITY"; then
6817  AM_DEFAULT_VERBOSITY=1
6818fi
6819
6820
6821INTLTOOL_V_MERGE='$(INTLTOOL__v_MERGE_$(V))'
6822INTLTOOL__v_MERGE_='$(INTLTOOL__v_MERGE_$(AM_DEFAULT_VERBOSITY))'
6823INTLTOOL__v_MERGE_0='@echo "  ITMRG " $@;'
6824
6825
6826
6827
6828INTLTOOL_V_MERGE_OPTIONS='$(intltool__v_merge_options_$(V))'
6829intltool__v_merge_options_='$(intltool__v_merge_options_$(AM_DEFAULT_VERBOSITY))'
6830intltool__v_merge_options_0='-q'
6831
6832
6833
6834
6835  INTLTOOL_DESKTOP_RULE='%.desktop:   %.desktop.in   $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; $(INTLTOOL_V_MERGE)LC_ALL=C $(INTLTOOL_MERGE) $(INTLTOOL_V_MERGE_OPTIONS) -d -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< $@'
6836INTLTOOL_DIRECTORY_RULE='%.directory: %.directory.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; $(INTLTOOL_V_MERGE)LC_ALL=C $(INTLTOOL_MERGE) $(INTLTOOL_V_MERGE_OPTIONS) -d -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< $@'
6837     INTLTOOL_KEYS_RULE='%.keys:      %.keys.in      $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; $(INTLTOOL_V_MERGE)LC_ALL=C $(INTLTOOL_MERGE) $(INTLTOOL_V_MERGE_OPTIONS) -k -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< $@'
6838     INTLTOOL_PROP_RULE='%.prop:      %.prop.in      $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; $(INTLTOOL_V_MERGE)LC_ALL=C $(INTLTOOL_MERGE) $(INTLTOOL_V_MERGE_OPTIONS) -d -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< $@'
6839      INTLTOOL_OAF_RULE='%.oaf:       %.oaf.in       $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; $(INTLTOOL_V_MERGE)LC_ALL=C $(INTLTOOL_MERGE) $(INTLTOOL_V_MERGE_OPTIONS) -o -p $(top_srcdir)/po $< $@'
6840     INTLTOOL_PONG_RULE='%.pong:      %.pong.in      $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; $(INTLTOOL_V_MERGE)LC_ALL=C $(INTLTOOL_MERGE) $(INTLTOOL_V_MERGE_OPTIONS) -x -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< $@'
6841   INTLTOOL_SERVER_RULE='%.server:    %.server.in    $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; $(INTLTOOL_V_MERGE)LC_ALL=C $(INTLTOOL_MERGE) $(INTLTOOL_V_MERGE_OPTIONS) -o -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< $@'
6842    INTLTOOL_SHEET_RULE='%.sheet:     %.sheet.in     $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; $(INTLTOOL_V_MERGE)LC_ALL=C $(INTLTOOL_MERGE) $(INTLTOOL_V_MERGE_OPTIONS) -x -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< $@'
6843INTLTOOL_SOUNDLIST_RULE='%.soundlist: %.soundlist.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; $(INTLTOOL_V_MERGE)LC_ALL=C $(INTLTOOL_MERGE) $(INTLTOOL_V_MERGE_OPTIONS) -d -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< $@'
6844       INTLTOOL_UI_RULE='%.ui:        %.ui.in        $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; $(INTLTOOL_V_MERGE)LC_ALL=C $(INTLTOOL_MERGE) $(INTLTOOL_V_MERGE_OPTIONS) -x -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< $@'
6845      INTLTOOL_XML_RULE='%.xml:       %.xml.in       $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; $(INTLTOOL_V_MERGE)LC_ALL=C $(INTLTOOL_MERGE) $(INTLTOOL_V_MERGE_OPTIONS) -x -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< $@'
6846if test "$INTLTOOL_APPLIED_VERSION_AS_INT" -ge 5000; then
6847      INTLTOOL_XML_NOMERGE_RULE='%.xml:       %.xml.in       $(INTLTOOL_MERGE) ; $(INTLTOOL_V_MERGE)LC_ALL=C $(INTLTOOL_MERGE) $(INTLTOOL_V_MERGE_OPTIONS) -x -u --no-translations $< $@'
6848else
6849      INTLTOOL_XML_NOMERGE_RULE='%.xml:       %.xml.in       $(INTLTOOL_MERGE) ; $(INTLTOOL_V_MERGE)_it_tmp_dir=tmp.intltool.$$RANDOM && mkdir $$_it_tmp_dir && LC_ALL=C $(INTLTOOL_MERGE) $(INTLTOOL_V_MERGE_OPTIONS) -x -u $$_it_tmp_dir $< $@ && rmdir $$_it_tmp_dir'
6850fi
6851      INTLTOOL_XAM_RULE='%.xam:       %.xml.in       $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; $(INTLTOOL_V_MERGE)LC_ALL=C $(INTLTOOL_MERGE) $(INTLTOOL_V_MERGE_OPTIONS) -x -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< $@'
6852      INTLTOOL_KBD_RULE='%.kbd:       %.kbd.in       $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; $(INTLTOOL_V_MERGE)LC_ALL=C $(INTLTOOL_MERGE) $(INTLTOOL_V_MERGE_OPTIONS) -x -u -m -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< $@'
6853    INTLTOOL_CAVES_RULE='%.caves:     %.caves.in     $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; $(INTLTOOL_V_MERGE)LC_ALL=C $(INTLTOOL_MERGE) $(INTLTOOL_V_MERGE_OPTIONS) -d -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< $@'
6854  INTLTOOL_SCHEMAS_RULE='%.schemas:   %.schemas.in   $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; $(INTLTOOL_V_MERGE)LC_ALL=C $(INTLTOOL_MERGE) $(INTLTOOL_V_MERGE_OPTIONS) -s -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< $@'
6855    INTLTOOL_THEME_RULE='%.theme:     %.theme.in     $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; $(INTLTOOL_V_MERGE)LC_ALL=C $(INTLTOOL_MERGE) $(INTLTOOL_V_MERGE_OPTIONS) -d -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< $@'
6856    INTLTOOL_SERVICE_RULE='%.service: %.service.in   $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; $(INTLTOOL_V_MERGE)LC_ALL=C $(INTLTOOL_MERGE) $(INTLTOOL_V_MERGE_OPTIONS) -d -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< $@'
6857   INTLTOOL_POLICY_RULE='%.policy:    %.policy.in    $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; $(INTLTOOL_V_MERGE)LC_ALL=C $(INTLTOOL_MERGE) $(INTLTOOL_V_MERGE_OPTIONS) -x -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< $@'
6858
6859
6860
6861
6862
6863
6864
6865
6866
6867
6868
6869
6870
6871
6872
6873
6874
6875
6876
6877
6878
6879
6880
6881
6882
6883
6884
6885
6886
6887
6888
6889
6890
6891
6892
6893
6894
6895
6896
6897
6898
6899
6900
6901
6902
6903
6904
6905
6906
6907
6908
6909
6910
6911
6912
6913
6914
6915
6916
6917
6918
6919
6920
6921
6922
6923
6924
6925
6926
6927
6928
6929
6930
6931
6932
6933
6934
6935
6936
6937
6938
6939
6940
6941
6942
6943
6944
6945
6946
6947
6948
6949
6950
6951
6952
6953
6954
6955# Check the gettext tools to make sure they are GNU
6956# Extract the first word of "xgettext", so it can be a program name with args.
6957set dummy xgettext; ac_word=$2
6958{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6959$as_echo_n "checking for $ac_word... " >&6; }
6960if ${ac_cv_path_XGETTEXT+:} false; then :
6961  $as_echo_n "(cached) " >&6
6962else
6963  case $XGETTEXT in
6964  [\\/]* | ?:[\\/]*)
6965  ac_cv_path_XGETTEXT="$XGETTEXT" # Let the user override the test with a path.
6966  ;;
6967  *)
6968  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6969for as_dir in $PATH
6970do
6971  IFS=$as_save_IFS
6972  test -z "$as_dir" && as_dir=.
6973    for ac_exec_ext in '' $ac_executable_extensions; do
6974  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6975    ac_cv_path_XGETTEXT="$as_dir/$ac_word$ac_exec_ext"
6976    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6977    break 2
6978  fi
6979done
6980  done
6981IFS=$as_save_IFS
6982
6983  ;;
6984esac
6985fi
6986XGETTEXT=$ac_cv_path_XGETTEXT
6987if test -n "$XGETTEXT"; then
6988  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XGETTEXT" >&5
6989$as_echo "$XGETTEXT" >&6; }
6990else
6991  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6992$as_echo "no" >&6; }
6993fi
6994
6995
6996# Extract the first word of "msgmerge", so it can be a program name with args.
6997set dummy msgmerge; ac_word=$2
6998{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6999$as_echo_n "checking for $ac_word... " >&6; }
7000if ${ac_cv_path_MSGMERGE+:} false; then :
7001  $as_echo_n "(cached) " >&6
7002else
7003  case $MSGMERGE in
7004  [\\/]* | ?:[\\/]*)
7005  ac_cv_path_MSGMERGE="$MSGMERGE" # Let the user override the test with a path.
7006  ;;
7007  *)
7008  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7009for as_dir in $PATH
7010do
7011  IFS=$as_save_IFS
7012  test -z "$as_dir" && as_dir=.
7013    for ac_exec_ext in '' $ac_executable_extensions; do
7014  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7015    ac_cv_path_MSGMERGE="$as_dir/$ac_word$ac_exec_ext"
7016    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7017    break 2
7018  fi
7019done
7020  done
7021IFS=$as_save_IFS
7022
7023  ;;
7024esac
7025fi
7026MSGMERGE=$ac_cv_path_MSGMERGE
7027if test -n "$MSGMERGE"; then
7028  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSGMERGE" >&5
7029$as_echo "$MSGMERGE" >&6; }
7030else
7031  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7032$as_echo "no" >&6; }
7033fi
7034
7035
7036# Extract the first word of "msgfmt", so it can be a program name with args.
7037set dummy msgfmt; ac_word=$2
7038{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7039$as_echo_n "checking for $ac_word... " >&6; }
7040if ${ac_cv_path_MSGFMT+:} false; then :
7041  $as_echo_n "(cached) " >&6
7042else
7043  case $MSGFMT in
7044  [\\/]* | ?:[\\/]*)
7045  ac_cv_path_MSGFMT="$MSGFMT" # Let the user override the test with a path.
7046  ;;
7047  *)
7048  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7049for as_dir in $PATH
7050do
7051  IFS=$as_save_IFS
7052  test -z "$as_dir" && as_dir=.
7053    for ac_exec_ext in '' $ac_executable_extensions; do
7054  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7055    ac_cv_path_MSGFMT="$as_dir/$ac_word$ac_exec_ext"
7056    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7057    break 2
7058  fi
7059done
7060  done
7061IFS=$as_save_IFS
7062
7063  ;;
7064esac
7065fi
7066MSGFMT=$ac_cv_path_MSGFMT
7067if test -n "$MSGFMT"; then
7068  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSGFMT" >&5
7069$as_echo "$MSGFMT" >&6; }
7070else
7071  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7072$as_echo "no" >&6; }
7073fi
7074
7075
7076# Extract the first word of "gmsgfmt", so it can be a program name with args.
7077set dummy gmsgfmt; ac_word=$2
7078{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7079$as_echo_n "checking for $ac_word... " >&6; }
7080if ${ac_cv_path_GMSGFMT+:} false; then :
7081  $as_echo_n "(cached) " >&6
7082else
7083  case $GMSGFMT in
7084  [\\/]* | ?:[\\/]*)
7085  ac_cv_path_GMSGFMT="$GMSGFMT" # Let the user override the test with a path.
7086  ;;
7087  *)
7088  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7089for as_dir in $PATH
7090do
7091  IFS=$as_save_IFS
7092  test -z "$as_dir" && as_dir=.
7093    for ac_exec_ext in '' $ac_executable_extensions; do
7094  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7095    ac_cv_path_GMSGFMT="$as_dir/$ac_word$ac_exec_ext"
7096    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7097    break 2
7098  fi
7099done
7100  done
7101IFS=$as_save_IFS
7102
7103  test -z "$ac_cv_path_GMSGFMT" && ac_cv_path_GMSGFMT="$MSGFMT"
7104  ;;
7105esac
7106fi
7107GMSGFMT=$ac_cv_path_GMSGFMT
7108if test -n "$GMSGFMT"; then
7109  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GMSGFMT" >&5
7110$as_echo "$GMSGFMT" >&6; }
7111else
7112  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7113$as_echo "no" >&6; }
7114fi
7115
7116
7117if test -z "$XGETTEXT" -o -z "$MSGMERGE" -o -z "$MSGFMT"; then
7118    as_fn_error $? "GNU gettext tools not found; required for intltool" "$LINENO" 5
7119fi
7120xgversion="`$XGETTEXT --version|grep '(GNU ' 2> /dev/null`"
7121mmversion="`$MSGMERGE --version|grep '(GNU ' 2> /dev/null`"
7122mfversion="`$MSGFMT --version|grep '(GNU ' 2> /dev/null`"
7123if test -z "$xgversion" -o -z "$mmversion" -o -z "$mfversion"; then
7124    as_fn_error $? "GNU gettext tools not found; required for intltool" "$LINENO" 5
7125fi
7126
7127# Substitute ALL_LINGUAS so we can use it in po/Makefile
7128
7129
7130
7131
7132
7133GETTEXT_PACKAGE=xscreensaver
7134
7135cat >>confdefs.h <<_ACEOF
7136#define GETTEXT_PACKAGE "$GETTEXT_PACKAGE"
7137_ACEOF
7138
7139
7140
7141ALL_LINGUAS="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"
7142
7143   for ac_header in locale.h
7144do :
7145  ac_fn_c_check_header_mongrel "$LINENO" "locale.h" "ac_cv_header_locale_h" "$ac_includes_default"
7146if test "x$ac_cv_header_locale_h" = xyes; then :
7147  cat >>confdefs.h <<_ACEOF
7148#define HAVE_LOCALE_H 1
7149_ACEOF
7150
7151fi
7152
7153done
7154
7155    if test $ac_cv_header_locale_h = yes; then
7156    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LC_MESSAGES" >&5
7157$as_echo_n "checking for LC_MESSAGES... " >&6; }
7158if ${am_cv_val_LC_MESSAGES+:} false; then :
7159  $as_echo_n "(cached) " >&6
7160else
7161  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7162/* end confdefs.h.  */
7163#include <locale.h>
7164int
7165main ()
7166{
7167return LC_MESSAGES
7168  ;
7169  return 0;
7170}
7171_ACEOF
7172if ac_fn_c_try_link "$LINENO"; then :
7173  am_cv_val_LC_MESSAGES=yes
7174else
7175  am_cv_val_LC_MESSAGES=no
7176fi
7177rm -f core conftest.err conftest.$ac_objext \
7178    conftest$ac_exeext conftest.$ac_ext
7179fi
7180{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_val_LC_MESSAGES" >&5
7181$as_echo "$am_cv_val_LC_MESSAGES" >&6; }
7182    if test $am_cv_val_LC_MESSAGES = yes; then
7183
7184$as_echo "#define HAVE_LC_MESSAGES 1" >>confdefs.h
7185
7186    fi
7187  fi
7188     USE_NLS=yes
7189
7190
7191    gt_cv_have_gettext=no
7192
7193    CATOBJEXT=NONE
7194    XGETTEXT=:
7195    INTLLIBS=
7196
7197
7198    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CFPreferencesCopyAppValue" >&5
7199$as_echo_n "checking for CFPreferencesCopyAppValue... " >&6; }
7200if ${gt_cv_func_CFPreferencesCopyAppValue+:} false; then :
7201  $as_echo_n "(cached) " >&6
7202else
7203  gt_save_LIBS="$LIBS"
7204     LIBS="$LIBS -Wl,-framework -Wl,CoreFoundation"
7205     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7206/* end confdefs.h.  */
7207#include <CoreFoundation/CFPreferences.h>
7208int
7209main ()
7210{
7211CFPreferencesCopyAppValue(NULL, NULL)
7212  ;
7213  return 0;
7214}
7215_ACEOF
7216if ac_fn_c_try_link "$LINENO"; then :
7217  gt_cv_func_CFPreferencesCopyAppValue=yes
7218else
7219  gt_cv_func_CFPreferencesCopyAppValue=no
7220fi
7221rm -f core conftest.err conftest.$ac_objext \
7222    conftest$ac_exeext conftest.$ac_ext
7223     LIBS="$gt_save_LIBS"
7224fi
7225{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_func_CFPreferencesCopyAppValue" >&5
7226$as_echo "$gt_cv_func_CFPreferencesCopyAppValue" >&6; }
7227  if test $gt_cv_func_CFPreferencesCopyAppValue = yes; then
7228
7229$as_echo "#define HAVE_CFPREFERENCESCOPYAPPVALUE 1" >>confdefs.h
7230
7231  fi
7232    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CFLocaleCopyCurrent" >&5
7233$as_echo_n "checking for CFLocaleCopyCurrent... " >&6; }
7234if ${gt_cv_func_CFLocaleCopyCurrent+:} false; then :
7235  $as_echo_n "(cached) " >&6
7236else
7237  gt_save_LIBS="$LIBS"
7238     LIBS="$LIBS -Wl,-framework -Wl,CoreFoundation"
7239     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7240/* end confdefs.h.  */
7241#include <CoreFoundation/CFLocale.h>
7242int
7243main ()
7244{
7245CFLocaleCopyCurrent();
7246  ;
7247  return 0;
7248}
7249_ACEOF
7250if ac_fn_c_try_link "$LINENO"; then :
7251  gt_cv_func_CFLocaleCopyCurrent=yes
7252else
7253  gt_cv_func_CFLocaleCopyCurrent=no
7254fi
7255rm -f core conftest.err conftest.$ac_objext \
7256    conftest$ac_exeext conftest.$ac_ext
7257     LIBS="$gt_save_LIBS"
7258fi
7259{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_func_CFLocaleCopyCurrent" >&5
7260$as_echo "$gt_cv_func_CFLocaleCopyCurrent" >&6; }
7261  if test $gt_cv_func_CFLocaleCopyCurrent = yes; then
7262
7263$as_echo "#define HAVE_CFLOCALECOPYCURRENT 1" >>confdefs.h
7264
7265  fi
7266  INTL_MACOSX_LIBS=
7267  if test $gt_cv_func_CFPreferencesCopyAppValue = yes || test $gt_cv_func_CFLocaleCopyCurrent = yes; then
7268    INTL_MACOSX_LIBS="-Wl,-framework -Wl,CoreFoundation"
7269  fi
7270
7271
7272
7273    ac_fn_c_check_header_mongrel "$LINENO" "libintl.h" "ac_cv_header_libintl_h" "$ac_includes_default"
7274if test "x$ac_cv_header_libintl_h" = xyes; then :
7275  gt_cv_func_dgettext_libintl="no"
7276      libintl_extra_libs=""
7277
7278      #
7279      # First check in libc
7280      #
7281      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ngettext in libc" >&5
7282$as_echo_n "checking for ngettext in libc... " >&6; }
7283if ${gt_cv_func_ngettext_libc+:} false; then :
7284  $as_echo_n "(cached) " >&6
7285else
7286  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7287/* end confdefs.h.  */
7288
7289#include <libintl.h>
7290
7291int
7292main ()
7293{
7294return !ngettext ("","", 1)
7295  ;
7296  return 0;
7297}
7298_ACEOF
7299if ac_fn_c_try_link "$LINENO"; then :
7300  gt_cv_func_ngettext_libc=yes
7301else
7302  gt_cv_func_ngettext_libc=no
7303fi
7304rm -f core conftest.err conftest.$ac_objext \
7305    conftest$ac_exeext conftest.$ac_ext
7306
7307fi
7308{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_func_ngettext_libc" >&5
7309$as_echo "$gt_cv_func_ngettext_libc" >&6; }
7310
7311      if test "$gt_cv_func_ngettext_libc" = "yes" ; then
7312	      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dgettext in libc" >&5
7313$as_echo_n "checking for dgettext in libc... " >&6; }
7314if ${gt_cv_func_dgettext_libc+:} false; then :
7315  $as_echo_n "(cached) " >&6
7316else
7317  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7318/* end confdefs.h.  */
7319
7320#include <libintl.h>
7321
7322int
7323main ()
7324{
7325return !dgettext ("","")
7326  ;
7327  return 0;
7328}
7329_ACEOF
7330if ac_fn_c_try_link "$LINENO"; then :
7331  gt_cv_func_dgettext_libc=yes
7332else
7333  gt_cv_func_dgettext_libc=no
7334fi
7335rm -f core conftest.err conftest.$ac_objext \
7336    conftest$ac_exeext conftest.$ac_ext
7337
7338fi
7339{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_func_dgettext_libc" >&5
7340$as_echo "$gt_cv_func_dgettext_libc" >&6; }
7341      fi
7342
7343      if test "$gt_cv_func_ngettext_libc" = "yes" ; then
7344        for ac_func in bind_textdomain_codeset
7345do :
7346  ac_fn_c_check_func "$LINENO" "bind_textdomain_codeset" "ac_cv_func_bind_textdomain_codeset"
7347if test "x$ac_cv_func_bind_textdomain_codeset" = xyes; then :
7348  cat >>confdefs.h <<_ACEOF
7349#define HAVE_BIND_TEXTDOMAIN_CODESET 1
7350_ACEOF
7351
7352fi
7353done
7354
7355      fi
7356
7357      #
7358      # If we don't have everything we want, check in libintl
7359      #
7360      if test "$gt_cv_func_dgettext_libc" != "yes" \
7361	 || test "$gt_cv_func_ngettext_libc" != "yes" \
7362         || test "$ac_cv_func_bind_textdomain_codeset" != "yes" ; then
7363
7364        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for bindtextdomain in -lintl" >&5
7365$as_echo_n "checking for bindtextdomain in -lintl... " >&6; }
7366if ${ac_cv_lib_intl_bindtextdomain+:} false; then :
7367  $as_echo_n "(cached) " >&6
7368else
7369  ac_check_lib_save_LIBS=$LIBS
7370LIBS="-lintl  $LIBS"
7371cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7372/* end confdefs.h.  */
7373
7374/* Override any GCC internal prototype to avoid an error.
7375   Use char because int might match the return type of a GCC
7376   builtin and then its argument prototype would still apply.  */
7377#ifdef __cplusplus
7378extern "C"
7379#endif
7380char bindtextdomain ();
7381int
7382main ()
7383{
7384return bindtextdomain ();
7385  ;
7386  return 0;
7387}
7388_ACEOF
7389if ac_fn_c_try_link "$LINENO"; then :
7390  ac_cv_lib_intl_bindtextdomain=yes
7391else
7392  ac_cv_lib_intl_bindtextdomain=no
7393fi
7394rm -f core conftest.err conftest.$ac_objext \
7395    conftest$ac_exeext conftest.$ac_ext
7396LIBS=$ac_check_lib_save_LIBS
7397fi
7398{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_intl_bindtextdomain" >&5
7399$as_echo "$ac_cv_lib_intl_bindtextdomain" >&6; }
7400if test "x$ac_cv_lib_intl_bindtextdomain" = xyes; then :
7401  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ngettext in -lintl" >&5
7402$as_echo_n "checking for ngettext in -lintl... " >&6; }
7403if ${ac_cv_lib_intl_ngettext+:} false; then :
7404  $as_echo_n "(cached) " >&6
7405else
7406  ac_check_lib_save_LIBS=$LIBS
7407LIBS="-lintl  $LIBS"
7408cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7409/* end confdefs.h.  */
7410
7411/* Override any GCC internal prototype to avoid an error.
7412   Use char because int might match the return type of a GCC
7413   builtin and then its argument prototype would still apply.  */
7414#ifdef __cplusplus
7415extern "C"
7416#endif
7417char ngettext ();
7418int
7419main ()
7420{
7421return ngettext ();
7422  ;
7423  return 0;
7424}
7425_ACEOF
7426if ac_fn_c_try_link "$LINENO"; then :
7427  ac_cv_lib_intl_ngettext=yes
7428else
7429  ac_cv_lib_intl_ngettext=no
7430fi
7431rm -f core conftest.err conftest.$ac_objext \
7432    conftest$ac_exeext conftest.$ac_ext
7433LIBS=$ac_check_lib_save_LIBS
7434fi
7435{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_intl_ngettext" >&5
7436$as_echo "$ac_cv_lib_intl_ngettext" >&6; }
7437if test "x$ac_cv_lib_intl_ngettext" = xyes; then :
7438  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dgettext in -lintl" >&5
7439$as_echo_n "checking for dgettext in -lintl... " >&6; }
7440if ${ac_cv_lib_intl_dgettext+:} false; then :
7441  $as_echo_n "(cached) " >&6
7442else
7443  ac_check_lib_save_LIBS=$LIBS
7444LIBS="-lintl  $LIBS"
7445cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7446/* end confdefs.h.  */
7447
7448/* Override any GCC internal prototype to avoid an error.
7449   Use char because int might match the return type of a GCC
7450   builtin and then its argument prototype would still apply.  */
7451#ifdef __cplusplus
7452extern "C"
7453#endif
7454char dgettext ();
7455int
7456main ()
7457{
7458return dgettext ();
7459  ;
7460  return 0;
7461}
7462_ACEOF
7463if ac_fn_c_try_link "$LINENO"; then :
7464  ac_cv_lib_intl_dgettext=yes
7465else
7466  ac_cv_lib_intl_dgettext=no
7467fi
7468rm -f core conftest.err conftest.$ac_objext \
7469    conftest$ac_exeext conftest.$ac_ext
7470LIBS=$ac_check_lib_save_LIBS
7471fi
7472{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_intl_dgettext" >&5
7473$as_echo "$ac_cv_lib_intl_dgettext" >&6; }
7474if test "x$ac_cv_lib_intl_dgettext" = xyes; then :
7475  gt_cv_func_dgettext_libintl=yes
7476fi
7477
7478fi
7479
7480fi
7481
7482
7483	if test "$gt_cv_func_dgettext_libintl" != "yes" ; then
7484	  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if -liconv is needed to use gettext" >&5
7485$as_echo_n "checking if -liconv is needed to use gettext... " >&6; }
7486	  { $as_echo "$as_me:${as_lineno-$LINENO}: result: " >&5
7487$as_echo "" >&6; }
7488  	  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ngettext in -lintl" >&5
7489$as_echo_n "checking for ngettext in -lintl... " >&6; }
7490if ${ac_cv_lib_intl_ngettext+:} false; then :
7491  $as_echo_n "(cached) " >&6
7492else
7493  ac_check_lib_save_LIBS=$LIBS
7494LIBS="-lintl -liconv $LIBS"
7495cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7496/* end confdefs.h.  */
7497
7498/* Override any GCC internal prototype to avoid an error.
7499   Use char because int might match the return type of a GCC
7500   builtin and then its argument prototype would still apply.  */
7501#ifdef __cplusplus
7502extern "C"
7503#endif
7504char ngettext ();
7505int
7506main ()
7507{
7508return ngettext ();
7509  ;
7510  return 0;
7511}
7512_ACEOF
7513if ac_fn_c_try_link "$LINENO"; then :
7514  ac_cv_lib_intl_ngettext=yes
7515else
7516  ac_cv_lib_intl_ngettext=no
7517fi
7518rm -f core conftest.err conftest.$ac_objext \
7519    conftest$ac_exeext conftest.$ac_ext
7520LIBS=$ac_check_lib_save_LIBS
7521fi
7522{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_intl_ngettext" >&5
7523$as_echo "$ac_cv_lib_intl_ngettext" >&6; }
7524if test "x$ac_cv_lib_intl_ngettext" = xyes; then :
7525  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dcgettext in -lintl" >&5
7526$as_echo_n "checking for dcgettext in -lintl... " >&6; }
7527if ${ac_cv_lib_intl_dcgettext+:} false; then :
7528  $as_echo_n "(cached) " >&6
7529else
7530  ac_check_lib_save_LIBS=$LIBS
7531LIBS="-lintl -liconv $LIBS"
7532cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7533/* end confdefs.h.  */
7534
7535/* Override any GCC internal prototype to avoid an error.
7536   Use char because int might match the return type of a GCC
7537   builtin and then its argument prototype would still apply.  */
7538#ifdef __cplusplus
7539extern "C"
7540#endif
7541char dcgettext ();
7542int
7543main ()
7544{
7545return dcgettext ();
7546  ;
7547  return 0;
7548}
7549_ACEOF
7550if ac_fn_c_try_link "$LINENO"; then :
7551  ac_cv_lib_intl_dcgettext=yes
7552else
7553  ac_cv_lib_intl_dcgettext=no
7554fi
7555rm -f core conftest.err conftest.$ac_objext \
7556    conftest$ac_exeext conftest.$ac_ext
7557LIBS=$ac_check_lib_save_LIBS
7558fi
7559{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_intl_dcgettext" >&5
7560$as_echo "$ac_cv_lib_intl_dcgettext" >&6; }
7561if test "x$ac_cv_lib_intl_dcgettext" = xyes; then :
7562  gt_cv_func_dgettext_libintl=yes
7563			libintl_extra_libs=-liconv
7564else
7565  :
7566fi
7567
7568else
7569  :
7570fi
7571
7572        fi
7573
7574        #
7575        # If we found libintl, then check in it for bind_textdomain_codeset();
7576        # we'll prefer libc if neither have bind_textdomain_codeset(),
7577        # and both have dgettext and ngettext
7578        #
7579        if test "$gt_cv_func_dgettext_libintl" = "yes" ; then
7580          glib_save_LIBS="$LIBS"
7581          LIBS="$LIBS -lintl $libintl_extra_libs"
7582          unset ac_cv_func_bind_textdomain_codeset
7583          for ac_func in bind_textdomain_codeset
7584do :
7585  ac_fn_c_check_func "$LINENO" "bind_textdomain_codeset" "ac_cv_func_bind_textdomain_codeset"
7586if test "x$ac_cv_func_bind_textdomain_codeset" = xyes; then :
7587  cat >>confdefs.h <<_ACEOF
7588#define HAVE_BIND_TEXTDOMAIN_CODESET 1
7589_ACEOF
7590
7591fi
7592done
7593
7594          LIBS="$glib_save_LIBS"
7595
7596          if test "$ac_cv_func_bind_textdomain_codeset" = "yes" ; then
7597            gt_cv_func_dgettext_libc=no
7598          else
7599            if test "$gt_cv_func_dgettext_libc" = "yes" \
7600		&& test "$gt_cv_func_ngettext_libc" = "yes"; then
7601              gt_cv_func_dgettext_libintl=no
7602            fi
7603          fi
7604        fi
7605      fi
7606
7607      if test "$gt_cv_func_dgettext_libc" = "yes" \
7608	|| test "$gt_cv_func_dgettext_libintl" = "yes"; then
7609        gt_cv_have_gettext=yes
7610      fi
7611
7612      if test "$gt_cv_func_dgettext_libintl" = "yes"; then
7613        INTLLIBS="-lintl $libintl_extra_libs $INTL_MACOSX_LIBS"
7614      fi
7615
7616      if test "$gt_cv_have_gettext" = "yes"; then
7617
7618$as_echo "#define HAVE_GETTEXT 1" >>confdefs.h
7619
7620	# Extract the first word of "msgfmt", so it can be a program name with args.
7621set dummy msgfmt; ac_word=$2
7622{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7623$as_echo_n "checking for $ac_word... " >&6; }
7624if ${ac_cv_path_MSGFMT+:} false; then :
7625  $as_echo_n "(cached) " >&6
7626else
7627  case "$MSGFMT" in
7628  /*)
7629  ac_cv_path_MSGFMT="$MSGFMT" # Let the user override the test with a path.
7630  ;;
7631  *)
7632  IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS="${IFS}:"
7633  for ac_dir in $PATH; do
7634    test -z "$ac_dir" && ac_dir=.
7635    if test -f $ac_dir/$ac_word; then
7636      if test -z "`$ac_dir/$ac_word -h 2>&1 | grep 'dv '`"; then
7637	ac_cv_path_MSGFMT="$ac_dir/$ac_word"
7638	break
7639      fi
7640    fi
7641  done
7642  IFS="$ac_save_ifs"
7643  test -z "$ac_cv_path_MSGFMT" && ac_cv_path_MSGFMT="no"
7644  ;;
7645esac
7646fi
7647MSGFMT="$ac_cv_path_MSGFMT"
7648if test "$MSGFMT" != "no"; then
7649  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSGFMT" >&5
7650$as_echo "$MSGFMT" >&6; }
7651else
7652  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7653$as_echo "no" >&6; }
7654fi
7655	if test "$MSGFMT" != "no"; then
7656          glib_save_LIBS="$LIBS"
7657          LIBS="$LIBS $INTLLIBS"
7658	  for ac_func in dcgettext
7659do :
7660  ac_fn_c_check_func "$LINENO" "dcgettext" "ac_cv_func_dcgettext"
7661if test "x$ac_cv_func_dcgettext" = xyes; then :
7662  cat >>confdefs.h <<_ACEOF
7663#define HAVE_DCGETTEXT 1
7664_ACEOF
7665
7666fi
7667done
7668
7669	  MSGFMT_OPTS=
7670	  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if msgfmt accepts -c" >&5
7671$as_echo_n "checking if msgfmt accepts -c... " >&6; }
7672	  cat >conftest.foo <<_ACEOF
7673
7674msgid ""
7675msgstr ""
7676"Content-Type: text/plain; charset=UTF-8\n"
7677"Project-Id-Version: test 1.0\n"
7678"PO-Revision-Date: 2007-02-15 12:01+0100\n"
7679"Last-Translator: test <foo@bar.xx>\n"
7680"Language-Team: C <LL@li.org>\n"
7681"MIME-Version: 1.0\n"
7682"Content-Transfer-Encoding: 8bit\n"
7683
7684_ACEOF
7685if { { $as_echo "$as_me:${as_lineno-$LINENO}: \$MSGFMT -c -o /dev/null conftest.foo"; } >&5
7686  ($MSGFMT -c -o /dev/null conftest.foo) 2>&5
7687  ac_status=$?
7688  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
7689  test $ac_status = 0; }; then
7690  MSGFMT_OPTS=-c; { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
7691$as_echo "yes" >&6; }
7692else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7693$as_echo "no" >&6; }
7694echo "$as_me: failed input was:" >&5
7695sed 's/^/| /' conftest.foo >&5
7696fi
7697
7698	  # Extract the first word of "gmsgfmt", so it can be a program name with args.
7699set dummy gmsgfmt; ac_word=$2
7700{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7701$as_echo_n "checking for $ac_word... " >&6; }
7702if ${ac_cv_path_GMSGFMT+:} false; then :
7703  $as_echo_n "(cached) " >&6
7704else
7705  case $GMSGFMT in
7706  [\\/]* | ?:[\\/]*)
7707  ac_cv_path_GMSGFMT="$GMSGFMT" # Let the user override the test with a path.
7708  ;;
7709  *)
7710  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7711for as_dir in $PATH
7712do
7713  IFS=$as_save_IFS
7714  test -z "$as_dir" && as_dir=.
7715    for ac_exec_ext in '' $ac_executable_extensions; do
7716  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7717    ac_cv_path_GMSGFMT="$as_dir/$ac_word$ac_exec_ext"
7718    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7719    break 2
7720  fi
7721done
7722  done
7723IFS=$as_save_IFS
7724
7725  test -z "$ac_cv_path_GMSGFMT" && ac_cv_path_GMSGFMT="$MSGFMT"
7726  ;;
7727esac
7728fi
7729GMSGFMT=$ac_cv_path_GMSGFMT
7730if test -n "$GMSGFMT"; then
7731  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GMSGFMT" >&5
7732$as_echo "$GMSGFMT" >&6; }
7733else
7734  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7735$as_echo "no" >&6; }
7736fi
7737
7738
7739	  # Extract the first word of "xgettext", so it can be a program name with args.
7740set dummy xgettext; ac_word=$2
7741{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7742$as_echo_n "checking for $ac_word... " >&6; }
7743if ${ac_cv_path_XGETTEXT+:} false; then :
7744  $as_echo_n "(cached) " >&6
7745else
7746  case "$XGETTEXT" in
7747  /*)
7748  ac_cv_path_XGETTEXT="$XGETTEXT" # Let the user override the test with a path.
7749  ;;
7750  *)
7751  IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS="${IFS}:"
7752  for ac_dir in $PATH; do
7753    test -z "$ac_dir" && ac_dir=.
7754    if test -f $ac_dir/$ac_word; then
7755      if test -z "`$ac_dir/$ac_word -h 2>&1 | grep '(HELP)'`"; then
7756	ac_cv_path_XGETTEXT="$ac_dir/$ac_word"
7757	break
7758      fi
7759    fi
7760  done
7761  IFS="$ac_save_ifs"
7762  test -z "$ac_cv_path_XGETTEXT" && ac_cv_path_XGETTEXT=":"
7763  ;;
7764esac
7765fi
7766XGETTEXT="$ac_cv_path_XGETTEXT"
7767if test "$XGETTEXT" != ":"; then
7768  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XGETTEXT" >&5
7769$as_echo "$XGETTEXT" >&6; }
7770else
7771  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7772$as_echo "no" >&6; }
7773fi
7774
7775	  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7776/* end confdefs.h.  */
7777
7778int
7779main ()
7780{
7781extern int _nl_msg_cat_cntr;
7782			 return _nl_msg_cat_cntr
7783  ;
7784  return 0;
7785}
7786_ACEOF
7787if ac_fn_c_try_link "$LINENO"; then :
7788  CATOBJEXT=.gmo
7789             DATADIRNAME=share
7790else
7791  case $host in
7792	    *-*-solaris*)
7793	    	                	    	                ac_fn_c_check_func "$LINENO" "bind_textdomain_codeset" "ac_cv_func_bind_textdomain_codeset"
7794if test "x$ac_cv_func_bind_textdomain_codeset" = xyes; then :
7795  CATOBJEXT=.gmo
7796               DATADIRNAME=share
7797else
7798  CATOBJEXT=.mo
7799               DATADIRNAME=lib
7800fi
7801
7802	    ;;
7803	    *-*-openbsd*)
7804	    CATOBJEXT=.mo
7805            DATADIRNAME=share
7806	    ;;
7807	    *)
7808	    CATOBJEXT=.mo
7809            DATADIRNAME=lib
7810	    ;;
7811	    esac
7812fi
7813rm -f core conftest.err conftest.$ac_objext \
7814    conftest$ac_exeext conftest.$ac_ext
7815          LIBS="$glib_save_LIBS"
7816	  INSTOBJEXT=.mo
7817	else
7818	  gt_cv_have_gettext=no
7819	fi
7820      fi
7821
7822fi
7823
7824
7825
7826    if test "$gt_cv_have_gettext" = "yes" ; then
7827
7828$as_echo "#define ENABLE_NLS 1" >>confdefs.h
7829
7830    fi
7831
7832        if test "$XGETTEXT" != ":"; then
7833                  if $XGETTEXT --omit-header /dev/null 2> /dev/null; then
7834        : ;
7835      else
7836        { $as_echo "$as_me:${as_lineno-$LINENO}: result: found xgettext program is not GNU xgettext; ignore it" >&5
7837$as_echo "found xgettext program is not GNU xgettext; ignore it" >&6; }
7838        XGETTEXT=":"
7839      fi
7840    fi
7841
7842    # We need to process the po/ directory.
7843    POSUB=po
7844
7845    ac_config_commands="$ac_config_commands default-1"
7846
7847
7848                for lang in $ALL_LINGUAS; do
7849      GMOFILES="$GMOFILES $lang.gmo"
7850      POFILES="$POFILES $lang.po"
7851    done
7852
7853
7854
7855
7856
7857
7858
7859
7860
7861
7862
7863
7864
7865   if test "$gt_cv_have_gettext" = "yes"; then
7866     if test "x$ALL_LINGUAS" = "x"; then
7867       LINGUAS=
7868     else
7869       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for catalogs to be installed" >&5
7870$as_echo_n "checking for catalogs to be installed... " >&6; }
7871       NEW_LINGUAS=
7872       for presentlang in $ALL_LINGUAS; do
7873         useit=no
7874         if test "%UNSET%" != "${LINGUAS-%UNSET%}"; then
7875           desiredlanguages="$LINGUAS"
7876         else
7877           desiredlanguages="$ALL_LINGUAS"
7878         fi
7879         for desiredlang in $desiredlanguages; do
7880 	   # Use the presentlang catalog if desiredlang is
7881           #   a. equal to presentlang, or
7882           #   b. a variant of presentlang (because in this case,
7883           #      presentlang can be used as a fallback for messages
7884           #      which are not translated in the desiredlang catalog).
7885           case "$desiredlang" in
7886             "$presentlang"*) useit=yes;;
7887           esac
7888         done
7889         if test $useit = yes; then
7890           NEW_LINGUAS="$NEW_LINGUAS $presentlang"
7891         fi
7892       done
7893       LINGUAS=$NEW_LINGUAS
7894       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LINGUAS" >&5
7895$as_echo "$LINGUAS" >&6; }
7896     fi
7897
7898          if test -n "$LINGUAS"; then
7899       for lang in $LINGUAS; do CATALOGS="$CATALOGS $lang$CATOBJEXT"; done
7900     fi
7901   fi
7902
7903            MKINSTALLDIRS=
7904   if test -n "$ac_aux_dir"; then
7905     MKINSTALLDIRS="$ac_aux_dir/mkinstalldirs"
7906   fi
7907   if test -z "$MKINSTALLDIRS"; then
7908     MKINSTALLDIRS="\$(top_srcdir)/mkinstalldirs"
7909   fi
7910
7911
7912         test -d po || mkdir po
7913   if test "x$srcdir" != "x."; then
7914     if test "x`echo $srcdir | sed 's@/.*@@'`" = "x"; then
7915       posrcprefix="$srcdir/"
7916     else
7917       posrcprefix="../$srcdir/"
7918     fi
7919   else
7920     posrcprefix="../"
7921   fi
7922   rm -f po/POTFILES
7923   sed -e "/^#/d" -e "/^\$/d" -e "s,.*,	$posrcprefix& \\\\," -e "\$s/\(.*\) \\\\/\1/" \
7924	< $srcdir/po/POTFILES.in > po/POTFILES
7925
7926MKINSTALLDIRS="$INSTALL_DIRS"
7927
7928
7929###############################################################################
7930#
7931#       The --with-x-app-defaults option
7932#
7933###############################################################################
7934
7935#### H1
7936
7937
7938# Check whether --with-app-defaults was given.
7939if test "${with_app_defaults+set}" = set; then :
7940  withval=$with_app_defaults; ac_cv_x_app_defaults="$withval"
7941else
7942  eval ac_x_app_defaults="$withval"
7943fi
7944
7945
7946    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for X app-defaults directory" >&5
7947$as_echo_n "checking for X app-defaults directory... " >&6; }
7948if ${ac_cv_x_app_defaults+:} false; then :
7949  $as_echo_n "(cached) " >&6
7950else
7951  # skip this, it's always wrong these days.
7952      #  AC_PATH_X_APP_DEFAULTS_XMKMF
7953      if test x"$ac_x_app_defaults" = x; then
7954        true
7955  # Look for the directory under a standard set of common directories.
7956  # Check X11 before X11Rn because it's often a symlink to the current release.
7957  for ac_dir in                                 \
7958                                                \
7959    /usr/share/X11/app-defaults                 \
7960                                                \
7961    /usr/X11/lib/app-defaults                   \
7962    /usr/X11R6/lib/app-defaults                 \
7963    /usr/X11R6/lib/X11/app-defaults             \
7964    /usr/X11R5/lib/app-defaults                 \
7965    /usr/X11R5/lib/X11/app-defaults             \
7966    /usr/X11R4/lib/app-defaults                 \
7967    /usr/X11R4/lib/X11/app-defaults             \
7968                                                \
7969    /usr/lib/X11/app-defaults                   \
7970    /usr/lib/X11R6/app-defaults                 \
7971    /usr/lib/X11R5/app-defaults                 \
7972    /usr/lib/X11R4/app-defaults                 \
7973                                                \
7974    /etc/X11/app-defaults                       \
7975                                                \
7976    /usr/local/X11/lib/app-defaults             \
7977    /usr/local/X11R6/lib/app-defaults           \
7978    /usr/local/X11R5/lib/app-defaults           \
7979    /usr/local/X11R4/lib/app-defaults           \
7980                                                \
7981    /usr/local/lib/X11/app-defaults             \
7982    /usr/local/lib/X11R6/app-defaults           \
7983    /usr/local/lib/X11R6/X11/app-defaults       \
7984    /usr/local/lib/X11R5/app-defaults           \
7985    /usr/local/lib/X11R5/X11/app-defaults       \
7986    /usr/local/lib/X11R4/app-defaults           \
7987    /usr/local/lib/X11R4/X11/app-defaults       \
7988                                                \
7989    /usr/X386/lib/X11/app-defaults              \
7990    /usr/x386/lib/X11/app-defaults              \
7991    /usr/XFree86/lib/X11/app-defaults           \
7992                                                \
7993    /usr/lib/X11/app-defaults                   \
7994    /usr/local/lib/X11/app-defaults             \
7995    /usr/unsupported/lib/X11/app-defaults       \
7996    /usr/athena/lib/X11/app-defaults            \
7997    /usr/local/x11r5/lib/X11/app-defaults       \
7998    /usr/lpp/Xamples/lib/X11/app-defaults       \
7999    /lib/usr/lib/X11/app-defaults               \
8000                                                \
8001    /usr/openwin/lib/app-defaults               \
8002    /usr/openwin/lib/X11/app-defaults           \
8003    /usr/openwin/share/lib/app-defaults         \
8004    /usr/openwin/share/lib/X11/app-defaults     \
8005                                                \
8006    /X11R6/lib/app-defaults                     \
8007    /X11R5/lib/app-defaults                     \
8008    /X11R4/lib/app-defaults                     \
8009    ; \
8010  do
8011    if test -d "$ac_dir"; then
8012      ac_x_app_defaults=$ac_dir
8013      break
8014    fi
8015  done
8016
8017      fi
8018      if test x"$ac_x_app_defaults" = x; then
8019        /bin/echo -n 'fallback: '
8020        ac_cv_x_app_defaults="/usr/lib/X11/app-defaults"
8021      else
8022        # Record where we found app-defaults for the cache.
8023        ac_cv_x_app_defaults="$ac_x_app_defaults"
8024      fi
8025fi
8026{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_x_app_defaults" >&5
8027$as_echo "$ac_cv_x_app_defaults" >&6; }
8028    eval ac_x_app_defaults="$ac_cv_x_app_defaults"
8029
8030
8031###############################################################################
8032#
8033#       Handle the --with-hackdir option
8034#
8035###############################################################################
8036
8037have_hackdir=yes
8038with_hackdir_req=unspecified
8039
8040# Check whether --with-hackdir was given.
8041if test "${with_hackdir+set}" = set; then :
8042  withval=$with_hackdir; with_hackdir="$withval"; with_hackdir_req="$withval"
8043else
8044  with_hackdir=yes
8045fi
8046
8047
8048if test x"$with_hackdir" = xyes; then
8049  HACKDIR='${libexecdir}/xscreensaver'
8050elif test x"$with_hackdir" = xno; then
8051  HACKDIR='${bindir}'
8052else
8053  HACKDIR=$with_hackdir
8054fi
8055
8056# canonicalize slashes.
8057HACKDIR=`echo "${HACKDIR}" | sed 's@/$@@;s@//*@/@g'`
8058
8059# Expand HACKDIR as HACKDIR_FULL
8060HACKDIR_FULL=`eval eval eval eval eval eval eval eval eval echo $HACKDIR`
8061
8062# This option used to be called --enable-subdir; make sure that is no longer
8063# used, since configure brain-damagedly ignores unknown --enable options.
8064
8065obsolete_enable=
8066# Check whether --enable-subdir was given.
8067if test "${enable_subdir+set}" = set; then :
8068  enableval=$enable_subdir; obsolete_enable=yes
8069fi
8070
8071if test -n "$obsolete_enable"; then
8072  echo "error: the --enable-subdir option has been replaced with"
8073  echo "       the new --with-hackdir option; see \`configure --help'"
8074  echo "       for more information."
8075  exit 1
8076fi
8077
8078
8079###############################################################################
8080#
8081#       Handle the --with-configdir option
8082#
8083###############################################################################
8084
8085have_configdir=yes
8086with_configdir_req=unspecified
8087
8088# Check whether --with-configdir was given.
8089if test "${with_configdir+set}" = set; then :
8090  withval=$with_configdir; with_configdir="$withval"; with_configdir_req="$withval"
8091else
8092  with_configdir=yes
8093fi
8094
8095
8096if test x"$with_configdir" = xyes; then
8097  HACK_CONF_DIR='${datadir}/xscreensaver/config'
8098elif test x"$with_configdir" = xno; then
8099  echo "error: must be yes, or a pathname: --with-configdir=$with_configdir"
8100  exit 1
8101else
8102  # there must be a better way than this...
8103  if test -z "`echo $with_configdir | sed 's@^/.*@@'`" ; then
8104    # absolute path
8105    HACK_CONF_DIR=$with_configdir
8106  else
8107    # relative path
8108    HACK_CONF_DIR="\${exec_prefix}$with_configdir"
8109  fi
8110fi
8111
8112
8113
8114###############################################################################
8115#
8116#       Handle the --with-fontdir option
8117#
8118###############################################################################
8119
8120have_fontdir=yes
8121with_fontdir_req=unspecified
8122
8123# Check whether --with-fontdir was given.
8124if test "${with_fontdir+set}" = set; then :
8125  withval=$with_fontdir; with_fontdir="$withval"; with_fontdir_req="$withval"
8126else
8127  with_fontdir=yes
8128fi
8129
8130
8131if test x"$with_fontdir" = xyes; then
8132  FONT_DIR='${datarootdir}/fonts/xscreensaver'
8133  if test "$ac_macosx" = yes; then
8134    FONT_DIR='/Library/Fonts'
8135  fi
8136elif test x"$with_fontdir" = xno; then
8137  FONT_DIR=''
8138else
8139  # there must be a better way than this...
8140  if test -z "`echo $with_fontdir | sed 's@^/.*@@'`" ; then
8141    # absolute path
8142    FONT_DIR="$with_fontdir"
8143  else
8144    # relative path
8145    FONT_DIR='${datarootdir}/fonts/'"$with_fontdir"
8146  fi
8147fi
8148
8149
8150
8151###############################################################################
8152#
8153#       Check for the DPMS server extension.
8154#
8155###############################################################################
8156
8157#### H1
8158
8159have_dpms=no
8160with_dpms_req=unspecified
8161
8162# Check whether --with-dpms-ext was given.
8163if test "${with_dpms_ext+set}" = set; then :
8164  withval=$with_dpms_ext; with_dpms="$withval"; with_dpms_req="$withval"
8165else
8166  with_dpms=yes
8167fi
8168
8169
8170
8171   case "$with_dpms" in
8172    yes) ;;
8173    no)  ;;
8174
8175    /*)
8176     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DPMS headers" >&5
8177$as_echo_n "checking for DPMS headers... " >&6; }
8178     d=$with_dpms/include
8179     if test -d $d; then
8180       X_CFLAGS="-I$d $X_CFLAGS"
8181       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $d" >&5
8182$as_echo "$d" >&6; }
8183     else
8184       { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found ($d: no such directory)" >&5
8185$as_echo "not found ($d: no such directory)" >&6; }
8186     fi
8187
8188     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DPMS libs" >&5
8189$as_echo_n "checking for DPMS libs... " >&6; }
8190     d=$with_dpms/lib
8191     if test -d $d; then
8192       X_LIBS="-L$d $X_LIBS"
8193       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $d" >&5
8194$as_echo "$d" >&6; }
8195     else
8196       { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found ($d: no such directory)" >&5
8197$as_echo "not found ($d: no such directory)" >&6; }
8198     fi
8199
8200     # replace the directory string with "yes".
8201     with_dpms_req="yes"
8202     with_dpms=$with_dpms_req
8203     ;;
8204
8205    *)
8206     echo ""
8207     echo "error: argument to --with-dpms-ext must be \"yes\", \"no\", or a directory."
8208     echo "       If it is a directory, then \`DIR/include' will be added to"
8209     echo "       the -I list, and \`DIR/lib' will be added to the -L list."
8210     exit 1
8211     ;;
8212   esac
8213
8214
8215if test "$with_dpms" = yes; then
8216
8217  # first check for dpms.h
8218
8219  ac_save_CPPFLAGS="$CPPFLAGS"
8220  if test \! -z "$includedir" ; then
8221    CPPFLAGS="$CPPFLAGS -I$includedir"
8222  fi
8223  CPPFLAGS="$CPPFLAGS $X_CFLAGS"
8224  CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
8225  ac_fn_c_check_header_compile "$LINENO" "X11/extensions/dpms.h" "ac_cv_header_X11_extensions_dpms_h" "#include <X11/Xlib.h>
8226		     #include <X11/Xmd.h>
8227"
8228if test "x$ac_cv_header_X11_extensions_dpms_h" = xyes; then :
8229  have_dpms=yes
8230fi
8231
8232
8233  CPPFLAGS="$ac_save_CPPFLAGS"
8234
8235  # if that succeeded, then check for the DPMS code in the libraries
8236  if test "$have_dpms" = yes; then
8237
8238    # first look in -lXext (this is where it is with XFree86 4.0)
8239    have_dpms=no
8240
8241  ac_save_CPPFLAGS="$CPPFLAGS"
8242  ac_save_LDFLAGS="$LDFLAGS"
8243#  ac_save_LIBS="$LIBS"
8244
8245  if test \! -z "$includedir" ; then
8246    CPPFLAGS="$CPPFLAGS -I$includedir"
8247  fi
8248  # note: $X_CFLAGS includes $x_includes
8249  CPPFLAGS="$CPPFLAGS $X_CFLAGS"
8250
8251  if test \! -z "$libdir" ; then
8252    LDFLAGS="$LDFLAGS -L$libdir"
8253  fi
8254  # note: $X_LIBS includes $x_libraries
8255  LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
8256
8257  CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
8258  LDFLAGS=`eval eval eval eval eval eval eval eval eval echo $LDFLAGS`
8259  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DPMSInfo in -lXext" >&5
8260$as_echo_n "checking for DPMSInfo in -lXext... " >&6; }
8261if ${ac_cv_lib_Xext_DPMSInfo+:} false; then :
8262  $as_echo_n "(cached) " >&6
8263else
8264  ac_check_lib_save_LIBS=$LIBS
8265LIBS="-lXext -lXext -lX11 $LIBS"
8266cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8267/* end confdefs.h.  */
8268
8269/* Override any GCC internal prototype to avoid an error.
8270   Use char because int might match the return type of a GCC
8271   builtin and then its argument prototype would still apply.  */
8272#ifdef __cplusplus
8273extern "C"
8274#endif
8275char DPMSInfo ();
8276int
8277main ()
8278{
8279return DPMSInfo ();
8280  ;
8281  return 0;
8282}
8283_ACEOF
8284if ac_fn_c_try_link "$LINENO"; then :
8285  ac_cv_lib_Xext_DPMSInfo=yes
8286else
8287  ac_cv_lib_Xext_DPMSInfo=no
8288fi
8289rm -f core conftest.err conftest.$ac_objext \
8290    conftest$ac_exeext conftest.$ac_ext
8291LIBS=$ac_check_lib_save_LIBS
8292fi
8293{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_Xext_DPMSInfo" >&5
8294$as_echo "$ac_cv_lib_Xext_DPMSInfo" >&6; }
8295if test "x$ac_cv_lib_Xext_DPMSInfo" = xyes; then :
8296  have_dpms=yes
8297else
8298  true
8299fi
8300
8301  CPPFLAGS="$ac_save_CPPFLAGS"
8302  LDFLAGS="$ac_save_LDFLAGS"
8303#  LIBS="$ac_save_LIBS"
8304
8305
8306    # if that failed, look in -lXdpms (this is where it was in XFree86 3.x)
8307    if test "$have_dpms" = no; then
8308
8309  ac_save_CPPFLAGS="$CPPFLAGS"
8310  ac_save_LDFLAGS="$LDFLAGS"
8311#  ac_save_LIBS="$LIBS"
8312
8313  if test \! -z "$includedir" ; then
8314    CPPFLAGS="$CPPFLAGS -I$includedir"
8315  fi
8316  # note: $X_CFLAGS includes $x_includes
8317  CPPFLAGS="$CPPFLAGS $X_CFLAGS"
8318
8319  if test \! -z "$libdir" ; then
8320    LDFLAGS="$LDFLAGS -L$libdir"
8321  fi
8322  # note: $X_LIBS includes $x_libraries
8323  LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
8324
8325  CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
8326  LDFLAGS=`eval eval eval eval eval eval eval eval eval echo $LDFLAGS`
8327  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DPMSInfo in -lXdpms" >&5
8328$as_echo_n "checking for DPMSInfo in -lXdpms... " >&6; }
8329if ${ac_cv_lib_Xdpms_DPMSInfo+:} false; then :
8330  $as_echo_n "(cached) " >&6
8331else
8332  ac_check_lib_save_LIBS=$LIBS
8333LIBS="-lXdpms -lXext -lX11 $LIBS"
8334cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8335/* end confdefs.h.  */
8336
8337/* Override any GCC internal prototype to avoid an error.
8338   Use char because int might match the return type of a GCC
8339   builtin and then its argument prototype would still apply.  */
8340#ifdef __cplusplus
8341extern "C"
8342#endif
8343char DPMSInfo ();
8344int
8345main ()
8346{
8347return DPMSInfo ();
8348  ;
8349  return 0;
8350}
8351_ACEOF
8352if ac_fn_c_try_link "$LINENO"; then :
8353  ac_cv_lib_Xdpms_DPMSInfo=yes
8354else
8355  ac_cv_lib_Xdpms_DPMSInfo=no
8356fi
8357rm -f core conftest.err conftest.$ac_objext \
8358    conftest$ac_exeext conftest.$ac_ext
8359LIBS=$ac_check_lib_save_LIBS
8360fi
8361{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_Xdpms_DPMSInfo" >&5
8362$as_echo "$ac_cv_lib_Xdpms_DPMSInfo" >&6; }
8363if test "x$ac_cv_lib_Xdpms_DPMSInfo" = xyes; then :
8364  have_dpms=yes; XDPMS_LIBS="-lXdpms"
8365else
8366  true
8367fi
8368
8369  CPPFLAGS="$ac_save_CPPFLAGS"
8370  LDFLAGS="$ac_save_LDFLAGS"
8371#  LIBS="$ac_save_LIBS"
8372
8373    fi
8374  fi
8375
8376
8377  # if that succeeded, then we've really got it.
8378  if test "$have_dpms" = yes; then
8379    $as_echo "#define HAVE_DPMS_EXTENSION 1" >>confdefs.h
8380
8381  fi
8382
8383elif test "$with_dpms" != no; then
8384  echo "error: must be yes or no: --with-dpms-ext=$with_dpms"
8385  exit 1
8386fi
8387
8388
8389###############################################################################
8390#
8391#       Check for the XF86VMODE server extension (for virtual screens.)
8392#
8393###############################################################################
8394
8395have_xf86vmode=no
8396with_xf86vmode_req=unspecified
8397
8398# Check whether --with-xf86vmode-ext was given.
8399if test "${with_xf86vmode_ext+set}" = set; then :
8400  withval=$with_xf86vmode_ext; with_xf86vmode="$withval"; with_xf86vmode_req="$withval"
8401else
8402  with_xf86vmode=yes
8403fi
8404
8405
8406
8407   case "$with_xf86vmode" in
8408    yes) ;;
8409    no)  ;;
8410
8411    /*)
8412     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for xf86vmode headers" >&5
8413$as_echo_n "checking for xf86vmode headers... " >&6; }
8414     d=$with_xf86vmode/include
8415     if test -d $d; then
8416       X_CFLAGS="-I$d $X_CFLAGS"
8417       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $d" >&5
8418$as_echo "$d" >&6; }
8419     else
8420       { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found ($d: no such directory)" >&5
8421$as_echo "not found ($d: no such directory)" >&6; }
8422     fi
8423
8424     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for xf86vmode libs" >&5
8425$as_echo_n "checking for xf86vmode libs... " >&6; }
8426     d=$with_xf86vmode/lib
8427     if test -d $d; then
8428       X_LIBS="-L$d $X_LIBS"
8429       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $d" >&5
8430$as_echo "$d" >&6; }
8431     else
8432       { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found ($d: no such directory)" >&5
8433$as_echo "not found ($d: no such directory)" >&6; }
8434     fi
8435
8436     # replace the directory string with "yes".
8437     with_xf86vmode_req="yes"
8438     with_xf86vmode=$with_xf86vmode_req
8439     ;;
8440
8441    *)
8442     echo ""
8443     echo "error: argument to --with-xf86vmode-ext must be \"yes\", \"no\", or a directory."
8444     echo "       If it is a directory, then \`DIR/include' will be added to"
8445     echo "       the -I list, and \`DIR/lib' will be added to the -L list."
8446     exit 1
8447     ;;
8448   esac
8449
8450
8451VIDMODE_LIBS=""
8452
8453if test "$with_xf86vmode" = yes; then
8454
8455  # first check for xf86vmode.h
8456
8457  ac_save_CPPFLAGS="$CPPFLAGS"
8458  if test \! -z "$includedir" ; then
8459    CPPFLAGS="$CPPFLAGS -I$includedir"
8460  fi
8461  CPPFLAGS="$CPPFLAGS $X_CFLAGS"
8462  CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
8463  ac_fn_c_check_header_compile "$LINENO" "X11/extensions/xf86vmode.h" "ac_cv_header_X11_extensions_xf86vmode_h" "#include <X11/Xlib.h>
8464"
8465if test "x$ac_cv_header_X11_extensions_xf86vmode_h" = xyes; then :
8466  have_xf86vmode=yes
8467fi
8468
8469
8470  CPPFLAGS="$ac_save_CPPFLAGS"
8471
8472  # if that succeeded, then check for the -lXxf86vm
8473  if test "$have_xf86vmode" = yes; then
8474    have_xf86vmode=no
8475
8476  ac_save_CPPFLAGS="$CPPFLAGS"
8477  ac_save_LDFLAGS="$LDFLAGS"
8478#  ac_save_LIBS="$LIBS"
8479
8480  if test \! -z "$includedir" ; then
8481    CPPFLAGS="$CPPFLAGS -I$includedir"
8482  fi
8483  # note: $X_CFLAGS includes $x_includes
8484  CPPFLAGS="$CPPFLAGS $X_CFLAGS"
8485
8486  if test \! -z "$libdir" ; then
8487    LDFLAGS="$LDFLAGS -L$libdir"
8488  fi
8489  # note: $X_LIBS includes $x_libraries
8490  LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
8491
8492  CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
8493  LDFLAGS=`eval eval eval eval eval eval eval eval eval echo $LDFLAGS`
8494  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XF86VidModeGetViewPort in -lXxf86vm" >&5
8495$as_echo_n "checking for XF86VidModeGetViewPort in -lXxf86vm... " >&6; }
8496if ${ac_cv_lib_Xxf86vm_XF86VidModeGetViewPort+:} false; then :
8497  $as_echo_n "(cached) " >&6
8498else
8499  ac_check_lib_save_LIBS=$LIBS
8500LIBS="-lXxf86vm -lXext -lX11 $LIBS"
8501cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8502/* end confdefs.h.  */
8503
8504/* Override any GCC internal prototype to avoid an error.
8505   Use char because int might match the return type of a GCC
8506   builtin and then its argument prototype would still apply.  */
8507#ifdef __cplusplus
8508extern "C"
8509#endif
8510char XF86VidModeGetViewPort ();
8511int
8512main ()
8513{
8514return XF86VidModeGetViewPort ();
8515  ;
8516  return 0;
8517}
8518_ACEOF
8519if ac_fn_c_try_link "$LINENO"; then :
8520  ac_cv_lib_Xxf86vm_XF86VidModeGetViewPort=yes
8521else
8522  ac_cv_lib_Xxf86vm_XF86VidModeGetViewPort=no
8523fi
8524rm -f core conftest.err conftest.$ac_objext \
8525    conftest$ac_exeext conftest.$ac_ext
8526LIBS=$ac_check_lib_save_LIBS
8527fi
8528{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_Xxf86vm_XF86VidModeGetViewPort" >&5
8529$as_echo "$ac_cv_lib_Xxf86vm_XF86VidModeGetViewPort" >&6; }
8530if test "x$ac_cv_lib_Xxf86vm_XF86VidModeGetViewPort" = xyes; then :
8531  have_xf86vmode=yes;
8532                   VIDMODE_LIBS="-lXxf86vm";
8533                   SAVER_LIBS="$SAVER_LIBS $VIDMODE_LIBS"
8534else
8535  true
8536fi
8537
8538  CPPFLAGS="$ac_save_CPPFLAGS"
8539  LDFLAGS="$ac_save_LDFLAGS"
8540#  LIBS="$ac_save_LIBS"
8541
8542  fi
8543
8544  # if that succeeded, then we've really got it.
8545  if test "$have_xf86vmode" = yes; then
8546    $as_echo "#define HAVE_XF86VMODE 1" >>confdefs.h
8547
8548  fi
8549
8550elif test "$with_xf86vmode" != no; then
8551  echo "error: must be yes or no: --with-xf86vmode-ext=$with_xf86vmode"
8552  exit 1
8553fi
8554
8555
8556###############################################################################
8557#
8558#       Check for the XINERAMA server extension.
8559#
8560###############################################################################
8561
8562have_xinerama=no
8563with_xinerama_req=unspecified
8564
8565# Check whether --with-xinerama-ext was given.
8566if test "${with_xinerama_ext+set}" = set; then :
8567  withval=$with_xinerama_ext; with_xinerama="$withval"; with_xinerama_req="$withval"
8568else
8569  with_xinerama=yes
8570fi
8571
8572
8573
8574   case "$with_xinerama" in
8575    yes) ;;
8576    no)  ;;
8577
8578    /*)
8579     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XINERAMA headers" >&5
8580$as_echo_n "checking for XINERAMA headers... " >&6; }
8581     d=$with_xinerama/include
8582     if test -d $d; then
8583       X_CFLAGS="-I$d $X_CFLAGS"
8584       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $d" >&5
8585$as_echo "$d" >&6; }
8586     else
8587       { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found ($d: no such directory)" >&5
8588$as_echo "not found ($d: no such directory)" >&6; }
8589     fi
8590
8591     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XINERAMA libs" >&5
8592$as_echo_n "checking for XINERAMA libs... " >&6; }
8593     d=$with_xinerama/lib
8594     if test -d $d; then
8595       X_LIBS="-L$d $X_LIBS"
8596       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $d" >&5
8597$as_echo "$d" >&6; }
8598     else
8599       { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found ($d: no such directory)" >&5
8600$as_echo "not found ($d: no such directory)" >&6; }
8601     fi
8602
8603     # replace the directory string with "yes".
8604     with_xinerama_req="yes"
8605     with_xinerama=$with_xinerama_req
8606     ;;
8607
8608    *)
8609     echo ""
8610     echo "error: argument to --with-xinerama-ext must be \"yes\", \"no\", or a directory."
8611     echo "       If it is a directory, then \`DIR/include' will be added to"
8612     echo "       the -I list, and \`DIR/lib' will be added to the -L list."
8613     exit 1
8614     ;;
8615   esac
8616
8617
8618if test "$with_xinerama" = yes; then
8619
8620  # first check for Xinerama.h
8621
8622  ac_save_CPPFLAGS="$CPPFLAGS"
8623  if test \! -z "$includedir" ; then
8624    CPPFLAGS="$CPPFLAGS -I$includedir"
8625  fi
8626  CPPFLAGS="$CPPFLAGS $X_CFLAGS"
8627  CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
8628  ac_fn_c_check_header_compile "$LINENO" "X11/extensions/Xinerama.h" "ac_cv_header_X11_extensions_Xinerama_h" "#include <X11/Xlib.h>
8629"
8630if test "x$ac_cv_header_X11_extensions_Xinerama_h" = xyes; then :
8631  have_xinerama=yes
8632fi
8633
8634
8635  CPPFLAGS="$ac_save_CPPFLAGS"
8636
8637  # if that succeeded, then check for the XINERAMA code in the libraries
8638  if test "$have_xinerama" = yes; then
8639
8640    # first look in -lXext
8641    have_xinerama=no
8642
8643  ac_save_CPPFLAGS="$CPPFLAGS"
8644  ac_save_LDFLAGS="$LDFLAGS"
8645#  ac_save_LIBS="$LIBS"
8646
8647  if test \! -z "$includedir" ; then
8648    CPPFLAGS="$CPPFLAGS -I$includedir"
8649  fi
8650  # note: $X_CFLAGS includes $x_includes
8651  CPPFLAGS="$CPPFLAGS $X_CFLAGS"
8652
8653  if test \! -z "$libdir" ; then
8654    LDFLAGS="$LDFLAGS -L$libdir"
8655  fi
8656  # note: $X_LIBS includes $x_libraries
8657  LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
8658
8659  CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
8660  LDFLAGS=`eval eval eval eval eval eval eval eval eval echo $LDFLAGS`
8661  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XineramaQueryScreens in -lXext" >&5
8662$as_echo_n "checking for XineramaQueryScreens in -lXext... " >&6; }
8663if ${ac_cv_lib_Xext_XineramaQueryScreens+:} false; then :
8664  $as_echo_n "(cached) " >&6
8665else
8666  ac_check_lib_save_LIBS=$LIBS
8667LIBS="-lXext -lXext -lX11 $LIBS"
8668cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8669/* end confdefs.h.  */
8670
8671/* Override any GCC internal prototype to avoid an error.
8672   Use char because int might match the return type of a GCC
8673   builtin and then its argument prototype would still apply.  */
8674#ifdef __cplusplus
8675extern "C"
8676#endif
8677char XineramaQueryScreens ();
8678int
8679main ()
8680{
8681return XineramaQueryScreens ();
8682  ;
8683  return 0;
8684}
8685_ACEOF
8686if ac_fn_c_try_link "$LINENO"; then :
8687  ac_cv_lib_Xext_XineramaQueryScreens=yes
8688else
8689  ac_cv_lib_Xext_XineramaQueryScreens=no
8690fi
8691rm -f core conftest.err conftest.$ac_objext \
8692    conftest$ac_exeext conftest.$ac_ext
8693LIBS=$ac_check_lib_save_LIBS
8694fi
8695{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_Xext_XineramaQueryScreens" >&5
8696$as_echo "$ac_cv_lib_Xext_XineramaQueryScreens" >&6; }
8697if test "x$ac_cv_lib_Xext_XineramaQueryScreens" = xyes; then :
8698  have_xinerama=yes
8699else
8700  true
8701fi
8702
8703  CPPFLAGS="$ac_save_CPPFLAGS"
8704  LDFLAGS="$ac_save_LDFLAGS"
8705#  LIBS="$ac_save_LIBS"
8706
8707
8708    # if that failed, look in -lXinerama (this is where it is in XFree86 4.1.)
8709    if test "$have_xinerama" = no; then
8710
8711  ac_save_CPPFLAGS="$CPPFLAGS"
8712  ac_save_LDFLAGS="$LDFLAGS"
8713#  ac_save_LIBS="$LIBS"
8714
8715  if test \! -z "$includedir" ; then
8716    CPPFLAGS="$CPPFLAGS -I$includedir"
8717  fi
8718  # note: $X_CFLAGS includes $x_includes
8719  CPPFLAGS="$CPPFLAGS $X_CFLAGS"
8720
8721  if test \! -z "$libdir" ; then
8722    LDFLAGS="$LDFLAGS -L$libdir"
8723  fi
8724  # note: $X_LIBS includes $x_libraries
8725  LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
8726
8727  CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
8728  LDFLAGS=`eval eval eval eval eval eval eval eval eval echo $LDFLAGS`
8729  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XineramaQueryScreens in -lXinerama" >&5
8730$as_echo_n "checking for XineramaQueryScreens in -lXinerama... " >&6; }
8731if ${ac_cv_lib_Xinerama_XineramaQueryScreens+:} false; then :
8732  $as_echo_n "(cached) " >&6
8733else
8734  ac_check_lib_save_LIBS=$LIBS
8735LIBS="-lXinerama -lXext -lX11 $LIBS"
8736cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8737/* end confdefs.h.  */
8738
8739/* Override any GCC internal prototype to avoid an error.
8740   Use char because int might match the return type of a GCC
8741   builtin and then its argument prototype would still apply.  */
8742#ifdef __cplusplus
8743extern "C"
8744#endif
8745char XineramaQueryScreens ();
8746int
8747main ()
8748{
8749return XineramaQueryScreens ();
8750  ;
8751  return 0;
8752}
8753_ACEOF
8754if ac_fn_c_try_link "$LINENO"; then :
8755  ac_cv_lib_Xinerama_XineramaQueryScreens=yes
8756else
8757  ac_cv_lib_Xinerama_XineramaQueryScreens=no
8758fi
8759rm -f core conftest.err conftest.$ac_objext \
8760    conftest$ac_exeext conftest.$ac_ext
8761LIBS=$ac_check_lib_save_LIBS
8762fi
8763{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_Xinerama_XineramaQueryScreens" >&5
8764$as_echo "$ac_cv_lib_Xinerama_XineramaQueryScreens" >&6; }
8765if test "x$ac_cv_lib_Xinerama_XineramaQueryScreens" = xyes; then :
8766  have_xinerama=yes; XINERAMA_LIBS="-lXinerama"
8767else
8768  true
8769fi
8770
8771  CPPFLAGS="$ac_save_CPPFLAGS"
8772  LDFLAGS="$ac_save_LDFLAGS"
8773#  LIBS="$ac_save_LIBS"
8774
8775    fi
8776  fi
8777
8778  # if that succeeded, then we've really got it.
8779  if test "$have_xinerama" = yes; then
8780    $as_echo "#define HAVE_XINERAMA 1" >>confdefs.h
8781
8782  fi
8783
8784elif test "$with_xinerama" != no; then
8785  echo "error: must be yes or no: --with-xinerama-ext=$with_xinerama"
8786  exit 1
8787fi
8788
8789
8790###############################################################################
8791#
8792#       Check for the RANDR (Resize and Rotate) server extension.
8793#
8794#       We need this to detect when the resolution of the desktop
8795#       has changed out from under us (this is a newer, different
8796#       mechanism than the XF86VMODE virtual viewports.)
8797#
8798###############################################################################
8799
8800have_randr=no
8801with_randr_req=unspecified
8802
8803# Check whether --with-randr-ext was given.
8804if test "${with_randr_ext+set}" = set; then :
8805  withval=$with_randr_ext; with_randr="$withval"; with_randr_req="$withval"
8806else
8807  with_randr=yes
8808fi
8809
8810
8811
8812   case "$with_randr" in
8813    yes) ;;
8814    no)  ;;
8815
8816    /*)
8817     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for RANDR headers" >&5
8818$as_echo_n "checking for RANDR headers... " >&6; }
8819     d=$with_randr/include
8820     if test -d $d; then
8821       X_CFLAGS="-I$d $X_CFLAGS"
8822       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $d" >&5
8823$as_echo "$d" >&6; }
8824     else
8825       { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found ($d: no such directory)" >&5
8826$as_echo "not found ($d: no such directory)" >&6; }
8827     fi
8828
8829     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for RANDR libs" >&5
8830$as_echo_n "checking for RANDR libs... " >&6; }
8831     d=$with_randr/lib
8832     if test -d $d; then
8833       X_LIBS="-L$d $X_LIBS"
8834       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $d" >&5
8835$as_echo "$d" >&6; }
8836     else
8837       { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found ($d: no such directory)" >&5
8838$as_echo "not found ($d: no such directory)" >&6; }
8839     fi
8840
8841     # replace the directory string with "yes".
8842     with_randr_req="yes"
8843     with_randr=$with_randr_req
8844     ;;
8845
8846    *)
8847     echo ""
8848     echo "error: argument to --with-randr-ext must be \"yes\", \"no\", or a directory."
8849     echo "       If it is a directory, then \`DIR/include' will be added to"
8850     echo "       the -I list, and \`DIR/lib' will be added to the -L list."
8851     exit 1
8852     ;;
8853   esac
8854
8855
8856if test "$with_randr" = yes; then
8857
8858  # first check for Xrandr.h
8859
8860  ac_save_CPPFLAGS="$CPPFLAGS"
8861  if test \! -z "$includedir" ; then
8862    CPPFLAGS="$CPPFLAGS -I$includedir"
8863  fi
8864  CPPFLAGS="$CPPFLAGS $X_CFLAGS"
8865  CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
8866  ac_fn_c_check_header_compile "$LINENO" "X11/extensions/Xrandr.h" "ac_cv_header_X11_extensions_Xrandr_h" "#include <X11/Xlib.h>
8867"
8868if test "x$ac_cv_header_X11_extensions_Xrandr_h" = xyes; then :
8869  have_randr=yes
8870fi
8871
8872
8873  CPPFLAGS="$ac_save_CPPFLAGS"
8874
8875  # if that succeeded, then check for the XRR code in the libraries
8876  if test "$have_randr" = yes; then
8877
8878    # RANDR probably needs -lXrender
8879    xrender_libs=
8880
8881  ac_save_CPPFLAGS="$CPPFLAGS"
8882  ac_save_LDFLAGS="$LDFLAGS"
8883#  ac_save_LIBS="$LIBS"
8884
8885  if test \! -z "$includedir" ; then
8886    CPPFLAGS="$CPPFLAGS -I$includedir"
8887  fi
8888  # note: $X_CFLAGS includes $x_includes
8889  CPPFLAGS="$CPPFLAGS $X_CFLAGS"
8890
8891  if test \! -z "$libdir" ; then
8892    LDFLAGS="$LDFLAGS -L$libdir"
8893  fi
8894  # note: $X_LIBS includes $x_libraries
8895  LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
8896
8897  CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
8898  LDFLAGS=`eval eval eval eval eval eval eval eval eval echo $LDFLAGS`
8899  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XRenderSetSubpixelOrder in -lXrender" >&5
8900$as_echo_n "checking for XRenderSetSubpixelOrder in -lXrender... " >&6; }
8901if ${ac_cv_lib_Xrender_XRenderSetSubpixelOrder+:} false; then :
8902  $as_echo_n "(cached) " >&6
8903else
8904  ac_check_lib_save_LIBS=$LIBS
8905LIBS="-lXrender -lXext -lX11 $LIBS"
8906cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8907/* end confdefs.h.  */
8908
8909/* Override any GCC internal prototype to avoid an error.
8910   Use char because int might match the return type of a GCC
8911   builtin and then its argument prototype would still apply.  */
8912#ifdef __cplusplus
8913extern "C"
8914#endif
8915char XRenderSetSubpixelOrder ();
8916int
8917main ()
8918{
8919return XRenderSetSubpixelOrder ();
8920  ;
8921  return 0;
8922}
8923_ACEOF
8924if ac_fn_c_try_link "$LINENO"; then :
8925  ac_cv_lib_Xrender_XRenderSetSubpixelOrder=yes
8926else
8927  ac_cv_lib_Xrender_XRenderSetSubpixelOrder=no
8928fi
8929rm -f core conftest.err conftest.$ac_objext \
8930    conftest$ac_exeext conftest.$ac_ext
8931LIBS=$ac_check_lib_save_LIBS
8932fi
8933{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_Xrender_XRenderSetSubpixelOrder" >&5
8934$as_echo "$ac_cv_lib_Xrender_XRenderSetSubpixelOrder" >&6; }
8935if test "x$ac_cv_lib_Xrender_XRenderSetSubpixelOrder" = xyes; then :
8936  xrender_libs="-lXrender"
8937else
8938  true
8939fi
8940
8941  CPPFLAGS="$ac_save_CPPFLAGS"
8942  LDFLAGS="$ac_save_LDFLAGS"
8943#  LIBS="$ac_save_LIBS"
8944
8945
8946    # first look for RANDR in -lXext
8947    have_randr=no
8948
8949  ac_save_CPPFLAGS="$CPPFLAGS"
8950  ac_save_LDFLAGS="$LDFLAGS"
8951#  ac_save_LIBS="$LIBS"
8952
8953  if test \! -z "$includedir" ; then
8954    CPPFLAGS="$CPPFLAGS -I$includedir"
8955  fi
8956  # note: $X_CFLAGS includes $x_includes
8957  CPPFLAGS="$CPPFLAGS $X_CFLAGS"
8958
8959  if test \! -z "$libdir" ; then
8960    LDFLAGS="$LDFLAGS -L$libdir"
8961  fi
8962  # note: $X_LIBS includes $x_libraries
8963  LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
8964
8965  CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
8966  LDFLAGS=`eval eval eval eval eval eval eval eval eval echo $LDFLAGS`
8967  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XRRGetScreenInfo in -lXext" >&5
8968$as_echo_n "checking for XRRGetScreenInfo in -lXext... " >&6; }
8969if ${ac_cv_lib_Xext_XRRGetScreenInfo+:} false; then :
8970  $as_echo_n "(cached) " >&6
8971else
8972  ac_check_lib_save_LIBS=$LIBS
8973LIBS="-lXext $xrender_libs -lXext -lX11 $LIBS"
8974cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8975/* end confdefs.h.  */
8976
8977/* Override any GCC internal prototype to avoid an error.
8978   Use char because int might match the return type of a GCC
8979   builtin and then its argument prototype would still apply.  */
8980#ifdef __cplusplus
8981extern "C"
8982#endif
8983char XRRGetScreenInfo ();
8984int
8985main ()
8986{
8987return XRRGetScreenInfo ();
8988  ;
8989  return 0;
8990}
8991_ACEOF
8992if ac_fn_c_try_link "$LINENO"; then :
8993  ac_cv_lib_Xext_XRRGetScreenInfo=yes
8994else
8995  ac_cv_lib_Xext_XRRGetScreenInfo=no
8996fi
8997rm -f core conftest.err conftest.$ac_objext \
8998    conftest$ac_exeext conftest.$ac_ext
8999LIBS=$ac_check_lib_save_LIBS
9000fi
9001{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_Xext_XRRGetScreenInfo" >&5
9002$as_echo "$ac_cv_lib_Xext_XRRGetScreenInfo" >&6; }
9003if test "x$ac_cv_lib_Xext_XRRGetScreenInfo" = xyes; then :
9004  have_randr=yes; SAVER_LIBS="$SAVER_LIBS $xrender_libs"
9005else
9006  true
9007fi
9008
9009  CPPFLAGS="$ac_save_CPPFLAGS"
9010  LDFLAGS="$ac_save_LDFLAGS"
9011#  LIBS="$ac_save_LIBS"
9012
9013
9014    # if that failed, look in -lXrandr
9015    if test "$have_randr" = no; then
9016
9017  ac_save_CPPFLAGS="$CPPFLAGS"
9018  ac_save_LDFLAGS="$LDFLAGS"
9019#  ac_save_LIBS="$LIBS"
9020
9021  if test \! -z "$includedir" ; then
9022    CPPFLAGS="$CPPFLAGS -I$includedir"
9023  fi
9024  # note: $X_CFLAGS includes $x_includes
9025  CPPFLAGS="$CPPFLAGS $X_CFLAGS"
9026
9027  if test \! -z "$libdir" ; then
9028    LDFLAGS="$LDFLAGS -L$libdir"
9029  fi
9030  # note: $X_LIBS includes $x_libraries
9031  LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
9032
9033  CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
9034  LDFLAGS=`eval eval eval eval eval eval eval eval eval echo $LDFLAGS`
9035  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XRRGetScreenInfo in -lXrandr" >&5
9036$as_echo_n "checking for XRRGetScreenInfo in -lXrandr... " >&6; }
9037if ${ac_cv_lib_Xrandr_XRRGetScreenInfo+:} false; then :
9038  $as_echo_n "(cached) " >&6
9039else
9040  ac_check_lib_save_LIBS=$LIBS
9041LIBS="-lXrandr $xrender_libs -lXext -lX11 $LIBS"
9042cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9043/* end confdefs.h.  */
9044
9045/* Override any GCC internal prototype to avoid an error.
9046   Use char because int might match the return type of a GCC
9047   builtin and then its argument prototype would still apply.  */
9048#ifdef __cplusplus
9049extern "C"
9050#endif
9051char XRRGetScreenInfo ();
9052int
9053main ()
9054{
9055return XRRGetScreenInfo ();
9056  ;
9057  return 0;
9058}
9059_ACEOF
9060if ac_fn_c_try_link "$LINENO"; then :
9061  ac_cv_lib_Xrandr_XRRGetScreenInfo=yes
9062else
9063  ac_cv_lib_Xrandr_XRRGetScreenInfo=no
9064fi
9065rm -f core conftest.err conftest.$ac_objext \
9066    conftest$ac_exeext conftest.$ac_ext
9067LIBS=$ac_check_lib_save_LIBS
9068fi
9069{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_Xrandr_XRRGetScreenInfo" >&5
9070$as_echo "$ac_cv_lib_Xrandr_XRRGetScreenInfo" >&6; }
9071if test "x$ac_cv_lib_Xrandr_XRRGetScreenInfo" = xyes; then :
9072  have_randr=yes; SAVER_LIBS="$SAVER_LIBS -lXrandr $xrender_libs"
9073else
9074  true
9075fi
9076
9077  CPPFLAGS="$ac_save_CPPFLAGS"
9078  LDFLAGS="$ac_save_LDFLAGS"
9079#  LIBS="$ac_save_LIBS"
9080
9081    fi
9082  fi
9083
9084  # if that succeeded, then we've really got it.
9085  if test "$have_randr" = yes; then
9086    $as_echo "#define HAVE_RANDR 1" >>confdefs.h
9087
9088
9089    # Now check for version 1.2 in the same libs.
9090    # Try to compile, since on macOS 10.5.7, headers are older than libs!
9091    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XRRGetScreenResources" >&5
9092$as_echo_n "checking for XRRGetScreenResources... " >&6; }
9093if ${ac_cv_randr_12+:} false; then :
9094  $as_echo_n "(cached) " >&6
9095else
9096  ac_cv_randr_12=no
9097
9098  ac_save_CPPFLAGS="$CPPFLAGS"
9099  if test \! -z "$includedir" ; then
9100    CPPFLAGS="$CPPFLAGS -I$includedir"
9101  fi
9102  CPPFLAGS="$CPPFLAGS $X_CFLAGS"
9103  CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
9104  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9105/* end confdefs.h.  */
9106#include <stdlib.h>
9107                         #include <X11/Xlib.h>
9108                         #include <X11/extensions/Xrandr.h>
9109int
9110main ()
9111{
9112XRRScreenResources *res =
9113                           XRRGetScreenResources (0, 0);
9114  ;
9115  return 0;
9116}
9117_ACEOF
9118if ac_fn_c_try_compile "$LINENO"; then :
9119  ac_cv_randr_12=yes
9120else
9121  ac_cv_randr_12=no
9122fi
9123rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9124  CPPFLAGS="$ac_save_CPPFLAGS"
9125fi
9126{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_randr_12" >&5
9127$as_echo "$ac_cv_randr_12" >&6; }
9128    if test "$ac_cv_randr_12" = yes ; then
9129      $as_echo "#define HAVE_RANDR_12 1" >>confdefs.h
9130
9131    fi
9132#   AC_CHECK_X_LIB(c, XRRGetOutputInfo, [AC_DEFINE(HAVE_RANDR_12)],
9133#                  [true], $SAVER_LIBS)
9134  fi
9135
9136
9137elif test "$with_randr" != no; then
9138  echo "error: must be yes or no: --with-randr-ext=$with_randr"
9139  exit 1
9140fi
9141
9142
9143###############################################################################
9144#
9145#       Check for the XINPUT server extension.
9146#
9147###############################################################################
9148
9149have_xinput=no
9150with_xinput_req=unspecified
9151xinput_halfassed=no
9152
9153# Check whether --with-xinput-ext was given.
9154if test "${with_xinput_ext+set}" = set; then :
9155  withval=$with_xinput_ext; with_xinput="$withval"; with_xinput_req="$withval"
9156else
9157  with_xinput=yes
9158fi
9159
9160
9161
9162   case "$with_xinput" in
9163    yes) ;;
9164    no)  ;;
9165
9166    /*)
9167     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XINPUT headers" >&5
9168$as_echo_n "checking for XINPUT headers... " >&6; }
9169     d=$with_xinput/include
9170     if test -d $d; then
9171       X_CFLAGS="-I$d $X_CFLAGS"
9172       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $d" >&5
9173$as_echo "$d" >&6; }
9174     else
9175       { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found ($d: no such directory)" >&5
9176$as_echo "not found ($d: no such directory)" >&6; }
9177     fi
9178
9179     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XINPUT libs" >&5
9180$as_echo_n "checking for XINPUT libs... " >&6; }
9181     d=$with_xinput/lib
9182     if test -d $d; then
9183       X_LIBS="-L$d $X_LIBS"
9184       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $d" >&5
9185$as_echo "$d" >&6; }
9186     else
9187       { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found ($d: no such directory)" >&5
9188$as_echo "not found ($d: no such directory)" >&6; }
9189     fi
9190
9191     # replace the directory string with "yes".
9192     with_xinput_req="yes"
9193     with_xinput=$with_xinput_req
9194     ;;
9195
9196    *)
9197     echo ""
9198     echo "error: argument to --with-xinput-ext must be \"yes\", \"no\", or a directory."
9199     echo "       If it is a directory, then \`DIR/include' will be added to"
9200     echo "       the -I list, and \`DIR/lib' will be added to the -L list."
9201     exit 1
9202     ;;
9203   esac
9204
9205
9206if test "$with_xinput" = yes; then
9207
9208  # first check for Xinput2.h
9209
9210  ac_save_CPPFLAGS="$CPPFLAGS"
9211  if test \! -z "$includedir" ; then
9212    CPPFLAGS="$CPPFLAGS -I$includedir"
9213  fi
9214  CPPFLAGS="$CPPFLAGS $X_CFLAGS"
9215  CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
9216  ac_fn_c_check_header_compile "$LINENO" "X11/extensions/XInput2.h" "ac_cv_header_X11_extensions_XInput2_h" "#include <X11/Xlib.h>
9217"
9218if test "x$ac_cv_header_X11_extensions_XInput2_h" = xyes; then :
9219  have_xinput=yes
9220fi
9221
9222
9223  CPPFLAGS="$ac_save_CPPFLAGS"
9224
9225  # if that succeeded, then check for libXi
9226  if test "$have_xinput" = yes; then
9227    have_xinput=no
9228    xinput_halfassed=yes
9229
9230  ac_save_CPPFLAGS="$CPPFLAGS"
9231  ac_save_LDFLAGS="$LDFLAGS"
9232#  ac_save_LIBS="$LIBS"
9233
9234  if test \! -z "$includedir" ; then
9235    CPPFLAGS="$CPPFLAGS -I$includedir"
9236  fi
9237  # note: $X_CFLAGS includes $x_includes
9238  CPPFLAGS="$CPPFLAGS $X_CFLAGS"
9239
9240  if test \! -z "$libdir" ; then
9241    LDFLAGS="$LDFLAGS -L$libdir"
9242  fi
9243  # note: $X_LIBS includes $x_libraries
9244  LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
9245
9246  CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
9247  LDFLAGS=`eval eval eval eval eval eval eval eval eval echo $LDFLAGS`
9248  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XISelectEvents in -lXi" >&5
9249$as_echo_n "checking for XISelectEvents in -lXi... " >&6; }
9250if ${ac_cv_lib_Xi_XISelectEvents+:} false; then :
9251  $as_echo_n "(cached) " >&6
9252else
9253  ac_check_lib_save_LIBS=$LIBS
9254LIBS="-lXi -lXext -lX11 $LIBS"
9255cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9256/* end confdefs.h.  */
9257
9258/* Override any GCC internal prototype to avoid an error.
9259   Use char because int might match the return type of a GCC
9260   builtin and then its argument prototype would still apply.  */
9261#ifdef __cplusplus
9262extern "C"
9263#endif
9264char XISelectEvents ();
9265int
9266main ()
9267{
9268return XISelectEvents ();
9269  ;
9270  return 0;
9271}
9272_ACEOF
9273if ac_fn_c_try_link "$LINENO"; then :
9274  ac_cv_lib_Xi_XISelectEvents=yes
9275else
9276  ac_cv_lib_Xi_XISelectEvents=no
9277fi
9278rm -f core conftest.err conftest.$ac_objext \
9279    conftest$ac_exeext conftest.$ac_ext
9280LIBS=$ac_check_lib_save_LIBS
9281fi
9282{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_Xi_XISelectEvents" >&5
9283$as_echo "$ac_cv_lib_Xi_XISelectEvents" >&6; }
9284if test "x$ac_cv_lib_Xi_XISelectEvents" = xyes; then :
9285  have_xinput=yes; xinput_halfassed=no;
9286                    SAVER_LIBS="$SAVER_LIBS -lXi"
9287else
9288  true
9289fi
9290
9291  CPPFLAGS="$ac_save_CPPFLAGS"
9292  LDFLAGS="$ac_save_LDFLAGS"
9293#  LIBS="$ac_save_LIBS"
9294
9295  fi
9296
9297  # if that succeeded, then we've really got it.
9298  if test "$have_xinput" = yes; then
9299    $as_echo "#define HAVE_XINPUT 1" >>confdefs.h
9300
9301  fi
9302
9303elif test "$with_xinput" != no; then
9304  echo "error: must be yes or no: --with-xinput-ext=$with_xinput"
9305  exit 1
9306fi
9307
9308
9309###############################################################################
9310#
9311#       Check for the XF86VMODE server extension (for gamma fading.)
9312#
9313###############################################################################
9314
9315have_xf86gamma=no
9316have_xf86gamma_ramp=no
9317with_xf86gamma_req=unspecified
9318
9319# Check whether --with-xf86gamma-ext was given.
9320if test "${with_xf86gamma_ext+set}" = set; then :
9321  withval=$with_xf86gamma_ext; with_xf86gamma="$withval"; with_xf86gamma_req="$withval"
9322else
9323  with_xf86gamma=yes
9324fi
9325
9326
9327
9328   case "$with_xf86gamma" in
9329    yes) ;;
9330    no)  ;;
9331
9332    /*)
9333     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for xf86gamma headers" >&5
9334$as_echo_n "checking for xf86gamma headers... " >&6; }
9335     d=$with_xf86gamma/include
9336     if test -d $d; then
9337       X_CFLAGS="-I$d $X_CFLAGS"
9338       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $d" >&5
9339$as_echo "$d" >&6; }
9340     else
9341       { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found ($d: no such directory)" >&5
9342$as_echo "not found ($d: no such directory)" >&6; }
9343     fi
9344
9345     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for xf86gamma libs" >&5
9346$as_echo_n "checking for xf86gamma libs... " >&6; }
9347     d=$with_xf86gamma/lib
9348     if test -d $d; then
9349       X_LIBS="-L$d $X_LIBS"
9350       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $d" >&5
9351$as_echo "$d" >&6; }
9352     else
9353       { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found ($d: no such directory)" >&5
9354$as_echo "not found ($d: no such directory)" >&6; }
9355     fi
9356
9357     # replace the directory string with "yes".
9358     with_xf86gamma_req="yes"
9359     with_xf86gamma=$with_xf86gamma_req
9360     ;;
9361
9362    *)
9363     echo ""
9364     echo "error: argument to --with-xf86gamma-ext must be \"yes\", \"no\", or a directory."
9365     echo "       If it is a directory, then \`DIR/include' will be added to"
9366     echo "       the -I list, and \`DIR/lib' will be added to the -L list."
9367     exit 1
9368     ;;
9369   esac
9370
9371
9372if test "$with_xf86gamma" = yes; then
9373
9374  # first check for xf86vmode.h, if we haven't already
9375  if test "$have_xf86vmode" = yes; then
9376    have_xf86gamma=yes
9377  else
9378
9379  ac_save_CPPFLAGS="$CPPFLAGS"
9380  if test \! -z "$includedir" ; then
9381    CPPFLAGS="$CPPFLAGS -I$includedir"
9382  fi
9383  CPPFLAGS="$CPPFLAGS $X_CFLAGS"
9384  CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
9385  ac_fn_c_check_header_compile "$LINENO" "X11/extensions/xf86vmode.h" "ac_cv_header_X11_extensions_xf86vmode_h" "#include <X11/Xlib.h>
9386"
9387if test "x$ac_cv_header_X11_extensions_xf86vmode_h" = xyes; then :
9388  have_xf86gamma=yes
9389fi
9390
9391
9392  CPPFLAGS="$ac_save_CPPFLAGS"
9393  fi
9394
9395  # if that succeeded, then check for the -lXxf86vm
9396  if test "$have_xf86gamma" = yes; then
9397    have_xf86gamma=no
9398
9399  ac_save_CPPFLAGS="$CPPFLAGS"
9400  ac_save_LDFLAGS="$LDFLAGS"
9401#  ac_save_LIBS="$LIBS"
9402
9403  if test \! -z "$includedir" ; then
9404    CPPFLAGS="$CPPFLAGS -I$includedir"
9405  fi
9406  # note: $X_CFLAGS includes $x_includes
9407  CPPFLAGS="$CPPFLAGS $X_CFLAGS"
9408
9409  if test \! -z "$libdir" ; then
9410    LDFLAGS="$LDFLAGS -L$libdir"
9411  fi
9412  # note: $X_LIBS includes $x_libraries
9413  LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
9414
9415  CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
9416  LDFLAGS=`eval eval eval eval eval eval eval eval eval echo $LDFLAGS`
9417  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XF86VidModeSetGamma in -lXxf86vm" >&5
9418$as_echo_n "checking for XF86VidModeSetGamma in -lXxf86vm... " >&6; }
9419if ${ac_cv_lib_Xxf86vm_XF86VidModeSetGamma+:} false; then :
9420  $as_echo_n "(cached) " >&6
9421else
9422  ac_check_lib_save_LIBS=$LIBS
9423LIBS="-lXxf86vm -lXext -lX11 $LIBS"
9424cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9425/* end confdefs.h.  */
9426
9427/* Override any GCC internal prototype to avoid an error.
9428   Use char because int might match the return type of a GCC
9429   builtin and then its argument prototype would still apply.  */
9430#ifdef __cplusplus
9431extern "C"
9432#endif
9433char XF86VidModeSetGamma ();
9434int
9435main ()
9436{
9437return XF86VidModeSetGamma ();
9438  ;
9439  return 0;
9440}
9441_ACEOF
9442if ac_fn_c_try_link "$LINENO"; then :
9443  ac_cv_lib_Xxf86vm_XF86VidModeSetGamma=yes
9444else
9445  ac_cv_lib_Xxf86vm_XF86VidModeSetGamma=no
9446fi
9447rm -f core conftest.err conftest.$ac_objext \
9448    conftest$ac_exeext conftest.$ac_ext
9449LIBS=$ac_check_lib_save_LIBS
9450fi
9451{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_Xxf86vm_XF86VidModeSetGamma" >&5
9452$as_echo "$ac_cv_lib_Xxf86vm_XF86VidModeSetGamma" >&6; }
9453if test "x$ac_cv_lib_Xxf86vm_XF86VidModeSetGamma" = xyes; then :
9454  have_xf86gamma=yes
9455else
9456  true
9457fi
9458
9459  CPPFLAGS="$ac_save_CPPFLAGS"
9460  LDFLAGS="$ac_save_LDFLAGS"
9461#  LIBS="$ac_save_LIBS"
9462
9463  fi
9464
9465  # check for the Ramp versions of the functions too.
9466  if test "$have_xf86gamma" = yes; then
9467    have_xf86gamma_ramp=no
9468
9469  ac_save_CPPFLAGS="$CPPFLAGS"
9470  ac_save_LDFLAGS="$LDFLAGS"
9471#  ac_save_LIBS="$LIBS"
9472
9473  if test \! -z "$includedir" ; then
9474    CPPFLAGS="$CPPFLAGS -I$includedir"
9475  fi
9476  # note: $X_CFLAGS includes $x_includes
9477  CPPFLAGS="$CPPFLAGS $X_CFLAGS"
9478
9479  if test \! -z "$libdir" ; then
9480    LDFLAGS="$LDFLAGS -L$libdir"
9481  fi
9482  # note: $X_LIBS includes $x_libraries
9483  LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
9484
9485  CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
9486  LDFLAGS=`eval eval eval eval eval eval eval eval eval echo $LDFLAGS`
9487  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XF86VidModeSetGammaRamp in -lXxf86vm" >&5
9488$as_echo_n "checking for XF86VidModeSetGammaRamp in -lXxf86vm... " >&6; }
9489if ${ac_cv_lib_Xxf86vm_XF86VidModeSetGammaRamp+:} false; then :
9490  $as_echo_n "(cached) " >&6
9491else
9492  ac_check_lib_save_LIBS=$LIBS
9493LIBS="-lXxf86vm -lXext -lX11 $LIBS"
9494cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9495/* end confdefs.h.  */
9496
9497/* Override any GCC internal prototype to avoid an error.
9498   Use char because int might match the return type of a GCC
9499   builtin and then its argument prototype would still apply.  */
9500#ifdef __cplusplus
9501extern "C"
9502#endif
9503char XF86VidModeSetGammaRamp ();
9504int
9505main ()
9506{
9507return XF86VidModeSetGammaRamp ();
9508  ;
9509  return 0;
9510}
9511_ACEOF
9512if ac_fn_c_try_link "$LINENO"; then :
9513  ac_cv_lib_Xxf86vm_XF86VidModeSetGammaRamp=yes
9514else
9515  ac_cv_lib_Xxf86vm_XF86VidModeSetGammaRamp=no
9516fi
9517rm -f core conftest.err conftest.$ac_objext \
9518    conftest$ac_exeext conftest.$ac_ext
9519LIBS=$ac_check_lib_save_LIBS
9520fi
9521{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_Xxf86vm_XF86VidModeSetGammaRamp" >&5
9522$as_echo "$ac_cv_lib_Xxf86vm_XF86VidModeSetGammaRamp" >&6; }
9523if test "x$ac_cv_lib_Xxf86vm_XF86VidModeSetGammaRamp" = xyes; then :
9524  have_xf86gamma_ramp=yes
9525else
9526  true
9527fi
9528
9529  CPPFLAGS="$ac_save_CPPFLAGS"
9530  LDFLAGS="$ac_save_LDFLAGS"
9531#  LIBS="$ac_save_LIBS"
9532
9533  fi
9534
9535  # if those tests succeeded, then we've really got the functions.
9536  if test "$have_xf86gamma" = yes; then
9537    $as_echo "#define HAVE_XF86VMODE_GAMMA 1" >>confdefs.h
9538
9539  fi
9540
9541  if test "$have_xf86gamma_ramp" = yes; then
9542    $as_echo "#define HAVE_XF86VMODE_GAMMA_RAMP 1" >>confdefs.h
9543
9544  fi
9545
9546  # pull in the lib, if we haven't already
9547  if test "$have_xf86gamma" = yes -a "$have_xf86vmode" = no; then
9548    SAVER_LIBS="$SAVER_LIBS -lXxf86vm"
9549  fi
9550
9551elif test "$with_xf86gamma" != no; then
9552  echo "error: must be yes or no: --with-xf86gamma-ext=$with_xf86vmode"
9553  exit 1
9554fi
9555
9556
9557###############################################################################
9558#
9559#       Check for the XIDLE server extension.
9560#
9561###############################################################################
9562
9563have_xidle=no
9564with_xidle_req=unspecified
9565
9566# Check whether --with-xidle-ext was given.
9567if test "${with_xidle_ext+set}" = set; then :
9568  withval=$with_xidle_ext; with_xidle="$withval"; with_xidle_req="$withval"
9569else
9570  with_xidle=yes
9571fi
9572
9573
9574
9575   case "$with_xidle" in
9576    yes) ;;
9577    no)  ;;
9578
9579    /*)
9580     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XIDLE headers" >&5
9581$as_echo_n "checking for XIDLE headers... " >&6; }
9582     d=$with_xidle/include
9583     if test -d $d; then
9584       X_CFLAGS="-I$d $X_CFLAGS"
9585       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $d" >&5
9586$as_echo "$d" >&6; }
9587     else
9588       { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found ($d: no such directory)" >&5
9589$as_echo "not found ($d: no such directory)" >&6; }
9590     fi
9591
9592     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XIDLE libs" >&5
9593$as_echo_n "checking for XIDLE libs... " >&6; }
9594     d=$with_xidle/lib
9595     if test -d $d; then
9596       X_LIBS="-L$d $X_LIBS"
9597       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $d" >&5
9598$as_echo "$d" >&6; }
9599     else
9600       { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found ($d: no such directory)" >&5
9601$as_echo "not found ($d: no such directory)" >&6; }
9602     fi
9603
9604     # replace the directory string with "yes".
9605     with_xidle_req="yes"
9606     with_xidle=$with_xidle_req
9607     ;;
9608
9609    *)
9610     echo ""
9611     echo "error: argument to --with-xidle-ext must be \"yes\", \"no\", or a directory."
9612     echo "       If it is a directory, then \`DIR/include' will be added to"
9613     echo "       the -I list, and \`DIR/lib' will be added to the -L list."
9614     exit 1
9615     ;;
9616   esac
9617
9618
9619if test "$with_xidle" = yes; then
9620
9621  ac_save_CPPFLAGS="$CPPFLAGS"
9622  if test \! -z "$includedir" ; then
9623    CPPFLAGS="$CPPFLAGS -I$includedir"
9624  fi
9625  CPPFLAGS="$CPPFLAGS $X_CFLAGS"
9626  CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
9627  ac_fn_c_check_header_compile "$LINENO" "X11/extensions/xidle.h" "ac_cv_header_X11_extensions_xidle_h" "#include <X11/Xlib.h>
9628"
9629if test "x$ac_cv_header_X11_extensions_xidle_h" = xyes; then :
9630  have_xidle=yes
9631                     $as_echo "#define HAVE_XIDLE_EXTENSION 1" >>confdefs.h
9632
9633fi
9634
9635
9636  CPPFLAGS="$ac_save_CPPFLAGS"
9637elif test "$with_xidle" != no; then
9638  echo "error: must be yes or no: --with-xidle-ext=$with_xidle"
9639  exit 1
9640fi
9641
9642
9643###############################################################################
9644#
9645#       Check for the MIT-SCREEN-SAVER server extension.
9646#
9647###############################################################################
9648
9649have_mit=no
9650with_mit=no
9651with_mit_req=unspecified
9652#AC_ARG_WITH(mit-ext,
9653#[  --with-mit-ext          Include support for the MIT-SCREEN-SAVER extension.],
9654#  [with_mit="$withval"; with_mit_req="$withval"],[with_mit=no])
9655#HANDLE_X_PATH_ARG(with_mit, --with-mit-ext, MIT-SCREEN-SAVER)
9656
9657if test "$with_mit" = yes; then
9658
9659  ac_save_CPPFLAGS="$CPPFLAGS"
9660  if test \! -z "$includedir" ; then
9661    CPPFLAGS="$CPPFLAGS -I$includedir"
9662  fi
9663  CPPFLAGS="$CPPFLAGS $X_CFLAGS"
9664  CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
9665  ac_fn_c_check_header_compile "$LINENO" "X11/extensions/scrnsaver.h" "ac_cv_header_X11_extensions_scrnsaver_h" "#include <X11/Xlib.h>
9666"
9667if test "x$ac_cv_header_X11_extensions_scrnsaver_h" = xyes; then :
9668  have_mit=yes
9669fi
9670
9671
9672  CPPFLAGS="$ac_save_CPPFLAGS"
9673
9674  # Now check to see if it's really in the library; XF86Free-3.3 ships
9675  # scrnsaver.h, but doesn't include the code in libXext.a, the idiots!
9676  #
9677  if test "$have_mit" = yes; then
9678
9679  ac_save_CPPFLAGS="$CPPFLAGS"
9680  ac_save_LDFLAGS="$LDFLAGS"
9681#  ac_save_LIBS="$LIBS"
9682
9683  if test \! -z "$includedir" ; then
9684    CPPFLAGS="$CPPFLAGS -I$includedir"
9685  fi
9686  # note: $X_CFLAGS includes $x_includes
9687  CPPFLAGS="$CPPFLAGS $X_CFLAGS"
9688
9689  if test \! -z "$libdir" ; then
9690    LDFLAGS="$LDFLAGS -L$libdir"
9691  fi
9692  # note: $X_LIBS includes $x_libraries
9693  LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
9694
9695  CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
9696  LDFLAGS=`eval eval eval eval eval eval eval eval eval echo $LDFLAGS`
9697  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XScreenSaverRegister in -lXext" >&5
9698$as_echo_n "checking for XScreenSaverRegister in -lXext... " >&6; }
9699if ${ac_cv_lib_Xext_XScreenSaverRegister+:} false; then :
9700  $as_echo_n "(cached) " >&6
9701else
9702  ac_check_lib_save_LIBS=$LIBS
9703LIBS="-lXext -lm $LIBS"
9704cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9705/* end confdefs.h.  */
9706
9707/* Override any GCC internal prototype to avoid an error.
9708   Use char because int might match the return type of a GCC
9709   builtin and then its argument prototype would still apply.  */
9710#ifdef __cplusplus
9711extern "C"
9712#endif
9713char XScreenSaverRegister ();
9714int
9715main ()
9716{
9717return XScreenSaverRegister ();
9718  ;
9719  return 0;
9720}
9721_ACEOF
9722if ac_fn_c_try_link "$LINENO"; then :
9723  ac_cv_lib_Xext_XScreenSaverRegister=yes
9724else
9725  ac_cv_lib_Xext_XScreenSaverRegister=no
9726fi
9727rm -f core conftest.err conftest.$ac_objext \
9728    conftest$ac_exeext conftest.$ac_ext
9729LIBS=$ac_check_lib_save_LIBS
9730fi
9731{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_Xext_XScreenSaverRegister" >&5
9732$as_echo "$ac_cv_lib_Xext_XScreenSaverRegister" >&6; }
9733if test "x$ac_cv_lib_Xext_XScreenSaverRegister" = xyes; then :
9734  true
9735else
9736  have_mit=no
9737fi
9738
9739  CPPFLAGS="$ac_save_CPPFLAGS"
9740  LDFLAGS="$ac_save_LDFLAGS"
9741#  LIBS="$ac_save_LIBS"
9742
9743
9744    if test "$have_mit" = no; then
9745      # Fuck!  Looks like XF86Free-3.3 actually puts it in XExExt instead
9746      # of in Xext.  Thank you master, may I have another.
9747
9748  ac_save_CPPFLAGS="$CPPFLAGS"
9749  ac_save_LDFLAGS="$LDFLAGS"
9750#  ac_save_LIBS="$LIBS"
9751
9752  if test \! -z "$includedir" ; then
9753    CPPFLAGS="$CPPFLAGS -I$includedir"
9754  fi
9755  # note: $X_CFLAGS includes $x_includes
9756  CPPFLAGS="$CPPFLAGS $X_CFLAGS"
9757
9758  if test \! -z "$libdir" ; then
9759    LDFLAGS="$LDFLAGS -L$libdir"
9760  fi
9761  # note: $X_LIBS includes $x_libraries
9762  LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
9763
9764  CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
9765  LDFLAGS=`eval eval eval eval eval eval eval eval eval echo $LDFLAGS`
9766  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XScreenSaverRegister in -lXExExt" >&5
9767$as_echo_n "checking for XScreenSaverRegister in -lXExExt... " >&6; }
9768if ${ac_cv_lib_XExExt_XScreenSaverRegister+:} false; then :
9769  $as_echo_n "(cached) " >&6
9770else
9771  ac_check_lib_save_LIBS=$LIBS
9772LIBS="-lXExExt -lX11 -lXext -lm $LIBS"
9773cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9774/* end confdefs.h.  */
9775
9776/* Override any GCC internal prototype to avoid an error.
9777   Use char because int might match the return type of a GCC
9778   builtin and then its argument prototype would still apply.  */
9779#ifdef __cplusplus
9780extern "C"
9781#endif
9782char XScreenSaverRegister ();
9783int
9784main ()
9785{
9786return XScreenSaverRegister ();
9787  ;
9788  return 0;
9789}
9790_ACEOF
9791if ac_fn_c_try_link "$LINENO"; then :
9792  ac_cv_lib_XExExt_XScreenSaverRegister=yes
9793else
9794  ac_cv_lib_XExExt_XScreenSaverRegister=no
9795fi
9796rm -f core conftest.err conftest.$ac_objext \
9797    conftest$ac_exeext conftest.$ac_ext
9798LIBS=$ac_check_lib_save_LIBS
9799fi
9800{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_XExExt_XScreenSaverRegister" >&5
9801$as_echo "$ac_cv_lib_XExExt_XScreenSaverRegister" >&6; }
9802if test "x$ac_cv_lib_XExExt_XScreenSaverRegister" = xyes; then :
9803  have_mit=yes; SAVER_LIBS="$SAVER_LIBS -lXExExt"
9804else
9805  true
9806fi
9807
9808  CPPFLAGS="$ac_save_CPPFLAGS"
9809  LDFLAGS="$ac_save_LDFLAGS"
9810#  LIBS="$ac_save_LIBS"
9811
9812    fi
9813
9814    if test "$have_mit" = no; then
9815      # Double fuck!  Looks like some versions of XFree86 (whichever version
9816      # it is that comes with RedHat Linux 2.0 -- I can't find a version
9817      # number) put this garbage in Xss instead of Xext.  Thank you master,
9818      #  may I have another.
9819
9820  ac_save_CPPFLAGS="$CPPFLAGS"
9821  ac_save_LDFLAGS="$LDFLAGS"
9822#  ac_save_LIBS="$LIBS"
9823
9824  if test \! -z "$includedir" ; then
9825    CPPFLAGS="$CPPFLAGS -I$includedir"
9826  fi
9827  # note: $X_CFLAGS includes $x_includes
9828  CPPFLAGS="$CPPFLAGS $X_CFLAGS"
9829
9830  if test \! -z "$libdir" ; then
9831    LDFLAGS="$LDFLAGS -L$libdir"
9832  fi
9833  # note: $X_LIBS includes $x_libraries
9834  LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
9835
9836  CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
9837  LDFLAGS=`eval eval eval eval eval eval eval eval eval echo $LDFLAGS`
9838  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XScreenSaverRegister in -lXss" >&5
9839$as_echo_n "checking for XScreenSaverRegister in -lXss... " >&6; }
9840if ${ac_cv_lib_Xss_XScreenSaverRegister+:} false; then :
9841  $as_echo_n "(cached) " >&6
9842else
9843  ac_check_lib_save_LIBS=$LIBS
9844LIBS="-lXss -lX11 -lXext -lm $LIBS"
9845cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9846/* end confdefs.h.  */
9847
9848/* Override any GCC internal prototype to avoid an error.
9849   Use char because int might match the return type of a GCC
9850   builtin and then its argument prototype would still apply.  */
9851#ifdef __cplusplus
9852extern "C"
9853#endif
9854char XScreenSaverRegister ();
9855int
9856main ()
9857{
9858return XScreenSaverRegister ();
9859  ;
9860  return 0;
9861}
9862_ACEOF
9863if ac_fn_c_try_link "$LINENO"; then :
9864  ac_cv_lib_Xss_XScreenSaverRegister=yes
9865else
9866  ac_cv_lib_Xss_XScreenSaverRegister=no
9867fi
9868rm -f core conftest.err conftest.$ac_objext \
9869    conftest$ac_exeext conftest.$ac_ext
9870LIBS=$ac_check_lib_save_LIBS
9871fi
9872{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_Xss_XScreenSaverRegister" >&5
9873$as_echo "$ac_cv_lib_Xss_XScreenSaverRegister" >&6; }
9874if test "x$ac_cv_lib_Xss_XScreenSaverRegister" = xyes; then :
9875  have_mit=yes; SAVER_LIBS="$SAVER_LIBS -lXss"
9876else
9877  true
9878fi
9879
9880  CPPFLAGS="$ac_save_CPPFLAGS"
9881  LDFLAGS="$ac_save_LDFLAGS"
9882#  LIBS="$ac_save_LIBS"
9883
9884    fi
9885
9886    if test "$have_mit" = yes; then
9887#     AC_DEFINE(HAVE_MIT_SAVER_EXTENSION)
9888      echo "Using the MIT-SCREEN-SAVER extension will crash your server. Don't."
9889      exit 1
9890    fi
9891
9892  fi
9893
9894elif test "$with_mit" != no; then
9895  echo "error: must be yes or no: --with-mit-ext=$with_mit"
9896  exit 1
9897fi
9898
9899
9900###############################################################################
9901#
9902#       Check for the SGI SCREEN_SAVER server extension.
9903#
9904###############################################################################
9905
9906have_sgi=no
9907with_sgi_req=unspecified
9908
9909# Check whether --with-sgi-ext was given.
9910if test "${with_sgi_ext+set}" = set; then :
9911  withval=$with_sgi_ext; with_sgi="$withval"; with_sgi_req="$withval"
9912else
9913  with_sgi=$ac_irix
9914fi
9915
9916
9917
9918   case "$with_sgi" in
9919    yes) ;;
9920    no)  ;;
9921
9922    /*)
9923     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SGI SCREEN_SAVER headers" >&5
9924$as_echo_n "checking for SGI SCREEN_SAVER headers... " >&6; }
9925     d=$with_sgi/include
9926     if test -d $d; then
9927       X_CFLAGS="-I$d $X_CFLAGS"
9928       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $d" >&5
9929$as_echo "$d" >&6; }
9930     else
9931       { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found ($d: no such directory)" >&5
9932$as_echo "not found ($d: no such directory)" >&6; }
9933     fi
9934
9935     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SGI SCREEN_SAVER libs" >&5
9936$as_echo_n "checking for SGI SCREEN_SAVER libs... " >&6; }
9937     d=$with_sgi/lib
9938     if test -d $d; then
9939       X_LIBS="-L$d $X_LIBS"
9940       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $d" >&5
9941$as_echo "$d" >&6; }
9942     else
9943       { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found ($d: no such directory)" >&5
9944$as_echo "not found ($d: no such directory)" >&6; }
9945     fi
9946
9947     # replace the directory string with "yes".
9948     with_sgi_req="yes"
9949     with_sgi=$with_sgi_req
9950     ;;
9951
9952    *)
9953     echo ""
9954     echo "error: argument to --with-sgi-ext must be \"yes\", \"no\", or a directory."
9955     echo "       If it is a directory, then \`DIR/include' will be added to"
9956     echo "       the -I list, and \`DIR/lib' will be added to the -L list."
9957     exit 1
9958     ;;
9959   esac
9960
9961
9962if test "$with_sgi" = yes; then
9963
9964  ac_save_CPPFLAGS="$CPPFLAGS"
9965  if test \! -z "$includedir" ; then
9966    CPPFLAGS="$CPPFLAGS -I$includedir"
9967  fi
9968  CPPFLAGS="$CPPFLAGS $X_CFLAGS"
9969  CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
9970  ac_fn_c_check_header_compile "$LINENO" "X11/extensions/XScreenSaver.h" "ac_cv_header_X11_extensions_XScreenSaver_h" "#include <X11/Xlib.h>
9971"
9972if test "x$ac_cv_header_X11_extensions_XScreenSaver_h" = xyes; then :
9973  have_sgi=yes
9974                     $as_echo "#define HAVE_SGI_SAVER_EXTENSION 1" >>confdefs.h
9975
9976fi
9977
9978
9979  CPPFLAGS="$ac_save_CPPFLAGS"
9980
9981elif test "$with_sgi" != no; then
9982  echo "error: must be yes or no: --with-sgi-ext=$with_sgi"
9983  exit 1
9984fi
9985
9986
9987###############################################################################
9988#
9989#       Check for the SGI-VIDEO-CONTROL server extension.
9990#
9991###############################################################################
9992
9993have_sgivc=no
9994with_sgivc_req=unspecified
9995
9996# Check whether --with-sgivc-ext was given.
9997if test "${with_sgivc_ext+set}" = set; then :
9998  withval=$with_sgivc_ext; with_sgivc="$withval"; with_sgivc_req="$withval"
9999else
10000  with_sgivc=$ac_irix
10001fi
10002
10003
10004
10005   case "$with_sgivc" in
10006    yes) ;;
10007    no)  ;;
10008
10009    /*)
10010     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SGI-VIDEO-CONTROL headers" >&5
10011$as_echo_n "checking for SGI-VIDEO-CONTROL headers... " >&6; }
10012     d=$with_sgivc/include
10013     if test -d $d; then
10014       X_CFLAGS="-I$d $X_CFLAGS"
10015       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $d" >&5
10016$as_echo "$d" >&6; }
10017     else
10018       { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found ($d: no such directory)" >&5
10019$as_echo "not found ($d: no such directory)" >&6; }
10020     fi
10021
10022     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SGI-VIDEO-CONTROL libs" >&5
10023$as_echo_n "checking for SGI-VIDEO-CONTROL libs... " >&6; }
10024     d=$with_sgivc/lib
10025     if test -d $d; then
10026       X_LIBS="-L$d $X_LIBS"
10027       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $d" >&5
10028$as_echo "$d" >&6; }
10029     else
10030       { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found ($d: no such directory)" >&5
10031$as_echo "not found ($d: no such directory)" >&6; }
10032     fi
10033
10034     # replace the directory string with "yes".
10035     with_sgivc_req="yes"
10036     with_sgivc=$with_sgivc_req
10037     ;;
10038
10039    *)
10040     echo ""
10041     echo "error: argument to --with-sgivc-ext must be \"yes\", \"no\", or a directory."
10042     echo "       If it is a directory, then \`DIR/include' will be added to"
10043     echo "       the -I list, and \`DIR/lib' will be added to the -L list."
10044     exit 1
10045     ;;
10046   esac
10047
10048
10049if test "$with_sgivc" = yes; then
10050
10051  # first check for XSGIvc.h
10052
10053  ac_save_CPPFLAGS="$CPPFLAGS"
10054  if test \! -z "$includedir" ; then
10055    CPPFLAGS="$CPPFLAGS -I$includedir"
10056  fi
10057  CPPFLAGS="$CPPFLAGS $X_CFLAGS"
10058  CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
10059  ac_fn_c_check_header_compile "$LINENO" "X11/extensions/XSGIvc.h" "ac_cv_header_X11_extensions_XSGIvc_h" "#include <X11/Xlib.h>
10060"
10061if test "x$ac_cv_header_X11_extensions_XSGIvc_h" = xyes; then :
10062  have_sgivc=yes
10063fi
10064
10065
10066  CPPFLAGS="$ac_save_CPPFLAGS"
10067
10068  # if that succeeded, then check for the -lXsgivc
10069  if test "$have_sgivc" = yes; then
10070    have_sgivc=no
10071
10072  ac_save_CPPFLAGS="$CPPFLAGS"
10073  ac_save_LDFLAGS="$LDFLAGS"
10074#  ac_save_LIBS="$LIBS"
10075
10076  if test \! -z "$includedir" ; then
10077    CPPFLAGS="$CPPFLAGS -I$includedir"
10078  fi
10079  # note: $X_CFLAGS includes $x_includes
10080  CPPFLAGS="$CPPFLAGS $X_CFLAGS"
10081
10082  if test \! -z "$libdir" ; then
10083    LDFLAGS="$LDFLAGS -L$libdir"
10084  fi
10085  # note: $X_LIBS includes $x_libraries
10086  LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
10087
10088  CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
10089  LDFLAGS=`eval eval eval eval eval eval eval eval eval echo $LDFLAGS`
10090  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XSGIvcQueryGammaMap in -lXsgivc" >&5
10091$as_echo_n "checking for XSGIvcQueryGammaMap in -lXsgivc... " >&6; }
10092if ${ac_cv_lib_Xsgivc_XSGIvcQueryGammaMap+:} false; then :
10093  $as_echo_n "(cached) " >&6
10094else
10095  ac_check_lib_save_LIBS=$LIBS
10096LIBS="-lXsgivc -lXext -lX11 $LIBS"
10097cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10098/* end confdefs.h.  */
10099
10100/* Override any GCC internal prototype to avoid an error.
10101   Use char because int might match the return type of a GCC
10102   builtin and then its argument prototype would still apply.  */
10103#ifdef __cplusplus
10104extern "C"
10105#endif
10106char XSGIvcQueryGammaMap ();
10107int
10108main ()
10109{
10110return XSGIvcQueryGammaMap ();
10111  ;
10112  return 0;
10113}
10114_ACEOF
10115if ac_fn_c_try_link "$LINENO"; then :
10116  ac_cv_lib_Xsgivc_XSGIvcQueryGammaMap=yes
10117else
10118  ac_cv_lib_Xsgivc_XSGIvcQueryGammaMap=no
10119fi
10120rm -f core conftest.err conftest.$ac_objext \
10121    conftest$ac_exeext conftest.$ac_ext
10122LIBS=$ac_check_lib_save_LIBS
10123fi
10124{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_Xsgivc_XSGIvcQueryGammaMap" >&5
10125$as_echo "$ac_cv_lib_Xsgivc_XSGIvcQueryGammaMap" >&6; }
10126if test "x$ac_cv_lib_Xsgivc_XSGIvcQueryGammaMap" = xyes; then :
10127  have_sgivc=yes; SAVER_LIBS="$SAVER_LIBS -lXsgivc"
10128else
10129  true
10130fi
10131
10132  CPPFLAGS="$ac_save_CPPFLAGS"
10133  LDFLAGS="$ac_save_LDFLAGS"
10134#  LIBS="$ac_save_LIBS"
10135
10136  fi
10137
10138  # if that succeeded, then we've really got it.
10139  if test "$have_sgivc" = yes; then
10140    $as_echo "#define HAVE_SGI_VC_EXTENSION 1" >>confdefs.h
10141
10142  fi
10143
10144elif test "$with_sgivc" != no; then
10145  echo "error: must be yes or no: --with-sgivc-ext=$with_sgivc"
10146  exit 1
10147fi
10148
10149
10150###############################################################################
10151#
10152#       Check for the SGI XReadDisplay server extension.
10153#
10154###############################################################################
10155
10156have_readdisplay=no
10157with_readdisplay_req=unspecified
10158
10159# Check whether --with-readdisplay was given.
10160if test "${with_readdisplay+set}" = set; then :
10161  withval=$with_readdisplay; with_readdisplay="$withval"; with_readdisplay_req="$withval"
10162else
10163  with_readdisplay=$ac_irix
10164fi
10165
10166
10167
10168   case "$with_readdisplay" in
10169    yes) ;;
10170    no)  ;;
10171
10172    /*)
10173     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XReadDisplay headers" >&5
10174$as_echo_n "checking for XReadDisplay headers... " >&6; }
10175     d=$with_readdisplay/include
10176     if test -d $d; then
10177       X_CFLAGS="-I$d $X_CFLAGS"
10178       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $d" >&5
10179$as_echo "$d" >&6; }
10180     else
10181       { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found ($d: no such directory)" >&5
10182$as_echo "not found ($d: no such directory)" >&6; }
10183     fi
10184
10185     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XReadDisplay libs" >&5
10186$as_echo_n "checking for XReadDisplay libs... " >&6; }
10187     d=$with_readdisplay/lib
10188     if test -d $d; then
10189       X_LIBS="-L$d $X_LIBS"
10190       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $d" >&5
10191$as_echo "$d" >&6; }
10192     else
10193       { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found ($d: no such directory)" >&5
10194$as_echo "not found ($d: no such directory)" >&6; }
10195     fi
10196
10197     # replace the directory string with "yes".
10198     with_readdisplay_req="yes"
10199     with_readdisplay=$with_readdisplay_req
10200     ;;
10201
10202    *)
10203     echo ""
10204     echo "error: argument to --with-readdisplay must be \"yes\", \"no\", or a directory."
10205     echo "       If it is a directory, then \`DIR/include' will be added to"
10206     echo "       the -I list, and \`DIR/lib' will be added to the -L list."
10207     exit 1
10208     ;;
10209   esac
10210
10211
10212if test "$with_readdisplay" = yes; then
10213
10214  ac_save_CPPFLAGS="$CPPFLAGS"
10215  if test \! -z "$includedir" ; then
10216    CPPFLAGS="$CPPFLAGS -I$includedir"
10217  fi
10218  CPPFLAGS="$CPPFLAGS $X_CFLAGS"
10219  CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
10220  ac_fn_c_check_header_compile "$LINENO" "X11/extensions/readdisplay.h" "ac_cv_header_X11_extensions_readdisplay_h" "#include <X11/Xlib.h>
10221"
10222if test "x$ac_cv_header_X11_extensions_readdisplay_h" = xyes; then :
10223  $as_echo "#define HAVE_READ_DISPLAY_EXTENSION 1" >>confdefs.h
10224
10225fi
10226
10227
10228  CPPFLAGS="$ac_save_CPPFLAGS"
10229elif test "$with_readdisplay" != no; then
10230  echo "error: must be yes or no: --with-readdisplay=$with_readdisplay"
10231  exit 1
10232fi
10233
10234
10235###############################################################################
10236#
10237#       Check for the XSHM server extension.
10238#
10239###############################################################################
10240
10241have_xshm=no
10242with_xshm_req=unspecified
10243
10244# Check whether --with-xshm-ext was given.
10245if test "${with_xshm_ext+set}" = set; then :
10246  withval=$with_xshm_ext; with_xshm="$withval"; with_xshm_req="$withval"
10247else
10248  with_xshm=yes
10249fi
10250
10251
10252
10253   case "$with_xshm" in
10254    yes) ;;
10255    no)  ;;
10256
10257    /*)
10258     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XSHM headers" >&5
10259$as_echo_n "checking for XSHM headers... " >&6; }
10260     d=$with_xshm/include
10261     if test -d $d; then
10262       X_CFLAGS="-I$d $X_CFLAGS"
10263       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $d" >&5
10264$as_echo "$d" >&6; }
10265     else
10266       { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found ($d: no such directory)" >&5
10267$as_echo "not found ($d: no such directory)" >&6; }
10268     fi
10269
10270     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XSHM libs" >&5
10271$as_echo_n "checking for XSHM libs... " >&6; }
10272     d=$with_xshm/lib
10273     if test -d $d; then
10274       X_LIBS="-L$d $X_LIBS"
10275       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $d" >&5
10276$as_echo "$d" >&6; }
10277     else
10278       { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found ($d: no such directory)" >&5
10279$as_echo "not found ($d: no such directory)" >&6; }
10280     fi
10281
10282     # replace the directory string with "yes".
10283     with_xshm_req="yes"
10284     with_xshm=$with_xshm_req
10285     ;;
10286
10287    *)
10288     echo ""
10289     echo "error: argument to --with-xshm-ext must be \"yes\", \"no\", or a directory."
10290     echo "       If it is a directory, then \`DIR/include' will be added to"
10291     echo "       the -I list, and \`DIR/lib' will be added to the -L list."
10292     exit 1
10293     ;;
10294   esac
10295
10296
10297if test "$with_xshm" = yes; then
10298
10299  # first check for Xshm.h.
10300
10301  ac_save_CPPFLAGS="$CPPFLAGS"
10302  if test \! -z "$includedir" ; then
10303    CPPFLAGS="$CPPFLAGS -I$includedir"
10304  fi
10305  CPPFLAGS="$CPPFLAGS $X_CFLAGS"
10306  CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
10307  ac_fn_c_check_header_compile "$LINENO" "X11/extensions/XShm.h" "ac_cv_header_X11_extensions_XShm_h" "#include <X11/Xlib.h>
10308"
10309if test "x$ac_cv_header_X11_extensions_XShm_h" = xyes; then :
10310  have_xshm=yes
10311fi
10312
10313
10314  CPPFLAGS="$ac_save_CPPFLAGS"
10315
10316  # if that succeeded, then check for sys/ipc.h.
10317  if test "$have_xshm" = yes; then
10318    have_xshm=no
10319
10320  ac_save_CPPFLAGS="$CPPFLAGS"
10321  if test \! -z "$includedir" ; then
10322    CPPFLAGS="$CPPFLAGS -I$includedir"
10323  fi
10324  CPPFLAGS="$CPPFLAGS $X_CFLAGS"
10325  CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
10326  ac_fn_c_check_header_mongrel "$LINENO" "sys/ipc.h" "ac_cv_header_sys_ipc_h" "$ac_includes_default"
10327if test "x$ac_cv_header_sys_ipc_h" = xyes; then :
10328  have_xshm=yes
10329fi
10330
10331
10332  CPPFLAGS="$ac_save_CPPFLAGS"
10333  fi
10334
10335  # if that succeeded, then check for sys/shm.h.
10336  if test "$have_xshm" = yes; then
10337    have_xshm=no
10338
10339  ac_save_CPPFLAGS="$CPPFLAGS"
10340  if test \! -z "$includedir" ; then
10341    CPPFLAGS="$CPPFLAGS -I$includedir"
10342  fi
10343  CPPFLAGS="$CPPFLAGS $X_CFLAGS"
10344  CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
10345  ac_fn_c_check_header_mongrel "$LINENO" "sys/shm.h" "ac_cv_header_sys_shm_h" "$ac_includes_default"
10346if test "x$ac_cv_header_sys_shm_h" = xyes; then :
10347  have_xshm=yes
10348fi
10349
10350
10351  CPPFLAGS="$ac_save_CPPFLAGS"
10352  fi
10353
10354  # AIX is pathological, as usual: apparently it's normal for the Xshm headers
10355  # to exist, but the library code to not exist.  And even better, the library
10356  # code is in its own library: libXextSam.a.  So, if we're on AIX, and that
10357  # lib doesn't exist, give up.  (This lib gets added to X_EXTRA_LIBS, and
10358  # that's not quite right, but close enough.)
10359  #
10360  case "$host" in
10361    *-aix*)
10362      if  `uname -v` -eq 3 ; then
10363        have_xshm=no
10364
10365  ac_save_CPPFLAGS="$CPPFLAGS"
10366  ac_save_LDFLAGS="$LDFLAGS"
10367#  ac_save_LIBS="$LIBS"
10368
10369  if test \! -z "$includedir" ; then
10370    CPPFLAGS="$CPPFLAGS -I$includedir"
10371  fi
10372  # note: $X_CFLAGS includes $x_includes
10373  CPPFLAGS="$CPPFLAGS $X_CFLAGS"
10374
10375  if test \! -z "$libdir" ; then
10376    LDFLAGS="$LDFLAGS -L$libdir"
10377  fi
10378  # note: $X_LIBS includes $x_libraries
10379  LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
10380
10381  CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
10382  LDFLAGS=`eval eval eval eval eval eval eval eval eval echo $LDFLAGS`
10383  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XShmQueryExtension in -lXextSam" >&5
10384$as_echo_n "checking for XShmQueryExtension in -lXextSam... " >&6; }
10385if ${ac_cv_lib_XextSam_XShmQueryExtension+:} false; then :
10386  $as_echo_n "(cached) " >&6
10387else
10388  ac_check_lib_save_LIBS=$LIBS
10389LIBS="-lXextSam -lX11 -lXext -lm $LIBS"
10390cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10391/* end confdefs.h.  */
10392
10393/* Override any GCC internal prototype to avoid an error.
10394   Use char because int might match the return type of a GCC
10395   builtin and then its argument prototype would still apply.  */
10396#ifdef __cplusplus
10397extern "C"
10398#endif
10399char XShmQueryExtension ();
10400int
10401main ()
10402{
10403return XShmQueryExtension ();
10404  ;
10405  return 0;
10406}
10407_ACEOF
10408if ac_fn_c_try_link "$LINENO"; then :
10409  ac_cv_lib_XextSam_XShmQueryExtension=yes
10410else
10411  ac_cv_lib_XextSam_XShmQueryExtension=no
10412fi
10413rm -f core conftest.err conftest.$ac_objext \
10414    conftest$ac_exeext conftest.$ac_ext
10415LIBS=$ac_check_lib_save_LIBS
10416fi
10417{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_XextSam_XShmQueryExtension" >&5
10418$as_echo "$ac_cv_lib_XextSam_XShmQueryExtension" >&6; }
10419if test "x$ac_cv_lib_XextSam_XShmQueryExtension" = xyes; then :
10420  have_xshm=yes; X_EXTRA_LIBS="$X_EXTRA_LIBS -lXextSam"
10421else
10422  true
10423fi
10424
10425  CPPFLAGS="$ac_save_CPPFLAGS"
10426  LDFLAGS="$ac_save_LDFLAGS"
10427#  LIBS="$ac_save_LIBS"
10428
10429      fi
10430    ;;
10431  esac
10432
10433  # if that succeeded, then we've really got it.
10434  if test "$have_xshm" = yes; then
10435    $as_echo "#define HAVE_XSHM_EXTENSION 1" >>confdefs.h
10436
10437  fi
10438
10439elif test "$with_xshm" != no; then
10440  echo "error: must be yes or no: --with-xshm-ext=$with_xshm"
10441  exit 1
10442fi
10443
10444
10445###############################################################################
10446#
10447#       Check for the DOUBLE-BUFFER server extension.
10448#
10449###############################################################################
10450
10451have_xdbe=no
10452with_xdbe_req=unspecified
10453
10454# Check whether --with-xdbe-ext was given.
10455if test "${with_xdbe_ext+set}" = set; then :
10456  withval=$with_xdbe_ext; with_xdbe="$withval"; with_xdbe_req="$withval"
10457else
10458  with_xdbe=yes
10459fi
10460
10461
10462
10463   case "$with_xdbe" in
10464    yes) ;;
10465    no)  ;;
10466
10467    /*)
10468     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DOUBLE-BUFFER headers" >&5
10469$as_echo_n "checking for DOUBLE-BUFFER headers... " >&6; }
10470     d=$with_xdbe/include
10471     if test -d $d; then
10472       X_CFLAGS="-I$d $X_CFLAGS"
10473       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $d" >&5
10474$as_echo "$d" >&6; }
10475     else
10476       { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found ($d: no such directory)" >&5
10477$as_echo "not found ($d: no such directory)" >&6; }
10478     fi
10479
10480     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DOUBLE-BUFFER libs" >&5
10481$as_echo_n "checking for DOUBLE-BUFFER libs... " >&6; }
10482     d=$with_xdbe/lib
10483     if test -d $d; then
10484       X_LIBS="-L$d $X_LIBS"
10485       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $d" >&5
10486$as_echo "$d" >&6; }
10487     else
10488       { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found ($d: no such directory)" >&5
10489$as_echo "not found ($d: no such directory)" >&6; }
10490     fi
10491
10492     # replace the directory string with "yes".
10493     with_xdbe_req="yes"
10494     with_xdbe=$with_xdbe_req
10495     ;;
10496
10497    *)
10498     echo ""
10499     echo "error: argument to --with-xdbe-ext must be \"yes\", \"no\", or a directory."
10500     echo "       If it is a directory, then \`DIR/include' will be added to"
10501     echo "       the -I list, and \`DIR/lib' will be added to the -L list."
10502     exit 1
10503     ;;
10504   esac
10505
10506
10507if test "$with_xdbe" = yes; then
10508
10509
10510  ac_save_CPPFLAGS="$CPPFLAGS"
10511  if test \! -z "$includedir" ; then
10512    CPPFLAGS="$CPPFLAGS -I$includedir"
10513  fi
10514  CPPFLAGS="$CPPFLAGS $X_CFLAGS"
10515  CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
10516  ac_fn_c_check_header_compile "$LINENO" "X11/extensions/Xdbe.h" "ac_cv_header_X11_extensions_Xdbe_h" "#include <X11/Xlib.h>
10517"
10518if test "x$ac_cv_header_X11_extensions_Xdbe_h" = xyes; then :
10519  have_xdbe=yes
10520fi
10521
10522
10523  CPPFLAGS="$ac_save_CPPFLAGS"
10524  if test "$have_xdbe" = yes; then
10525    $as_echo "#define HAVE_DOUBLE_BUFFER_EXTENSION 1" >>confdefs.h
10526
10527  fi
10528
10529elif test "$with_xdbe" != no; then
10530  echo "error: must be yes or no: --with-xdbe-ext=$with_xshm"
10531  exit 1
10532fi
10533
10534
10535###############################################################################
10536#
10537#       Check for the COMPOSITE server extension.
10538#
10539###############################################################################
10540
10541#have_xcomposite=no
10542#with_xcomposite_req=unspecified
10543#AC_ARG_WITH(xcomposite-ext,
10544#[  --with-xcomposite-ext   Include support for the XCOMPOSITE extension.],
10545#  [with_xcomposite="$withval"; with_xcomposite_req="$withval"],
10546#  [with_xcomposite=yes])
10547#
10548#HANDLE_X_PATH_ARG(with_xcomposite, --with-xcomposite-ext, XCOMPOSITE)
10549#
10550#if test "$with_xcomposite" = yes; then
10551#
10552#  AC_CHECK_X_HEADER(X11/extensions/Xcomposite.h, [have_xcomposite=yes],,
10553#                    [#include <X11/Xlib.h>])
10554#  if test "$have_xcomposite" = yes; then
10555#    AC_DEFINE(HAVE_XCOMPOSITE_EXTENSION)
10556#    SAVER_LIBS="-lXcomposite $SAVER_LIBS"
10557#  fi
10558#
10559#elif test "$with_xcomposite" != no; then
10560#  echo "error: must be yes or no: --with-xcomposite-ext=$with_xshm"
10561#  exit 1
10562#fi
10563
10564
10565###############################################################################
10566#
10567#       Check for the XKB server extension.
10568#
10569###############################################################################
10570
10571have_xkb=no
10572with_xkb_req=unspecified
10573
10574# Check whether --with-xkb-ext was given.
10575if test "${with_xkb_ext+set}" = set; then :
10576  withval=$with_xkb_ext; with_xkb="$withval"; with_xkb_req="$withval"
10577else
10578  with_xkb=yes
10579fi
10580
10581
10582
10583   case "$with_xkb" in
10584    yes) ;;
10585    no)  ;;
10586
10587    /*)
10588     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XKB headers" >&5
10589$as_echo_n "checking for XKB headers... " >&6; }
10590     d=$with_xkb/include
10591     if test -d $d; then
10592       X_CFLAGS="-I$d $X_CFLAGS"
10593       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $d" >&5
10594$as_echo "$d" >&6; }
10595     else
10596       { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found ($d: no such directory)" >&5
10597$as_echo "not found ($d: no such directory)" >&6; }
10598     fi
10599
10600     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XKB libs" >&5
10601$as_echo_n "checking for XKB libs... " >&6; }
10602     d=$with_xkb/lib
10603     if test -d $d; then
10604       X_LIBS="-L$d $X_LIBS"
10605       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $d" >&5
10606$as_echo "$d" >&6; }
10607     else
10608       { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found ($d: no such directory)" >&5
10609$as_echo "not found ($d: no such directory)" >&6; }
10610     fi
10611
10612     # replace the directory string with "yes".
10613     with_xkb_req="yes"
10614     with_xkb=$with_xkb_req
10615     ;;
10616
10617    *)
10618     echo ""
10619     echo "error: argument to --with-xkb-ext must be \"yes\", \"no\", or a directory."
10620     echo "       If it is a directory, then \`DIR/include' will be added to"
10621     echo "       the -I list, and \`DIR/lib' will be added to the -L list."
10622     exit 1
10623     ;;
10624   esac
10625
10626
10627if test "$with_xkb" = yes; then
10628
10629
10630  ac_save_CPPFLAGS="$CPPFLAGS"
10631  if test \! -z "$includedir" ; then
10632    CPPFLAGS="$CPPFLAGS -I$includedir"
10633  fi
10634  CPPFLAGS="$CPPFLAGS $X_CFLAGS"
10635  CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
10636  ac_fn_c_check_header_compile "$LINENO" "X11/XKBlib.h" "ac_cv_header_X11_XKBlib_h" "#include <X11/Xlib.h>
10637"
10638if test "x$ac_cv_header_X11_XKBlib_h" = xyes; then :
10639  have_xkb=yes
10640fi
10641
10642
10643  CPPFLAGS="$ac_save_CPPFLAGS"
10644  if test "$have_xkb" = yes; then
10645    $as_echo "#define HAVE_XKB 1" >>confdefs.h
10646
10647  fi
10648
10649elif test "$with_xkb" != no; then
10650  echo "error: must be yes or no: --with-xkb-ext=$with_xshm"
10651  exit 1
10652fi
10653
10654
10655###############################################################################
10656#
10657#       Check for HP XHPDisableReset and XHPEnableReset.
10658#
10659###############################################################################
10660
10661{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for XHPDisableReset in X11/XHPlib.h" >&5
10662$as_echo_n "checking for XHPDisableReset in X11/XHPlib.h... " >&6; }
10663
10664  ac_save_CPPFLAGS="$CPPFLAGS"
10665  if test \! -z "$includedir" ; then
10666    CPPFLAGS="$CPPFLAGS -I$includedir"
10667  fi
10668  CPPFLAGS="$CPPFLAGS $X_CFLAGS"
10669  CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
10670  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10671/* end confdefs.h.  */
10672#include <X11/XHPlib.h>
10673
10674_ACEOF
10675if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
10676  $EGREP "XHPDisableReset" >/dev/null 2>&1; then :
10677  $as_echo "#define HAVE_XHPDISABLERESET 1" >>confdefs.h
10678
10679                   SAVER_LIBS="-lXhp11 $SAVER_LIBS"
10680                   { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10681$as_echo "yes" >&6; }
10682else
10683  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10684$as_echo "no" >&6; }
10685fi
10686rm -f conftest*
10687
10688  CPPFLAGS="$ac_save_CPPFLAGS"
10689
10690
10691###############################################################################
10692#
10693#       Check for /proc/interrupts.
10694#
10695###############################################################################
10696
10697have_proc_interrupts=no
10698with_proc_interrupts_req=unspecified
10699
10700# Check whether --with-proc-interrupts was given.
10701if test "${with_proc_interrupts+set}" = set; then :
10702  withval=$with_proc_interrupts; with_proc_interrupts="$withval"; with_proc_interrupts_req="$withval"
10703else
10704  with_proc_interrupts=no
10705fi
10706
10707
10708if test "$with_proc_interrupts" = yes; then
10709
10710  # Note that we may be building in an environment (e.g. Debian buildd chroot)
10711  # without a proper /proc filesystem. If /proc/interrupts exists, then we'll
10712  # check that it has the bits we need, but otherwise we'll just go on faith.
10713  #
10714  have_proc_interrupts=yes
10715
10716  if test -f /proc/interrupts; then
10717   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether /proc/interrupts contains keyboard data" >&5
10718$as_echo_n "checking whether /proc/interrupts contains keyboard data... " >&6; }
10719if ${ac_cv_have_proc_interrupts+:} false; then :
10720  $as_echo_n "(cached) " >&6
10721else
10722  ac_cv_have_proc_interrupts=no
10723     if grep 'keyboard\|i8042' /proc/interrupts >/dev/null 2>&1 ; then
10724       ac_cv_have_proc_interrupts=yes
10725     fi
10726
10727fi
10728{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_proc_interrupts" >&5
10729$as_echo "$ac_cv_have_proc_interrupts" >&6; }
10730   have_proc_interrupts=$ac_cv_have_proc_interrupts
10731  fi
10732
10733  if test "$have_proc_interrupts" = yes; then
10734    $as_echo "#define HAVE_PROC_INTERRUPTS 1" >>confdefs.h
10735
10736  fi
10737
10738elif test "$with_proc_interrupts" != no; then
10739  echo "error: must be yes or no: --with-proc-interrupts=$with_proc_interrupts"
10740  exit 1
10741fi
10742
10743
10744###############################################################################
10745#
10746#       Check for /proc/*/oom_score_adj.
10747#
10748###############################################################################
10749
10750setuid_auth=no
10751have_proc_oom=no
10752with_proc_oom_req=unspecified
10753
10754# Check whether --with-proc-oom was given.
10755if test "${with_proc_oom+set}" = set; then :
10756  withval=$with_proc_oom; with_proc_oom="$withval"; with_proc_oom_req="$withval"
10757else
10758  with_proc_oom=yes
10759fi
10760
10761
10762if test "$with_proc_oom_req" = yes; then
10763
10764  # Note that we may be building in an environment (e.g. Debian buildd chroot)
10765  # without a proper /proc filesystem.
10766  #
10767  have_proc_oom=yes
10768  $as_echo "#define HAVE_PROC_OOM 1" >>confdefs.h
10769
10770
10771elif test "$with_proc_oom_req" = unspecified; then
10772
10773  have_proc_oom=no
10774  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether /proc/$$/oom_score_adj exists" >&5
10775$as_echo_n "checking whether /proc/$$/oom_score_adj exists... " >&6; }
10776if ${ac_cv_have_proc_oom+:} false; then :
10777  $as_echo_n "(cached) " >&6
10778else
10779  ac_cv_have_proc_oom=no
10780     if test -f /proc/$$/oom_score_adj; then
10781       ac_cv_have_proc_oom=yes
10782     fi
10783
10784fi
10785{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_proc_oom" >&5
10786$as_echo "$ac_cv_have_proc_oom" >&6; }
10787  have_proc_oom=$ac_cv_have_proc_oom
10788
10789  if test "$have_proc_oom" = yes; then
10790    $as_echo "#define HAVE_PROC_OOM 1" >>confdefs.h
10791
10792    # Only root can write to /proc/$$/oom_score_adj, even though it's us.
10793    { $as_echo "$as_me:${as_lineno-$LINENO}: result: enabling setuid to opt out of OOM-killer." >&5
10794$as_echo "enabling setuid to opt out of OOM-killer." >&6; }
10795    setuid_auth=yes
10796  fi
10797
10798elif test "$with_proc_oom" != no; then
10799  echo "error: must be yes or no: --with-proc-oom=$with_proc_oom"
10800  exit 1
10801fi
10802
10803
10804###############################################################################
10805#
10806#       Check for -lsystemd
10807#
10808###############################################################################
10809
10810have_systemd=no
10811with_systemd_req=unspecified
10812systemd_halfassed=no
10813systemd_too_old=no
10814
10815# Check whether --with-systemd was given.
10816if test "${with_systemd+set}" = set; then :
10817  withval=$with_systemd; with_systemd="$withval"; with_systemd_req="$withval"
10818else
10819  with_systemd=yes
10820fi
10821
10822
10823
10824   case "$with_systemd" in
10825    yes) ;;
10826    no)  ;;
10827
10828    /*)
10829     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for systemd headers" >&5
10830$as_echo_n "checking for systemd headers... " >&6; }
10831     d=$with_systemd/include
10832     if test -d $d; then
10833       X_CFLAGS="-I$d $X_CFLAGS"
10834       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $d" >&5
10835$as_echo "$d" >&6; }
10836     else
10837       { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found ($d: no such directory)" >&5
10838$as_echo "not found ($d: no such directory)" >&6; }
10839     fi
10840
10841     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for systemd libs" >&5
10842$as_echo_n "checking for systemd libs... " >&6; }
10843     d=$with_systemd/lib
10844     if test -d $d; then
10845       X_LIBS="-L$d $X_LIBS"
10846       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $d" >&5
10847$as_echo "$d" >&6; }
10848     else
10849       { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found ($d: no such directory)" >&5
10850$as_echo "not found ($d: no such directory)" >&6; }
10851     fi
10852
10853     # replace the directory string with "yes".
10854     with_systemd_req="yes"
10855     with_systemd=$with_systemd_req
10856     ;;
10857
10858    *)
10859     echo ""
10860     echo "error: argument to --with-systemd must be \"yes\", \"no\", or a directory."
10861     echo "       If it is a directory, then \`DIR/include' will be added to"
10862     echo "       the -I list, and \`DIR/lib' will be added to the -L list."
10863     exit 1
10864     ;;
10865   esac
10866
10867
10868if test "$with_systemd" != yes -a "$with_systemd" != no ; then
10869  echo "error: must be yes or no: --with-systemd=$with_systemd"
10870  exit 1
10871fi
10872
10873if test "$with_systemd" = yes; then
10874
10875  pkgs=''
10876  ok="yes"
10877  pkg_check_version libsystemd 221
10878  have_systemd="$ok"
10879
10880  if test "$have_systemd" = no; then
10881    if $pkg_config --exists libsystemd ; then
10882      systemd_too_old=yes
10883    fi
10884  fi
10885
10886  if test "$have_systemd" = yes; then
10887    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libsystemd includes" >&5
10888$as_echo_n "checking for libsystemd includes... " >&6; }
10889if ${ac_cv_systemd_config_cflags+:} false; then :
10890  $as_echo_n "(cached) " >&6
10891else
10892  ac_cv_systemd_config_cflags=`$pkg_config --cflags $pkgs`
10893fi
10894{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_systemd_config_cflags" >&5
10895$as_echo "$ac_cv_systemd_config_cflags" >&6; }
10896    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libsystemd libs" >&5
10897$as_echo_n "checking for libsystemd libs... " >&6; }
10898if ${ac_cv_systemd_config_libs+:} false; then :
10899  $as_echo_n "(cached) " >&6
10900else
10901  ac_cv_systemd_config_libs=`$pkg_config --libs $pkgs`
10902fi
10903{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_systemd_config_libs" >&5
10904$as_echo "$ac_cv_systemd_config_libs" >&6; }
10905  fi
10906
10907  ac_systemd_config_cflags=$ac_cv_systemd_config_cflags
10908  ac_systemd_config_libs=$ac_cv_systemd_config_libs
10909
10910  if test "$have_systemd" = yes; then
10911    #
10912    # we appear to have libsystemd; check for headers/libs to be sure.
10913    #
10914    ac_save_systemd_CPPFLAGS="$CPPFLAGS"
10915    CPPFLAGS="$CPPFLAGS $ac_systemd_config_cflags"
10916
10917    have_systemd=no
10918
10919  ac_save_CPPFLAGS="$CPPFLAGS"
10920  if test \! -z "$includedir" ; then
10921    CPPFLAGS="$CPPFLAGS -I$includedir"
10922  fi
10923  CPPFLAGS="$CPPFLAGS $X_CFLAGS"
10924  CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
10925  ac_fn_c_check_header_mongrel "$LINENO" "systemd/sd-bus.h" "ac_cv_header_systemd_sd_bus_h" "$ac_includes_default"
10926if test "x$ac_cv_header_systemd_sd_bus_h" = xyes; then :
10927  have_systemd=yes
10928fi
10929
10930
10931  CPPFLAGS="$ac_save_CPPFLAGS"
10932
10933    CPPFLAGS="$ac_save_systemd_CPPFLAGS"
10934  fi
10935
10936  if test "$have_systemd" = yes; then
10937    # we have the headers, now check for the libraries
10938    have_systemd=no
10939    systemd_halfassed=yes
10940    { $as_echo "$as_me:${as_lineno-$LINENO}: result: checking for libsystemd usability..." >&5
10941$as_echo "checking for libsystemd usability..." >&6; }
10942
10943  ac_save_CPPFLAGS="$CPPFLAGS"
10944  ac_save_LDFLAGS="$LDFLAGS"
10945#  ac_save_LIBS="$LIBS"
10946
10947  if test \! -z "$includedir" ; then
10948    CPPFLAGS="$CPPFLAGS -I$includedir"
10949  fi
10950  # note: $X_CFLAGS includes $x_includes
10951  CPPFLAGS="$CPPFLAGS $X_CFLAGS"
10952
10953  if test \! -z "$libdir" ; then
10954    LDFLAGS="$LDFLAGS -L$libdir"
10955  fi
10956  # note: $X_LIBS includes $x_libraries
10957  LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
10958
10959  CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
10960  LDFLAGS=`eval eval eval eval eval eval eval eval eval echo $LDFLAGS`
10961  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for sd_bus_open_system in -lc" >&5
10962$as_echo_n "checking for sd_bus_open_system in -lc... " >&6; }
10963if ${ac_cv_lib_c_sd_bus_open_system+:} false; then :
10964  $as_echo_n "(cached) " >&6
10965else
10966  ac_check_lib_save_LIBS=$LIBS
10967LIBS="-lc $ac_systemd_config_libs -lX11 -lXext -lm $LIBS"
10968cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10969/* end confdefs.h.  */
10970
10971/* Override any GCC internal prototype to avoid an error.
10972   Use char because int might match the return type of a GCC
10973   builtin and then its argument prototype would still apply.  */
10974#ifdef __cplusplus
10975extern "C"
10976#endif
10977char sd_bus_open_system ();
10978int
10979main ()
10980{
10981return sd_bus_open_system ();
10982  ;
10983  return 0;
10984}
10985_ACEOF
10986if ac_fn_c_try_link "$LINENO"; then :
10987  ac_cv_lib_c_sd_bus_open_system=yes
10988else
10989  ac_cv_lib_c_sd_bus_open_system=no
10990fi
10991rm -f core conftest.err conftest.$ac_objext \
10992    conftest$ac_exeext conftest.$ac_ext
10993LIBS=$ac_check_lib_save_LIBS
10994fi
10995{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_c_sd_bus_open_system" >&5
10996$as_echo "$ac_cv_lib_c_sd_bus_open_system" >&6; }
10997if test "x$ac_cv_lib_c_sd_bus_open_system" = xyes; then :
10998  have_systemd=yes; systemd_halfassed=no
10999fi
11000
11001  CPPFLAGS="$ac_save_CPPFLAGS"
11002  LDFLAGS="$ac_save_LDFLAGS"
11003#  LIBS="$ac_save_LIBS"
11004
11005  fi
11006
11007  if test "$have_systemd" = no; then
11008    { $as_echo "$as_me:${as_lineno-$LINENO}: result: checking for libsystemd usability... no" >&5
11009$as_echo "checking for libsystemd usability... no" >&6; }
11010  fi
11011fi
11012
11013if test "$have_systemd" = yes; then
11014  INCLUDES="$INCLUDES $ac_systemd_config_cflags"
11015  EXES_SYSTEMD='$(EXES_SYSTEMD)'
11016  SYSTEMD_LIBS="$ac_systemd_config_libs"
11017  $as_echo "#define HAVE_LIBSYSTEMD 1" >>confdefs.h
11018
11019else
11020  EXES_SYSTEMD=''
11021  SYSTEMD_LIBS=''
11022fi
11023
11024
11025###############################################################################
11026#
11027#       Check for -lelogind, a stripped down subset of systemd.
11028#
11029###############################################################################
11030
11031have_elogind=no
11032with_elogind_req=unspecified
11033elogind_halfassed=no
11034elogind_too_old=no
11035
11036# Check whether --with-elogind was given.
11037if test "${with_elogind+set}" = set; then :
11038  withval=$with_elogind; with_elogind="$withval"; with_elogind_req="$withval"
11039else
11040  with_elogind=yes
11041fi
11042
11043
11044
11045   case "$with_elogind" in
11046    yes) ;;
11047    no)  ;;
11048
11049    /*)
11050     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for elogind headers" >&5
11051$as_echo_n "checking for elogind headers... " >&6; }
11052     d=$with_elogind/include
11053     if test -d $d; then
11054       X_CFLAGS="-I$d $X_CFLAGS"
11055       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $d" >&5
11056$as_echo "$d" >&6; }
11057     else
11058       { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found ($d: no such directory)" >&5
11059$as_echo "not found ($d: no such directory)" >&6; }
11060     fi
11061
11062     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for elogind libs" >&5
11063$as_echo_n "checking for elogind libs... " >&6; }
11064     d=$with_elogind/lib
11065     if test -d $d; then
11066       X_LIBS="-L$d $X_LIBS"
11067       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $d" >&5
11068$as_echo "$d" >&6; }
11069     else
11070       { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found ($d: no such directory)" >&5
11071$as_echo "not found ($d: no such directory)" >&6; }
11072     fi
11073
11074     # replace the directory string with "yes".
11075     with_elogind_req="yes"
11076     with_elogind=$with_elogind_req
11077     ;;
11078
11079    *)
11080     echo ""
11081     echo "error: argument to --with-elogind must be \"yes\", \"no\", or a directory."
11082     echo "       If it is a directory, then \`DIR/include' will be added to"
11083     echo "       the -I list, and \`DIR/lib' will be added to the -L list."
11084     exit 1
11085     ;;
11086   esac
11087
11088
11089if test "$with_elogind" != yes -a "$with_elogind" != no ; then
11090  echo "error: must be yes or no: --with-elogind=$with_elogind"
11091  exit 1
11092fi
11093
11094if test "$with_elogind" = yes; then
11095
11096  pkgs=''
11097  ok="yes"
11098  pkg_check_version libelogind 221
11099  have_elogind="$ok"
11100
11101  if test "$have_elogind" = no; then
11102    if $pkg_config --exists libelogind ; then
11103      elogind_too_old=yes
11104    fi
11105  fi
11106
11107  if test "$have_elogind" = yes; then
11108    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libelogind includes" >&5
11109$as_echo_n "checking for libelogind includes... " >&6; }
11110if ${ac_cv_elogind_config_cflags+:} false; then :
11111  $as_echo_n "(cached) " >&6
11112else
11113  ac_cv_elogind_config_cflags=`$pkg_config --cflags $pkgs`
11114fi
11115{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_elogind_config_cflags" >&5
11116$as_echo "$ac_cv_elogind_config_cflags" >&6; }
11117    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libelogind libs" >&5
11118$as_echo_n "checking for libelogind libs... " >&6; }
11119if ${ac_cv_elogind_config_libs+:} false; then :
11120  $as_echo_n "(cached) " >&6
11121else
11122  ac_cv_elogind_config_libs=`$pkg_config --libs $pkgs`
11123fi
11124{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_elogind_config_libs" >&5
11125$as_echo "$ac_cv_elogind_config_libs" >&6; }
11126  fi
11127
11128  ac_elogind_config_cflags=$ac_cv_elogind_config_cflags
11129  ac_elogind_config_libs=$ac_cv_elogind_config_libs
11130
11131  if test "$have_elogind" = yes; then
11132    #
11133    # we appear to have libelogind; check for headers/libs to be sure.
11134    #
11135    ac_save_elogind_CPPFLAGS="$CPPFLAGS"
11136    CPPFLAGS="$CPPFLAGS $ac_elogind_config_cflags"
11137
11138    have_elogind=no
11139
11140  ac_save_CPPFLAGS="$CPPFLAGS"
11141  if test \! -z "$includedir" ; then
11142    CPPFLAGS="$CPPFLAGS -I$includedir"
11143  fi
11144  CPPFLAGS="$CPPFLAGS $X_CFLAGS"
11145  CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
11146  ac_fn_c_check_header_mongrel "$LINENO" "elogind/sd-bus.h" "ac_cv_header_elogind_sd_bus_h" "$ac_includes_default"
11147if test "x$ac_cv_header_elogind_sd_bus_h" = xyes; then :
11148  have_elogind=yes
11149fi
11150
11151
11152  CPPFLAGS="$ac_save_CPPFLAGS"
11153
11154    CPPFLAGS="$ac_save_elogind_CPPFLAGS"
11155  fi
11156
11157  if test "$have_elogind" = yes; then
11158    # we have the headers, now check for the libraries
11159    have_elogind=no
11160    elogind_halfassed=yes
11161    { $as_echo "$as_me:${as_lineno-$LINENO}: result: checking for libelogind usability..." >&5
11162$as_echo "checking for libelogind usability..." >&6; }
11163
11164  ac_save_CPPFLAGS="$CPPFLAGS"
11165  ac_save_LDFLAGS="$LDFLAGS"
11166#  ac_save_LIBS="$LIBS"
11167
11168  if test \! -z "$includedir" ; then
11169    CPPFLAGS="$CPPFLAGS -I$includedir"
11170  fi
11171  # note: $X_CFLAGS includes $x_includes
11172  CPPFLAGS="$CPPFLAGS $X_CFLAGS"
11173
11174  if test \! -z "$libdir" ; then
11175    LDFLAGS="$LDFLAGS -L$libdir"
11176  fi
11177  # note: $X_LIBS includes $x_libraries
11178  LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
11179
11180  CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
11181  LDFLAGS=`eval eval eval eval eval eval eval eval eval echo $LDFLAGS`
11182  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for sd_bus_open_system in -lc" >&5
11183$as_echo_n "checking for sd_bus_open_system in -lc... " >&6; }
11184if ${ac_cv_lib_c_sd_bus_open_system+:} false; then :
11185  $as_echo_n "(cached) " >&6
11186else
11187  ac_check_lib_save_LIBS=$LIBS
11188LIBS="-lc $ac_elogind_config_libs -lX11 -lXext -lm $LIBS"
11189cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11190/* end confdefs.h.  */
11191
11192/* Override any GCC internal prototype to avoid an error.
11193   Use char because int might match the return type of a GCC
11194   builtin and then its argument prototype would still apply.  */
11195#ifdef __cplusplus
11196extern "C"
11197#endif
11198char sd_bus_open_system ();
11199int
11200main ()
11201{
11202return sd_bus_open_system ();
11203  ;
11204  return 0;
11205}
11206_ACEOF
11207if ac_fn_c_try_link "$LINENO"; then :
11208  ac_cv_lib_c_sd_bus_open_system=yes
11209else
11210  ac_cv_lib_c_sd_bus_open_system=no
11211fi
11212rm -f core conftest.err conftest.$ac_objext \
11213    conftest$ac_exeext conftest.$ac_ext
11214LIBS=$ac_check_lib_save_LIBS
11215fi
11216{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_c_sd_bus_open_system" >&5
11217$as_echo "$ac_cv_lib_c_sd_bus_open_system" >&6; }
11218if test "x$ac_cv_lib_c_sd_bus_open_system" = xyes; then :
11219  have_elogind=yes; elogind_halfassed=no
11220fi
11221
11222  CPPFLAGS="$ac_save_CPPFLAGS"
11223  LDFLAGS="$ac_save_LDFLAGS"
11224#  LIBS="$ac_save_LIBS"
11225
11226  fi
11227
11228  if test "$have_elogind" = no; then
11229    { $as_echo "$as_me:${as_lineno-$LINENO}: result: checking for libelogind usability... no" >&5
11230$as_echo "checking for libelogind usability... no" >&6; }
11231  fi
11232fi
11233
11234if test "$have_elogind" = yes; then
11235  INCLUDES="$INCLUDES $ac_elogind_config_cflags"
11236  EXES_SYSTEMD='$(EXES_SYSTEMD)'
11237  SYSTEMD_LIBS="$ac_elogind_config_libs"
11238  $as_echo "#define HAVE_LIBELOGIND 1" >>confdefs.h
11239
11240fi
11241
11242
11243###############################################################################
11244#
11245#       The --enable-locking option
11246#
11247#	Note: "configure --help" list all "--enable" options before any
11248#	"--with" options, so we document the --enable options inline with
11249#	the --with options where it looks better, instead of in AC_ARG_ENABLE
11250#	where it would make sense, sigh...
11251#
11252###############################################################################
11253
11254# Check whether --enable-locking was given.
11255if test "${enable_locking+set}" = set; then :
11256  enableval=$enable_locking; # This is documented elsewhere because of --enable/--with option sorting.
11257  enable_locking="$enableval"
11258else
11259  if test "$ac_macosx" = yes; then
11260    # We can't lock on macOS, so default to not compiling in support for it.
11261    # But allow --enable-locking to override that, so I can debug Linux locking
11262    # under macOS X11.
11263    enable_locking=no
11264   else
11265    enable_locking=yes
11266   fi
11267fi
11268
11269if test "$enable_locking" = yes; then
11270  true
11271elif test "$enable_locking" = no; then
11272  $as_echo "#define NO_LOCKING 1" >>confdefs.h
11273
11274else
11275  echo "error: must be yes or no: --enable-locking=$enable_locking"
11276  exit 1
11277fi
11278
11279
11280##############################################################################
11281#
11282#       Whether to allow root password to unblank.
11283#
11284###############################################################################
11285
11286# Check whether --enable-root-passwd was given.
11287if test "${enable_root_passwd+set}" = set; then :
11288  enableval=$enable_root_passwd; # This is documented elsewhere because of --enable/--with option sorting.
11289  enable_root_passwd="$enableval"
11290else
11291  enable_root_passwd=no
11292fi
11293
11294if test "$enable_root_passwd" = yes; then
11295  $as_echo "#define ALLOW_ROOT_PASSWD 1" >>confdefs.h
11296
11297  true
11298elif test "$enable_root_passwd" != no; then
11299  echo "error: must be yes or no: --enable-root-passwd=$enable_root_passwd"
11300  exit 1
11301fi
11302
11303
11304###############################################################################
11305#
11306#       Check for PAM.
11307#
11308###############################################################################
11309
11310case "$host" in
11311  *-solaris*)
11312   # Solaris systems tend to have the PAM runtime misconfigured and unusable.
11313   with_pam_default=no
11314   ;;
11315  *-freebsd* )
11316   # FreeBSD's PAM implementation requires the calling process to be setuid
11317   # the whole time, which is unacceptable.
11318   with_pam_default=no
11319   ;;
11320  *)
11321   # Default to building PAM support on all other systems, if it exists.
11322   with_pam_default=yes
11323  ;;
11324esac
11325
11326#### H1
11327
11328have_pam=no
11329with_pam_req=unspecified
11330
11331
11332# Check whether --with-pam was given.
11333if test "${with_pam+set}" = set; then :
11334  withval=$with_pam; with_pam="$withval"; with_pam_req="$withval"
11335else
11336  with_pam=$with_pam_default
11337fi
11338
11339
11340
11341# Check whether --with-pam_service_name was given.
11342if test "${with_pam_service_name+set}" = set; then :
11343  withval=$with_pam_service_name; pam_service_name="$withval"
11344else
11345  pam_service_name="xscreensaver"
11346fi
11347
11348
11349# Check whether --enable-pam-check-account-type was given.
11350if test "${enable_pam_check_account_type+set}" = set; then :
11351  enableval=$enable_pam_check_account_type; # This is documented elsewhere because of --enable/--with option sorting.
11352  enable_pam_check_account_type="$enableval"
11353else
11354  enable_pam_check_account_type=no
11355fi
11356
11357if test "$enable_pam_check_account_type" = yes ; then
11358  $as_echo "#define PAM_CHECK_ACCOUNT_TYPE 1" >>confdefs.h
11359
11360  true
11361elif test "$enable_pam_check_account_type" != no ; then
11362  echo "error: must be yes or no: --enable-pam-check-account-type=$enable_pam_check_account_type"
11363  exit 1
11364fi
11365
11366
11367   case "$with_pam" in
11368    yes) ;;
11369    no)  ;;
11370
11371    /*)
11372     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PAM headers" >&5
11373$as_echo_n "checking for PAM headers... " >&6; }
11374     d=$with_pam/include
11375     if test -d $d; then
11376       X_CFLAGS="-I$d $X_CFLAGS"
11377       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $d" >&5
11378$as_echo "$d" >&6; }
11379     else
11380       { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found ($d: no such directory)" >&5
11381$as_echo "not found ($d: no such directory)" >&6; }
11382     fi
11383
11384     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PAM libs" >&5
11385$as_echo_n "checking for PAM libs... " >&6; }
11386     d=$with_pam/lib
11387     if test -d $d; then
11388       X_LIBS="-L$d $X_LIBS"
11389       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $d" >&5
11390$as_echo "$d" >&6; }
11391     else
11392       { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found ($d: no such directory)" >&5
11393$as_echo "not found ($d: no such directory)" >&6; }
11394     fi
11395
11396     # replace the directory string with "yes".
11397     with_pam_req="yes"
11398     with_pam=$with_pam_req
11399     ;;
11400
11401    *)
11402     echo ""
11403     echo "error: argument to --with-pam must be \"yes\", \"no\", or a directory."
11404     echo "       If it is a directory, then \`DIR/include' will be added to"
11405     echo "       the -I list, and \`DIR/lib' will be added to the -L list."
11406     exit 1
11407     ;;
11408   esac
11409
11410
11411if test "$enable_locking" = yes -a "$with_pam" = yes; then
11412  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PAM" >&5
11413$as_echo_n "checking for PAM... " >&6; }
11414if ${ac_cv_pam+:} false; then :
11415  $as_echo_n "(cached) " >&6
11416else
11417
11418  ac_save_CPPFLAGS="$CPPFLAGS"
11419  if test \! -z "$includedir" ; then
11420    CPPFLAGS="$CPPFLAGS -I$includedir"
11421  fi
11422  CPPFLAGS="$CPPFLAGS $X_CFLAGS"
11423  CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
11424  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11425/* end confdefs.h.  */
11426#include <security/pam_appl.h>
11427int
11428main ()
11429{
11430
11431  ;
11432  return 0;
11433}
11434_ACEOF
11435if ac_fn_c_try_compile "$LINENO"; then :
11436  ac_cv_pam=yes
11437else
11438  ac_cv_pam=no
11439fi
11440rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11441  CPPFLAGS="$ac_save_CPPFLAGS"
11442fi
11443{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_pam" >&5
11444$as_echo "$ac_cv_pam" >&6; }
11445  if test "$ac_cv_pam" = yes ; then
11446    have_pam=yes
11447    $as_echo "#define HAVE_PAM 1" >>confdefs.h
11448
11449    cat >>confdefs.h <<_ACEOF
11450#define PAM_SERVICE_NAME "$pam_service_name"
11451_ACEOF
11452
11453
11454    PASSWD_LIBS="${PASSWD_LIBS} -lpam"
11455
11456    # libpam typically requires dlopen and dlsym.  On FreeBSD,
11457    # those are in libc.  On Linux and Solaris, they're in libdl.
11458    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5
11459$as_echo_n "checking for dlopen in -ldl... " >&6; }
11460if ${ac_cv_lib_dl_dlopen+:} false; then :
11461  $as_echo_n "(cached) " >&6
11462else
11463  ac_check_lib_save_LIBS=$LIBS
11464LIBS="-ldl  $LIBS"
11465cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11466/* end confdefs.h.  */
11467
11468/* Override any GCC internal prototype to avoid an error.
11469   Use char because int might match the return type of a GCC
11470   builtin and then its argument prototype would still apply.  */
11471#ifdef __cplusplus
11472extern "C"
11473#endif
11474char dlopen ();
11475int
11476main ()
11477{
11478return dlopen ();
11479  ;
11480  return 0;
11481}
11482_ACEOF
11483if ac_fn_c_try_link "$LINENO"; then :
11484  ac_cv_lib_dl_dlopen=yes
11485else
11486  ac_cv_lib_dl_dlopen=no
11487fi
11488rm -f core conftest.err conftest.$ac_objext \
11489    conftest$ac_exeext conftest.$ac_ext
11490LIBS=$ac_check_lib_save_LIBS
11491fi
11492{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5
11493$as_echo "$ac_cv_lib_dl_dlopen" >&6; }
11494if test "x$ac_cv_lib_dl_dlopen" = xyes; then :
11495  PASSWD_LIBS="${PASSWD_LIBS} -ldl"
11496fi
11497
11498
11499    # On Linux, sigtimedwait() is in libc; on Solaris, it's in librt.
11500    have_timedwait=no
11501    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for sigtimedwait in -lc" >&5
11502$as_echo_n "checking for sigtimedwait in -lc... " >&6; }
11503if ${ac_cv_lib_c_sigtimedwait+:} false; then :
11504  $as_echo_n "(cached) " >&6
11505else
11506  ac_check_lib_save_LIBS=$LIBS
11507LIBS="-lc  $LIBS"
11508cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11509/* end confdefs.h.  */
11510
11511/* Override any GCC internal prototype to avoid an error.
11512   Use char because int might match the return type of a GCC
11513   builtin and then its argument prototype would still apply.  */
11514#ifdef __cplusplus
11515extern "C"
11516#endif
11517char sigtimedwait ();
11518int
11519main ()
11520{
11521return sigtimedwait ();
11522  ;
11523  return 0;
11524}
11525_ACEOF
11526if ac_fn_c_try_link "$LINENO"; then :
11527  ac_cv_lib_c_sigtimedwait=yes
11528else
11529  ac_cv_lib_c_sigtimedwait=no
11530fi
11531rm -f core conftest.err conftest.$ac_objext \
11532    conftest$ac_exeext conftest.$ac_ext
11533LIBS=$ac_check_lib_save_LIBS
11534fi
11535{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_c_sigtimedwait" >&5
11536$as_echo "$ac_cv_lib_c_sigtimedwait" >&6; }
11537if test "x$ac_cv_lib_c_sigtimedwait" = xyes; then :
11538  have_timedwait=yes
11539                  $as_echo "#define HAVE_SIGTIMEDWAIT 1" >>confdefs.h
11540
11541fi
11542
11543    if test "$have_timedwait" = no ; then
11544      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for sigtimedwait in -lrt" >&5
11545$as_echo_n "checking for sigtimedwait in -lrt... " >&6; }
11546if ${ac_cv_lib_rt_sigtimedwait+:} false; then :
11547  $as_echo_n "(cached) " >&6
11548else
11549  ac_check_lib_save_LIBS=$LIBS
11550LIBS="-lrt  $LIBS"
11551cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11552/* end confdefs.h.  */
11553
11554/* Override any GCC internal prototype to avoid an error.
11555   Use char because int might match the return type of a GCC
11556   builtin and then its argument prototype would still apply.  */
11557#ifdef __cplusplus
11558extern "C"
11559#endif
11560char sigtimedwait ();
11561int
11562main ()
11563{
11564return sigtimedwait ();
11565  ;
11566  return 0;
11567}
11568_ACEOF
11569if ac_fn_c_try_link "$LINENO"; then :
11570  ac_cv_lib_rt_sigtimedwait=yes
11571else
11572  ac_cv_lib_rt_sigtimedwait=no
11573fi
11574rm -f core conftest.err conftest.$ac_objext \
11575    conftest$ac_exeext conftest.$ac_ext
11576LIBS=$ac_check_lib_save_LIBS
11577fi
11578{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_rt_sigtimedwait" >&5
11579$as_echo "$ac_cv_lib_rt_sigtimedwait" >&6; }
11580if test "x$ac_cv_lib_rt_sigtimedwait" = xyes; then :
11581  have_timedwait=yes
11582                                      $as_echo "#define HAVE_SIGTIMEDWAIT 1" >>confdefs.h
11583
11584                                      PASSWD_LIBS="${PASSWD_LIBS} -lrt"
11585fi
11586
11587    fi
11588
11589    { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to call pam_strerror" >&5
11590$as_echo_n "checking how to call pam_strerror... " >&6; }
11591    if ${ac_cv_pam_strerror_args+:} false; then :
11592  $as_echo_n "(cached) " >&6
11593else
11594
11595  ac_save_CPPFLAGS="$CPPFLAGS"
11596  if test \! -z "$includedir" ; then
11597    CPPFLAGS="$CPPFLAGS -I$includedir"
11598  fi
11599  CPPFLAGS="$CPPFLAGS $X_CFLAGS"
11600  CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
11601  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11602/* end confdefs.h.  */
11603#include <stdio.h>
11604                        #include <stdlib.h>
11605                        #include <security/pam_appl.h>
11606int
11607main ()
11608{
11609pam_handle_t *pamh = 0;
11610                        char *s = pam_strerror(pamh, PAM_SUCCESS);
11611  ;
11612  return 0;
11613}
11614_ACEOF
11615if ac_fn_c_try_compile "$LINENO"; then :
11616  ac_pam_strerror_args=2
11617else
11618
11619  ac_save_CPPFLAGS="$CPPFLAGS"
11620  if test \! -z "$includedir" ; then
11621    CPPFLAGS="$CPPFLAGS -I$includedir"
11622  fi
11623  CPPFLAGS="$CPPFLAGS $X_CFLAGS"
11624  CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
11625  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11626/* end confdefs.h.  */
11627#include <stdio.h>
11628                                          #include <stdlib.h>
11629                                          #include <security/pam_appl.h>
11630int
11631main ()
11632{
11633char *s =
11634                                           pam_strerror(PAM_SUCCESS);
11635  ;
11636  return 0;
11637}
11638_ACEOF
11639if ac_fn_c_try_compile "$LINENO"; then :
11640  ac_pam_strerror_args=1
11641else
11642  ac_pam_strerror_args=0
11643fi
11644rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11645  CPPFLAGS="$ac_save_CPPFLAGS"
11646fi
11647rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11648  CPPFLAGS="$ac_save_CPPFLAGS"
11649      ac_cv_pam_strerror_args=$ac_pam_strerror_args
11650fi
11651
11652    ac_pam_strerror_args=$ac_cv_pam_strerror_args
11653    if test "$ac_pam_strerror_args" = 1 ; then
11654      { $as_echo "$as_me:${as_lineno-$LINENO}: result: one argument" >&5
11655$as_echo "one argument" >&6; }
11656    elif test "$ac_pam_strerror_args" = 2 ; then
11657      $as_echo "#define PAM_STRERROR_TWO_ARGS 1" >>confdefs.h
11658
11659      { $as_echo "$as_me:${as_lineno-$LINENO}: result: two arguments" >&5
11660$as_echo "two arguments" >&6; }
11661    else
11662      { $as_echo "$as_me:${as_lineno-$LINENO}: result: unknown" >&5
11663$as_echo "unknown" >&6; }
11664    fi
11665
11666# Check pam_fail_delay
11667    { $as_echo "$as_me:${as_lineno-$LINENO}: checking pam_fail_delay in -lpam" >&5
11668$as_echo_n "checking pam_fail_delay in -lpam... " >&6; }
11669    if ${ac_cv_pam_fail_delay+:} false; then :
11670  $as_echo_n "(cached) " >&6
11671else
11672  ac_save_LDFLAGS="$LDFLAGS"
11673      LDFLAGS="-lpam"
11674      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11675/* end confdefs.h.  */
11676#include <security/pam_appl.h>
11677int
11678main ()
11679{
11680pam_handle_t *pamh = 0;
11681		   unsigned int usec = 1;
11682		   int status = pam_fail_delay (pamh, usec);
11683  ;
11684  return 0;
11685}
11686_ACEOF
11687if ac_fn_c_try_link "$LINENO"; then :
11688  ac_pam_fail_delay=yes
11689else
11690  ac_pam_fail_delay=no
11691fi
11692rm -f core conftest.err conftest.$ac_objext \
11693    conftest$ac_exeext conftest.$ac_ext
11694      ac_cv_pam_fail_delay=$ac_pam_fail_delay,
11695      LDFLAGS=$ac_save_LDFLAGS
11696fi
11697
11698
11699      if test "$ac_pam_fail_delay" = yes ; then
11700        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11701$as_echo "yes" >&6; }
11702        $as_echo "#define HAVE_PAM_FAIL_DELAY 1" >>confdefs.h
11703
11704      else
11705        { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11706$as_echo "no" >&6; }
11707      fi
11708
11709  fi
11710fi
11711
11712
11713###############################################################################
11714#
11715#       Check for Kerberos.
11716#
11717###############################################################################
11718
11719have_kerberos=no
11720have_kerberos5=no
11721with_kerberos_req=unspecified
11722
11723
11724# Check whether --with-kerberos was given.
11725if test "${with_kerberos+set}" = set; then :
11726  withval=$with_kerberos; with_kerberos="$withval"; with_kerberos_req="$withval"
11727else
11728  with_kerberos=yes
11729fi
11730
11731
11732
11733   case "$with_kerberos" in
11734    yes) ;;
11735    no)  ;;
11736
11737    /*)
11738     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Kerberos headers" >&5
11739$as_echo_n "checking for Kerberos headers... " >&6; }
11740     d=$with_kerberos/include
11741     if test -d $d; then
11742       X_CFLAGS="-I$d $X_CFLAGS"
11743       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $d" >&5
11744$as_echo "$d" >&6; }
11745     else
11746       { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found ($d: no such directory)" >&5
11747$as_echo "not found ($d: no such directory)" >&6; }
11748     fi
11749
11750     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Kerberos libs" >&5
11751$as_echo_n "checking for Kerberos libs... " >&6; }
11752     d=$with_kerberos/lib
11753     if test -d $d; then
11754       X_LIBS="-L$d $X_LIBS"
11755       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $d" >&5
11756$as_echo "$d" >&6; }
11757     else
11758       { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found ($d: no such directory)" >&5
11759$as_echo "not found ($d: no such directory)" >&6; }
11760     fi
11761
11762     # replace the directory string with "yes".
11763     with_kerberos_req="yes"
11764     with_kerberos=$with_kerberos_req
11765     ;;
11766
11767    *)
11768     echo ""
11769     echo "error: argument to --with-kerberos must be \"yes\", \"no\", or a directory."
11770     echo "       If it is a directory, then \`DIR/include' will be added to"
11771     echo "       the -I list, and \`DIR/lib' will be added to the -L list."
11772     exit 1
11773     ;;
11774   esac
11775
11776
11777if test "$enable_locking" = yes -a "$with_kerberos" = yes; then
11778  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Kerberos 4" >&5
11779$as_echo_n "checking for Kerberos 4... " >&6; }
11780if ${ac_cv_kerberos+:} false; then :
11781  $as_echo_n "(cached) " >&6
11782else
11783
11784  ac_save_CPPFLAGS="$CPPFLAGS"
11785  if test \! -z "$includedir" ; then
11786    CPPFLAGS="$CPPFLAGS -I$includedir"
11787  fi
11788  CPPFLAGS="$CPPFLAGS $X_CFLAGS"
11789  CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
11790  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11791/* end confdefs.h.  */
11792#include <krb.h>
11793int
11794main ()
11795{
11796
11797  ;
11798  return 0;
11799}
11800_ACEOF
11801if ac_fn_c_try_compile "$LINENO"; then :
11802  ac_cv_kerberos=yes
11803else
11804  ac_cv_kerberos=no
11805fi
11806rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11807  CPPFLAGS="$ac_save_CPPFLAGS"
11808fi
11809{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_kerberos" >&5
11810$as_echo "$ac_cv_kerberos" >&6; }
11811  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Kerberos 5" >&5
11812$as_echo_n "checking for Kerberos 5... " >&6; }
11813if ${ac_cv_kerberos5+:} false; then :
11814  $as_echo_n "(cached) " >&6
11815else
11816
11817  ac_save_CPPFLAGS="$CPPFLAGS"
11818  if test \! -z "$includedir" ; then
11819    CPPFLAGS="$CPPFLAGS -I$includedir"
11820  fi
11821  CPPFLAGS="$CPPFLAGS $X_CFLAGS"
11822  CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
11823  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11824/* end confdefs.h.  */
11825#include <kerberosIV/krb.h>
11826int
11827main ()
11828{
11829
11830  ;
11831  return 0;
11832}
11833_ACEOF
11834if ac_fn_c_try_compile "$LINENO"; then :
11835  ac_cv_kerberos5=yes
11836else
11837  ac_cv_kerberos5=no
11838fi
11839rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11840  CPPFLAGS="$ac_save_CPPFLAGS"
11841fi
11842{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_kerberos5" >&5
11843$as_echo "$ac_cv_kerberos5" >&6; }
11844
11845  if test "$ac_cv_kerberos" = yes ; then
11846    have_kerberos=yes
11847    $as_echo "#define HAVE_KERBEROS 1" >>confdefs.h
11848
11849  fi
11850
11851  if test "$ac_cv_kerberos5" = yes ; then
11852
11853    # Andrew Snare <ajs@pigpond.com> wrote:
11854    #
11855    # You were assuming that if kerberosV (krb5) was found, then kerberosIV
11856    # (krb4) was also available.  This turns out not to be the case with
11857    # mit-krb-1.2.7; apparently backwards-compatibility with KerberosIV
11858    # is optional.
11859    #
11860    # So, disable kerberosV support if libkrb4 can't be found.
11861    # This is not the best solution, but it makes the compile not fail.
11862    #
11863
11864  ac_save_CPPFLAGS="$CPPFLAGS"
11865  ac_save_LDFLAGS="$LDFLAGS"
11866#  ac_save_LIBS="$LIBS"
11867
11868  if test \! -z "$includedir" ; then
11869    CPPFLAGS="$CPPFLAGS -I$includedir"
11870  fi
11871  # note: $X_CFLAGS includes $x_includes
11872  CPPFLAGS="$CPPFLAGS $X_CFLAGS"
11873
11874  if test \! -z "$libdir" ; then
11875    LDFLAGS="$LDFLAGS -L$libdir"
11876  fi
11877  # note: $X_LIBS includes $x_libraries
11878  LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
11879
11880  CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
11881  LDFLAGS=`eval eval eval eval eval eval eval eval eval echo $LDFLAGS`
11882  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for krb_get_tf_realm in -lkrb4" >&5
11883$as_echo_n "checking for krb_get_tf_realm in -lkrb4... " >&6; }
11884if ${ac_cv_lib_krb4_krb_get_tf_realm+:} false; then :
11885  $as_echo_n "(cached) " >&6
11886else
11887  ac_check_lib_save_LIBS=$LIBS
11888LIBS="-lkrb4  $LIBS"
11889cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11890/* end confdefs.h.  */
11891
11892/* Override any GCC internal prototype to avoid an error.
11893   Use char because int might match the return type of a GCC
11894   builtin and then its argument prototype would still apply.  */
11895#ifdef __cplusplus
11896extern "C"
11897#endif
11898char krb_get_tf_realm ();
11899int
11900main ()
11901{
11902return krb_get_tf_realm ();
11903  ;
11904  return 0;
11905}
11906_ACEOF
11907if ac_fn_c_try_link "$LINENO"; then :
11908  ac_cv_lib_krb4_krb_get_tf_realm=yes
11909else
11910  ac_cv_lib_krb4_krb_get_tf_realm=no
11911fi
11912rm -f core conftest.err conftest.$ac_objext \
11913    conftest$ac_exeext conftest.$ac_ext
11914LIBS=$ac_check_lib_save_LIBS
11915fi
11916{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_krb4_krb_get_tf_realm" >&5
11917$as_echo "$ac_cv_lib_krb4_krb_get_tf_realm" >&6; }
11918if test "x$ac_cv_lib_krb4_krb_get_tf_realm" = xyes; then :
11919  have_kerberos=yes
11920else
11921  have_kerberos=no
11922fi
11923
11924  CPPFLAGS="$ac_save_CPPFLAGS"
11925  LDFLAGS="$ac_save_LDFLAGS"
11926#  LIBS="$ac_save_LIBS"
11927
11928    if test "$have_kerberos" = yes ; then
11929      have_kerberos5=yes
11930      $as_echo "#define HAVE_KERBEROS 1" >>confdefs.h
11931
11932      $as_echo "#define HAVE_KERBEROS5 1" >>confdefs.h
11933
11934    else
11935      have_kerberos5=no
11936      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Cannot find compat lib (libkrb4) needed to use Kerberos 5" >&5
11937$as_echo "$as_me: WARNING: Cannot find compat lib (libkrb4) needed to use Kerberos 5" >&2;}
11938    fi
11939
11940  fi
11941
11942  if test "$have_kerberos5" = yes ; then
11943    # from Matt Knopp <mhat@infocalypse.netlag.com>
11944    # (who got it from amu@mit.edu)
11945
11946    PASSWD_LIBS="$PASSWD_LIBS -lkrb4 -ldes425 -lkrb5 -lk5crypto -lcom_err"
11947
11948    # jwz: macOS uses -lkrb5, but not -lcrypt
11949
11950  ac_save_CPPFLAGS="$CPPFLAGS"
11951  ac_save_LDFLAGS="$LDFLAGS"
11952#  ac_save_LIBS="$LIBS"
11953
11954  if test \! -z "$includedir" ; then
11955    CPPFLAGS="$CPPFLAGS -I$includedir"
11956  fi
11957  # note: $X_CFLAGS includes $x_includes
11958  CPPFLAGS="$CPPFLAGS $X_CFLAGS"
11959
11960  if test \! -z "$libdir" ; then
11961    LDFLAGS="$LDFLAGS -L$libdir"
11962  fi
11963  # note: $X_LIBS includes $x_libraries
11964  LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
11965
11966  CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
11967  LDFLAGS=`eval eval eval eval eval eval eval eval eval echo $LDFLAGS`
11968  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for crypt in -lcrypt" >&5
11969$as_echo_n "checking for crypt in -lcrypt... " >&6; }
11970if ${ac_cv_lib_crypt_crypt+:} false; then :
11971  $as_echo_n "(cached) " >&6
11972else
11973  ac_check_lib_save_LIBS=$LIBS
11974LIBS="-lcrypt  $LIBS"
11975cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11976/* end confdefs.h.  */
11977
11978/* Override any GCC internal prototype to avoid an error.
11979   Use char because int might match the return type of a GCC
11980   builtin and then its argument prototype would still apply.  */
11981#ifdef __cplusplus
11982extern "C"
11983#endif
11984char crypt ();
11985int
11986main ()
11987{
11988return crypt ();
11989  ;
11990  return 0;
11991}
11992_ACEOF
11993if ac_fn_c_try_link "$LINENO"; then :
11994  ac_cv_lib_crypt_crypt=yes
11995else
11996  ac_cv_lib_crypt_crypt=no
11997fi
11998rm -f core conftest.err conftest.$ac_objext \
11999    conftest$ac_exeext conftest.$ac_ext
12000LIBS=$ac_check_lib_save_LIBS
12001fi
12002{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_crypt_crypt" >&5
12003$as_echo "$ac_cv_lib_crypt_crypt" >&6; }
12004if test "x$ac_cv_lib_crypt_crypt" = xyes; then :
12005  PASSWD_LIBS="$PASSWD_LIBS -lcrypt"
12006fi
12007
12008  CPPFLAGS="$ac_save_CPPFLAGS"
12009  LDFLAGS="$ac_save_LDFLAGS"
12010#  LIBS="$ac_save_LIBS"
12011
12012
12013  elif test "$have_kerberos" = yes ; then
12014    # from Tim Showalter <tjs@psaux.com> for FreeBSD 4.2
12015    PASSWD_LIBS="$PASSWD_LIBS -lkrb -ldes -lcom_err"
12016  fi
12017
12018  if test "$have_kerberos" = yes ; then
12019    ac_fn_c_check_func "$LINENO" "res_search" "ac_cv_func_res_search"
12020if test "x$ac_cv_func_res_search" = xyes; then :
12021
12022else
12023  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for res_search in -lresolv" >&5
12024$as_echo_n "checking for res_search in -lresolv... " >&6; }
12025if ${ac_cv_lib_resolv_res_search+:} false; then :
12026  $as_echo_n "(cached) " >&6
12027else
12028  ac_check_lib_save_LIBS=$LIBS
12029LIBS="-lresolv  $LIBS"
12030cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12031/* end confdefs.h.  */
12032
12033/* Override any GCC internal prototype to avoid an error.
12034   Use char because int might match the return type of a GCC
12035   builtin and then its argument prototype would still apply.  */
12036#ifdef __cplusplus
12037extern "C"
12038#endif
12039char res_search ();
12040int
12041main ()
12042{
12043return res_search ();
12044  ;
12045  return 0;
12046}
12047_ACEOF
12048if ac_fn_c_try_link "$LINENO"; then :
12049  ac_cv_lib_resolv_res_search=yes
12050else
12051  ac_cv_lib_resolv_res_search=no
12052fi
12053rm -f core conftest.err conftest.$ac_objext \
12054    conftest$ac_exeext conftest.$ac_ext
12055LIBS=$ac_check_lib_save_LIBS
12056fi
12057{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_resolv_res_search" >&5
12058$as_echo "$ac_cv_lib_resolv_res_search" >&6; }
12059if test "x$ac_cv_lib_resolv_res_search" = xyes; then :
12060  PASSWD_LIBS="${PASSWD_LIBS} -lresolv"
12061else
12062  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Can't find DNS resolver libraries needed for Kerberos" >&5
12063$as_echo "$as_me: WARNING: Can't find DNS resolver libraries needed for Kerberos" >&2;}
12064
12065fi
12066
12067fi
12068
12069  fi
12070fi
12071
12072
12073###############################################################################
12074#
12075#       Check for the nine billion variants of shadow passwords...
12076#
12077###############################################################################
12078
12079have_shadow=no
12080with_shadow_req=unspecified
12081
12082
12083# Check whether --with-shadow was given.
12084if test "${with_shadow+set}" = set; then :
12085  withval=$with_shadow; with_shadow="$withval"; with_shadow_req="$withval"
12086else
12087  with_shadow=yes
12088fi
12089
12090
12091
12092   case "$with_shadow" in
12093    yes) ;;
12094    no)  ;;
12095
12096    /*)
12097     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for shadow password headers" >&5
12098$as_echo_n "checking for shadow password headers... " >&6; }
12099     d=$with_shadow/include
12100     if test -d $d; then
12101       X_CFLAGS="-I$d $X_CFLAGS"
12102       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $d" >&5
12103$as_echo "$d" >&6; }
12104     else
12105       { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found ($d: no such directory)" >&5
12106$as_echo "not found ($d: no such directory)" >&6; }
12107     fi
12108
12109     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for shadow password libs" >&5
12110$as_echo_n "checking for shadow password libs... " >&6; }
12111     d=$with_shadow/lib
12112     if test -d $d; then
12113       X_LIBS="-L$d $X_LIBS"
12114       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $d" >&5
12115$as_echo "$d" >&6; }
12116     else
12117       { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found ($d: no such directory)" >&5
12118$as_echo "not found ($d: no such directory)" >&6; }
12119     fi
12120
12121     # replace the directory string with "yes".
12122     with_shadow_req="yes"
12123     with_shadow=$with_shadow_req
12124     ;;
12125
12126    *)
12127     echo ""
12128     echo "error: argument to --with-shadow must be \"yes\", \"no\", or a directory."
12129     echo "       If it is a directory, then \`DIR/include' will be added to"
12130     echo "       the -I list, and \`DIR/lib' will be added to the -L list."
12131     exit 1
12132     ;;
12133   esac
12134
12135
12136if test "$enable_locking" = no ; then
12137  with_shadow_req=no
12138  with_shadow=no
12139fi
12140
12141
12142###############################################################################
12143#
12144#       Check for Sun "adjunct" passwords.
12145#
12146###############################################################################
12147
12148if test "$with_shadow" = yes ; then
12149  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Sun-style shadow passwords" >&5
12150$as_echo_n "checking for Sun-style shadow passwords... " >&6; }
12151if ${ac_cv_sun_adjunct+:} false; then :
12152  $as_echo_n "(cached) " >&6
12153else
12154
12155  ac_save_CPPFLAGS="$CPPFLAGS"
12156  if test \! -z "$includedir" ; then
12157    CPPFLAGS="$CPPFLAGS -I$includedir"
12158  fi
12159  CPPFLAGS="$CPPFLAGS $X_CFLAGS"
12160  CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
12161  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12162/* end confdefs.h.  */
12163#include <stdlib.h>
12164                                    #include <unistd.h>
12165                                    #include <sys/types.h>
12166                                    #include <sys/label.h>
12167                                    #include <sys/audit.h>
12168                                    #include <pwdadj.h>
12169int
12170main ()
12171{
12172struct passwd_adjunct *p = getpwanam("nobody");
12173                       const char *pw = p->pwa_passwd;
12174  ;
12175  return 0;
12176}
12177_ACEOF
12178if ac_fn_c_try_compile "$LINENO"; then :
12179  ac_cv_sun_adjunct=yes
12180else
12181  ac_cv_sun_adjunct=no
12182fi
12183rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12184  CPPFLAGS="$ac_save_CPPFLAGS"
12185fi
12186{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sun_adjunct" >&5
12187$as_echo "$ac_cv_sun_adjunct" >&6; }
12188  if test "$ac_cv_sun_adjunct" = yes; then
12189    have_shadow_adjunct=yes
12190    have_shadow=yes
12191    setuid_auth=yes
12192  fi
12193fi
12194
12195
12196###############################################################################
12197#
12198#       Check for DEC and SCO so-called "enhanced" security.
12199#
12200###############################################################################
12201
12202if test "$with_shadow" = yes ; then
12203  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DEC-style shadow passwords" >&5
12204$as_echo_n "checking for DEC-style shadow passwords... " >&6; }
12205if ${ac_cv_enhanced_passwd+:} false; then :
12206  $as_echo_n "(cached) " >&6
12207else
12208
12209  ac_save_CPPFLAGS="$CPPFLAGS"
12210  if test \! -z "$includedir" ; then
12211    CPPFLAGS="$CPPFLAGS -I$includedir"
12212  fi
12213  CPPFLAGS="$CPPFLAGS $X_CFLAGS"
12214  CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
12215  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12216/* end confdefs.h.  */
12217#include <stdlib.h>
12218                                    #include <unistd.h>
12219                                    #include <sys/types.h>
12220                                    #include <pwd.h>
12221                                    #include <sys/security.h>
12222                                    #include <prot.h>
12223int
12224main ()
12225{
12226struct pr_passwd *p;
12227                       const char *pw;
12228                       set_auth_parameters(0, 0);
12229                       check_auth_parameters();
12230                       p = getprpwnam("nobody");
12231                       pw = p->ufld.fd_encrypt;
12232  ;
12233  return 0;
12234}
12235_ACEOF
12236if ac_fn_c_try_compile "$LINENO"; then :
12237  ac_cv_enhanced_passwd=yes
12238else
12239  ac_cv_enhanced_passwd=no
12240fi
12241rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12242  CPPFLAGS="$ac_save_CPPFLAGS"
12243fi
12244{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_enhanced_passwd" >&5
12245$as_echo "$ac_cv_enhanced_passwd" >&6; }
12246  if test $ac_cv_enhanced_passwd = yes; then
12247    have_shadow_enhanced=yes
12248    have_shadow=yes
12249    setuid_auth=yes
12250
12251    # On SCO, getprpwnam() is in -lprot (which uses nap() from -lx)
12252    # (I'm told it needs -lcurses too, but I don't understand why.)
12253    # But on DEC, it's in -lsecurity.
12254    #
12255    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for getprpwnam in -lprot" >&5
12256$as_echo_n "checking for getprpwnam in -lprot... " >&6; }
12257if ${ac_cv_lib_prot_getprpwnam+:} false; then :
12258  $as_echo_n "(cached) " >&6
12259else
12260  ac_check_lib_save_LIBS=$LIBS
12261LIBS="-lprot -lx $LIBS"
12262cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12263/* end confdefs.h.  */
12264
12265/* Override any GCC internal prototype to avoid an error.
12266   Use char because int might match the return type of a GCC
12267   builtin and then its argument prototype would still apply.  */
12268#ifdef __cplusplus
12269extern "C"
12270#endif
12271char getprpwnam ();
12272int
12273main ()
12274{
12275return getprpwnam ();
12276  ;
12277  return 0;
12278}
12279_ACEOF
12280if ac_fn_c_try_link "$LINENO"; then :
12281  ac_cv_lib_prot_getprpwnam=yes
12282else
12283  ac_cv_lib_prot_getprpwnam=no
12284fi
12285rm -f core conftest.err conftest.$ac_objext \
12286    conftest$ac_exeext conftest.$ac_ext
12287LIBS=$ac_check_lib_save_LIBS
12288fi
12289{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_prot_getprpwnam" >&5
12290$as_echo "$ac_cv_lib_prot_getprpwnam" >&6; }
12291if test "x$ac_cv_lib_prot_getprpwnam" = xyes; then :
12292  PASSWD_LIBS="$PASSWD_LIBS -lprot -lcurses -lx"
12293else
12294  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for getprpwnam in -lsecurity" >&5
12295$as_echo_n "checking for getprpwnam in -lsecurity... " >&6; }
12296if ${ac_cv_lib_security_getprpwnam+:} false; then :
12297  $as_echo_n "(cached) " >&6
12298else
12299  ac_check_lib_save_LIBS=$LIBS
12300LIBS="-lsecurity  $LIBS"
12301cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12302/* end confdefs.h.  */
12303
12304/* Override any GCC internal prototype to avoid an error.
12305   Use char because int might match the return type of a GCC
12306   builtin and then its argument prototype would still apply.  */
12307#ifdef __cplusplus
12308extern "C"
12309#endif
12310char getprpwnam ();
12311int
12312main ()
12313{
12314return getprpwnam ();
12315  ;
12316  return 0;
12317}
12318_ACEOF
12319if ac_fn_c_try_link "$LINENO"; then :
12320  ac_cv_lib_security_getprpwnam=yes
12321else
12322  ac_cv_lib_security_getprpwnam=no
12323fi
12324rm -f core conftest.err conftest.$ac_objext \
12325    conftest$ac_exeext conftest.$ac_ext
12326LIBS=$ac_check_lib_save_LIBS
12327fi
12328{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_security_getprpwnam" >&5
12329$as_echo "$ac_cv_lib_security_getprpwnam" >&6; }
12330if test "x$ac_cv_lib_security_getprpwnam" = xyes; then :
12331  PASSWD_LIBS="$PASSWD_LIBS -lsecurity"
12332fi
12333
12334fi
12335
12336  fi
12337fi
12338
12339###############################################################################
12340#
12341#       Check for HP's entry in the "Not Invented Here" Sweepstakes.
12342#
12343###############################################################################
12344
12345if test "$with_shadow" = yes ; then
12346  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for HP-style shadow passwords" >&5
12347$as_echo_n "checking for HP-style shadow passwords... " >&6; }
12348if ${ac_cv_hpux_passwd+:} false; then :
12349  $as_echo_n "(cached) " >&6
12350else
12351
12352  ac_save_CPPFLAGS="$CPPFLAGS"
12353  if test \! -z "$includedir" ; then
12354    CPPFLAGS="$CPPFLAGS -I$includedir"
12355  fi
12356  CPPFLAGS="$CPPFLAGS $X_CFLAGS"
12357  CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
12358  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12359/* end confdefs.h.  */
12360#include <stdlib.h>
12361                                    #include <unistd.h>
12362                                    #include <sys/types.h>
12363                                    #include <pwd.h>
12364                                    #include <hpsecurity.h>
12365                                    #include <prot.h>
12366int
12367main ()
12368{
12369struct s_passwd *p = getspwnam("nobody");
12370                       const char *pw = p->pw_passwd;
12371  ;
12372  return 0;
12373}
12374_ACEOF
12375if ac_fn_c_try_compile "$LINENO"; then :
12376  ac_cv_hpux_passwd=yes
12377else
12378  ac_cv_hpux_passwd=no
12379fi
12380rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12381  CPPFLAGS="$ac_save_CPPFLAGS"
12382fi
12383{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_hpux_passwd" >&5
12384$as_echo "$ac_cv_hpux_passwd" >&6; }
12385  if test "$ac_cv_hpux_passwd" = yes; then
12386    have_shadow_hpux=yes
12387    have_shadow=yes
12388    setuid_auth=yes
12389
12390    # on HPUX, bigcrypt is in -lsec
12391    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for bigcrypt in -lsec" >&5
12392$as_echo_n "checking for bigcrypt in -lsec... " >&6; }
12393if ${ac_cv_lib_sec_bigcrypt+:} false; then :
12394  $as_echo_n "(cached) " >&6
12395else
12396  ac_check_lib_save_LIBS=$LIBS
12397LIBS="-lsec  $LIBS"
12398cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12399/* end confdefs.h.  */
12400
12401/* Override any GCC internal prototype to avoid an error.
12402   Use char because int might match the return type of a GCC
12403   builtin and then its argument prototype would still apply.  */
12404#ifdef __cplusplus
12405extern "C"
12406#endif
12407char bigcrypt ();
12408int
12409main ()
12410{
12411return bigcrypt ();
12412  ;
12413  return 0;
12414}
12415_ACEOF
12416if ac_fn_c_try_link "$LINENO"; then :
12417  ac_cv_lib_sec_bigcrypt=yes
12418else
12419  ac_cv_lib_sec_bigcrypt=no
12420fi
12421rm -f core conftest.err conftest.$ac_objext \
12422    conftest$ac_exeext conftest.$ac_ext
12423LIBS=$ac_check_lib_save_LIBS
12424fi
12425{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_sec_bigcrypt" >&5
12426$as_echo "$ac_cv_lib_sec_bigcrypt" >&6; }
12427if test "x$ac_cv_lib_sec_bigcrypt" = xyes; then :
12428  PASSWD_LIBS="$PASSWD_LIBS -lsec"
12429fi
12430
12431  fi
12432fi
12433
12434
12435###############################################################################
12436#
12437#       Check for FreeBSD-style shadow passwords.
12438#
12439#       On FreeBSD, getpwnam() and friends work just like on non-shadow-
12440#       password systems -- except you only get stuff in the pw_passwd field
12441#       if the running program is setuid.  So, guess that we've got this
12442#       lossage to contend with if /etc/master.passwd exists, and default to
12443#       a setuid installation.
12444#
12445###############################################################################
12446
12447if test "$with_shadow" = yes ; then
12448  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FreeBSD-style shadow passwords" >&5
12449$as_echo_n "checking for FreeBSD-style shadow passwords... " >&6; }
12450if ${ac_cv_master_passwd+:} false; then :
12451  $as_echo_n "(cached) " >&6
12452else
12453  if test -f /etc/master.passwd ; then
12454                    ac_cv_master_passwd=yes
12455                  else
12456                    ac_cv_master_passwd=no
12457                  fi
12458fi
12459{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_master_passwd" >&5
12460$as_echo "$ac_cv_master_passwd" >&6; }
12461  if test "$ac_cv_master_passwd" = yes; then
12462    setuid_auth=yes
12463  fi
12464fi
12465
12466
12467###############################################################################
12468#
12469#       Check for OpenBSD-style shadow passwords.
12470#       It's getpwnam_shadow instead of getpwnam, and it only works as root.
12471#
12472###############################################################################
12473
12474if test "$with_shadow" = yes ; then
12475  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for OpenBSD-style shadow passwords" >&5
12476$as_echo_n "checking for OpenBSD-style shadow passwords... " >&6; }
12477if ${ac_cv_pwnam_shadow+:} false; then :
12478  $as_echo_n "(cached) " >&6
12479else
12480
12481  ac_save_CPPFLAGS="$CPPFLAGS"
12482  if test \! -z "$includedir" ; then
12483    CPPFLAGS="$CPPFLAGS -I$includedir"
12484  fi
12485  CPPFLAGS="$CPPFLAGS $X_CFLAGS"
12486  CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
12487  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12488/* end confdefs.h.  */
12489#include <stdlib.h>
12490                                    #include <unistd.h>
12491                                    #include <sys/types.h>
12492                                    #include <pwd.h>
12493int
12494main ()
12495{
12496struct spwd *p = getspnam_shadow("nobody");
12497                       const char *pw = p->pw_passwd;
12498  ;
12499  return 0;
12500}
12501_ACEOF
12502if ac_fn_c_try_compile "$LINENO"; then :
12503  ac_cv_pwnam_shadow=yes
12504else
12505  ac_cv_pwnam_shadow=no
12506fi
12507rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12508  CPPFLAGS="$ac_save_CPPFLAGS"
12509fi
12510{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_pwnam_shadow" >&5
12511$as_echo "$ac_cv_pwnam_shadow" >&6; }
12512  if test "$ac_cv_pwnam_shadow" = yes; then
12513    have_pwnam_shadow=yes
12514
12515    # If we also have PAM, assume that we don't need to be setuid.
12516    if test $have_pam != yes; then
12517      setuid_auth=yes
12518    fi
12519  fi
12520fi
12521
12522
12523###############################################################################
12524#
12525#       Check for traditional (ha!) shadow passwords.
12526#
12527###############################################################################
12528
12529if test "$with_shadow" = yes ; then
12530  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for generic shadow passwords" >&5
12531$as_echo_n "checking for generic shadow passwords... " >&6; }
12532if ${ac_cv_shadow+:} false; then :
12533  $as_echo_n "(cached) " >&6
12534else
12535
12536  ac_save_CPPFLAGS="$CPPFLAGS"
12537  if test \! -z "$includedir" ; then
12538    CPPFLAGS="$CPPFLAGS -I$includedir"
12539  fi
12540  CPPFLAGS="$CPPFLAGS $X_CFLAGS"
12541  CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
12542  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12543/* end confdefs.h.  */
12544#include <stdlib.h>
12545                                    #include <unistd.h>
12546                                    #include <sys/types.h>
12547                                    #include <pwd.h>
12548                                    #include <shadow.h>
12549int
12550main ()
12551{
12552struct spwd *p = getspnam("nobody");
12553                       const char *pw = p->sp_pwdp;
12554  ;
12555  return 0;
12556}
12557_ACEOF
12558if ac_fn_c_try_compile "$LINENO"; then :
12559  ac_cv_shadow=yes
12560else
12561  ac_cv_shadow=no
12562fi
12563rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12564  CPPFLAGS="$ac_save_CPPFLAGS"
12565fi
12566{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_shadow" >&5
12567$as_echo "$ac_cv_shadow" >&6; }
12568  if test "$ac_cv_shadow" = yes; then
12569    have_shadow=yes
12570
12571    # If we also have PAM, assume that we don't need to be setuid.
12572    if test $have_pam != yes; then
12573      setuid_auth=yes
12574    fi
12575
12576    # On some systems (UnixWare 2.1), getspnam() is in -lgen instead of -lc.
12577    have_getspnam=no
12578    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for getspnam in -lc" >&5
12579$as_echo_n "checking for getspnam in -lc... " >&6; }
12580if ${ac_cv_lib_c_getspnam+:} false; then :
12581  $as_echo_n "(cached) " >&6
12582else
12583  ac_check_lib_save_LIBS=$LIBS
12584LIBS="-lc  $LIBS"
12585cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12586/* end confdefs.h.  */
12587
12588/* Override any GCC internal prototype to avoid an error.
12589   Use char because int might match the return type of a GCC
12590   builtin and then its argument prototype would still apply.  */
12591#ifdef __cplusplus
12592extern "C"
12593#endif
12594char getspnam ();
12595int
12596main ()
12597{
12598return getspnam ();
12599  ;
12600  return 0;
12601}
12602_ACEOF
12603if ac_fn_c_try_link "$LINENO"; then :
12604  ac_cv_lib_c_getspnam=yes
12605else
12606  ac_cv_lib_c_getspnam=no
12607fi
12608rm -f core conftest.err conftest.$ac_objext \
12609    conftest$ac_exeext conftest.$ac_ext
12610LIBS=$ac_check_lib_save_LIBS
12611fi
12612{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_c_getspnam" >&5
12613$as_echo "$ac_cv_lib_c_getspnam" >&6; }
12614if test "x$ac_cv_lib_c_getspnam" = xyes; then :
12615  have_getspnam=yes
12616fi
12617
12618    if test "$have_getspnam" = no ; then
12619      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for getspnam in -lgen" >&5
12620$as_echo_n "checking for getspnam in -lgen... " >&6; }
12621if ${ac_cv_lib_gen_getspnam+:} false; then :
12622  $as_echo_n "(cached) " >&6
12623else
12624  ac_check_lib_save_LIBS=$LIBS
12625LIBS="-lgen  $LIBS"
12626cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12627/* end confdefs.h.  */
12628
12629/* Override any GCC internal prototype to avoid an error.
12630   Use char because int might match the return type of a GCC
12631   builtin and then its argument prototype would still apply.  */
12632#ifdef __cplusplus
12633extern "C"
12634#endif
12635char getspnam ();
12636int
12637main ()
12638{
12639return getspnam ();
12640  ;
12641  return 0;
12642}
12643_ACEOF
12644if ac_fn_c_try_link "$LINENO"; then :
12645  ac_cv_lib_gen_getspnam=yes
12646else
12647  ac_cv_lib_gen_getspnam=no
12648fi
12649rm -f core conftest.err conftest.$ac_objext \
12650    conftest$ac_exeext conftest.$ac_ext
12651LIBS=$ac_check_lib_save_LIBS
12652fi
12653{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_gen_getspnam" >&5
12654$as_echo "$ac_cv_lib_gen_getspnam" >&6; }
12655if test "x$ac_cv_lib_gen_getspnam" = xyes; then :
12656  have_getspnam=yes; PASSWD_LIBS="$PASSWD_LIBS -lgen"
12657fi
12658
12659    fi
12660  fi
12661fi
12662
12663
12664###############################################################################
12665#
12666#       Check for other libraries needed for non-shadow passwords.
12667#
12668###############################################################################
12669
12670if test "$enable_locking" = yes ; then
12671
12672  # On some systems (UnixWare 2.1), crypt() is in -lcrypt instead of -lc.
12673  have_crypt=no
12674  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for crypt in -lc" >&5
12675$as_echo_n "checking for crypt in -lc... " >&6; }
12676if ${ac_cv_lib_c_crypt+:} false; then :
12677  $as_echo_n "(cached) " >&6
12678else
12679  ac_check_lib_save_LIBS=$LIBS
12680LIBS="-lc  $LIBS"
12681cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12682/* end confdefs.h.  */
12683
12684/* Override any GCC internal prototype to avoid an error.
12685   Use char because int might match the return type of a GCC
12686   builtin and then its argument prototype would still apply.  */
12687#ifdef __cplusplus
12688extern "C"
12689#endif
12690char crypt ();
12691int
12692main ()
12693{
12694return crypt ();
12695  ;
12696  return 0;
12697}
12698_ACEOF
12699if ac_fn_c_try_link "$LINENO"; then :
12700  ac_cv_lib_c_crypt=yes
12701else
12702  ac_cv_lib_c_crypt=no
12703fi
12704rm -f core conftest.err conftest.$ac_objext \
12705    conftest$ac_exeext conftest.$ac_ext
12706LIBS=$ac_check_lib_save_LIBS
12707fi
12708{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_c_crypt" >&5
12709$as_echo "$ac_cv_lib_c_crypt" >&6; }
12710if test "x$ac_cv_lib_c_crypt" = xyes; then :
12711  have_crypt=yes
12712fi
12713
12714  if test "$have_crypt" = no ; then
12715    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for crypt in -lcrypt" >&5
12716$as_echo_n "checking for crypt in -lcrypt... " >&6; }
12717if ${ac_cv_lib_crypt_crypt+:} false; then :
12718  $as_echo_n "(cached) " >&6
12719else
12720  ac_check_lib_save_LIBS=$LIBS
12721LIBS="-lcrypt  $LIBS"
12722cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12723/* end confdefs.h.  */
12724
12725/* Override any GCC internal prototype to avoid an error.
12726   Use char because int might match the return type of a GCC
12727   builtin and then its argument prototype would still apply.  */
12728#ifdef __cplusplus
12729extern "C"
12730#endif
12731char crypt ();
12732int
12733main ()
12734{
12735return crypt ();
12736  ;
12737  return 0;
12738}
12739_ACEOF
12740if ac_fn_c_try_link "$LINENO"; then :
12741  ac_cv_lib_crypt_crypt=yes
12742else
12743  ac_cv_lib_crypt_crypt=no
12744fi
12745rm -f core conftest.err conftest.$ac_objext \
12746    conftest$ac_exeext conftest.$ac_ext
12747LIBS=$ac_check_lib_save_LIBS
12748fi
12749{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_crypt_crypt" >&5
12750$as_echo "$ac_cv_lib_crypt_crypt" >&6; }
12751if test "x$ac_cv_lib_crypt_crypt" = xyes; then :
12752  have_crypt=yes; PASSWD_LIBS="$PASSWD_LIBS -lcrypt"
12753fi
12754
12755  fi
12756fi
12757
12758
12759###############################################################################
12760#
12761#       Strongly suspect that this hasn't been used in years.  Also, the same
12762#       goal is achieved by xscreensaver-auth in XScreenSaver 6.  -- jwz, 2021
12763#
12764#       Check for external password helper
12765#	On SuSE in 1993, instead of having xscreensaver be a setuid program,
12766#	they fork an external program that takes the password on stdin, and
12767#	returns true if that password is a valid one.  Then only that smaller
12768#	program needs to be setuid.
12769#
12770#       (Note that this external program is not a GUI: the GUI is still
12771#	all in xscreensaver itself; the external program just does auth.)
12772#
12773###############################################################################
12774
12775#have_passwd_helper=no
12776#with_passwd_helper_req=unspecified
12777#
12778#AC_ARG_WITH(passwd-helper,
12779#[  --with-passwd-helper    Include support for external password verification.],
12780#  [with_passwd_helper="$withval"; with_passwd_helper_req="$withval"],[with_passwd_helper=no])
12781## no HANDLE_X_PATH_ARG for this one
12782#
12783#if test "$enable_locking" = no ; then
12784#  with_passwd_helper_req=no
12785#  with_passwd_helper=no
12786#fi
12787#
12788#case "$with_passwd_helper" in
12789#  ""|no) : ;;
12790#  /*)
12791#    AC_DEFINE_UNQUOTED(PASSWD_HELPER_PROGRAM, "$with_passwd_helper")
12792#    have_passwd_helper=yes;;
12793#  *)
12794#    echo "error: --with-passwd-helper needs full pathname of helper (not '$with_passwd_helper')." >&2
12795#    exit 1
12796#esac
12797
12798
12799
12800# Most of the above shadow mechanisms will have set setuid_auth to yes,
12801# if they were found.  But, on some systems, we need setuid even when
12802# using plain old vanilla passwords.
12803#
12804if test "$enable_locking" = yes -a "$have_pam" = no ; then
12805  case "$host" in
12806    *-hpux* | *-aix* | *-netbsd* | *-freebsd* )
12807      setuid_auth=yes
12808    ;;
12809  esac
12810fi
12811
12812
12813if test "$have_shadow_adjunct" = yes ; then
12814  $as_echo "#define HAVE_ADJUNCT_PASSWD 1" >>confdefs.h
12815
12816elif test "$have_shadow_enhanced" = yes ; then
12817  $as_echo "#define HAVE_ENHANCED_PASSWD 1" >>confdefs.h
12818
12819elif test "$have_shadow_hpux" = yes ; then
12820  $as_echo "#define HAVE_HPUX_PASSWD 1" >>confdefs.h
12821
12822elif test "$have_shadow" = yes ; then
12823  $as_echo "#define HAVE_SHADOW_PASSWD 1" >>confdefs.h
12824
12825elif test "$have_pwnam_shadow" = yes ; then
12826  $as_echo "#define HAVE_PWNAM_SHADOW_PASSWD 1" >>confdefs.h
12827
12828fi
12829
12830
12831###############################################################################
12832#
12833#       Check for -lgtk (and Gnome stuff)
12834#
12835###############################################################################
12836
12837#### H1
12838
12839have_gtk=no
12840with_gtk_req=unspecified
12841
12842# Check whether --with-gtk was given.
12843if test "${with_gtk+set}" = set; then :
12844  withval=$with_gtk; with_gtk="$withval"; with_gtk_req="$withval"
12845else
12846  with_gtk=yes
12847fi
12848
12849
12850# if --with-gtk=/directory/ was specified, remember that directory so that
12851# we can also look for the `gtk-config' program in that directory.
12852case "$with_gtk" in
12853  /*)
12854    gtk_dir="$with_gtk"
12855    ;;
12856  *)
12857    gtk_dir=""
12858    ;;
12859esac
12860
12861
12862   case "$with_gtk" in
12863    yes) ;;
12864    no)  ;;
12865
12866    /*)
12867     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Gtk headers" >&5
12868$as_echo_n "checking for Gtk headers... " >&6; }
12869     d=$with_gtk/include
12870     if test -d $d; then
12871       X_CFLAGS="-I$d $X_CFLAGS"
12872       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $d" >&5
12873$as_echo "$d" >&6; }
12874     else
12875       { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found ($d: no such directory)" >&5
12876$as_echo "not found ($d: no such directory)" >&6; }
12877     fi
12878
12879     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Gtk libs" >&5
12880$as_echo_n "checking for Gtk libs... " >&6; }
12881     d=$with_gtk/lib
12882     if test -d $d; then
12883       X_LIBS="-L$d $X_LIBS"
12884       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $d" >&5
12885$as_echo "$d" >&6; }
12886     else
12887       { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found ($d: no such directory)" >&5
12888$as_echo "not found ($d: no such directory)" >&6; }
12889     fi
12890
12891     # replace the directory string with "yes".
12892     with_gtk_req="yes"
12893     with_gtk=$with_gtk_req
12894     ;;
12895
12896    *)
12897     echo ""
12898     echo "error: argument to --with-gtk must be \"yes\", \"no\", or a directory."
12899     echo "       If it is a directory, then \`DIR/include' will be added to"
12900     echo "       the -I list, and \`DIR/lib' will be added to the -L list."
12901     exit 1
12902     ;;
12903   esac
12904
12905
12906if test "$with_gtk" != yes -a "$with_gtk" != no ; then
12907  echo "error: must be yes or no: --with-gtk=$with_gtk"
12908  exit 1
12909fi
12910
12911
12912gtk_halfassed=no
12913
12914if test "$with_gtk" = yes; then
12915  have_gtk=no
12916
12917  ok="yes"
12918  pkg_check_version            gtk+-2.0  2.22.0 ; ac_gtk_version_string="$vers"
12919  pkg_check_version         gmodule-2.0  2.0.0
12920  pkg_check_version          libxml-2.0  2.4.6
12921  pkg_check_version      gdk-pixbuf-2.0  2.0.0
12922  pkg_check_version gdk-pixbuf-xlib-2.0  2.0.0
12923  have_gtk="$ok"
12924
12925  if test "$have_gtk" = no; then
12926    if test -n "$ac_gtk_version_string" ; then
12927      gtk_halfassed=yes
12928      gtk_halfassed_lib="$req"
12929    fi
12930  fi
12931
12932  if test "$have_gtk" = yes; then
12933    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Gtk includes" >&5
12934$as_echo_n "checking for Gtk includes... " >&6; }
12935if ${ac_cv_gtk_config_cflags+:} false; then :
12936  $as_echo_n "(cached) " >&6
12937else
12938  ac_cv_gtk_config_cflags=`$pkg_config --cflags $pkgs`
12939fi
12940{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_gtk_config_cflags" >&5
12941$as_echo "$ac_cv_gtk_config_cflags" >&6; }
12942    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Gtk libs" >&5
12943$as_echo_n "checking for Gtk libs... " >&6; }
12944if ${ac_cv_gtk_config_libs+:} false; then :
12945  $as_echo_n "(cached) " >&6
12946else
12947  ac_cv_gtk_config_libs=`$pkg_config --libs $pkgs`
12948fi
12949{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_gtk_config_libs" >&5
12950$as_echo "$ac_cv_gtk_config_libs" >&6; }
12951  fi
12952
12953  ac_gtk_config_cflags=$ac_cv_gtk_config_cflags
12954  ac_gtk_config_libs=$ac_cv_gtk_config_libs
12955
12956  GTK_DATADIR=""
12957  if test "$have_gtk" = yes; then
12958    GTK_DATADIR=`$pkg_config --variable=prefix gtk+-2.0`
12959    GTK_DATADIR="$GTK_DATADIR/share"
12960  fi
12961
12962  if test "$have_gtk" = yes; then
12963    INCLUDES="$INCLUDES $ac_gtk_config_cflags"
12964    GTK_LIBS="$GTK_LIBS $ac_gtk_config_libs"
12965    $as_echo "#define HAVE_GTK 1" >>confdefs.h
12966
12967    $as_echo "#define HAVE_GTK2 1" >>confdefs.h
12968
12969    $as_echo "#define HAVE_XML 1" >>confdefs.h
12970
12971  fi
12972fi
12973
12974
12975# Check for the various Gnome help and URL loading programs.
12976#
12977WITH_BROWSER=gnome-open
12978if test "$have_gtk" = yes; then
12979  for ac_prog in gnome-open
12980do
12981  # Extract the first word of "$ac_prog", so it can be a program name with args.
12982set dummy $ac_prog; ac_word=$2
12983{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12984$as_echo_n "checking for $ac_word... " >&6; }
12985if ${ac_cv_prog_gnome_open_program+:} false; then :
12986  $as_echo_n "(cached) " >&6
12987else
12988  if test -n "$gnome_open_program"; then
12989  ac_cv_prog_gnome_open_program="$gnome_open_program" # Let the user override the test.
12990else
12991as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12992for as_dir in $PATH
12993do
12994  IFS=$as_save_IFS
12995  test -z "$as_dir" && as_dir=.
12996    for ac_exec_ext in '' $ac_executable_extensions; do
12997  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12998    ac_cv_prog_gnome_open_program="$ac_prog"
12999    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13000    break 2
13001  fi
13002done
13003  done
13004IFS=$as_save_IFS
13005
13006fi
13007fi
13008gnome_open_program=$ac_cv_prog_gnome_open_program
13009if test -n "$gnome_open_program"; then
13010  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gnome_open_program" >&5
13011$as_echo "$gnome_open_program" >&6; }
13012else
13013  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13014$as_echo "no" >&6; }
13015fi
13016
13017
13018  test -n "$gnome_open_program" && break
13019done
13020
13021  for ac_prog in gnome-url-show
13022do
13023  # Extract the first word of "$ac_prog", so it can be a program name with args.
13024set dummy $ac_prog; ac_word=$2
13025{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13026$as_echo_n "checking for $ac_word... " >&6; }
13027if ${ac_cv_prog_gnome_url_show_program+:} false; then :
13028  $as_echo_n "(cached) " >&6
13029else
13030  if test -n "$gnome_url_show_program"; then
13031  ac_cv_prog_gnome_url_show_program="$gnome_url_show_program" # Let the user override the test.
13032else
13033as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13034for as_dir in $PATH
13035do
13036  IFS=$as_save_IFS
13037  test -z "$as_dir" && as_dir=.
13038    for ac_exec_ext in '' $ac_executable_extensions; do
13039  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13040    ac_cv_prog_gnome_url_show_program="$ac_prog"
13041    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13042    break 2
13043  fi
13044done
13045  done
13046IFS=$as_save_IFS
13047
13048fi
13049fi
13050gnome_url_show_program=$ac_cv_prog_gnome_url_show_program
13051if test -n "$gnome_url_show_program"; then
13052  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gnome_url_show_program" >&5
13053$as_echo "$gnome_url_show_program" >&6; }
13054else
13055  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13056$as_echo "no" >&6; }
13057fi
13058
13059
13060  test -n "$gnome_url_show_program" && break
13061done
13062
13063fi
13064
13065
13066###############################################################################
13067#
13068#       Check for -lXm.
13069#
13070###############################################################################
13071
13072have_motif=no
13073with_motif_req=unspecified
13074
13075# Check whether --with-motif was given.
13076if test "${with_motif+set}" = set; then :
13077  withval=$with_motif; with_motif="$withval"; with_motif_req="$withval"
13078else
13079  with_motif=no
13080fi
13081
13082
13083
13084   case "$with_motif" in
13085    yes) ;;
13086    no)  ;;
13087
13088    /*)
13089     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Motif headers" >&5
13090$as_echo_n "checking for Motif headers... " >&6; }
13091     d=$with_motif/include
13092     if test -d $d; then
13093       X_CFLAGS="-I$d $X_CFLAGS"
13094       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $d" >&5
13095$as_echo "$d" >&6; }
13096     else
13097       { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found ($d: no such directory)" >&5
13098$as_echo "not found ($d: no such directory)" >&6; }
13099     fi
13100
13101     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Motif libs" >&5
13102$as_echo_n "checking for Motif libs... " >&6; }
13103     d=$with_motif/lib
13104     if test -d $d; then
13105       X_LIBS="-L$d $X_LIBS"
13106       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $d" >&5
13107$as_echo "$d" >&6; }
13108     else
13109       { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found ($d: no such directory)" >&5
13110$as_echo "not found ($d: no such directory)" >&6; }
13111     fi
13112
13113     # replace the directory string with "yes".
13114     with_motif_req="yes"
13115     with_motif=$with_motif_req
13116     ;;
13117
13118    *)
13119     echo ""
13120     echo "error: argument to --with-motif must be \"yes\", \"no\", or a directory."
13121     echo "       If it is a directory, then \`DIR/include' will be added to"
13122     echo "       the -I list, and \`DIR/lib' will be added to the -L list."
13123     exit 1
13124     ;;
13125   esac
13126
13127
13128if test "$with_motif" != yes -a "$with_motif" != no ; then
13129  echo "error: must be yes or no: --with-motif=$with_motif"
13130  exit 1
13131fi
13132
13133if test "$with_motif" = yes; then
13134  have_motif=no
13135
13136  ac_save_CPPFLAGS="$CPPFLAGS"
13137  if test \! -z "$includedir" ; then
13138    CPPFLAGS="$CPPFLAGS -I$includedir"
13139  fi
13140  CPPFLAGS="$CPPFLAGS $X_CFLAGS"
13141  CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
13142  ac_fn_c_check_header_compile "$LINENO" "Xm/Xm.h" "ac_cv_header_Xm_Xm_h" "#include <stdlib.h>
13143                     #include <stdio.h>
13144                     #include <X11/Intrinsic.h>
13145"
13146if test "x$ac_cv_header_Xm_Xm_h" = xyes; then :
13147  have_motif=yes
13148                     $as_echo "#define HAVE_MOTIF 1" >>confdefs.h
13149
13150                     MOTIF_LIBS="$MOTIF_LIBS -lXm"
13151fi
13152
13153
13154  CPPFLAGS="$ac_save_CPPFLAGS"
13155fi
13156
13157
13158if test "$have_motif" = yes; then
13159
13160  ac_save_CPPFLAGS="$CPPFLAGS"
13161  if test \! -z "$includedir" ; then
13162    CPPFLAGS="$CPPFLAGS -I$includedir"
13163  fi
13164  CPPFLAGS="$CPPFLAGS $X_CFLAGS"
13165  CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
13166  ac_fn_c_check_header_compile "$LINENO" "Xm/ComboBox.h" "ac_cv_header_Xm_ComboBox_h" "#include <stdlib.h>
13167                     #include <stdio.h>
13168                     #include <X11/Intrinsic.h>
13169"
13170if test "x$ac_cv_header_Xm_ComboBox_h" = xyes; then :
13171  $as_echo "#define HAVE_XMCOMBOBOX 1" >>confdefs.h
13172
13173fi
13174
13175
13176  CPPFLAGS="$ac_save_CPPFLAGS"
13177fi
13178
13179
13180###############################################################################
13181#
13182#       Checking whether Motif is really Lesstif.
13183#
13184###############################################################################
13185
13186have_lesstif=no
13187if test "$have_motif" = yes ; then
13188  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether Motif is really LessTif" >&5
13189$as_echo_n "checking whether Motif is really LessTif... " >&6; }
13190if ${ac_cv_have_lesstif+:} false; then :
13191  $as_echo_n "(cached) " >&6
13192else
13193
13194  ac_save_CPPFLAGS="$CPPFLAGS"
13195  if test \! -z "$includedir" ; then
13196    CPPFLAGS="$CPPFLAGS -I$includedir"
13197  fi
13198  CPPFLAGS="$CPPFLAGS $X_CFLAGS"
13199  CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
13200  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13201/* end confdefs.h.  */
13202#include <Xm/Xm.h>
13203int
13204main ()
13205{
13206long vers = LesstifVersion;
13207  ;
13208  return 0;
13209}
13210_ACEOF
13211if ac_fn_c_try_compile "$LINENO"; then :
13212  ac_cv_have_lesstif=yes
13213else
13214  ac_cv_have_lesstif=no
13215fi
13216rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13217  CPPFLAGS="$ac_save_CPPFLAGS"
13218fi
13219{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_lesstif" >&5
13220$as_echo "$ac_cv_have_lesstif" >&6; }
13221  have_lesstif=$ac_cv_have_lesstif
13222fi
13223
13224
13225lesstif_version=unknown
13226lesstif_version_string=unknown
13227
13228if test "$have_lesstif" = yes ; then
13229  ltv=unknown
13230  echo unknown > conftest-lt
13231  { $as_echo "$as_me:${as_lineno-$LINENO}: checking LessTif version number" >&5
13232$as_echo_n "checking LessTif version number... " >&6; }
13233if ${ac_cv_lesstif_version_string+:} false; then :
13234  $as_echo_n "(cached) " >&6
13235else
13236
13237  ac_save_CPPFLAGS="$CPPFLAGS"
13238  if test \! -z "$includedir" ; then
13239    CPPFLAGS="$CPPFLAGS -I$includedir"
13240  fi
13241  CPPFLAGS="$CPPFLAGS $X_CFLAGS"
13242  CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
13243  if test "$cross_compiling" = yes; then :
13244  ac_cv_lesstif_version=unknown
13245                     ac_cv_lesstif_version_string=unknown
13246else
13247  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13248/* end confdefs.h.  */
13249#include <stdio.h>
13250                     #include <Xm/Xm.h>
13251                     int main() {
13252                       FILE *f = fopen("conftest-lt", "w");
13253                       if (!f) exit(1);
13254                       fprintf(f, "%d %d.%d\n", LesstifVersion,
13255                          LESSTIF_VERSION, LESSTIF_REVISION);
13256                       fclose(f);
13257                       exit(0);
13258                     }
13259_ACEOF
13260if ac_fn_c_try_run "$LINENO"; then :
13261  ltv=`cat conftest-lt`
13262                     ac_cv_lesstif_version=`echo $ltv | sed 's/ .*//'`
13263                     ac_cv_lesstif_version_string=`echo $ltv | sed 's/.* //'`
13264else
13265  ac_cv_lesstif_version=unknown
13266                     ac_cv_lesstif_version_string=unknown
13267fi
13268rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13269  conftest.$ac_objext conftest.beam conftest.$ac_ext
13270fi
13271
13272  CPPFLAGS="$ac_save_CPPFLAGS"
13273fi
13274{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lesstif_version_string" >&5
13275$as_echo "$ac_cv_lesstif_version_string" >&6; }
13276  rm -f conftest-lt
13277  lesstif_version=$ac_cv_lesstif_version
13278  lesstif_version_string=$ac_cv_lesstif_version_string
13279
13280fi
13281
13282
13283if test "$have_motif" = yes ; then
13284  mtv=unknown
13285  echo unknown > conftest-mt
13286  { $as_echo "$as_me:${as_lineno-$LINENO}: checking Motif version number" >&5
13287$as_echo_n "checking Motif version number... " >&6; }
13288if ${ac_cv_motif_version_string+:} false; then :
13289  $as_echo_n "(cached) " >&6
13290else
13291
13292  ac_save_CPPFLAGS="$CPPFLAGS"
13293  if test \! -z "$includedir" ; then
13294    CPPFLAGS="$CPPFLAGS -I$includedir"
13295  fi
13296  CPPFLAGS="$CPPFLAGS $X_CFLAGS"
13297  CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
13298  if test "$cross_compiling" = yes; then :
13299  ac_cv_motif_version=unknown
13300                     ac_cv_motif_version_string=unknown
13301else
13302  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13303/* end confdefs.h.  */
13304#include <stdio.h>
13305                     #include <Xm/Xm.h>
13306                     int main() {
13307                       FILE *f = fopen("conftest-mt", "w");
13308                       if (!f) exit(1);
13309                       fprintf(f, "%d %d.%d\n", XmVersion,
13310                          XmVERSION, XmREVISION);
13311                       fclose(f);
13312                       exit(0);
13313                     }
13314_ACEOF
13315if ac_fn_c_try_run "$LINENO"; then :
13316  mtv=`cat conftest-mt`
13317                     ac_cv_motif_version=`echo $mtv | sed 's/ .*//'`
13318                     ac_cv_motif_version_string=`echo $mtv | sed 's/.* //'`
13319else
13320  ac_cv_motif_version=unknown
13321                     ac_cv_motif_version_string=unknown
13322fi
13323rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13324  conftest.$ac_objext conftest.beam conftest.$ac_ext
13325fi
13326
13327  CPPFLAGS="$ac_save_CPPFLAGS"
13328fi
13329{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_motif_version_string" >&5
13330$as_echo "$ac_cv_motif_version_string" >&6; }
13331  rm -f conftest-mt
13332  motif_version=$ac_cv_motif_version
13333  motif_version_string=$ac_cv_motif_version_string
13334
13335fi
13336
13337
13338###############################################################################
13339#
13340#       Checking whether Motif requires -lXp.
13341#
13342#       Some versions of Motif (2.1.0, at least) require -lXp, the "X Printing
13343#       Extension".   Why this extension isn't in -lXext with all the others,
13344#       I have no idea.
13345#
13346###############################################################################
13347
13348have_xp_ext=no
13349if test "$have_motif" = yes ; then
13350   have_xp_ext=no
13351
13352  ac_save_CPPFLAGS="$CPPFLAGS"
13353  ac_save_LDFLAGS="$LDFLAGS"
13354#  ac_save_LIBS="$LIBS"
13355
13356  if test \! -z "$includedir" ; then
13357    CPPFLAGS="$CPPFLAGS -I$includedir"
13358  fi
13359  # note: $X_CFLAGS includes $x_includes
13360  CPPFLAGS="$CPPFLAGS $X_CFLAGS"
13361
13362  if test \! -z "$libdir" ; then
13363    LDFLAGS="$LDFLAGS -L$libdir"
13364  fi
13365  # note: $X_LIBS includes $x_libraries
13366  LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
13367
13368  CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
13369  LDFLAGS=`eval eval eval eval eval eval eval eval eval echo $LDFLAGS`
13370  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XpQueryExtension in -lXp" >&5
13371$as_echo_n "checking for XpQueryExtension in -lXp... " >&6; }
13372if ${ac_cv_lib_Xp_XpQueryExtension+:} false; then :
13373  $as_echo_n "(cached) " >&6
13374else
13375  ac_check_lib_save_LIBS=$LIBS
13376LIBS="-lXp -lX11 -lXext -lm $LIBS"
13377cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13378/* end confdefs.h.  */
13379
13380/* Override any GCC internal prototype to avoid an error.
13381   Use char because int might match the return type of a GCC
13382   builtin and then its argument prototype would still apply.  */
13383#ifdef __cplusplus
13384extern "C"
13385#endif
13386char XpQueryExtension ();
13387int
13388main ()
13389{
13390return XpQueryExtension ();
13391  ;
13392  return 0;
13393}
13394_ACEOF
13395if ac_fn_c_try_link "$LINENO"; then :
13396  ac_cv_lib_Xp_XpQueryExtension=yes
13397else
13398  ac_cv_lib_Xp_XpQueryExtension=no
13399fi
13400rm -f core conftest.err conftest.$ac_objext \
13401    conftest$ac_exeext conftest.$ac_ext
13402LIBS=$ac_check_lib_save_LIBS
13403fi
13404{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_Xp_XpQueryExtension" >&5
13405$as_echo "$ac_cv_lib_Xp_XpQueryExtension" >&6; }
13406if test "x$ac_cv_lib_Xp_XpQueryExtension" = xyes; then :
13407  have_xp_ext=yes; MOTIF_LIBS="$MOTIF_LIBS -lXp"
13408else
13409  true
13410fi
13411
13412  CPPFLAGS="$ac_save_CPPFLAGS"
13413  LDFLAGS="$ac_save_LDFLAGS"
13414#  LIBS="$ac_save_LIBS"
13415
13416fi
13417
13418
13419###############################################################################
13420#
13421#       Checking whether Motif requires -lXintl (for _Xsetlocale.)
13422#
13423###############################################################################
13424
13425have_xintl=no
13426if test "$have_motif" = yes ; then
13427
13428  ac_save_CPPFLAGS="$CPPFLAGS"
13429  ac_save_LDFLAGS="$LDFLAGS"
13430#  ac_save_LIBS="$LIBS"
13431
13432  if test \! -z "$includedir" ; then
13433    CPPFLAGS="$CPPFLAGS -I$includedir"
13434  fi
13435  # note: $X_CFLAGS includes $x_includes
13436  CPPFLAGS="$CPPFLAGS $X_CFLAGS"
13437
13438  if test \! -z "$libdir" ; then
13439    LDFLAGS="$LDFLAGS -L$libdir"
13440  fi
13441  # note: $X_LIBS includes $x_libraries
13442  LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
13443
13444  CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
13445  LDFLAGS=`eval eval eval eval eval eval eval eval eval echo $LDFLAGS`
13446  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _Xsetlocale in -lXintl" >&5
13447$as_echo_n "checking for _Xsetlocale in -lXintl... " >&6; }
13448if ${ac_cv_lib_Xintl__Xsetlocale+:} false; then :
13449  $as_echo_n "(cached) " >&6
13450else
13451  ac_check_lib_save_LIBS=$LIBS
13452LIBS="-lXintl -lX11 -lXext -lm $LIBS"
13453cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13454/* end confdefs.h.  */
13455
13456/* Override any GCC internal prototype to avoid an error.
13457   Use char because int might match the return type of a GCC
13458   builtin and then its argument prototype would still apply.  */
13459#ifdef __cplusplus
13460extern "C"
13461#endif
13462char _Xsetlocale ();
13463int
13464main ()
13465{
13466return _Xsetlocale ();
13467  ;
13468  return 0;
13469}
13470_ACEOF
13471if ac_fn_c_try_link "$LINENO"; then :
13472  ac_cv_lib_Xintl__Xsetlocale=yes
13473else
13474  ac_cv_lib_Xintl__Xsetlocale=no
13475fi
13476rm -f core conftest.err conftest.$ac_objext \
13477    conftest$ac_exeext conftest.$ac_ext
13478LIBS=$ac_check_lib_save_LIBS
13479fi
13480{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_Xintl__Xsetlocale" >&5
13481$as_echo "$ac_cv_lib_Xintl__Xsetlocale" >&6; }
13482if test "x$ac_cv_lib_Xintl__Xsetlocale" = xyes; then :
13483  have_xintl=yes
13484else
13485  have_xintl=no
13486fi
13487
13488  CPPFLAGS="$ac_save_CPPFLAGS"
13489  LDFLAGS="$ac_save_LDFLAGS"
13490#  LIBS="$ac_save_LIBS"
13491
13492  if test "$have_xintl" = yes; then
13493    MOTIF_LIBS="$MOTIF_LIBS -lXintl"
13494  fi
13495fi
13496
13497
13498###############################################################################
13499#
13500#       Check for a login manager for a "New Login" button on the lock dialog.
13501#	Usually this will be "/usr/bin/gdmflexiserver".
13502#
13503###############################################################################
13504
13505with_login_manager_req=unspecified
13506default_login_manager_1='gdmflexiserver -ls'
13507default_login_manager_2='kdmctl reserve'
13508default_login_manager_3='lxdm -c USER_SWITCH'
13509default_login_manager_4='dm-tool switch-to-greeter'
13510
13511
13512# Check whether --with-login-manager was given.
13513if test "${with_login_manager+set}" = set; then :
13514  withval=$with_login_manager; with_login_manager="$withval"; with_login_manager_req="$withval"
13515else
13516  with_login_manager=yes
13517fi
13518
13519# no HANDLE_X_PATH_ARG for this one
13520
13521if test "$enable_locking" = no ; then
13522  with_login_manager_req=no
13523  with_login_manager=no
13524fi
13525
13526case "$with_login_manager_req" in
13527  no)
13528    with_login_manager=""
13529  ;;
13530
13531  yes|unspecified)
13532    # Try various defaults, use the first one that exists.
13533
13534    with_login_manager=""
13535
13536    if test -z "$with_login_manager" ; then
13537      set dummy $default_login_manager_1 ; login_manager_tmp=$2
13538      unset ac_cv_path_login_manager_tmp  # don't cache
13539      # Extract the first word of "$login_manager_tmp", so it can be a program name with args.
13540set dummy $login_manager_tmp; ac_word=$2
13541{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13542$as_echo_n "checking for $ac_word... " >&6; }
13543if ${ac_cv_path_login_manager_tmp+:} false; then :
13544  $as_echo_n "(cached) " >&6
13545else
13546  case $login_manager_tmp in
13547  [\\/]* | ?:[\\/]*)
13548  ac_cv_path_login_manager_tmp="$login_manager_tmp" # Let the user override the test with a path.
13549  ;;
13550  *)
13551  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13552for as_dir in $PATH
13553do
13554  IFS=$as_save_IFS
13555  test -z "$as_dir" && as_dir=.
13556    for ac_exec_ext in '' $ac_executable_extensions; do
13557  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13558    ac_cv_path_login_manager_tmp="$as_dir/$ac_word$ac_exec_ext"
13559    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13560    break 2
13561  fi
13562done
13563  done
13564IFS=$as_save_IFS
13565
13566  ;;
13567esac
13568fi
13569login_manager_tmp=$ac_cv_path_login_manager_tmp
13570if test -n "$login_manager_tmp"; then
13571  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $login_manager_tmp" >&5
13572$as_echo "$login_manager_tmp" >&6; }
13573else
13574  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13575$as_echo "no" >&6; }
13576fi
13577
13578
13579      if test ! -z "$login_manager_tmp" ; then
13580        with_login_manager="$default_login_manager_1"
13581      fi
13582    fi
13583
13584    if test -z "$with_login_manager" ; then
13585      set dummy $default_login_manager_2 ; login_manager_tmp=$2
13586      unset ac_cv_path_login_manager_tmp  # don't cache
13587      # Extract the first word of "$login_manager_tmp", so it can be a program name with args.
13588set dummy $login_manager_tmp; ac_word=$2
13589{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13590$as_echo_n "checking for $ac_word... " >&6; }
13591if ${ac_cv_path_login_manager_tmp+:} false; then :
13592  $as_echo_n "(cached) " >&6
13593else
13594  case $login_manager_tmp in
13595  [\\/]* | ?:[\\/]*)
13596  ac_cv_path_login_manager_tmp="$login_manager_tmp" # Let the user override the test with a path.
13597  ;;
13598  *)
13599  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13600for as_dir in $PATH
13601do
13602  IFS=$as_save_IFS
13603  test -z "$as_dir" && as_dir=.
13604    for ac_exec_ext in '' $ac_executable_extensions; do
13605  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13606    ac_cv_path_login_manager_tmp="$as_dir/$ac_word$ac_exec_ext"
13607    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13608    break 2
13609  fi
13610done
13611  done
13612IFS=$as_save_IFS
13613
13614  ;;
13615esac
13616fi
13617login_manager_tmp=$ac_cv_path_login_manager_tmp
13618if test -n "$login_manager_tmp"; then
13619  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $login_manager_tmp" >&5
13620$as_echo "$login_manager_tmp" >&6; }
13621else
13622  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13623$as_echo "no" >&6; }
13624fi
13625
13626
13627      if test ! -z "$login_manager_tmp" ; then
13628        with_login_manager="$default_login_manager_2"
13629      fi
13630    fi
13631
13632    if test -z "$with_login_manager" ; then
13633      set dummy $default_login_manager_3 ; login_manager_tmp=$2
13634      unset ac_cv_path_login_manager_tmp  # don't cache
13635      # Extract the first word of "$login_manager_tmp", so it can be a program name with args.
13636set dummy $login_manager_tmp; ac_word=$2
13637{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13638$as_echo_n "checking for $ac_word... " >&6; }
13639if ${ac_cv_path_login_manager_tmp+:} false; then :
13640  $as_echo_n "(cached) " >&6
13641else
13642  case $login_manager_tmp in
13643  [\\/]* | ?:[\\/]*)
13644  ac_cv_path_login_manager_tmp="$login_manager_tmp" # Let the user override the test with a path.
13645  ;;
13646  *)
13647  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13648for as_dir in $PATH
13649do
13650  IFS=$as_save_IFS
13651  test -z "$as_dir" && as_dir=.
13652    for ac_exec_ext in '' $ac_executable_extensions; do
13653  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13654    ac_cv_path_login_manager_tmp="$as_dir/$ac_word$ac_exec_ext"
13655    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13656    break 2
13657  fi
13658done
13659  done
13660IFS=$as_save_IFS
13661
13662  ;;
13663esac
13664fi
13665login_manager_tmp=$ac_cv_path_login_manager_tmp
13666if test -n "$login_manager_tmp"; then
13667  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $login_manager_tmp" >&5
13668$as_echo "$login_manager_tmp" >&6; }
13669else
13670  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13671$as_echo "no" >&6; }
13672fi
13673
13674
13675      if test ! -z "$login_manager_tmp" ; then
13676        with_login_manager="$default_login_manager_3"
13677      fi
13678    fi
13679
13680    if test -z "$with_login_manager" ; then
13681      set dummy $default_login_manager_4 ; login_manager_tmp=$2
13682      unset ac_cv_path_login_manager_tmp  # don't cache
13683      # Extract the first word of "$login_manager_tmp", so it can be a program name with args.
13684set dummy $login_manager_tmp; ac_word=$2
13685{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13686$as_echo_n "checking for $ac_word... " >&6; }
13687if ${ac_cv_path_login_manager_tmp+:} false; then :
13688  $as_echo_n "(cached) " >&6
13689else
13690  case $login_manager_tmp in
13691  [\\/]* | ?:[\\/]*)
13692  ac_cv_path_login_manager_tmp="$login_manager_tmp" # Let the user override the test with a path.
13693  ;;
13694  *)
13695  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13696for as_dir in $PATH
13697do
13698  IFS=$as_save_IFS
13699  test -z "$as_dir" && as_dir=.
13700    for ac_exec_ext in '' $ac_executable_extensions; do
13701  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13702    ac_cv_path_login_manager_tmp="$as_dir/$ac_word$ac_exec_ext"
13703    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13704    break 2
13705  fi
13706done
13707  done
13708IFS=$as_save_IFS
13709
13710  ;;
13711esac
13712fi
13713login_manager_tmp=$ac_cv_path_login_manager_tmp
13714if test -n "$login_manager_tmp"; then
13715  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $login_manager_tmp" >&5
13716$as_echo "$login_manager_tmp" >&6; }
13717else
13718  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13719$as_echo "no" >&6; }
13720fi
13721
13722
13723      if test ! -z "$login_manager_tmp" ; then
13724        with_login_manager="$default_login_manager_4"
13725      fi
13726    fi
13727
13728  ;;
13729
13730  *)
13731    # Just believe whatever command was specified.
13732    with_login_manager="$with_login_manager_req"
13733  ;;
13734esac
13735ac_cv_login_manager_program="$with_login_manager"
13736
13737NEW_LOGIN_COMMAND_P=''
13738NEW_LOGIN_COMMAND="$ac_cv_login_manager_program"
13739
13740{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for login manager" >&5
13741$as_echo_n "checking for login manager... " >&6; }
13742if test -z "$NEW_LOGIN_COMMAND" ; then
13743  NEW_LOGIN_COMMAND="$default_login_manager_1"
13744  NEW_LOGIN_COMMAND_P='! '
13745  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NEW_LOGIN_COMMAND (disabled)" >&5
13746$as_echo "$NEW_LOGIN_COMMAND (disabled)" >&6; }
13747else
13748  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NEW_LOGIN_COMMAND" >&5
13749$as_echo "$NEW_LOGIN_COMMAND" >&6; }
13750fi
13751
13752
13753
13754###############################################################################
13755#
13756#       Check for a directory full of images to use as the default value
13757#	of the "imageDirectory" preference.
13758#
13759###############################################################################
13760
13761have_imagedir=no
13762with_imagedir_req=unspecified
13763
13764
13765# Check whether --with-image-directory was given.
13766if test "${with_image_directory+set}" = set; then :
13767  withval=$with_image_directory; with_imagedir="$withval"; with_imagedir_req="$withval"
13768else
13769  with_imagedir=yes
13770fi
13771
13772# no HANDLE_X_PATH_ARG for this one
13773
13774case "$with_imagedir" in
13775  /*)
13776    # absolute path
13777    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for image directory $with_imagedir" >&5
13778$as_echo_n "checking for image directory $with_imagedir... " >&6; }
13779    if test -d "$with_imagedir" ; then
13780      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
13781$as_echo "yes" >&6; }
13782    else
13783      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13784$as_echo "no" >&6; }
13785      with_imagedir=""
13786    fi
13787  ;;
13788  yes)
13789    with_imagedir=""
13790
13791    fallback_imgdir=""
13792    for dd in \
13793      "/usr/share/rpd-wallpaper/"		\
13794      "/usr/share/backgrounds/images/"		\
13795      "/usr/share/wallpapers/"			\
13796      "/usr/share/backgrounds/"			\
13797      "/usr/share/pixmaps/backgrounds/"		\
13798      "/usr/share/lxde/wallpapers/"		\
13799      "/Library/Desktop Pictures/"		\
13800    ; do
13801      if test -z "$with_imagedir"; then
13802        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for image directory $dd" >&5
13803$as_echo_n "checking for image directory $dd... " >&6; }
13804        if test -d "$dd"; then
13805          if ( ls "$dd" | grep -q ... ) >&- 2>&- ; then
13806            { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
13807$as_echo "yes" >&6; }
13808            with_imagedir="$dd"
13809          else
13810            { $as_echo "$as_me:${as_lineno-$LINENO}: result: empty" >&5
13811$as_echo "empty" >&6; }
13812            if test -z "$fallback_imgdir"; then
13813              fallback_imgdir="$dd"
13814            fi
13815          fi
13816        else
13817          { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13818$as_echo "no" >&6; }
13819        fi
13820      fi
13821    done
13822    if test -z "$with_imagedir"; then
13823      with_imagedir="$fallback_imgdir"
13824    fi
13825;;
13826  no)
13827    with_imagedir=""
13828  ;;
13829
13830  *)
13831    echo "error: must be an absolute path: --with-image-directory=$with_imagedir_req"
13832    exit 1
13833  ;;
13834esac
13835ac_cv_imagedir="$with_imagedir"
13836
13837DEFAULT_IMAGES_P='True'
13838DEFAULT_IMAGE_DIRECTORY="$ac_cv_imagedir"
13839
13840if test -z "$DEFAULT_IMAGE_DIRECTORY" ; then
13841  DEFAULT_IMAGES_P='False'
13842fi
13843
13844
13845###############################################################################
13846#
13847#       Pick a text file to use as the default of the "textFile" preference.
13848#	Any old file will do, but preferably one that will make interesting
13849#	shapes when displayed by "starwars" and "fontglide".
13850#
13851###############################################################################
13852
13853have_textfile=no
13854with_textfile_req=unspecified
13855
13856
13857# Check whether --with-text-file was given.
13858if test "${with_text_file+set}" = set; then :
13859  withval=$with_text_file; with_textfile="$withval"; with_textfile_req="$withval"
13860else
13861  with_textfile=yes
13862fi
13863
13864# no HANDLE_X_PATH_ARG for this one
13865
13866case "$with_textfile" in
13867  /*)
13868    # absolute path
13869    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for text file $with_textfile" >&5
13870$as_echo_n "checking for text file $with_textfile... " >&6; }
13871    if test -f "$with_textfile" ; then
13872      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
13873$as_echo "yes" >&6; }
13874    else
13875      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13876$as_echo "no" >&6; }
13877      with_textfile=""
13878    fi
13879  ;;
13880  yes)
13881    with_textfile=""
13882
13883    #### Could use some more defaults here...
13884    for f in \
13885      "/usr/X11R6/lib/X11/doc/README"		   \
13886      "/usr/share/doc/xserver-common/copyright"	   \
13887      "/usr/share/doc/xserver-xorg-core/copyright" \
13888      "/usr/X11R6/README"			   \
13889      "/usr/share/doc/libX11*/COPYING"		   \
13890      "/usr/X11/share/X11/doc/README*"		   \
13891      "/usr/share/doc/debian/debian-manifesto"     \
13892    ; do
13893      if test -z "$with_textfile"; then
13894        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for text file $f" >&5
13895$as_echo_n "checking for text file $f... " >&6; }
13896	f=`/bin/ls $f 2>&- | head -1`
13897        if test -f "$f" ; then
13898          { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
13899$as_echo "yes" >&6; }
13900          with_textfile="$f"
13901        else
13902          { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13903$as_echo "no" >&6; }
13904        fi
13905      fi
13906    done
13907
13908  ;;
13909  no)
13910    with_textfile=""
13911  ;;
13912
13913  *)
13914    echo "error: must be an absolute path: --with-text-file=$with_textfile_req"
13915    exit 1
13916  ;;
13917esac
13918ac_cv_textfile="$with_textfile"
13919
13920DEFAULT_TEXT_FILE="$ac_cv_textfile"
13921
13922
13923###############################################################################
13924#
13925#       Check the browser to see help URL
13926#
13927###############################################################################
13928
13929have_browser=no
13930with_browser_req=unspecified
13931
13932
13933# Check whether --with-browser was given.
13934if test "${with_browser+set}" = set; then :
13935  withval=$with_browser; with_browser="$withval"; with_browser_req="$withval"
13936else
13937  with_browser=no
13938fi
13939
13940# no HANDLE_X_PATH_ARG for this one
13941
13942case "$with_browser" in
13943  no )
13944  ;;
13945  * )
13946    WITH_BROWSER=$with_browser
13947    gnome_open_program=$with_browser
13948    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for browser $with_browser" >&5
13949$as_echo_n "checking for browser $with_browser... " >&6; }
13950    with_browser_fullpath=`which $with_browser 2>/dev/null`
13951    case $with_browser_fullpath in
13952	 /* )
13953	        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
13954$as_echo "yes" >&6; }
13955		 have_browser=yes
13956		 ;;
13957	* )
13958	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13959$as_echo "no" >&6; }
13960# Only warning: we don't want to install all packages for the
13961# dependency of the browser in building stage...
13962	       echo "WARNING: browser not found: --with-browser=$with_browser"
13963	       ;;
13964    esac
13965  ;;
13966esac
13967ac_cv_browser="$with_browser"
13968
13969
13970###############################################################################
13971#
13972#       Check for pthreads. Must come before checking for OpenGL,
13973#       since some versions of OpenGL require it.
13974#
13975###############################################################################
13976
13977have_pthread=no
13978with_pthread_req=unspecified
13979
13980# AX_PTHREAD is from the GNU Autoconf Archive.
13981# https://savannah.gnu.org/projects/autoconf-archive/
13982# ===========================================================================
13983#        https://www.gnu.org/software/autoconf-archive/ax_pthread.html
13984# ===========================================================================
13985#
13986# SYNOPSIS
13987#
13988#   AX_PTHREAD([ACTION-IF-FOUND[, ACTION-IF-NOT-FOUND]])
13989#
13990# DESCRIPTION
13991#
13992#   This macro figures out how to build C programs using POSIX threads. It
13993#   sets the PTHREAD_LIBS output variable to the threads library and linker
13994#   flags, and the PTHREAD_CFLAGS output variable to any special C compiler
13995#   flags that are needed. (The user can also force certain compiler
13996#   flags/libs to be tested by setting these environment variables.)
13997#
13998#   Also sets PTHREAD_CC and PTHREAD_CXX to any special C compiler that is
13999#   needed for multi-threaded programs (defaults to the value of CC
14000#   respectively CXX otherwise). (This is necessary on e.g. AIX to use the
14001#   special cc_r/CC_r compiler alias.)
14002#
14003#   NOTE: You are assumed to not only compile your program with these flags,
14004#   but also to link with them as well. For example, you might link with
14005#   $PTHREAD_CC $CFLAGS $PTHREAD_CFLAGS $LDFLAGS ... $PTHREAD_LIBS $LIBS
14006#   $PTHREAD_CXX $CXXFLAGS $PTHREAD_CFLAGS $LDFLAGS ... $PTHREAD_LIBS $LIBS
14007#
14008#   If you are only building threaded programs, you may wish to use these
14009#   variables in your default LIBS, CFLAGS, and CC:
14010#
14011#     LIBS="$PTHREAD_LIBS $LIBS"
14012#     CFLAGS="$CFLAGS $PTHREAD_CFLAGS"
14013#     CXXFLAGS="$CXXFLAGS $PTHREAD_CFLAGS"
14014#     CC="$PTHREAD_CC"
14015#     CXX="$PTHREAD_CXX"
14016#
14017#   In addition, if the PTHREAD_CREATE_JOINABLE thread-attribute constant
14018#   has a nonstandard name, this macro defines PTHREAD_CREATE_JOINABLE to
14019#   that name (e.g. PTHREAD_CREATE_UNDETACHED on AIX).
14020#
14021#   Also HAVE_PTHREAD_PRIO_INHERIT is defined if pthread is found and the
14022#   PTHREAD_PRIO_INHERIT symbol is defined when compiling with
14023#   PTHREAD_CFLAGS.
14024#
14025#   ACTION-IF-FOUND is a list of shell commands to run if a threads library
14026#   is found, and ACTION-IF-NOT-FOUND is a list of commands to run it if it
14027#   is not found. If ACTION-IF-FOUND is not specified, the default action
14028#   will define HAVE_PTHREAD.
14029#
14030#   Please let the authors know if this macro fails on any platform, or if
14031#   you have any other suggestions or comments. This macro was based on work
14032#   by SGJ on autoconf scripts for FFTW (http://www.fftw.org/) (with help
14033#   from M. Frigo), as well as ac_pthread and hb_pthread macros posted by
14034#   Alejandro Forero Cuervo to the autoconf macro repository. We are also
14035#   grateful for the helpful feedback of numerous users.
14036#
14037#   Updated for Autoconf 2.68 by Daniel Richard G.
14038#
14039# LICENSE
14040#
14041#   Copyright (c) 2008 Steven G. Johnson <stevenj@alum.mit.edu>
14042#   Copyright (c) 2011 Daniel Richard G. <skunk@iSKUNK.ORG>
14043#   Copyright (c) 2019 Marc Stevens <marc.stevens@cwi.nl>
14044#
14045#   This program is free software: you can redistribute it and/or modify it
14046#   under the terms of the GNU General Public License as published by the
14047#   Free Software Foundation, either version 3 of the License, or (at your
14048#   option) any later version.
14049#
14050#   This program is distributed in the hope that it will be useful, but
14051#   WITHOUT ANY WARRANTY; without even the implied warranty of
14052#   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General
14053#   Public License for more details.
14054#
14055#   You should have received a copy of the GNU General Public License along
14056#   with this program. If not, see <https://www.gnu.org/licenses/>.
14057#
14058#   As a special exception, the respective Autoconf Macro's copyright owner
14059#   gives unlimited permission to copy, distribute and modify the configure
14060#   scripts that are the output of Autoconf when processing the Macro. You
14061#   need not follow the terms of the GNU General Public License when using
14062#   or distributing such scripts, even though portions of the text of the
14063#   Macro appear in them. The GNU General Public License (GPL) does govern
14064#   all other use of the material that constitutes the Autoconf Macro.
14065#
14066#   This special exception to the GPL applies to versions of the Autoconf
14067#   Macro released by the Autoconf Archive. When you make and distribute a
14068#   modified version of the Autoconf Macro, you may extend this special
14069#   exception to the GPL to apply to your modified version as well.
14070
14071#serial 30
14072
14073# This is what autoupdate's m4 run will expand.  It fires
14074# the warning (with _au_warn_XXX), outputs it into the
14075# updated configure.ac (with AC_DIAGNOSE), and then outputs
14076# the replacement expansion.
14077
14078
14079# This is an auxiliary macro that is also run when
14080# autoupdate runs m4.  It simply calls m4_warning, but
14081# we need a wrapper so that each warning is emitted only
14082# once.  We break the quoting in m4_warning's argument in
14083# order to expand this macro's arguments, not AU_DEFUN's.
14084
14085
14086# Finally, this is the expansion that is picked up by
14087# autoconf.  It tells the user to run autoupdate, and
14088# then outputs the replacement expansion.  We do not care
14089# about autoupdate's warning because that contains
14090# information on what to do *after* running autoupdate.
14091
14092
14093
14094
14095# Check whether --with-pthread was given.
14096if test "${with_pthread+set}" = set; then :
14097  withval=$with_pthread; # This is documented after --with-gl in --with-xft.
14098  with_pthread="$withval"; with_pthread_req="$withval"
14099else
14100  with_pthread=yes
14101fi
14102
14103
14104if test "$with_pthread" = yes; then
14105  # AX_PTHREAD might want a different compiler.
14106  { $as_echo "$as_me:${as_lineno-$LINENO}: checking target system type" >&5
14107$as_echo_n "checking target system type... " >&6; }
14108if ${ac_cv_target+:} false; then :
14109  $as_echo_n "(cached) " >&6
14110else
14111  if test "x$target_alias" = x; then
14112  ac_cv_target=$ac_cv_host
14113else
14114  ac_cv_target=`$SHELL "$ac_aux_dir/config.sub" $target_alias` ||
14115    as_fn_error $? "$SHELL $ac_aux_dir/config.sub $target_alias failed" "$LINENO" 5
14116fi
14117
14118fi
14119{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_target" >&5
14120$as_echo "$ac_cv_target" >&6; }
14121case $ac_cv_target in
14122*-*-*) ;;
14123*) as_fn_error $? "invalid value of canonical target" "$LINENO" 5;;
14124esac
14125target=$ac_cv_target
14126ac_save_IFS=$IFS; IFS='-'
14127set x $ac_cv_target
14128shift
14129target_cpu=$1
14130target_vendor=$2
14131shift; shift
14132# Remember, the first character of IFS is used to create $*,
14133# except with old shells:
14134target_os=$*
14135IFS=$ac_save_IFS
14136case $target_os in *\ *) target_os=`echo "$target_os" | sed 's/ /-/g'`;; esac
14137
14138
14139# The aliases save the names the user supplied, while $host etc.
14140# will get canonicalized.
14141test -n "$target_alias" &&
14142  test "$program_prefix$program_suffix$program_transform_name" = \
14143    NONENONEs,x,x, &&
14144  program_prefix=${target_alias}-
14145{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a sed that does not truncate output" >&5
14146$as_echo_n "checking for a sed that does not truncate output... " >&6; }
14147if ${ac_cv_path_SED+:} false; then :
14148  $as_echo_n "(cached) " >&6
14149else
14150            ac_script=s/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb/
14151     for ac_i in 1 2 3 4 5 6 7; do
14152       ac_script="$ac_script$as_nl$ac_script"
14153     done
14154     echo "$ac_script" 2>/dev/null | sed 99q >conftest.sed
14155     { ac_script=; unset ac_script;}
14156     if test -z "$SED"; then
14157  ac_path_SED_found=false
14158  # Loop through the user's path and test for each of PROGNAME-LIST
14159  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14160for as_dir in $PATH
14161do
14162  IFS=$as_save_IFS
14163  test -z "$as_dir" && as_dir=.
14164    for ac_prog in sed gsed; do
14165    for ac_exec_ext in '' $ac_executable_extensions; do
14166      ac_path_SED="$as_dir/$ac_prog$ac_exec_ext"
14167      as_fn_executable_p "$ac_path_SED" || continue
14168# Check for GNU ac_path_SED and select it if it is found.
14169  # Check for GNU $ac_path_SED
14170case `"$ac_path_SED" --version 2>&1` in
14171*GNU*)
14172  ac_cv_path_SED="$ac_path_SED" ac_path_SED_found=:;;
14173*)
14174  ac_count=0
14175  $as_echo_n 0123456789 >"conftest.in"
14176  while :
14177  do
14178    cat "conftest.in" "conftest.in" >"conftest.tmp"
14179    mv "conftest.tmp" "conftest.in"
14180    cp "conftest.in" "conftest.nl"
14181    $as_echo '' >> "conftest.nl"
14182    "$ac_path_SED" -f conftest.sed < "conftest.nl" >"conftest.out" 2>/dev/null || break
14183    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
14184    as_fn_arith $ac_count + 1 && ac_count=$as_val
14185    if test $ac_count -gt ${ac_path_SED_max-0}; then
14186      # Best one so far, save it but keep looking for a better one
14187      ac_cv_path_SED="$ac_path_SED"
14188      ac_path_SED_max=$ac_count
14189    fi
14190    # 10*(2^10) chars as input seems more than enough
14191    test $ac_count -gt 10 && break
14192  done
14193  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
14194esac
14195
14196      $ac_path_SED_found && break 3
14197    done
14198  done
14199  done
14200IFS=$as_save_IFS
14201  if test -z "$ac_cv_path_SED"; then
14202    as_fn_error $? "no acceptable sed could be found in \$PATH" "$LINENO" 5
14203  fi
14204else
14205  ac_cv_path_SED=$SED
14206fi
14207
14208fi
14209{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_SED" >&5
14210$as_echo "$ac_cv_path_SED" >&6; }
14211 SED="$ac_cv_path_SED"
14212  rm -f conftest.sed
14213
14214
14215
14216
14217
14218ac_ext=c
14219ac_cpp='$CPP $CPPFLAGS'
14220ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
14221ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
14222ac_compiler_gnu=$ac_cv_c_compiler_gnu
14223
14224ax_pthread_ok=no
14225
14226# We used to check for pthread.h first, but this fails if pthread.h
14227# requires special compiler flags (e.g. on Tru64 or Sequent).
14228# It gets checked for in the link test anyway.
14229
14230# First of all, check if the user has set any of the PTHREAD_LIBS,
14231# etcetera environment variables, and if threads linking works using
14232# them:
14233if test "x$PTHREAD_CFLAGS$PTHREAD_LIBS" != "x"; then
14234        ax_pthread_save_CC="$CC"
14235        ax_pthread_save_CFLAGS="$CFLAGS"
14236        ax_pthread_save_LIBS="$LIBS"
14237        if test "x$PTHREAD_CC" != "x"; then :
14238  CC="$PTHREAD_CC"
14239fi
14240        if test "x$PTHREAD_CXX" != "x"; then :
14241  CXX="$PTHREAD_CXX"
14242fi
14243        CFLAGS="$CFLAGS $PTHREAD_CFLAGS"
14244        LIBS="$PTHREAD_LIBS $LIBS"
14245        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_join using $CC $PTHREAD_CFLAGS $PTHREAD_LIBS" >&5
14246$as_echo_n "checking for pthread_join using $CC $PTHREAD_CFLAGS $PTHREAD_LIBS... " >&6; }
14247        cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14248/* end confdefs.h.  */
14249
14250/* Override any GCC internal prototype to avoid an error.
14251   Use char because int might match the return type of a GCC
14252   builtin and then its argument prototype would still apply.  */
14253#ifdef __cplusplus
14254extern "C"
14255#endif
14256char pthread_join ();
14257int
14258main ()
14259{
14260return pthread_join ();
14261  ;
14262  return 0;
14263}
14264_ACEOF
14265if ac_fn_c_try_link "$LINENO"; then :
14266  ax_pthread_ok=yes
14267fi
14268rm -f core conftest.err conftest.$ac_objext \
14269    conftest$ac_exeext conftest.$ac_ext
14270        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_pthread_ok" >&5
14271$as_echo "$ax_pthread_ok" >&6; }
14272        if test "x$ax_pthread_ok" = "xno"; then
14273                PTHREAD_LIBS=""
14274                PTHREAD_CFLAGS=""
14275        fi
14276        CC="$ax_pthread_save_CC"
14277        CFLAGS="$ax_pthread_save_CFLAGS"
14278        LIBS="$ax_pthread_save_LIBS"
14279fi
14280
14281# We must check for the threads library under a number of different
14282# names; the ordering is very important because some systems
14283# (e.g. DEC) have both -lpthread and -lpthreads, where one of the
14284# libraries is broken (non-POSIX).
14285
14286# Create a list of thread flags to try. Items with a "," contain both
14287# C compiler flags (before ",") and linker flags (after ","). Other items
14288# starting with a "-" are C compiler flags, and remaining items are
14289# library names, except for "none" which indicates that we try without
14290# any flags at all, and "pthread-config" which is a program returning
14291# the flags for the Pth emulation library.
14292
14293ax_pthread_flags="pthreads none -Kthread -pthread -pthreads -mthreads pthread --thread-safe -mt pthread-config"
14294
14295# The ordering *is* (sometimes) important.  Some notes on the
14296# individual items follow:
14297
14298# pthreads: AIX (must check this before -lpthread)
14299# none: in case threads are in libc; should be tried before -Kthread and
14300#       other compiler flags to prevent continual compiler warnings
14301# -Kthread: Sequent (threads in libc, but -Kthread needed for pthread.h)
14302# -pthread: Linux/gcc (kernel threads), BSD/gcc (userland threads), Tru64
14303#           (Note: HP C rejects this with "bad form for `-t' option")
14304# -pthreads: Solaris/gcc (Note: HP C also rejects)
14305# -mt: Sun Workshop C (may only link SunOS threads [-lthread], but it
14306#      doesn't hurt to check since this sometimes defines pthreads and
14307#      -D_REENTRANT too), HP C (must be checked before -lpthread, which
14308#      is present but should not be used directly; and before -mthreads,
14309#      because the compiler interprets this as "-mt" + "-hreads")
14310# -mthreads: Mingw32/gcc, Lynx/gcc
14311# pthread: Linux, etcetera
14312# --thread-safe: KAI C++
14313# pthread-config: use pthread-config program (for GNU Pth library)
14314
14315case $target_os in
14316
14317        freebsd*)
14318
14319        # -kthread: FreeBSD kernel threads (preferred to -pthread since SMP-able)
14320        # lthread: LinuxThreads port on FreeBSD (also preferred to -pthread)
14321
14322        ax_pthread_flags="-kthread lthread $ax_pthread_flags"
14323        ;;
14324
14325        hpux*)
14326
14327        # From the cc(1) man page: "[-mt] Sets various -D flags to enable
14328        # multi-threading and also sets -lpthread."
14329
14330        ax_pthread_flags="-mt -pthread pthread $ax_pthread_flags"
14331        ;;
14332
14333        openedition*)
14334
14335        # IBM z/OS requires a feature-test macro to be defined in order to
14336        # enable POSIX threads at all, so give the user a hint if this is
14337        # not set. (We don't define these ourselves, as they can affect
14338        # other portions of the system API in unpredictable ways.)
14339
14340        cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14341/* end confdefs.h.  */
14342
14343#            if !defined(_OPEN_THREADS) && !defined(_UNIX03_THREADS)
14344             AX_PTHREAD_ZOS_MISSING
14345#            endif
14346
14347_ACEOF
14348if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
14349  $EGREP "AX_PTHREAD_ZOS_MISSING" >/dev/null 2>&1; then :
14350  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: IBM z/OS requires -D_OPEN_THREADS or -D_UNIX03_THREADS to enable pthreads support." >&5
14351$as_echo "$as_me: WARNING: IBM z/OS requires -D_OPEN_THREADS or -D_UNIX03_THREADS to enable pthreads support." >&2;}
14352fi
14353rm -f conftest*
14354
14355        ;;
14356
14357        solaris*)
14358
14359        # On Solaris (at least, for some versions), libc contains stubbed
14360        # (non-functional) versions of the pthreads routines, so link-based
14361        # tests will erroneously succeed. (N.B.: The stubs are missing
14362        # pthread_cleanup_push, or rather a function called by this macro,
14363        # so we could check for that, but who knows whether they'll stub
14364        # that too in a future libc.)  So we'll check first for the
14365        # standard Solaris way of linking pthreads (-mt -lpthread).
14366
14367        ax_pthread_flags="-mt,-lpthread pthread $ax_pthread_flags"
14368        ;;
14369esac
14370
14371# Are we compiling with Clang?
14372
14373{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC is Clang" >&5
14374$as_echo_n "checking whether $CC is Clang... " >&6; }
14375if ${ax_cv_PTHREAD_CLANG+:} false; then :
14376  $as_echo_n "(cached) " >&6
14377else
14378  ax_cv_PTHREAD_CLANG=no
14379     # Note that Autoconf sets GCC=yes for Clang as well as GCC
14380     if test "x$GCC" = "xyes"; then
14381        cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14382/* end confdefs.h.  */
14383/* Note: Clang 2.7 lacks __clang_[a-z]+__ */
14384#            if defined(__clang__) && defined(__llvm__)
14385             AX_PTHREAD_CC_IS_CLANG
14386#            endif
14387
14388_ACEOF
14389if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
14390  $EGREP "AX_PTHREAD_CC_IS_CLANG" >/dev/null 2>&1; then :
14391  ax_cv_PTHREAD_CLANG=yes
14392fi
14393rm -f conftest*
14394
14395     fi
14396
14397fi
14398{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv_PTHREAD_CLANG" >&5
14399$as_echo "$ax_cv_PTHREAD_CLANG" >&6; }
14400ax_pthread_clang="$ax_cv_PTHREAD_CLANG"
14401
14402
14403# GCC generally uses -pthread, or -pthreads on some platforms (e.g. SPARC)
14404
14405# Note that for GCC and Clang -pthread generally implies -lpthread,
14406# except when -nostdlib is passed.
14407# This is problematic using libtool to build C++ shared libraries with pthread:
14408# [1] https://gcc.gnu.org/bugzilla/show_bug.cgi?id=25460
14409# [2] https://bugzilla.redhat.com/show_bug.cgi?id=661333
14410# [3] https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=468555
14411# To solve this, first try -pthread together with -lpthread for GCC
14412
14413if test "x$GCC" = "xyes"; then :
14414  ax_pthread_flags="-pthread,-lpthread -pthread -pthreads $ax_pthread_flags"
14415fi
14416
14417# Clang takes -pthread (never supported any other flag), but we'll try with -lpthread first
14418
14419if test "x$ax_pthread_clang" = "xyes"; then :
14420  ax_pthread_flags="-pthread,-lpthread -pthread"
14421fi
14422
14423
14424# The presence of a feature test macro requesting re-entrant function
14425# definitions is, on some systems, a strong hint that pthreads support is
14426# correctly enabled
14427
14428case $target_os in
14429        darwin* | hpux* | linux* | osf* | solaris*)
14430        ax_pthread_check_macro="_REENTRANT"
14431        ;;
14432
14433        aix*)
14434        ax_pthread_check_macro="_THREAD_SAFE"
14435        ;;
14436
14437        *)
14438        ax_pthread_check_macro="--"
14439        ;;
14440esac
14441if test "x$ax_pthread_check_macro" = "x--"; then :
14442  ax_pthread_check_cond=0
14443else
14444  ax_pthread_check_cond="!defined($ax_pthread_check_macro)"
14445fi
14446
14447
14448if test "x$ax_pthread_ok" = "xno"; then
14449for ax_pthread_try_flag in $ax_pthread_flags; do
14450
14451        case $ax_pthread_try_flag in
14452                none)
14453                { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether pthreads work without any flags" >&5
14454$as_echo_n "checking whether pthreads work without any flags... " >&6; }
14455                ;;
14456
14457                *,*)
14458                PTHREAD_CFLAGS=`echo $ax_pthread_try_flag | sed "s/^\(.*\),\(.*\)$/\1/"`
14459                PTHREAD_LIBS=`echo $ax_pthread_try_flag | sed "s/^\(.*\),\(.*\)$/\2/"`
14460                { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether pthreads work with \"$PTHREAD_CFLAGS\" and \"$PTHREAD_LIBS\"" >&5
14461$as_echo_n "checking whether pthreads work with \"$PTHREAD_CFLAGS\" and \"$PTHREAD_LIBS\"... " >&6; }
14462                ;;
14463
14464                -*)
14465                { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether pthreads work with $ax_pthread_try_flag" >&5
14466$as_echo_n "checking whether pthreads work with $ax_pthread_try_flag... " >&6; }
14467                PTHREAD_CFLAGS="$ax_pthread_try_flag"
14468                ;;
14469
14470                pthread-config)
14471                # Extract the first word of "pthread-config", so it can be a program name with args.
14472set dummy pthread-config; ac_word=$2
14473{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14474$as_echo_n "checking for $ac_word... " >&6; }
14475if ${ac_cv_prog_ax_pthread_config+:} false; then :
14476  $as_echo_n "(cached) " >&6
14477else
14478  if test -n "$ax_pthread_config"; then
14479  ac_cv_prog_ax_pthread_config="$ax_pthread_config" # Let the user override the test.
14480else
14481as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14482for as_dir in $PATH
14483do
14484  IFS=$as_save_IFS
14485  test -z "$as_dir" && as_dir=.
14486    for ac_exec_ext in '' $ac_executable_extensions; do
14487  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14488    ac_cv_prog_ax_pthread_config="yes"
14489    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14490    break 2
14491  fi
14492done
14493  done
14494IFS=$as_save_IFS
14495
14496  test -z "$ac_cv_prog_ax_pthread_config" && ac_cv_prog_ax_pthread_config="no"
14497fi
14498fi
14499ax_pthread_config=$ac_cv_prog_ax_pthread_config
14500if test -n "$ax_pthread_config"; then
14501  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_pthread_config" >&5
14502$as_echo "$ax_pthread_config" >&6; }
14503else
14504  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14505$as_echo "no" >&6; }
14506fi
14507
14508
14509                if test "x$ax_pthread_config" = "xno"; then :
14510  continue
14511fi
14512                PTHREAD_CFLAGS="`pthread-config --cflags`"
14513                PTHREAD_LIBS="`pthread-config --ldflags` `pthread-config --libs`"
14514                ;;
14515
14516                *)
14517                { $as_echo "$as_me:${as_lineno-$LINENO}: checking for the pthreads library -l$ax_pthread_try_flag" >&5
14518$as_echo_n "checking for the pthreads library -l$ax_pthread_try_flag... " >&6; }
14519                PTHREAD_LIBS="-l$ax_pthread_try_flag"
14520                ;;
14521        esac
14522
14523        ax_pthread_save_CFLAGS="$CFLAGS"
14524        ax_pthread_save_LIBS="$LIBS"
14525        CFLAGS="$CFLAGS $PTHREAD_CFLAGS"
14526        LIBS="$PTHREAD_LIBS $LIBS"
14527
14528        # Check for various functions.  We must include pthread.h,
14529        # since some functions may be macros.  (On the Sequent, we
14530        # need a special flag -Kthread to make this header compile.)
14531        # We check for pthread_join because it is in -lpthread on IRIX
14532        # while pthread_create is in libc.  We check for pthread_attr_init
14533        # due to DEC craziness with -lpthreads.  We check for
14534        # pthread_cleanup_push because it is one of the few pthread
14535        # functions on Solaris that doesn't have a non-functional libc stub.
14536        # We try pthread_create on general principles.
14537
14538        cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14539/* end confdefs.h.  */
14540#include <pthread.h>
14541#                       if $ax_pthread_check_cond
14542#                        error "$ax_pthread_check_macro must be defined"
14543#                       endif
14544                        static void *some_global = NULL;
14545                        static void routine(void *a)
14546                          {
14547                             /* To avoid any unused-parameter or
14548                                unused-but-set-parameter warning.  */
14549                             some_global = a;
14550                          }
14551                        static void *start_routine(void *a) { return a; }
14552int
14553main ()
14554{
14555pthread_t th; pthread_attr_t attr;
14556                        pthread_create(&th, 0, start_routine, 0);
14557                        pthread_join(th, 0);
14558                        pthread_attr_init(&attr);
14559                        pthread_cleanup_push(routine, 0);
14560                        pthread_cleanup_pop(0) /* ; */
14561  ;
14562  return 0;
14563}
14564_ACEOF
14565if ac_fn_c_try_link "$LINENO"; then :
14566  ax_pthread_ok=yes
14567fi
14568rm -f core conftest.err conftest.$ac_objext \
14569    conftest$ac_exeext conftest.$ac_ext
14570
14571        CFLAGS="$ax_pthread_save_CFLAGS"
14572        LIBS="$ax_pthread_save_LIBS"
14573
14574        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_pthread_ok" >&5
14575$as_echo "$ax_pthread_ok" >&6; }
14576        if test "x$ax_pthread_ok" = "xyes"; then :
14577  break
14578fi
14579
14580        PTHREAD_LIBS=""
14581        PTHREAD_CFLAGS=""
14582done
14583fi
14584
14585
14586# Clang needs special handling, because older versions handle the -pthread
14587# option in a rather... idiosyncratic way
14588
14589if test "x$ax_pthread_clang" = "xyes"; then
14590
14591        # Clang takes -pthread; it has never supported any other flag
14592
14593        # (Note 1: This will need to be revisited if a system that Clang
14594        # supports has POSIX threads in a separate library.  This tends not
14595        # to be the way of modern systems, but it's conceivable.)
14596
14597        # (Note 2: On some systems, notably Darwin, -pthread is not needed
14598        # to get POSIX threads support; the API is always present and
14599        # active.  We could reasonably leave PTHREAD_CFLAGS empty.  But
14600        # -pthread does define _REENTRANT, and while the Darwin headers
14601        # ignore this macro, third-party headers might not.)
14602
14603        # However, older versions of Clang make a point of warning the user
14604        # that, in an invocation where only linking and no compilation is
14605        # taking place, the -pthread option has no effect ("argument unused
14606        # during compilation").  They expect -pthread to be passed in only
14607        # when source code is being compiled.
14608        #
14609        # Problem is, this is at odds with the way Automake and most other
14610        # C build frameworks function, which is that the same flags used in
14611        # compilation (CFLAGS) are also used in linking.  Many systems
14612        # supported by AX_PTHREAD require exactly this for POSIX threads
14613        # support, and in fact it is often not straightforward to specify a
14614        # flag that is used only in the compilation phase and not in
14615        # linking.  Such a scenario is extremely rare in practice.
14616        #
14617        # Even though use of the -pthread flag in linking would only print
14618        # a warning, this can be a nuisance for well-run software projects
14619        # that build with -Werror.  So if the active version of Clang has
14620        # this misfeature, we search for an option to squash it.
14621
14622        { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether Clang needs flag to prevent \"argument unused\" warning when linking with -pthread" >&5
14623$as_echo_n "checking whether Clang needs flag to prevent \"argument unused\" warning when linking with -pthread... " >&6; }
14624if ${ax_cv_PTHREAD_CLANG_NO_WARN_FLAG+:} false; then :
14625  $as_echo_n "(cached) " >&6
14626else
14627  ax_cv_PTHREAD_CLANG_NO_WARN_FLAG=unknown
14628             # Create an alternate version of $ac_link that compiles and
14629             # links in two steps (.c -> .o, .o -> exe) instead of one
14630             # (.c -> exe), because the warning occurs only in the second
14631             # step
14632             ax_pthread_save_ac_link="$ac_link"
14633             ax_pthread_sed='s/conftest\.\$ac_ext/conftest.$ac_objext/g'
14634             ax_pthread_link_step=`$as_echo "$ac_link" | sed "$ax_pthread_sed"`
14635             ax_pthread_2step_ac_link="($ac_compile) && (echo ==== >&5) && ($ax_pthread_link_step)"
14636             ax_pthread_save_CFLAGS="$CFLAGS"
14637             for ax_pthread_try in '' -Qunused-arguments -Wno-unused-command-line-argument unknown; do
14638                if test "x$ax_pthread_try" = "xunknown"; then :
14639  break
14640fi
14641                CFLAGS="-Werror -Wunknown-warning-option $ax_pthread_try -pthread $ax_pthread_save_CFLAGS"
14642                ac_link="$ax_pthread_save_ac_link"
14643                cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14644/* end confdefs.h.  */
14645int main(void){return 0;}
14646_ACEOF
14647if ac_fn_c_try_link "$LINENO"; then :
14648  ac_link="$ax_pthread_2step_ac_link"
14649                     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14650/* end confdefs.h.  */
14651int main(void){return 0;}
14652_ACEOF
14653if ac_fn_c_try_link "$LINENO"; then :
14654  break
14655fi
14656rm -f core conftest.err conftest.$ac_objext \
14657    conftest$ac_exeext conftest.$ac_ext
14658
14659fi
14660rm -f core conftest.err conftest.$ac_objext \
14661    conftest$ac_exeext conftest.$ac_ext
14662             done
14663             ac_link="$ax_pthread_save_ac_link"
14664             CFLAGS="$ax_pthread_save_CFLAGS"
14665             if test "x$ax_pthread_try" = "x"; then :
14666  ax_pthread_try=no
14667fi
14668             ax_cv_PTHREAD_CLANG_NO_WARN_FLAG="$ax_pthread_try"
14669
14670fi
14671{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv_PTHREAD_CLANG_NO_WARN_FLAG" >&5
14672$as_echo "$ax_cv_PTHREAD_CLANG_NO_WARN_FLAG" >&6; }
14673
14674        case "$ax_cv_PTHREAD_CLANG_NO_WARN_FLAG" in
14675                no | unknown) ;;
14676                *) PTHREAD_CFLAGS="$ax_cv_PTHREAD_CLANG_NO_WARN_FLAG $PTHREAD_CFLAGS" ;;
14677        esac
14678
14679fi # $ax_pthread_clang = yes
14680
14681
14682
14683# Various other checks:
14684if test "x$ax_pthread_ok" = "xyes"; then
14685        ax_pthread_save_CFLAGS="$CFLAGS"
14686        ax_pthread_save_LIBS="$LIBS"
14687        CFLAGS="$CFLAGS $PTHREAD_CFLAGS"
14688        LIBS="$PTHREAD_LIBS $LIBS"
14689
14690        # Detect AIX lossage: JOINABLE attribute is called UNDETACHED.
14691        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for joinable pthread attribute" >&5
14692$as_echo_n "checking for joinable pthread attribute... " >&6; }
14693if ${ax_cv_PTHREAD_JOINABLE_ATTR+:} false; then :
14694  $as_echo_n "(cached) " >&6
14695else
14696  ax_cv_PTHREAD_JOINABLE_ATTR=unknown
14697             for ax_pthread_attr in PTHREAD_CREATE_JOINABLE PTHREAD_CREATE_UNDETACHED; do
14698                 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14699/* end confdefs.h.  */
14700#include <pthread.h>
14701int
14702main ()
14703{
14704int attr = $ax_pthread_attr; return attr /* ; */
14705  ;
14706  return 0;
14707}
14708_ACEOF
14709if ac_fn_c_try_link "$LINENO"; then :
14710  ax_cv_PTHREAD_JOINABLE_ATTR=$ax_pthread_attr; break
14711fi
14712rm -f core conftest.err conftest.$ac_objext \
14713    conftest$ac_exeext conftest.$ac_ext
14714             done
14715
14716fi
14717{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv_PTHREAD_JOINABLE_ATTR" >&5
14718$as_echo "$ax_cv_PTHREAD_JOINABLE_ATTR" >&6; }
14719        if test "x$ax_cv_PTHREAD_JOINABLE_ATTR" != "xunknown" && \
14720               test "x$ax_cv_PTHREAD_JOINABLE_ATTR" != "xPTHREAD_CREATE_JOINABLE" && \
14721               test "x$ax_pthread_joinable_attr_defined" != "xyes"; then :
14722
14723cat >>confdefs.h <<_ACEOF
14724#define PTHREAD_CREATE_JOINABLE $ax_cv_PTHREAD_JOINABLE_ATTR
14725_ACEOF
14726
14727               ax_pthread_joinable_attr_defined=yes
14728
14729fi
14730
14731        { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether more special flags are required for pthreads" >&5
14732$as_echo_n "checking whether more special flags are required for pthreads... " >&6; }
14733if ${ax_cv_PTHREAD_SPECIAL_FLAGS+:} false; then :
14734  $as_echo_n "(cached) " >&6
14735else
14736  ax_cv_PTHREAD_SPECIAL_FLAGS=no
14737             case $target_os in
14738             solaris*)
14739             ax_cv_PTHREAD_SPECIAL_FLAGS="-D_POSIX_PTHREAD_SEMANTICS"
14740             ;;
14741             esac
14742
14743fi
14744{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv_PTHREAD_SPECIAL_FLAGS" >&5
14745$as_echo "$ax_cv_PTHREAD_SPECIAL_FLAGS" >&6; }
14746        if test "x$ax_cv_PTHREAD_SPECIAL_FLAGS" != "xno" && \
14747               test "x$ax_pthread_special_flags_added" != "xyes"; then :
14748  PTHREAD_CFLAGS="$ax_cv_PTHREAD_SPECIAL_FLAGS $PTHREAD_CFLAGS"
14749               ax_pthread_special_flags_added=yes
14750fi
14751
14752        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PTHREAD_PRIO_INHERIT" >&5
14753$as_echo_n "checking for PTHREAD_PRIO_INHERIT... " >&6; }
14754if ${ax_cv_PTHREAD_PRIO_INHERIT+:} false; then :
14755  $as_echo_n "(cached) " >&6
14756else
14757  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14758/* end confdefs.h.  */
14759#include <pthread.h>
14760int
14761main ()
14762{
14763int i = PTHREAD_PRIO_INHERIT;
14764                                               return i;
14765  ;
14766  return 0;
14767}
14768_ACEOF
14769if ac_fn_c_try_link "$LINENO"; then :
14770  ax_cv_PTHREAD_PRIO_INHERIT=yes
14771else
14772  ax_cv_PTHREAD_PRIO_INHERIT=no
14773fi
14774rm -f core conftest.err conftest.$ac_objext \
14775    conftest$ac_exeext conftest.$ac_ext
14776
14777fi
14778{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv_PTHREAD_PRIO_INHERIT" >&5
14779$as_echo "$ax_cv_PTHREAD_PRIO_INHERIT" >&6; }
14780        if test "x$ax_cv_PTHREAD_PRIO_INHERIT" = "xyes" && \
14781               test "x$ax_pthread_prio_inherit_defined" != "xyes"; then :
14782
14783$as_echo "#define HAVE_PTHREAD_PRIO_INHERIT 1" >>confdefs.h
14784
14785               ax_pthread_prio_inherit_defined=yes
14786
14787fi
14788
14789        CFLAGS="$ax_pthread_save_CFLAGS"
14790        LIBS="$ax_pthread_save_LIBS"
14791
14792        # More AIX lossage: compile with *_r variant
14793        if test "x$GCC" != "xyes"; then
14794            case $target_os in
14795                aix*)
14796                case "x/$CC" in #(
14797  x*/c89|x*/c89_128|x*/c99|x*/c99_128|x*/cc|x*/cc128|x*/xlc|x*/xlc_v6|x*/xlc128|x*/xlc128_v6) :
14798    #handle absolute path differently from PATH based program lookup
14799                     case "x$CC" in #(
14800  x/*) :
14801
14802			   if as_fn_executable_p ${CC}_r; then :
14803  PTHREAD_CC="${CC}_r"
14804fi
14805			   if test "x${CXX}" != "x"; then :
14806  if as_fn_executable_p ${CXX}_r; then :
14807  PTHREAD_CXX="${CXX}_r"
14808fi
14809fi
14810			  ;; #(
14811  *) :
14812
14813			   for ac_prog in ${CC}_r
14814do
14815  # Extract the first word of "$ac_prog", so it can be a program name with args.
14816set dummy $ac_prog; ac_word=$2
14817{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14818$as_echo_n "checking for $ac_word... " >&6; }
14819if ${ac_cv_prog_PTHREAD_CC+:} false; then :
14820  $as_echo_n "(cached) " >&6
14821else
14822  if test -n "$PTHREAD_CC"; then
14823  ac_cv_prog_PTHREAD_CC="$PTHREAD_CC" # Let the user override the test.
14824else
14825as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14826for as_dir in $PATH
14827do
14828  IFS=$as_save_IFS
14829  test -z "$as_dir" && as_dir=.
14830    for ac_exec_ext in '' $ac_executable_extensions; do
14831  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14832    ac_cv_prog_PTHREAD_CC="$ac_prog"
14833    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14834    break 2
14835  fi
14836done
14837  done
14838IFS=$as_save_IFS
14839
14840fi
14841fi
14842PTHREAD_CC=$ac_cv_prog_PTHREAD_CC
14843if test -n "$PTHREAD_CC"; then
14844  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PTHREAD_CC" >&5
14845$as_echo "$PTHREAD_CC" >&6; }
14846else
14847  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14848$as_echo "no" >&6; }
14849fi
14850
14851
14852  test -n "$PTHREAD_CC" && break
14853done
14854test -n "$PTHREAD_CC" || PTHREAD_CC="$CC"
14855
14856			   if test "x${CXX}" != "x"; then :
14857  for ac_prog in ${CXX}_r
14858do
14859  # Extract the first word of "$ac_prog", so it can be a program name with args.
14860set dummy $ac_prog; ac_word=$2
14861{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14862$as_echo_n "checking for $ac_word... " >&6; }
14863if ${ac_cv_prog_PTHREAD_CXX+:} false; then :
14864  $as_echo_n "(cached) " >&6
14865else
14866  if test -n "$PTHREAD_CXX"; then
14867  ac_cv_prog_PTHREAD_CXX="$PTHREAD_CXX" # Let the user override the test.
14868else
14869as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14870for as_dir in $PATH
14871do
14872  IFS=$as_save_IFS
14873  test -z "$as_dir" && as_dir=.
14874    for ac_exec_ext in '' $ac_executable_extensions; do
14875  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14876    ac_cv_prog_PTHREAD_CXX="$ac_prog"
14877    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14878    break 2
14879  fi
14880done
14881  done
14882IFS=$as_save_IFS
14883
14884fi
14885fi
14886PTHREAD_CXX=$ac_cv_prog_PTHREAD_CXX
14887if test -n "$PTHREAD_CXX"; then
14888  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PTHREAD_CXX" >&5
14889$as_echo "$PTHREAD_CXX" >&6; }
14890else
14891  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14892$as_echo "no" >&6; }
14893fi
14894
14895
14896  test -n "$PTHREAD_CXX" && break
14897done
14898test -n "$PTHREAD_CXX" || PTHREAD_CXX="$CXX"
14899
14900fi
14901
14902                      ;;
14903esac
14904                     ;; #(
14905  *) :
14906     ;;
14907esac
14908                ;;
14909            esac
14910        fi
14911fi
14912
14913test -n "$PTHREAD_CC" || PTHREAD_CC="$CC"
14914test -n "$PTHREAD_CXX" || PTHREAD_CXX="$CXX"
14915
14916
14917
14918
14919
14920
14921# Finally, execute ACTION-IF-FOUND/ACTION-IF-NOT-FOUND:
14922if test "x$ax_pthread_ok" = "xyes"; then
14923        if test "$CC" = "$PTHREAD_CC" -o -z "$ac_original_cc"; then
14924      have_pthread=yes
14925    else
14926      ac_prog_cc_no_pthread=yes
14927    fi
14928
14929        :
14930else
14931        ax_pthread_ok=no
14932
14933fi
14934ac_ext=c
14935ac_cpp='$CPP $CPPFLAGS'
14936ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
14937ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
14938ac_compiler_gnu=$ac_cv_c_compiler_gnu
14939
14940
14941
14942  if test "$have_pthread" = yes; then
14943    $as_echo "#define HAVE_PTHREAD 1" >>confdefs.h
14944
14945    CC="$PTHREAD_CC"
14946  fi
14947fi
14948
14949
14950###############################################################################
14951#
14952#       Handle --with-gles
14953#	Must come before --with-gl
14954#
14955###############################################################################
14956
14957with_jwzgles_req=unspecified
14958have_jwzgles=no
14959
14960# Check whether --with-gles was given.
14961if test "${with_gles+set}" = set; then :
14962  withval=$with_gles; # This is documented after --with-gl
14963  with_jwzgles="$withval"; with_jwzgles_req="$withval"
14964else
14965  with_jwzgles=no
14966fi
14967
14968
14969
14970   case "$with_jwzgles" in
14971    yes) ;;
14972    no)  ;;
14973
14974    /*)
14975     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JWZGLES headers" >&5
14976$as_echo_n "checking for JWZGLES headers... " >&6; }
14977     d=$with_jwzgles/include
14978     if test -d $d; then
14979       X_CFLAGS="-I$d $X_CFLAGS"
14980       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $d" >&5
14981$as_echo "$d" >&6; }
14982     else
14983       { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found ($d: no such directory)" >&5
14984$as_echo "not found ($d: no such directory)" >&6; }
14985     fi
14986
14987     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JWZGLES libs" >&5
14988$as_echo_n "checking for JWZGLES libs... " >&6; }
14989     d=$with_jwzgles/lib
14990     if test -d $d; then
14991       X_LIBS="-L$d $X_LIBS"
14992       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $d" >&5
14993$as_echo "$d" >&6; }
14994     else
14995       { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found ($d: no such directory)" >&5
14996$as_echo "not found ($d: no such directory)" >&6; }
14997     fi
14998
14999     # replace the directory string with "yes".
15000     with_jwzgles_req="yes"
15001     with_jwzgles=$with_jwzgles_req
15002     ;;
15003
15004    *)
15005     echo ""
15006     echo "error: argument to --with-gles must be \"yes\", \"no\", or a directory."
15007     echo "       If it is a directory, then \`DIR/include' will be added to"
15008     echo "       the -I list, and \`DIR/lib' will be added to the -L list."
15009     exit 1
15010     ;;
15011   esac
15012
15013
15014if test "$with_jwzgles" = yes; then
15015  have_jwzgles=yes
15016  JWZGLES_OBJS='$(JWXYZ_BIN)/jwzgles.o'
15017  { $as_echo "$as_me:${as_lineno-$LINENO}: result: emulating OpenGL 1.3 in terms of OpenGLES 1.x." >&5
15018$as_echo "emulating OpenGL 1.3 in terms of OpenGLES 1.x." >&6; }
15019elif test "$with_jwzgles" != no; then
15020  echo "error: must be yes or no: --with-gles=$with_jwzgles"
15021  exit 1
15022fi
15023
15024
15025###############################################################################
15026#
15027#       Check for -lGL or -lMesaGL.
15028#
15029###############################################################################
15030
15031#### H1
15032
15033have_gl=no
15034ac_have_mesa_gl=no
15035with_gl_req=unspecified
15036gl_halfassed=no
15037have_glext=no
15038
15039# Check whether --with-gl was given.
15040if test "${with_gl+set}" = set; then :
15041  withval=$with_gl; with_gl="$withval"; with_gl_req="$withval"
15042else
15043  with_gl=yes
15044fi
15045
15046
15047
15048   case "$with_gl" in
15049    yes) ;;
15050    no)  ;;
15051
15052    /*)
15053     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GL headers" >&5
15054$as_echo_n "checking for GL headers... " >&6; }
15055     d=$with_gl/include
15056     if test -d $d; then
15057       X_CFLAGS="-I$d $X_CFLAGS"
15058       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $d" >&5
15059$as_echo "$d" >&6; }
15060     else
15061       { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found ($d: no such directory)" >&5
15062$as_echo "not found ($d: no such directory)" >&6; }
15063     fi
15064
15065     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GL libs" >&5
15066$as_echo_n "checking for GL libs... " >&6; }
15067     d=$with_gl/lib
15068     if test -d $d; then
15069       X_LIBS="-L$d $X_LIBS"
15070       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $d" >&5
15071$as_echo "$d" >&6; }
15072     else
15073       { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found ($d: no such directory)" >&5
15074$as_echo "not found ($d: no such directory)" >&6; }
15075     fi
15076
15077     # replace the directory string with "yes".
15078     with_gl_req="yes"
15079     with_gl=$with_gl_req
15080     ;;
15081
15082    *)
15083     echo ""
15084     echo "error: argument to --with-gl must be \"yes\", \"no\", or a directory."
15085     echo "       If it is a directory, then \`DIR/include' will be added to"
15086     echo "       the -I list, and \`DIR/lib' will be added to the -L list."
15087     exit 1
15088     ;;
15089   esac
15090
15091
15092# Some GL libraries require pthreads, so use the pthreads flags when
15093# testing them, then set them back after.
15094#
15095ac_save_pthreads_CFLAGS="$CFLAGS"
15096ac_save_pthreads_LIBS="$LIBS"
15097CFLAGS="$PTHREAD_CFLAGS $CFLAGS"
15098LIBS="$PTHREAD_LIBS $LIBS"
15099
15100if test "$with_gl" = yes; then
15101
15102  ac_save_CPPFLAGS="$CPPFLAGS"
15103  if test \! -z "$includedir" ; then
15104    CPPFLAGS="$CPPFLAGS -I$includedir"
15105  fi
15106  CPPFLAGS="$CPPFLAGS $X_CFLAGS"
15107  CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
15108  ac_fn_c_check_header_mongrel "$LINENO" "GL/gl.h" "ac_cv_header_GL_gl_h" "$ac_includes_default"
15109if test "x$ac_cv_header_GL_gl_h" = xyes; then :
15110  have_gl=yes
15111else
15112  have_gl=no
15113fi
15114
15115
15116  CPPFLAGS="$ac_save_CPPFLAGS";
15117  if test "$have_gl" = yes; then
15118
15119  ac_save_CPPFLAGS="$CPPFLAGS"
15120  if test \! -z "$includedir" ; then
15121    CPPFLAGS="$CPPFLAGS -I$includedir"
15122  fi
15123  CPPFLAGS="$CPPFLAGS $X_CFLAGS"
15124  CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
15125  ac_fn_c_check_header_mongrel "$LINENO" "GL/glu.h" "ac_cv_header_GL_glu_h" "$ac_includes_default"
15126if test "x$ac_cv_header_GL_glu_h" = xyes; then :
15127  have_gl=yes
15128else
15129  have_gl=no
15130fi
15131
15132
15133  CPPFLAGS="$ac_save_CPPFLAGS";
15134  fi
15135fi
15136
15137if test "$with_gl" = yes; then
15138  #
15139  # Since the OpenGL and GLES specifications are a complete dumpster fire,
15140  # it's not easy to figure out how what libraries to use.
15141  #
15142  # OpenGLES library names:
15143  #
15144  #   1.x: libGLESv1_CM
15145  #   2.x: libGLESv2
15146  #   3.x: libGLESv2 on Windows, libGLESv3 on Android
15147  #
15148  # On modern Linux systems, these libraries exist:
15149  #
15150  #   libGL        - a superset of everything up to and including OpenGL 4.6
15151  #   libGLESv1_CM - OpenGLES 1.1, meaning it omits much of OpenGL 1.3
15152  #   libGLESv2    - OpenGLES 2 and 3, meaning it omits even more of OpenGL 1.3
15153  #
15154  # Since Linux systems support OpenGL 1.3, those link against only libGL.
15155  #
15156  # Unless we are using --with-gles on Linux, in which case we are attempting
15157  # to simulate a system that does not natively support OpenGL 1.3.  In that
15158  # case, we use the v1 and/or v2 libraries instead.
15159  #
15160  # Common practice on Android seems to be to link against the v1, v2 and v3
15161  # libraries in order, and then do runtime checks to see which set of
15162  # functions is actually supported by the runtime.  Just because you linked
15163  # against a GLES3 library doesn't mean that the hardware supports it: most
15164  # of these functions are just syscall-like stubs.
15165  #
15166  # See the commentary atop jwxyz/jwzgles.c for discussion of OpenGL versions.
15167  #
15168  if test "$have_gl" = yes; then
15169    have_gl=no
15170
15171    if test "$have_jwzgles" = yes; then
15172
15173      # Only check for the v1/2/3 libraries on Linux when using --with-gles
15174      # to emulate a system that does not natively support OpenGL 1.3.
15175
15176      # Check for GLES 3.x
15177
15178  ac_save_CPPFLAGS="$CPPFLAGS"
15179  ac_save_LDFLAGS="$LDFLAGS"
15180#  ac_save_LIBS="$LIBS"
15181
15182  if test \! -z "$includedir" ; then
15183    CPPFLAGS="$CPPFLAGS -I$includedir"
15184  fi
15185  # note: $X_CFLAGS includes $x_includes
15186  CPPFLAGS="$CPPFLAGS $X_CFLAGS"
15187
15188  if test \! -z "$libdir" ; then
15189    LDFLAGS="$LDFLAGS -L$libdir"
15190  fi
15191  # note: $X_LIBS includes $x_libraries
15192  LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
15193
15194  CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
15195  LDFLAGS=`eval eval eval eval eval eval eval eval eval echo $LDFLAGS`
15196  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for glDrawElements in -lGLESv3" >&5
15197$as_echo_n "checking for glDrawElements in -lGLESv3... " >&6; }
15198if ${ac_cv_lib_GLESv3_glDrawElements+:} false; then :
15199  $as_echo_n "(cached) " >&6
15200else
15201  ac_check_lib_save_LIBS=$LIBS
15202LIBS="-lGLESv3 $GL_LIBS -lm $LIBS"
15203cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15204/* end confdefs.h.  */
15205
15206/* Override any GCC internal prototype to avoid an error.
15207   Use char because int might match the return type of a GCC
15208   builtin and then its argument prototype would still apply.  */
15209#ifdef __cplusplus
15210extern "C"
15211#endif
15212char glDrawElements ();
15213int
15214main ()
15215{
15216return glDrawElements ();
15217  ;
15218  return 0;
15219}
15220_ACEOF
15221if ac_fn_c_try_link "$LINENO"; then :
15222  ac_cv_lib_GLESv3_glDrawElements=yes
15223else
15224  ac_cv_lib_GLESv3_glDrawElements=no
15225fi
15226rm -f core conftest.err conftest.$ac_objext \
15227    conftest$ac_exeext conftest.$ac_ext
15228LIBS=$ac_check_lib_save_LIBS
15229fi
15230{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_GLESv3_glDrawElements" >&5
15231$as_echo "$ac_cv_lib_GLESv3_glDrawElements" >&6; }
15232if test "x$ac_cv_lib_GLESv3_glDrawElements" = xyes; then :
15233  have_gl=yes
15234                      gl_lib_1="GLESv3"
15235                      GL_LIBS="-lGLESv3 $GL_LIBS"
15236fi
15237
15238  CPPFLAGS="$ac_save_CPPFLAGS"
15239  LDFLAGS="$ac_save_LDFLAGS"
15240#  LIBS="$ac_save_LIBS"
15241
15242
15243      # Check for GLES 2.x
15244
15245  ac_save_CPPFLAGS="$CPPFLAGS"
15246  ac_save_LDFLAGS="$LDFLAGS"
15247#  ac_save_LIBS="$LIBS"
15248
15249  if test \! -z "$includedir" ; then
15250    CPPFLAGS="$CPPFLAGS -I$includedir"
15251  fi
15252  # note: $X_CFLAGS includes $x_includes
15253  CPPFLAGS="$CPPFLAGS $X_CFLAGS"
15254
15255  if test \! -z "$libdir" ; then
15256    LDFLAGS="$LDFLAGS -L$libdir"
15257  fi
15258  # note: $X_LIBS includes $x_libraries
15259  LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
15260
15261  CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
15262  LDFLAGS=`eval eval eval eval eval eval eval eval eval echo $LDFLAGS`
15263  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for glDrawElements in -lGLESv2" >&5
15264$as_echo_n "checking for glDrawElements in -lGLESv2... " >&6; }
15265if ${ac_cv_lib_GLESv2_glDrawElements+:} false; then :
15266  $as_echo_n "(cached) " >&6
15267else
15268  ac_check_lib_save_LIBS=$LIBS
15269LIBS="-lGLESv2 $GL_LIBS -lm $LIBS"
15270cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15271/* end confdefs.h.  */
15272
15273/* Override any GCC internal prototype to avoid an error.
15274   Use char because int might match the return type of a GCC
15275   builtin and then its argument prototype would still apply.  */
15276#ifdef __cplusplus
15277extern "C"
15278#endif
15279char glDrawElements ();
15280int
15281main ()
15282{
15283return glDrawElements ();
15284  ;
15285  return 0;
15286}
15287_ACEOF
15288if ac_fn_c_try_link "$LINENO"; then :
15289  ac_cv_lib_GLESv2_glDrawElements=yes
15290else
15291  ac_cv_lib_GLESv2_glDrawElements=no
15292fi
15293rm -f core conftest.err conftest.$ac_objext \
15294    conftest$ac_exeext conftest.$ac_ext
15295LIBS=$ac_check_lib_save_LIBS
15296fi
15297{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_GLESv2_glDrawElements" >&5
15298$as_echo "$ac_cv_lib_GLESv2_glDrawElements" >&6; }
15299if test "x$ac_cv_lib_GLESv2_glDrawElements" = xyes; then :
15300  have_gl=yes
15301                      gl_lib_1="GLESv2"
15302                      GL_LIBS="-lGLESv2 $GL_LIBS"
15303fi
15304
15305  CPPFLAGS="$ac_save_CPPFLAGS"
15306  LDFLAGS="$ac_save_LDFLAGS"
15307#  LIBS="$ac_save_LIBS"
15308
15309
15310      # Check for GLES 1.x
15311
15312  ac_save_CPPFLAGS="$CPPFLAGS"
15313  ac_save_LDFLAGS="$LDFLAGS"
15314#  ac_save_LIBS="$LIBS"
15315
15316  if test \! -z "$includedir" ; then
15317    CPPFLAGS="$CPPFLAGS -I$includedir"
15318  fi
15319  # note: $X_CFLAGS includes $x_includes
15320  CPPFLAGS="$CPPFLAGS $X_CFLAGS"
15321
15322  if test \! -z "$libdir" ; then
15323    LDFLAGS="$LDFLAGS -L$libdir"
15324  fi
15325  # note: $X_LIBS includes $x_libraries
15326  LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
15327
15328  CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
15329  LDFLAGS=`eval eval eval eval eval eval eval eval eval echo $LDFLAGS`
15330  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for glDrawElements in -lGLESv1_CM" >&5
15331$as_echo_n "checking for glDrawElements in -lGLESv1_CM... " >&6; }
15332if ${ac_cv_lib_GLESv1_CM_glDrawElements+:} false; then :
15333  $as_echo_n "(cached) " >&6
15334else
15335  ac_check_lib_save_LIBS=$LIBS
15336LIBS="-lGLESv1_CM $GL_LIBS -lm $LIBS"
15337cat confdefs.h - <<_ACEOF >conftest.$ac_ext
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
15344extern "C"
15345#endif
15346char glDrawElements ();
15347int
15348main ()
15349{
15350return glDrawElements ();
15351  ;
15352  return 0;
15353}
15354_ACEOF
15355if ac_fn_c_try_link "$LINENO"; then :
15356  ac_cv_lib_GLESv1_CM_glDrawElements=yes
15357else
15358  ac_cv_lib_GLESv1_CM_glDrawElements=no
15359fi
15360rm -f core conftest.err conftest.$ac_objext \
15361    conftest$ac_exeext conftest.$ac_ext
15362LIBS=$ac_check_lib_save_LIBS
15363fi
15364{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_GLESv1_CM_glDrawElements" >&5
15365$as_echo "$ac_cv_lib_GLESv1_CM_glDrawElements" >&6; }
15366if test "x$ac_cv_lib_GLESv1_CM_glDrawElements" = xyes; then :
15367  have_gl=yes
15368                      gl_lib_1="GLESv1_CM"
15369                      GL_LIBS="-lGLESv1_CM $GL_LIBS"
15370fi
15371
15372  CPPFLAGS="$ac_save_CPPFLAGS"
15373  LDFLAGS="$ac_save_LDFLAGS"
15374#  LIBS="$ac_save_LIBS"
15375
15376
15377    else   # $have_jwzgles = no
15378
15379      # Check for OpenGL 1.x and/or OpenGL 4.x
15380
15381  ac_save_CPPFLAGS="$CPPFLAGS"
15382  ac_save_LDFLAGS="$LDFLAGS"
15383#  ac_save_LIBS="$LIBS"
15384
15385  if test \! -z "$includedir" ; then
15386    CPPFLAGS="$CPPFLAGS -I$includedir"
15387  fi
15388  # note: $X_CFLAGS includes $x_includes
15389  CPPFLAGS="$CPPFLAGS $X_CFLAGS"
15390
15391  if test \! -z "$libdir" ; then
15392    LDFLAGS="$LDFLAGS -L$libdir"
15393  fi
15394  # note: $X_LIBS includes $x_libraries
15395  LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
15396
15397  CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
15398  LDFLAGS=`eval eval eval eval eval eval eval eval eval echo $LDFLAGS`
15399  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for glEnable in -lGL" >&5
15400$as_echo_n "checking for glEnable in -lGL... " >&6; }
15401if ${ac_cv_lib_GL_glEnable+:} false; then :
15402  $as_echo_n "(cached) " >&6
15403else
15404  ac_check_lib_save_LIBS=$LIBS
15405LIBS="-lGL $GL_LIBS -lm $LIBS"
15406cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15407/* end confdefs.h.  */
15408
15409/* Override any GCC internal prototype to avoid an error.
15410   Use char because int might match the return type of a GCC
15411   builtin and then its argument prototype would still apply.  */
15412#ifdef __cplusplus
15413extern "C"
15414#endif
15415char glEnable ();
15416int
15417main ()
15418{
15419return glEnable ();
15420  ;
15421  return 0;
15422}
15423_ACEOF
15424if ac_fn_c_try_link "$LINENO"; then :
15425  ac_cv_lib_GL_glEnable=yes
15426else
15427  ac_cv_lib_GL_glEnable=no
15428fi
15429rm -f core conftest.err conftest.$ac_objext \
15430    conftest$ac_exeext conftest.$ac_ext
15431LIBS=$ac_check_lib_save_LIBS
15432fi
15433{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_GL_glEnable" >&5
15434$as_echo "$ac_cv_lib_GL_glEnable" >&6; }
15435if test "x$ac_cv_lib_GL_glEnable" = xyes; then :
15436  have_gl=yes
15437                      gl_lib_1="GL"
15438                      GL_LIBS="-lGL $GL_LIBS"
15439fi
15440
15441  CPPFLAGS="$ac_save_CPPFLAGS"
15442  LDFLAGS="$ac_save_LDFLAGS"
15443#  LIBS="$ac_save_LIBS"
15444
15445
15446      # Check for MesaGL 1.x, but only if libGL doesn't exist.
15447      if test "$have_gl" = no; then
15448
15449  ac_save_CPPFLAGS="$CPPFLAGS"
15450  ac_save_LDFLAGS="$LDFLAGS"
15451#  ac_save_LIBS="$LIBS"
15452
15453  if test \! -z "$includedir" ; then
15454    CPPFLAGS="$CPPFLAGS -I$includedir"
15455  fi
15456  # note: $X_CFLAGS includes $x_includes
15457  CPPFLAGS="$CPPFLAGS $X_CFLAGS"
15458
15459  if test \! -z "$libdir" ; then
15460    LDFLAGS="$LDFLAGS -L$libdir"
15461  fi
15462  # note: $X_LIBS includes $x_libraries
15463  LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
15464
15465  CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
15466  LDFLAGS=`eval eval eval eval eval eval eval eval eval echo $LDFLAGS`
15467  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for glEnable in -lMesaGL" >&5
15468$as_echo_n "checking for glEnable in -lMesaGL... " >&6; }
15469if ${ac_cv_lib_MesaGL_glEnable+:} false; then :
15470  $as_echo_n "(cached) " >&6
15471else
15472  ac_check_lib_save_LIBS=$LIBS
15473LIBS="-lMesaGL $GL_LIBS -lm $LIBS"
15474cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15475/* end confdefs.h.  */
15476
15477/* Override any GCC internal prototype to avoid an error.
15478   Use char because int might match the return type of a GCC
15479   builtin and then its argument prototype would still apply.  */
15480#ifdef __cplusplus
15481extern "C"
15482#endif
15483char glEnable ();
15484int
15485main ()
15486{
15487return glEnable ();
15488  ;
15489  return 0;
15490}
15491_ACEOF
15492if ac_fn_c_try_link "$LINENO"; then :
15493  ac_cv_lib_MesaGL_glEnable=yes
15494else
15495  ac_cv_lib_MesaGL_glEnable=no
15496fi
15497rm -f core conftest.err conftest.$ac_objext \
15498    conftest$ac_exeext conftest.$ac_ext
15499LIBS=$ac_check_lib_save_LIBS
15500fi
15501{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_MesaGL_glEnable" >&5
15502$as_echo "$ac_cv_lib_MesaGL_glEnable" >&6; }
15503if test "x$ac_cv_lib_MesaGL_glEnable" = xyes; then :
15504  have_gl=yes
15505                       gl_lib_1="MesaGL"
15506                       GL_LIBS="-lMesaGL $GL_LIBS"
15507fi
15508
15509  CPPFLAGS="$ac_save_CPPFLAGS"
15510  LDFLAGS="$ac_save_LDFLAGS"
15511#  LIBS="$ac_save_LIBS"
15512
15513      fi
15514    fi
15515  fi
15516
15517  # Figure out whether the GLU functions are in the main GL libraries or
15518  # in -lGLU.  Since Android does not have GLU, we don't link against libGLU
15519  # when using --with-gles on Linux.
15520  #
15521  if test "$have_gl" = yes -a "$have_jwzgles" = no; then
15522
15523  ac_save_CPPFLAGS="$CPPFLAGS"
15524  ac_save_LDFLAGS="$LDFLAGS"
15525#  ac_save_LIBS="$LIBS"
15526
15527  if test \! -z "$includedir" ; then
15528    CPPFLAGS="$CPPFLAGS -I$includedir"
15529  fi
15530  # note: $X_CFLAGS includes $x_includes
15531  CPPFLAGS="$CPPFLAGS $X_CFLAGS"
15532
15533  if test \! -z "$libdir" ; then
15534    LDFLAGS="$LDFLAGS -L$libdir"
15535  fi
15536  # note: $X_LIBS includes $x_libraries
15537  LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
15538
15539  CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
15540  LDFLAGS=`eval eval eval eval eval eval eval eval eval echo $LDFLAGS`
15541  as_ac_Lib=`$as_echo "ac_cv_lib_$gl_lib_1''_gluBuild2DMipmaps" | $as_tr_sh`
15542{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for gluBuild2DMipmaps in -l$gl_lib_1" >&5
15543$as_echo_n "checking for gluBuild2DMipmaps in -l$gl_lib_1... " >&6; }
15544if eval \${$as_ac_Lib+:} false; then :
15545  $as_echo_n "(cached) " >&6
15546else
15547  ac_check_lib_save_LIBS=$LIBS
15548LIBS="-l$gl_lib_1 $GL_LIBS -lm $LIBS"
15549cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15550/* end confdefs.h.  */
15551
15552/* Override any GCC internal prototype to avoid an error.
15553   Use char because int might match the return type of a GCC
15554   builtin and then its argument prototype would still apply.  */
15555#ifdef __cplusplus
15556extern "C"
15557#endif
15558char gluBuild2DMipmaps ();
15559int
15560main ()
15561{
15562return gluBuild2DMipmaps ();
15563  ;
15564  return 0;
15565}
15566_ACEOF
15567if ac_fn_c_try_link "$LINENO"; then :
15568  eval "$as_ac_Lib=yes"
15569else
15570  eval "$as_ac_Lib=no"
15571fi
15572rm -f core conftest.err conftest.$ac_objext \
15573    conftest$ac_exeext conftest.$ac_ext
15574LIBS=$ac_check_lib_save_LIBS
15575fi
15576eval ac_res=\$$as_ac_Lib
15577	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
15578$as_echo "$ac_res" >&6; }
15579if eval test \"x\$"$as_ac_Lib"\" = x"yes"; then :
15580  cat >>confdefs.h <<_ACEOF
15581#define `$as_echo "HAVE_LIB$gl_lib_1" | $as_tr_cpp` 1
15582_ACEOF
15583
15584  LIBS="-l$gl_lib_1 $LIBS"
15585
15586else
15587  have_gl=no
15588fi
15589
15590  CPPFLAGS="$ac_save_CPPFLAGS"
15591  LDFLAGS="$ac_save_LDFLAGS"
15592#  LIBS="$ac_save_LIBS"
15593
15594    if test "$have_gl" = no; then
15595
15596  ac_save_CPPFLAGS="$CPPFLAGS"
15597  ac_save_LDFLAGS="$LDFLAGS"
15598#  ac_save_LIBS="$LIBS"
15599
15600  if test \! -z "$includedir" ; then
15601    CPPFLAGS="$CPPFLAGS -I$includedir"
15602  fi
15603  # note: $X_CFLAGS includes $x_includes
15604  CPPFLAGS="$CPPFLAGS $X_CFLAGS"
15605
15606  if test \! -z "$libdir" ; then
15607    LDFLAGS="$LDFLAGS -L$libdir"
15608  fi
15609  # note: $X_LIBS includes $x_libraries
15610  LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
15611
15612  CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
15613  LDFLAGS=`eval eval eval eval eval eval eval eval eval echo $LDFLAGS`
15614  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gluBuild2DMipmaps in -lGLU" >&5
15615$as_echo_n "checking for gluBuild2DMipmaps in -lGLU... " >&6; }
15616if ${ac_cv_lib_GLU_gluBuild2DMipmaps+:} false; then :
15617  $as_echo_n "(cached) " >&6
15618else
15619  ac_check_lib_save_LIBS=$LIBS
15620LIBS="-lGLU $GL_LIBS -lm $LIBS"
15621cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15622/* end confdefs.h.  */
15623
15624/* Override any GCC internal prototype to avoid an error.
15625   Use char because int might match the return type of a GCC
15626   builtin and then its argument prototype would still apply.  */
15627#ifdef __cplusplus
15628extern "C"
15629#endif
15630char gluBuild2DMipmaps ();
15631int
15632main ()
15633{
15634return gluBuild2DMipmaps ();
15635  ;
15636  return 0;
15637}
15638_ACEOF
15639if ac_fn_c_try_link "$LINENO"; then :
15640  ac_cv_lib_GLU_gluBuild2DMipmaps=yes
15641else
15642  ac_cv_lib_GLU_gluBuild2DMipmaps=no
15643fi
15644rm -f core conftest.err conftest.$ac_objext \
15645    conftest$ac_exeext conftest.$ac_ext
15646LIBS=$ac_check_lib_save_LIBS
15647fi
15648{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_GLU_gluBuild2DMipmaps" >&5
15649$as_echo "$ac_cv_lib_GLU_gluBuild2DMipmaps" >&6; }
15650if test "x$ac_cv_lib_GLU_gluBuild2DMipmaps" = xyes; then :
15651  have_gl=yes
15652                      GL_LIBS="-lGLU $GL_LIBS"
15653else
15654  have_gl=no
15655                      gl_halfassed=yes
15656fi
15657
15658  CPPFLAGS="$ac_save_CPPFLAGS"
15659  LDFLAGS="$ac_save_LDFLAGS"
15660#  LIBS="$ac_save_LIBS"
15661
15662    fi
15663  fi
15664
15665  if test "$have_gl" = yes; then
15666
15667    $as_echo "#define HAVE_GL 1" >>confdefs.h
15668
15669
15670    # OpenGL 1.0 didn't have multiple textures.
15671
15672  ac_save_CPPFLAGS="$CPPFLAGS"
15673  ac_save_LDFLAGS="$LDFLAGS"
15674#  ac_save_LIBS="$LIBS"
15675
15676  if test \! -z "$includedir" ; then
15677    CPPFLAGS="$CPPFLAGS -I$includedir"
15678  fi
15679  # note: $X_CFLAGS includes $x_includes
15680  CPPFLAGS="$CPPFLAGS $X_CFLAGS"
15681
15682  if test \! -z "$libdir" ; then
15683    LDFLAGS="$LDFLAGS -L$libdir"
15684  fi
15685  # note: $X_LIBS includes $x_libraries
15686  LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
15687
15688  CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
15689  LDFLAGS=`eval eval eval eval eval eval eval eval eval echo $LDFLAGS`
15690  as_ac_Lib=`$as_echo "ac_cv_lib_$gl_lib_1''_glBindTexture" | $as_tr_sh`
15691{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for glBindTexture in -l$gl_lib_1" >&5
15692$as_echo_n "checking for glBindTexture in -l$gl_lib_1... " >&6; }
15693if eval \${$as_ac_Lib+:} false; then :
15694  $as_echo_n "(cached) " >&6
15695else
15696  ac_check_lib_save_LIBS=$LIBS
15697LIBS="-l$gl_lib_1 $GL_LIBS -lX11 -lXext -lm $LIBS"
15698cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15699/* end confdefs.h.  */
15700
15701/* Override any GCC internal prototype to avoid an error.
15702   Use char because int might match the return type of a GCC
15703   builtin and then its argument prototype would still apply.  */
15704#ifdef __cplusplus
15705extern "C"
15706#endif
15707char glBindTexture ();
15708int
15709main ()
15710{
15711return glBindTexture ();
15712  ;
15713  return 0;
15714}
15715_ACEOF
15716if ac_fn_c_try_link "$LINENO"; then :
15717  eval "$as_ac_Lib=yes"
15718else
15719  eval "$as_ac_Lib=no"
15720fi
15721rm -f core conftest.err conftest.$ac_objext \
15722    conftest$ac_exeext conftest.$ac_ext
15723LIBS=$ac_check_lib_save_LIBS
15724fi
15725eval ac_res=\$$as_ac_Lib
15726	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
15727$as_echo "$ac_res" >&6; }
15728if eval test \"x\$"$as_ac_Lib"\" = x"yes"; then :
15729  $as_echo "#define HAVE_GLBINDTEXTURE 1" >>confdefs.h
15730
15731else
15732  true
15733fi
15734
15735  CPPFLAGS="$ac_save_CPPFLAGS"
15736  LDFLAGS="$ac_save_LDFLAGS"
15737#  LIBS="$ac_save_LIBS"
15738
15739
15740    # Check for native GLES1
15741
15742  ac_save_CPPFLAGS="$CPPFLAGS"
15743  ac_save_LDFLAGS="$LDFLAGS"
15744#  ac_save_LIBS="$LIBS"
15745
15746  if test \! -z "$includedir" ; then
15747    CPPFLAGS="$CPPFLAGS -I$includedir"
15748  fi
15749  # note: $X_CFLAGS includes $x_includes
15750  CPPFLAGS="$CPPFLAGS $X_CFLAGS"
15751
15752  if test \! -z "$libdir" ; then
15753    LDFLAGS="$LDFLAGS -L$libdir"
15754  fi
15755  # note: $X_LIBS includes $x_libraries
15756  LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
15757
15758  CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
15759  LDFLAGS=`eval eval eval eval eval eval eval eval eval echo $LDFLAGS`
15760  as_ac_Lib=`$as_echo "ac_cv_lib_$gl_lib_1''_glBindBuffer" | $as_tr_sh`
15761{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for glBindBuffer in -l$gl_lib_1" >&5
15762$as_echo_n "checking for glBindBuffer in -l$gl_lib_1... " >&6; }
15763if eval \${$as_ac_Lib+:} false; then :
15764  $as_echo_n "(cached) " >&6
15765else
15766  ac_check_lib_save_LIBS=$LIBS
15767LIBS="-l$gl_lib_1 $GL_LIBS -lX11 -lXext -lm $LIBS"
15768cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15769/* end confdefs.h.  */
15770
15771/* Override any GCC internal prototype to avoid an error.
15772   Use char because int might match the return type of a GCC
15773   builtin and then its argument prototype would still apply.  */
15774#ifdef __cplusplus
15775extern "C"
15776#endif
15777char glBindBuffer ();
15778int
15779main ()
15780{
15781return glBindBuffer ();
15782  ;
15783  return 0;
15784}
15785_ACEOF
15786if ac_fn_c_try_link "$LINENO"; then :
15787  eval "$as_ac_Lib=yes"
15788else
15789  eval "$as_ac_Lib=no"
15790fi
15791rm -f core conftest.err conftest.$ac_objext \
15792    conftest$ac_exeext conftest.$ac_ext
15793LIBS=$ac_check_lib_save_LIBS
15794fi
15795eval ac_res=\$$as_ac_Lib
15796	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
15797$as_echo "$ac_res" >&6; }
15798if eval test \"x\$"$as_ac_Lib"\" = x"yes"; then :
15799  $as_echo "#define HAVE_GLES 1" >>confdefs.h
15800
15801else
15802  true
15803fi
15804
15805  CPPFLAGS="$ac_save_CPPFLAGS"
15806  LDFLAGS="$ac_save_LDFLAGS"
15807#  LIBS="$ac_save_LIBS"
15808
15809
15810    # Check for GLSL and GLES2
15811
15812  ac_save_CPPFLAGS="$CPPFLAGS"
15813  if test \! -z "$includedir" ; then
15814    CPPFLAGS="$CPPFLAGS -I$includedir"
15815  fi
15816  CPPFLAGS="$CPPFLAGS $X_CFLAGS"
15817  CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
15818  ac_fn_c_check_header_compile "$LINENO" "GL/glext.h" "ac_cv_header_GL_glext_h" "#include <GL/gl.h>
15819"
15820if test "x$ac_cv_header_GL_glext_h" = xyes; then :
15821  have_glext=yes
15822else
15823  have_glext=no
15824fi
15825
15826
15827  CPPFLAGS="$ac_save_CPPFLAGS"
15828    if test "$have_glext" = yes ; then
15829
15830  ac_save_CPPFLAGS="$CPPFLAGS"
15831  ac_save_LDFLAGS="$LDFLAGS"
15832#  ac_save_LIBS="$LIBS"
15833
15834  if test \! -z "$includedir" ; then
15835    CPPFLAGS="$CPPFLAGS -I$includedir"
15836  fi
15837  # note: $X_CFLAGS includes $x_includes
15838  CPPFLAGS="$CPPFLAGS $X_CFLAGS"
15839
15840  if test \! -z "$libdir" ; then
15841    LDFLAGS="$LDFLAGS -L$libdir"
15842  fi
15843  # note: $X_LIBS includes $x_libraries
15844  LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
15845
15846  CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
15847  LDFLAGS=`eval eval eval eval eval eval eval eval eval echo $LDFLAGS`
15848  as_ac_Lib=`$as_echo "ac_cv_lib_$gl_lib_1''_glUseProgram" | $as_tr_sh`
15849{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for glUseProgram in -l$gl_lib_1" >&5
15850$as_echo_n "checking for glUseProgram in -l$gl_lib_1... " >&6; }
15851if eval \${$as_ac_Lib+:} false; then :
15852  $as_echo_n "(cached) " >&6
15853else
15854  ac_check_lib_save_LIBS=$LIBS
15855LIBS="-l$gl_lib_1 $GL_LIBS -lX11 -lXext -lm $LIBS"
15856cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15857/* end confdefs.h.  */
15858
15859/* Override any GCC internal prototype to avoid an error.
15860   Use char because int might match the return type of a GCC
15861   builtin and then its argument prototype would still apply.  */
15862#ifdef __cplusplus
15863extern "C"
15864#endif
15865char glUseProgram ();
15866int
15867main ()
15868{
15869return glUseProgram ();
15870  ;
15871  return 0;
15872}
15873_ACEOF
15874if ac_fn_c_try_link "$LINENO"; then :
15875  eval "$as_ac_Lib=yes"
15876else
15877  eval "$as_ac_Lib=no"
15878fi
15879rm -f core conftest.err conftest.$ac_objext \
15880    conftest$ac_exeext conftest.$ac_ext
15881LIBS=$ac_check_lib_save_LIBS
15882fi
15883eval ac_res=\$$as_ac_Lib
15884	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
15885$as_echo "$ac_res" >&6; }
15886if eval test \"x\$"$as_ac_Lib"\" = x"yes"; then :
15887  $as_echo "#define HAVE_GLSL 1" >>confdefs.h
15888
15889                      $as_echo "#define HAVE_GLES2 1" >>confdefs.h
15890
15891fi
15892
15893  CPPFLAGS="$ac_save_CPPFLAGS"
15894  LDFLAGS="$ac_save_LDFLAGS"
15895#  LIBS="$ac_save_LIBS"
15896
15897    fi
15898
15899    # Check for GLES3
15900
15901  ac_save_CPPFLAGS="$CPPFLAGS"
15902  ac_save_LDFLAGS="$LDFLAGS"
15903#  ac_save_LIBS="$LIBS"
15904
15905  if test \! -z "$includedir" ; then
15906    CPPFLAGS="$CPPFLAGS -I$includedir"
15907  fi
15908  # note: $X_CFLAGS includes $x_includes
15909  CPPFLAGS="$CPPFLAGS $X_CFLAGS"
15910
15911  if test \! -z "$libdir" ; then
15912    LDFLAGS="$LDFLAGS -L$libdir"
15913  fi
15914  # note: $X_LIBS includes $x_libraries
15915  LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
15916
15917  CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
15918  LDFLAGS=`eval eval eval eval eval eval eval eval eval echo $LDFLAGS`
15919  as_ac_Lib=`$as_echo "ac_cv_lib_$gl_lib_1''_glBlitFramebuffer" | $as_tr_sh`
15920{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for glBlitFramebuffer in -l$gl_lib_1" >&5
15921$as_echo_n "checking for glBlitFramebuffer in -l$gl_lib_1... " >&6; }
15922if eval \${$as_ac_Lib+:} false; then :
15923  $as_echo_n "(cached) " >&6
15924else
15925  ac_check_lib_save_LIBS=$LIBS
15926LIBS="-l$gl_lib_1 $GL_LIBS -lX11 -lXext -lm $LIBS"
15927cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15928/* end confdefs.h.  */
15929
15930/* Override any GCC internal prototype to avoid an error.
15931   Use char because int might match the return type of a GCC
15932   builtin and then its argument prototype would still apply.  */
15933#ifdef __cplusplus
15934extern "C"
15935#endif
15936char glBlitFramebuffer ();
15937int
15938main ()
15939{
15940return glBlitFramebuffer ();
15941  ;
15942  return 0;
15943}
15944_ACEOF
15945if ac_fn_c_try_link "$LINENO"; then :
15946  eval "$as_ac_Lib=yes"
15947else
15948  eval "$as_ac_Lib=no"
15949fi
15950rm -f core conftest.err conftest.$ac_objext \
15951    conftest$ac_exeext conftest.$ac_ext
15952LIBS=$ac_check_lib_save_LIBS
15953fi
15954eval ac_res=\$$as_ac_Lib
15955	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
15956$as_echo "$ac_res" >&6; }
15957if eval test \"x\$"$as_ac_Lib"\" = x"yes"; then :
15958  $as_echo "#define HAVE_GLES3 1" >>confdefs.h
15959
15960fi
15961
15962  CPPFLAGS="$ac_save_CPPFLAGS"
15963  LDFLAGS="$ac_save_LDFLAGS"
15964#  LIBS="$ac_save_LIBS"
15965
15966
15967    if test "$have_jwzgles" = yes; then
15968      $as_echo "#define HAVE_JWZGLES 1" >>confdefs.h
15969
15970      $as_echo "#define HAVE_GLES 1" >>confdefs.h
15971
15972    fi
15973
15974  fi
15975
15976
15977elif test "$with_gl" != no; then
15978  echo "error: must be yes or no: --with-gl=$with_gl"
15979  exit 1
15980fi
15981
15982
15983###############################################################################
15984#
15985#       Handle --with-glx
15986#
15987###############################################################################
15988
15989have_glx=no
15990have_egl=no
15991with_egl_req=unspecified
15992
15993# Check whether --with-glx was given.
15994if test "${with_glx+set}" = set; then :
15995  withval=$with_glx; with_egl="$withval"; with_egl_req="$withval"
15996else
15997  with_glx=no
15998fi
15999
16000
16001
16002   case "$with_glx" in
16003    yes) ;;
16004    no)  ;;
16005
16006    /*)
16007     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GLX headers" >&5
16008$as_echo_n "checking for GLX headers... " >&6; }
16009     d=$with_glx/include
16010     if test -d $d; then
16011       X_CFLAGS="-I$d $X_CFLAGS"
16012       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $d" >&5
16013$as_echo "$d" >&6; }
16014     else
16015       { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found ($d: no such directory)" >&5
16016$as_echo "not found ($d: no such directory)" >&6; }
16017     fi
16018
16019     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GLX libs" >&5
16020$as_echo_n "checking for GLX libs... " >&6; }
16021     d=$with_glx/lib
16022     if test -d $d; then
16023       X_LIBS="-L$d $X_LIBS"
16024       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $d" >&5
16025$as_echo "$d" >&6; }
16026     else
16027       { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found ($d: no such directory)" >&5
16028$as_echo "not found ($d: no such directory)" >&6; }
16029     fi
16030
16031     # replace the directory string with "yes".
16032     with_glx_req="yes"
16033     with_glx=$with_glx_req
16034     ;;
16035
16036    *)
16037     echo ""
16038     echo "error: argument to --with-glx must be \"yes\", \"no\", or a directory."
16039     echo "       If it is a directory, then \`DIR/include' will be added to"
16040     echo "       the -I list, and \`DIR/lib' will be added to the -L list."
16041     exit 1
16042     ;;
16043   esac
16044
16045
16046if test "$with_glx" = yes; then
16047
16048  ac_save_CPPFLAGS="$CPPFLAGS"
16049  if test \! -z "$includedir" ; then
16050    CPPFLAGS="$CPPFLAGS -I$includedir"
16051  fi
16052  CPPFLAGS="$CPPFLAGS $X_CFLAGS"
16053  CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
16054  ac_fn_c_check_header_mongrel "$LINENO" "GLX/glx.h" "ac_cv_header_GLX_glx_h" "$ac_includes_default"
16055if test "x$ac_cv_header_GLX_glx_h" = xyes; then :
16056  have_glx=yes
16057else
16058  have_glx=no
16059fi
16060
16061
16062  CPPFLAGS="$ac_save_CPPFLAGS"
16063elif test "$with_glx" != no; then
16064  echo "error: must be yes or no: --with-glx=$with_glx"
16065  exit 1
16066fi
16067
16068if test "$have_gl" = yes; then
16069
16070  # See if GLX functions are in -LGL.
16071
16072  ac_save_CPPFLAGS="$CPPFLAGS"
16073  ac_save_LDFLAGS="$LDFLAGS"
16074#  ac_save_LIBS="$LIBS"
16075
16076  if test \! -z "$includedir" ; then
16077    CPPFLAGS="$CPPFLAGS -I$includedir"
16078  fi
16079  # note: $X_CFLAGS includes $x_includes
16080  CPPFLAGS="$CPPFLAGS $X_CFLAGS"
16081
16082  if test \! -z "$libdir" ; then
16083    LDFLAGS="$LDFLAGS -L$libdir"
16084  fi
16085  # note: $X_LIBS includes $x_libraries
16086  LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
16087
16088  CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
16089  LDFLAGS=`eval eval eval eval eval eval eval eval eval echo $LDFLAGS`
16090  as_ac_Lib=`$as_echo "ac_cv_lib_$gl_lib_1''_glXCreateContext" | $as_tr_sh`
16091{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for glXCreateContext in -l$gl_lib_1" >&5
16092$as_echo_n "checking for glXCreateContext in -l$gl_lib_1... " >&6; }
16093if eval \${$as_ac_Lib+:} false; then :
16094  $as_echo_n "(cached) " >&6
16095else
16096  ac_check_lib_save_LIBS=$LIBS
16097LIBS="-l$gl_lib_1 $GL_LIBS -lm $LIBS"
16098cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16099/* end confdefs.h.  */
16100
16101/* Override any GCC internal prototype to avoid an error.
16102   Use char because int might match the return type of a GCC
16103   builtin and then its argument prototype would still apply.  */
16104#ifdef __cplusplus
16105extern "C"
16106#endif
16107char glXCreateContext ();
16108int
16109main ()
16110{
16111return glXCreateContext ();
16112  ;
16113  return 0;
16114}
16115_ACEOF
16116if ac_fn_c_try_link "$LINENO"; then :
16117  eval "$as_ac_Lib=yes"
16118else
16119  eval "$as_ac_Lib=no"
16120fi
16121rm -f core conftest.err conftest.$ac_objext \
16122    conftest$ac_exeext conftest.$ac_ext
16123LIBS=$ac_check_lib_save_LIBS
16124fi
16125eval ac_res=\$$as_ac_Lib
16126	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
16127$as_echo "$ac_res" >&6; }
16128if eval test \"x\$"$as_ac_Lib"\" = x"yes"; then :
16129  have_glx=yes
16130else
16131  have_glx=no
16132fi
16133
16134  CPPFLAGS="$ac_save_CPPFLAGS"
16135  LDFLAGS="$ac_save_LDFLAGS"
16136#  LIBS="$ac_save_LIBS"
16137
16138
16139  # See if EGL functions are in -LGL.
16140  egl_lib=""
16141
16142  ac_save_CPPFLAGS="$CPPFLAGS"
16143  ac_save_LDFLAGS="$LDFLAGS"
16144#  ac_save_LIBS="$LIBS"
16145
16146  if test \! -z "$includedir" ; then
16147    CPPFLAGS="$CPPFLAGS -I$includedir"
16148  fi
16149  # note: $X_CFLAGS includes $x_includes
16150  CPPFLAGS="$CPPFLAGS $X_CFLAGS"
16151
16152  if test \! -z "$libdir" ; then
16153    LDFLAGS="$LDFLAGS -L$libdir"
16154  fi
16155  # note: $X_LIBS includes $x_libraries
16156  LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
16157
16158  CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
16159  LDFLAGS=`eval eval eval eval eval eval eval eval eval echo $LDFLAGS`
16160  as_ac_Lib=`$as_echo "ac_cv_lib_$gl_lib_1''_eglCreatePlatformWindowSurface" | $as_tr_sh`
16161{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for eglCreatePlatformWindowSurface in -l$gl_lib_1" >&5
16162$as_echo_n "checking for eglCreatePlatformWindowSurface in -l$gl_lib_1... " >&6; }
16163if eval \${$as_ac_Lib+:} false; then :
16164  $as_echo_n "(cached) " >&6
16165else
16166  ac_check_lib_save_LIBS=$LIBS
16167LIBS="-l$gl_lib_1 $GL_LIBS -lm $LIBS"
16168cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16169/* end confdefs.h.  */
16170
16171/* Override any GCC internal prototype to avoid an error.
16172   Use char because int might match the return type of a GCC
16173   builtin and then its argument prototype would still apply.  */
16174#ifdef __cplusplus
16175extern "C"
16176#endif
16177char eglCreatePlatformWindowSurface ();
16178int
16179main ()
16180{
16181return eglCreatePlatformWindowSurface ();
16182  ;
16183  return 0;
16184}
16185_ACEOF
16186if ac_fn_c_try_link "$LINENO"; then :
16187  eval "$as_ac_Lib=yes"
16188else
16189  eval "$as_ac_Lib=no"
16190fi
16191rm -f core conftest.err conftest.$ac_objext \
16192    conftest$ac_exeext conftest.$ac_ext
16193LIBS=$ac_check_lib_save_LIBS
16194fi
16195eval ac_res=\$$as_ac_Lib
16196	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
16197$as_echo "$ac_res" >&6; }
16198if eval test \"x\$"$as_ac_Lib"\" = x"yes"; then :
16199  have_egl=yes
16200else
16201  have_egl=no
16202fi
16203
16204  CPPFLAGS="$ac_save_CPPFLAGS"
16205  LDFLAGS="$ac_save_LDFLAGS"
16206#  LIBS="$ac_save_LIBS"
16207
16208  if test "$have_egl" = no; then
16209    # See if EGL functions are in -lEGL.
16210
16211  ac_save_CPPFLAGS="$CPPFLAGS"
16212  ac_save_LDFLAGS="$LDFLAGS"
16213#  ac_save_LIBS="$LIBS"
16214
16215  if test \! -z "$includedir" ; then
16216    CPPFLAGS="$CPPFLAGS -I$includedir"
16217  fi
16218  # note: $X_CFLAGS includes $x_includes
16219  CPPFLAGS="$CPPFLAGS $X_CFLAGS"
16220
16221  if test \! -z "$libdir" ; then
16222    LDFLAGS="$LDFLAGS -L$libdir"
16223  fi
16224  # note: $X_LIBS includes $x_libraries
16225  LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
16226
16227  CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
16228  LDFLAGS=`eval eval eval eval eval eval eval eval eval echo $LDFLAGS`
16229  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for eglCreatePlatformWindowSurface in -lEGL" >&5
16230$as_echo_n "checking for eglCreatePlatformWindowSurface in -lEGL... " >&6; }
16231if ${ac_cv_lib_EGL_eglCreatePlatformWindowSurface+:} false; then :
16232  $as_echo_n "(cached) " >&6
16233else
16234  ac_check_lib_save_LIBS=$LIBS
16235LIBS="-lEGL $GL_LIBS -lm $LIBS"
16236cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16237/* end confdefs.h.  */
16238
16239/* Override any GCC internal prototype to avoid an error.
16240   Use char because int might match the return type of a GCC
16241   builtin and then its argument prototype would still apply.  */
16242#ifdef __cplusplus
16243extern "C"
16244#endif
16245char eglCreatePlatformWindowSurface ();
16246int
16247main ()
16248{
16249return eglCreatePlatformWindowSurface ();
16250  ;
16251  return 0;
16252}
16253_ACEOF
16254if ac_fn_c_try_link "$LINENO"; then :
16255  ac_cv_lib_EGL_eglCreatePlatformWindowSurface=yes
16256else
16257  ac_cv_lib_EGL_eglCreatePlatformWindowSurface=no
16258fi
16259rm -f core conftest.err conftest.$ac_objext \
16260    conftest$ac_exeext conftest.$ac_ext
16261LIBS=$ac_check_lib_save_LIBS
16262fi
16263{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_EGL_eglCreatePlatformWindowSurface" >&5
16264$as_echo "$ac_cv_lib_EGL_eglCreatePlatformWindowSurface" >&6; }
16265if test "x$ac_cv_lib_EGL_eglCreatePlatformWindowSurface" = xyes; then :
16266  have_egl=yes
16267                    egl_lib="EGL"
16268else
16269  have_egl=no
16270fi
16271
16272  CPPFLAGS="$ac_save_CPPFLAGS"
16273  LDFLAGS="$ac_save_LDFLAGS"
16274#  LIBS="$ac_save_LIBS"
16275
16276  fi
16277
16278  # If both GLX and EGL exist, use GLX only if requested.
16279  if test "$with_glx" = yes -a "$have_glx" = yes; then
16280    have_egl=no
16281  fi
16282
16283  if test "$have_egl" = yes; then
16284    $as_echo "#define HAVE_EGL 1" >>confdefs.h
16285
16286    if test \! -z "$egl_lib"; then
16287      GL_LIBS="-l$egl_lib $GL_LIBS"
16288    fi
16289  fi
16290
16291  # One of them is required
16292  if test "$have_egl" = no -a "$have_glx" = no; then
16293    have_gl=no
16294    gl_halfassed=yes
16295  fi
16296
16297  # --with-gles means that we are emulating a system that supports GLES but
16298  # does not support OpenGL 1.3 (e.g., using Linux to simulate an Android-like
16299  # environment).  On such a system, GLE is required and GLX wouldn't exist.
16300  # There is no way to request a GLES 3.0 runtime context using GLX.
16301  #
16302  if test "$have_jwzgles" = yes -a "$have_egl" = no; then
16303    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Using --with-glx and --with-gles together is a bad idea." >&5
16304$as_echo "$as_me: WARNING: Using --with-glx and --with-gles together is a bad idea." >&2;}
16305  fi
16306
16307fi
16308
16309
16310# Restore flags after testing OpenGL libraries.
16311#
16312CFLAGS="$ac_save_pthreads_CFLAGS"
16313LIBS="$ac_save_pthreads_LIBS"
16314
16315
16316###############################################################################
16317#
16318#       Check for -lgle.
16319#
16320###############################################################################
16321
16322have_gle=no
16323with_gle_req=unspecified
16324gle_halfassed=no
16325
16326# Check whether --with-gle was given.
16327if test "${with_gle+set}" = set; then :
16328  withval=$with_gle; with_gle="$withval"; with_gle_req="$withval"
16329else
16330  with_gle=yes
16331fi
16332
16333
16334
16335   case "$with_gle" in
16336    yes) ;;
16337    no)  ;;
16338
16339    /*)
16340     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GLE headers" >&5
16341$as_echo_n "checking for GLE headers... " >&6; }
16342     d=$with_gle/include
16343     if test -d $d; then
16344       X_CFLAGS="-I$d $X_CFLAGS"
16345       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $d" >&5
16346$as_echo "$d" >&6; }
16347     else
16348       { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found ($d: no such directory)" >&5
16349$as_echo "not found ($d: no such directory)" >&6; }
16350     fi
16351
16352     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GLE libs" >&5
16353$as_echo_n "checking for GLE libs... " >&6; }
16354     d=$with_gle/lib
16355     if test -d $d; then
16356       X_LIBS="-L$d $X_LIBS"
16357       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $d" >&5
16358$as_echo "$d" >&6; }
16359     else
16360       { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found ($d: no such directory)" >&5
16361$as_echo "not found ($d: no such directory)" >&6; }
16362     fi
16363
16364     # replace the directory string with "yes".
16365     with_gle_req="yes"
16366     with_gle=$with_gle_req
16367     ;;
16368
16369    *)
16370     echo ""
16371     echo "error: argument to --with-gle must be \"yes\", \"no\", or a directory."
16372     echo "       If it is a directory, then \`DIR/include' will be added to"
16373     echo "       the -I list, and \`DIR/lib' will be added to the -L list."
16374     exit 1
16375     ;;
16376   esac
16377
16378
16379GLE_LIBS=""
16380
16381if test "$have_gl" = no ; then
16382 true
16383elif test "$with_gle" = yes; then
16384
16385
16386  ac_save_CPPFLAGS="$CPPFLAGS"
16387  if test \! -z "$includedir" ; then
16388    CPPFLAGS="$CPPFLAGS -I$includedir"
16389  fi
16390  CPPFLAGS="$CPPFLAGS $X_CFLAGS"
16391  CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
16392  ac_fn_c_check_header_compile "$LINENO" "GL/gle.h" "ac_cv_header_GL_gle_h" "#include <GL/gl.h>
16393"
16394if test "x$ac_cv_header_GL_gle_h" = xyes; then :
16395  have_gle3=yes
16396else
16397  have_gle3=no
16398fi
16399
16400
16401  CPPFLAGS="$ac_save_CPPFLAGS"
16402  if test "$have_gle3" = yes ; then
16403    have_gle=yes;
16404  else
16405
16406  ac_save_CPPFLAGS="$CPPFLAGS"
16407  if test \! -z "$includedir" ; then
16408    CPPFLAGS="$CPPFLAGS -I$includedir"
16409  fi
16410  CPPFLAGS="$CPPFLAGS $X_CFLAGS"
16411  CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
16412  ac_fn_c_check_header_compile "$LINENO" "GL/gutil.h" "ac_cv_header_GL_gutil_h" "#include <GL/gl.h>
16413"
16414if test "x$ac_cv_header_GL_gutil_h" = xyes; then :
16415  have_gle=yes
16416else
16417  have_gle=no
16418fi
16419
16420
16421  CPPFLAGS="$ac_save_CPPFLAGS"
16422    if test "$have_gle" = yes ; then
16423
16424  ac_save_CPPFLAGS="$CPPFLAGS"
16425  if test \! -z "$includedir" ; then
16426    CPPFLAGS="$CPPFLAGS -I$includedir"
16427  fi
16428  CPPFLAGS="$CPPFLAGS $X_CFLAGS"
16429  CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
16430  ac_fn_c_check_header_compile "$LINENO" "GL/tube.h" "ac_cv_header_GL_tube_h" "#include <GL/gl.h>
16431"
16432if test "x$ac_cv_header_GL_tube_h" = xyes; then :
16433  have_gle=yes
16434else
16435  have_gle=no
16436fi
16437
16438
16439  CPPFLAGS="$ac_save_CPPFLAGS"
16440    fi
16441  fi
16442
16443  if test "$have_gle" = yes ; then
16444    have_gle=no
16445    gle_halfassed=yes
16446
16447  ac_save_CPPFLAGS="$CPPFLAGS"
16448  ac_save_LDFLAGS="$LDFLAGS"
16449#  ac_save_LIBS="$LIBS"
16450
16451  if test \! -z "$includedir" ; then
16452    CPPFLAGS="$CPPFLAGS -I$includedir"
16453  fi
16454  # note: $X_CFLAGS includes $x_includes
16455  CPPFLAGS="$CPPFLAGS $X_CFLAGS"
16456
16457  if test \! -z "$libdir" ; then
16458    LDFLAGS="$LDFLAGS -L$libdir"
16459  fi
16460  # note: $X_LIBS includes $x_libraries
16461  LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
16462
16463  CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
16464  LDFLAGS=`eval eval eval eval eval eval eval eval eval echo $LDFLAGS`
16465  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gleCreateGC in -lgle" >&5
16466$as_echo_n "checking for gleCreateGC in -lgle... " >&6; }
16467if ${ac_cv_lib_gle_gleCreateGC+:} false; then :
16468  $as_echo_n "(cached) " >&6
16469else
16470  ac_check_lib_save_LIBS=$LIBS
16471LIBS="-lgle $GL_LIBS -lX11 -lXext -lm $LIBS"
16472cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16473/* end confdefs.h.  */
16474
16475/* Override any GCC internal prototype to avoid an error.
16476   Use char because int might match the return type of a GCC
16477   builtin and then its argument prototype would still apply.  */
16478#ifdef __cplusplus
16479extern "C"
16480#endif
16481char gleCreateGC ();
16482int
16483main ()
16484{
16485return gleCreateGC ();
16486  ;
16487  return 0;
16488}
16489_ACEOF
16490if ac_fn_c_try_link "$LINENO"; then :
16491  ac_cv_lib_gle_gleCreateGC=yes
16492else
16493  ac_cv_lib_gle_gleCreateGC=no
16494fi
16495rm -f core conftest.err conftest.$ac_objext \
16496    conftest$ac_exeext conftest.$ac_ext
16497LIBS=$ac_check_lib_save_LIBS
16498fi
16499{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_gle_gleCreateGC" >&5
16500$as_echo "$ac_cv_lib_gle_gleCreateGC" >&6; }
16501if test "x$ac_cv_lib_gle_gleCreateGC" = xyes; then :
16502  have_gle=yes; gle_halfassed=no; GLE_LIBS="-lgle"
16503fi
16504
16505  CPPFLAGS="$ac_save_CPPFLAGS"
16506  LDFLAGS="$ac_save_LDFLAGS"
16507#  LIBS="$ac_save_LIBS"
16508
16509  fi
16510  if test "$have_gle" = yes ; then
16511    have_gle=no
16512    gle_halfassed=yes
16513
16514    # sometimes the libmatrix stuff is included in libgle.  look there first.
16515#
16516# I don't get it.  For some reason, this test passes on SGI, as if
16517# uview_direction_d() was in libgle -- but it's not, it's in libmatrix.
16518# Yet the link is succeeding.  Why???
16519#
16520#    AC_CHECK_X_LIB(gle, uview_direction_d,
16521#                   [have_gle=yes; gle_halfassed=no],
16522#                   [], $GL_LIBS -lX11 -lXext -lm)
16523
16524    # As of GLE 3 this is in libgle, and has changed name to uview_direction!
16525    # *sigh*
16526    if test "$have_gle3" = yes ; then
16527
16528  ac_save_CPPFLAGS="$CPPFLAGS"
16529  ac_save_LDFLAGS="$LDFLAGS"
16530#  ac_save_LIBS="$LIBS"
16531
16532  if test \! -z "$includedir" ; then
16533    CPPFLAGS="$CPPFLAGS -I$includedir"
16534  fi
16535  # note: $X_CFLAGS includes $x_includes
16536  CPPFLAGS="$CPPFLAGS $X_CFLAGS"
16537
16538  if test \! -z "$libdir" ; then
16539    LDFLAGS="$LDFLAGS -L$libdir"
16540  fi
16541  # note: $X_LIBS includes $x_libraries
16542  LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
16543
16544  CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
16545  LDFLAGS=`eval eval eval eval eval eval eval eval eval echo $LDFLAGS`
16546  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for uview_direction in -lgle" >&5
16547$as_echo_n "checking for uview_direction in -lgle... " >&6; }
16548if ${ac_cv_lib_gle_uview_direction+:} false; then :
16549  $as_echo_n "(cached) " >&6
16550else
16551  ac_check_lib_save_LIBS=$LIBS
16552LIBS="-lgle $GL_LIBS -lX11 -lXext -lm $LIBS"
16553cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16554/* end confdefs.h.  */
16555
16556/* Override any GCC internal prototype to avoid an error.
16557   Use char because int might match the return type of a GCC
16558   builtin and then its argument prototype would still apply.  */
16559#ifdef __cplusplus
16560extern "C"
16561#endif
16562char uview_direction ();
16563int
16564main ()
16565{
16566return uview_direction ();
16567  ;
16568  return 0;
16569}
16570_ACEOF
16571if ac_fn_c_try_link "$LINENO"; then :
16572  ac_cv_lib_gle_uview_direction=yes
16573else
16574  ac_cv_lib_gle_uview_direction=no
16575fi
16576rm -f core conftest.err conftest.$ac_objext \
16577    conftest$ac_exeext conftest.$ac_ext
16578LIBS=$ac_check_lib_save_LIBS
16579fi
16580{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_gle_uview_direction" >&5
16581$as_echo "$ac_cv_lib_gle_uview_direction" >&6; }
16582if test "x$ac_cv_lib_gle_uview_direction" = xyes; then :
16583  have_gle=yes; gle_halfassed=no
16584fi
16585
16586  CPPFLAGS="$ac_save_CPPFLAGS"
16587  LDFLAGS="$ac_save_LDFLAGS"
16588#  LIBS="$ac_save_LIBS"
16589
16590    fi
16591    # if it wasn't in libgle, then look in libmatrix.
16592    if test "$have_gle" = no ; then
16593
16594  ac_save_CPPFLAGS="$CPPFLAGS"
16595  ac_save_LDFLAGS="$LDFLAGS"
16596#  ac_save_LIBS="$LIBS"
16597
16598  if test \! -z "$includedir" ; then
16599    CPPFLAGS="$CPPFLAGS -I$includedir"
16600  fi
16601  # note: $X_CFLAGS includes $x_includes
16602  CPPFLAGS="$CPPFLAGS $X_CFLAGS"
16603
16604  if test \! -z "$libdir" ; then
16605    LDFLAGS="$LDFLAGS -L$libdir"
16606  fi
16607  # note: $X_LIBS includes $x_libraries
16608  LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
16609
16610  CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
16611  LDFLAGS=`eval eval eval eval eval eval eval eval eval echo $LDFLAGS`
16612  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for uview_direction_d in -lmatrix" >&5
16613$as_echo_n "checking for uview_direction_d in -lmatrix... " >&6; }
16614if ${ac_cv_lib_matrix_uview_direction_d+:} false; then :
16615  $as_echo_n "(cached) " >&6
16616else
16617  ac_check_lib_save_LIBS=$LIBS
16618LIBS="-lmatrix $GL_LIBS -lX11 -lXext -lm $LIBS"
16619cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16620/* end confdefs.h.  */
16621
16622/* Override any GCC internal prototype to avoid an error.
16623   Use char because int might match the return type of a GCC
16624   builtin and then its argument prototype would still apply.  */
16625#ifdef __cplusplus
16626extern "C"
16627#endif
16628char uview_direction_d ();
16629int
16630main ()
16631{
16632return uview_direction_d ();
16633  ;
16634  return 0;
16635}
16636_ACEOF
16637if ac_fn_c_try_link "$LINENO"; then :
16638  ac_cv_lib_matrix_uview_direction_d=yes
16639else
16640  ac_cv_lib_matrix_uview_direction_d=no
16641fi
16642rm -f core conftest.err conftest.$ac_objext \
16643    conftest$ac_exeext conftest.$ac_ext
16644LIBS=$ac_check_lib_save_LIBS
16645fi
16646{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_matrix_uview_direction_d" >&5
16647$as_echo "$ac_cv_lib_matrix_uview_direction_d" >&6; }
16648if test "x$ac_cv_lib_matrix_uview_direction_d" = xyes; then :
16649  have_gle=yes; gle_halfassed=no;
16650                      GLE_LIBS="$GLE_LIBS -lmatrix"
16651fi
16652
16653  CPPFLAGS="$ac_save_CPPFLAGS"
16654  LDFLAGS="$ac_save_LDFLAGS"
16655#  LIBS="$ac_save_LIBS"
16656
16657    fi
16658  fi
16659
16660  if test "$have_gle" = yes ; then
16661    $as_echo "#define HAVE_GLE 1" >>confdefs.h
16662
16663    if test "$have_gle3" = yes ; then
16664      $as_echo "#define HAVE_GLE3 1" >>confdefs.h
16665
16666    fi
16667  fi
16668
16669elif test "$with_gle" != no; then
16670  echo "error: must be yes or no: --with-gle=$with_gle"
16671  exit 1
16672
16673fi
16674
16675
16676###############################################################################
16677#
16678#       Check for -ljpeg
16679#
16680###############################################################################
16681
16682have_jpeg=no
16683with_jpeg_req=unspecified
16684jpeg_halfassed=no
16685
16686# Check whether --with-jpeg was given.
16687if test "${with_jpeg+set}" = set; then :
16688  withval=$with_jpeg; with_jpeg="$withval"; with_jpeg_req="$withval"
16689else
16690  with_jpeg=yes
16691fi
16692
16693
16694
16695   case "$with_jpeg" in
16696    yes) ;;
16697    no)  ;;
16698
16699    /*)
16700     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JPEG headers" >&5
16701$as_echo_n "checking for JPEG headers... " >&6; }
16702     d=$with_jpeg/include
16703     if test -d $d; then
16704       X_CFLAGS="-I$d $X_CFLAGS"
16705       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $d" >&5
16706$as_echo "$d" >&6; }
16707     else
16708       { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found ($d: no such directory)" >&5
16709$as_echo "not found ($d: no such directory)" >&6; }
16710     fi
16711
16712     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JPEG libs" >&5
16713$as_echo_n "checking for JPEG libs... " >&6; }
16714     d=$with_jpeg/lib
16715     if test -d $d; then
16716       X_LIBS="-L$d $X_LIBS"
16717       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $d" >&5
16718$as_echo "$d" >&6; }
16719     else
16720       { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found ($d: no such directory)" >&5
16721$as_echo "not found ($d: no such directory)" >&6; }
16722     fi
16723
16724     # replace the directory string with "yes".
16725     with_jpeg_req="yes"
16726     with_jpeg=$with_jpeg_req
16727     ;;
16728
16729    *)
16730     echo ""
16731     echo "error: argument to --with-jpeg must be \"yes\", \"no\", or a directory."
16732     echo "       If it is a directory, then \`DIR/include' will be added to"
16733     echo "       the -I list, and \`DIR/lib' will be added to the -L list."
16734     exit 1
16735     ;;
16736   esac
16737
16738
16739if test "$with_jpeg" != yes -a "$with_jpeg" != no ; then
16740  echo "error: must be yes or no: --with-jpeg=$with_jpeg"
16741  exit 1
16742fi
16743
16744if test "$with_jpeg" = yes; then
16745
16746  have_jpeg=no
16747
16748  ac_save_CPPFLAGS="$CPPFLAGS"
16749  if test \! -z "$includedir" ; then
16750    CPPFLAGS="$CPPFLAGS -I$includedir"
16751  fi
16752  CPPFLAGS="$CPPFLAGS $X_CFLAGS"
16753  CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
16754  ac_fn_c_check_header_mongrel "$LINENO" "jpeglib.h" "ac_cv_header_jpeglib_h" "$ac_includes_default"
16755if test "x$ac_cv_header_jpeglib_h" = xyes; then :
16756  have_jpeg=yes
16757fi
16758
16759
16760  CPPFLAGS="$ac_save_CPPFLAGS"
16761
16762  if test "$have_jpeg" = yes; then
16763    # we have the header, now check for the library
16764    have_jpeg=no
16765    jpeg_halfassed=yes
16766
16767  ac_save_CPPFLAGS="$CPPFLAGS"
16768  ac_save_LDFLAGS="$LDFLAGS"
16769#  ac_save_LIBS="$LIBS"
16770
16771  if test \! -z "$includedir" ; then
16772    CPPFLAGS="$CPPFLAGS -I$includedir"
16773  fi
16774  # note: $X_CFLAGS includes $x_includes
16775  CPPFLAGS="$CPPFLAGS $X_CFLAGS"
16776
16777  if test \! -z "$libdir" ; then
16778    LDFLAGS="$LDFLAGS -L$libdir"
16779  fi
16780  # note: $X_LIBS includes $x_libraries
16781  LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
16782
16783  CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
16784  LDFLAGS=`eval eval eval eval eval eval eval eval eval echo $LDFLAGS`
16785  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jpeg_start_compress in -ljpeg" >&5
16786$as_echo_n "checking for jpeg_start_compress in -ljpeg... " >&6; }
16787if ${ac_cv_lib_jpeg_jpeg_start_compress+:} false; then :
16788  $as_echo_n "(cached) " >&6
16789else
16790  ac_check_lib_save_LIBS=$LIBS
16791LIBS="-ljpeg  $LIBS"
16792cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16793/* end confdefs.h.  */
16794
16795/* Override any GCC internal prototype to avoid an error.
16796   Use char because int might match the return type of a GCC
16797   builtin and then its argument prototype would still apply.  */
16798#ifdef __cplusplus
16799extern "C"
16800#endif
16801char jpeg_start_compress ();
16802int
16803main ()
16804{
16805return jpeg_start_compress ();
16806  ;
16807  return 0;
16808}
16809_ACEOF
16810if ac_fn_c_try_link "$LINENO"; then :
16811  ac_cv_lib_jpeg_jpeg_start_compress=yes
16812else
16813  ac_cv_lib_jpeg_jpeg_start_compress=no
16814fi
16815rm -f core conftest.err conftest.$ac_objext \
16816    conftest$ac_exeext conftest.$ac_ext
16817LIBS=$ac_check_lib_save_LIBS
16818fi
16819{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_jpeg_jpeg_start_compress" >&5
16820$as_echo "$ac_cv_lib_jpeg_jpeg_start_compress" >&6; }
16821if test "x$ac_cv_lib_jpeg_jpeg_start_compress" = xyes; then :
16822  have_jpeg=yes
16823                    jpeg_halfassed=no
16824                    JPEG_LIBS="-ljpeg"
16825                    $as_echo "#define HAVE_JPEGLIB 1" >>confdefs.h
16826
16827fi
16828
16829  CPPFLAGS="$ac_save_CPPFLAGS"
16830  LDFLAGS="$ac_save_LDFLAGS"
16831#  LIBS="$ac_save_LIBS"
16832
16833  fi
16834fi
16835
16836
16837###############################################################################
16838#
16839#       Check for -lpng
16840#
16841###############################################################################
16842
16843have_png=no
16844with_png_req=unspecified
16845png_halfassed=no
16846
16847# Check whether --with-png was given.
16848if test "${with_png+set}" = set; then :
16849  withval=$with_png; with_png="$withval"; with_png_req="$withval"
16850else
16851  with_png=yes
16852fi
16853
16854
16855
16856   case "$with_png" in
16857    yes) ;;
16858    no)  ;;
16859
16860    /*)
16861     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PNG headers" >&5
16862$as_echo_n "checking for PNG headers... " >&6; }
16863     d=$with_png/include
16864     if test -d $d; then
16865       X_CFLAGS="-I$d $X_CFLAGS"
16866       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $d" >&5
16867$as_echo "$d" >&6; }
16868     else
16869       { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found ($d: no such directory)" >&5
16870$as_echo "not found ($d: no such directory)" >&6; }
16871     fi
16872
16873     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PNG libs" >&5
16874$as_echo_n "checking for PNG libs... " >&6; }
16875     d=$with_png/lib
16876     if test -d $d; then
16877       X_LIBS="-L$d $X_LIBS"
16878       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $d" >&5
16879$as_echo "$d" >&6; }
16880     else
16881       { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found ($d: no such directory)" >&5
16882$as_echo "not found ($d: no such directory)" >&6; }
16883     fi
16884
16885     # replace the directory string with "yes".
16886     with_png_req="yes"
16887     with_png=$with_png_req
16888     ;;
16889
16890    *)
16891     echo ""
16892     echo "error: argument to --with-png must be \"yes\", \"no\", or a directory."
16893     echo "       If it is a directory, then \`DIR/include' will be added to"
16894     echo "       the -I list, and \`DIR/lib' will be added to the -L list."
16895     exit 1
16896     ;;
16897   esac
16898
16899
16900if test "$with_png" != yes -a "$with_png" != no ; then
16901  echo "error: must be yes or no: --with-png=$with_png"
16902  exit 1
16903fi
16904
16905if test "$with_png" = yes; then
16906
16907  have_png=no
16908
16909  ac_save_CPPFLAGS="$CPPFLAGS"
16910  if test \! -z "$includedir" ; then
16911    CPPFLAGS="$CPPFLAGS -I$includedir"
16912  fi
16913  CPPFLAGS="$CPPFLAGS $X_CFLAGS"
16914  CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
16915  ac_fn_c_check_header_mongrel "$LINENO" "png.h" "ac_cv_header_png_h" "$ac_includes_default"
16916if test "x$ac_cv_header_png_h" = xyes; then :
16917  have_png=yes
16918fi
16919
16920
16921  CPPFLAGS="$ac_save_CPPFLAGS"
16922
16923  if test "$have_png" = yes; then
16924    # we have the header, now check for the library
16925    have_png=no
16926    png_halfassed=yes
16927
16928  ac_save_CPPFLAGS="$CPPFLAGS"
16929  ac_save_LDFLAGS="$LDFLAGS"
16930#  ac_save_LIBS="$LIBS"
16931
16932  if test \! -z "$includedir" ; then
16933    CPPFLAGS="$CPPFLAGS -I$includedir"
16934  fi
16935  # note: $X_CFLAGS includes $x_includes
16936  CPPFLAGS="$CPPFLAGS $X_CFLAGS"
16937
16938  if test \! -z "$libdir" ; then
16939    LDFLAGS="$LDFLAGS -L$libdir"
16940  fi
16941  # note: $X_LIBS includes $x_libraries
16942  LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
16943
16944  CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
16945  LDFLAGS=`eval eval eval eval eval eval eval eval eval echo $LDFLAGS`
16946  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for png_create_read_struct in -lpng" >&5
16947$as_echo_n "checking for png_create_read_struct in -lpng... " >&6; }
16948if ${ac_cv_lib_png_png_create_read_struct+:} false; then :
16949  $as_echo_n "(cached) " >&6
16950else
16951  ac_check_lib_save_LIBS=$LIBS
16952LIBS="-lpng  $LIBS"
16953cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16954/* end confdefs.h.  */
16955
16956/* Override any GCC internal prototype to avoid an error.
16957   Use char because int might match the return type of a GCC
16958   builtin and then its argument prototype would still apply.  */
16959#ifdef __cplusplus
16960extern "C"
16961#endif
16962char png_create_read_struct ();
16963int
16964main ()
16965{
16966return png_create_read_struct ();
16967  ;
16968  return 0;
16969}
16970_ACEOF
16971if ac_fn_c_try_link "$LINENO"; then :
16972  ac_cv_lib_png_png_create_read_struct=yes
16973else
16974  ac_cv_lib_png_png_create_read_struct=no
16975fi
16976rm -f core conftest.err conftest.$ac_objext \
16977    conftest$ac_exeext conftest.$ac_ext
16978LIBS=$ac_check_lib_save_LIBS
16979fi
16980{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_png_png_create_read_struct" >&5
16981$as_echo "$ac_cv_lib_png_png_create_read_struct" >&6; }
16982if test "x$ac_cv_lib_png_png_create_read_struct" = xyes; then :
16983  have_png=yes
16984                    png_halfassed=no
16985                    PNG_LIBS="-lpng"
16986                    $as_echo "#define HAVE_LIBPNG 1" >>confdefs.h
16987
16988fi
16989
16990  CPPFLAGS="$ac_save_CPPFLAGS"
16991  LDFLAGS="$ac_save_LDFLAGS"
16992#  LIBS="$ac_save_LIBS"
16993
16994  fi
16995fi
16996
16997
16998###############################################################################
16999#
17000#       Check for -lgdk_pixbuf.
17001#       These tests are for gdk_pixbuf usage of the hacks,
17002#       not xscreensaver-settings (thus we have to test again to get
17003#       the libraries right: don't want to pull in all of GTK
17004#       for the hacks.)
17005#
17006###############################################################################
17007
17008have_gdk_pixbuf=no
17009with_gdk_pixbuf_req=unspecified
17010
17011# Check whether --with-pixbuf was given.
17012if test "${with_pixbuf+set}" = set; then :
17013  withval=$with_pixbuf; with_gdk_pixbuf="$withval"; with_gdk_pixbuf_req="$withval"
17014else
17015  with_gdk_pixbuf=yes
17016fi
17017
17018
17019# if --with-pixbuf=/directory/ was specified, remember that directory so that
17020# we can also look for the `gdk-pixbuf-config' program in that directory.
17021case "$with_gdk_pixbuf" in
17022  /*)
17023    gdk_pixbuf_dir="$with_gdk_pixbuf"
17024    ;;
17025  *)
17026    gdk_pixbuf_dir=""
17027    ;;
17028esac
17029
17030
17031   case "$with_gdk_pixbuf" in
17032    yes) ;;
17033    no)  ;;
17034
17035    /*)
17036     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GDK_PIXBUF headers" >&5
17037$as_echo_n "checking for GDK_PIXBUF headers... " >&6; }
17038     d=$with_gdk_pixbuf/include
17039     if test -d $d; then
17040       X_CFLAGS="-I$d $X_CFLAGS"
17041       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $d" >&5
17042$as_echo "$d" >&6; }
17043     else
17044       { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found ($d: no such directory)" >&5
17045$as_echo "not found ($d: no such directory)" >&6; }
17046     fi
17047
17048     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GDK_PIXBUF libs" >&5
17049$as_echo_n "checking for GDK_PIXBUF libs... " >&6; }
17050     d=$with_gdk_pixbuf/lib
17051     if test -d $d; then
17052       X_LIBS="-L$d $X_LIBS"
17053       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $d" >&5
17054$as_echo "$d" >&6; }
17055     else
17056       { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found ($d: no such directory)" >&5
17057$as_echo "not found ($d: no such directory)" >&6; }
17058     fi
17059
17060     # replace the directory string with "yes".
17061     with_gdk_pixbuf_req="yes"
17062     with_gdk_pixbuf=$with_gdk_pixbuf_req
17063     ;;
17064
17065    *)
17066     echo ""
17067     echo "error: argument to --with-pixbuf must be \"yes\", \"no\", or a directory."
17068     echo "       If it is a directory, then \`DIR/include' will be added to"
17069     echo "       the -I list, and \`DIR/lib' will be added to the -L list."
17070     exit 1
17071     ;;
17072   esac
17073
17074
17075if test "$with_gdk_pixbuf" != yes -a "$with_gdk_pixbuf" != no ; then
17076  echo "error: must be yes or no: --with-pixbuf=$with_gdk_pixbuf"
17077  exit 1
17078fi
17079
17080if test "$with_gdk_pixbuf" = yes; then
17081  have_gdk_pixbuf=no
17082
17083  pkgs=''
17084  ok="yes"
17085
17086  pkg_check_version gdk-pixbuf-2.0      2.0.0
17087  pkg_check_version gdk-pixbuf-xlib-2.0 2.0.0
17088  pkg_check_version gio-2.0             2.0.0
17089  have_gdk_pixbuf="$ok"
17090
17091  if test "$have_gdk_pixbuf" = yes; then
17092    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gdk-pixbuf includes" >&5
17093$as_echo_n "checking for gdk-pixbuf includes... " >&6; }
17094if ${ac_cv_gdk_pixbuf_config_cflags+:} false; then :
17095  $as_echo_n "(cached) " >&6
17096else
17097  ac_cv_gdk_pixbuf_config_cflags=`$pkg_config --cflags $pkgs`
17098fi
17099{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_gdk_pixbuf_config_cflags" >&5
17100$as_echo "$ac_cv_gdk_pixbuf_config_cflags" >&6; }
17101    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gdk-pixbuf libs" >&5
17102$as_echo_n "checking for gdk-pixbuf libs... " >&6; }
17103if ${ac_cv_gdk_pixbuf_config_libs+:} false; then :
17104  $as_echo_n "(cached) " >&6
17105else
17106  ac_cv_gdk_pixbuf_config_libs=`$pkg_config --libs $pkgs`
17107fi
17108{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_gdk_pixbuf_config_libs" >&5
17109$as_echo "$ac_cv_gdk_pixbuf_config_libs" >&6; }
17110  fi
17111
17112  ac_gdk_pixbuf_config_cflags=$ac_cv_gdk_pixbuf_config_cflags
17113  ac_gdk_pixbuf_config_libs=$ac_cv_gdk_pixbuf_config_libs
17114
17115
17116  if test "$have_gdk_pixbuf" = yes; then
17117    #
17118    # we appear to have pixbuf; check for headers/libs to be sure.
17119    #
17120    ac_save_gdk_pixbuf_CPPFLAGS="$CPPFLAGS"
17121    CPPFLAGS="$CPPFLAGS $ac_gdk_pixbuf_config_cflags"
17122
17123    have_gdk_pixbuf=no
17124
17125    # check for header A...
17126
17127  ac_save_CPPFLAGS="$CPPFLAGS"
17128  if test \! -z "$includedir" ; then
17129    CPPFLAGS="$CPPFLAGS -I$includedir"
17130  fi
17131  CPPFLAGS="$CPPFLAGS $X_CFLAGS"
17132  CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
17133  ac_fn_c_check_header_mongrel "$LINENO" "gdk-pixbuf/gdk-pixbuf.h" "ac_cv_header_gdk_pixbuf_gdk_pixbuf_h" "$ac_includes_default"
17134if test "x$ac_cv_header_gdk_pixbuf_gdk_pixbuf_h" = xyes; then :
17135  have_gdk_pixbuf=yes
17136fi
17137
17138
17139  CPPFLAGS="$ac_save_CPPFLAGS"
17140
17141    # if that worked, check for header B...
17142    if test "$have_gdk_pixbuf" = yes; then
17143      have_gdk_pixbuf=no
17144      gdk_pixbuf_halfassed=yes
17145
17146  ac_save_CPPFLAGS="$CPPFLAGS"
17147  if test \! -z "$includedir" ; then
17148    CPPFLAGS="$CPPFLAGS -I$includedir"
17149  fi
17150  CPPFLAGS="$CPPFLAGS $X_CFLAGS"
17151  CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
17152  ac_fn_c_check_header_mongrel "$LINENO" "gdk-pixbuf/gdk-pixbuf-xlib.h" "ac_cv_header_gdk_pixbuf_gdk_pixbuf_xlib_h" "$ac_includes_default"
17153if test "x$ac_cv_header_gdk_pixbuf_gdk_pixbuf_xlib_h" = xyes; then :
17154  have_gdk_pixbuf=yes
17155                         gdk_pixbuf_halfassed=no
17156fi
17157
17158
17159  CPPFLAGS="$ac_save_CPPFLAGS"
17160
17161      # yay, it has a new name in Gtk 2.x...
17162      if test "$have_gdk_pixbuf" = no; then
17163        have_gdk_pixbuf=no
17164        gdk_pixbuf_halfassed=yes
17165
17166  ac_save_CPPFLAGS="$CPPFLAGS"
17167  if test \! -z "$includedir" ; then
17168    CPPFLAGS="$CPPFLAGS -I$includedir"
17169  fi
17170  CPPFLAGS="$CPPFLAGS $X_CFLAGS"
17171  CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
17172  ac_fn_c_check_header_mongrel "$LINENO" "gdk-pixbuf-xlib/gdk-pixbuf-xlib.h" "ac_cv_header_gdk_pixbuf_xlib_gdk_pixbuf_xlib_h" "$ac_includes_default"
17173if test "x$ac_cv_header_gdk_pixbuf_xlib_gdk_pixbuf_xlib_h" = xyes; then :
17174  have_gdk_pixbuf=yes
17175                           gdk_pixbuf_halfassed=no
17176fi
17177
17178
17179  CPPFLAGS="$ac_save_CPPFLAGS"
17180      fi
17181    fi
17182    CPPFLAGS="$ac_save_gdk_pixbuf_CPPFLAGS"
17183  fi
17184
17185  if test "$have_gdk_pixbuf" = yes; then
17186    # we have the headers, now check for the libraries
17187    have_gdk_pixbuf=no
17188    gdk_pixbuf_halfassed=yes
17189
17190    { $as_echo "$as_me:${as_lineno-$LINENO}: result: checking for gdk_pixbuf usability..." >&5
17191$as_echo "checking for gdk_pixbuf usability..." >&6; }
17192
17193    # library A...
17194
17195  ac_save_CPPFLAGS="$CPPFLAGS"
17196  ac_save_LDFLAGS="$LDFLAGS"
17197#  ac_save_LIBS="$LIBS"
17198
17199  if test \! -z "$includedir" ; then
17200    CPPFLAGS="$CPPFLAGS -I$includedir"
17201  fi
17202  # note: $X_CFLAGS includes $x_includes
17203  CPPFLAGS="$CPPFLAGS $X_CFLAGS"
17204
17205  if test \! -z "$libdir" ; then
17206    LDFLAGS="$LDFLAGS -L$libdir"
17207  fi
17208  # note: $X_LIBS includes $x_libraries
17209  LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
17210
17211  CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
17212  LDFLAGS=`eval eval eval eval eval eval eval eval eval echo $LDFLAGS`
17213  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gdk_pixbuf_new_from_file in -lc" >&5
17214$as_echo_n "checking for gdk_pixbuf_new_from_file in -lc... " >&6; }
17215if ${ac_cv_lib_c_gdk_pixbuf_new_from_file+:} false; then :
17216  $as_echo_n "(cached) " >&6
17217else
17218  ac_check_lib_save_LIBS=$LIBS
17219LIBS="-lc $ac_gdk_pixbuf_config_libs -lX11 -lXext -lm $LIBS"
17220cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17221/* end confdefs.h.  */
17222
17223/* Override any GCC internal prototype to avoid an error.
17224   Use char because int might match the return type of a GCC
17225   builtin and then its argument prototype would still apply.  */
17226#ifdef __cplusplus
17227extern "C"
17228#endif
17229char gdk_pixbuf_new_from_file ();
17230int
17231main ()
17232{
17233return gdk_pixbuf_new_from_file ();
17234  ;
17235  return 0;
17236}
17237_ACEOF
17238if ac_fn_c_try_link "$LINENO"; then :
17239  ac_cv_lib_c_gdk_pixbuf_new_from_file=yes
17240else
17241  ac_cv_lib_c_gdk_pixbuf_new_from_file=no
17242fi
17243rm -f core conftest.err conftest.$ac_objext \
17244    conftest$ac_exeext conftest.$ac_ext
17245LIBS=$ac_check_lib_save_LIBS
17246fi
17247{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_c_gdk_pixbuf_new_from_file" >&5
17248$as_echo "$ac_cv_lib_c_gdk_pixbuf_new_from_file" >&6; }
17249if test "x$ac_cv_lib_c_gdk_pixbuf_new_from_file" = xyes; then :
17250  have_gdk_pixbuf=yes
17251fi
17252
17253  CPPFLAGS="$ac_save_CPPFLAGS"
17254  LDFLAGS="$ac_save_LDFLAGS"
17255#  LIBS="$ac_save_LIBS"
17256
17257    # library B...
17258    if test "$have_gdk_pixbuf" = yes; then
17259      have_gdk_pixbuf=no
17260
17261  ac_save_CPPFLAGS="$CPPFLAGS"
17262  ac_save_LDFLAGS="$LDFLAGS"
17263#  ac_save_LIBS="$LIBS"
17264
17265  if test \! -z "$includedir" ; then
17266    CPPFLAGS="$CPPFLAGS -I$includedir"
17267  fi
17268  # note: $X_CFLAGS includes $x_includes
17269  CPPFLAGS="$CPPFLAGS $X_CFLAGS"
17270
17271  if test \! -z "$libdir" ; then
17272    LDFLAGS="$LDFLAGS -L$libdir"
17273  fi
17274  # note: $X_LIBS includes $x_libraries
17275  LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
17276
17277  CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
17278  LDFLAGS=`eval eval eval eval eval eval eval eval eval echo $LDFLAGS`
17279  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gdk_pixbuf_xlib_init in -lc" >&5
17280$as_echo_n "checking for gdk_pixbuf_xlib_init in -lc... " >&6; }
17281if ${ac_cv_lib_c_gdk_pixbuf_xlib_init+:} false; then :
17282  $as_echo_n "(cached) " >&6
17283else
17284  ac_check_lib_save_LIBS=$LIBS
17285LIBS="-lc $ac_gdk_pixbuf_config_libs -lX11 -lXext -lm $LIBS"
17286cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17287/* end confdefs.h.  */
17288
17289/* Override any GCC internal prototype to avoid an error.
17290   Use char because int might match the return type of a GCC
17291   builtin and then its argument prototype would still apply.  */
17292#ifdef __cplusplus
17293extern "C"
17294#endif
17295char gdk_pixbuf_xlib_init ();
17296int
17297main ()
17298{
17299return gdk_pixbuf_xlib_init ();
17300  ;
17301  return 0;
17302}
17303_ACEOF
17304if ac_fn_c_try_link "$LINENO"; then :
17305  ac_cv_lib_c_gdk_pixbuf_xlib_init=yes
17306else
17307  ac_cv_lib_c_gdk_pixbuf_xlib_init=no
17308fi
17309rm -f core conftest.err conftest.$ac_objext \
17310    conftest$ac_exeext conftest.$ac_ext
17311LIBS=$ac_check_lib_save_LIBS
17312fi
17313{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_c_gdk_pixbuf_xlib_init" >&5
17314$as_echo "$ac_cv_lib_c_gdk_pixbuf_xlib_init" >&6; }
17315if test "x$ac_cv_lib_c_gdk_pixbuf_xlib_init" = xyes; then :
17316  have_gdk_pixbuf=yes
17317                      gdk_pixbuf_halfassed=no
17318fi
17319
17320  CPPFLAGS="$ac_save_CPPFLAGS"
17321  LDFLAGS="$ac_save_LDFLAGS"
17322#  LIBS="$ac_save_LIBS"
17323
17324    fi
17325  fi
17326
17327  if test "$have_gdk_pixbuf" = yes; then
17328    INCLUDES="$INCLUDES $ac_gdk_pixbuf_config_cflags"
17329    PNG_LIBS="$ac_gdk_pixbuf_config_libs"
17330    $as_echo "#define HAVE_GDK_PIXBUF 1" >>confdefs.h
17331
17332  else
17333    { $as_echo "$as_me:${as_lineno-$LINENO}: result: checking for gdk_pixbuf usability... no" >&5
17334$as_echo "checking for gdk_pixbuf usability... no" >&6; }
17335  fi
17336
17337  if test "$have_gdk_pixbuf" = yes; then
17338
17339  ac_save_CPPFLAGS="$CPPFLAGS"
17340  ac_save_LDFLAGS="$LDFLAGS"
17341#  ac_save_LIBS="$LIBS"
17342
17343  if test \! -z "$includedir" ; then
17344    CPPFLAGS="$CPPFLAGS -I$includedir"
17345  fi
17346  # note: $X_CFLAGS includes $x_includes
17347  CPPFLAGS="$CPPFLAGS $X_CFLAGS"
17348
17349  if test \! -z "$libdir" ; then
17350    LDFLAGS="$LDFLAGS -L$libdir"
17351  fi
17352  # note: $X_LIBS includes $x_libraries
17353  LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
17354
17355  CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
17356  LDFLAGS=`eval eval eval eval eval eval eval eval eval echo $LDFLAGS`
17357  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gdk_pixbuf_apply_embedded_orientation in -lc" >&5
17358$as_echo_n "checking for gdk_pixbuf_apply_embedded_orientation in -lc... " >&6; }
17359if ${ac_cv_lib_c_gdk_pixbuf_apply_embedded_orientation+:} false; then :
17360  $as_echo_n "(cached) " >&6
17361else
17362  ac_check_lib_save_LIBS=$LIBS
17363LIBS="-lc $ac_gdk_pixbuf_config_libs -lX11 -lXext -lm $LIBS"
17364cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17365/* end confdefs.h.  */
17366
17367/* Override any GCC internal prototype to avoid an error.
17368   Use char because int might match the return type of a GCC
17369   builtin and then its argument prototype would still apply.  */
17370#ifdef __cplusplus
17371extern "C"
17372#endif
17373char gdk_pixbuf_apply_embedded_orientation ();
17374int
17375main ()
17376{
17377return gdk_pixbuf_apply_embedded_orientation ();
17378  ;
17379  return 0;
17380}
17381_ACEOF
17382if ac_fn_c_try_link "$LINENO"; then :
17383  ac_cv_lib_c_gdk_pixbuf_apply_embedded_orientation=yes
17384else
17385  ac_cv_lib_c_gdk_pixbuf_apply_embedded_orientation=no
17386fi
17387rm -f core conftest.err conftest.$ac_objext \
17388    conftest$ac_exeext conftest.$ac_ext
17389LIBS=$ac_check_lib_save_LIBS
17390fi
17391{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_c_gdk_pixbuf_apply_embedded_orientation" >&5
17392$as_echo "$ac_cv_lib_c_gdk_pixbuf_apply_embedded_orientation" >&6; }
17393if test "x$ac_cv_lib_c_gdk_pixbuf_apply_embedded_orientation" = xyes; then :
17394  $as_echo "#define HAVE_GDK_PIXBUF_APPLY_EMBEDDED_ORIENTATION 1" >>confdefs.h
17395
17396fi
17397
17398  CPPFLAGS="$ac_save_CPPFLAGS"
17399  LDFLAGS="$ac_save_LDFLAGS"
17400#  LIBS="$ac_save_LIBS"
17401
17402  fi
17403fi
17404
17405
17406###############################################################################
17407#
17408#       Check for -lXft
17409#
17410###############################################################################
17411
17412have_xutf8drawstring=no
17413
17414  ac_save_CPPFLAGS="$CPPFLAGS"
17415  ac_save_LDFLAGS="$LDFLAGS"
17416#  ac_save_LIBS="$LIBS"
17417
17418  if test \! -z "$includedir" ; then
17419    CPPFLAGS="$CPPFLAGS -I$includedir"
17420  fi
17421  # note: $X_CFLAGS includes $x_includes
17422  CPPFLAGS="$CPPFLAGS $X_CFLAGS"
17423
17424  if test \! -z "$libdir" ; then
17425    LDFLAGS="$LDFLAGS -L$libdir"
17426  fi
17427  # note: $X_LIBS includes $x_libraries
17428  LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
17429
17430  CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
17431  LDFLAGS=`eval eval eval eval eval eval eval eval eval echo $LDFLAGS`
17432  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Xutf8DrawString in -lX11" >&5
17433$as_echo_n "checking for Xutf8DrawString in -lX11... " >&6; }
17434if ${ac_cv_lib_X11_Xutf8DrawString+:} false; then :
17435  $as_echo_n "(cached) " >&6
17436else
17437  ac_check_lib_save_LIBS=$LIBS
17438LIBS="-lX11 -lX11 -lXext -lm $LIBS"
17439cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17440/* end confdefs.h.  */
17441
17442/* Override any GCC internal prototype to avoid an error.
17443   Use char because int might match the return type of a GCC
17444   builtin and then its argument prototype would still apply.  */
17445#ifdef __cplusplus
17446extern "C"
17447#endif
17448char Xutf8DrawString ();
17449int
17450main ()
17451{
17452return Xutf8DrawString ();
17453  ;
17454  return 0;
17455}
17456_ACEOF
17457if ac_fn_c_try_link "$LINENO"; then :
17458  ac_cv_lib_X11_Xutf8DrawString=yes
17459else
17460  ac_cv_lib_X11_Xutf8DrawString=no
17461fi
17462rm -f core conftest.err conftest.$ac_objext \
17463    conftest$ac_exeext conftest.$ac_ext
17464LIBS=$ac_check_lib_save_LIBS
17465fi
17466{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_X11_Xutf8DrawString" >&5
17467$as_echo "$ac_cv_lib_X11_Xutf8DrawString" >&6; }
17468if test "x$ac_cv_lib_X11_Xutf8DrawString" = xyes; then :
17469  have_xutf8drawstring=yes
17470else
17471  true
17472fi
17473
17474  CPPFLAGS="$ac_save_CPPFLAGS"
17475  LDFLAGS="$ac_save_LDFLAGS"
17476#  LIBS="$ac_save_LIBS"
17477
17478if test "$have_xutf8drawstring" = yes ; then
17479  $as_echo "#define HAVE_XUTF8DRAWSTRING 1" >>confdefs.h
17480
17481fi
17482
17483
17484have_xft=no
17485with_xft_req=unspecified
17486xft_halfassed=no
17487
17488# Check whether --with-xft was given.
17489if test "${with_xft+set}" = set; then :
17490  withval=$with_xft; with_xft="$withval"; with_xft_req="$withval"
17491else
17492  with_xft=yes
17493fi
17494
17495
17496
17497   case "$with_xft" in
17498    yes) ;;
17499    no)  ;;
17500
17501    /*)
17502     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Xft headers" >&5
17503$as_echo_n "checking for Xft headers... " >&6; }
17504     d=$with_xft/include
17505     if test -d $d; then
17506       X_CFLAGS="-I$d $X_CFLAGS"
17507       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $d" >&5
17508$as_echo "$d" >&6; }
17509     else
17510       { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found ($d: no such directory)" >&5
17511$as_echo "not found ($d: no such directory)" >&6; }
17512     fi
17513
17514     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Xft libs" >&5
17515$as_echo_n "checking for Xft libs... " >&6; }
17516     d=$with_xft/lib
17517     if test -d $d; then
17518       X_LIBS="-L$d $X_LIBS"
17519       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $d" >&5
17520$as_echo "$d" >&6; }
17521     else
17522       { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found ($d: no such directory)" >&5
17523$as_echo "not found ($d: no such directory)" >&6; }
17524     fi
17525
17526     # replace the directory string with "yes".
17527     with_xft_req="yes"
17528     with_xft=$with_xft_req
17529     ;;
17530
17531    *)
17532     echo ""
17533     echo "error: argument to --with-xft must be \"yes\", \"no\", or a directory."
17534     echo "       If it is a directory, then \`DIR/include' will be added to"
17535     echo "       the -I list, and \`DIR/lib' will be added to the -L list."
17536     exit 1
17537     ;;
17538   esac
17539
17540
17541if test "$with_xft" != yes -a "$with_xft" != no ; then
17542  echo "error: must be yes or no: --with-xft=$with_xft"
17543  exit 1
17544fi
17545
17546if test "$with_xft" = yes; then
17547
17548  pkgs=''
17549  ok="yes"
17550  pkg_check_version xft 2.1.0
17551  have_xft="$ok"
17552
17553  if test "$have_xft" = yes; then
17554    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Xft includes" >&5
17555$as_echo_n "checking for Xft includes... " >&6; }
17556if ${ac_cv_xft_config_cflags+:} false; then :
17557  $as_echo_n "(cached) " >&6
17558else
17559  ac_cv_xft_config_cflags=`$pkg_config --cflags $pkgs`
17560fi
17561{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_xft_config_cflags" >&5
17562$as_echo "$ac_cv_xft_config_cflags" >&6; }
17563    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Xft libs" >&5
17564$as_echo_n "checking for Xft libs... " >&6; }
17565if ${ac_cv_xft_config_libs+:} false; then :
17566  $as_echo_n "(cached) " >&6
17567else
17568  ac_cv_xft_config_libs=`$pkg_config --libs $pkgs`
17569fi
17570{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_xft_config_libs" >&5
17571$as_echo "$ac_cv_xft_config_libs" >&6; }
17572  fi
17573
17574  ac_xft_config_cflags=$ac_cv_xft_config_cflags
17575  ac_xft_config_libs=$ac_cv_xft_config_libs
17576
17577  if test "$have_xft" = yes; then
17578    #
17579    # we appear to have Xft; check for headers/libs to be sure.
17580    #
17581    ac_save_xft_CPPFLAGS="$CPPFLAGS"
17582    CPPFLAGS="$CPPFLAGS $ac_xft_config_cflags"
17583
17584    have_xft=no
17585
17586  ac_save_CPPFLAGS="$CPPFLAGS"
17587  if test \! -z "$includedir" ; then
17588    CPPFLAGS="$CPPFLAGS -I$includedir"
17589  fi
17590  CPPFLAGS="$CPPFLAGS $X_CFLAGS"
17591  CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
17592  ac_fn_c_check_header_mongrel "$LINENO" "X11/Xft/Xft.h" "ac_cv_header_X11_Xft_Xft_h" "$ac_includes_default"
17593if test "x$ac_cv_header_X11_Xft_Xft_h" = xyes; then :
17594  have_xft=yes
17595fi
17596
17597
17598  CPPFLAGS="$ac_save_CPPFLAGS"
17599
17600    CPPFLAGS="$ac_save_xft_CPPFLAGS"
17601  fi
17602
17603  if test "$have_xft" = yes; then
17604    # we have the headers, now check for the libraries
17605    have_xft=no
17606    xft_halfassed=yes
17607
17608    { $as_echo "$as_me:${as_lineno-$LINENO}: result: checking for Xft usability..." >&5
17609$as_echo "checking for Xft usability..." >&6; }
17610
17611  ac_save_CPPFLAGS="$CPPFLAGS"
17612  ac_save_LDFLAGS="$LDFLAGS"
17613#  ac_save_LIBS="$LIBS"
17614
17615  if test \! -z "$includedir" ; then
17616    CPPFLAGS="$CPPFLAGS -I$includedir"
17617  fi
17618  # note: $X_CFLAGS includes $x_includes
17619  CPPFLAGS="$CPPFLAGS $X_CFLAGS"
17620
17621  if test \! -z "$libdir" ; then
17622    LDFLAGS="$LDFLAGS -L$libdir"
17623  fi
17624  # note: $X_LIBS includes $x_libraries
17625  LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
17626
17627  CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
17628  LDFLAGS=`eval eval eval eval eval eval eval eval eval echo $LDFLAGS`
17629  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XftDrawStringUtf8 in -lc" >&5
17630$as_echo_n "checking for XftDrawStringUtf8 in -lc... " >&6; }
17631if ${ac_cv_lib_c_XftDrawStringUtf8+:} false; then :
17632  $as_echo_n "(cached) " >&6
17633else
17634  ac_check_lib_save_LIBS=$LIBS
17635LIBS="-lc $ac_xft_config_libs -lX11 -lXext -lm $LIBS"
17636cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17637/* end confdefs.h.  */
17638
17639/* Override any GCC internal prototype to avoid an error.
17640   Use char because int might match the return type of a GCC
17641   builtin and then its argument prototype would still apply.  */
17642#ifdef __cplusplus
17643extern "C"
17644#endif
17645char XftDrawStringUtf8 ();
17646int
17647main ()
17648{
17649return XftDrawStringUtf8 ();
17650  ;
17651  return 0;
17652}
17653_ACEOF
17654if ac_fn_c_try_link "$LINENO"; then :
17655  ac_cv_lib_c_XftDrawStringUtf8=yes
17656else
17657  ac_cv_lib_c_XftDrawStringUtf8=no
17658fi
17659rm -f core conftest.err conftest.$ac_objext \
17660    conftest$ac_exeext conftest.$ac_ext
17661LIBS=$ac_check_lib_save_LIBS
17662fi
17663{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_c_XftDrawStringUtf8" >&5
17664$as_echo "$ac_cv_lib_c_XftDrawStringUtf8" >&6; }
17665if test "x$ac_cv_lib_c_XftDrawStringUtf8" = xyes; then :
17666  have_xft=yes
17667fi
17668
17669  CPPFLAGS="$ac_save_CPPFLAGS"
17670  LDFLAGS="$ac_save_LDFLAGS"
17671#  LIBS="$ac_save_LIBS"
17672
17673  fi
17674
17675  if test "$have_xft" = no; then
17676    { $as_echo "$as_me:${as_lineno-$LINENO}: result: checking for Xft usability... no" >&5
17677$as_echo "checking for Xft usability... no" >&6; }
17678  fi
17679fi
17680
17681if test "$have_xft" = yes; then
17682  INCLUDES="$INCLUDES $ac_xft_config_cflags"
17683  XFT_LIBS="$ac_xft_config_libs"
17684  XFT_SRCS=''
17685  XFT_OBJS=''
17686  $as_echo "#define HAVE_XFT 1" >>confdefs.h
17687
17688else
17689  XFT_LIBS=''
17690  XFT_SRCS='$(UTILS_SRC)/xft.c'
17691  XFT_OBJS='$(UTILS_BIN)/xft.o'
17692fi
17693
17694
17695###############################################################################
17696#
17697#       Check for pty support: this allows 'phosphor' and 'apple2'
17698#	to run curses-based programs, or be used as terminal windows.
17699#
17700###############################################################################
17701
17702PTY_LIBS=
17703for ac_header in pty.h util.h sys/termios.h
17704do :
17705  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
17706ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
17707if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
17708  cat >>confdefs.h <<_ACEOF
17709#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
17710_ACEOF
17711
17712fi
17713
17714done
17715
17716
17717  ac_save_CPPFLAGS="$CPPFLAGS"
17718  ac_save_LDFLAGS="$LDFLAGS"
17719#  ac_save_LIBS="$LIBS"
17720
17721  if test \! -z "$includedir" ; then
17722    CPPFLAGS="$CPPFLAGS -I$includedir"
17723  fi
17724  # note: $X_CFLAGS includes $x_includes
17725  CPPFLAGS="$CPPFLAGS $X_CFLAGS"
17726
17727  if test \! -z "$libdir" ; then
17728    LDFLAGS="$LDFLAGS -L$libdir"
17729  fi
17730  # note: $X_LIBS includes $x_libraries
17731  LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
17732
17733  CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
17734  LDFLAGS=`eval eval eval eval eval eval eval eval eval echo $LDFLAGS`
17735  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for forkpty in -lutil" >&5
17736$as_echo_n "checking for forkpty in -lutil... " >&6; }
17737if ${ac_cv_lib_util_forkpty+:} false; then :
17738  $as_echo_n "(cached) " >&6
17739else
17740  ac_check_lib_save_LIBS=$LIBS
17741LIBS="-lutil  $LIBS"
17742cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17743/* end confdefs.h.  */
17744
17745/* Override any GCC internal prototype to avoid an error.
17746   Use char because int might match the return type of a GCC
17747   builtin and then its argument prototype would still apply.  */
17748#ifdef __cplusplus
17749extern "C"
17750#endif
17751char forkpty ();
17752int
17753main ()
17754{
17755return forkpty ();
17756  ;
17757  return 0;
17758}
17759_ACEOF
17760if ac_fn_c_try_link "$LINENO"; then :
17761  ac_cv_lib_util_forkpty=yes
17762else
17763  ac_cv_lib_util_forkpty=no
17764fi
17765rm -f core conftest.err conftest.$ac_objext \
17766    conftest$ac_exeext conftest.$ac_ext
17767LIBS=$ac_check_lib_save_LIBS
17768fi
17769{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_util_forkpty" >&5
17770$as_echo "$ac_cv_lib_util_forkpty" >&6; }
17771if test "x$ac_cv_lib_util_forkpty" = xyes; then :
17772  PTY_LIBS="-lutil"
17773                ac_have_forkpty=yes
17774                $as_echo "#define HAVE_FORKPTY 1" >>confdefs.h
17775
17776fi
17777
17778  CPPFLAGS="$ac_save_CPPFLAGS"
17779  LDFLAGS="$ac_save_LDFLAGS"
17780#  LIBS="$ac_save_LIBS"
17781
17782
17783if test "$ac_have_forkpty" != yes ; then
17784  # we don't need (or have) -lutil on macOS 10.4.2...
17785
17786  ac_save_CPPFLAGS="$CPPFLAGS"
17787  ac_save_LDFLAGS="$LDFLAGS"
17788#  ac_save_LIBS="$LIBS"
17789
17790  if test \! -z "$includedir" ; then
17791    CPPFLAGS="$CPPFLAGS -I$includedir"
17792  fi
17793  # note: $X_CFLAGS includes $x_includes
17794  CPPFLAGS="$CPPFLAGS $X_CFLAGS"
17795
17796  if test \! -z "$libdir" ; then
17797    LDFLAGS="$LDFLAGS -L$libdir"
17798  fi
17799  # note: $X_LIBS includes $x_libraries
17800  LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
17801
17802  CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
17803  LDFLAGS=`eval eval eval eval eval eval eval eval eval echo $LDFLAGS`
17804  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for forkpty in -lc" >&5
17805$as_echo_n "checking for forkpty in -lc... " >&6; }
17806if ${ac_cv_lib_c_forkpty+:} false; then :
17807  $as_echo_n "(cached) " >&6
17808else
17809  ac_check_lib_save_LIBS=$LIBS
17810LIBS="-lc  $LIBS"
17811cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17812/* end confdefs.h.  */
17813
17814/* Override any GCC internal prototype to avoid an error.
17815   Use char because int might match the return type of a GCC
17816   builtin and then its argument prototype would still apply.  */
17817#ifdef __cplusplus
17818extern "C"
17819#endif
17820char forkpty ();
17821int
17822main ()
17823{
17824return forkpty ();
17825  ;
17826  return 0;
17827}
17828_ACEOF
17829if ac_fn_c_try_link "$LINENO"; then :
17830  ac_cv_lib_c_forkpty=yes
17831else
17832  ac_cv_lib_c_forkpty=no
17833fi
17834rm -f core conftest.err conftest.$ac_objext \
17835    conftest$ac_exeext conftest.$ac_ext
17836LIBS=$ac_check_lib_save_LIBS
17837fi
17838{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_c_forkpty" >&5
17839$as_echo "$ac_cv_lib_c_forkpty" >&6; }
17840if test "x$ac_cv_lib_c_forkpty" = xyes; then :
17841  PTY_LIBS=""
17842                  $as_echo "#define HAVE_FORKPTY 1" >>confdefs.h
17843
17844fi
17845
17846  CPPFLAGS="$ac_save_CPPFLAGS"
17847  LDFLAGS="$ac_save_LDFLAGS"
17848#  LIBS="$ac_save_LIBS"
17849
17850fi
17851
17852
17853###############################################################################
17854#
17855#       Check for libcap, which allows "sonar" to work without setuid.
17856#       Except, nevermind, that's bad.  See comments in sonar-icmp.c.
17857#
17858###############################################################################
17859
17860have_libcap=no
17861setcap_hacks_default=no
17862setcap_hacks="$setcap_hacks_default"
17863setcap_hacks_req=unspecified
17864
17865#AC_ARG_WITH(setcap-hacks,
17866#[  --with-setcap-hacks     Build the "sonar" demo with libcap, which allows
17867#                          it to ping other hosts without being setuid.],
17868#  [setcap_hacks="$withval"; setcap_hacks_req="$withval"],
17869#  [setcap_hacks=yes])
17870#
17871#HANDLE_X_PATH_ARG(setcap_hacks, --with-setcap-hacks, setcap hacks)
17872#
17873#if test "$setcap_hacks" != yes -a "$setcap_hacks" != no ; then
17874#  echo "error: must be yes or no: --with-setcap-hacks=$setcap_hacks"
17875#  exit 1
17876#fi
17877#
17878#if test "$setcap_hacks" = yes; then
17879#
17880#  AC_CHECK_PROGS(setcap_program, setcap)
17881#  if test "$setcap_program" != ''; then
17882#    AC_CHECK_X_HEADER(sys/capability.h, [have_setcap=yes])
17883#  fi
17884#  if test "$have_setcap" = yes; then
17885#    AC_CHECK_X_LIB(cap, cap_set_flag,
17886#                   [have_libcap=yes
17887#                    PROG_SETCAP="$setcap_program"
17888#                    LIBCAP_LIBS="-lcap"
17889#                    AC_DEFINE(HAVE_LIBCAP)])
17890#  fi
17891#fi
17892
17893
17894###############################################################################
17895#
17896#       Sonar must be setuid to be able to ping other hosts.
17897#
17898###############################################################################
17899
17900if test "$have_libcap" = yes; then
17901  setuid_hacks_default=no
17902else
17903  setuid_hacks_default=yes
17904fi
17905
17906setuid_hacks="$setuid_hacks_default"
17907
17908# Check whether --with-setuid-hacks was given.
17909if test "${with_setuid_hacks+set}" = set; then :
17910  withval=$with_setuid_hacks; setuid_hacks="$withval"
17911else
17912  setuid_hacks="$setuid_hacks_default"
17913fi
17914
17915
17916
17917   case "$setuid_hacks" in
17918    yes) ;;
17919    no)  ;;
17920
17921    /*)
17922     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for setuid hacks headers" >&5
17923$as_echo_n "checking for setuid hacks headers... " >&6; }
17924     d=$setuid_hacks/include
17925     if test -d $d; then
17926       X_CFLAGS="-I$d $X_CFLAGS"
17927       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $d" >&5
17928$as_echo "$d" >&6; }
17929     else
17930       { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found ($d: no such directory)" >&5
17931$as_echo "not found ($d: no such directory)" >&6; }
17932     fi
17933
17934     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for setuid hacks libs" >&5
17935$as_echo_n "checking for setuid hacks libs... " >&6; }
17936     d=$setuid_hacks/lib
17937     if test -d $d; then
17938       X_LIBS="-L$d $X_LIBS"
17939       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $d" >&5
17940$as_echo "$d" >&6; }
17941     else
17942       { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found ($d: no such directory)" >&5
17943$as_echo "not found ($d: no such directory)" >&6; }
17944     fi
17945
17946     # replace the directory string with "yes".
17947     setuid_hacks_req="yes"
17948     setuid_hacks=$setuid_hacks_req
17949     ;;
17950
17951    *)
17952     echo ""
17953     echo "error: argument to --with-setuid-hacks must be \"yes\", \"no\", or a directory."
17954     echo "       If it is a directory, then \`DIR/include' will be added to"
17955     echo "       the -I list, and \`DIR/lib' will be added to the -L list."
17956     exit 1
17957     ;;
17958   esac
17959
17960
17961if test "$setuid_hacks" = yes; then
17962  true
17963elif test "$setuid_hacks" != no; then
17964  echo "error: must be yes or no: --with-setuid-hacks=$setuid_hacks"
17965  exit 1
17966fi
17967
17968
17969###############################################################################
17970#
17971#       Check for --with-record-animation
17972#
17973###############################################################################
17974
17975record_anim_default=no
17976record_anim="$record_anim_default"
17977
17978# Check whether --with-record-animation was given.
17979if test "${with_record_animation+set}" = set; then :
17980  withval=$with_record_animation; record_anim="$withval"
17981else
17982  record_anim="$record_anim_default"
17983fi
17984
17985
17986
17987   case "$record_anim" in
17988    yes) ;;
17989    no)  ;;
17990
17991    /*)
17992     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for record animation headers" >&5
17993$as_echo_n "checking for record animation headers... " >&6; }
17994     d=$record_anim/include
17995     if test -d $d; then
17996       X_CFLAGS="-I$d $X_CFLAGS"
17997       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $d" >&5
17998$as_echo "$d" >&6; }
17999     else
18000       { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found ($d: no such directory)" >&5
18001$as_echo "not found ($d: no such directory)" >&6; }
18002     fi
18003
18004     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for record animation libs" >&5
18005$as_echo_n "checking for record animation libs... " >&6; }
18006     d=$record_anim/lib
18007     if test -d $d; then
18008       X_LIBS="-L$d $X_LIBS"
18009       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $d" >&5
18010$as_echo "$d" >&6; }
18011     else
18012       { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found ($d: no such directory)" >&5
18013$as_echo "not found ($d: no such directory)" >&6; }
18014     fi
18015
18016     # replace the directory string with "yes".
18017     record_anim_req="yes"
18018     record_anim=$record_anim_req
18019     ;;
18020
18021    *)
18022     echo ""
18023     echo "error: argument to --with-record-animation must be \"yes\", \"no\", or a directory."
18024     echo "       If it is a directory, then \`DIR/include' will be added to"
18025     echo "       the -I list, and \`DIR/lib' will be added to the -L list."
18026     exit 1
18027     ;;
18028   esac
18029
18030
18031if test "$record_anim" = yes; then
18032  true
18033elif test "$record_anim" != no; then
18034  echo "error: must be yes or no: --with-record-animation=$record_anim"
18035  exit 1
18036fi
18037
18038if test "$record_anim" = yes; then
18039  if test "$have_gdk_pixbuf" != yes; then
18040    as_fn_error $? "--with-record-animation requires GDK-Pixbuf" "$LINENO" 5
18041  else
18042    { $as_echo "$as_me:${as_lineno-$LINENO}: result: enabling --with-record-animation" >&5
18043$as_echo "enabling --with-record-animation" >&6; }
18044    $as_echo "#define HAVE_RECORD_ANIM 1" >>confdefs.h
18045
18046    ANIM_OBJS='$(ANIM_OBJS)'
18047    ANIM_LIBS='$(ANIM_LIBS)'
18048  fi
18049fi
18050
18051
18052###############################################################################
18053#
18054#       Done testing.  Now, set up the various -I and -L variables,
18055#       and decide which GUI program to build by default.
18056#
18057###############################################################################
18058
18059DEPEND=makedepend
18060DEPEND_FLAGS=
18061DEPEND_DEFINES=
18062
18063
18064if test \! -z "$includedir" ; then
18065  INCLUDES="$INCLUDES -I$includedir"
18066fi
18067
18068if test \! -z "$libdir" ; then
18069  LDFLAGS="$LDFLAGS -L$libdir"
18070fi
18071
18072
18073PREFERRED_DEMO_PROGRAM=''
18074ALL_DEMO_PROGRAMS=
18075if test "$have_motif" = yes; then
18076  PREFERRED_DEMO_PROGRAM=xscreensaver-settings-Xm
18077  ALL_DEMO_PROGRAMS="$PREFERRED_DEMO_PROGRAM $ALL_DEMO_PROGRAMS"
18078fi
18079if test "$have_gtk" = yes; then
18080  PREFERRED_DEMO_PROGRAM=xscreensaver-settings-Gtk
18081  ALL_DEMO_PROGRAMS="$PREFERRED_DEMO_PROGRAM $ALL_DEMO_PROGRAMS"
18082fi
18083
18084
18085if test "$have_kerberos" = yes; then
18086  PASSWD_SRCS="$PASSWD_SRCS \$(KERBEROS_SRCS)"
18087  PASSWD_OBJS="$PASSWD_OBJS \$(KERBEROS_OBJS)"
18088fi
18089if test "$have_pam" = yes; then
18090  PASSWD_SRCS="$PASSWD_SRCS \$(PAM_SRCS)"
18091  PASSWD_OBJS="$PASSWD_OBJS \$(PAM_OBJS)"
18092  INSTALL_PAM="install-pam"
18093fi
18094if test "$enable_pam_check_account_type" = yes; then
18095  COMMENT_PAM_CHECK_ACCOUNT=""
18096else
18097  COMMENT_PAM_CHECK_ACCOUNT="#"
18098fi
18099#if test "$have_passwd_helper" = yes; then
18100#  PASSWD_SRCS="$PASSWD_SRCS \$(PWHELPER_SRCS)"
18101#  PASSWD_OBJS="$PASSWD_OBJS \$(PWHELPER_OBJS)"
18102#fi
18103  PASSWD_SRCS="$PASSWD_SRCS \$(PWENT_SRCS)"
18104  PASSWD_OBJS="$PASSWD_OBJS \$(PWENT_OBJS)"
18105
18106
18107if test "$enable_locking" = yes; then
18108  LOCK_SRCS='$(LOCK_SRCS_1) $(PASSWD_SRCS)'
18109  LOCK_OBJS='$(LOCK_OBJS_1) $(PASSWD_OBJS)'
18110else
18111  LOCK_SRCS='$(NOLOCK_SRCS_1)'
18112  LOCK_OBJS='$(NOLOCK_OBJS_1)'
18113fi
18114
18115if test "$ac_macosx" = yes; then
18116  EXES_OSX='$(EXES_OSX)'
18117  SCRIPTS_OSX='$(SCRIPTS_OSX)'
18118  MEN_OSX='$(MEN_OSX)'
18119else
18120  EXES_OSX=
18121  SCRIPTS_OSX=
18122  MEN_OSX=
18123fi
18124
18125
18126if test "$setuid_auth" = yes; then
18127  SETUID_AUTH=yes
18128else
18129  SETUID_AUTH=no
18130fi
18131
18132if test "$setuid_hacks" = yes; then
18133  SETUID_HACKS=yes
18134else
18135  SETUID_HACKS=no
18136fi
18137
18138if test "$have_libcap" = yes; then
18139  SETCAP_HACKS=yes
18140else
18141  SETCAP_HACKS=no
18142fi
18143
18144tab='	'
18145if test "$have_gl" = yes; then
18146  GL_EXES='$(GL_EXES)'
18147  SUID_EXES='$(SUID_EXES)'
18148  RETIRED_GL_EXES='$(RETIRED_GL_EXES)'
18149  GL_UTIL_EXES='$(GL_UTIL_EXES)'
18150  GL_MEN='$(GL_MEN)'
18151  GL_KLUDGE=" "
18152else
18153  GL_KLUDGE="-"
18154fi
18155
18156if test "$have_gle" = yes; then
18157  GLE_EXES='$(GLE_EXES)'
18158  GLE_KLUDGE=" "
18159else
18160  GLE_KLUDGE="-"
18161fi
18162
18163if test "$have_jpeg" = yes -a "$have_gdk_pixbuf" = yes; then
18164 JPEG_EXES='$(JPEG_EXES)'
18165fi
18166
18167
18168# Another substitution in the XScreenSaver.ad.in file:
18169#
18170if test "$gnome_open_program" != ''; then
18171  GNOME24=''
18172  GNOME22='!	'
18173  NOGNOME='!	'
18174elif test "$gnome_url_show_program" != ''; then
18175  GNOME24='!	'
18176  GNOME22=''
18177  NOGNOME='!	'
18178else
18179  GNOME24='!	'
18180  GNOME22='!	'
18181  NOGNOME=''
18182fi
18183
18184
18185# Set PO_DATADIR to something sensible.
18186#
18187{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for locale directory" >&5
18188$as_echo_n "checking for locale directory... " >&6; }
18189if test -n "$GTK_DATADIR" ; then
18190  PO_DATADIR="$GTK_DATADIR"
18191elif test "$have_gtk" = yes; then
18192  PO_DATADIR=`$pkg_config --variable=prefix gtk+-2.0`
18193  PO_DATADIR="$PO_DATADIR/share"
18194fi
18195
18196if test -z "$PO_DATADIR" ; then
18197  #
18198  # #### Total fucking kludge --
18199  # Map /build/prefix/usr/X11R6/share/ to /build/prefix/usr/share/
18200  # but of course we need to expand all the nested variables to do that...
18201  #
18202  dd=`eval eval eval eval eval eval eval eval eval eval eval echo $datadir`
18203  PO_DATADIR=`echo $dd | sed 's@/X11R6/@/@'`
18204fi
18205
18206{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $PO_DATADIR/locale" >&5
18207$as_echo "$PO_DATADIR/locale" >&6; }
18208
18209
18210# canonicalize slashes.
18211HACK_CONF_DIR=`echo "${HACK_CONF_DIR}" | sed 's@/$@@;s@//*@/@g'`
18212FONT_DIR=`echo "${FONT_DIR}" | sed 's@/$@@;s@//*@/@g'`
18213
18214# gcc 3.0 likes to issue this warning for every file:
18215#
18216# cc1: warning: changing search order for system directory "/usr/local/include"
18217# cc1: warning:   as it has already been specified as a non-system directory
18218#
18219# Yay.  We can only avoid that by deleting "-I${prefix}/include" from the list.
18220# Which *should* be totally redundant, and thus an ok thing to delete?
18221#
18222INCLUDES=`echo "$INCLUDES" | sed 's@ -I${prefix}/include@@g;'`
18223
18224
18225###############################################################################
18226#
18227#       Perform substitutions and write Makefiles.
18228#
18229###############################################################################
18230
18231
18232
18233
18234
18235
18236
18237
18238
18239
18240
18241
18242
18243
18244
18245
18246
18247
18248
18249
18250
18251
18252
18253
18254
18255
18256
18257
18258
18259
18260
18261
18262
18263
18264
18265
18266
18267
18268
18269
18270
18271
18272
18273
18274
18275
18276
18277
18278
18279
18280
18281
18282
18283
18284
18285
18286
18287
18288
18289
18290
18291
18292
18293
18294
18295
18296
18297
18298
18299
18300
18301APPDEFAULTS=$ac_x_app_defaults
18302
18303
18304
18305
18306
18307
18308
18309ac_config_files="$ac_config_files Makefile utils/Makefile jwxyz/Makefile hacks/Makefile xlockmore/xlock/Makefile xlockmore/modes/Makefile xlockmore/modes/glx/Makefile hacks/fonts/Makefile hacks/images/Makefile hacks/glx/Makefile po/Makefile.in driver/Makefile driver/xscreensaver.pam driver/XScreenSaver.ad"
18310
18311cat >confcache <<\_ACEOF
18312# This file is a shell script that caches the results of configure
18313# tests run on this system so they can be shared between configure
18314# scripts and configure runs, see configure's option --config-cache.
18315# It is not useful on other systems.  If it contains results you don't
18316# want to keep, you may remove or edit it.
18317#
18318# config.status only pays attention to the cache file if you give it
18319# the --recheck option to rerun configure.
18320#
18321# `ac_cv_env_foo' variables (set or unset) will be overridden when
18322# loading this file, other *unset* `ac_cv_foo' will be assigned the
18323# following values.
18324
18325_ACEOF
18326
18327# The following way of writing the cache mishandles newlines in values,
18328# but we know of no workaround that is simple, portable, and efficient.
18329# So, we kill variables containing newlines.
18330# Ultrix sh set writes to stderr and can't be redirected directly,
18331# and sets the high bit in the cache file unless we assign to the vars.
18332(
18333  for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
18334    eval ac_val=\$$ac_var
18335    case $ac_val in #(
18336    *${as_nl}*)
18337      case $ac_var in #(
18338      *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
18339$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
18340      esac
18341      case $ac_var in #(
18342      _ | IFS | as_nl) ;; #(
18343      BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
18344      *) { eval $ac_var=; unset $ac_var;} ;;
18345      esac ;;
18346    esac
18347  done
18348
18349  (set) 2>&1 |
18350    case $as_nl`(ac_space=' '; set) 2>&1` in #(
18351    *${as_nl}ac_space=\ *)
18352      # `set' does not quote correctly, so add quotes: double-quote
18353      # substitution turns \\\\ into \\, and sed turns \\ into \.
18354      sed -n \
18355	"s/'/'\\\\''/g;
18356	  s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
18357      ;; #(
18358    *)
18359      # `set' quotes correctly as required by POSIX, so do not add quotes.
18360      sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
18361      ;;
18362    esac |
18363    sort
18364) |
18365  sed '
18366     /^ac_cv_env_/b end
18367     t clear
18368     :clear
18369     s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
18370     t end
18371     s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
18372     :end' >>confcache
18373if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
18374  if test -w "$cache_file"; then
18375    if test "x$cache_file" != "x/dev/null"; then
18376      { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5
18377$as_echo "$as_me: updating cache $cache_file" >&6;}
18378      if test ! -f "$cache_file" || test -h "$cache_file"; then
18379	cat confcache >"$cache_file"
18380      else
18381        case $cache_file in #(
18382        */* | ?:*)
18383	  mv -f confcache "$cache_file"$$ &&
18384	  mv -f "$cache_file"$$ "$cache_file" ;; #(
18385        *)
18386	  mv -f confcache "$cache_file" ;;
18387	esac
18388      fi
18389    fi
18390  else
18391    { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5
18392$as_echo "$as_me: not updating unwritable cache $cache_file" >&6;}
18393  fi
18394fi
18395rm -f confcache
18396
18397test "x$prefix" = xNONE && prefix=$ac_default_prefix
18398# Let make expand exec_prefix.
18399test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
18400
18401DEFS=-DHAVE_CONFIG_H
18402
18403ac_libobjs=
18404ac_ltlibobjs=
18405U=
18406for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
18407  # 1. Remove the extension, and $U if already installed.
18408  ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
18409  ac_i=`$as_echo "$ac_i" | sed "$ac_script"`
18410  # 2. Prepend LIBOBJDIR.  When used with automake>=1.10 LIBOBJDIR
18411  #    will be set to the directory where LIBOBJS objects are built.
18412  as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext"
18413  as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo'
18414done
18415LIBOBJS=$ac_libobjs
18416
18417LTLIBOBJS=$ac_ltlibobjs
18418
18419
18420
18421  ac_config_commands="$ac_config_commands po/stamp-it"
18422
18423
18424
18425: "${CONFIG_STATUS=./config.status}"
18426ac_write_fail=0
18427ac_clean_files_save=$ac_clean_files
18428ac_clean_files="$ac_clean_files $CONFIG_STATUS"
18429{ $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5
18430$as_echo "$as_me: creating $CONFIG_STATUS" >&6;}
18431as_write_fail=0
18432cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1
18433#! $SHELL
18434# Generated by $as_me.
18435# Run this file to recreate the current configuration.
18436# Compiler output produced by configure, useful for debugging
18437# configure, is in config.log if it exists.
18438
18439debug=false
18440ac_cs_recheck=false
18441ac_cs_silent=false
18442
18443SHELL=\${CONFIG_SHELL-$SHELL}
18444export SHELL
18445_ASEOF
18446cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1
18447## -------------------- ##
18448## M4sh Initialization. ##
18449## -------------------- ##
18450
18451# Be more Bourne compatible
18452DUALCASE=1; export DUALCASE # for MKS sh
18453if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
18454  emulate sh
18455  NULLCMD=:
18456  # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
18457  # is contrary to our usage.  Disable this feature.
18458  alias -g '${1+"$@"}'='"$@"'
18459  setopt NO_GLOB_SUBST
18460else
18461  case `(set -o) 2>/dev/null` in #(
18462  *posix*) :
18463    set -o posix ;; #(
18464  *) :
18465     ;;
18466esac
18467fi
18468
18469
18470as_nl='
18471'
18472export as_nl
18473# Printing a long string crashes Solaris 7 /usr/bin/printf.
18474as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
18475as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
18476as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
18477# Prefer a ksh shell builtin over an external printf program on Solaris,
18478# but without wasting forks for bash or zsh.
18479if test -z "$BASH_VERSION$ZSH_VERSION" \
18480    && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
18481  as_echo='print -r --'
18482  as_echo_n='print -rn --'
18483elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
18484  as_echo='printf %s\n'
18485  as_echo_n='printf %s'
18486else
18487  if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
18488    as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
18489    as_echo_n='/usr/ucb/echo -n'
18490  else
18491    as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
18492    as_echo_n_body='eval
18493      arg=$1;
18494      case $arg in #(
18495      *"$as_nl"*)
18496	expr "X$arg" : "X\\(.*\\)$as_nl";
18497	arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
18498      esac;
18499      expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
18500    '
18501    export as_echo_n_body
18502    as_echo_n='sh -c $as_echo_n_body as_echo'
18503  fi
18504  export as_echo_body
18505  as_echo='sh -c $as_echo_body as_echo'
18506fi
18507
18508# The user is always right.
18509if test "${PATH_SEPARATOR+set}" != set; then
18510  PATH_SEPARATOR=:
18511  (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
18512    (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
18513      PATH_SEPARATOR=';'
18514  }
18515fi
18516
18517
18518# IFS
18519# We need space, tab and new line, in precisely that order.  Quoting is
18520# there to prevent editors from complaining about space-tab.
18521# (If _AS_PATH_WALK were called with IFS unset, it would disable word
18522# splitting by setting IFS to empty value.)
18523IFS=" ""	$as_nl"
18524
18525# Find who we are.  Look in the path if we contain no directory separator.
18526as_myself=
18527case $0 in #((
18528  *[\\/]* ) as_myself=$0 ;;
18529  *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18530for as_dir in $PATH
18531do
18532  IFS=$as_save_IFS
18533  test -z "$as_dir" && as_dir=.
18534    test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
18535  done
18536IFS=$as_save_IFS
18537
18538     ;;
18539esac
18540# We did not find ourselves, most probably we were run as `sh COMMAND'
18541# in which case we are not to be found in the path.
18542if test "x$as_myself" = x; then
18543  as_myself=$0
18544fi
18545if test ! -f "$as_myself"; then
18546  $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
18547  exit 1
18548fi
18549
18550# Unset variables that we do not need and which cause bugs (e.g. in
18551# pre-3.0 UWIN ksh).  But do not cause bugs in bash 2.01; the "|| exit 1"
18552# suppresses any "Segmentation fault" message there.  '((' could
18553# trigger a bug in pdksh 5.2.14.
18554for as_var in BASH_ENV ENV MAIL MAILPATH
18555do eval test x\${$as_var+set} = xset \
18556  && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
18557done
18558PS1='$ '
18559PS2='> '
18560PS4='+ '
18561
18562# NLS nuisances.
18563LC_ALL=C
18564export LC_ALL
18565LANGUAGE=C
18566export LANGUAGE
18567
18568# CDPATH.
18569(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
18570
18571
18572# as_fn_error STATUS ERROR [LINENO LOG_FD]
18573# ----------------------------------------
18574# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
18575# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
18576# script with STATUS, using 1 if that was 0.
18577as_fn_error ()
18578{
18579  as_status=$1; test $as_status -eq 0 && as_status=1
18580  if test "$4"; then
18581    as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
18582    $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
18583  fi
18584  $as_echo "$as_me: error: $2" >&2
18585  as_fn_exit $as_status
18586} # as_fn_error
18587
18588
18589# as_fn_set_status STATUS
18590# -----------------------
18591# Set $? to STATUS, without forking.
18592as_fn_set_status ()
18593{
18594  return $1
18595} # as_fn_set_status
18596
18597# as_fn_exit STATUS
18598# -----------------
18599# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
18600as_fn_exit ()
18601{
18602  set +e
18603  as_fn_set_status $1
18604  exit $1
18605} # as_fn_exit
18606
18607# as_fn_unset VAR
18608# ---------------
18609# Portably unset VAR.
18610as_fn_unset ()
18611{
18612  { eval $1=; unset $1;}
18613}
18614as_unset=as_fn_unset
18615# as_fn_append VAR VALUE
18616# ----------------------
18617# Append the text in VALUE to the end of the definition contained in VAR. Take
18618# advantage of any shell optimizations that allow amortized linear growth over
18619# repeated appends, instead of the typical quadratic growth present in naive
18620# implementations.
18621if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
18622  eval 'as_fn_append ()
18623  {
18624    eval $1+=\$2
18625  }'
18626else
18627  as_fn_append ()
18628  {
18629    eval $1=\$$1\$2
18630  }
18631fi # as_fn_append
18632
18633# as_fn_arith ARG...
18634# ------------------
18635# Perform arithmetic evaluation on the ARGs, and store the result in the
18636# global $as_val. Take advantage of shells that can avoid forks. The arguments
18637# must be portable across $(()) and expr.
18638if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
18639  eval 'as_fn_arith ()
18640  {
18641    as_val=$(( $* ))
18642  }'
18643else
18644  as_fn_arith ()
18645  {
18646    as_val=`expr "$@" || test $? -eq 1`
18647  }
18648fi # as_fn_arith
18649
18650
18651if expr a : '\(a\)' >/dev/null 2>&1 &&
18652   test "X`expr 00001 : '.*\(...\)'`" = X001; then
18653  as_expr=expr
18654else
18655  as_expr=false
18656fi
18657
18658if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
18659  as_basename=basename
18660else
18661  as_basename=false
18662fi
18663
18664if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
18665  as_dirname=dirname
18666else
18667  as_dirname=false
18668fi
18669
18670as_me=`$as_basename -- "$0" ||
18671$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
18672	 X"$0" : 'X\(//\)$' \| \
18673	 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
18674$as_echo X/"$0" |
18675    sed '/^.*\/\([^/][^/]*\)\/*$/{
18676	    s//\1/
18677	    q
18678	  }
18679	  /^X\/\(\/\/\)$/{
18680	    s//\1/
18681	    q
18682	  }
18683	  /^X\/\(\/\).*/{
18684	    s//\1/
18685	    q
18686	  }
18687	  s/.*/./; q'`
18688
18689# Avoid depending upon Character Ranges.
18690as_cr_letters='abcdefghijklmnopqrstuvwxyz'
18691as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
18692as_cr_Letters=$as_cr_letters$as_cr_LETTERS
18693as_cr_digits='0123456789'
18694as_cr_alnum=$as_cr_Letters$as_cr_digits
18695
18696ECHO_C= ECHO_N= ECHO_T=
18697case `echo -n x` in #(((((
18698-n*)
18699  case `echo 'xy\c'` in
18700  *c*) ECHO_T='	';;	# ECHO_T is single tab character.
18701  xy)  ECHO_C='\c';;
18702  *)   echo `echo ksh88 bug on AIX 6.1` > /dev/null
18703       ECHO_T='	';;
18704  esac;;
18705*)
18706  ECHO_N='-n';;
18707esac
18708
18709rm -f conf$$ conf$$.exe conf$$.file
18710if test -d conf$$.dir; then
18711  rm -f conf$$.dir/conf$$.file
18712else
18713  rm -f conf$$.dir
18714  mkdir conf$$.dir 2>/dev/null
18715fi
18716if (echo >conf$$.file) 2>/dev/null; then
18717  if ln -s conf$$.file conf$$ 2>/dev/null; then
18718    as_ln_s='ln -s'
18719    # ... but there are two gotchas:
18720    # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
18721    # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
18722    # In both cases, we have to default to `cp -pR'.
18723    ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
18724      as_ln_s='cp -pR'
18725  elif ln conf$$.file conf$$ 2>/dev/null; then
18726    as_ln_s=ln
18727  else
18728    as_ln_s='cp -pR'
18729  fi
18730else
18731  as_ln_s='cp -pR'
18732fi
18733rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
18734rmdir conf$$.dir 2>/dev/null
18735
18736
18737# as_fn_mkdir_p
18738# -------------
18739# Create "$as_dir" as a directory, including parents if necessary.
18740as_fn_mkdir_p ()
18741{
18742
18743  case $as_dir in #(
18744  -*) as_dir=./$as_dir;;
18745  esac
18746  test -d "$as_dir" || eval $as_mkdir_p || {
18747    as_dirs=
18748    while :; do
18749      case $as_dir in #(
18750      *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
18751      *) as_qdir=$as_dir;;
18752      esac
18753      as_dirs="'$as_qdir' $as_dirs"
18754      as_dir=`$as_dirname -- "$as_dir" ||
18755$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
18756	 X"$as_dir" : 'X\(//\)[^/]' \| \
18757	 X"$as_dir" : 'X\(//\)$' \| \
18758	 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
18759$as_echo X"$as_dir" |
18760    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
18761	    s//\1/
18762	    q
18763	  }
18764	  /^X\(\/\/\)[^/].*/{
18765	    s//\1/
18766	    q
18767	  }
18768	  /^X\(\/\/\)$/{
18769	    s//\1/
18770	    q
18771	  }
18772	  /^X\(\/\).*/{
18773	    s//\1/
18774	    q
18775	  }
18776	  s/.*/./; q'`
18777      test -d "$as_dir" && break
18778    done
18779    test -z "$as_dirs" || eval "mkdir $as_dirs"
18780  } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
18781
18782
18783} # as_fn_mkdir_p
18784if mkdir -p . 2>/dev/null; then
18785  as_mkdir_p='mkdir -p "$as_dir"'
18786else
18787  test -d ./-p && rmdir ./-p
18788  as_mkdir_p=false
18789fi
18790
18791
18792# as_fn_executable_p FILE
18793# -----------------------
18794# Test if FILE is an executable regular file.
18795as_fn_executable_p ()
18796{
18797  test -f "$1" && test -x "$1"
18798} # as_fn_executable_p
18799as_test_x='test -x'
18800as_executable_p=as_fn_executable_p
18801
18802# Sed expression to map a string onto a valid CPP name.
18803as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
18804
18805# Sed expression to map a string onto a valid variable name.
18806as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
18807
18808
18809exec 6>&1
18810## ----------------------------------- ##
18811## Main body of $CONFIG_STATUS script. ##
18812## ----------------------------------- ##
18813_ASEOF
18814test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1
18815
18816cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
18817# Save the log message, to keep $0 and so on meaningful, and to
18818# report actual input values of CONFIG_FILES etc. instead of their
18819# values after options handling.
18820ac_log="
18821This file was extended by $as_me, which was
18822generated by GNU Autoconf 2.69.  Invocation command line was
18823
18824  CONFIG_FILES    = $CONFIG_FILES
18825  CONFIG_HEADERS  = $CONFIG_HEADERS
18826  CONFIG_LINKS    = $CONFIG_LINKS
18827  CONFIG_COMMANDS = $CONFIG_COMMANDS
18828  $ $0 $@
18829
18830on `(hostname || uname -n) 2>/dev/null | sed 1q`
18831"
18832
18833_ACEOF
18834
18835case $ac_config_files in *"
18836"*) set x $ac_config_files; shift; ac_config_files=$*;;
18837esac
18838
18839case $ac_config_headers in *"
18840"*) set x $ac_config_headers; shift; ac_config_headers=$*;;
18841esac
18842
18843
18844cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
18845# Files that config.status was made for.
18846config_files="$ac_config_files"
18847config_headers="$ac_config_headers"
18848config_commands="$ac_config_commands"
18849
18850_ACEOF
18851
18852cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
18853ac_cs_usage="\
18854\`$as_me' instantiates files and other configuration actions
18855from templates according to the current configuration.  Unless the files
18856and actions are specified as TAGs, all are instantiated by default.
18857
18858Usage: $0 [OPTION]... [TAG]...
18859
18860  -h, --help       print this help, then exit
18861  -V, --version    print version number and configuration settings, then exit
18862      --config     print configuration, then exit
18863  -q, --quiet, --silent
18864                   do not print progress messages
18865  -d, --debug      don't remove temporary files
18866      --recheck    update $as_me by reconfiguring in the same conditions
18867      --file=FILE[:TEMPLATE]
18868                   instantiate the configuration file FILE
18869      --header=FILE[:TEMPLATE]
18870                   instantiate the configuration header FILE
18871
18872Configuration files:
18873$config_files
18874
18875Configuration headers:
18876$config_headers
18877
18878Configuration commands:
18879$config_commands
18880
18881Report bugs to the package provider."
18882
18883_ACEOF
18884cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
18885ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
18886ac_cs_version="\\
18887config.status
18888configured by $0, generated by GNU Autoconf 2.69,
18889  with options \\"\$ac_cs_config\\"
18890
18891Copyright (C) 2012 Free Software Foundation, Inc.
18892This config.status script is free software; the Free Software Foundation
18893gives unlimited permission to copy, distribute and modify it."
18894
18895ac_pwd='$ac_pwd'
18896srcdir='$srcdir'
18897INSTALL='$INSTALL'
18898test -n "\$AWK" || AWK=awk
18899_ACEOF
18900
18901cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
18902# The default lists apply if the user does not specify any file.
18903ac_need_defaults=:
18904while test $# != 0
18905do
18906  case $1 in
18907  --*=?*)
18908    ac_option=`expr "X$1" : 'X\([^=]*\)='`
18909    ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
18910    ac_shift=:
18911    ;;
18912  --*=)
18913    ac_option=`expr "X$1" : 'X\([^=]*\)='`
18914    ac_optarg=
18915    ac_shift=:
18916    ;;
18917  *)
18918    ac_option=$1
18919    ac_optarg=$2
18920    ac_shift=shift
18921    ;;
18922  esac
18923
18924  case $ac_option in
18925  # Handling of the options.
18926  -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
18927    ac_cs_recheck=: ;;
18928  --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
18929    $as_echo "$ac_cs_version"; exit ;;
18930  --config | --confi | --conf | --con | --co | --c )
18931    $as_echo "$ac_cs_config"; exit ;;
18932  --debug | --debu | --deb | --de | --d | -d )
18933    debug=: ;;
18934  --file | --fil | --fi | --f )
18935    $ac_shift
18936    case $ac_optarg in
18937    *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
18938    '') as_fn_error $? "missing file argument" ;;
18939    esac
18940    as_fn_append CONFIG_FILES " '$ac_optarg'"
18941    ac_need_defaults=false;;
18942  --header | --heade | --head | --hea )
18943    $ac_shift
18944    case $ac_optarg in
18945    *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
18946    esac
18947    as_fn_append CONFIG_HEADERS " '$ac_optarg'"
18948    ac_need_defaults=false;;
18949  --he | --h)
18950    # Conflict between --help and --header
18951    as_fn_error $? "ambiguous option: \`$1'
18952Try \`$0 --help' for more information.";;
18953  --help | --hel | -h )
18954    $as_echo "$ac_cs_usage"; exit ;;
18955  -q | -quiet | --quiet | --quie | --qui | --qu | --q \
18956  | -silent | --silent | --silen | --sile | --sil | --si | --s)
18957    ac_cs_silent=: ;;
18958
18959  # This is an error.
18960  -*) as_fn_error $? "unrecognized option: \`$1'
18961Try \`$0 --help' for more information." ;;
18962
18963  *) as_fn_append ac_config_targets " $1"
18964     ac_need_defaults=false ;;
18965
18966  esac
18967  shift
18968done
18969
18970ac_configure_extra_args=
18971
18972if $ac_cs_silent; then
18973  exec 6>/dev/null
18974  ac_configure_extra_args="$ac_configure_extra_args --silent"
18975fi
18976
18977_ACEOF
18978cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
18979if \$ac_cs_recheck; then
18980  set X $SHELL '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
18981  shift
18982  \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6
18983  CONFIG_SHELL='$SHELL'
18984  export CONFIG_SHELL
18985  exec "\$@"
18986fi
18987
18988_ACEOF
18989cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
18990exec 5>>config.log
18991{
18992  echo
18993  sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
18994## Running $as_me. ##
18995_ASBOX
18996  $as_echo "$ac_log"
18997} >&5
18998
18999_ACEOF
19000cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
19001#
19002# INIT-COMMANDS
19003#
19004
19005
19006_ACEOF
19007
19008cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
19009
19010# Handling of arguments.
19011for ac_config_target in $ac_config_targets
19012do
19013  case $ac_config_target in
19014    "config.h") CONFIG_HEADERS="$CONFIG_HEADERS config.h" ;;
19015    "default-1") CONFIG_COMMANDS="$CONFIG_COMMANDS default-1" ;;
19016    "Makefile") CONFIG_FILES="$CONFIG_FILES Makefile" ;;
19017    "utils/Makefile") CONFIG_FILES="$CONFIG_FILES utils/Makefile" ;;
19018    "jwxyz/Makefile") CONFIG_FILES="$CONFIG_FILES jwxyz/Makefile" ;;
19019    "hacks/Makefile") CONFIG_FILES="$CONFIG_FILES hacks/Makefile" ;;
19020    "xlockmore/xlock/Makefile") CONFIG_FILES="$CONFIG_FILES xlockmore/xlock/Makefile" ;;
19021    "xlockmore/modes/Makefile") CONFIG_FILES="$CONFIG_FILES xlockmore/modes/Makefile" ;;
19022    "xlockmore/modes/glx/Makefile") CONFIG_FILES="$CONFIG_FILES xlockmore/modes/glx/Makefile" ;;
19023    "hacks/fonts/Makefile") CONFIG_FILES="$CONFIG_FILES hacks/fonts/Makefile" ;;
19024    "hacks/images/Makefile") CONFIG_FILES="$CONFIG_FILES hacks/images/Makefile" ;;
19025    "hacks/glx/Makefile") CONFIG_FILES="$CONFIG_FILES hacks/glx/Makefile" ;;
19026    "po/Makefile.in") CONFIG_FILES="$CONFIG_FILES po/Makefile.in" ;;
19027    "driver/Makefile") CONFIG_FILES="$CONFIG_FILES driver/Makefile" ;;
19028    "driver/xscreensaver.pam") CONFIG_FILES="$CONFIG_FILES driver/xscreensaver.pam" ;;
19029    "driver/XScreenSaver.ad") CONFIG_FILES="$CONFIG_FILES driver/XScreenSaver.ad" ;;
19030    "po/stamp-it") CONFIG_COMMANDS="$CONFIG_COMMANDS po/stamp-it" ;;
19031
19032  *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
19033  esac
19034done
19035
19036
19037# If the user did not use the arguments to specify the items to instantiate,
19038# then the envvar interface is used.  Set only those that are not.
19039# We use the long form for the default assignment because of an extremely
19040# bizarre bug on SunOS 4.1.3.
19041if $ac_need_defaults; then
19042  test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
19043  test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
19044  test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands
19045fi
19046
19047# Have a temporary directory for convenience.  Make it in the build tree
19048# simply because there is no reason against having it here, and in addition,
19049# creating and moving files from /tmp can sometimes cause problems.
19050# Hook for its removal unless debugging.
19051# Note that there is a small window in which the directory will not be cleaned:
19052# after its creation but before its name has been assigned to `$tmp'.
19053$debug ||
19054{
19055  tmp= ac_tmp=
19056  trap 'exit_status=$?
19057  : "${ac_tmp:=$tmp}"
19058  { test ! -d "$ac_tmp" || rm -fr "$ac_tmp"; } && exit $exit_status
19059' 0
19060  trap 'as_fn_exit 1' 1 2 13 15
19061}
19062# Create a (secure) tmp directory for tmp files.
19063
19064{
19065  tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
19066  test -d "$tmp"
19067}  ||
19068{
19069  tmp=./conf$$-$RANDOM
19070  (umask 077 && mkdir "$tmp")
19071} || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5
19072ac_tmp=$tmp
19073
19074# Set up the scripts for CONFIG_FILES section.
19075# No need to generate them if there are no CONFIG_FILES.
19076# This happens for instance with `./config.status config.h'.
19077if test -n "$CONFIG_FILES"; then
19078
19079
19080ac_cr=`echo X | tr X '\015'`
19081# On cygwin, bash can eat \r inside `` if the user requested igncr.
19082# But we know of no other shell where ac_cr would be empty at this
19083# point, so we can use a bashism as a fallback.
19084if test "x$ac_cr" = x; then
19085  eval ac_cr=\$\'\\r\'
19086fi
19087ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null`
19088if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then
19089  ac_cs_awk_cr='\\r'
19090else
19091  ac_cs_awk_cr=$ac_cr
19092fi
19093
19094echo 'BEGIN {' >"$ac_tmp/subs1.awk" &&
19095_ACEOF
19096
19097
19098{
19099  echo "cat >conf$$subs.awk <<_ACEOF" &&
19100  echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' &&
19101  echo "_ACEOF"
19102} >conf$$subs.sh ||
19103  as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
19104ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'`
19105ac_delim='%!_!# '
19106for ac_last_try in false false false false false :; do
19107  . ./conf$$subs.sh ||
19108    as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
19109
19110  ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X`
19111  if test $ac_delim_n = $ac_delim_num; then
19112    break
19113  elif $ac_last_try; then
19114    as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
19115  else
19116    ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
19117  fi
19118done
19119rm -f conf$$subs.sh
19120
19121cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
19122cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK &&
19123_ACEOF
19124sed -n '
19125h
19126s/^/S["/; s/!.*/"]=/
19127p
19128g
19129s/^[^!]*!//
19130:repl
19131t repl
19132s/'"$ac_delim"'$//
19133t delim
19134:nl
19135h
19136s/\(.\{148\}\)..*/\1/
19137t more1
19138s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/
19139p
19140n
19141b repl
19142:more1
19143s/["\\]/\\&/g; s/^/"/; s/$/"\\/
19144p
19145g
19146s/.\{148\}//
19147t nl
19148:delim
19149h
19150s/\(.\{148\}\)..*/\1/
19151t more2
19152s/["\\]/\\&/g; s/^/"/; s/$/"/
19153p
19154b
19155:more2
19156s/["\\]/\\&/g; s/^/"/; s/$/"\\/
19157p
19158g
19159s/.\{148\}//
19160t delim
19161' <conf$$subs.awk | sed '
19162/^[^""]/{
19163  N
19164  s/\n//
19165}
19166' >>$CONFIG_STATUS || ac_write_fail=1
19167rm -f conf$$subs.awk
19168cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
19169_ACAWK
19170cat >>"\$ac_tmp/subs1.awk" <<_ACAWK &&
19171  for (key in S) S_is_set[key] = 1
19172  FS = ""
19173
19174}
19175{
19176  line = $ 0
19177  nfields = split(line, field, "@")
19178  substed = 0
19179  len = length(field[1])
19180  for (i = 2; i < nfields; i++) {
19181    key = field[i]
19182    keylen = length(key)
19183    if (S_is_set[key]) {
19184      value = S[key]
19185      line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3)
19186      len += length(value) + length(field[++i])
19187      substed = 1
19188    } else
19189      len += 1 + keylen
19190  }
19191
19192  print line
19193}
19194
19195_ACAWK
19196_ACEOF
19197cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
19198if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then
19199  sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g"
19200else
19201  cat
19202fi < "$ac_tmp/subs1.awk" > "$ac_tmp/subs.awk" \
19203  || as_fn_error $? "could not setup config files machinery" "$LINENO" 5
19204_ACEOF
19205
19206# VPATH may cause trouble with some makes, so we remove sole $(srcdir),
19207# ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and
19208# trailing colons and then remove the whole line if VPATH becomes empty
19209# (actually we leave an empty line to preserve line numbers).
19210if test "x$srcdir" = x.; then
19211  ac_vpsub='/^[	 ]*VPATH[	 ]*=[	 ]*/{
19212h
19213s///
19214s/^/:/
19215s/[	 ]*$/:/
19216s/:\$(srcdir):/:/g
19217s/:\${srcdir}:/:/g
19218s/:@srcdir@:/:/g
19219s/^:*//
19220s/:*$//
19221x
19222s/\(=[	 ]*\).*/\1/
19223G
19224s/\n//
19225s/^[^=]*=[	 ]*$//
19226}'
19227fi
19228
19229cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
19230fi # test -n "$CONFIG_FILES"
19231
19232# Set up the scripts for CONFIG_HEADERS section.
19233# No need to generate them if there are no CONFIG_HEADERS.
19234# This happens for instance with `./config.status Makefile'.
19235if test -n "$CONFIG_HEADERS"; then
19236cat >"$ac_tmp/defines.awk" <<\_ACAWK ||
19237BEGIN {
19238_ACEOF
19239
19240# Transform confdefs.h into an awk script `defines.awk', embedded as
19241# here-document in config.status, that substitutes the proper values into
19242# config.h.in to produce config.h.
19243
19244# Create a delimiter string that does not exist in confdefs.h, to ease
19245# handling of long lines.
19246ac_delim='%!_!# '
19247for ac_last_try in false false :; do
19248  ac_tt=`sed -n "/$ac_delim/p" confdefs.h`
19249  if test -z "$ac_tt"; then
19250    break
19251  elif $ac_last_try; then
19252    as_fn_error $? "could not make $CONFIG_HEADERS" "$LINENO" 5
19253  else
19254    ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
19255  fi
19256done
19257
19258# For the awk script, D is an array of macro values keyed by name,
19259# likewise P contains macro parameters if any.  Preserve backslash
19260# newline sequences.
19261
19262ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]*
19263sed -n '
19264s/.\{148\}/&'"$ac_delim"'/g
19265t rset
19266:rset
19267s/^[	 ]*#[	 ]*define[	 ][	 ]*/ /
19268t def
19269d
19270:def
19271s/\\$//
19272t bsnl
19273s/["\\]/\\&/g
19274s/^ \('"$ac_word_re"'\)\(([^()]*)\)[	 ]*\(.*\)/P["\1"]="\2"\
19275D["\1"]=" \3"/p
19276s/^ \('"$ac_word_re"'\)[	 ]*\(.*\)/D["\1"]=" \2"/p
19277d
19278:bsnl
19279s/["\\]/\\&/g
19280s/^ \('"$ac_word_re"'\)\(([^()]*)\)[	 ]*\(.*\)/P["\1"]="\2"\
19281D["\1"]=" \3\\\\\\n"\\/p
19282t cont
19283s/^ \('"$ac_word_re"'\)[	 ]*\(.*\)/D["\1"]=" \2\\\\\\n"\\/p
19284t cont
19285d
19286:cont
19287n
19288s/.\{148\}/&'"$ac_delim"'/g
19289t clear
19290:clear
19291s/\\$//
19292t bsnlc
19293s/["\\]/\\&/g; s/^/"/; s/$/"/p
19294d
19295:bsnlc
19296s/["\\]/\\&/g; s/^/"/; s/$/\\\\\\n"\\/p
19297b cont
19298' <confdefs.h | sed '
19299s/'"$ac_delim"'/"\\\
19300"/g' >>$CONFIG_STATUS || ac_write_fail=1
19301
19302cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
19303  for (key in D) D_is_set[key] = 1
19304  FS = ""
19305}
19306/^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\$)/ {
19307  line = \$ 0
19308  split(line, arg, " ")
19309  if (arg[1] == "#") {
19310    defundef = arg[2]
19311    mac1 = arg[3]
19312  } else {
19313    defundef = substr(arg[1], 2)
19314    mac1 = arg[2]
19315  }
19316  split(mac1, mac2, "(") #)
19317  macro = mac2[1]
19318  prefix = substr(line, 1, index(line, defundef) - 1)
19319  if (D_is_set[macro]) {
19320    # Preserve the white space surrounding the "#".
19321    print prefix "define", macro P[macro] D[macro]
19322    next
19323  } else {
19324    # Replace #undef with comments.  This is necessary, for example,
19325    # in the case of _POSIX_SOURCE, which is predefined and required
19326    # on some systems where configure will not decide to define it.
19327    if (defundef == "undef") {
19328      print "/*", prefix defundef, macro, "*/"
19329      next
19330    }
19331  }
19332}
19333{ print }
19334_ACAWK
19335_ACEOF
19336cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
19337  as_fn_error $? "could not setup config headers machinery" "$LINENO" 5
19338fi # test -n "$CONFIG_HEADERS"
19339
19340
19341eval set X "  :F $CONFIG_FILES  :H $CONFIG_HEADERS    :C $CONFIG_COMMANDS"
19342shift
19343for ac_tag
19344do
19345  case $ac_tag in
19346  :[FHLC]) ac_mode=$ac_tag; continue;;
19347  esac
19348  case $ac_mode$ac_tag in
19349  :[FHL]*:*);;
19350  :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;;
19351  :[FH]-) ac_tag=-:-;;
19352  :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
19353  esac
19354  ac_save_IFS=$IFS
19355  IFS=:
19356  set x $ac_tag
19357  IFS=$ac_save_IFS
19358  shift
19359  ac_file=$1
19360  shift
19361
19362  case $ac_mode in
19363  :L) ac_source=$1;;
19364  :[FH])
19365    ac_file_inputs=
19366    for ac_f
19367    do
19368      case $ac_f in
19369      -) ac_f="$ac_tmp/stdin";;
19370      *) # Look for the file first in the build tree, then in the source tree
19371	 # (if the path is not absolute).  The absolute path cannot be DOS-style,
19372	 # because $ac_f cannot contain `:'.
19373	 test -f "$ac_f" ||
19374	   case $ac_f in
19375	   [\\/$]*) false;;
19376	   *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
19377	   esac ||
19378	   as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;;
19379      esac
19380      case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
19381      as_fn_append ac_file_inputs " '$ac_f'"
19382    done
19383
19384    # Let's still pretend it is `configure' which instantiates (i.e., don't
19385    # use $as_me), people would be surprised to read:
19386    #    /* config.h.  Generated by config.status.  */
19387    configure_input='Generated from '`
19388	  $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g'
19389	`' by configure.'
19390    if test x"$ac_file" != x-; then
19391      configure_input="$ac_file.  $configure_input"
19392      { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5
19393$as_echo "$as_me: creating $ac_file" >&6;}
19394    fi
19395    # Neutralize special characters interpreted by sed in replacement strings.
19396    case $configure_input in #(
19397    *\&* | *\|* | *\\* )
19398       ac_sed_conf_input=`$as_echo "$configure_input" |
19399       sed 's/[\\\\&|]/\\\\&/g'`;; #(
19400    *) ac_sed_conf_input=$configure_input;;
19401    esac
19402
19403    case $ac_tag in
19404    *:-:* | *:-) cat >"$ac_tmp/stdin" \
19405      || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;;
19406    esac
19407    ;;
19408  esac
19409
19410  ac_dir=`$as_dirname -- "$ac_file" ||
19411$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
19412	 X"$ac_file" : 'X\(//\)[^/]' \| \
19413	 X"$ac_file" : 'X\(//\)$' \| \
19414	 X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
19415$as_echo X"$ac_file" |
19416    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
19417	    s//\1/
19418	    q
19419	  }
19420	  /^X\(\/\/\)[^/].*/{
19421	    s//\1/
19422	    q
19423	  }
19424	  /^X\(\/\/\)$/{
19425	    s//\1/
19426	    q
19427	  }
19428	  /^X\(\/\).*/{
19429	    s//\1/
19430	    q
19431	  }
19432	  s/.*/./; q'`
19433  as_dir="$ac_dir"; as_fn_mkdir_p
19434  ac_builddir=.
19435
19436case "$ac_dir" in
19437.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
19438*)
19439  ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
19440  # A ".." for each directory in $ac_dir_suffix.
19441  ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
19442  case $ac_top_builddir_sub in
19443  "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
19444  *)  ac_top_build_prefix=$ac_top_builddir_sub/ ;;
19445  esac ;;
19446esac
19447ac_abs_top_builddir=$ac_pwd
19448ac_abs_builddir=$ac_pwd$ac_dir_suffix
19449# for backward compatibility:
19450ac_top_builddir=$ac_top_build_prefix
19451
19452case $srcdir in
19453  .)  # We are building in place.
19454    ac_srcdir=.
19455    ac_top_srcdir=$ac_top_builddir_sub
19456    ac_abs_top_srcdir=$ac_pwd ;;
19457  [\\/]* | ?:[\\/]* )  # Absolute name.
19458    ac_srcdir=$srcdir$ac_dir_suffix;
19459    ac_top_srcdir=$srcdir
19460    ac_abs_top_srcdir=$srcdir ;;
19461  *) # Relative name.
19462    ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
19463    ac_top_srcdir=$ac_top_build_prefix$srcdir
19464    ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
19465esac
19466ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
19467
19468
19469  case $ac_mode in
19470  :F)
19471  #
19472  # CONFIG_FILE
19473  #
19474
19475  case $INSTALL in
19476  [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
19477  *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;;
19478  esac
19479_ACEOF
19480
19481cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
19482# If the template does not know about datarootdir, expand it.
19483# FIXME: This hack should be removed a few years after 2.60.
19484ac_datarootdir_hack=; ac_datarootdir_seen=
19485ac_sed_dataroot='
19486/datarootdir/ {
19487  p
19488  q
19489}
19490/@datadir@/p
19491/@docdir@/p
19492/@infodir@/p
19493/@localedir@/p
19494/@mandir@/p'
19495case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in
19496*datarootdir*) ac_datarootdir_seen=yes;;
19497*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
19498  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
19499$as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
19500_ACEOF
19501cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
19502  ac_datarootdir_hack='
19503  s&@datadir@&$datadir&g
19504  s&@docdir@&$docdir&g
19505  s&@infodir@&$infodir&g
19506  s&@localedir@&$localedir&g
19507  s&@mandir@&$mandir&g
19508  s&\\\${datarootdir}&$datarootdir&g' ;;
19509esac
19510_ACEOF
19511
19512# Neutralize VPATH when `$srcdir' = `.'.
19513# Shell code in configure.ac might set extrasub.
19514# FIXME: do we really want to maintain this feature?
19515cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
19516ac_sed_extra="$ac_vpsub
19517$extrasub
19518_ACEOF
19519cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
19520:t
19521/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
19522s|@configure_input@|$ac_sed_conf_input|;t t
19523s&@top_builddir@&$ac_top_builddir_sub&;t t
19524s&@top_build_prefix@&$ac_top_build_prefix&;t t
19525s&@srcdir@&$ac_srcdir&;t t
19526s&@abs_srcdir@&$ac_abs_srcdir&;t t
19527s&@top_srcdir@&$ac_top_srcdir&;t t
19528s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
19529s&@builddir@&$ac_builddir&;t t
19530s&@abs_builddir@&$ac_abs_builddir&;t t
19531s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
19532s&@INSTALL@&$ac_INSTALL&;t t
19533$ac_datarootdir_hack
19534"
19535eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$ac_tmp/subs.awk" \
19536  >$ac_tmp/out || as_fn_error $? "could not create $ac_file" "$LINENO" 5
19537
19538test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
19539  { ac_out=`sed -n '/\${datarootdir}/p' "$ac_tmp/out"`; test -n "$ac_out"; } &&
19540  { ac_out=`sed -n '/^[	 ]*datarootdir[	 ]*:*=/p' \
19541      "$ac_tmp/out"`; test -z "$ac_out"; } &&
19542  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir'
19543which seems to be undefined.  Please make sure it is defined" >&5
19544$as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
19545which seems to be undefined.  Please make sure it is defined" >&2;}
19546
19547  rm -f "$ac_tmp/stdin"
19548  case $ac_file in
19549  -) cat "$ac_tmp/out" && rm -f "$ac_tmp/out";;
19550  *) rm -f "$ac_file" && mv "$ac_tmp/out" "$ac_file";;
19551  esac \
19552  || as_fn_error $? "could not create $ac_file" "$LINENO" 5
19553 ;;
19554  :H)
19555  #
19556  # CONFIG_HEADER
19557  #
19558  if test x"$ac_file" != x-; then
19559    {
19560      $as_echo "/* $configure_input  */" \
19561      && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs"
19562    } >"$ac_tmp/config.h" \
19563      || as_fn_error $? "could not create $ac_file" "$LINENO" 5
19564    if diff "$ac_file" "$ac_tmp/config.h" >/dev/null 2>&1; then
19565      { $as_echo "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5
19566$as_echo "$as_me: $ac_file is unchanged" >&6;}
19567    else
19568      rm -f "$ac_file"
19569      mv "$ac_tmp/config.h" "$ac_file" \
19570	|| as_fn_error $? "could not create $ac_file" "$LINENO" 5
19571    fi
19572  else
19573    $as_echo "/* $configure_input  */" \
19574      && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs" \
19575      || as_fn_error $? "could not create -" "$LINENO" 5
19576  fi
19577 ;;
19578
19579  :C)  { $as_echo "$as_me:${as_lineno-$LINENO}: executing $ac_file commands" >&5
19580$as_echo "$as_me: executing $ac_file commands" >&6;}
19581 ;;
19582  esac
19583
19584
19585  case $ac_file$ac_mode in
19586    "default-1":C) case "$CONFIG_FILES" in *po/Makefile.in*)
19587        sed -e "/POTFILES =/r po/POTFILES" po/Makefile.in > po/Makefile
19588      esac ;;
19589    "po/stamp-it":C)
19590    if  ! grep "^# INTLTOOL_MAKEFILE$" "po/Makefile.in" > /dev/null ; then
19591       as_fn_error $? "po/Makefile.in.in was not created by intltoolize." "$LINENO" 5
19592    fi
19593    rm -f "po/stamp-it" "po/stamp-it.tmp" "po/POTFILES" "po/Makefile.tmp"
19594    >"po/stamp-it.tmp"
19595    sed '/^#/d
19596	 s/^[[].*] *//
19597	 /^[ 	]*$/d
19598	'"s|^|	$ac_top_srcdir/|" \
19599      "$srcdir/po/POTFILES.in" | sed '$!s/$/ \\/' >"po/POTFILES"
19600
19601    sed '/^POTFILES =/,/[^\\]$/ {
19602		/^POTFILES =/!d
19603		r po/POTFILES
19604	  }
19605	 ' "po/Makefile.in" >"po/Makefile"
19606    rm -f "po/Makefile.tmp"
19607    mv "po/stamp-it.tmp" "po/stamp-it"
19608   ;;
19609
19610  esac
19611done # for ac_tag
19612
19613
19614as_fn_exit 0
19615_ACEOF
19616ac_clean_files=$ac_clean_files_save
19617
19618test $ac_write_fail = 0 ||
19619  as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5
19620
19621
19622# configure is writing to config.log, and then calls config.status.
19623# config.status does its own redirection, appending to config.log.
19624# Unfortunately, on DOS this fails, as config.log is still kept open
19625# by configure, so config.status won't be able to write to it; its
19626# output is simply discarded.  So we exec the FD to /dev/null,
19627# effectively closing config.log, so it can be properly (re)opened and
19628# appended to by config.status.  When coming back to configure, we
19629# need to make the FD available again.
19630if test "$no_create" != yes; then
19631  ac_cs_success=:
19632  ac_config_status_args=
19633  test "$silent" = yes &&
19634    ac_config_status_args="$ac_config_status_args --quiet"
19635  exec 5>/dev/null
19636  $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
19637  exec 5>>config.log
19638  # Use ||, not &&, to avoid exiting from the if with $? = 1, which
19639  # would make configure fail if this is the last instruction.
19640  $ac_cs_success || as_fn_exit 1
19641fi
19642if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
19643  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
19644$as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}
19645fi
19646
19647
19648###############################################################################
19649#
19650#       Print some warnings at the end.
19651#
19652###############################################################################
19653
19654warn_prefix_1="    Warning:"
19655warn_prefix_2="       Note:"
19656warn_prefix="$warn_prefix_1"
19657
19658warning=no
19659warnsep='    #################################################################'
19660
19661warnpre() {
19662  if test "$warning" = no ; then
19663    echo '' ; echo "$warnsep" ; echo ''
19664    warning=yes
19665  fi
19666}
19667
19668warn() {
19669  warnpre
19670  if test "$warning" = long ; then echo '' ; fi
19671  warning=yes
19672  rest="$@"
19673  echo "$warn_prefix $rest"
19674}
19675
19676warnL() {
19677  was=$warning
19678  warnpre
19679  warning=yes
19680  if test "$was" != no ; then echo '' ; fi
19681  rest="$@"
19682  echo "$warn_prefix $rest"
19683}
19684
19685warn2() {
19686  rest="$@"
19687  echo "             $rest"
19688  warning=long
19689}
19690
19691note() {
19692  warn_prefix="$warn_prefix_2"
19693  warn $@
19694  warn_prefix="$warn_prefix_1"
19695}
19696
19697noteL() {
19698  warn_prefix="$warn_prefix_2"
19699  warnL $@
19700  warn_prefix="$warn_prefix_1"
19701}
19702
19703
19704# ac_prog_cc_no_pthread normally only happens on AIX, because according
19705# to AX_PTHREAD, AIX needs CC=xlc_r or CC=cc_r to do threads.
19706# If CC is specified, it takes precedence over --with-pthread.
19707if test "$ac_prog_cc_no_pthread" ; then
19708  warnL "You requested $ac_original_cc for the C compiler, but it doesn't"
19709  warn2 "support POSIX threads."
19710  echo ""
19711  warn2 "If you have multiple CPU cores, try CC=$PTHREAD_CC."
19712elif test "$with_pthread_req" = yes -a "$have_pthread" = no ; then
19713  warn 'POSIX threads were requested, but were not found.'
19714fi
19715
19716if test "$with_sgi_req" = yes -a "$have_sgi" = no ; then
19717  warn 'The SGI saver extension was requested, but was not found.'
19718fi
19719
19720if test "$with_xidle_req" = yes -a "$have_xidle" = no ; then
19721  warn 'The XIdle extension was requested, but was not found.'
19722fi
19723
19724if test "$with_mit_req" = yes -a "$have_mit" = no ; then
19725  warn 'The MIT-SCREEN-SAVER extension was requested, but was not found.'
19726fi
19727
19728if test "$with_xshm_req" = yes -a "$have_xshm" = no ; then
19729  warn 'The XSHM extension was requested, but was not found.'
19730fi
19731
19732if test "$with_xdbe_req" = yes -a "$have_xdbe" = no ; then
19733  warn 'The DOUBLE-BUFFER extension was requested, but was not found.'
19734fi
19735
19736#if test "$with_xcomposite_req" = yes -a "$have_xcomposite" = no ; then
19737#  warn 'The XCOMPOSITE extension was requested, but was not found.'
19738#fi
19739
19740if test "$with_xkb_req" = yes -a "$have_xkb" = no ; then
19741  warn 'The X Keyboard extension was requested, but was not found.'
19742fi
19743
19744if test "$with_sgivc_req" = yes -a "$have_sgivc" = no ; then
19745  warn 'The SGI-VIDEO-CONTROL extension was requested, but was not found.'
19746fi
19747
19748if test "$with_dpms_req" = yes -a "$have_dpms" = no ; then
19749  warn 'The DPMS extension was requested, but was not found.'
19750fi
19751
19752if test "$with_xinerama_req" = yes -a "$have_xinerama" = no ; then
19753  warn 'The Xinerama extension was requested, but was not found.'
19754fi
19755
19756if test "$with_xf86vmode_req" = yes -a "$have_xf86vmode" = no ; then
19757  warn 'The XF86VMODE extension was requested, but was not found.'
19758fi
19759
19760if test "$with_randr_req" = yes -a "$have_randr" = no ; then
19761  warn 'The RANDR extension was requested, but was not found.'
19762fi
19763
19764if test "$with_proc_interrupts_req" = yes -a "$have_proc_interrupts" = no; then
19765  warn "Checking of /proc/interrupts was requested, but it's bogus."
19766fi
19767
19768if test "$pkg_config" = false ; then
19769  warnL 'The "pkg-config" program was not found.  Without that,'
19770  warn2 "detection of the various GTK libraries won't work."
19771else
19772  pkgerr=`$pkg_config --list-all 2>&1 >/dev/null`
19773  if test "x$pkgerr" != "x" ; then
19774    warnL 'The "pkg-config" program produces errors.  This often causes'
19775    warn2 "detection of the various GTK libraries to malfunction."
19776    warn2 "The errors are:"
19777    echo ''
19778    echo "$pkgerr" | sed 's/^/             > /g'
19779  fi
19780fi
19781
19782if test "$gtk_halfassed" != no ; then
19783  warnL "GTK was found, but $gtk_halfassed_lib was not, so GTK can't be used."
19784fi
19785
19786motif_warn2() {
19787  warn2 'Though the Motif front-end to xscreensaver is still'
19788  warn2 'maintained, it is no longer being updated with new'
19789  warn2 'features: all new development on the xscreensaver-settings'
19790  warn2 'program is happening in the GTK version, and not in the'
19791  warn2 'Motif version.  It is recommended that you build against'
19792  warn2 'GTK instead of Motif.  See <http://www.gtk.org/>.'
19793}
19794
19795if test "$have_motif" = no -a "$have_gtk" = no; then
19796
19797  if test "$with_motif" = yes; then
19798    warnL "Neither the GTK nor Motif libraries were found; the"
19799    warn2 "\`xscreensaver-settings' program requires one of these."
19800    echo ''
19801    motif_warn2
19802  else
19803    warnL "The GTK libraries do not seem to be available; the"
19804    warn2 "\`xscreensaver-settings' program requires them."
19805#   echo ''
19806#   warn2 'You can use Motif or Lesstif instead of GTK (use the'
19807#   warn2 "\`--with-motif' option) but that is NOT recommended."
19808#   motif_warn2
19809  fi
19810
19811elif test "$with_motif_req" = yes -a "$have_motif" = no ; then
19812  warnL "Use of Motif was requested, but it wasn't found;"
19813  warn2 "Gtk will be used instead."
19814
19815elif test "$with_gtk_req" = yes -a "$have_gtk" = no ; then
19816  warnL "Use of Gtk was requested, but it wasn't found."
19817fi
19818
19819
19820if test "$ac_cv_libxt" != yes ; then
19821  warnL 'The Xt library was not found.  It is required.'
19822fi
19823
19824if test "$have_gtk" = yes -a "$have_gdk_pixbuf" = no ; then
19825  warn  "GTK is being used, but the GDK-Pixbuf library and/or"
19826  warn2 "headers were not found.  That can't be good.  Please"
19827  warn2 "install the GDK-Pixbuf development kit and re-configure."
19828fi
19829
19830if test "$have_motif" = yes -a "$have_lesstif" = yes ; then
19831
19832  preferred_lesstif=0.92
19833
19834  if test "$lesstif_version" = unknown; then
19835    warnL "Unable to determine the LessTif version number!"
19836    warn2 "Make sure you are using version $preferred_lesstif or newer."
19837    warn2 "See <http://www.lesstif.org/>."
19838
19839  elif test \! $lesstif_version -gt 82; then
19840    warnL "LessTif version $lesstif_version_string is being used."
19841    warn2 "LessTif versions 0.82 and earlier are too buggy to"
19842    warn2 "use with XScreenSaver; it is strongly recommended"
19843    warn2 "that you upgrade to at least version $preferred_lesstif!"
19844    warn2 "See <http://www.lesstif.org/>."
19845  fi
19846fi
19847
19848
19849if test "$have_motif" = yes -a "$have_gtk" = no ; then
19850  warn  'Motif is being used, and GTK is not.'
19851  echo  ''
19852  motif_warn2
19853fi
19854
19855halfassery() {
19856  echo ''
19857  warn2 "More specifically, we found the headers but not the"
19858  warn2 "libraries.  Possibly a 'devel' package is needed."
19859}
19860
19861if test "$with_gdk_pixbuf_req" = yes  -a "$have_gdk_pixbuf" = no; then
19862  warnL 'Use of GDK-Pixbuf was requested, but it was not found.'
19863fi
19864
19865if test "$have_gdk_pixbuf" = no -o "$gdk_pixbuf_halfassed" = yes || \
19866   test "$have_gdk_pixbuf" = no ; then
19867
19868  if test "$with_gdk_pixbuf_req" = yes ; then
19869    true
19870  elif test "$with_gdk_pixbuf_req" = no ; then
19871    warnL 'The GDK-Pixbuf library is not being used.'
19872  else
19873    warnL 'The GDK-Pixbuf library was not found.'
19874  fi
19875
19876  if test "$gdk_pixbuf_halfassed" = yes ; then halfassery ; fi
19877  if test "$have_png" = yes ; then
19878    echo ''
19879    warn2 'The PNG library is being used instead.'
19880  fi
19881
19882  echo ''
19883  warn2 'Some of the demos will not use images as much as they could.'
19884  warn2 'You should consider installing GDK-Pixbuf and re-running'
19885  warn2 'configure.'
19886fi
19887
19888
19889if test "$have_jpeg" = no ; then
19890  if test "$with_jpeg_req" = yes ; then
19891    warnL 'Use of libjpeg was requested, but it was not found.'
19892  elif test "$with_jpeg_req" = no ; then
19893    warnL 'The JPEG library is not being used.'
19894  else
19895    warnL 'The JPEG library was not found.'
19896  fi
19897
19898  if test "$jpeg_halfassed" = yes ; then halfassery ; fi
19899  if test "$have_gdk_pixbuf" = no ; then
19900    echo ''
19901    warn2 "This means that it won't be possible for the image-manipulating"
19902    warn2 "display modes to load files from disk; and it also means that"
19903    warn2 "the \`webcollage' program will be much slower."
19904  else
19905    warn2 "This means the \`webcollage' program will be much slower."
19906  fi
19907fi
19908
19909
19910if test "$have_png" = no ; then
19911  if test "$with_png_req" = yes ; then
19912    warnL 'Use of libpng was requested, but it was not found.'
19913  elif test "$with_png_req" = no ; then
19914    warnL 'The PNG library is not being used.'
19915  else
19916    warnL 'The PNG library was not found.'
19917  fi
19918
19919  if test "$png_halfassed" = yes ; then halfassery ; fi
19920  warn2 "Many things aren't going to work right."
19921fi
19922
19923
19924if test "$have_xinput" = no ; then
19925  warnL 'The XInput2 library was not found.  It is required.'
19926  if test "$xinput_halfassed" = yes ; then halfassery ; else echo '' ; fi
19927fi
19928
19929
19930if test "$have_xft" = no ; then
19931  warnL 'The XFreeType library was not found.  It is required.'
19932  if test "$xft_halfassed" = yes ; then halfassery ; else echo '' ; fi
19933fi
19934
19935
19936if test "$have_systemd" = no ; then
19937  systemd_warned=no
19938  if test "$systemd_too_old" = yes ; then
19939    warnL "The systemd library is too old."
19940    systemd_warned=yes
19941  elif test "$with_systemd_req" = yes ; then
19942    warnL "Use of systemd was requested, but it was not found."
19943    systemd_warned=yes
19944  elif test "$ac_macosx" = yes; then
19945    true
19946  elif test "$with_systemd_req" = no ; then
19947    noteL 'The systemd library is not being used.'
19948    systemd_warned=yes
19949  else
19950    warnL "The systemd library was not found."
19951    systemd_warned=yes
19952  fi
19953
19954  if test "$systemd_halfassed" = yes ; then
19955    halfassery
19956    systemd_warned=yes
19957  fi
19958
19959  if test "$systemd_warned" = yes; then
19960    echo ''
19961    warn2 "This means that xscreensaver-systemd won't be built."
19962    warn2 "Without that, xscreensaver will not be able to auto-lock"
19963    warn2 "before the system is suspended (e.g., closing laptop lid)"
19964    warn2 "and might activate while video playback is in progress."
19965  fi
19966fi
19967
19968
19969if test "$have_gl" = no ; then
19970  if test "$with_gl_req" = yes ; then
19971    warnL 'Use of GL was requested, but it was not found.'
19972  elif test "$with_gl_req" = no ; then
19973    noteL 'The OpenGL 3D library is not being used.'
19974  else
19975    noteL 'The OpenGL 3D library was not found.'
19976  fi
19977
19978  if test "$gl_halfassed" = yes ; then
19979    halfassery
19980    if test "$have_glx" = no -a "$have_egl" = no; then
19981      echo ''
19982      warn2 'Neither EGL nor GLX were found.'
19983    fi
19984  fi
19985
19986  echo ''
19987  warn2 'Those demos which use 3D will not be built or installed.'
19988  warn2 'You might want to consider installing OpenGL and'
19989  warn2 're-running configure.'
19990
19991fi
19992
19993if test "$have_gl" = yes -a "$have_gle" = no ; then
19994
19995 # nobody cares about this; don't print the warning unless it was
19996 # requested and not found, or halfway-found.
19997 if test "$with_gle_req" = yes -o "$gle_halfassed" = yes ; then
19998
19999  if test "$with_gle_req" = yes ; then
20000    noteL 'Use of the GLE (GL Extrusion) library was requested, but'
20001    warn2 'it was not found (though the OpenGL library was found, and'
20002    warn2 'is being used.)'
20003  elif test "$with_gle_req" = no ; then
20004    noteL 'The OpenGL Library is being used, but the GLE (GL Extrusion)'
20005    warn2 'library is not.'
20006  else
20007    noteL 'The OpenGL Library was found, but the GLE (GL Extrusion)'
20008    warn2 'library was not.'
20009  fi
20010
20011  if test "$gle_halfassed" = yes ; then halfassery ; fi
20012
20013  echo ''
20014  warn2 'Some of the OpenGL (3D) demos (those that depend on GLE)'
20015  warn2 'will not be built or installed.  You might want to consider'
20016  warn2 'installing GLE and re-running configure.  You can find the'
20017  warn2 'GLE library at <http://www.linas.org/gle/>'
20018
20019 fi
20020fi
20021
20022
20023if test "$with_readdisplay_req" = yes -a "$have_readdisplay" = no ; then
20024  warn 'Use of XReadDisplay was requested, but it was not found.'
20025fi
20026
20027if test "$with_kerberos_req" = yes -a "$have_kerberos" = no ; then
20028  warn 'Use of Kerberos was requested, but it was not found.'
20029fi
20030
20031if test "$with_pam_req" = yes -a "$have_pam" = no ; then
20032  warn 'Use of PAM was requested, but it was not found.'
20033elif test "$have_pam" = no ; then
20034  if test -d /etc/pam.d -o -f /etc/pam.conf ; then
20035    warn  "Your system seems to have PAM, but PAM is not being used."
20036    warn2 "That is probably not going to work out well."
20037
20038  fi
20039fi
20040
20041if test "$with_shadow_req" = yes -a "$have_shadow" = no ; then
20042  warn 'Use of shadow passwords was requested, but they were not found.'
20043fi
20044
20045if test "$setcap_hacks_req" = yes -a "$have_libcap" = no ; then
20046  warn 'Use of libcap was requested, but it was not found.'
20047fi
20048
20049if test "$ac_macosx" = yes -a "$enable_locking" = yes ; then
20050  warn  "You have specified --enable-locking on macOS."
20051  warn2 "THIS DOES NOT WORK!  Don't do this!"
20052fi
20053
20054
20055# You are in a twisty maze of namespaces and syntaxes, all alike.
20056# Expand all of these as the Makefile will probably expand them.
20057# Fuck the skull of Unix.
20058#
20059bindir=`eval eval eval eval eval eval eval echo $bindir`
20060HACKDIR=`eval eval eval eval eval eval eval echo $HACKDIR`
20061HACK_CONF_DIR=`eval eval eval eval eval eval eval echo $HACK_CONF_DIR`
20062FONT_DIR=`eval eval eval eval eval eval eval echo $FONT_DIR`
20063
20064# canonicalize slashes.
20065bindir=`echo  "${bindir}"              | sed 's@/$@@;s@//*@/@g'`
20066HACKDIR=`echo "${HACKDIR}"             | sed 's@/$@@;s@//*@/@g'`
20067HACK_CONF_DIR=`echo "${HACK_CONF_DIR}" | sed 's@/$@@;s@//*@/@g'`
20068FONT_DIR=`echo "${FONT_DIR}"           | sed 's@/$@@;s@//*@/@g'`
20069
20070if test -z "$FONT_DIR" ; then
20071  FONT_DIR='not installed';
20072else
20073  FONT_DIR="${FONT_DIR}/"
20074fi
20075
20076# Sanity check the hackdir
20077for bad_choice in xscreensaver xscreensaver-settings xscreensaver-command ; do
20078  if test "${HACKDIR}" = "${bindir}/${bad_choice}" ; then
20079    echo ""
20080    as_fn_error $? "\"--with-hackdir=${bindir}/${bad_choice}\" won't work.
20081                   There will be an executable installed with that name, so
20082                   that can't be the name of a directory as well.  Please
20083                   re-configure with a different directory name." "$LINENO" 5
20084  fi
20085done
20086
20087
20088# Warn if there's a previous RPM package installed.
20089
20090rpm_vers=
20091if test -z "$RPM_PACKAGE_VERSION" ; then
20092  # Don't bother with this test if we are currently *building* an RPM.
20093  rpmnames="xscreensaver xscreensaver-base xscreensaver-extras
20094            xscreensaver-data xscreensaver-data-extra"
20095
20096  # M4 sucks!!
20097
20098  pkg_vers=`(rpm -qv $rpmnames) 2>&- | \
20099        sed -n 's/^[-a-z]*-\([0-9][0-9]*[.].*\)/\1/p' | head -1`
20100  rpm_vers="$pkg_vers"
20101
20102fi
20103
20104if test \! -z "$rpm_vers" ; then
20105
20106  # M4 sucks!!
20107
20108  pkg_bindir=`rpm  -ql $rpmnames | sed -n 's@^\(.*/\)xscreensaver-settings$@\1@p'`
20109  pkg_bindir2=`rpm -ql $rpmnames | sed -n 's@^\(.*/\)xscreensaver-demo$@\1@p'`
20110  pkg_hackdir=`rpm -ql $rpmnames | sed -n 's@^\(.*/\)popsquares$@\1@p'`
20111  pkg_confdir=`rpm -ql $rpmnames | sed -n 's@^\(.*/\)popsquares\.xml$@\1@p'`
20112  pkg_fontdir=`rpm -ql $rpmnames | sed -n 's@^\(.*/\).*\.ttf$@\1@p' | head -1`
20113  pkg_addir=`rpm   -ql $rpmnames | sed -n 's@^\(.*/\)XScreenSaver$@\1@p'`
20114
20115  if test -z "$pkg_bindir" ; then pkg_bindir="$pkg_bindir2" ; fi
20116
20117fi
20118
20119
20120# Warn if there's a previous Debian package installed.
20121#
20122deb_vers=
20123if test -z "$pkg_vers" ; then
20124  debnames="xscreensaver xscreensaver-data xscreensaver-data-extra"
20125  pkg_vers=''
20126  for dpkg in $debnames ; do
20127    if test -z "$pkg_vers"; then
20128      pkg_vers=`dpkg -s $dpkg 2>/dev/null | sed -n 's/^Version: \(.*\)$/\1/p'`
20129      deb_vers="$pkg_vers"
20130    fi
20131  done
20132fi
20133
20134if test \! -z "$deb_vers" ; then
20135
20136  # M4 sucks!!
20137
20138  pkg_bindir=`dpkg  -L $debnames 2>&- | sed -n 's@^\(.*/\)xscreensaver-settings$@\1@p'`
20139  pkg_bindir2=`dpkg -L $debnames 2>&- | sed -n 's@^\(.*/\)xscreensaver-demo$@\1@p'`
20140  pkg_hackdir=`dpkg -L $debnames 2>&- | sed -n 's@^\(.*/\)popsquares$@\1@p'`
20141  pkg_confdir=`dpkg -L $debnames 2>&- | sed -n 's@^\(.*/\)popsquares\.xml$@\1@p'`
20142  pkg_fontdir=`dpkg -L $debnames 2>&- | sed -n 's@^\(.*/\).*\.ttf$@\1@p' | head -1`
20143  pkg_addir=`dpkg   -L $debnames 2>&- | sed -n 's@^\(.*/\)XScreenSaver[^/]*$@\1@p'`
20144
20145
20146  if test -z "$pkg_bindir" ; then pkg_bindir="$pkg_bindir2" ; fi
20147fi
20148
20149bindir_err=
20150hackdir_err=
20151confdir_err=
20152fontdir_err=
20153addir_err=
20154if ! test -z "$pkg_vers" ; then
20155
20156  err=" (DIFFERS)"
20157
20158  if test -z "$pkg_bindir"  ; then pkg_bindir='???'
20159  elif test "$pkg_bindir"  != "${bindir}/"        ; then bindir_err="$err" ; fi
20160
20161  if test -z "$pkg_hackdir" ; then pkg_hackdir='???'
20162  elif test "$pkg_hackdir" != "${HACKDIR}/"       ; then hackdir_err="$err"; fi
20163
20164  if test -z "$pkg_confdir" ; then pkg_confdir='???'
20165  elif test "$pkg_confdir" != "${HACK_CONF_DIR}/" ; then confdir_err="$err"; fi
20166
20167  if test -z "$pkg_fontdir" ; then pkg_fontdir='none'
20168  elif test "$pkg_fontdir/" != "${FONT_DIR}"      ; then fontdir_err="$err"; fi
20169
20170  if test -z "$pkg_addir"   ; then pkg_addir='???'
20171  elif test "$pkg_addir"   != "${APPDEFAULTS}/"   ; then addir_err="$err"  ; fi
20172
20173  warning=no
20174  warnL "There is already an installed package of xscreensaver"
20175  warn2 "version \"$pkg_vers\", in these directories:"
20176  echo ""
20177  warn2 "User programs: $pkg_bindir$bindir_err"
20178  warn2 "Screen savers: $pkg_hackdir$hackdir_err"
20179  warn2 "Configuration: $pkg_confdir$confdir_err"
20180  warn2 "Extra fonts:   $pkg_fontdir$fontdir_err"
20181  warn2 "App Defaults:  $pkg_addir$addir_err"
20182fi
20183
20184echo ""
20185echo "$warnsep"
20186echo ""
20187echo "    XScreenSaver will be installed in these directories:"
20188echo ""
20189echo "             User programs: ${bindir}/$bindir_err"
20190echo "             Screen savers: ${HACKDIR}/$hackdir_err"
20191echo "             Configuration: ${HACK_CONF_DIR}/$confdir_err"
20192echo "             Extra Fonts:   ${FONT_DIR}$fontdir_err"
20193echo "             App Defaults:  ${APPDEFAULTS}/$addir_err"
20194echo ""
20195