1 dnl aclocal.m4 generated automatically by aclocal 1.4
3 dnl Copyright (C) 1994, 1995-8, 1999 Free Software Foundation, Inc.
4 dnl This file is free software; the Free Software Foundation
5 dnl gives unlimited permission to copy and/or distribute it,
6 dnl with or without modifications, as long as this notice is preserved.
8 dnl This program is distributed in the hope that it will be useful,
9 dnl but WITHOUT ANY WARRANTY, to the extent permitted by law; without
10 dnl even the implied warranty of MERCHANTABILITY or FITNESS FOR A
11 dnl PARTICULAR PURPOSE.
13 sinclude(../config/accross.m4)
14 sinclude(../config/acx.m4)
15 sinclude(../config/no-executables.m4)
17 sinclude(../libtool.m4)
18 dnl The lines below arrange for aclocal not to bring libtool.m4
19 dnl AM_PROG_LIBTOOL into aclocal.m4, while still arranging for automake
20 dnl to add a definition of LIBTOOL to Makefile.in.
22 AC_DEFUN([AM_PROG_LIBTOOL],)
23 AC_DEFUN([AC_LIBTOOL_DLOPEN],)
24 AC_DEFUN([AC_LIBLTDL_CONVENIENCE],)
25 AC_DEFUN([LT_AC_PROG_GCJ],)
32 dnl From Bruno Haible.
36 dnl Some systems have iconv in libc, some have it in libiconv (OSF/1 and
37 dnl those with the standalone portable GNU libiconv installed).
39 am_cv_lib_iconv_ldpath=
40 AC_ARG_WITH([libiconv-prefix],
41 [ --with-libiconv-prefix=DIR search for libiconv in DIR/include and DIR/lib], [
42 for dir in `echo "$withval" | tr : ' '`; do
43 if test -d $dir/include; then CPPFLAGS="$CPPFLAGS -I$dir/include"; fi
44 if test -d $dir/lib; then am_cv_lib_iconv_ldpath="-L$dir/lib"; fi
48 AC_CACHE_CHECK(for iconv, am_cv_func_iconv, [
49 am_cv_func_iconv="no, consider installing GNU libiconv"
51 AC_TRY_LINK([#include <stdlib.h>
53 [iconv_t cd = iconv_open("","");
54 iconv(cd,NULL,NULL,NULL,NULL);
57 if test "$am_cv_func_iconv" != yes; then
59 LIBS="$LIBS $am_cv_libiconv_ldpath -liconv"
60 AC_TRY_LINK([#include <stdlib.h>
62 [iconv_t cd = iconv_open("","");
63 iconv(cd,NULL,NULL,NULL,NULL);
70 if test "$am_cv_func_iconv" = yes; then
71 AC_DEFINE(HAVE_ICONV, 1, [Define if you have the iconv() function.])
72 AC_MSG_CHECKING([for iconv declaration])
73 AC_CACHE_VAL(am_cv_proto_iconv, [
81 #if defined(__STDC__) || defined(__cplusplus)
82 size_t iconv (iconv_t cd, char * *inbuf, size_t *inbytesleft, char * *outbuf, size_t *outbytesleft);
86 ], [], am_cv_proto_iconv_arg1="", am_cv_proto_iconv_arg1="const")
87 am_cv_proto_iconv="extern size_t iconv (iconv_t cd, $am_cv_proto_iconv_arg1 char * *inbuf, size_t *inbytesleft, char * *outbuf, size_t *outbytesleft);"])
88 am_cv_proto_iconv=`echo "[$]am_cv_proto_iconv" | tr -s ' ' | sed -e 's/( /(/'`
89 AC_MSG_RESULT([$]{ac_t:-
90 }[$]am_cv_proto_iconv)
91 AC_DEFINE_UNQUOTED(ICONV_CONST, $am_cv_proto_iconv_arg1,
92 [Define as const if the declaration of iconv() needs const.])
95 if test "$am_cv_lib_iconv" = yes; then
96 LIBICONV="$am_cv_lib_iconv_ldpath -liconv"
101 # Check whether LC_MESSAGES is available in <locale.h>.
102 # Ulrich Drepper <drepper@cygnus.com>, 1995.
104 # This file can be copied and used freely without restrictions. It can
105 # be used in projects which are not available under the GNU General Public
106 # License or the GNU Library General Public License but which still want
107 # to provide support for the GNU gettext functionality.
108 # Please note that the actual code of the GNU gettext library is covered
109 # by the GNU Library General Public License, and the rest of the GNU
110 # gettext package package is covered by the GNU General Public License.
111 # They are *not* in the public domain.
115 AC_DEFUN([AM_LC_MESSAGES],
116 [AC_CHECK_HEADERS(locale.h)
117 if test $ac_cv_header_locale_h = yes; then
118 AC_CACHE_CHECK([for LC_MESSAGES], am_cv_val_LC_MESSAGES,
119 [AC_TRY_LINK([#include <locale.h>], [return LC_MESSAGES],
120 am_cv_val_LC_MESSAGES=yes, am_cv_val_LC_MESSAGES=no)])
121 if test $am_cv_val_LC_MESSAGES = yes; then
122 AC_DEFINE(HAVE_LC_MESSAGES, 1,
123 [Define if your <locale.h> file defines LC_MESSAGES.])
127 AC_DEFUN([CHECK_FOR_BROKEN_MINGW_LD],
129 AC_MSG_CHECKING(whether 'ld' is at least 2.13)
130 LD_PROG=`$CC --print-prog-name=ld`
131 LD_VERSION=`$LD_PROG --version`
132 LD_VERSION_MAJOR=`echo "$LD_VERSION" | head -1 | cut -d '.' -f 1 | cut -d ' ' -f 4`
133 LD_VERSION_MINOR=`echo "$LD_VERSION" | head -1 | cut -d '.' -f 2`
134 if expr "$LD_VERSION_MAJOR" \> 2 > /dev/null; then
137 if expr "$LD_VERSION_MAJOR" = 2 && expr "$LD_VERSION_MINOR" \>= 13 > /dev/null; then
141 if test "x$LD_OK" != x; then
142 AC_MSG_RESULT([yes; major=$LD_VERSION_MAJOR, minor=$LD_VERSION_MINOR])
144 AC_MSG_RESULT([no; major=$LD_VERSION_MAJOR, minor=$LD_VERSION_MINOR])
145 AC_MSG_WARN([ld <2.13 detected; enabling JV_LINKER_CANNOT_8BYTE_ALIGN_STATICS hack...])
146 AC_DEFINE(JV_LINKER_CANNOT_8BYTE_ALIGN_STATICS, 1,
147 [Indicate that linker is not able to 8-byte align static data])
149 ])# CHECK_FOR_BROKEN_MINGW_LD
151 dnl PKG_CHECK_MODULES(GSTUFF, gtk+-2.0 >= 1.3 glib = 1.3.4, action-if, action-not)
152 dnl defines GSTUFF_LIBS, GSTUFF_CFLAGS, see pkg-config man page
153 dnl also defines GSTUFF_PKG_ERRORS on error
154 AC_DEFUN(PKG_CHECK_MODULES, [
157 if test -z "$PKG_CONFIG"; then
158 AC_PATH_PROG(PKG_CONFIG, pkg-config, no)
161 if test "$PKG_CONFIG" = "no" ; then
162 echo "*** The pkg-config script could not be found. Make sure it is"
163 echo "*** in your path, or set the PKG_CONFIG environment variable"
164 echo "*** to the full path to pkg-config."
165 echo "*** Or see http://www.freedesktop.org/software/pkgconfig to get pkg-config."
167 PKG_CONFIG_MIN_VERSION=0.9.0
168 if $PKG_CONFIG --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then
169 AC_MSG_CHECKING(for $2)
171 if $PKG_CONFIG --exists "$2" ; then
175 AC_MSG_CHECKING($1_CFLAGS)
176 $1_CFLAGS=`$PKG_CONFIG --cflags "$2"`
177 AC_MSG_RESULT($$1_CFLAGS)
179 AC_MSG_CHECKING($1_LIBS)
180 $1_LIBS=`$PKG_CONFIG --libs "$2"`
181 AC_MSG_RESULT($$1_LIBS)
185 ## If we have a custom action on failure, don't print errors, but
186 ## do set a variable so people can do so.
187 $1_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "$2"`
188 ifelse([$4], ,echo $$1_PKG_ERRORS,)
194 echo "*** Your version of pkg-config is too old. You need version $PKG_CONFIG_MIN_VERSION or newer."
195 echo "*** See http://www.freedesktop.org/software/pkgconfig"
199 if test $succeeded = yes; then
200 ifelse([$3], , :, [$3])
202 ifelse([$4], , AC_MSG_ERROR([Library requirements ($2) not met; consider adjusting the PKG_CONFIG_PATH environment variable if your libraries are in a nonstandard prefix so pkg-config can find them.]), [$4])
208 # Do all the work for Automake. This macro actually does too much --
209 # some checks are only needed if your package does certain things.
210 # But this isn't really a big deal.
215 dnl AM_INIT_AUTOMAKE(package,version, [no-define])
217 AC_DEFUN(AM_INIT_AUTOMAKE,
218 [AC_REQUIRE([AC_PROG_INSTALL])
223 dnl test to see if srcdir already configured
224 if test "`cd $srcdir && pwd`" != "`pwd`" && test -f $srcdir/config.status; then
225 AC_MSG_ERROR([source directory already configured; run "make distclean" there first])
228 AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE", [Name of package])
229 AC_DEFINE_UNQUOTED(VERSION, "$VERSION", [Version number of package]))
230 AC_REQUIRE([AM_SANITY_CHECK])
231 AC_REQUIRE([AC_ARG_PROGRAM])
232 dnl FIXME This is truly gross.
233 missing_dir=`cd $ac_aux_dir && pwd`
234 AM_MISSING_PROG(ACLOCAL, aclocal, $missing_dir)
235 AM_MISSING_PROG(AUTOCONF, autoconf, $missing_dir)
236 AM_MISSING_PROG(AUTOMAKE, automake, $missing_dir)
237 AM_MISSING_PROG(AUTOHEADER, autoheader, $missing_dir)
238 AM_MISSING_PROG(MAKEINFO, makeinfo, $missing_dir)
239 AC_REQUIRE([AC_PROG_MAKE_SET])])
242 # Check to make sure that the build environment is sane.
245 AC_DEFUN(AM_SANITY_CHECK,
246 [AC_MSG_CHECKING([whether build environment is sane])
249 echo timestamp > conftestfile
250 # Do `set' in a subshell so we don't clobber the current shell's
251 # arguments. Must try -L first in case configure is actually a
252 # symlink; some systems play weird games with the mod time of symlinks
253 # (eg FreeBSD returns the mod time of the symlink's containing
256 set X `ls -Lt $srcdir/configure conftestfile 2> /dev/null`
257 if test "[$]*" = "X"; then
259 set X `ls -t $srcdir/configure conftestfile`
261 if test "[$]*" != "X $srcdir/configure conftestfile" \
262 && test "[$]*" != "X conftestfile $srcdir/configure"; then
264 # If neither matched, then we have a broken ls. This can happen
265 # if, for instance, CONFIG_SHELL is bash and it inherits a
266 # broken ls alias from the environment. This has actually
267 # happened. Such a system could not be considered "sane".
268 AC_MSG_ERROR([ls -t appears to fail. Make sure there is not a broken
269 alias in your environment])
272 test "[$]2" = conftestfile
278 AC_MSG_ERROR([newly created file is older than distributed files!
279 Check your system clock])
284 dnl AM_MISSING_PROG(NAME, PROGRAM, DIRECTORY)
285 dnl The program must properly implement --version.
286 AC_DEFUN(AM_MISSING_PROG,
287 [AC_MSG_CHECKING(for working $2)
288 # Run test in a subshell; some versions of sh will print an error if
289 # an executable is not found, even if stderr is redirected.
290 # Redirect stdin to placate older versions of autoconf. Sigh.
291 if ($2 --version) < /dev/null > /dev/null 2>&1; then
296 AC_MSG_RESULT(missing)
300 # Add --enable-maintainer-mode option to configure.
305 AC_DEFUN(AM_MAINTAINER_MODE,
306 [AC_MSG_CHECKING([whether to enable maintainer-specific portions of Makefiles])
307 dnl maintainer-mode is disabled by default
308 AC_ARG_ENABLE(maintainer-mode,
309 [ --enable-maintainer-mode enable make rules and dependencies not useful
310 (and sometimes confusing) to the casual installer],
311 USE_MAINTAINER_MODE=$enableval,
312 USE_MAINTAINER_MODE=no)
313 AC_MSG_RESULT($USE_MAINTAINER_MODE)
314 AM_CONDITIONAL(MAINTAINER_MODE, test $USE_MAINTAINER_MODE = yes)
315 MAINT=$MAINTAINER_MODE_TRUE
320 # Define a conditional.
322 AC_DEFUN(AM_CONDITIONAL,
333 # Like AC_CONFIG_HEADER, but automatically create stamp file.
335 AC_DEFUN(AM_CONFIG_HEADER,
337 AC_CONFIG_HEADER([$1])
338 dnl When config.status generates a header, we must update the stamp-h file.
339 dnl This file resides in the same directory as the config header
340 dnl that is generated. We must strip everything past the first ":",
341 dnl and everything past the last "/".
342 AC_OUTPUT_COMMANDS(changequote(<<,>>)dnl
343 ifelse(patsubst(<<$1>>, <<[^ ]>>, <<>>), <<>>,
344 <<test -z "<<$>>CONFIG_HEADERS" || echo timestamp > patsubst(<<$1>>, <<^\([^:]*/\)?.*>>, <<\1>>)stamp-h<<>>dnl>>,
346 for am_file in <<$1>>; do
347 case " <<$>>CONFIG_HEADERS " in
348 *" <<$>>am_file "*<<)>>
349 echo timestamp > `echo <<$>>am_file | sed -e 's%:.*%%' -e 's%[^/]*$%%'`stamp-h$am_indx
352 am_indx=`expr "<<$>>am_indx" + 1`