1 dnl aclocal.m4 generated automatically by aclocal 1.4-p6
3 dnl Copyright (C) 1994, 1995-8, 1999, 2001 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)
15 AC_DEFUN(LIBGCJ_CONFIGURE,
17 dnl Default to --enable-multilib
18 AC_ARG_ENABLE(multilib,
19 [ --enable-multilib build many library versions (default)],
20 [case "${enableval}" in
23 *) AC_MSG_ERROR(bad value ${enableval} for multilib option) ;;
24 esac], [multilib=yes])dnl
26 dnl We may get other options which we don't document:
27 dnl --with-target-subdir, --with-multisrctop, --with-multisubdir
29 # When building with srcdir == objdir, links to the source files will
30 # be created in directories within the target_subdir. We have to
31 # adjust toplevel_srcdir accordingly, so that configure finds
32 # install-sh and other auxiliary files that live in the top-level
34 if test "${srcdir}" = "."; then
35 if test -z "${with_target_subdir}"; then
38 if test "${with_target_subdir}" != "."; then
39 toprel="${with_multisrctop}../.."
41 toprel="${with_multisrctop}.."
48 libgcj_basedir=$srcdir/$toprel/$1/libjava
49 AC_SUBST(libgcj_basedir)
51 AC_CONFIG_AUX_DIR(${srcdir}/$toprel)
53 # This overrides the previous occurrence for automake, but not for
54 # autoconf, which is exactly what we want.
58 # This works around an automake problem.
59 mkinstalldirs="`cd $ac_aux_dir && ${PWDCMD-pwd}`/mkinstalldirs"
60 AC_SUBST(mkinstalldirs)
64 dnl This shouldn't be needed, as long as top-level dependencies are
65 dnl defined correctly and shared-library paths are set up so that
66 dnl execution tests succeed. FIXME.
67 define([AC_PROG_CC_WORKS],[])
68 define([AC_PROG_CXX_WORKS],[])
72 # We use the libstdc++-v3 version of LIB_AC_PROG_CXX, but use
73 # glibjava_CXX instead of glibcpp_CXX. That's because we're passed a
74 # different definition of CXX than other directories, since we don't
75 # depend on libstdc++-v3 having already been built.
76 AC_DEFUN(LIB_AC_PROG_CXX,
77 [AC_BEFORE([$0], [AC_PROG_CXXCPP])dnl
78 dnl Fool anybody using AC_PROG_CXX.
79 AC_PROVIDE([AC_PROG_CXX])
80 # Use glibjava_CXX so that we do not cause CXX to be cached with the
81 # flags that come in CXX while configuring libjava. They're different
82 # from those used for all other target libraries. If CXX is set in
83 # the environment, respect that here.
85 AC_CHECK_PROGS(glibjava_CXX, $CCC c++ g++ gcc CC cxx cc++, gcc)
88 test -z "$glibjava_CXX" && AC_MSG_ERROR([no acceptable c++ found in \$PATH])
92 if test $ac_cv_prog_gxx = yes; then
94 dnl Check whether -g works, even if CXXFLAGS is set, in case the package
95 dnl plays around with CXXFLAGS (such as to build both debugging and
96 dnl normal versions of a library), tasteless as that idea is.
97 ac_test_CXXFLAGS="${CXXFLAGS+set}"
98 ac_save_CXXFLAGS="$CXXFLAGS"
101 if test "$ac_test_CXXFLAGS" = set; then
102 CXXFLAGS="$ac_save_CXXFLAGS"
103 elif test $ac_cv_prog_cxx_g = yes; then
110 test "${CXXFLAGS+set}" = set || CXXFLAGS="-g"
116 dnl version is pulled out to make it a bit easier to change using sed.
118 dnl Still use "libjava" here to placate dejagnu.
119 AM_INIT_AUTOMAKE(libjava, $version)
121 AC_CHECK_TOOL(AS, as)
122 AC_CHECK_TOOL(AR, ar)
123 AC_CHECK_TOOL(RANLIB, ranlib, :)
131 # configure.host sets the following important variables
132 # libgcj_cflags - host specific C compiler flags
133 # libgcj_cxxflags - host specific C++ compiler flags
134 # libgcj_javaflags - host specific Java compiler flags
140 . [$]{srcdir}/configure.host
142 LIBGCJ_CFLAGS="[$]{libgcj_cflags}"
143 LIBGCJ_CXXFLAGS="[$]{libgcj_cxxflags}"
144 LIBGCJ_JAVAFLAGS="[$]{libgcj_javaflags}"
145 AC_SUBST(LIBGCJ_CFLAGS)
146 AC_SUBST(LIBGCJ_CXXFLAGS)
147 AC_SUBST(LIBGCJ_JAVAFLAGS)
150 sinclude(../libtool.m4)
151 dnl The lines below arrange for aclocal not to bring libtool.m4
152 dnl AM_PROG_LIBTOOL into aclocal.m4, while still arranging for automake
153 dnl to add a definition of LIBTOOL to Makefile.in.
155 AC_DEFUN([AM_PROG_LIBTOOL],)
156 AC_DEFUN([AC_LIBTOOL_DLOPEN],)
157 AC_DEFUN([AC_LIBLTDL_CONVENIENCE],)
158 AC_DEFUN([LT_AC_PROG_GCJ],)
165 dnl From Bruno Haible.
169 dnl Some systems have iconv in libc, some have it in libiconv (OSF/1 and
170 dnl those with the standalone portable GNU libiconv installed).
172 am_cv_lib_iconv_ldpath=
173 AC_ARG_WITH([libiconv-prefix],
174 [ --with-libiconv-prefix=DIR search for libiconv in DIR/include and DIR/lib], [
175 for dir in `echo "$withval" | tr : ' '`; do
176 if test -d $dir/include; then CPPFLAGS="$CPPFLAGS -I$dir/include"; fi
177 if test -d $dir/lib; then am_cv_lib_iconv_ldpath="-L$dir/lib"; fi
181 AC_CACHE_CHECK(for iconv, am_cv_func_iconv, [
182 am_cv_func_iconv="no, consider installing GNU libiconv"
184 AC_TRY_LINK([#include <stdlib.h>
186 [iconv_t cd = iconv_open("","");
187 iconv(cd,NULL,NULL,NULL,NULL);
189 am_cv_func_iconv=yes)
190 if test "$am_cv_func_iconv" != yes; then
192 LIBS="$LIBS $am_cv_libiconv_ldpath -liconv"
193 AC_TRY_LINK([#include <stdlib.h>
195 [iconv_t cd = iconv_open("","");
196 iconv(cd,NULL,NULL,NULL,NULL);
199 am_cv_func_iconv=yes)
203 if test "$am_cv_func_iconv" = yes; then
204 AC_DEFINE(HAVE_ICONV, 1, [Define if you have the iconv() function.])
205 AC_MSG_CHECKING([for iconv declaration])
206 AC_CACHE_VAL(am_cv_proto_iconv, [
214 #if defined(__STDC__) || defined(__cplusplus)
215 size_t iconv (iconv_t cd, char * *inbuf, size_t *inbytesleft, char * *outbuf, size_t *outbytesleft);
219 ], [], am_cv_proto_iconv_arg1="", am_cv_proto_iconv_arg1="const")
220 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);"])
221 am_cv_proto_iconv=`echo "[$]am_cv_proto_iconv" | tr -s ' ' | sed -e 's/( /(/'`
222 AC_MSG_RESULT([$]{ac_t:-
223 }[$]am_cv_proto_iconv)
224 AC_DEFINE_UNQUOTED(ICONV_CONST, $am_cv_proto_iconv_arg1,
225 [Define as const if the declaration of iconv() needs const.])
228 if test "$am_cv_lib_iconv" = yes; then
229 LIBICONV="$am_cv_lib_iconv_ldpath -liconv"
234 # Check whether LC_MESSAGES is available in <locale.h>.
235 # Ulrich Drepper <drepper@cygnus.com>, 1995.
237 # This file can be copied and used freely without restrictions. It can
238 # be used in projects which are not available under the GNU General Public
239 # License or the GNU Library General Public License but which still want
240 # to provide support for the GNU gettext functionality.
241 # Please note that the actual code of the GNU gettext library is covered
242 # by the GNU Library General Public License, and the rest of the GNU
243 # gettext package package is covered by the GNU General Public License.
244 # They are *not* in the public domain.
248 AC_DEFUN([AM_LC_MESSAGES],
249 [AC_CHECK_HEADERS(locale.h)
250 if test $ac_cv_header_locale_h = yes; then
251 AC_CACHE_CHECK([for LC_MESSAGES], am_cv_val_LC_MESSAGES,
252 [AC_TRY_LINK([#include <locale.h>], [return LC_MESSAGES],
253 am_cv_val_LC_MESSAGES=yes, am_cv_val_LC_MESSAGES=no)])
254 if test $am_cv_val_LC_MESSAGES = yes; then
255 AC_DEFINE(HAVE_LC_MESSAGES, 1,
256 [Define if your <locale.h> file defines LC_MESSAGES.])
260 AC_DEFUN([CHECK_FOR_BROKEN_MINGW_LD],
262 AC_MSG_CHECKING(whether 'ld' is at least 2.13)
263 LD_PROG=`$CC --print-prog-name=ld`
264 LD_VERSION=`$LD_PROG --version`
265 LD_VERSION_MAJOR=`echo "$LD_VERSION" | head -1 | cut -d '.' -f 1 | cut -d ' ' -f 4`
266 LD_VERSION_MINOR=`echo "$LD_VERSION" | head -1 | cut -d '.' -f 2`
267 if expr "$LD_VERSION_MAJOR" \> 2 > /dev/null; then
270 if expr "$LD_VERSION_MAJOR" = 2 && expr "$LD_VERSION_MINOR" \>= 13 > /dev/null; then
274 if test "x$LD_OK" != x; then
275 AC_MSG_RESULT([yes; major=$LD_VERSION_MAJOR, minor=$LD_VERSION_MINOR])
277 AC_MSG_RESULT([no; major=$LD_VERSION_MAJOR, minor=$LD_VERSION_MINOR])
278 AC_MSG_WARN([ld <2.13 detected; enabling JV_LINKER_CANNOT_8BYTE_ALIGN_STATICS hack...])
279 AC_DEFINE(JV_LINKER_CANNOT_8BYTE_ALIGN_STATICS, 1,
280 [Indicate that linker is not able to 8-byte align static data])
282 ])# CHECK_FOR_BROKEN_MINGW_LD
284 dnl PKG_CHECK_MODULES(GSTUFF, gtk+-2.0 >= 1.3 glib = 1.3.4, action-if, action-not)
285 dnl defines GSTUFF_LIBS, GSTUFF_CFLAGS, see pkg-config man page
286 dnl also defines GSTUFF_PKG_ERRORS on error
287 AC_DEFUN(PKG_CHECK_MODULES, [
290 if test -z "$PKG_CONFIG"; then
291 AC_PATH_PROG(PKG_CONFIG, pkg-config, no)
294 if test "$PKG_CONFIG" = "no" ; then
295 echo "*** The pkg-config script could not be found. Make sure it is"
296 echo "*** in your path, or set the PKG_CONFIG environment variable"
297 echo "*** to the full path to pkg-config."
298 echo "*** Or see http://www.freedesktop.org/software/pkgconfig to get pkg-config."
300 PKG_CONFIG_MIN_VERSION=0.9.0
301 if $PKG_CONFIG --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then
302 AC_MSG_CHECKING(for $2)
304 if $PKG_CONFIG --exists "$2" ; then
308 AC_MSG_CHECKING($1_CFLAGS)
309 $1_CFLAGS=`$PKG_CONFIG --cflags "$2"`
310 AC_MSG_RESULT($$1_CFLAGS)
312 AC_MSG_CHECKING($1_LIBS)
313 $1_LIBS=`$PKG_CONFIG --libs "$2"`
314 AC_MSG_RESULT($$1_LIBS)
318 ## If we have a custom action on failure, don't print errors, but
319 ## do set a variable so people can do so.
320 $1_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "$2"`
321 ifelse([$4], ,echo $$1_PKG_ERRORS,)
327 echo "*** Your version of pkg-config is too old. You need version $PKG_CONFIG_MIN_VERSION or newer."
328 echo "*** See http://www.freedesktop.org/software/pkgconfig"
332 if test $succeeded = yes; then
333 ifelse([$3], , :, [$3])
335 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])
341 # lib-prefix.m4 serial 3 (gettext-0.12.2)
342 dnl Copyright (C) 2001-2003 Free Software Foundation, Inc.
343 dnl This file is free software, distributed under the terms of the GNU
344 dnl General Public License. As a special exception to the GNU General
345 dnl Public License, this file may be distributed as part of a program
346 dnl that contains a configuration script generated by Autoconf, under
347 dnl the same distribution terms as the rest of that program.
349 dnl From Bruno Haible.
351 dnl AC_LIB_ARG_WITH is synonymous to AC_ARG_WITH in autoconf-2.13, and
352 dnl similar to AC_ARG_WITH in autoconf 2.52...2.57 except that is doesn't
353 dnl require excessive bracketing.
354 ifdef([AC_HELP_STRING],
355 [AC_DEFUN([AC_LIB_ARG_WITH], [AC_ARG_WITH([$1],[[$2]],[$3],[$4])])],
356 [AC_DEFUN([AC_][LIB_ARG_WITH], [AC_ARG_WITH([$1],[$2],[$3],[$4])])])
358 dnl AC_LIB_PREFIX adds to the CPPFLAGS and LDFLAGS the flags that are needed
359 dnl to access previously installed libraries. The basic assumption is that
360 dnl a user will want packages to use other packages he previously installed
361 dnl with the same --prefix option.
362 dnl This macro is not needed if only AC_LIB_LINKFLAGS is used to locate
363 dnl libraries, but is otherwise very convenient.
364 AC_DEFUN([AC_LIB_PREFIX],
366 AC_BEFORE([$0], [AC_LIB_LINKFLAGS])
367 AC_REQUIRE([AC_PROG_CC])
368 AC_REQUIRE([AC_CANONICAL_HOST])
369 AC_REQUIRE([AC_LIB_PREPARE_PREFIX])
370 dnl By default, look in $includedir and $libdir.
372 AC_LIB_WITH_FINAL_PREFIX([
373 eval additional_includedir=\"$includedir\"
374 eval additional_libdir=\"$libdir\"
376 AC_LIB_ARG_WITH([lib-prefix],
377 [ --with-lib-prefix[=DIR] search for libraries in DIR/include and DIR/lib
378 --without-lib-prefix don't search for libraries in includedir and libdir],
380 if test "X$withval" = "Xno"; then
383 if test "X$withval" = "X"; then
384 AC_LIB_WITH_FINAL_PREFIX([
385 eval additional_includedir=\"$includedir\"
386 eval additional_libdir=\"$libdir\"
389 additional_includedir="$withval/include"
390 additional_libdir="$withval/lib"
394 if test $use_additional = yes; then
395 dnl Potentially add $additional_includedir to $CPPFLAGS.
397 dnl 1. if it's the standard /usr/include,
398 dnl 2. if it's already present in $CPPFLAGS,
399 dnl 3. if it's /usr/local/include and we are using GCC on Linux,
400 dnl 4. if it doesn't exist as a directory.
401 if test "X$additional_includedir" != "X/usr/include"; then
403 for x in $CPPFLAGS; do
404 AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
405 if test "X$x" = "X-I$additional_includedir"; then
410 if test -z "$haveit"; then
411 if test "X$additional_includedir" = "X/usr/local/include"; then
412 if test -n "$GCC"; then
418 if test -z "$haveit"; then
419 if test -d "$additional_includedir"; then
420 dnl Really add $additional_includedir to $CPPFLAGS.
421 CPPFLAGS="${CPPFLAGS}${CPPFLAGS:+ }-I$additional_includedir"
426 dnl Potentially add $additional_libdir to $LDFLAGS.
428 dnl 1. if it's the standard /usr/lib,
429 dnl 2. if it's already present in $LDFLAGS,
430 dnl 3. if it's /usr/local/lib and we are using GCC on Linux,
431 dnl 4. if it doesn't exist as a directory.
432 if test "X$additional_libdir" != "X/usr/lib"; then
434 for x in $LDFLAGS; do
435 AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
436 if test "X$x" = "X-L$additional_libdir"; then
441 if test -z "$haveit"; then
442 if test "X$additional_libdir" = "X/usr/local/lib"; then
443 if test -n "$GCC"; then
449 if test -z "$haveit"; then
450 if test -d "$additional_libdir"; then
451 dnl Really add $additional_libdir to $LDFLAGS.
452 LDFLAGS="${LDFLAGS}${LDFLAGS:+ }-L$additional_libdir"
460 dnl AC_LIB_PREPARE_PREFIX creates variables acl_final_prefix,
461 dnl acl_final_exec_prefix, containing the values to which $prefix and
462 dnl $exec_prefix will expand at the end of the configure script.
463 AC_DEFUN([AC_LIB_PREPARE_PREFIX],
465 dnl Unfortunately, prefix and exec_prefix get only finally determined
466 dnl at the end of configure.
467 if test "X$prefix" = "XNONE"; then
468 acl_final_prefix="$ac_default_prefix"
470 acl_final_prefix="$prefix"
472 if test "X$exec_prefix" = "XNONE"; then
473 acl_final_exec_prefix='${prefix}'
475 acl_final_exec_prefix="$exec_prefix"
477 acl_save_prefix="$prefix"
478 prefix="$acl_final_prefix"
479 eval acl_final_exec_prefix=\"$acl_final_exec_prefix\"
480 prefix="$acl_save_prefix"
483 dnl AC_LIB_WITH_FINAL_PREFIX([statement]) evaluates statement, with the
484 dnl variables prefix and exec_prefix bound to the values they will have
485 dnl at the end of the configure script.
486 AC_DEFUN([AC_LIB_WITH_FINAL_PREFIX],
488 acl_save_prefix="$prefix"
489 prefix="$acl_final_prefix"
490 acl_save_exec_prefix="$exec_prefix"
491 exec_prefix="$acl_final_exec_prefix"
493 exec_prefix="$acl_save_exec_prefix"
494 prefix="$acl_save_prefix"
497 # lib-link.m4 serial 4 (gettext-0.12)
498 dnl Copyright (C) 2001-2003 Free Software Foundation, Inc.
499 dnl This file is free software, distributed under the terms of the GNU
500 dnl General Public License. As a special exception to the GNU General
501 dnl Public License, this file may be distributed as part of a program
502 dnl that contains a configuration script generated by Autoconf, under
503 dnl the same distribution terms as the rest of that program.
505 dnl From Bruno Haible.
507 dnl AC_LIB_LINKFLAGS(name [, dependencies]) searches for libname and
508 dnl the libraries corresponding to explicit and implicit dependencies.
509 dnl Sets and AC_SUBSTs the LIB${NAME} and LTLIB${NAME} variables and
510 dnl augments the CPPFLAGS variable.
511 AC_DEFUN([AC_LIB_LINKFLAGS],
513 AC_REQUIRE([AC_LIB_PREPARE_PREFIX])
514 AC_REQUIRE([AC_LIB_RPATH])
515 define([Name],[translit([$1],[./-], [___])])
516 define([NAME],[translit([$1],[abcdefghijklmnopqrstuvwxyz./-],
517 [ABCDEFGHIJKLMNOPQRSTUVWXYZ___])])
518 AC_CACHE_CHECK([how to link with lib[]$1], [ac_cv_lib[]Name[]_libs], [
519 AC_LIB_LINKFLAGS_BODY([$1], [$2])
520 ac_cv_lib[]Name[]_libs="$LIB[]NAME"
521 ac_cv_lib[]Name[]_ltlibs="$LTLIB[]NAME"
522 ac_cv_lib[]Name[]_cppflags="$INC[]NAME"
524 LIB[]NAME="$ac_cv_lib[]Name[]_libs"
525 LTLIB[]NAME="$ac_cv_lib[]Name[]_ltlibs"
526 INC[]NAME="$ac_cv_lib[]Name[]_cppflags"
527 AC_LIB_APPENDTOVAR([CPPFLAGS], [$INC]NAME)
529 AC_SUBST([LTLIB]NAME)
530 dnl Also set HAVE_LIB[]NAME so that AC_LIB_HAVE_LINKFLAGS can reuse the
531 dnl results of this search when this library appears as a dependency.
537 dnl AC_LIB_HAVE_LINKFLAGS(name, dependencies, includes, testcode)
538 dnl searches for libname and the libraries corresponding to explicit and
539 dnl implicit dependencies, together with the specified include files and
540 dnl the ability to compile and link the specified testcode. If found, it
541 dnl sets and AC_SUBSTs HAVE_LIB${NAME}=yes and the LIB${NAME} and
542 dnl LTLIB${NAME} variables and augments the CPPFLAGS variable, and
543 dnl #defines HAVE_LIB${NAME} to 1. Otherwise, it sets and AC_SUBSTs
544 dnl HAVE_LIB${NAME}=no and LIB${NAME} and LTLIB${NAME} to empty.
545 AC_DEFUN([AC_LIB_HAVE_LINKFLAGS],
547 AC_REQUIRE([AC_LIB_PREPARE_PREFIX])
548 AC_REQUIRE([AC_LIB_RPATH])
549 define([Name],[translit([$1],[./-], [___])])
550 define([NAME],[translit([$1],[abcdefghijklmnopqrstuvwxyz./-],
551 [ABCDEFGHIJKLMNOPQRSTUVWXYZ___])])
553 dnl Search for lib[]Name and define LIB[]NAME, LTLIB[]NAME and INC[]NAME
555 AC_LIB_LINKFLAGS_BODY([$1], [$2])
557 dnl Add $INC[]NAME to CPPFLAGS before performing the following checks,
558 dnl because if the user has installed lib[]Name and not disabled its use
559 dnl via --without-lib[]Name-prefix, he wants to use it.
560 ac_save_CPPFLAGS="$CPPFLAGS"
561 AC_LIB_APPENDTOVAR([CPPFLAGS], [$INC]NAME)
563 AC_CACHE_CHECK([for lib[]$1], [ac_cv_lib[]Name], [
565 LIBS="$LIBS $LIB[]NAME"
566 AC_TRY_LINK([$3], [$4], [ac_cv_lib[]Name=yes], [ac_cv_lib[]Name=no])
569 if test "$ac_cv_lib[]Name" = yes; then
571 AC_DEFINE([HAVE_LIB]NAME, 1, [Define if you have the $1 library.])
572 AC_MSG_CHECKING([how to link with lib[]$1])
573 AC_MSG_RESULT([$LIB[]NAME])
576 dnl If $LIB[]NAME didn't lead to a usable library, we don't need
577 dnl $INC[]NAME either.
578 CPPFLAGS="$ac_save_CPPFLAGS"
582 AC_SUBST([HAVE_LIB]NAME)
584 AC_SUBST([LTLIB]NAME)
589 dnl Determine the platform dependent parameters needed to use rpath:
590 dnl libext, shlibext, hardcode_libdir_flag_spec, hardcode_libdir_separator,
591 dnl hardcode_direct, hardcode_minus_L.
592 AC_DEFUN([AC_LIB_RPATH],
594 AC_REQUIRE([AC_PROG_CC]) dnl we use $CC, $GCC, $LDFLAGS
595 AC_REQUIRE([AC_LIB_PROG_LD]) dnl we use $LD, $with_gnu_ld
596 AC_REQUIRE([AC_CANONICAL_HOST]) dnl we use $host
597 AC_REQUIRE([AC_CONFIG_AUX_DIR_DEFAULT]) dnl we use $ac_aux_dir
598 AC_CACHE_CHECK([for shared library run path origin], acl_cv_rpath, [
599 CC="$CC" GCC="$GCC" LDFLAGS="$LDFLAGS" LD="$LD" with_gnu_ld="$with_gnu_ld" \
600 ${CONFIG_SHELL-/bin/sh} "$ac_aux_dir/config.rpath" "$host" > conftest.sh
606 libext="$acl_cv_libext"
607 shlibext="$acl_cv_shlibext"
608 hardcode_libdir_flag_spec="$acl_cv_hardcode_libdir_flag_spec"
609 hardcode_libdir_separator="$acl_cv_hardcode_libdir_separator"
610 hardcode_direct="$acl_cv_hardcode_direct"
611 hardcode_minus_L="$acl_cv_hardcode_minus_L"
612 dnl Determine whether the user wants rpath handling at all.
614 [ --disable-rpath do not hardcode runtime library paths],
618 dnl AC_LIB_LINKFLAGS_BODY(name [, dependencies]) searches for libname and
619 dnl the libraries corresponding to explicit and implicit dependencies.
620 dnl Sets the LIB${NAME}, LTLIB${NAME} and INC${NAME} variables.
621 AC_DEFUN([AC_LIB_LINKFLAGS_BODY],
623 define([NAME],[translit([$1],[abcdefghijklmnopqrstuvwxyz./-],
624 [ABCDEFGHIJKLMNOPQRSTUVWXYZ___])])
625 dnl By default, look in $includedir and $libdir.
627 AC_LIB_WITH_FINAL_PREFIX([
628 eval additional_includedir=\"$includedir\"
629 eval additional_libdir=\"$libdir\"
631 AC_LIB_ARG_WITH([lib$1-prefix],
632 [ --with-lib$1-prefix[=DIR] search for lib$1 in DIR/include and DIR/lib
633 --without-lib$1-prefix don't search for lib$1 in includedir and libdir],
635 if test "X$withval" = "Xno"; then
638 if test "X$withval" = "X"; then
639 AC_LIB_WITH_FINAL_PREFIX([
640 eval additional_includedir=\"$includedir\"
641 eval additional_libdir=\"$libdir\"
644 additional_includedir="$withval/include"
645 additional_libdir="$withval/lib"
649 dnl Search the library and its dependencies in $additional_libdir and
650 dnl $LDFLAGS. Using breadth-first-seach.
656 names_already_handled=
657 names_next_round='$1 $2'
658 while test -n "$names_next_round"; do
659 names_this_round="$names_next_round"
661 for name in $names_this_round; do
663 for n in $names_already_handled; do
664 if test "$n" = "$name"; then
669 if test -z "$already_handled"; then
670 names_already_handled="$names_already_handled $name"
671 dnl See if it was already located by an earlier AC_LIB_LINKFLAGS
672 dnl or AC_LIB_HAVE_LINKFLAGS call.
673 uppername=`echo "$name" | sed -e 'y|abcdefghijklmnopqrstuvwxyz./-|ABCDEFGHIJKLMNOPQRSTUVWXYZ___|'`
674 eval value=\"\$HAVE_LIB$uppername\"
675 if test -n "$value"; then
676 if test "$value" = yes; then
677 eval value=\"\$LIB$uppername\"
678 test -z "$value" || LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$value"
679 eval value=\"\$LTLIB$uppername\"
680 test -z "$value" || LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }$value"
682 dnl An earlier call to AC_LIB_HAVE_LINKFLAGS has determined
683 dnl that this library doesn't exist. So just drop it.
687 dnl Search the library lib$name in $additional_libdir and $LDFLAGS
688 dnl and the already constructed $LIBNAME/$LTLIBNAME.
693 if test $use_additional = yes; then
694 if test -n "$shlibext" && test -f "$additional_libdir/lib$name.$shlibext"; then
695 found_dir="$additional_libdir"
696 found_so="$additional_libdir/lib$name.$shlibext"
697 if test -f "$additional_libdir/lib$name.la"; then
698 found_la="$additional_libdir/lib$name.la"
701 if test -f "$additional_libdir/lib$name.$libext"; then
702 found_dir="$additional_libdir"
703 found_a="$additional_libdir/lib$name.$libext"
704 if test -f "$additional_libdir/lib$name.la"; then
705 found_la="$additional_libdir/lib$name.la"
710 if test "X$found_dir" = "X"; then
711 for x in $LDFLAGS $LTLIB[]NAME; do
712 AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
715 dir=`echo "X$x" | sed -e 's/^X-L//'`
716 if test -n "$shlibext" && test -f "$dir/lib$name.$shlibext"; then
718 found_so="$dir/lib$name.$shlibext"
719 if test -f "$dir/lib$name.la"; then
720 found_la="$dir/lib$name.la"
723 if test -f "$dir/lib$name.$libext"; then
725 found_a="$dir/lib$name.$libext"
726 if test -f "$dir/lib$name.la"; then
727 found_la="$dir/lib$name.la"
733 if test "X$found_dir" != "X"; then
738 if test "X$found_dir" != "X"; then
739 dnl Found the library.
740 LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }-L$found_dir -l$name"
741 if test "X$found_so" != "X"; then
742 dnl Linking with a shared library. We attempt to hardcode its
743 dnl directory into the executable's runpath, unless it's the
744 dnl standard /usr/lib.
745 if test "$enable_rpath" = no || test "X$found_dir" = "X/usr/lib"; then
746 dnl No hardcoding is needed.
747 LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_so"
749 dnl Use an explicit option to hardcode DIR into the resulting
751 dnl Potentially add DIR to ltrpathdirs.
752 dnl The ltrpathdirs will be appended to $LTLIBNAME at the end.
754 for x in $ltrpathdirs; do
755 if test "X$x" = "X$found_dir"; then
760 if test -z "$haveit"; then
761 ltrpathdirs="$ltrpathdirs $found_dir"
763 dnl The hardcoding into $LIBNAME is system dependent.
764 if test "$hardcode_direct" = yes; then
765 dnl Using DIR/libNAME.so during linking hardcodes DIR into the
766 dnl resulting binary.
767 LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_so"
769 if test -n "$hardcode_libdir_flag_spec" && test "$hardcode_minus_L" = no; then
770 dnl Use an explicit option to hardcode DIR into the resulting
772 LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_so"
773 dnl Potentially add DIR to rpathdirs.
774 dnl The rpathdirs will be appended to $LIBNAME at the end.
776 for x in $rpathdirs; do
777 if test "X$x" = "X$found_dir"; then
782 if test -z "$haveit"; then
783 rpathdirs="$rpathdirs $found_dir"
786 dnl Rely on "-L$found_dir".
787 dnl But don't add it if it's already contained in the LDFLAGS
788 dnl or the already constructed $LIBNAME
790 for x in $LDFLAGS $LIB[]NAME; do
791 AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
792 if test "X$x" = "X-L$found_dir"; then
797 if test -z "$haveit"; then
798 LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-L$found_dir"
800 if test "$hardcode_minus_L" != no; then
801 dnl FIXME: Not sure whether we should use
802 dnl "-L$found_dir -l$name" or "-L$found_dir $found_so"
804 LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_so"
806 dnl We cannot use $hardcode_runpath_var and LD_RUN_PATH
807 dnl here, because this doesn't fit in flags passed to the
808 dnl compiler. So give up. No hardcoding. This affects only
809 dnl very old systems.
810 dnl FIXME: Not sure whether we should use
811 dnl "-L$found_dir -l$name" or "-L$found_dir $found_so"
813 LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-l$name"
819 if test "X$found_a" != "X"; then
820 dnl Linking with a static library.
821 LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_a"
823 dnl We shouldn't come here, but anyway it's good to have a
825 LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-L$found_dir -l$name"
828 dnl Assume the include files are nearby.
829 additional_includedir=
832 basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e 's,/lib/*$,,'`
833 additional_includedir="$basedir/include"
836 if test "X$additional_includedir" != "X"; then
837 dnl Potentially add $additional_includedir to $INCNAME.
839 dnl 1. if it's the standard /usr/include,
840 dnl 2. if it's /usr/local/include and we are using GCC on Linux,
841 dnl 3. if it's already present in $CPPFLAGS or the already
842 dnl constructed $INCNAME,
843 dnl 4. if it doesn't exist as a directory.
844 if test "X$additional_includedir" != "X/usr/include"; then
846 if test "X$additional_includedir" = "X/usr/local/include"; then
847 if test -n "$GCC"; then
853 if test -z "$haveit"; then
854 for x in $CPPFLAGS $INC[]NAME; do
855 AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
856 if test "X$x" = "X-I$additional_includedir"; then
861 if test -z "$haveit"; then
862 if test -d "$additional_includedir"; then
863 dnl Really add $additional_includedir to $INCNAME.
864 INC[]NAME="${INC[]NAME}${INC[]NAME:+ }-I$additional_includedir"
870 dnl Look for dependencies.
871 if test -n "$found_la"; then
872 dnl Read the .la file. It defines the variables
873 dnl dlname, library_names, old_library, dependency_libs, current,
874 dnl age, revision, installed, dlopen, dlpreopen, libdir.
875 save_libdir="$libdir"
877 */* | *\\*) . "$found_la" ;;
878 *) . "./$found_la" ;;
880 libdir="$save_libdir"
881 dnl We use only dependency_libs.
882 for dep in $dependency_libs; do
885 additional_libdir=`echo "X$dep" | sed -e 's/^X-L//'`
886 dnl Potentially add $additional_libdir to $LIBNAME and $LTLIBNAME.
888 dnl 1. if it's the standard /usr/lib,
889 dnl 2. if it's /usr/local/lib and we are using GCC on Linux,
890 dnl 3. if it's already present in $LDFLAGS or the already
891 dnl constructed $LIBNAME,
892 dnl 4. if it doesn't exist as a directory.
893 if test "X$additional_libdir" != "X/usr/lib"; then
895 if test "X$additional_libdir" = "X/usr/local/lib"; then
896 if test -n "$GCC"; then
902 if test -z "$haveit"; then
904 for x in $LDFLAGS $LIB[]NAME; do
905 AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
906 if test "X$x" = "X-L$additional_libdir"; then
911 if test -z "$haveit"; then
912 if test -d "$additional_libdir"; then
913 dnl Really add $additional_libdir to $LIBNAME.
914 LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-L$additional_libdir"
918 for x in $LDFLAGS $LTLIB[]NAME; do
919 AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
920 if test "X$x" = "X-L$additional_libdir"; then
925 if test -z "$haveit"; then
926 if test -d "$additional_libdir"; then
927 dnl Really add $additional_libdir to $LTLIBNAME.
928 LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }-L$additional_libdir"
935 dir=`echo "X$dep" | sed -e 's/^X-R//'`
936 if test "$enable_rpath" != no; then
937 dnl Potentially add DIR to rpathdirs.
938 dnl The rpathdirs will be appended to $LIBNAME at the end.
940 for x in $rpathdirs; do
941 if test "X$x" = "X$dir"; then
946 if test -z "$haveit"; then
947 rpathdirs="$rpathdirs $dir"
949 dnl Potentially add DIR to ltrpathdirs.
950 dnl The ltrpathdirs will be appended to $LTLIBNAME at the end.
952 for x in $ltrpathdirs; do
953 if test "X$x" = "X$dir"; then
958 if test -z "$haveit"; then
959 ltrpathdirs="$ltrpathdirs $dir"
964 dnl Handle this in the next round.
965 names_next_round="$names_next_round "`echo "X$dep" | sed -e 's/^X-l//'`
968 dnl Handle this in the next round. Throw away the .la's
969 dnl directory; it is already contained in a preceding -L
971 names_next_round="$names_next_round "`echo "X$dep" | sed -e 's,^X.*/,,' -e 's,^lib,,' -e 's,\.la$,,'`
974 dnl Most likely an immediate library name.
975 LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$dep"
976 LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }$dep"
982 dnl Didn't find the library; assume it is in the system directories
983 dnl known to the linker and runtime loader. (All the system
984 dnl directories known to the linker should also be known to the
985 dnl runtime loader, otherwise the system is severely misconfigured.)
986 LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-l$name"
987 LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }-l$name"
993 if test "X$rpathdirs" != "X"; then
994 if test -n "$hardcode_libdir_separator"; then
995 dnl Weird platform: only the last -rpath option counts, the user must
996 dnl pass all path elements in one option. We can arrange that for a
997 dnl single library, but not when more than one $LIBNAMEs are used.
999 for found_dir in $rpathdirs; do
1000 alldirs="${alldirs}${alldirs:+$hardcode_libdir_separator}$found_dir"
1002 dnl Note: hardcode_libdir_flag_spec uses $libdir and $wl.
1003 acl_save_libdir="$libdir"
1005 eval flag=\"$hardcode_libdir_flag_spec\"
1006 libdir="$acl_save_libdir"
1007 LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$flag"
1009 dnl The -rpath options are cumulative.
1010 for found_dir in $rpathdirs; do
1011 acl_save_libdir="$libdir"
1013 eval flag=\"$hardcode_libdir_flag_spec\"
1014 libdir="$acl_save_libdir"
1015 LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$flag"
1019 if test "X$ltrpathdirs" != "X"; then
1020 dnl When using libtool, the option that works for both libraries and
1021 dnl executables is -R. The -R options are cumulative.
1022 for found_dir in $ltrpathdirs; do
1023 LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }-R$found_dir"
1028 dnl AC_LIB_APPENDTOVAR(VAR, CONTENTS) appends the elements of CONTENTS to VAR,
1029 dnl unless already present in VAR.
1030 dnl Works only for CPPFLAGS, not for LIB* variables because that sometimes
1031 dnl contains two or three consecutive elements that belong together.
1032 AC_DEFUN([AC_LIB_APPENDTOVAR],
1034 for element in [$2]; do
1037 AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
1038 if test "X$x" = "X$element"; then
1043 if test -z "$haveit"; then
1044 [$1]="${[$1]}${[$1]:+ }$element"
1049 # lib-ld.m4 serial 2 (gettext-0.12)
1050 dnl Copyright (C) 1996-2003 Free Software Foundation, Inc.
1051 dnl This file is free software, distributed under the terms of the GNU
1052 dnl General Public License. As a special exception to the GNU General
1053 dnl Public License, this file may be distributed as part of a program
1054 dnl that contains a configuration script generated by Autoconf, under
1055 dnl the same distribution terms as the rest of that program.
1057 dnl Subroutines of libtool.m4,
1058 dnl with replacements s/AC_/AC_LIB/ and s/lt_cv/acl_cv/ to avoid collision
1059 dnl with libtool.m4.
1061 dnl From libtool-1.4. Sets the variable with_gnu_ld to yes or no.
1062 AC_DEFUN([AC_LIB_PROG_LD_GNU],
1063 [AC_CACHE_CHECK([if the linker ($LD) is GNU ld], acl_cv_prog_gnu_ld,
1064 [# I'd rather use --version here, but apparently some GNU ld's only accept -v.
1065 if $LD -v 2>&1 </dev/null | egrep '(GNU|with BFD)' 1>&5; then
1066 acl_cv_prog_gnu_ld=yes
1068 acl_cv_prog_gnu_ld=no
1070 with_gnu_ld=$acl_cv_prog_gnu_ld
1073 dnl From libtool-1.4. Sets the variable LD.
1074 AC_DEFUN([AC_LIB_PROG_LD],
1075 [AC_ARG_WITH(gnu-ld,
1076 [ --with-gnu-ld assume the C compiler uses GNU ld [default=no]],
1077 test "$withval" = no || with_gnu_ld=yes, with_gnu_ld=no)
1078 AC_REQUIRE([AC_PROG_CC])dnl
1079 AC_REQUIRE([AC_CANONICAL_HOST])dnl
1080 # Prepare PATH_SEPARATOR.
1081 # The user is always right.
1082 if test "${PATH_SEPARATOR+set}" != set; then
1083 echo "#! /bin/sh" >conf$$.sh
1084 echo "exit 0" >>conf$$.sh
1086 if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then
1094 if test "$GCC" = yes; then
1095 # Check if gcc -print-prog-name=ld gives a path.
1096 AC_MSG_CHECKING([for ld used by GCC])
1099 # gcc leaves a trailing carriage return which upsets mingw
1100 ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
1102 ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
1105 # Accept absolute paths.
1106 [[\\/]* | [A-Za-z]:[\\/]*)]
1107 [re_direlt='/[^/][^/]*/\.\./']
1108 # Canonicalize the path of ld
1109 ac_prog=`echo $ac_prog| sed 's%\\\\%/%g'`
1110 while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do
1111 ac_prog=`echo $ac_prog| sed "s%$re_direlt%/%"`
1113 test -z "$LD" && LD="$ac_prog"
1116 # If it fails, then pretend we aren't using GCC.
1120 # If it is relative, then search for the first ld in PATH.
1124 elif test "$with_gnu_ld" = yes; then
1125 AC_MSG_CHECKING([for GNU ld])
1127 AC_MSG_CHECKING([for non-GNU ld])
1129 AC_CACHE_VAL(acl_cv_path_LD,
1130 [if test -z "$LD"; then
1131 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR-:}"
1132 for ac_dir in $PATH; do
1133 test -z "$ac_dir" && ac_dir=.
1134 if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
1135 acl_cv_path_LD="$ac_dir/$ac_prog"
1136 # Check to see if the program is GNU ld. I'd rather use --version,
1137 # but apparently some GNU ld's only accept -v.
1138 # Break only if it was the GNU/non-GNU ld that we prefer.
1139 if "$acl_cv_path_LD" -v 2>&1 < /dev/null | egrep '(GNU|with BFD)' > /dev/null; then
1140 test "$with_gnu_ld" != no && break
1142 test "$with_gnu_ld" != yes && break
1148 acl_cv_path_LD="$LD" # Let the user override the test with a path.
1150 LD="$acl_cv_path_LD"
1151 if test -n "$LD"; then
1156 test -z "$LD" && AC_MSG_ERROR([no acceptable ld found in \$PATH])
1160 # Do all the work for Automake. This macro actually does too much --
1161 # some checks are only needed if your package does certain things.
1162 # But this isn't really a big deal.
1167 dnl AM_INIT_AUTOMAKE(package,version, [no-define])
1169 AC_DEFUN([AM_INIT_AUTOMAKE],
1170 [AC_REQUIRE([AM_SET_CURRENT_AUTOMAKE_VERSION])dnl
1171 AC_REQUIRE([AC_PROG_INSTALL])
1176 dnl test to see if srcdir already configured
1177 if test "`cd $srcdir && pwd`" != "`pwd`" && test -f $srcdir/config.status; then
1178 AC_MSG_ERROR([source directory already configured; run "make distclean" there first])
1181 AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE", [Name of package])
1182 AC_DEFINE_UNQUOTED(VERSION, "$VERSION", [Version number of package]))
1183 AC_REQUIRE([AM_SANITY_CHECK])
1184 AC_REQUIRE([AC_ARG_PROGRAM])
1185 dnl FIXME This is truly gross.
1186 missing_dir=`cd $ac_aux_dir && pwd`
1187 AM_MISSING_PROG(ACLOCAL, aclocal-${am__api_version}, $missing_dir)
1188 AM_MISSING_PROG(AUTOCONF, autoconf, $missing_dir)
1189 AM_MISSING_PROG(AUTOMAKE, automake-${am__api_version}, $missing_dir)
1190 AM_MISSING_PROG(AUTOHEADER, autoheader, $missing_dir)
1191 AM_MISSING_PROG(MAKEINFO, makeinfo, $missing_dir)
1192 AC_REQUIRE([AC_PROG_MAKE_SET])])
1194 # Copyright 2002 Free Software Foundation, Inc.
1196 # This program is free software; you can redistribute it and/or modify
1197 # it under the terms of the GNU General Public License as published by
1198 # the Free Software Foundation; either version 2, or (at your option)
1199 # any later version.
1201 # This program is distributed in the hope that it will be useful,
1202 # but WITHOUT ANY WARRANTY; without even the implied warranty of
1203 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
1204 # GNU General Public License for more details.
1206 # You should have received a copy of the GNU General Public License
1207 # along with this program; if not, write to the Free Software
1208 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
1210 # AM_AUTOMAKE_VERSION(VERSION)
1211 # ----------------------------
1212 # Automake X.Y traces this macro to ensure aclocal.m4 has been
1213 # generated from the m4 files accompanying Automake X.Y.
1214 AC_DEFUN([AM_AUTOMAKE_VERSION],[am__api_version="1.4"])
1216 # AM_SET_CURRENT_AUTOMAKE_VERSION
1217 # -------------------------------
1218 # Call AM_AUTOMAKE_VERSION so it can be traced.
1219 # This function is AC_REQUIREd by AC_INIT_AUTOMAKE.
1220 AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION],
1221 [AM_AUTOMAKE_VERSION([1.4-p6])])
1224 # Check to make sure that the build environment is sane.
1227 AC_DEFUN([AM_SANITY_CHECK],
1228 [AC_MSG_CHECKING([whether build environment is sane])
1231 echo timestamp > conftestfile
1232 # Do `set' in a subshell so we don't clobber the current shell's
1233 # arguments. Must try -L first in case configure is actually a
1234 # symlink; some systems play weird games with the mod time of symlinks
1235 # (eg FreeBSD returns the mod time of the symlink's containing
1238 set X `ls -Lt $srcdir/configure conftestfile 2> /dev/null`
1239 if test "[$]*" = "X"; then
1241 set X `ls -t $srcdir/configure conftestfile`
1243 if test "[$]*" != "X $srcdir/configure conftestfile" \
1244 && test "[$]*" != "X conftestfile $srcdir/configure"; then
1246 # If neither matched, then we have a broken ls. This can happen
1247 # if, for instance, CONFIG_SHELL is bash and it inherits a
1248 # broken ls alias from the environment. This has actually
1249 # happened. Such a system could not be considered "sane".
1250 AC_MSG_ERROR([ls -t appears to fail. Make sure there is not a broken
1251 alias in your environment])
1254 test "[$]2" = conftestfile
1260 AC_MSG_ERROR([newly created file is older than distributed files!
1261 Check your system clock])
1264 AC_MSG_RESULT(yes)])
1266 dnl AM_MISSING_PROG(NAME, PROGRAM, DIRECTORY)
1267 dnl The program must properly implement --version.
1268 AC_DEFUN([AM_MISSING_PROG],
1269 [AC_MSG_CHECKING(for working $2)
1270 # Run test in a subshell; some versions of sh will print an error if
1271 # an executable is not found, even if stderr is redirected.
1272 # Redirect stdin to placate older versions of autoconf. Sigh.
1273 if ($2 --version) < /dev/null > /dev/null 2>&1; then
1275 AC_MSG_RESULT(found)
1278 AC_MSG_RESULT(missing)
1282 # Add --enable-maintainer-mode option to configure.
1287 AC_DEFUN([AM_MAINTAINER_MODE],
1288 [AC_MSG_CHECKING([whether to enable maintainer-specific portions of Makefiles])
1289 dnl maintainer-mode is disabled by default
1290 AC_ARG_ENABLE(maintainer-mode,
1291 [ --enable-maintainer-mode enable make rules and dependencies not useful
1292 (and sometimes confusing) to the casual installer],
1293 USE_MAINTAINER_MODE=$enableval,
1294 USE_MAINTAINER_MODE=no)
1295 AC_MSG_RESULT($USE_MAINTAINER_MODE)
1296 AM_CONDITIONAL(MAINTAINER_MODE, test $USE_MAINTAINER_MODE = yes)
1297 MAINT=$MAINTAINER_MODE_TRUE
1302 # Define a conditional.
1304 AC_DEFUN([AM_CONDITIONAL],
1315 # Like AC_CONFIG_HEADER, but automatically create stamp file.
1317 AC_DEFUN([AM_CONFIG_HEADER],
1319 AC_CONFIG_HEADER([$1])
1320 dnl When config.status generates a header, we must update the stamp-h file.
1321 dnl This file resides in the same directory as the config header
1322 dnl that is generated. We must strip everything past the first ":",
1323 dnl and everything past the last "/".
1324 AC_OUTPUT_COMMANDS(changequote(<<,>>)dnl
1325 ifelse(patsubst(<<$1>>, <<[^ ]>>, <<>>), <<>>,
1326 <<test -z "<<$>>CONFIG_HEADERS" || echo timestamp > patsubst(<<$1>>, <<^\([^:]*/\)?.*>>, <<\1>>)stamp-h<<>>dnl>>,
1328 for am_file in <<$1>>; do
1329 case " <<$>>CONFIG_HEADERS " in
1330 *" <<$>>am_file "*<<)>>
1331 echo timestamp > `echo <<$>>am_file | sed -e 's%:.*%%' -e 's%[^/]*$%%'`stamp-h$am_indx
1334 am_indx=`expr "<<$>>am_indx" + 1`
1338 # Configure paths for GTK+
1339 # Owen Taylor 1997-2001
1341 dnl AM_PATH_GTK_2_0([MINIMUM-VERSION, [ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND [, MODULES]]]])
1342 dnl Test for GTK+, and define GTK_CFLAGS and GTK_LIBS, if gthread is specified in MODULES,
1343 dnl pass to pkg-config
1345 AC_DEFUN(AM_PATH_GTK_2_0,
1347 dnl Get the cflags and libraries from pkg-config
1349 AC_ARG_ENABLE(gtktest, [ --disable-gtktest do not try to compile and run a test GTK+ program],
1350 , enable_gtktest=yes)
1352 pkg_config_args=gtk+-2.0
1357 pkg_config_args="$pkg_config_args gthread-2.0"
1364 AC_PATH_PROG(PKG_CONFIG, pkg-config, no)
1366 if test x$PKG_CONFIG != xno ; then
1367 if pkg-config --atleast-pkgconfig-version 0.7 ; then
1370 echo *** pkg-config too old; version 0.7 or better required.
1378 min_gtk_version=ifelse([$1], ,2.0.0,$1)
1379 AC_MSG_CHECKING(for GTK+ - version >= $min_gtk_version)
1381 if test x$PKG_CONFIG != xno ; then
1382 ## don't try to run the test against uninstalled libtool libs
1383 if $PKG_CONFIG --uninstalled $pkg_config_args; then
1384 echo "Will use uninstalled version of GTK+ found in PKG_CONFIG_PATH"
1388 if $PKG_CONFIG --atleast-version $min_gtk_version $pkg_config_args; then
1395 if test x"$no_gtk" = x ; then
1396 GTK_CFLAGS=`$PKG_CONFIG $pkg_config_args --cflags`
1397 GTK_LIBS=`$PKG_CONFIG $pkg_config_args --libs`
1398 gtk_config_major_version=`$PKG_CONFIG --modversion gtk+-2.0 | \
1399 sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\1/'`
1400 gtk_config_minor_version=`$PKG_CONFIG --modversion gtk+-2.0 | \
1401 sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\2/'`
1402 gtk_config_micro_version=`$PKG_CONFIG --modversion gtk+-2.0 | \
1403 sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\3/'`
1404 if test "x$enable_gtktest" = "xyes" ; then
1405 ac_save_CFLAGS="$CFLAGS"
1406 ac_save_LIBS="$LIBS"
1407 CFLAGS="$CFLAGS $GTK_CFLAGS"
1408 LIBS="$GTK_LIBS $LIBS"
1410 dnl Now check if the installed GTK+ is sufficiently new. (Also sanity
1411 dnl checks the results of pkg-config to some extent)
1415 #include <gtk/gtk.h>
1422 int major, minor, micro;
1425 system ("touch conf.gtktest");
1427 /* HP/UX 9 (%@#!) writes to sscanf strings */
1428 tmp_version = g_strdup("$min_gtk_version");
1429 if (sscanf(tmp_version, "%d.%d.%d", &major, &minor, µ) != 3) {
1430 printf("%s, bad version string\n", "$min_gtk_version");
1434 if ((gtk_major_version != $gtk_config_major_version) ||
1435 (gtk_minor_version != $gtk_config_minor_version) ||
1436 (gtk_micro_version != $gtk_config_micro_version))
1438 printf("\n*** 'pkg-config --modversion gtk+-2.0' returned %d.%d.%d, but GTK+ (%d.%d.%d)\n",
1439 $gtk_config_major_version, $gtk_config_minor_version, $gtk_config_micro_version,
1440 gtk_major_version, gtk_minor_version, gtk_micro_version);
1441 printf ("*** was found! If pkg-config was correct, then it is best\n");
1442 printf ("*** to remove the old version of GTK+. You may also be able to fix the error\n");
1443 printf("*** by modifying your LD_LIBRARY_PATH enviroment variable, or by editing\n");
1444 printf("*** /etc/ld.so.conf. Make sure you have run ldconfig if that is\n");
1445 printf("*** required on your system.\n");
1446 printf("*** If pkg-config was wrong, set the environment variable PKG_CONFIG_PATH\n");
1447 printf("*** to point to the correct configuration files\n");
1449 else if ((gtk_major_version != GTK_MAJOR_VERSION) ||
1450 (gtk_minor_version != GTK_MINOR_VERSION) ||
1451 (gtk_micro_version != GTK_MICRO_VERSION))
1453 printf("*** GTK+ header files (version %d.%d.%d) do not match\n",
1454 GTK_MAJOR_VERSION, GTK_MINOR_VERSION, GTK_MICRO_VERSION);
1455 printf("*** library (version %d.%d.%d)\n",
1456 gtk_major_version, gtk_minor_version, gtk_micro_version);
1460 if ((gtk_major_version > major) ||
1461 ((gtk_major_version == major) && (gtk_minor_version > minor)) ||
1462 ((gtk_major_version == major) && (gtk_minor_version == minor) && (gtk_micro_version >= micro)))
1468 printf("\n*** An old version of GTK+ (%d.%d.%d) was found.\n",
1469 gtk_major_version, gtk_minor_version, gtk_micro_version);
1470 printf("*** You need a version of GTK+ newer than %d.%d.%d. The latest version of\n",
1471 major, minor, micro);
1472 printf("*** GTK+ is always available from ftp://ftp.gtk.org.\n");
1474 printf("*** If you have already installed a sufficiently new version, this error\n");
1475 printf("*** probably means that the wrong copy of the pkg-config shell script is\n");
1476 printf("*** being found. The easiest way to fix this is to remove the old version\n");
1477 printf("*** of GTK+, but you can also set the PKG_CONFIG environment to point to the\n");
1478 printf("*** correct copy of pkg-config. (In this case, you will have to\n");
1479 printf("*** modify your LD_LIBRARY_PATH enviroment variable, or edit /etc/ld.so.conf\n");
1480 printf("*** so that the correct libraries are found at run-time))\n");
1485 ],, no_gtk=yes,[echo $ac_n "cross compiling; assumed OK... $ac_c"])
1486 CFLAGS="$ac_save_CFLAGS"
1487 LIBS="$ac_save_LIBS"
1490 if test "x$no_gtk" = x ; then
1491 AC_MSG_RESULT(yes (version $gtk_config_major_version.$gtk_config_minor_version.$gtk_config_micro_version))
1492 ifelse([$2], , :, [$2])
1495 if test "$PKG_CONFIG" = "no" ; then
1496 echo "*** A new enough version of pkg-config was not found."
1497 echo "*** See http://pkgconfig.sourceforge.net"
1499 if test -f conf.gtktest ; then
1502 echo "*** Could not run GTK+ test program, checking why..."
1503 ac_save_CFLAGS="$CFLAGS"
1504 ac_save_LIBS="$LIBS"
1505 CFLAGS="$CFLAGS $GTK_CFLAGS"
1506 LIBS="$LIBS $GTK_LIBS"
1508 #include <gtk/gtk.h>
1510 ], [ return ((gtk_major_version) || (gtk_minor_version) || (gtk_micro_version)); ],
1511 [ echo "*** The test program compiled, but did not run. This usually means"
1512 echo "*** that the run-time linker is not finding GTK+ or finding the wrong"
1513 echo "*** version of GTK+. If it is not finding GTK+, you'll need to set your"
1514 echo "*** LD_LIBRARY_PATH environment variable, or edit /etc/ld.so.conf to point"
1515 echo "*** to the installed location Also, make sure you have run ldconfig if that"
1516 echo "*** is required on your system"
1518 echo "*** If you have an old version installed, it is best to remove it, although"
1519 echo "*** you may also be able to get things to work by modifying LD_LIBRARY_PATH" ],
1520 [ echo "*** The test program failed to compile or link. See the file config.log for the"
1521 echo "*** exact error that occured. This usually means GTK+ is incorrectly installed."])
1522 CFLAGS="$ac_save_CFLAGS"
1523 LIBS="$ac_save_LIBS"
1528 ifelse([$3], , :, [$3])
1530 AC_SUBST(GTK_CFLAGS)
1535 # Configure paths for GLIB
1536 # Owen Taylor 1997-2001
1538 dnl AM_PATH_GLIB_2_0([MINIMUM-VERSION, [ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND [, MODULES]]]])
1539 dnl Test for GLIB, and define GLIB_CFLAGS and GLIB_LIBS, if gmodule, gobject or
1540 dnl gthread is specified in MODULES, pass to pkg-config
1542 AC_DEFUN(AM_PATH_GLIB_2_0,
1544 dnl Get the cflags and libraries from pkg-config
1546 AC_ARG_ENABLE(glibtest, [ --disable-glibtest do not try to compile and run a test GLIB program],
1547 , enable_glibtest=yes)
1549 pkg_config_args=glib-2.0
1554 pkg_config_args="$pkg_config_args gmodule-2.0"
1557 pkg_config_args="$pkg_config_args gobject-2.0"
1560 pkg_config_args="$pkg_config_args gthread-2.0"
1565 AC_PATH_PROG(PKG_CONFIG, pkg-config, no)
1569 if test x$PKG_CONFIG != xno ; then
1570 if $PKG_CONFIG --atleast-pkgconfig-version 0.7 ; then
1573 echo *** pkg-config too old; version 0.7 or better required.
1581 min_glib_version=ifelse([$1], ,2.0.0,$1)
1582 AC_MSG_CHECKING(for GLIB - version >= $min_glib_version)
1584 if test x$PKG_CONFIG != xno ; then
1585 ## don't try to run the test against uninstalled libtool libs
1586 if $PKG_CONFIG --uninstalled $pkg_config_args; then
1587 echo "Will use uninstalled version of GLib found in PKG_CONFIG_PATH"
1591 if $PKG_CONFIG --atleast-version $min_glib_version $pkg_config_args; then
1598 if test x"$no_glib" = x ; then
1599 GLIB_GENMARSHAL=`$PKG_CONFIG --variable=glib_genmarshal glib-2.0`
1600 GOBJECT_QUERY=`$PKG_CONFIG --variable=gobject_query glib-2.0`
1601 GLIB_MKENUMS=`$PKG_CONFIG --variable=glib_mkenums glib-2.0`
1603 GLIB_CFLAGS=`$PKG_CONFIG --cflags $pkg_config_args`
1604 GLIB_LIBS=`$PKG_CONFIG --libs $pkg_config_args`
1605 glib_config_major_version=`$PKG_CONFIG --modversion glib-2.0 | \
1606 sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\1/'`
1607 glib_config_minor_version=`$PKG_CONFIG --modversion glib-2.0 | \
1608 sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\2/'`
1609 glib_config_micro_version=`$PKG_CONFIG --modversion glib-2.0 | \
1610 sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\3/'`
1611 if test "x$enable_glibtest" = "xyes" ; then
1612 ac_save_CFLAGS="$CFLAGS"
1613 ac_save_LIBS="$LIBS"
1614 CFLAGS="$CFLAGS $GLIB_CFLAGS"
1615 LIBS="$GLIB_LIBS $LIBS"
1617 dnl Now check if the installed GLIB is sufficiently new. (Also sanity
1618 dnl checks the results of pkg-config to some extent)
1629 int major, minor, micro;
1632 system ("touch conf.glibtest");
1634 /* HP/UX 9 (%@#!) writes to sscanf strings */
1635 tmp_version = g_strdup("$min_glib_version");
1636 if (sscanf(tmp_version, "%d.%d.%d", &major, &minor, µ) != 3) {
1637 printf("%s, bad version string\n", "$min_glib_version");
1641 if ((glib_major_version != $glib_config_major_version) ||
1642 (glib_minor_version != $glib_config_minor_version) ||
1643 (glib_micro_version != $glib_config_micro_version))
1645 printf("\n*** 'pkg-config --modversion glib-2.0' returned %d.%d.%d, but GLIB (%d.%d.%d)\n",
1646 $glib_config_major_version, $glib_config_minor_version, $glib_config_micro_version,
1647 glib_major_version, glib_minor_version, glib_micro_version);
1648 printf ("*** was found! If pkg-config was correct, then it is best\n");
1649 printf ("*** to remove the old version of GLib. You may also be able to fix the error\n");
1650 printf("*** by modifying your LD_LIBRARY_PATH enviroment variable, or by editing\n");
1651 printf("*** /etc/ld.so.conf. Make sure you have run ldconfig if that is\n");
1652 printf("*** required on your system.\n");
1653 printf("*** If pkg-config was wrong, set the environment variable PKG_CONFIG_PATH\n");
1654 printf("*** to point to the correct configuration files\n");
1656 else if ((glib_major_version != GLIB_MAJOR_VERSION) ||
1657 (glib_minor_version != GLIB_MINOR_VERSION) ||
1658 (glib_micro_version != GLIB_MICRO_VERSION))
1660 printf("*** GLIB header files (version %d.%d.%d) do not match\n",
1661 GLIB_MAJOR_VERSION, GLIB_MINOR_VERSION, GLIB_MICRO_VERSION);
1662 printf("*** library (version %d.%d.%d)\n",
1663 glib_major_version, glib_minor_version, glib_micro_version);
1667 if ((glib_major_version > major) ||
1668 ((glib_major_version == major) && (glib_minor_version > minor)) ||
1669 ((glib_major_version == major) && (glib_minor_version == minor) && (glib_micro_version >= micro)))
1675 printf("\n*** An old version of GLIB (%d.%d.%d) was found.\n",
1676 glib_major_version, glib_minor_version, glib_micro_version);
1677 printf("*** You need a version of GLIB newer than %d.%d.%d. The latest version of\n",
1678 major, minor, micro);
1679 printf("*** GLIB is always available from ftp://ftp.gtk.org.\n");
1681 printf("*** If you have already installed a sufficiently new version, this error\n");
1682 printf("*** probably means that the wrong copy of the pkg-config shell script is\n");
1683 printf("*** being found. The easiest way to fix this is to remove the old version\n");
1684 printf("*** of GLIB, but you can also set the PKG_CONFIG environment to point to the\n");
1685 printf("*** correct copy of pkg-config. (In this case, you will have to\n");
1686 printf("*** modify your LD_LIBRARY_PATH enviroment variable, or edit /etc/ld.so.conf\n");
1687 printf("*** so that the correct libraries are found at run-time))\n");
1692 ],, no_glib=yes,[echo $ac_n "cross compiling; assumed OK... $ac_c"])
1693 CFLAGS="$ac_save_CFLAGS"
1694 LIBS="$ac_save_LIBS"
1697 if test "x$no_glib" = x ; then
1698 AC_MSG_RESULT(yes (version $glib_config_major_version.$glib_config_minor_version.$glib_config_micro_version))
1699 ifelse([$2], , :, [$2])
1702 if test "$PKG_CONFIG" = "no" ; then
1703 echo "*** A new enough version of pkg-config was not found."
1704 echo "*** See http://www.freedesktop.org/software/pkgconfig/"
1706 if test -f conf.glibtest ; then
1709 echo "*** Could not run GLIB test program, checking why..."
1710 ac_save_CFLAGS="$CFLAGS"
1711 ac_save_LIBS="$LIBS"
1712 CFLAGS="$CFLAGS $GLIB_CFLAGS"
1713 LIBS="$LIBS $GLIB_LIBS"
1717 ], [ return ((glib_major_version) || (glib_minor_version) || (glib_micro_version)); ],
1718 [ echo "*** The test program compiled, but did not run. This usually means"
1719 echo "*** that the run-time linker is not finding GLIB or finding the wrong"
1720 echo "*** version of GLIB. If it is not finding GLIB, you'll need to set your"
1721 echo "*** LD_LIBRARY_PATH environment variable, or edit /etc/ld.so.conf to point"
1722 echo "*** to the installed location Also, make sure you have run ldconfig if that"
1723 echo "*** is required on your system"
1725 echo "*** If you have an old version installed, it is best to remove it, although"
1726 echo "*** you may also be able to get things to work by modifying LD_LIBRARY_PATH" ],
1727 [ echo "*** The test program failed to compile or link. See the file config.log for the"
1728 echo "*** exact error that occured. This usually means GLIB is incorrectly installed."])
1729 CFLAGS="$ac_save_CFLAGS"
1730 LIBS="$ac_save_LIBS"
1738 ifelse([$3], , :, [$3])
1740 AC_SUBST(GLIB_CFLAGS)
1742 AC_SUBST(GLIB_GENMARSHAL)
1743 AC_SUBST(GOBJECT_QUERY)
1744 AC_SUBST(GLIB_MKENUMS)
1748 # Configure paths for LIBART
1749 # Raph Levien 98-11-18
1750 # stolen from Manish Singh 98-9-30
1751 # stolen back from Frank Belew
1752 # stolen from Manish Singh
1753 # Shamelessly stolen from Owen Taylor
1755 dnl AM_PATH_LIBART([MINIMUM-VERSION, [ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND]]])
1756 dnl Test for LIBART, and define LIBART_CFLAGS and LIBART_LIBS
1758 AC_DEFUN(AM_PATH_LIBART,
1760 dnl Get the cflags and libraries from the libart-config script
1762 AC_ARG_WITH(libart-prefix,[ --with-libart-prefix=PFX Prefix where LIBART is installed (optional)],
1763 libart_prefix="$withval", libart_prefix="")
1764 AC_ARG_WITH(libart-exec-prefix,[ --with-libart-exec-prefix=PFX Exec prefix where LIBART is installed (optional)],
1765 libart_exec_prefix="$withval", libart_exec_prefix="")
1766 AC_ARG_ENABLE(libarttest, [ --disable-libarttest Do not try to compile and run a test LIBART program],
1767 , enable_libarttest=yes)
1769 if test x$libart_exec_prefix != x ; then
1770 libart_args="$libart_args --exec-prefix=$libart_exec_prefix"
1771 if test x${LIBART_CONFIG+set} != xset ; then
1772 LIBART_CONFIG=$libart_exec_prefix/bin/libart-config
1775 if test x$libart_prefix != x ; then
1776 libart_args="$libart_args --prefix=$libart_prefix"
1777 if test x${LIBART_CONFIG+set} != xset ; then
1778 LIBART_CONFIG=$libart_prefix/bin/libart-config
1782 AC_PATH_PROG(LIBART_CONFIG, libart2-config, no)
1783 if test "$LIBART_CONFIG" = "no" ; then
1784 AC_PATH_PROG(LIBART_CONFIG, libart-config, no)
1786 min_libart_version=ifelse([$1], ,0.2.5,$1)
1787 AC_MSG_CHECKING(for LIBART - version >= $min_libart_version)
1789 if test "$LIBART_CONFIG" = "no" ; then
1792 LIBART_CFLAGS=`$LIBART_CONFIG $libartconf_args --cflags`
1793 LIBART_LIBS=`$LIBART_CONFIG $libartconf_args --libs`
1795 libart_major_version=`$LIBART_CONFIG $libart_args --version | \
1796 sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\1/'`
1797 libart_minor_version=`$LIBART_CONFIG $libart_args --version | \
1798 sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\2/'`
1799 libart_micro_version=`$LIBART_CONFIG $libart_config_args --version | \
1800 sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\3/'`
1801 if test "x$enable_libarttest" = "xyes" ; then
1802 ac_save_CFLAGS="$CFLAGS"
1803 ac_save_LIBS="$LIBS"
1804 CFLAGS="$CFLAGS $LIBART_CFLAGS"
1805 LIBS="$LIBS $LIBART_LIBS"
1807 dnl Now check if the installed LIBART is sufficiently new. (Also sanity
1808 dnl checks the results of libart-config to some extent
1810 rm -f conf.libarttest
1815 #include <libart_lgpl/libart.h>
1818 my_strdup (char *str)
1824 new_str = malloc ((strlen (str) + 1) * sizeof(char));
1825 strcpy (new_str, str);
1835 int major, minor, micro;
1838 system ("touch conf.libarttest");
1840 /* HP/UX 9 (%@#!) writes to sscanf strings */
1841 tmp_version = my_strdup("$min_libart_version");
1842 if (sscanf(tmp_version, "%d.%d.%d", &major, &minor, µ) != 3) {
1843 printf("%s, bad version string\n", "$min_libart_version");
1847 if (($libart_major_version > major) ||
1848 (($libart_major_version == major) && ($libart_minor_version > minor)) ||
1849 (($libart_major_version == major) && ($libart_minor_version == minor) && ($libart_micro_version >= micro)))
1855 printf("\n*** 'libart-config --version' returned %d.%d.%d, but the minimum version\n", $libart_major_version, $libart_minor_version, $libart_micro_version);
1856 printf("*** of LIBART required is %d.%d.%d. If libart-config is correct, then it is\n", major, minor, micro);
1857 printf("*** best to upgrade to the required version.\n");
1858 printf("*** If libart-config was wrong, set the environment variable LIBART_CONFIG\n");
1859 printf("*** to point to the correct copy of libart-config, and remove the file\n");
1860 printf("*** config.cache before re-running configure\n");
1865 ],, no_libart=yes,[echo $ac_n "cross compiling; assumed OK... $ac_c"])
1866 CFLAGS="$ac_save_CFLAGS"
1867 LIBS="$ac_save_LIBS"
1870 if test "x$no_libart" = x ; then
1872 ifelse([$2], , :, [$2])
1875 if test "$LIBART_CONFIG" = "no" ; then
1876 echo "*** The libart-config script installed by LIBART could not be found"
1877 echo "*** If LIBART was installed in PREFIX, make sure PREFIX/bin is in"
1878 echo "*** your path, or set the LIBART_CONFIG environment variable to the"
1879 echo "*** full path to libart-config."
1881 if test -f conf.libarttest ; then
1884 echo "*** Could not run LIBART test program, checking why..."
1885 CFLAGS="$CFLAGS $LIBART_CFLAGS"
1886 LIBS="$LIBS $LIBART_LIBS"
1889 #include <libart_lgpl/libart.h>
1891 [ echo "*** The test program compiled, but did not run. This usually means"
1892 echo "*** that the run-time linker is not finding LIBART or finding the wrong"
1893 echo "*** version of LIBART. If it is not finding LIBART, you'll need to set your"
1894 echo "*** LD_LIBRARY_PATH environment variable, or edit /etc/ld.so.conf to point"
1895 echo "*** to the installed location Also, make sure you have run ldconfig if that"
1896 echo "*** is required on your system"
1898 echo "*** If you have an old version installed, it is best to remove it, although"
1899 echo "*** you may also be able to get things to work by modifying LD_LIBRARY_PATH"],
1900 [ echo "*** The test program failed to compile or link. See the file config.log for the"
1901 echo "*** exact error that occured. This usually means LIBART was incorrectly installed"
1902 echo "*** or that you have moved LIBART since it was installed. In the latter case, you"
1903 echo "*** may want to edit the libart-config script: $LIBART_CONFIG" ])
1904 CFLAGS="$ac_save_CFLAGS"
1905 LIBS="$ac_save_LIBS"
1910 ifelse([$3], , :, [$3])
1912 AC_SUBST(LIBART_CFLAGS)
1913 AC_SUBST(LIBART_LIBS)
1914 rm -f conf.libarttest