| 1 | # generated automatically by aclocal 1.8.3 -*- Autoconf -*-
|
|---|
| 2 |
|
|---|
| 3 | # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004
|
|---|
| 4 | # Free Software Foundation, Inc.
|
|---|
| 5 | # This file is free software; the Free Software Foundation
|
|---|
| 6 | # gives unlimited permission to copy and/or distribute it,
|
|---|
| 7 | # with or without modifications, as long as this notice is preserved.
|
|---|
| 8 |
|
|---|
| 9 | # This program is distributed in the hope that it will be useful,
|
|---|
| 10 | # but WITHOUT ANY WARRANTY, to the extent permitted by law; without
|
|---|
| 11 | # even the implied warranty of MERCHANTABILITY or FITNESS FOR A
|
|---|
| 12 | # PARTICULAR PURPOSE.
|
|---|
| 13 |
|
|---|
| 14 | # gettext.m4 serial 20 (gettext-0.12)
|
|---|
| 15 | dnl Copyright (C) 1995-2003 Free Software Foundation, Inc.
|
|---|
| 16 | dnl This file is free software, distributed under the terms of the GNU
|
|---|
| 17 | dnl General Public License. As a special exception to the GNU General
|
|---|
| 18 | dnl Public License, this file may be distributed as part of a program
|
|---|
| 19 | dnl that contains a configuration script generated by Autoconf, under
|
|---|
| 20 | dnl the same distribution terms as the rest of that program.
|
|---|
| 21 | dnl
|
|---|
| 22 | dnl This file can can be used in projects which are not available under
|
|---|
| 23 | dnl the GNU General Public License or the GNU Library General Public
|
|---|
| 24 | dnl License but which still want to provide support for the GNU gettext
|
|---|
| 25 | dnl functionality.
|
|---|
| 26 | dnl Please note that the actual code of the GNU gettext library is covered
|
|---|
| 27 | dnl by the GNU Library General Public License, and the rest of the GNU
|
|---|
| 28 | dnl gettext package package is covered by the GNU General Public License.
|
|---|
| 29 | dnl They are *not* in the public domain.
|
|---|
| 30 |
|
|---|
| 31 | dnl Authors:
|
|---|
| 32 | dnl Ulrich Drepper <drepper@cygnus.com>, 1995-2000.
|
|---|
| 33 | dnl Bruno Haible <haible@clisp.cons.org>, 2000-2003.
|
|---|
| 34 |
|
|---|
| 35 | dnl Macro to add for using GNU gettext.
|
|---|
| 36 |
|
|---|
| 37 | dnl Usage: AM_GNU_GETTEXT([INTLSYMBOL], [NEEDSYMBOL], [INTLDIR]).
|
|---|
| 38 | dnl INTLSYMBOL can be one of 'external', 'no-libtool', 'use-libtool'. The
|
|---|
| 39 | dnl default (if it is not specified or empty) is 'no-libtool'.
|
|---|
| 40 | dnl INTLSYMBOL should be 'external' for packages with no intl directory,
|
|---|
| 41 | dnl and 'no-libtool' or 'use-libtool' for packages with an intl directory.
|
|---|
| 42 | dnl If INTLSYMBOL is 'use-libtool', then a libtool library
|
|---|
| 43 | dnl $(top_builddir)/intl/libintl.la will be created (shared and/or static,
|
|---|
| 44 | dnl depending on --{enable,disable}-{shared,static} and on the presence of
|
|---|
| 45 | dnl AM-DISABLE-SHARED). If INTLSYMBOL is 'no-libtool', a static library
|
|---|
| 46 | dnl $(top_builddir)/intl/libintl.a will be created.
|
|---|
| 47 | dnl If NEEDSYMBOL is specified and is 'need-ngettext', then GNU gettext
|
|---|
| 48 | dnl implementations (in libc or libintl) without the ngettext() function
|
|---|
| 49 | dnl will be ignored. If NEEDSYMBOL is specified and is
|
|---|
| 50 | dnl 'need-formatstring-macros', then GNU gettext implementations that don't
|
|---|
| 51 | dnl support the ISO C 99 <inttypes.h> formatstring macros will be ignored.
|
|---|
| 52 | dnl INTLDIR is used to find the intl libraries. If empty,
|
|---|
| 53 | dnl the value `$(top_builddir)/intl/' is used.
|
|---|
| 54 | dnl
|
|---|
| 55 | dnl The result of the configuration is one of three cases:
|
|---|
| 56 | dnl 1) GNU gettext, as included in the intl subdirectory, will be compiled
|
|---|
| 57 | dnl and used.
|
|---|
| 58 | dnl Catalog format: GNU --> install in $(datadir)
|
|---|
| 59 | dnl Catalog extension: .mo after installation, .gmo in source tree
|
|---|
| 60 | dnl 2) GNU gettext has been found in the system's C library.
|
|---|
| 61 | dnl Catalog format: GNU --> install in $(datadir)
|
|---|
| 62 | dnl Catalog extension: .mo after installation, .gmo in source tree
|
|---|
| 63 | dnl 3) No internationalization, always use English msgid.
|
|---|
| 64 | dnl Catalog format: none
|
|---|
| 65 | dnl Catalog extension: none
|
|---|
| 66 | dnl If INTLSYMBOL is 'external', only cases 2 and 3 can occur.
|
|---|
| 67 | dnl The use of .gmo is historical (it was needed to avoid overwriting the
|
|---|
| 68 | dnl GNU format catalogs when building on a platform with an X/Open gettext),
|
|---|
| 69 | dnl but we keep it in order not to force irrelevant filename changes on the
|
|---|
| 70 | dnl maintainers.
|
|---|
| 71 | dnl
|
|---|
| 72 | AC_DEFUN([AM_GNU_GETTEXT],
|
|---|
| 73 | [
|
|---|
| 74 | dnl Argument checking.
|
|---|
| 75 | ifelse([$1], [], , [ifelse([$1], [external], , [ifelse([$1], [no-libtool], , [ifelse([$1], [use-libtool], ,
|
|---|
| 76 | [errprint([ERROR: invalid first argument to AM_GNU_GETTEXT
|
|---|
| 77 | ])])])])])
|
|---|
| 78 | ifelse([$2], [], , [ifelse([$2], [need-ngettext], , [ifelse([$2], [need-formatstring-macros], ,
|
|---|
| 79 | [errprint([ERROR: invalid second argument to AM_GNU_GETTEXT
|
|---|
| 80 | ])])])])
|
|---|
| 81 | define(gt_included_intl, ifelse([$1], [external], [no], [yes]))
|
|---|
| 82 | define(gt_libtool_suffix_prefix, ifelse([$1], [use-libtool], [l], []))
|
|---|
| 83 |
|
|---|
| 84 | AC_REQUIRE([AM_PO_SUBDIRS])dnl
|
|---|
| 85 | ifelse(gt_included_intl, yes, [
|
|---|
| 86 | AC_REQUIRE([AM_INTL_SUBDIR])dnl
|
|---|
| 87 | ])
|
|---|
| 88 |
|
|---|
| 89 | dnl Prerequisites of AC_LIB_LINKFLAGS_BODY.
|
|---|
| 90 | AC_REQUIRE([AC_LIB_PREPARE_PREFIX])
|
|---|
| 91 | AC_REQUIRE([AC_LIB_RPATH])
|
|---|
| 92 |
|
|---|
| 93 | dnl Sometimes libintl requires libiconv, so first search for libiconv.
|
|---|
| 94 | dnl Ideally we would do this search only after the
|
|---|
| 95 | dnl if test "$USE_NLS" = "yes"; then
|
|---|
| 96 | dnl if test "$gt_cv_func_gnugettext_libc" != "yes"; then
|
|---|
| 97 | dnl tests. But if configure.in invokes AM_ICONV after AM_GNU_GETTEXT
|
|---|
| 98 | dnl the configure script would need to contain the same shell code
|
|---|
| 99 | dnl again, outside any 'if'. There are two solutions:
|
|---|
| 100 | dnl - Invoke AM_ICONV_LINKFLAGS_BODY here, outside any 'if'.
|
|---|
| 101 | dnl - Control the expansions in more detail using AC_PROVIDE_IFELSE.
|
|---|
| 102 | dnl Since AC_PROVIDE_IFELSE is only in autoconf >= 2.52 and not
|
|---|
| 103 | dnl documented, we avoid it.
|
|---|
| 104 | ifelse(gt_included_intl, yes, , [
|
|---|
| 105 | AC_REQUIRE([AM_ICONV_LINKFLAGS_BODY])
|
|---|
| 106 | ])
|
|---|
| 107 |
|
|---|
| 108 | dnl Set USE_NLS.
|
|---|
| 109 | AM_NLS
|
|---|
| 110 |
|
|---|
| 111 | ifelse(gt_included_intl, yes, [
|
|---|
| 112 | BUILD_INCLUDED_LIBINTL=no
|
|---|
| 113 | USE_INCLUDED_LIBINTL=no
|
|---|
| 114 | ])
|
|---|
| 115 | LIBINTL=
|
|---|
| 116 | LTLIBINTL=
|
|---|
| 117 | POSUB=
|
|---|
| 118 |
|
|---|
| 119 | dnl If we use NLS figure out what method
|
|---|
| 120 | if test "$USE_NLS" = "yes"; then
|
|---|
| 121 | gt_use_preinstalled_gnugettext=no
|
|---|
| 122 | ifelse(gt_included_intl, yes, [
|
|---|
| 123 | AC_MSG_CHECKING([whether included gettext is requested])
|
|---|
| 124 | AC_ARG_WITH(included-gettext,
|
|---|
| 125 | [ --with-included-gettext use the GNU gettext library included here],
|
|---|
| 126 | nls_cv_force_use_gnu_gettext=$withval,
|
|---|
| 127 | nls_cv_force_use_gnu_gettext=no)
|
|---|
| 128 | AC_MSG_RESULT($nls_cv_force_use_gnu_gettext)
|
|---|
| 129 |
|
|---|
| 130 | nls_cv_use_gnu_gettext="$nls_cv_force_use_gnu_gettext"
|
|---|
| 131 | if test "$nls_cv_force_use_gnu_gettext" != "yes"; then
|
|---|
| 132 | ])
|
|---|
| 133 | dnl User does not insist on using GNU NLS library. Figure out what
|
|---|
| 134 | dnl to use. If GNU gettext is available we use this. Else we have
|
|---|
| 135 | dnl to fall back to GNU NLS library.
|
|---|
| 136 |
|
|---|
| 137 | dnl Add a version number to the cache macros.
|
|---|
| 138 | define([gt_api_version], ifelse([$2], [need-formatstring-macros], 3, ifelse([$2], [need-ngettext], 2, 1)))
|
|---|
| 139 | define([gt_cv_func_gnugettext_libc], [gt_cv_func_gnugettext]gt_api_version[_libc])
|
|---|
| 140 | define([gt_cv_func_gnugettext_libintl], [gt_cv_func_gnugettext]gt_api_version[_libintl])
|
|---|
| 141 |
|
|---|
| 142 | AC_CACHE_CHECK([for GNU gettext in libc], gt_cv_func_gnugettext_libc,
|
|---|
| 143 | [AC_TRY_LINK([#include <libintl.h>
|
|---|
| 144 | ]ifelse([$2], [need-formatstring-macros],
|
|---|
| 145 | [#ifndef __GNU_GETTEXT_SUPPORTED_REVISION
|
|---|
| 146 | #define __GNU_GETTEXT_SUPPORTED_REVISION(major) ((major) == 0 ? 0 : -1)
|
|---|
| 147 | #endif
|
|---|
| 148 | changequote(,)dnl
|
|---|
| 149 | typedef int array [2 * (__GNU_GETTEXT_SUPPORTED_REVISION(0) >= 1) - 1];
|
|---|
| 150 | changequote([,])dnl
|
|---|
| 151 | ], [])[extern int _nl_msg_cat_cntr;
|
|---|
| 152 | extern int *_nl_domain_bindings;],
|
|---|
| 153 | [bindtextdomain ("", "");
|
|---|
| 154 | return (int) gettext ("")]ifelse([$2], [need-ngettext], [ + (int) ngettext ("", "", 0)], [])[ + _nl_msg_cat_cntr + *_nl_domain_bindings],
|
|---|
| 155 | gt_cv_func_gnugettext_libc=yes,
|
|---|
| 156 | gt_cv_func_gnugettext_libc=no)])
|
|---|
| 157 |
|
|---|
| 158 | if test "$gt_cv_func_gnugettext_libc" != "yes"; then
|
|---|
| 159 | dnl Sometimes libintl requires libiconv, so first search for libiconv.
|
|---|
| 160 | ifelse(gt_included_intl, yes, , [
|
|---|
| 161 | AM_ICONV_LINK
|
|---|
| 162 | ])
|
|---|
| 163 | dnl Search for libintl and define LIBINTL, LTLIBINTL and INCINTL
|
|---|
| 164 | dnl accordingly. Don't use AC_LIB_LINKFLAGS_BODY([intl],[iconv])
|
|---|
| 165 | dnl because that would add "-liconv" to LIBINTL and LTLIBINTL
|
|---|
| 166 | dnl even if libiconv doesn't exist.
|
|---|
| 167 | AC_LIB_LINKFLAGS_BODY([intl])
|
|---|
| 168 | AC_CACHE_CHECK([for GNU gettext in libintl],
|
|---|
| 169 | gt_cv_func_gnugettext_libintl,
|
|---|
| 170 | [gt_save_CPPFLAGS="$CPPFLAGS"
|
|---|
| 171 | CPPFLAGS="$CPPFLAGS $INCINTL"
|
|---|
| 172 | gt_save_LIBS="$LIBS"
|
|---|
| 173 | LIBS="$LIBS $LIBINTL"
|
|---|
| 174 | dnl Now see whether libintl exists and does not depend on libiconv.
|
|---|
| 175 | AC_TRY_LINK([#include <libintl.h>
|
|---|
| 176 | ]ifelse([$2], [need-formatstring-macros],
|
|---|
| 177 | [#ifndef __GNU_GETTEXT_SUPPORTED_REVISION
|
|---|
| 178 | #define __GNU_GETTEXT_SUPPORTED_REVISION(major) ((major) == 0 ? 0 : -1)
|
|---|
| 179 | #endif
|
|---|
| 180 | changequote(,)dnl
|
|---|
| 181 | typedef int array [2 * (__GNU_GETTEXT_SUPPORTED_REVISION(0) >= 1) - 1];
|
|---|
| 182 | changequote([,])dnl
|
|---|
| 183 | ], [])[extern int _nl_msg_cat_cntr;
|
|---|
| 184 | extern
|
|---|
| 185 | #ifdef __cplusplus
|
|---|
| 186 | "C"
|
|---|
| 187 | #endif
|
|---|
| 188 | const char *_nl_expand_alias ();],
|
|---|
| 189 | [bindtextdomain ("", "");
|
|---|
| 190 | return (int) gettext ("")]ifelse([$2], [need-ngettext], [ + (int) ngettext ("", "", 0)], [])[ + _nl_msg_cat_cntr + *_nl_expand_alias (0)],
|
|---|
| 191 | gt_cv_func_gnugettext_libintl=yes,
|
|---|
| 192 | gt_cv_func_gnugettext_libintl=no)
|
|---|
| 193 | dnl Now see whether libintl exists and depends on libiconv.
|
|---|
| 194 | if test "$gt_cv_func_gnugettext_libintl" != yes && test -n "$LIBICONV"; then
|
|---|
| 195 | LIBS="$LIBS $LIBICONV"
|
|---|
| 196 | AC_TRY_LINK([#include <libintl.h>
|
|---|
| 197 | ]ifelse([$2], [need-formatstring-macros],
|
|---|
| 198 | [#ifndef __GNU_GETTEXT_SUPPORTED_REVISION
|
|---|
| 199 | #define __GNU_GETTEXT_SUPPORTED_REVISION(major) ((major) == 0 ? 0 : -1)
|
|---|
| 200 | #endif
|
|---|
| 201 | changequote(,)dnl
|
|---|
| 202 | typedef int array [2 * (__GNU_GETTEXT_SUPPORTED_REVISION(0) >= 1) - 1];
|
|---|
| 203 | changequote([,])dnl
|
|---|
| 204 | ], [])[extern int _nl_msg_cat_cntr;
|
|---|
| 205 | extern
|
|---|
| 206 | #ifdef __cplusplus
|
|---|
| 207 | "C"
|
|---|
| 208 | #endif
|
|---|
| 209 | const char *_nl_expand_alias ();],
|
|---|
| 210 | [bindtextdomain ("", "");
|
|---|
| 211 | return (int) gettext ("")]ifelse([$2], [need-ngettext], [ + (int) ngettext ("", "", 0)], [])[ + _nl_msg_cat_cntr + *_nl_expand_alias (0)],
|
|---|
| 212 | [LIBINTL="$LIBINTL $LIBICONV"
|
|---|
| 213 | LTLIBINTL="$LTLIBINTL $LTLIBICONV"
|
|---|
| 214 | gt_cv_func_gnugettext_libintl=yes
|
|---|
| 215 | ])
|
|---|
| 216 | fi
|
|---|
| 217 | CPPFLAGS="$gt_save_CPPFLAGS"
|
|---|
| 218 | LIBS="$gt_save_LIBS"])
|
|---|
| 219 | fi
|
|---|
| 220 |
|
|---|
| 221 | dnl If an already present or preinstalled GNU gettext() is found,
|
|---|
| 222 | dnl use it. But if this macro is used in GNU gettext, and GNU
|
|---|
| 223 | dnl gettext is already preinstalled in libintl, we update this
|
|---|
| 224 | dnl libintl. (Cf. the install rule in intl/Makefile.in.)
|
|---|
| 225 | if test "$gt_cv_func_gnugettext_libc" = "yes" \
|
|---|
| 226 | || { test "$gt_cv_func_gnugettext_libintl" = "yes" \
|
|---|
| 227 | && test "$PACKAGE" != gettext-runtime \
|
|---|
| 228 | && test "$PACKAGE" != gettext-tools; }; then
|
|---|
| 229 | gt_use_preinstalled_gnugettext=yes
|
|---|
| 230 | else
|
|---|
| 231 | dnl Reset the values set by searching for libintl.
|
|---|
| 232 | LIBINTL=
|
|---|
| 233 | LTLIBINTL=
|
|---|
| 234 | INCINTL=
|
|---|
| 235 | fi
|
|---|
| 236 |
|
|---|
| 237 | ifelse(gt_included_intl, yes, [
|
|---|
| 238 | if test "$gt_use_preinstalled_gnugettext" != "yes"; then
|
|---|
| 239 | dnl GNU gettext is not found in the C library.
|
|---|
| 240 | dnl Fall back on included GNU gettext library.
|
|---|
| 241 | nls_cv_use_gnu_gettext=yes
|
|---|
| 242 | fi
|
|---|
| 243 | fi
|
|---|
| 244 |
|
|---|
| 245 | if test "$nls_cv_use_gnu_gettext" = "yes"; then
|
|---|
| 246 | dnl Mark actions used to generate GNU NLS library.
|
|---|
| 247 | BUILD_INCLUDED_LIBINTL=yes
|
|---|
| 248 | USE_INCLUDED_LIBINTL=yes
|
|---|
| 249 | LIBINTL="ifelse([$3],[],\${top_builddir}/intl,[$3])/libintl.[]gt_libtool_suffix_prefix[]a $LIBICONV"
|
|---|
| 250 | LTLIBINTL="ifelse([$3],[],\${top_builddir}/intl,[$3])/libintl.[]gt_libtool_suffix_prefix[]a $LTLIBICONV"
|
|---|
| 251 | LIBS=`echo " $LIBS " | sed -e 's/ -lintl / /' -e 's/^ //' -e 's/ $//'`
|
|---|
| 252 | fi
|
|---|
| 253 |
|
|---|
| 254 | if test "$gt_use_preinstalled_gnugettext" = "yes" \
|
|---|
| 255 | || test "$nls_cv_use_gnu_gettext" = "yes"; then
|
|---|
| 256 | dnl Mark actions to use GNU gettext tools.
|
|---|
| 257 | CATOBJEXT=.gmo
|
|---|
| 258 | fi
|
|---|
| 259 | ])
|
|---|
| 260 |
|
|---|
| 261 | if test "$gt_use_preinstalled_gnugettext" = "yes" \
|
|---|
| 262 | || test "$nls_cv_use_gnu_gettext" = "yes"; then
|
|---|
| 263 | AC_DEFINE(ENABLE_NLS, 1,
|
|---|
| 264 | [Define to 1 if translation of program messages to the user's native language
|
|---|
| 265 | is requested.])
|
|---|
| 266 | else
|
|---|
| 267 | USE_NLS=no
|
|---|
| 268 | fi
|
|---|
| 269 | fi
|
|---|
| 270 |
|
|---|
| 271 | AC_MSG_CHECKING([whether to use NLS])
|
|---|
| 272 | AC_MSG_RESULT([$USE_NLS])
|
|---|
| 273 | if test "$USE_NLS" = "yes"; then
|
|---|
| 274 | AC_MSG_CHECKING([where the gettext function comes from])
|
|---|
| 275 | if test "$gt_use_preinstalled_gnugettext" = "yes"; then
|
|---|
| 276 | if test "$gt_cv_func_gnugettext_libintl" = "yes"; then
|
|---|
| 277 | gt_source="external libintl"
|
|---|
| 278 | else
|
|---|
| 279 | gt_source="libc"
|
|---|
| 280 | fi
|
|---|
| 281 | else
|
|---|
| 282 | gt_source="included intl directory"
|
|---|
| 283 | fi
|
|---|
| 284 | AC_MSG_RESULT([$gt_source])
|
|---|
| 285 | fi
|
|---|
| 286 |
|
|---|
| 287 | if test "$USE_NLS" = "yes"; then
|
|---|
| 288 |
|
|---|
| 289 | if test "$gt_use_preinstalled_gnugettext" = "yes"; then
|
|---|
| 290 | if test "$gt_cv_func_gnugettext_libintl" = "yes"; then
|
|---|
| 291 | AC_MSG_CHECKING([how to link with libintl])
|
|---|
| 292 | AC_MSG_RESULT([$LIBINTL])
|
|---|
| 293 | AC_LIB_APPENDTOVAR([CPPFLAGS], [$INCINTL])
|
|---|
| 294 | fi
|
|---|
| 295 |
|
|---|
| 296 | dnl For backward compatibility. Some packages may be using this.
|
|---|
| 297 | AC_DEFINE(HAVE_GETTEXT, 1,
|
|---|
| 298 | [Define if the GNU gettext() function is already present or preinstalled.])
|
|---|
| 299 | AC_DEFINE(HAVE_DCGETTEXT, 1,
|
|---|
| 300 | [Define if the GNU dcgettext() function is already present or preinstalled.])
|
|---|
| 301 | fi
|
|---|
| 302 |
|
|---|
| 303 | dnl We need to process the po/ directory.
|
|---|
| 304 | POSUB=po
|
|---|
| 305 | fi
|
|---|
| 306 |
|
|---|
| 307 | ifelse(gt_included_intl, yes, [
|
|---|
| 308 | dnl If this is used in GNU gettext we have to set BUILD_INCLUDED_LIBINTL
|
|---|
| 309 | dnl to 'yes' because some of the testsuite requires it.
|
|---|
| 310 | if test "$PACKAGE" = gettext-runtime || test "$PACKAGE" = gettext-tools; then
|
|---|
| 311 | BUILD_INCLUDED_LIBINTL=yes
|
|---|
| 312 | fi
|
|---|
| 313 |
|
|---|
| 314 | dnl Make all variables we use known to autoconf.
|
|---|
| 315 | AC_SUBST(BUILD_INCLUDED_LIBINTL)
|
|---|
| 316 | AC_SUBST(USE_INCLUDED_LIBINTL)
|
|---|
| 317 | AC_SUBST(CATOBJEXT)
|
|---|
| 318 |
|
|---|
| 319 | dnl For backward compatibility. Some configure.ins may be using this.
|
|---|
| 320 | nls_cv_header_intl=
|
|---|
| 321 | nls_cv_header_libgt=
|
|---|
| 322 |
|
|---|
| 323 | dnl For backward compatibility. Some Makefiles may be using this.
|
|---|
| 324 | DATADIRNAME=share
|
|---|
| 325 | AC_SUBST(DATADIRNAME)
|
|---|
| 326 |
|
|---|
| 327 | dnl For backward compatibility. Some Makefiles may be using this.
|
|---|
| 328 | INSTOBJEXT=.mo
|
|---|
| 329 | AC_SUBST(INSTOBJEXT)
|
|---|
| 330 |
|
|---|
| 331 | dnl For backward compatibility. Some Makefiles may be using this.
|
|---|
| 332 | GENCAT=gencat
|
|---|
| 333 | AC_SUBST(GENCAT)
|
|---|
| 334 |
|
|---|
| 335 | dnl For backward compatibility. Some Makefiles may be using this.
|
|---|
| 336 | if test "$USE_INCLUDED_LIBINTL" = yes; then
|
|---|
| 337 | INTLOBJS="\$(GETTOBJS)"
|
|---|
| 338 | fi
|
|---|
| 339 | AC_SUBST(INTLOBJS)
|
|---|
| 340 |
|
|---|
| 341 | dnl Enable libtool support if the surrounding package wishes it.
|
|---|
| 342 | INTL_LIBTOOL_SUFFIX_PREFIX=gt_libtool_suffix_prefix
|
|---|
| 343 | AC_SUBST(INTL_LIBTOOL_SUFFIX_PREFIX)
|
|---|
| 344 | ])
|
|---|
| 345 |
|
|---|
| 346 | dnl For backward compatibility. Some Makefiles may be using this.
|
|---|
| 347 | INTLLIBS="$LIBINTL"
|
|---|
| 348 | AC_SUBST(INTLLIBS)
|
|---|
| 349 |
|
|---|
| 350 | dnl Make all documented variables known to autoconf.
|
|---|
| 351 | AC_SUBST(LIBINTL)
|
|---|
| 352 | AC_SUBST(LTLIBINTL)
|
|---|
| 353 | AC_SUBST(POSUB)
|
|---|
| 354 | ])
|
|---|
| 355 |
|
|---|
| 356 |
|
|---|
| 357 | dnl Checks for all prerequisites of the intl subdirectory,
|
|---|
| 358 | dnl except for INTL_LIBTOOL_SUFFIX_PREFIX (and possibly LIBTOOL), INTLOBJS,
|
|---|
| 359 | dnl USE_INCLUDED_LIBINTL, BUILD_INCLUDED_LIBINTL.
|
|---|
| 360 | AC_DEFUN([AM_INTL_SUBDIR],
|
|---|
| 361 | [
|
|---|
| 362 | AC_REQUIRE([AC_PROG_INSTALL])dnl
|
|---|
| 363 | AC_REQUIRE([AM_MKINSTALLDIRS])dnl
|
|---|
| 364 | AC_REQUIRE([AC_PROG_CC])dnl
|
|---|
| 365 | AC_REQUIRE([AC_CANONICAL_HOST])dnl
|
|---|
| 366 | AC_REQUIRE([AC_PROG_RANLIB])dnl
|
|---|
| 367 | AC_REQUIRE([AC_ISC_POSIX])dnl
|
|---|
| 368 | AC_REQUIRE([AC_HEADER_STDC])dnl
|
|---|
| 369 | AC_REQUIRE([AC_C_CONST])dnl
|
|---|
| 370 | AC_REQUIRE([AC_C_INLINE])dnl
|
|---|
| 371 | AC_REQUIRE([AC_TYPE_OFF_T])dnl
|
|---|
| 372 | AC_REQUIRE([AC_TYPE_SIZE_T])dnl
|
|---|
| 373 | AC_REQUIRE([AC_FUNC_ALLOCA])dnl
|
|---|
| 374 | AC_REQUIRE([AC_FUNC_MMAP])dnl
|
|---|
| 375 | AC_REQUIRE([jm_GLIBC21])dnl
|
|---|
| 376 | AC_REQUIRE([gt_INTDIV0])dnl
|
|---|
| 377 | AC_REQUIRE([jm_AC_TYPE_UINTMAX_T])dnl
|
|---|
| 378 | AC_REQUIRE([gt_HEADER_INTTYPES_H])dnl
|
|---|
| 379 | AC_REQUIRE([gt_INTTYPES_PRI])dnl
|
|---|
| 380 |
|
|---|
| 381 | AC_CHECK_HEADERS([argz.h limits.h locale.h nl_types.h malloc.h stddef.h \
|
|---|
| 382 | stdlib.h string.h unistd.h sys/param.h])
|
|---|
| 383 | AC_CHECK_FUNCS([feof_unlocked fgets_unlocked getc_unlocked getcwd getegid \
|
|---|
| 384 | geteuid getgid getuid mempcpy munmap putenv setenv setlocale stpcpy \
|
|---|
| 385 | strcasecmp strdup strtoul tsearch __argz_count __argz_stringify __argz_next \
|
|---|
| 386 | __fsetlocking])
|
|---|
| 387 |
|
|---|
| 388 | AM_ICONV
|
|---|
| 389 | AM_LANGINFO_CODESET
|
|---|
| 390 | if test $ac_cv_header_locale_h = yes; then
|
|---|
| 391 | AM_LC_MESSAGES
|
|---|
| 392 | fi
|
|---|
| 393 |
|
|---|
| 394 | dnl intl/plural.c is generated from intl/plural.y. It requires bison,
|
|---|
| 395 | dnl because plural.y uses bison specific features. It requires at least
|
|---|
| 396 | dnl bison-1.26 because earlier versions generate a plural.c that doesn't
|
|---|
| 397 | dnl compile.
|
|---|
| 398 | dnl bison is only needed for the maintainer (who touches plural.y). But in
|
|---|
| 399 | dnl order to avoid separate Makefiles or --enable-maintainer-mode, we put
|
|---|
| 400 | dnl the rule in general Makefile. Now, some people carelessly touch the
|
|---|
| 401 | dnl files or have a broken "make" program, hence the plural.c rule will
|
|---|
| 402 | dnl sometimes fire. To avoid an error, defines BISON to ":" if it is not
|
|---|
| 403 | dnl present or too old.
|
|---|
| 404 | AC_CHECK_PROGS([INTLBISON], [bison])
|
|---|
| 405 | if test -z "$INTLBISON"; then
|
|---|
| 406 | ac_verc_fail=yes
|
|---|
| 407 | else
|
|---|
| 408 | dnl Found it, now check the version.
|
|---|
| 409 | AC_MSG_CHECKING([version of bison])
|
|---|
| 410 | changequote(<<,>>)dnl
|
|---|
| 411 | ac_prog_version=`$INTLBISON --version 2>&1 | sed -n 's/^.*GNU Bison.* \([0-9]*\.[0-9.]*\).*$/\1/p'`
|
|---|
| 412 | case $ac_prog_version in
|
|---|
| 413 | '') ac_prog_version="v. ?.??, bad"; ac_verc_fail=yes;;
|
|---|
| 414 | 1.2[6-9]* | 1.[3-9][0-9]* | [2-9].*)
|
|---|
| 415 | changequote([,])dnl
|
|---|
| 416 | ac_prog_version="$ac_prog_version, ok"; ac_verc_fail=no;;
|
|---|
| 417 | *) ac_prog_version="$ac_prog_version, bad"; ac_verc_fail=yes;;
|
|---|
| 418 | esac
|
|---|
| 419 | AC_MSG_RESULT([$ac_prog_version])
|
|---|
| 420 | fi
|
|---|
| 421 | if test $ac_verc_fail = yes; then
|
|---|
| 422 | INTLBISON=:
|
|---|
| 423 | fi
|
|---|
| 424 | ])
|
|---|
| 425 |
|
|---|
| 426 |
|
|---|
| 427 | dnl Usage: AM_GNU_GETTEXT_VERSION([gettext-version])
|
|---|
| 428 | AC_DEFUN([AM_GNU_GETTEXT_VERSION], [])
|
|---|
| 429 |
|
|---|
| 430 | # iconv.m4 serial AM4 (gettext-0.11.3)
|
|---|
| 431 | dnl Copyright (C) 2000-2002 Free Software Foundation, Inc.
|
|---|
| 432 | dnl This file is free software, distributed under the terms of the GNU
|
|---|
| 433 | dnl General Public License. As a special exception to the GNU General
|
|---|
| 434 | dnl Public License, this file may be distributed as part of a program
|
|---|
| 435 | dnl that contains a configuration script generated by Autoconf, under
|
|---|
| 436 | dnl the same distribution terms as the rest of that program.
|
|---|
| 437 |
|
|---|
| 438 | dnl From Bruno Haible.
|
|---|
| 439 |
|
|---|
| 440 | AC_DEFUN([AM_ICONV_LINKFLAGS_BODY],
|
|---|
| 441 | [
|
|---|
| 442 | dnl Prerequisites of AC_LIB_LINKFLAGS_BODY.
|
|---|
| 443 | AC_REQUIRE([AC_LIB_PREPARE_PREFIX])
|
|---|
| 444 | AC_REQUIRE([AC_LIB_RPATH])
|
|---|
| 445 |
|
|---|
| 446 | dnl Search for libiconv and define LIBICONV, LTLIBICONV and INCICONV
|
|---|
| 447 | dnl accordingly.
|
|---|
| 448 | AC_LIB_LINKFLAGS_BODY([iconv])
|
|---|
| 449 | ])
|
|---|
| 450 |
|
|---|
| 451 | AC_DEFUN([AM_ICONV_LINK],
|
|---|
| 452 | [
|
|---|
| 453 | dnl Some systems have iconv in libc, some have it in libiconv (OSF/1 and
|
|---|
| 454 | dnl those with the standalone portable GNU libiconv installed).
|
|---|
| 455 |
|
|---|
| 456 | dnl Search for libiconv and define LIBICONV, LTLIBICONV and INCICONV
|
|---|
| 457 | dnl accordingly.
|
|---|
| 458 | AC_REQUIRE([AM_ICONV_LINKFLAGS_BODY])
|
|---|
| 459 |
|
|---|
| 460 | dnl Add $INCICONV to CPPFLAGS before performing the following checks,
|
|---|
| 461 | dnl because if the user has installed libiconv and not disabled its use
|
|---|
| 462 | dnl via --without-libiconv-prefix, he wants to use it. The first
|
|---|
| 463 | dnl AC_TRY_LINK will then fail, the second AC_TRY_LINK will succeed.
|
|---|
| 464 | am_save_CPPFLAGS="$CPPFLAGS"
|
|---|
| 465 | AC_LIB_APPENDTOVAR([CPPFLAGS], [$INCICONV])
|
|---|
| 466 |
|
|---|
| 467 | AC_CACHE_CHECK(for iconv, am_cv_func_iconv, [
|
|---|
| 468 | am_cv_func_iconv="no, consider installing GNU libiconv"
|
|---|
| 469 | am_cv_lib_iconv=no
|
|---|
| 470 | AC_TRY_LINK([#include <stdlib.h>
|
|---|
| 471 | #include <iconv.h>],
|
|---|
| 472 | [iconv_t cd = iconv_open("","");
|
|---|
| 473 | iconv(cd,NULL,NULL,NULL,NULL);
|
|---|
| 474 | iconv_close(cd);],
|
|---|
| 475 | am_cv_func_iconv=yes)
|
|---|
| 476 | if test "$am_cv_func_iconv" != yes; then
|
|---|
| 477 | am_save_LIBS="$LIBS"
|
|---|
| 478 | LIBS="$LIBS $LIBICONV"
|
|---|
| 479 | AC_TRY_LINK([#include <stdlib.h>
|
|---|
| 480 | #include <iconv.h>],
|
|---|
| 481 | [iconv_t cd = iconv_open("","");
|
|---|
| 482 | iconv(cd,NULL,NULL,NULL,NULL);
|
|---|
| 483 | iconv_close(cd);],
|
|---|
| 484 | am_cv_lib_iconv=yes
|
|---|
| 485 | am_cv_func_iconv=yes)
|
|---|
| 486 | LIBS="$am_save_LIBS"
|
|---|
| 487 | fi
|
|---|
| 488 | ])
|
|---|
| 489 | if test "$am_cv_func_iconv" = yes; then
|
|---|
| 490 | AC_DEFINE(HAVE_ICONV, 1, [Define if you have the iconv() function.])
|
|---|
| 491 | fi
|
|---|
| 492 | if test "$am_cv_lib_iconv" = yes; then
|
|---|
| 493 | AC_MSG_CHECKING([how to link with libiconv])
|
|---|
| 494 | AC_MSG_RESULT([$LIBICONV])
|
|---|
| 495 | else
|
|---|
| 496 | dnl If $LIBICONV didn't lead to a usable library, we don't need $INCICONV
|
|---|
| 497 | dnl either.
|
|---|
| 498 | CPPFLAGS="$am_save_CPPFLAGS"
|
|---|
| 499 | LIBICONV=
|
|---|
| 500 | LTLIBICONV=
|
|---|
| 501 | fi
|
|---|
| 502 | AC_SUBST(LIBICONV)
|
|---|
| 503 | AC_SUBST(LTLIBICONV)
|
|---|
| 504 | ])
|
|---|
| 505 |
|
|---|
| 506 | AC_DEFUN([AM_ICONV],
|
|---|
| 507 | [
|
|---|
| 508 | AM_ICONV_LINK
|
|---|
| 509 | if test "$am_cv_func_iconv" = yes; then
|
|---|
| 510 | AC_MSG_CHECKING([for iconv declaration])
|
|---|
| 511 | AC_CACHE_VAL(am_cv_proto_iconv, [
|
|---|
| 512 | AC_TRY_COMPILE([
|
|---|
| 513 | #include <stdlib.h>
|
|---|
| 514 | #include <iconv.h>
|
|---|
| 515 | extern
|
|---|
| 516 | #ifdef __cplusplus
|
|---|
| 517 | "C"
|
|---|
| 518 | #endif
|
|---|
| 519 | #if defined(__STDC__) || defined(__cplusplus)
|
|---|
| 520 | size_t iconv (iconv_t cd, char * *inbuf, size_t *inbytesleft, char * *outbuf, size_t *outbytesleft);
|
|---|
| 521 | #else
|
|---|
| 522 | size_t iconv();
|
|---|
| 523 | #endif
|
|---|
| 524 | ], [], am_cv_proto_iconv_arg1="", am_cv_proto_iconv_arg1="const")
|
|---|
| 525 | 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);"])
|
|---|
| 526 | am_cv_proto_iconv=`echo "[$]am_cv_proto_iconv" | tr -s ' ' | sed -e 's/( /(/'`
|
|---|
| 527 | AC_MSG_RESULT([$]{ac_t:-
|
|---|
| 528 | }[$]am_cv_proto_iconv)
|
|---|
| 529 | AC_DEFINE_UNQUOTED(ICONV_CONST, $am_cv_proto_iconv_arg1,
|
|---|
| 530 | [Define as const if the declaration of iconv() needs const.])
|
|---|
| 531 | fi
|
|---|
| 532 | ])
|
|---|
| 533 |
|
|---|
| 534 | # lib-ld.m4 serial 2 (gettext-0.12)
|
|---|
| 535 | dnl Copyright (C) 1996-2003 Free Software Foundation, Inc.
|
|---|
| 536 | dnl This file is free software, distributed under the terms of the GNU
|
|---|
| 537 | dnl General Public License. As a special exception to the GNU General
|
|---|
| 538 | dnl Public License, this file may be distributed as part of a program
|
|---|
| 539 | dnl that contains a configuration script generated by Autoconf, under
|
|---|
| 540 | dnl the same distribution terms as the rest of that program.
|
|---|
| 541 |
|
|---|
| 542 | dnl Subroutines of libtool.m4,
|
|---|
| 543 | dnl with replacements s/AC_/AC_LIB/ and s/lt_cv/acl_cv/ to avoid collision
|
|---|
| 544 | dnl with libtool.m4.
|
|---|
| 545 |
|
|---|
| 546 | dnl From libtool-1.4. Sets the variable with_gnu_ld to yes or no.
|
|---|
| 547 | AC_DEFUN([AC_LIB_PROG_LD_GNU],
|
|---|
| 548 | [AC_CACHE_CHECK([if the linker ($LD) is GNU ld], acl_cv_prog_gnu_ld,
|
|---|
| 549 | [# I'd rather use --version here, but apparently some GNU ld's only accept -v.
|
|---|
| 550 | if $LD -v 2>&1 </dev/null | egrep '(GNU|with BFD)' 1>&5; then
|
|---|
| 551 | acl_cv_prog_gnu_ld=yes
|
|---|
| 552 | else
|
|---|
| 553 | acl_cv_prog_gnu_ld=no
|
|---|
| 554 | fi])
|
|---|
| 555 | with_gnu_ld=$acl_cv_prog_gnu_ld
|
|---|
| 556 | ])
|
|---|
| 557 |
|
|---|
| 558 | dnl From libtool-1.4. Sets the variable LD.
|
|---|
| 559 | AC_DEFUN([AC_LIB_PROG_LD],
|
|---|
| 560 | [AC_ARG_WITH(gnu-ld,
|
|---|
| 561 | [ --with-gnu-ld assume the C compiler uses GNU ld [default=no]],
|
|---|
| 562 | test "$withval" = no || with_gnu_ld=yes, with_gnu_ld=no)
|
|---|
| 563 | AC_REQUIRE([AC_PROG_CC])dnl
|
|---|
| 564 | AC_REQUIRE([AC_CANONICAL_HOST])dnl
|
|---|
| 565 | # Prepare PATH_SEPARATOR.
|
|---|
| 566 | # The user is always right.
|
|---|
| 567 | if test "${PATH_SEPARATOR+set}" != set; then
|
|---|
| 568 | echo "#! /bin/sh" >conf$$.sh
|
|---|
| 569 | echo "exit 0" >>conf$$.sh
|
|---|
| 570 | chmod +x conf$$.sh
|
|---|
| 571 | if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then
|
|---|
| 572 | PATH_SEPARATOR=';'
|
|---|
| 573 | else
|
|---|
| 574 | PATH_SEPARATOR=:
|
|---|
| 575 | fi
|
|---|
| 576 | rm -f conf$$.sh
|
|---|
| 577 | fi
|
|---|
| 578 | ac_prog=ld
|
|---|
| 579 | if test "$GCC" = yes; then
|
|---|
| 580 | # Check if gcc -print-prog-name=ld gives a path.
|
|---|
| 581 | AC_MSG_CHECKING([for ld used by GCC])
|
|---|
| 582 | case $host in
|
|---|
| 583 | *-*-mingw*)
|
|---|
| 584 | # gcc leaves a trailing carriage return which upsets mingw
|
|---|
| 585 | ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
|
|---|
| 586 | *)
|
|---|
| 587 | ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
|
|---|
| 588 | esac
|
|---|
| 589 | case $ac_prog in
|
|---|
| 590 | # Accept absolute paths.
|
|---|
| 591 | [[\\/]* | [A-Za-z]:[\\/]*)]
|
|---|
| 592 | [re_direlt='/[^/][^/]*/\.\./']
|
|---|
| 593 | # Canonicalize the path of ld
|
|---|
| 594 | ac_prog=`echo $ac_prog| sed 's%\\\\%/%g'`
|
|---|
| 595 | while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do
|
|---|
| 596 | ac_prog=`echo $ac_prog| sed "s%$re_direlt%/%"`
|
|---|
| 597 | done
|
|---|
| 598 | test -z "$LD" && LD="$ac_prog"
|
|---|
| 599 | ;;
|
|---|
| 600 | "")
|
|---|
| 601 | # If it fails, then pretend we aren't using GCC.
|
|---|
| 602 | ac_prog=ld
|
|---|
| 603 | ;;
|
|---|
| 604 | *)
|
|---|
| 605 | # If it is relative, then search for the first ld in PATH.
|
|---|
| 606 | with_gnu_ld=unknown
|
|---|
| 607 | ;;
|
|---|
| 608 | esac
|
|---|
| 609 | elif test "$with_gnu_ld" = yes; then
|
|---|
| 610 | AC_MSG_CHECKING([for GNU ld])
|
|---|
| 611 | else
|
|---|
| 612 | AC_MSG_CHECKING([for non-GNU ld])
|
|---|
| 613 | fi
|
|---|
| 614 | AC_CACHE_VAL(acl_cv_path_LD,
|
|---|
| 615 | [if test -z "$LD"; then
|
|---|
| 616 | IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR-:}"
|
|---|
| 617 | for ac_dir in $PATH; do
|
|---|
| 618 | test -z "$ac_dir" && ac_dir=.
|
|---|
| 619 | if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
|
|---|
| 620 | acl_cv_path_LD="$ac_dir/$ac_prog"
|
|---|
| 621 | # Check to see if the program is GNU ld. I'd rather use --version,
|
|---|
| 622 | # but apparently some GNU ld's only accept -v.
|
|---|
| 623 | # Break only if it was the GNU/non-GNU ld that we prefer.
|
|---|
| 624 | if "$acl_cv_path_LD" -v 2>&1 < /dev/null | egrep '(GNU|with BFD)' > /dev/null; then
|
|---|
| 625 | test "$with_gnu_ld" != no && break
|
|---|
| 626 | else
|
|---|
| 627 | test "$with_gnu_ld" != yes && break
|
|---|
| 628 | fi
|
|---|
| 629 | fi
|
|---|
| 630 | done
|
|---|
| 631 | IFS="$ac_save_ifs"
|
|---|
| 632 | else
|
|---|
| 633 | acl_cv_path_LD="$LD" # Let the user override the test with a path.
|
|---|
| 634 | fi])
|
|---|
| 635 | LD="$acl_cv_path_LD"
|
|---|
| 636 | if test -n "$LD"; then
|
|---|
| 637 | AC_MSG_RESULT($LD)
|
|---|
| 638 | else
|
|---|
| 639 | AC_MSG_RESULT(no)
|
|---|
| 640 | fi
|
|---|
| 641 | test -z "$LD" && AC_MSG_ERROR([no acceptable ld found in \$PATH])
|
|---|
| 642 | AC_LIB_PROG_LD_GNU
|
|---|
| 643 | ])
|
|---|
| 644 |
|
|---|
| 645 | # lib-link.m4 serial 4 (gettext-0.12)
|
|---|
| 646 | dnl Copyright (C) 2001-2003 Free Software Foundation, Inc.
|
|---|
| 647 | dnl This file is free software, distributed under the terms of the GNU
|
|---|
| 648 | dnl General Public License. As a special exception to the GNU General
|
|---|
| 649 | dnl Public License, this file may be distributed as part of a program
|
|---|
| 650 | dnl that contains a configuration script generated by Autoconf, under
|
|---|
| 651 | dnl the same distribution terms as the rest of that program.
|
|---|
| 652 |
|
|---|
| 653 | dnl From Bruno Haible.
|
|---|
| 654 |
|
|---|
| 655 | dnl AC_LIB_LINKFLAGS(name [, dependencies]) searches for libname and
|
|---|
| 656 | dnl the libraries corresponding to explicit and implicit dependencies.
|
|---|
| 657 | dnl Sets and AC_SUBSTs the LIB${NAME} and LTLIB${NAME} variables and
|
|---|
| 658 | dnl augments the CPPFLAGS variable.
|
|---|
| 659 | AC_DEFUN([AC_LIB_LINKFLAGS],
|
|---|
| 660 | [
|
|---|
| 661 | AC_REQUIRE([AC_LIB_PREPARE_PREFIX])
|
|---|
| 662 | AC_REQUIRE([AC_LIB_RPATH])
|
|---|
| 663 | define([Name],[translit([$1],[./-], [___])])
|
|---|
| 664 | define([NAME],[translit([$1],[abcdefghijklmnopqrstuvwxyz./-],
|
|---|
| 665 | [ABCDEFGHIJKLMNOPQRSTUVWXYZ___])])
|
|---|
| 666 | AC_CACHE_CHECK([how to link with lib[]$1], [ac_cv_lib[]Name[]_libs], [
|
|---|
| 667 | AC_LIB_LINKFLAGS_BODY([$1], [$2])
|
|---|
| 668 | ac_cv_lib[]Name[]_libs="$LIB[]NAME"
|
|---|
| 669 | ac_cv_lib[]Name[]_ltlibs="$LTLIB[]NAME"
|
|---|
| 670 | ac_cv_lib[]Name[]_cppflags="$INC[]NAME"
|
|---|
| 671 | ])
|
|---|
| 672 | LIB[]NAME="$ac_cv_lib[]Name[]_libs"
|
|---|
| 673 | LTLIB[]NAME="$ac_cv_lib[]Name[]_ltlibs"
|
|---|
| 674 | INC[]NAME="$ac_cv_lib[]Name[]_cppflags"
|
|---|
| 675 | AC_LIB_APPENDTOVAR([CPPFLAGS], [$INC]NAME)
|
|---|
| 676 | AC_SUBST([LIB]NAME)
|
|---|
| 677 | AC_SUBST([LTLIB]NAME)
|
|---|
| 678 | dnl Also set HAVE_LIB[]NAME so that AC_LIB_HAVE_LINKFLAGS can reuse the
|
|---|
| 679 | dnl results of this search when this library appears as a dependency.
|
|---|
| 680 | HAVE_LIB[]NAME=yes
|
|---|
| 681 | undefine([Name])
|
|---|
| 682 | undefine([NAME])
|
|---|
| 683 | ])
|
|---|
| 684 |
|
|---|
| 685 | dnl AC_LIB_HAVE_LINKFLAGS(name, dependencies, includes, testcode)
|
|---|
| 686 | dnl searches for libname and the libraries corresponding to explicit and
|
|---|
| 687 | dnl implicit dependencies, together with the specified include files and
|
|---|
| 688 | dnl the ability to compile and link the specified testcode. If found, it
|
|---|
| 689 | dnl sets and AC_SUBSTs HAVE_LIB${NAME}=yes and the LIB${NAME} and
|
|---|
| 690 | dnl LTLIB${NAME} variables and augments the CPPFLAGS variable, and
|
|---|
| 691 | dnl #defines HAVE_LIB${NAME} to 1. Otherwise, it sets and AC_SUBSTs
|
|---|
| 692 | dnl HAVE_LIB${NAME}=no and LIB${NAME} and LTLIB${NAME} to empty.
|
|---|
| 693 | AC_DEFUN([AC_LIB_HAVE_LINKFLAGS],
|
|---|
| 694 | [
|
|---|
| 695 | AC_REQUIRE([AC_LIB_PREPARE_PREFIX])
|
|---|
| 696 | AC_REQUIRE([AC_LIB_RPATH])
|
|---|
| 697 | define([Name],[translit([$1],[./-], [___])])
|
|---|
| 698 | define([NAME],[translit([$1],[abcdefghijklmnopqrstuvwxyz./-],
|
|---|
| 699 | [ABCDEFGHIJKLMNOPQRSTUVWXYZ___])])
|
|---|
| 700 |
|
|---|
| 701 | dnl Search for lib[]Name and define LIB[]NAME, LTLIB[]NAME and INC[]NAME
|
|---|
| 702 | dnl accordingly.
|
|---|
| 703 | AC_LIB_LINKFLAGS_BODY([$1], [$2])
|
|---|
| 704 |
|
|---|
| 705 | dnl Add $INC[]NAME to CPPFLAGS before performing the following checks,
|
|---|
| 706 | dnl because if the user has installed lib[]Name and not disabled its use
|
|---|
| 707 | dnl via --without-lib[]Name-prefix, he wants to use it.
|
|---|
| 708 | ac_save_CPPFLAGS="$CPPFLAGS"
|
|---|
| 709 | AC_LIB_APPENDTOVAR([CPPFLAGS], [$INC]NAME)
|
|---|
| 710 |
|
|---|
| 711 | AC_CACHE_CHECK([for lib[]$1], [ac_cv_lib[]Name], [
|
|---|
| 712 | ac_save_LIBS="$LIBS"
|
|---|
| 713 | LIBS="$LIBS $LIB[]NAME"
|
|---|
| 714 | AC_TRY_LINK([$3], [$4], [ac_cv_lib[]Name=yes], [ac_cv_lib[]Name=no])
|
|---|
| 715 | LIBS="$ac_save_LIBS"
|
|---|
| 716 | ])
|
|---|
| 717 | if test "$ac_cv_lib[]Name" = yes; then
|
|---|
| 718 | HAVE_LIB[]NAME=yes
|
|---|
| 719 | AC_DEFINE([HAVE_LIB]NAME, 1, [Define if you have the $1 library.])
|
|---|
| 720 | AC_MSG_CHECKING([how to link with lib[]$1])
|
|---|
| 721 | AC_MSG_RESULT([$LIB[]NAME])
|
|---|
| 722 | else
|
|---|
| 723 | HAVE_LIB[]NAME=no
|
|---|
| 724 | dnl If $LIB[]NAME didn't lead to a usable library, we don't need
|
|---|
| 725 | dnl $INC[]NAME either.
|
|---|
| 726 | CPPFLAGS="$ac_save_CPPFLAGS"
|
|---|
| 727 | LIB[]NAME=
|
|---|
| 728 | LTLIB[]NAME=
|
|---|
| 729 | fi
|
|---|
| 730 | AC_SUBST([HAVE_LIB]NAME)
|
|---|
| 731 | AC_SUBST([LIB]NAME)
|
|---|
| 732 | AC_SUBST([LTLIB]NAME)
|
|---|
| 733 | undefine([Name])
|
|---|
| 734 | undefine([NAME])
|
|---|
| 735 | ])
|
|---|
| 736 |
|
|---|
| 737 | dnl Determine the platform dependent parameters needed to use rpath:
|
|---|
| 738 | dnl libext, shlibext, hardcode_libdir_flag_spec, hardcode_libdir_separator,
|
|---|
| 739 | dnl hardcode_direct, hardcode_minus_L.
|
|---|
| 740 | AC_DEFUN([AC_LIB_RPATH],
|
|---|
| 741 | [
|
|---|
| 742 | AC_REQUIRE([AC_PROG_CC]) dnl we use $CC, $GCC, $LDFLAGS
|
|---|
| 743 | AC_REQUIRE([AC_LIB_PROG_LD]) dnl we use $LD, $with_gnu_ld
|
|---|
| 744 | AC_REQUIRE([AC_CANONICAL_HOST]) dnl we use $host
|
|---|
| 745 | AC_REQUIRE([AC_CONFIG_AUX_DIR_DEFAULT]) dnl we use $ac_aux_dir
|
|---|
| 746 | AC_CACHE_CHECK([for shared library run path origin], acl_cv_rpath, [
|
|---|
| 747 | CC="$CC" GCC="$GCC" LDFLAGS="$LDFLAGS" LD="$LD" with_gnu_ld="$with_gnu_ld" \
|
|---|
| 748 | ${CONFIG_SHELL-/bin/sh} "$ac_aux_dir/config.rpath" "$host" > conftest.sh
|
|---|
| 749 | . ./conftest.sh
|
|---|
| 750 | rm -f ./conftest.sh
|
|---|
| 751 | acl_cv_rpath=done
|
|---|
| 752 | ])
|
|---|
| 753 | wl="$acl_cv_wl"
|
|---|
| 754 | libext="$acl_cv_libext"
|
|---|
| 755 | shlibext="$acl_cv_shlibext"
|
|---|
| 756 | hardcode_libdir_flag_spec="$acl_cv_hardcode_libdir_flag_spec"
|
|---|
| 757 | hardcode_libdir_separator="$acl_cv_hardcode_libdir_separator"
|
|---|
| 758 | hardcode_direct="$acl_cv_hardcode_direct"
|
|---|
| 759 | hardcode_minus_L="$acl_cv_hardcode_minus_L"
|
|---|
| 760 | dnl Determine whether the user wants rpath handling at all.
|
|---|
| 761 | AC_ARG_ENABLE(rpath,
|
|---|
| 762 | [ --disable-rpath do not hardcode runtime library paths],
|
|---|
| 763 | :, enable_rpath=yes)
|
|---|
| 764 | ])
|
|---|
| 765 |
|
|---|
| 766 | dnl AC_LIB_LINKFLAGS_BODY(name [, dependencies]) searches for libname and
|
|---|
| 767 | dnl the libraries corresponding to explicit and implicit dependencies.
|
|---|
| 768 | dnl Sets the LIB${NAME}, LTLIB${NAME} and INC${NAME} variables.
|
|---|
| 769 | AC_DEFUN([AC_LIB_LINKFLAGS_BODY],
|
|---|
| 770 | [
|
|---|
| 771 | define([NAME],[translit([$1],[abcdefghijklmnopqrstuvwxyz./-],
|
|---|
| 772 | [ABCDEFGHIJKLMNOPQRSTUVWXYZ___])])
|
|---|
| 773 | dnl By default, look in $includedir and $libdir.
|
|---|
| 774 | use_additional=yes
|
|---|
| 775 | AC_LIB_WITH_FINAL_PREFIX([
|
|---|
| 776 | eval additional_includedir=\"$includedir\"
|
|---|
| 777 | eval additional_libdir=\"$libdir\"
|
|---|
| 778 | ])
|
|---|
| 779 | AC_LIB_ARG_WITH([lib$1-prefix],
|
|---|
| 780 | [ --with-lib$1-prefix[=DIR] search for lib$1 in DIR/include and DIR/lib
|
|---|
| 781 | --without-lib$1-prefix don't search for lib$1 in includedir and libdir],
|
|---|
| 782 | [
|
|---|
| 783 | if test "X$withval" = "Xno"; then
|
|---|
| 784 | use_additional=no
|
|---|
| 785 | else
|
|---|
| 786 | if test "X$withval" = "X"; then
|
|---|
| 787 | AC_LIB_WITH_FINAL_PREFIX([
|
|---|
| 788 | eval additional_includedir=\"$includedir\"
|
|---|
| 789 | eval additional_libdir=\"$libdir\"
|
|---|
| 790 | ])
|
|---|
| 791 | else
|
|---|
| 792 | additional_includedir="$withval/include"
|
|---|
| 793 | additional_libdir="$withval/lib"
|
|---|
| 794 | fi
|
|---|
| 795 | fi
|
|---|
| 796 | ])
|
|---|
| 797 | dnl Search the library and its dependencies in $additional_libdir and
|
|---|
| 798 | dnl $LDFLAGS. Using breadth-first-seach.
|
|---|
| 799 | LIB[]NAME=
|
|---|
| 800 | LTLIB[]NAME=
|
|---|
| 801 | INC[]NAME=
|
|---|
| 802 | rpathdirs=
|
|---|
| 803 | ltrpathdirs=
|
|---|
| 804 | names_already_handled=
|
|---|
| 805 | names_next_round='$1 $2'
|
|---|
| 806 | while test -n "$names_next_round"; do
|
|---|
| 807 | names_this_round="$names_next_round"
|
|---|
| 808 | names_next_round=
|
|---|
| 809 | for name in $names_this_round; do
|
|---|
| 810 | already_handled=
|
|---|
| 811 | for n in $names_already_handled; do
|
|---|
| 812 | if test "$n" = "$name"; then
|
|---|
| 813 | already_handled=yes
|
|---|
| 814 | break
|
|---|
| 815 | fi
|
|---|
| 816 | done
|
|---|
| 817 | if test -z "$already_handled"; then
|
|---|
| 818 | names_already_handled="$names_already_handled $name"
|
|---|
| 819 | dnl See if it was already located by an earlier AC_LIB_LINKFLAGS
|
|---|
| 820 | dnl or AC_LIB_HAVE_LINKFLAGS call.
|
|---|
| 821 | uppername=`echo "$name" | sed -e 'y|abcdefghijklmnopqrstuvwxyz./-|ABCDEFGHIJKLMNOPQRSTUVWXYZ___|'`
|
|---|
| 822 | eval value=\"\$HAVE_LIB$uppername\"
|
|---|
| 823 | if test -n "$value"; then
|
|---|
| 824 | if test "$value" = yes; then
|
|---|
| 825 | eval value=\"\$LIB$uppername\"
|
|---|
| 826 | test -z "$value" || LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$value"
|
|---|
| 827 | eval value=\"\$LTLIB$uppername\"
|
|---|
| 828 | test -z "$value" || LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }$value"
|
|---|
| 829 | else
|
|---|
| 830 | dnl An earlier call to AC_LIB_HAVE_LINKFLAGS has determined
|
|---|
| 831 | dnl that this library doesn't exist. So just drop it.
|
|---|
| 832 | :
|
|---|
| 833 | fi
|
|---|
| 834 | else
|
|---|
| 835 | dnl Search the library lib$name in $additional_libdir and $LDFLAGS
|
|---|
| 836 | dnl and the already constructed $LIBNAME/$LTLIBNAME.
|
|---|
| 837 | found_dir=
|
|---|
| 838 | found_la=
|
|---|
| 839 | found_so=
|
|---|
| 840 | found_a=
|
|---|
| 841 | if test $use_additional = yes; then
|
|---|
| 842 | if test -n "$shlibext" && test -f "$additional_libdir/lib$name.$shlibext"; then
|
|---|
| 843 | found_dir="$additional_libdir"
|
|---|
| 844 | found_so="$additional_libdir/lib$name.$shlibext"
|
|---|
| 845 | if test -f "$additional_libdir/lib$name.la"; then
|
|---|
| 846 | found_la="$additional_libdir/lib$name.la"
|
|---|
| 847 | fi
|
|---|
| 848 | else
|
|---|
| 849 | if test -f "$additional_libdir/lib$name.$libext"; then
|
|---|
| 850 | found_dir="$additional_libdir"
|
|---|
| 851 | found_a="$additional_libdir/lib$name.$libext"
|
|---|
| 852 | if test -f "$additional_libdir/lib$name.la"; then
|
|---|
| 853 | found_la="$additional_libdir/lib$name.la"
|
|---|
| 854 | fi
|
|---|
| 855 | fi
|
|---|
| 856 | fi
|
|---|
| 857 | fi
|
|---|
| 858 | if test "X$found_dir" = "X"; then
|
|---|
| 859 | for x in $LDFLAGS $LTLIB[]NAME; do
|
|---|
| 860 | AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
|
|---|
| 861 | case "$x" in
|
|---|
| 862 | -L*)
|
|---|
| 863 | dir=`echo "X$x" | sed -e 's/^X-L//'`
|
|---|
| 864 | if test -n "$shlibext" && test -f "$dir/lib$name.$shlibext"; then
|
|---|
| 865 | found_dir="$dir"
|
|---|
| 866 | found_so="$dir/lib$name.$shlibext"
|
|---|
| 867 | if test -f "$dir/lib$name.la"; then
|
|---|
| 868 | found_la="$dir/lib$name.la"
|
|---|
| 869 | fi
|
|---|
| 870 | else
|
|---|
| 871 | if test -f "$dir/lib$name.$libext"; then
|
|---|
| 872 | found_dir="$dir"
|
|---|
| 873 | found_a="$dir/lib$name.$libext"
|
|---|
| 874 | if test -f "$dir/lib$name.la"; then
|
|---|
| 875 | found_la="$dir/lib$name.la"
|
|---|
| 876 | fi
|
|---|
| 877 | fi
|
|---|
| 878 | fi
|
|---|
| 879 | ;;
|
|---|
| 880 | esac
|
|---|
| 881 | if test "X$found_dir" != "X"; then
|
|---|
| 882 | break
|
|---|
| 883 | fi
|
|---|
| 884 | done
|
|---|
| 885 | fi
|
|---|
| 886 | if test "X$found_dir" != "X"; then
|
|---|
| 887 | dnl Found the library.
|
|---|
| 888 | LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }-L$found_dir -l$name"
|
|---|
| 889 | if test "X$found_so" != "X"; then
|
|---|
| 890 | dnl Linking with a shared library. We attempt to hardcode its
|
|---|
| 891 | dnl directory into the executable's runpath, unless it's the
|
|---|
| 892 | dnl standard /usr/lib.
|
|---|
| 893 | if test "$enable_rpath" = no || test "X$found_dir" = "X/usr/lib"; then
|
|---|
| 894 | dnl No hardcoding is needed.
|
|---|
| 895 | LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_so"
|
|---|
| 896 | else
|
|---|
| 897 | dnl Use an explicit option to hardcode DIR into the resulting
|
|---|
| 898 | dnl binary.
|
|---|
| 899 | dnl Potentially add DIR to ltrpathdirs.
|
|---|
| 900 | dnl The ltrpathdirs will be appended to $LTLIBNAME at the end.
|
|---|
| 901 | haveit=
|
|---|
| 902 | for x in $ltrpathdirs; do
|
|---|
| 903 | if test "X$x" = "X$found_dir"; then
|
|---|
| 904 | haveit=yes
|
|---|
| 905 | break
|
|---|
| 906 | fi
|
|---|
| 907 | done
|
|---|
| 908 | if test -z "$haveit"; then
|
|---|
| 909 | ltrpathdirs="$ltrpathdirs $found_dir"
|
|---|
| 910 | fi
|
|---|
| 911 | dnl The hardcoding into $LIBNAME is system dependent.
|
|---|
| 912 | if test "$hardcode_direct" = yes; then
|
|---|
| 913 | dnl Using DIR/libNAME.so during linking hardcodes DIR into the
|
|---|
| 914 | dnl resulting binary.
|
|---|
| 915 | LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_so"
|
|---|
| 916 | else
|
|---|
| 917 | if test -n "$hardcode_libdir_flag_spec" && test "$hardcode_minus_L" = no; then
|
|---|
| 918 | dnl Use an explicit option to hardcode DIR into the resulting
|
|---|
| 919 | dnl binary.
|
|---|
| 920 | LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_so"
|
|---|
| 921 | dnl Potentially add DIR to rpathdirs.
|
|---|
| 922 | dnl The rpathdirs will be appended to $LIBNAME at the end.
|
|---|
| 923 | haveit=
|
|---|
| 924 | for x in $rpathdirs; do
|
|---|
| 925 | if test "X$x" = "X$found_dir"; then
|
|---|
| 926 | haveit=yes
|
|---|
| 927 | break
|
|---|
| 928 | fi
|
|---|
| 929 | done
|
|---|
| 930 | if test -z "$haveit"; then
|
|---|
| 931 | rpathdirs="$rpathdirs $found_dir"
|
|---|
| 932 | fi
|
|---|
| 933 | else
|
|---|
| 934 | dnl Rely on "-L$found_dir".
|
|---|
| 935 | dnl But don't add it if it's already contained in the LDFLAGS
|
|---|
| 936 | dnl or the already constructed $LIBNAME
|
|---|
| 937 | haveit=
|
|---|
| 938 | for x in $LDFLAGS $LIB[]NAME; do
|
|---|
| 939 | AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
|
|---|
| 940 | if test "X$x" = "X-L$found_dir"; then
|
|---|
| 941 | haveit=yes
|
|---|
| 942 | break
|
|---|
| 943 | fi
|
|---|
| 944 | done
|
|---|
| 945 | if test -z "$haveit"; then
|
|---|
| 946 | LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-L$found_dir"
|
|---|
| 947 | fi
|
|---|
| 948 | if test "$hardcode_minus_L" != no; then
|
|---|
| 949 | dnl FIXME: Not sure whether we should use
|
|---|
| 950 | dnl "-L$found_dir -l$name" or "-L$found_dir $found_so"
|
|---|
| 951 | dnl here.
|
|---|
| 952 | LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_so"
|
|---|
| 953 | else
|
|---|
| 954 | dnl We cannot use $hardcode_runpath_var and LD_RUN_PATH
|
|---|
| 955 | dnl here, because this doesn't fit in flags passed to the
|
|---|
| 956 | dnl compiler. So give up. No hardcoding. This affects only
|
|---|
| 957 | dnl very old systems.
|
|---|
| 958 | dnl FIXME: Not sure whether we should use
|
|---|
| 959 | dnl "-L$found_dir -l$name" or "-L$found_dir $found_so"
|
|---|
| 960 | dnl here.
|
|---|
| 961 | LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-l$name"
|
|---|
| 962 | fi
|
|---|
| 963 | fi
|
|---|
| 964 | fi
|
|---|
| 965 | fi
|
|---|
| 966 | else
|
|---|
| 967 | if test "X$found_a" != "X"; then
|
|---|
| 968 | dnl Linking with a static library.
|
|---|
| 969 | LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_a"
|
|---|
| 970 | else
|
|---|
| 971 | dnl We shouldn't come here, but anyway it's good to have a
|
|---|
| 972 | dnl fallback.
|
|---|
| 973 | LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-L$found_dir -l$name"
|
|---|
| 974 | fi
|
|---|
| 975 | fi
|
|---|
| 976 | dnl Assume the include files are nearby.
|
|---|
| 977 | additional_includedir=
|
|---|
| 978 | case "$found_dir" in
|
|---|
| 979 | */lib | */lib/)
|
|---|
| 980 | basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e 's,/lib/*$,,'`
|
|---|
| 981 | additional_includedir="$basedir/include"
|
|---|
| 982 | ;;
|
|---|
| 983 | esac
|
|---|
| 984 | if test "X$additional_includedir" != "X"; then
|
|---|
| 985 | dnl Potentially add $additional_includedir to $INCNAME.
|
|---|
| 986 | dnl But don't add it
|
|---|
| 987 | dnl 1. if it's the standard /usr/include,
|
|---|
| 988 | dnl 2. if it's /usr/local/include and we are using GCC on Linux,
|
|---|
| 989 | dnl 3. if it's already present in $CPPFLAGS or the already
|
|---|
| 990 | dnl constructed $INCNAME,
|
|---|
| 991 | dnl 4. if it doesn't exist as a directory.
|
|---|
| 992 | if test "X$additional_includedir" != "X/usr/include"; then
|
|---|
| 993 | haveit=
|
|---|
| 994 | if test "X$additional_includedir" = "X/usr/local/include"; then
|
|---|
| 995 | if test -n "$GCC"; then
|
|---|
| 996 | case $host_os in
|
|---|
| 997 | linux*) haveit=yes;;
|
|---|
| 998 | esac
|
|---|
| 999 | fi
|
|---|
| 1000 | fi
|
|---|
| 1001 | if test -z "$haveit"; then
|
|---|
| 1002 | for x in $CPPFLAGS $INC[]NAME; do
|
|---|
| 1003 | AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
|
|---|
| 1004 | if test "X$x" = "X-I$additional_includedir"; then
|
|---|
| 1005 | haveit=yes
|
|---|
| 1006 | break
|
|---|
| 1007 | fi
|
|---|
| 1008 | done
|
|---|
| 1009 | if test -z "$haveit"; then
|
|---|
| 1010 | if test -d "$additional_includedir"; then
|
|---|
| 1011 | dnl Really add $additional_includedir to $INCNAME.
|
|---|
| 1012 | INC[]NAME="${INC[]NAME}${INC[]NAME:+ }-I$additional_includedir"
|
|---|
| 1013 | fi
|
|---|
| 1014 | fi
|
|---|
| 1015 | fi
|
|---|
| 1016 | fi
|
|---|
| 1017 | fi
|
|---|
| 1018 | dnl Look for dependencies.
|
|---|
| 1019 | if test -n "$found_la"; then
|
|---|
| 1020 | dnl Read the .la file. It defines the variables
|
|---|
| 1021 | dnl dlname, library_names, old_library, dependency_libs, current,
|
|---|
| 1022 | dnl age, revision, installed, dlopen, dlpreopen, libdir.
|
|---|
| 1023 | save_libdir="$libdir"
|
|---|
| 1024 | case "$found_la" in
|
|---|
| 1025 | */* | *\\*) . "$found_la" ;;
|
|---|
| 1026 | *) . "./$found_la" ;;
|
|---|
| 1027 | esac
|
|---|
| 1028 | libdir="$save_libdir"
|
|---|
| 1029 | dnl We use only dependency_libs.
|
|---|
| 1030 | for dep in $dependency_libs; do
|
|---|
| 1031 | case "$dep" in
|
|---|
| 1032 | -L*)
|
|---|
| 1033 | additional_libdir=`echo "X$dep" | sed -e 's/^X-L//'`
|
|---|
| 1034 | dnl Potentially add $additional_libdir to $LIBNAME and $LTLIBNAME.
|
|---|
| 1035 | dnl But don't add it
|
|---|
| 1036 | dnl 1. if it's the standard /usr/lib,
|
|---|
| 1037 | dnl 2. if it's /usr/local/lib and we are using GCC on Linux,
|
|---|
| 1038 | dnl 3. if it's already present in $LDFLAGS or the already
|
|---|
| 1039 | dnl constructed $LIBNAME,
|
|---|
| 1040 | dnl 4. if it doesn't exist as a directory.
|
|---|
| 1041 | if test "X$additional_libdir" != "X/usr/lib"; then
|
|---|
| 1042 | haveit=
|
|---|
| 1043 | if test "X$additional_libdir" = "X/usr/local/lib"; then
|
|---|
| 1044 | if test -n "$GCC"; then
|
|---|
| 1045 | case $host_os in
|
|---|
| 1046 | linux*) haveit=yes;;
|
|---|
| 1047 | esac
|
|---|
| 1048 | fi
|
|---|
| 1049 | fi
|
|---|
| 1050 | if test -z "$haveit"; then
|
|---|
| 1051 | haveit=
|
|---|
| 1052 | for x in $LDFLAGS $LIB[]NAME; do
|
|---|
| 1053 | AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
|
|---|
| 1054 | if test "X$x" = "X-L$additional_libdir"; then
|
|---|
| 1055 | haveit=yes
|
|---|
| 1056 | break
|
|---|
| 1057 | fi
|
|---|
| 1058 | done
|
|---|
| 1059 | if test -z "$haveit"; then
|
|---|
| 1060 | if test -d "$additional_libdir"; then
|
|---|
| 1061 | dnl Really add $additional_libdir to $LIBNAME.
|
|---|
| 1062 | LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-L$additional_libdir"
|
|---|
| 1063 | fi
|
|---|
| 1064 | fi
|
|---|
| 1065 | haveit=
|
|---|
| 1066 | for x in $LDFLAGS $LTLIB[]NAME; do
|
|---|
| 1067 | AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
|
|---|
| 1068 | if test "X$x" = "X-L$additional_libdir"; then
|
|---|
| 1069 | haveit=yes
|
|---|
| 1070 | break
|
|---|
| 1071 | fi
|
|---|
| 1072 | done
|
|---|
| 1073 | if test -z "$haveit"; then
|
|---|
| 1074 | if test -d "$additional_libdir"; then
|
|---|
| 1075 | dnl Really add $additional_libdir to $LTLIBNAME.
|
|---|
| 1076 | LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }-L$additional_libdir"
|
|---|
| 1077 | fi
|
|---|
| 1078 | fi
|
|---|
| 1079 | fi
|
|---|
| 1080 | fi
|
|---|
| 1081 | ;;
|
|---|
| 1082 | -R*)
|
|---|
| 1083 | dir=`echo "X$dep" | sed -e 's/^X-R//'`
|
|---|
| 1084 | if test "$enable_rpath" != no; then
|
|---|
| 1085 | dnl Potentially add DIR to rpathdirs.
|
|---|
| 1086 | dnl The rpathdirs will be appended to $LIBNAME at the end.
|
|---|
| 1087 | haveit=
|
|---|
| 1088 | for x in $rpathdirs; do
|
|---|
| 1089 | if test "X$x" = "X$dir"; then
|
|---|
| 1090 | haveit=yes
|
|---|
| 1091 | break
|
|---|
| 1092 | fi
|
|---|
| 1093 | done
|
|---|
| 1094 | if test -z "$haveit"; then
|
|---|
| 1095 | rpathdirs="$rpathdirs $dir"
|
|---|
| 1096 | fi
|
|---|
| 1097 | dnl Potentially add DIR to ltrpathdirs.
|
|---|
| 1098 | dnl The ltrpathdirs will be appended to $LTLIBNAME at the end.
|
|---|
| 1099 | haveit=
|
|---|
| 1100 | for x in $ltrpathdirs; do
|
|---|
| 1101 | if test "X$x" = "X$dir"; then
|
|---|
| 1102 | haveit=yes
|
|---|
| 1103 | break
|
|---|
| 1104 | fi
|
|---|
| 1105 | done
|
|---|
| 1106 | if test -z "$haveit"; then
|
|---|
| 1107 | ltrpathdirs="$ltrpathdirs $dir"
|
|---|
| 1108 | fi
|
|---|
| 1109 | fi
|
|---|
| 1110 | ;;
|
|---|
| 1111 | -l*)
|
|---|
| 1112 | dnl Handle this in the next round.
|
|---|
| 1113 | names_next_round="$names_next_round "`echo "X$dep" | sed -e 's/^X-l//'`
|
|---|
| 1114 | ;;
|
|---|
| 1115 | *.la)
|
|---|
| 1116 | dnl Handle this in the next round. Throw away the .la's
|
|---|
| 1117 | dnl directory; it is already contained in a preceding -L
|
|---|
| 1118 | dnl option.
|
|---|
| 1119 | names_next_round="$names_next_round "`echo "X$dep" | sed -e 's,^X.*/,,' -e 's,^lib,,' -e 's,\.la$,,'`
|
|---|
| 1120 | ;;
|
|---|
| 1121 | *)
|
|---|
| 1122 | dnl Most likely an immediate library name.
|
|---|
| 1123 | LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$dep"
|
|---|
| 1124 | LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }$dep"
|
|---|
| 1125 | ;;
|
|---|
| 1126 | esac
|
|---|
| 1127 | done
|
|---|
| 1128 | fi
|
|---|
| 1129 | else
|
|---|
| 1130 | dnl Didn't find the library; assume it is in the system directories
|
|---|
| 1131 | dnl known to the linker and runtime loader. (All the system
|
|---|
| 1132 | dnl directories known to the linker should also be known to the
|
|---|
| 1133 | dnl runtime loader, otherwise the system is severely misconfigured.)
|
|---|
| 1134 | LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-l$name"
|
|---|
| 1135 | LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }-l$name"
|
|---|
| 1136 | fi
|
|---|
| 1137 | fi
|
|---|
| 1138 | fi
|
|---|
| 1139 | done
|
|---|
| 1140 | done
|
|---|
| 1141 | if test "X$rpathdirs" != "X"; then
|
|---|
| 1142 | if test -n "$hardcode_libdir_separator"; then
|
|---|
| 1143 | dnl Weird platform: only the last -rpath option counts, the user must
|
|---|
| 1144 | dnl pass all path elements in one option. We can arrange that for a
|
|---|
| 1145 | dnl single library, but not when more than one $LIBNAMEs are used.
|
|---|
| 1146 | alldirs=
|
|---|
| 1147 | for found_dir in $rpathdirs; do
|
|---|
| 1148 | alldirs="${alldirs}${alldirs:+$hardcode_libdir_separator}$found_dir"
|
|---|
| 1149 | done
|
|---|
| 1150 | dnl Note: hardcode_libdir_flag_spec uses $libdir and $wl.
|
|---|
| 1151 | acl_save_libdir="$libdir"
|
|---|
| 1152 | libdir="$alldirs"
|
|---|
| 1153 | eval flag=\"$hardcode_libdir_flag_spec\"
|
|---|
| 1154 | libdir="$acl_save_libdir"
|
|---|
| 1155 | LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$flag"
|
|---|
| 1156 | else
|
|---|
| 1157 | dnl The -rpath options are cumulative.
|
|---|
| 1158 | for found_dir in $rpathdirs; do
|
|---|
| 1159 | acl_save_libdir="$libdir"
|
|---|
| 1160 | libdir="$found_dir"
|
|---|
| 1161 | eval flag=\"$hardcode_libdir_flag_spec\"
|
|---|
| 1162 | libdir="$acl_save_libdir"
|
|---|
| 1163 | LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$flag"
|
|---|
| 1164 | done
|
|---|
| 1165 | fi
|
|---|
| 1166 | fi
|
|---|
| 1167 | if test "X$ltrpathdirs" != "X"; then
|
|---|
| 1168 | dnl When using libtool, the option that works for both libraries and
|
|---|
| 1169 | dnl executables is -R. The -R options are cumulative.
|
|---|
| 1170 | for found_dir in $ltrpathdirs; do
|
|---|
| 1171 | LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }-R$found_dir"
|
|---|
| 1172 | done
|
|---|
| 1173 | fi
|
|---|
| 1174 | ])
|
|---|
| 1175 |
|
|---|
| 1176 | dnl AC_LIB_APPENDTOVAR(VAR, CONTENTS) appends the elements of CONTENTS to VAR,
|
|---|
| 1177 | dnl unless already present in VAR.
|
|---|
| 1178 | dnl Works only for CPPFLAGS, not for LIB* variables because that sometimes
|
|---|
| 1179 | dnl contains two or three consecutive elements that belong together.
|
|---|
| 1180 | AC_DEFUN([AC_LIB_APPENDTOVAR],
|
|---|
| 1181 | [
|
|---|
| 1182 | for element in [$2]; do
|
|---|
| 1183 | haveit=
|
|---|
| 1184 | for x in $[$1]; do
|
|---|
| 1185 | AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
|
|---|
| 1186 | if test "X$x" = "X$element"; then
|
|---|
| 1187 | haveit=yes
|
|---|
| 1188 | break
|
|---|
| 1189 | fi
|
|---|
| 1190 | done
|
|---|
| 1191 | if test -z "$haveit"; then
|
|---|
| 1192 | [$1]="${[$1]}${[$1]:+ }$element"
|
|---|
| 1193 | fi
|
|---|
| 1194 | done
|
|---|
| 1195 | ])
|
|---|
| 1196 |
|
|---|
| 1197 | # lib-prefix.m4 serial 2 (gettext-0.12)
|
|---|
| 1198 | dnl Copyright (C) 2001-2003 Free Software Foundation, Inc.
|
|---|
| 1199 | dnl This file is free software, distributed under the terms of the GNU
|
|---|
| 1200 | dnl General Public License. As a special exception to the GNU General
|
|---|
| 1201 | dnl Public License, this file may be distributed as part of a program
|
|---|
| 1202 | dnl that contains a configuration script generated by Autoconf, under
|
|---|
| 1203 | dnl the same distribution terms as the rest of that program.
|
|---|
| 1204 |
|
|---|
| 1205 | dnl From Bruno Haible.
|
|---|
| 1206 |
|
|---|
| 1207 | dnl AC_LIB_ARG_WITH is synonymous to AC_ARG_WITH in autoconf-2.13, and
|
|---|
| 1208 | dnl similar to AC_ARG_WITH in autoconf 2.52...2.57 except that is doesn't
|
|---|
| 1209 | dnl require excessive bracketing.
|
|---|
| 1210 | ifdef([AC_HELP_STRING],
|
|---|
| 1211 | [AC_DEFUN([AC_LIB_ARG_WITH], [AC_ARG_WITH([$1],[[$2]],[$3],[$4])])],
|
|---|
| 1212 | [AC_DEFUN([AC_LIB_ARG_WITH], [AC_ARG_WITH([$1],[$2],[$3],[$4])])])
|
|---|
| 1213 |
|
|---|
| 1214 | dnl AC_LIB_PREFIX adds to the CPPFLAGS and LDFLAGS the flags that are needed
|
|---|
| 1215 | dnl to access previously installed libraries. The basic assumption is that
|
|---|
| 1216 | dnl a user will want packages to use other packages he previously installed
|
|---|
| 1217 | dnl with the same --prefix option.
|
|---|
| 1218 | dnl This macro is not needed if only AC_LIB_LINKFLAGS is used to locate
|
|---|
| 1219 | dnl libraries, but is otherwise very convenient.
|
|---|
| 1220 | AC_DEFUN([AC_LIB_PREFIX],
|
|---|
| 1221 | [
|
|---|
| 1222 | AC_BEFORE([$0], [AC_LIB_LINKFLAGS])
|
|---|
| 1223 | AC_REQUIRE([AC_PROG_CC])
|
|---|
| 1224 | AC_REQUIRE([AC_CANONICAL_HOST])
|
|---|
| 1225 | AC_REQUIRE([AC_LIB_PREPARE_PREFIX])
|
|---|
| 1226 | dnl By default, look in $includedir and $libdir.
|
|---|
| 1227 | use_additional=yes
|
|---|
| 1228 | AC_LIB_WITH_FINAL_PREFIX([
|
|---|
| 1229 | eval additional_includedir=\"$includedir\"
|
|---|
| 1230 | eval additional_libdir=\"$libdir\"
|
|---|
| 1231 | ])
|
|---|
| 1232 | AC_LIB_ARG_WITH([lib-prefix],
|
|---|
| 1233 | [ --with-lib-prefix[=DIR] search for libraries in DIR/include and DIR/lib
|
|---|
| 1234 | --without-lib-prefix don't search for libraries in includedir and libdir],
|
|---|
| 1235 | [
|
|---|
| 1236 | if test "X$withval" = "Xno"; then
|
|---|
| 1237 | use_additional=no
|
|---|
| 1238 | else
|
|---|
| 1239 | if test "X$withval" = "X"; then
|
|---|
| 1240 | AC_LIB_WITH_FINAL_PREFIX([
|
|---|
| 1241 | eval additional_includedir=\"$includedir\"
|
|---|
| 1242 | eval additional_libdir=\"$libdir\"
|
|---|
| 1243 | ])
|
|---|
| 1244 | else
|
|---|
| 1245 | additional_includedir="$withval/include"
|
|---|
| 1246 | additional_libdir="$withval/lib"
|
|---|
| 1247 | fi
|
|---|
| 1248 | fi
|
|---|
| 1249 | ])
|
|---|
| 1250 | if test $use_additional = yes; then
|
|---|
| 1251 | dnl Potentially add $additional_includedir to $CPPFLAGS.
|
|---|
| 1252 | dnl But don't add it
|
|---|
| 1253 | dnl 1. if it's the standard /usr/include,
|
|---|
| 1254 | dnl 2. if it's already present in $CPPFLAGS,
|
|---|
| 1255 | dnl 3. if it's /usr/local/include and we are using GCC on Linux,
|
|---|
| 1256 | dnl 4. if it doesn't exist as a directory.
|
|---|
| 1257 | if test "X$additional_includedir" != "X/usr/include"; then
|
|---|
| 1258 | haveit=
|
|---|
| 1259 | for x in $CPPFLAGS; do
|
|---|
| 1260 | AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
|
|---|
| 1261 | if test "X$x" = "X-I$additional_includedir"; then
|
|---|
| 1262 | haveit=yes
|
|---|
| 1263 | break
|
|---|
| 1264 | fi
|
|---|
| 1265 | done
|
|---|
| 1266 | if test -z "$haveit"; then
|
|---|
| 1267 | if test "X$additional_includedir" = "X/usr/local/include"; then
|
|---|
| 1268 | if test -n "$GCC"; then
|
|---|
| 1269 | case $host_os in
|
|---|
| 1270 | linux*) haveit=yes;;
|
|---|
| 1271 | esac
|
|---|
| 1272 | fi
|
|---|
| 1273 | fi
|
|---|
| 1274 | if test -z "$haveit"; then
|
|---|
| 1275 | if test -d "$additional_includedir"; then
|
|---|
| 1276 | dnl Really add $additional_includedir to $CPPFLAGS.
|
|---|
| 1277 | CPPFLAGS="${CPPFLAGS}${CPPFLAGS:+ }-I$additional_includedir"
|
|---|
| 1278 | fi
|
|---|
| 1279 | fi
|
|---|
| 1280 | fi
|
|---|
| 1281 | fi
|
|---|
| 1282 | dnl Potentially add $additional_libdir to $LDFLAGS.
|
|---|
| 1283 | dnl But don't add it
|
|---|
| 1284 | dnl 1. if it's the standard /usr/lib,
|
|---|
| 1285 | dnl 2. if it's already present in $LDFLAGS,
|
|---|
| 1286 | dnl 3. if it's /usr/local/lib and we are using GCC on Linux,
|
|---|
| 1287 | dnl 4. if it doesn't exist as a directory.
|
|---|
| 1288 | if test "X$additional_libdir" != "X/usr/lib"; then
|
|---|
| 1289 | haveit=
|
|---|
| 1290 | for x in $LDFLAGS; do
|
|---|
| 1291 | AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
|
|---|
| 1292 | if test "X$x" = "X-L$additional_libdir"; then
|
|---|
| 1293 | haveit=yes
|
|---|
| 1294 | break
|
|---|
| 1295 | fi
|
|---|
| 1296 | done
|
|---|
| 1297 | if test -z "$haveit"; then
|
|---|
| 1298 | if test "X$additional_libdir" = "X/usr/local/lib"; then
|
|---|
| 1299 | if test -n "$GCC"; then
|
|---|
| 1300 | case $host_os in
|
|---|
| 1301 | linux*) haveit=yes;;
|
|---|
| 1302 | esac
|
|---|
| 1303 | fi
|
|---|
| 1304 | fi
|
|---|
| 1305 | if test -z "$haveit"; then
|
|---|
| 1306 | if test -d "$additional_libdir"; then
|
|---|
| 1307 | dnl Really add $additional_libdir to $LDFLAGS.
|
|---|
| 1308 | LDFLAGS="${LDFLAGS}${LDFLAGS:+ }-L$additional_libdir"
|
|---|
| 1309 | fi
|
|---|
| 1310 | fi
|
|---|
| 1311 | fi
|
|---|
| 1312 | fi
|
|---|
| 1313 | fi
|
|---|
| 1314 | ])
|
|---|
| 1315 |
|
|---|
| 1316 | dnl AC_LIB_PREPARE_PREFIX creates variables acl_final_prefix,
|
|---|
| 1317 | dnl acl_final_exec_prefix, containing the values to which $prefix and
|
|---|
| 1318 | dnl $exec_prefix will expand at the end of the configure script.
|
|---|
| 1319 | AC_DEFUN([AC_LIB_PREPARE_PREFIX],
|
|---|
| 1320 | [
|
|---|
| 1321 | dnl Unfortunately, prefix and exec_prefix get only finally determined
|
|---|
| 1322 | dnl at the end of configure.
|
|---|
| 1323 | if test "X$prefix" = "XNONE"; then
|
|---|
| 1324 | acl_final_prefix="$ac_default_prefix"
|
|---|
| 1325 | else
|
|---|
| 1326 | acl_final_prefix="$prefix"
|
|---|
| 1327 | fi
|
|---|
| 1328 | if test "X$exec_prefix" = "XNONE"; then
|
|---|
| 1329 | acl_final_exec_prefix='${prefix}'
|
|---|
| 1330 | else
|
|---|
| 1331 | acl_final_exec_prefix="$exec_prefix"
|
|---|
| 1332 | fi
|
|---|
| 1333 | acl_save_prefix="$prefix"
|
|---|
| 1334 | prefix="$acl_final_prefix"
|
|---|
| 1335 | eval acl_final_exec_prefix=\"$acl_final_exec_prefix\"
|
|---|
| 1336 | prefix="$acl_save_prefix"
|
|---|
| 1337 | ])
|
|---|
| 1338 |
|
|---|
| 1339 | dnl AC_LIB_WITH_FINAL_PREFIX([statement]) evaluates statement, with the
|
|---|
| 1340 | dnl variables prefix and exec_prefix bound to the values they will have
|
|---|
| 1341 | dnl at the end of the configure script.
|
|---|
| 1342 | AC_DEFUN([AC_LIB_WITH_FINAL_PREFIX],
|
|---|
| 1343 | [
|
|---|
| 1344 | acl_save_prefix="$prefix"
|
|---|
| 1345 | prefix="$acl_final_prefix"
|
|---|
| 1346 | acl_save_exec_prefix="$exec_prefix"
|
|---|
| 1347 | exec_prefix="$acl_final_exec_prefix"
|
|---|
| 1348 | $1
|
|---|
| 1349 | exec_prefix="$acl_save_exec_prefix"
|
|---|
| 1350 | prefix="$acl_save_prefix"
|
|---|
| 1351 | ])
|
|---|
| 1352 |
|
|---|
| 1353 | # nls.m4 serial 1 (gettext-0.12)
|
|---|
| 1354 | dnl Copyright (C) 1995-2003 Free Software Foundation, Inc.
|
|---|
| 1355 | dnl This file is free software, distributed under the terms of the GNU
|
|---|
| 1356 | dnl General Public License. As a special exception to the GNU General
|
|---|
| 1357 | dnl Public License, this file may be distributed as part of a program
|
|---|
| 1358 | dnl that contains a configuration script generated by Autoconf, under
|
|---|
| 1359 | dnl the same distribution terms as the rest of that program.
|
|---|
| 1360 | dnl
|
|---|
| 1361 | dnl This file can can be used in projects which are not available under
|
|---|
| 1362 | dnl the GNU General Public License or the GNU Library General Public
|
|---|
| 1363 | dnl License but which still want to provide support for the GNU gettext
|
|---|
| 1364 | dnl functionality.
|
|---|
| 1365 | dnl Please note that the actual code of the GNU gettext library is covered
|
|---|
| 1366 | dnl by the GNU Library General Public License, and the rest of the GNU
|
|---|
| 1367 | dnl gettext package package is covered by the GNU General Public License.
|
|---|
| 1368 | dnl They are *not* in the public domain.
|
|---|
| 1369 |
|
|---|
| 1370 | dnl Authors:
|
|---|
| 1371 | dnl Ulrich Drepper <drepper@cygnus.com>, 1995-2000.
|
|---|
| 1372 | dnl Bruno Haible <haible@clisp.cons.org>, 2000-2003.
|
|---|
| 1373 |
|
|---|
| 1374 | AC_DEFUN([AM_NLS],
|
|---|
| 1375 | [
|
|---|
| 1376 | AC_MSG_CHECKING([whether NLS is requested])
|
|---|
| 1377 | dnl Default is enabled NLS
|
|---|
| 1378 | AC_ARG_ENABLE(nls,
|
|---|
| 1379 | [ --disable-nls do not use Native Language Support],
|
|---|
| 1380 | USE_NLS=$enableval, USE_NLS=yes)
|
|---|
| 1381 | AC_MSG_RESULT($USE_NLS)
|
|---|
| 1382 | AC_SUBST(USE_NLS)
|
|---|
| 1383 | ])
|
|---|
| 1384 |
|
|---|
| 1385 | AC_DEFUN([AM_MKINSTALLDIRS],
|
|---|
| 1386 | [
|
|---|
| 1387 | dnl If the AC_CONFIG_AUX_DIR macro for autoconf is used we possibly
|
|---|
| 1388 | dnl find the mkinstalldirs script in another subdir but $(top_srcdir).
|
|---|
| 1389 | dnl Try to locate it.
|
|---|
| 1390 | MKINSTALLDIRS=
|
|---|
| 1391 | if test -n "$ac_aux_dir"; then
|
|---|
| 1392 | case "$ac_aux_dir" in
|
|---|
| 1393 | /*) MKINSTALLDIRS="$ac_aux_dir/mkinstalldirs" ;;
|
|---|
| 1394 | *) MKINSTALLDIRS="\$(top_builddir)/$ac_aux_dir/mkinstalldirs" ;;
|
|---|
| 1395 | esac
|
|---|
| 1396 | fi
|
|---|
| 1397 | if test -z "$MKINSTALLDIRS"; then
|
|---|
| 1398 | MKINSTALLDIRS="\$(top_srcdir)/mkinstalldirs"
|
|---|
| 1399 | fi
|
|---|
| 1400 | AC_SUBST(MKINSTALLDIRS)
|
|---|
| 1401 | ])
|
|---|
| 1402 |
|
|---|
| 1403 | # po.m4 serial 1 (gettext-0.12)
|
|---|
| 1404 | dnl Copyright (C) 1995-2003 Free Software Foundation, Inc.
|
|---|
| 1405 | dnl This file is free software, distributed under the terms of the GNU
|
|---|
| 1406 | dnl General Public License. As a special exception to the GNU General
|
|---|
| 1407 | dnl Public License, this file may be distributed as part of a program
|
|---|
| 1408 | dnl that contains a configuration script generated by Autoconf, under
|
|---|
| 1409 | dnl the same distribution terms as the rest of that program.
|
|---|
| 1410 | dnl
|
|---|
| 1411 | dnl This file can can be used in projects which are not available under
|
|---|
| 1412 | dnl the GNU General Public License or the GNU Library General Public
|
|---|
| 1413 | dnl License but which still want to provide support for the GNU gettext
|
|---|
| 1414 | dnl functionality.
|
|---|
| 1415 | dnl Please note that the actual code of the GNU gettext library is covered
|
|---|
| 1416 | dnl by the GNU Library General Public License, and the rest of the GNU
|
|---|
| 1417 | dnl gettext package package is covered by the GNU General Public License.
|
|---|
| 1418 | dnl They are *not* in the public domain.
|
|---|
| 1419 |
|
|---|
| 1420 | dnl Authors:
|
|---|
| 1421 | dnl Ulrich Drepper <drepper@cygnus.com>, 1995-2000.
|
|---|
| 1422 | dnl Bruno Haible <haible@clisp.cons.org>, 2000-2003.
|
|---|
| 1423 |
|
|---|
| 1424 | dnl Checks for all prerequisites of the po subdirectory.
|
|---|
| 1425 | AC_DEFUN([AM_PO_SUBDIRS],
|
|---|
| 1426 | [
|
|---|
| 1427 | AC_REQUIRE([AC_PROG_MAKE_SET])dnl
|
|---|
| 1428 | AC_REQUIRE([AC_PROG_INSTALL])dnl
|
|---|
| 1429 | AC_REQUIRE([AM_MKINSTALLDIRS])dnl
|
|---|
| 1430 | AC_REQUIRE([AM_NLS])dnl
|
|---|
| 1431 |
|
|---|
| 1432 | dnl Perform the following tests also if --disable-nls has been given,
|
|---|
| 1433 | dnl because they are needed for "make dist" to work.
|
|---|
| 1434 |
|
|---|
| 1435 | dnl Search for GNU msgfmt in the PATH.
|
|---|
| 1436 | dnl The first test excludes Solaris msgfmt and early GNU msgfmt versions.
|
|---|
| 1437 | dnl The second test excludes FreeBSD msgfmt.
|
|---|
| 1438 | AM_PATH_PROG_WITH_TEST(MSGFMT, msgfmt,
|
|---|
| 1439 | [$ac_dir/$ac_word --statistics /dev/null >/dev/null 2>&1 &&
|
|---|
| 1440 | (if $ac_dir/$ac_word --statistics /dev/null 2>&1 >/dev/null | grep usage >/dev/null; then exit 1; else exit 0; fi)],
|
|---|
| 1441 | :)
|
|---|
| 1442 | AC_PATH_PROG(GMSGFMT, gmsgfmt, $MSGFMT)
|
|---|
| 1443 |
|
|---|
| 1444 | dnl Search for GNU xgettext 0.12 or newer in the PATH.
|
|---|
| 1445 | dnl The first test excludes Solaris xgettext and early GNU xgettext versions.
|
|---|
| 1446 | dnl The second test excludes FreeBSD xgettext.
|
|---|
| 1447 | AM_PATH_PROG_WITH_TEST(XGETTEXT, xgettext,
|
|---|
| 1448 | [$ac_dir/$ac_word --omit-header --copyright-holder= --msgid-bugs-address= /dev/null >/dev/null 2>&1 &&
|
|---|
| 1449 | (if $ac_dir/$ac_word --omit-header --copyright-holder= --msgid-bugs-address= /dev/null 2>&1 >/dev/null | grep usage >/dev/null; then exit 1; else exit 0; fi)],
|
|---|
| 1450 | :)
|
|---|
| 1451 | dnl Remove leftover from FreeBSD xgettext call.
|
|---|
| 1452 | rm -f messages.po
|
|---|
| 1453 |
|
|---|
| 1454 | dnl Search for GNU msgmerge 0.11 or newer in the PATH.
|
|---|
| 1455 | AM_PATH_PROG_WITH_TEST(MSGMERGE, msgmerge,
|
|---|
| 1456 | [$ac_dir/$ac_word --update -q /dev/null /dev/null >/dev/null 2>&1], :)
|
|---|
| 1457 |
|
|---|
| 1458 | dnl This could go away some day; the PATH_PROG_WITH_TEST already does it.
|
|---|
| 1459 | dnl Test whether we really found GNU msgfmt.
|
|---|
| 1460 | if test "$GMSGFMT" != ":"; then
|
|---|
| 1461 | dnl If it is no GNU msgfmt we define it as : so that the
|
|---|
| 1462 | dnl Makefiles still can work.
|
|---|
| 1463 | if $GMSGFMT --statistics /dev/null >/dev/null 2>&1 &&
|
|---|
| 1464 | (if $GMSGFMT --statistics /dev/null 2>&1 >/dev/null | grep usage >/dev/null; then exit 1; else exit 0; fi); then
|
|---|
| 1465 | : ;
|
|---|
| 1466 | else
|
|---|
| 1467 | GMSGFMT=`echo "$GMSGFMT" | sed -e 's,^.*/,,'`
|
|---|
| 1468 | AC_MSG_RESULT(
|
|---|
| 1469 | [found $GMSGFMT program is not GNU msgfmt; ignore it])
|
|---|
| 1470 | GMSGFMT=":"
|
|---|
| 1471 | fi
|
|---|
| 1472 | fi
|
|---|
| 1473 |
|
|---|
| 1474 | dnl This could go away some day; the PATH_PROG_WITH_TEST already does it.
|
|---|
| 1475 | dnl Test whether we really found GNU xgettext.
|
|---|
| 1476 | if test "$XGETTEXT" != ":"; then
|
|---|
| 1477 | dnl If it is no GNU xgettext we define it as : so that the
|
|---|
| 1478 | dnl Makefiles still can work.
|
|---|
| 1479 | if $XGETTEXT --omit-header --copyright-holder= --msgid-bugs-address= /dev/null >/dev/null 2>&1 &&
|
|---|
| 1480 | (if $XGETTEXT --omit-header --copyright-holder= --msgid-bugs-address= /dev/null 2>&1 >/dev/null | grep usage >/dev/null; then exit 1; else exit 0; fi); then
|
|---|
| 1481 | : ;
|
|---|
| 1482 | else
|
|---|
| 1483 | AC_MSG_RESULT(
|
|---|
| 1484 | [found xgettext program is not GNU xgettext; ignore it])
|
|---|
| 1485 | XGETTEXT=":"
|
|---|
| 1486 | fi
|
|---|
| 1487 | dnl Remove leftover from FreeBSD xgettext call.
|
|---|
| 1488 | rm -f messages.po
|
|---|
| 1489 | fi
|
|---|
| 1490 |
|
|---|
| 1491 | AC_OUTPUT_COMMANDS([
|
|---|
| 1492 | for ac_file in $CONFIG_FILES; do
|
|---|
| 1493 | # Support "outfile[:infile[:infile...]]"
|
|---|
| 1494 | case "$ac_file" in
|
|---|
| 1495 | *:*) ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
|
|---|
| 1496 | esac
|
|---|
| 1497 | # PO directories have a Makefile.in generated from Makefile.in.in.
|
|---|
| 1498 | case "$ac_file" in */Makefile.in)
|
|---|
| 1499 | # Adjust a relative srcdir.
|
|---|
| 1500 | ac_dir=`echo "$ac_file"|sed 's%/[^/][^/]*$%%'`
|
|---|
| 1501 | ac_dir_suffix="/`echo "$ac_dir"|sed 's%^\./%%'`"
|
|---|
| 1502 | ac_dots=`echo "$ac_dir_suffix"|sed 's%/[^/]*%../%g'`
|
|---|
| 1503 | # In autoconf-2.13 it is called $ac_given_srcdir.
|
|---|
| 1504 | # In autoconf-2.50 it is called $srcdir.
|
|---|
| 1505 | test -n "$ac_given_srcdir" || ac_given_srcdir="$srcdir"
|
|---|
| 1506 | case "$ac_given_srcdir" in
|
|---|
| 1507 | .) top_srcdir=`echo $ac_dots|sed 's%/$%%'` ;;
|
|---|
| 1508 | /*) top_srcdir="$ac_given_srcdir" ;;
|
|---|
| 1509 | *) top_srcdir="$ac_dots$ac_given_srcdir" ;;
|
|---|
| 1510 | esac
|
|---|
| 1511 | if test -f "$ac_given_srcdir/$ac_dir/POTFILES.in"; then
|
|---|
| 1512 | rm -f "$ac_dir/POTFILES"
|
|---|
| 1513 | test -n "$as_me" && echo "$as_me: creating $ac_dir/POTFILES" || echo "creating $ac_dir/POTFILES"
|
|---|
| 1514 | cat "$ac_given_srcdir/$ac_dir/POTFILES.in" | sed -e "/^#/d" -e "/^[ ]*\$/d" -e "s,.*, $top_srcdir/& \\\\," | sed -e "\$s/\(.*\) \\\\/\1/" > "$ac_dir/POTFILES"
|
|---|
| 1515 | POMAKEFILEDEPS="POTFILES.in"
|
|---|
| 1516 | # ALL_LINGUAS, POFILES, GMOFILES, UPDATEPOFILES, DUMMYPOFILES depend
|
|---|
| 1517 | # on $ac_dir but don't depend on user-specified configuration
|
|---|
| 1518 | # parameters.
|
|---|
| 1519 | if test -f "$ac_given_srcdir/$ac_dir/LINGUAS"; then
|
|---|
| 1520 | # The LINGUAS file contains the set of available languages.
|
|---|
| 1521 | if test -n "$OBSOLETE_ALL_LINGUAS"; then
|
|---|
| 1522 | test -n "$as_me" && echo "$as_me: setting ALL_LINGUAS in configure.in is obsolete" || echo "setting ALL_LINGUAS in configure.in is obsolete"
|
|---|
| 1523 | fi
|
|---|
| 1524 | ALL_LINGUAS_=`sed -e "/^#/d" "$ac_given_srcdir/$ac_dir/LINGUAS"`
|
|---|
| 1525 | # Hide the ALL_LINGUAS assigment from automake.
|
|---|
| 1526 | eval 'ALL_LINGUAS''=$ALL_LINGUAS_'
|
|---|
| 1527 | POMAKEFILEDEPS="$POMAKEFILEDEPS LINGUAS"
|
|---|
| 1528 | else
|
|---|
| 1529 | # The set of available languages was given in configure.in.
|
|---|
| 1530 | eval 'ALL_LINGUAS''=$OBSOLETE_ALL_LINGUAS'
|
|---|
| 1531 | fi
|
|---|
| 1532 | case "$ac_given_srcdir" in
|
|---|
| 1533 | .) srcdirpre= ;;
|
|---|
| 1534 | *) srcdirpre='$(srcdir)/' ;;
|
|---|
| 1535 | esac
|
|---|
| 1536 | POFILES=
|
|---|
| 1537 | GMOFILES=
|
|---|
| 1538 | UPDATEPOFILES=
|
|---|
| 1539 | DUMMYPOFILES=
|
|---|
| 1540 | for lang in $ALL_LINGUAS; do
|
|---|
| 1541 | POFILES="$POFILES $srcdirpre$lang.po"
|
|---|
| 1542 | GMOFILES="$GMOFILES $srcdirpre$lang.gmo"
|
|---|
| 1543 | UPDATEPOFILES="$UPDATEPOFILES $lang.po-update"
|
|---|
| 1544 | DUMMYPOFILES="$DUMMYPOFILES $lang.nop"
|
|---|
| 1545 | done
|
|---|
| 1546 | # CATALOGS depends on both $ac_dir and the user's LINGUAS
|
|---|
| 1547 | # environment variable.
|
|---|
| 1548 | INST_LINGUAS=
|
|---|
| 1549 | if test -n "$ALL_LINGUAS"; then
|
|---|
| 1550 | for presentlang in $ALL_LINGUAS; do
|
|---|
| 1551 | useit=no
|
|---|
| 1552 | if test "%UNSET%" != "$LINGUAS"; then
|
|---|
| 1553 | desiredlanguages="$LINGUAS"
|
|---|
| 1554 | else
|
|---|
| 1555 | desiredlanguages="$ALL_LINGUAS"
|
|---|
| 1556 | fi
|
|---|
| 1557 | for desiredlang in $desiredlanguages; do
|
|---|
| 1558 | # Use the presentlang catalog if desiredlang is
|
|---|
| 1559 | # a. equal to presentlang, or
|
|---|
| 1560 | # b. a variant of presentlang (because in this case,
|
|---|
| 1561 | # presentlang can be used as a fallback for messages
|
|---|
| 1562 | # which are not translated in the desiredlang catalog).
|
|---|
| 1563 | case "$desiredlang" in
|
|---|
| 1564 | "$presentlang"*) useit=yes;;
|
|---|
| 1565 | esac
|
|---|
| 1566 | done
|
|---|
| 1567 | if test $useit = yes; then
|
|---|
| 1568 | INST_LINGUAS="$INST_LINGUAS $presentlang"
|
|---|
| 1569 | fi
|
|---|
| 1570 | done
|
|---|
| 1571 | fi
|
|---|
| 1572 | CATALOGS=
|
|---|
| 1573 | if test -n "$INST_LINGUAS"; then
|
|---|
| 1574 | for lang in $INST_LINGUAS; do
|
|---|
| 1575 | CATALOGS="$CATALOGS $lang.gmo"
|
|---|
| 1576 | done
|
|---|
| 1577 | fi
|
|---|
| 1578 | test -n "$as_me" && echo "$as_me: creating $ac_dir/Makefile" || echo "creating $ac_dir/Makefile"
|
|---|
| 1579 | sed -e "/^POTFILES =/r $ac_dir/POTFILES" -e "/^# Makevars/r $ac_given_srcdir/$ac_dir/Makevars" -e "s|@POFILES@|$POFILES|g" -e "s|@GMOFILES@|$GMOFILES|g" -e "s|@UPDATEPOFILES@|$UPDATEPOFILES|g" -e "s|@DUMMYPOFILES@|$DUMMYPOFILES|g" -e "s|@CATALOGS@|$CATALOGS|g" -e "s|@POMAKEFILEDEPS@|$POMAKEFILEDEPS|g" "$ac_dir/Makefile.in" > "$ac_dir/Makefile"
|
|---|
| 1580 | for f in "$ac_given_srcdir/$ac_dir"/Rules-*; do
|
|---|
| 1581 | if test -f "$f"; then
|
|---|
| 1582 | case "$f" in
|
|---|
| 1583 | *.orig | *.bak | *~) ;;
|
|---|
| 1584 | *) cat "$f" >> "$ac_dir/Makefile" ;;
|
|---|
| 1585 | esac
|
|---|
| 1586 | fi
|
|---|
| 1587 | done
|
|---|
| 1588 | fi
|
|---|
| 1589 | ;;
|
|---|
| 1590 | esac
|
|---|
| 1591 | done],
|
|---|
| 1592 | [# Capture the value of obsolete ALL_LINGUAS because we need it to compute
|
|---|
| 1593 | # POFILES, GMOFILES, UPDATEPOFILES, DUMMYPOFILES, CATALOGS. But hide it
|
|---|
| 1594 | # from automake.
|
|---|
| 1595 | eval 'OBSOLETE_ALL_LINGUAS''="$ALL_LINGUAS"'
|
|---|
| 1596 | # Capture the value of LINGUAS because we need it to compute CATALOGS.
|
|---|
| 1597 | LINGUAS="${LINGUAS-%UNSET%}"
|
|---|
| 1598 | ])
|
|---|
| 1599 | ])
|
|---|
| 1600 |
|
|---|
| 1601 | # progtest.m4 serial 3 (gettext-0.12)
|
|---|
| 1602 | dnl Copyright (C) 1996-2003 Free Software Foundation, Inc.
|
|---|
| 1603 | dnl This file is free software, distributed under the terms of the GNU
|
|---|
| 1604 | dnl General Public License. As a special exception to the GNU General
|
|---|
| 1605 | dnl Public License, this file may be distributed as part of a program
|
|---|
| 1606 | dnl that contains a configuration script generated by Autoconf, under
|
|---|
| 1607 | dnl the same distribution terms as the rest of that program.
|
|---|
| 1608 | dnl
|
|---|
| 1609 | dnl This file can can be used in projects which are not available under
|
|---|
| 1610 | dnl the GNU General Public License or the GNU Library General Public
|
|---|
| 1611 | dnl License but which still want to provide support for the GNU gettext
|
|---|
| 1612 | dnl functionality.
|
|---|
| 1613 | dnl Please note that the actual code of the GNU gettext library is covered
|
|---|
| 1614 | dnl by the GNU Library General Public License, and the rest of the GNU
|
|---|
| 1615 | dnl gettext package package is covered by the GNU General Public License.
|
|---|
| 1616 | dnl They are *not* in the public domain.
|
|---|
| 1617 |
|
|---|
| 1618 | dnl Authors:
|
|---|
| 1619 | dnl Ulrich Drepper <drepper@cygnus.com>, 1996.
|
|---|
| 1620 |
|
|---|
| 1621 | # Search path for a program which passes the given test.
|
|---|
| 1622 |
|
|---|
| 1623 | dnl AM_PATH_PROG_WITH_TEST(VARIABLE, PROG-TO-CHECK-FOR,
|
|---|
| 1624 | dnl TEST-PERFORMED-ON-FOUND_PROGRAM [, VALUE-IF-NOT-FOUND [, PATH]])
|
|---|
| 1625 | AC_DEFUN([AM_PATH_PROG_WITH_TEST],
|
|---|
| 1626 | [
|
|---|
| 1627 | # Prepare PATH_SEPARATOR.
|
|---|
| 1628 | # The user is always right.
|
|---|
| 1629 | if test "${PATH_SEPARATOR+set}" != set; then
|
|---|
| 1630 | echo "#! /bin/sh" >conf$$.sh
|
|---|
| 1631 | echo "exit 0" >>conf$$.sh
|
|---|
| 1632 | chmod +x conf$$.sh
|
|---|
| 1633 | if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then
|
|---|
| 1634 | PATH_SEPARATOR=';'
|
|---|
| 1635 | else
|
|---|
| 1636 | PATH_SEPARATOR=:
|
|---|
| 1637 | fi
|
|---|
| 1638 | rm -f conf$$.sh
|
|---|
| 1639 | fi
|
|---|
| 1640 |
|
|---|
| 1641 | # Find out how to test for executable files. Don't use a zero-byte file,
|
|---|
| 1642 | # as systems may use methods other than mode bits to determine executability.
|
|---|
| 1643 | cat >conf$$.file <<_ASEOF
|
|---|
| 1644 | #! /bin/sh
|
|---|
| 1645 | exit 0
|
|---|
| 1646 | _ASEOF
|
|---|
| 1647 | chmod +x conf$$.file
|
|---|
| 1648 | if test -x conf$$.file >/dev/null 2>&1; then
|
|---|
| 1649 | ac_executable_p="test -x"
|
|---|
| 1650 | else
|
|---|
| 1651 | ac_executable_p="test -f"
|
|---|
| 1652 | fi
|
|---|
| 1653 | rm -f conf$$.file
|
|---|
| 1654 |
|
|---|
| 1655 | # Extract the first word of "$2", so it can be a program name with args.
|
|---|
| 1656 | set dummy $2; ac_word=[$]2
|
|---|
| 1657 | AC_MSG_CHECKING([for $ac_word])
|
|---|
| 1658 | AC_CACHE_VAL(ac_cv_path_$1,
|
|---|
| 1659 | [case "[$]$1" in
|
|---|
| 1660 | [[\\/]]* | ?:[[\\/]]*)
|
|---|
| 1661 | ac_cv_path_$1="[$]$1" # Let the user override the test with a path.
|
|---|
| 1662 | ;;
|
|---|
| 1663 | *)
|
|---|
| 1664 | ac_save_IFS="$IFS"; IFS=$PATH_SEPARATOR
|
|---|
| 1665 | for ac_dir in ifelse([$5], , $PATH, [$5]); do
|
|---|
| 1666 | IFS="$ac_save_IFS"
|
|---|
| 1667 | test -z "$ac_dir" && ac_dir=.
|
|---|
| 1668 | for ac_exec_ext in '' $ac_executable_extensions; do
|
|---|
| 1669 | if $ac_executable_p "$ac_dir/$ac_word$ac_exec_ext"; then
|
|---|
| 1670 | if [$3]; then
|
|---|
| 1671 | ac_cv_path_$1="$ac_dir/$ac_word$ac_exec_ext"
|
|---|
| 1672 | break 2
|
|---|
| 1673 | fi
|
|---|
| 1674 | fi
|
|---|
| 1675 | done
|
|---|
| 1676 | done
|
|---|
| 1677 | IFS="$ac_save_IFS"
|
|---|
| 1678 | dnl If no 4th arg is given, leave the cache variable unset,
|
|---|
| 1679 | dnl so AC_PATH_PROGS will keep looking.
|
|---|
| 1680 | ifelse([$4], , , [ test -z "[$]ac_cv_path_$1" && ac_cv_path_$1="$4"
|
|---|
| 1681 | ])dnl
|
|---|
| 1682 | ;;
|
|---|
| 1683 | esac])dnl
|
|---|
| 1684 | $1="$ac_cv_path_$1"
|
|---|
| 1685 | if test ifelse([$4], , [-n "[$]$1"], ["[$]$1" != "$4"]); then
|
|---|
| 1686 | AC_MSG_RESULT([$]$1)
|
|---|
| 1687 | else
|
|---|
| 1688 | AC_MSG_RESULT(no)
|
|---|
| 1689 | fi
|
|---|
| 1690 | AC_SUBST($1)dnl
|
|---|
| 1691 | ])
|
|---|
| 1692 |
|
|---|
| 1693 | # -*- Autoconf -*-
|
|---|
| 1694 | # Copyright (C) 2002, 2003 Free Software Foundation, Inc.
|
|---|
| 1695 | # Generated from amversion.in; do not edit by hand.
|
|---|
| 1696 |
|
|---|
| 1697 | # This program is free software; you can redistribute it and/or modify
|
|---|
| 1698 | # it under the terms of the GNU General Public License as published by
|
|---|
| 1699 | # the Free Software Foundation; either version 2, or (at your option)
|
|---|
| 1700 | # any later version.
|
|---|
| 1701 |
|
|---|
| 1702 | # This program is distributed in the hope that it will be useful,
|
|---|
| 1703 | # but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|---|
| 1704 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|---|
| 1705 | # GNU General Public License for more details.
|
|---|
| 1706 |
|
|---|
| 1707 | # You should have received a copy of the GNU General Public License
|
|---|
| 1708 | # along with this program; if not, write to the Free Software
|
|---|
| 1709 | # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
|
|---|
| 1710 |
|
|---|
| 1711 | # AM_AUTOMAKE_VERSION(VERSION)
|
|---|
| 1712 | # ----------------------------
|
|---|
| 1713 | # Automake X.Y traces this macro to ensure aclocal.m4 has been
|
|---|
| 1714 | # generated from the m4 files accompanying Automake X.Y.
|
|---|
| 1715 | AC_DEFUN([AM_AUTOMAKE_VERSION], [am__api_version="1.8"])
|
|---|
| 1716 |
|
|---|
| 1717 | # AM_SET_CURRENT_AUTOMAKE_VERSION
|
|---|
| 1718 | # -------------------------------
|
|---|
| 1719 | # Call AM_AUTOMAKE_VERSION so it can be traced.
|
|---|
| 1720 | # This function is AC_REQUIREd by AC_INIT_AUTOMAKE.
|
|---|
| 1721 | AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION],
|
|---|
| 1722 | [AM_AUTOMAKE_VERSION([1.8.3])])
|
|---|
| 1723 |
|
|---|
| 1724 | # AM_AUX_DIR_EXPAND
|
|---|
| 1725 |
|
|---|
| 1726 | # Copyright (C) 2001, 2003 Free Software Foundation, Inc.
|
|---|
| 1727 |
|
|---|
| 1728 | # This program is free software; you can redistribute it and/or modify
|
|---|
| 1729 | # it under the terms of the GNU General Public License as published by
|
|---|
| 1730 | # the Free Software Foundation; either version 2, or (at your option)
|
|---|
| 1731 | # any later version.
|
|---|
| 1732 |
|
|---|
| 1733 | # This program is distributed in the hope that it will be useful,
|
|---|
| 1734 | # but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|---|
| 1735 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|---|
| 1736 | # GNU General Public License for more details.
|
|---|
| 1737 |
|
|---|
| 1738 | # You should have received a copy of the GNU General Public License
|
|---|
| 1739 | # along with this program; if not, write to the Free Software
|
|---|
| 1740 | # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
|
|---|
| 1741 | # 02111-1307, USA.
|
|---|
| 1742 |
|
|---|
| 1743 | # For projects using AC_CONFIG_AUX_DIR([foo]), Autoconf sets
|
|---|
| 1744 | # $ac_aux_dir to `$srcdir/foo'. In other projects, it is set to
|
|---|
| 1745 | # `$srcdir', `$srcdir/..', or `$srcdir/../..'.
|
|---|
| 1746 | #
|
|---|
| 1747 | # Of course, Automake must honor this variable whenever it calls a
|
|---|
| 1748 | # tool from the auxiliary directory. The problem is that $srcdir (and
|
|---|
| 1749 | # therefore $ac_aux_dir as well) can be either absolute or relative,
|
|---|
| 1750 | # depending on how configure is run. This is pretty annoying, since
|
|---|
| 1751 | # it makes $ac_aux_dir quite unusable in subdirectories: in the top
|
|---|
| 1752 | # source directory, any form will work fine, but in subdirectories a
|
|---|
| 1753 | # relative path needs to be adjusted first.
|
|---|
| 1754 | #
|
|---|
| 1755 | # $ac_aux_dir/missing
|
|---|
| 1756 | # fails when called from a subdirectory if $ac_aux_dir is relative
|
|---|
| 1757 | # $top_srcdir/$ac_aux_dir/missing
|
|---|
| 1758 | # fails if $ac_aux_dir is absolute,
|
|---|
| 1759 | # fails when called from a subdirectory in a VPATH build with
|
|---|
| 1760 | # a relative $ac_aux_dir
|
|---|
| 1761 | #
|
|---|
| 1762 | # The reason of the latter failure is that $top_srcdir and $ac_aux_dir
|
|---|
| 1763 | # are both prefixed by $srcdir. In an in-source build this is usually
|
|---|
| 1764 | # harmless because $srcdir is `.', but things will broke when you
|
|---|
| 1765 | # start a VPATH build or use an absolute $srcdir.
|
|---|
| 1766 | #
|
|---|
| 1767 | # So we could use something similar to $top_srcdir/$ac_aux_dir/missing,
|
|---|
| 1768 | # iff we strip the leading $srcdir from $ac_aux_dir. That would be:
|
|---|
| 1769 | # am_aux_dir='\$(top_srcdir)/'`expr "$ac_aux_dir" : "$srcdir//*\(.*\)"`
|
|---|
| 1770 | # and then we would define $MISSING as
|
|---|
| 1771 | # MISSING="\${SHELL} $am_aux_dir/missing"
|
|---|
| 1772 | # This will work as long as MISSING is not called from configure, because
|
|---|
| 1773 | # unfortunately $(top_srcdir) has no meaning in configure.
|
|---|
| 1774 | # However there are other variables, like CC, which are often used in
|
|---|
| 1775 | # configure, and could therefore not use this "fixed" $ac_aux_dir.
|
|---|
| 1776 | #
|
|---|
| 1777 | # Another solution, used here, is to always expand $ac_aux_dir to an
|
|---|
| 1778 | # absolute PATH. The drawback is that using absolute paths prevent a
|
|---|
| 1779 | # configured tree to be moved without reconfiguration.
|
|---|
| 1780 |
|
|---|
| 1781 | AC_DEFUN([AM_AUX_DIR_EXPAND],
|
|---|
| 1782 | [dnl Rely on autoconf to set up CDPATH properly.
|
|---|
| 1783 | AC_PREREQ([2.50])dnl
|
|---|
| 1784 | # expand $ac_aux_dir to an absolute path
|
|---|
| 1785 | am_aux_dir=`cd $ac_aux_dir && pwd`
|
|---|
| 1786 | ])
|
|---|
| 1787 |
|
|---|
| 1788 | # AM_CONDITIONAL -*- Autoconf -*-
|
|---|
| 1789 |
|
|---|
| 1790 | # Copyright (C) 1997, 2000, 2001, 2003 Free Software Foundation, Inc.
|
|---|
| 1791 |
|
|---|
| 1792 | # This program is free software; you can redistribute it and/or modify
|
|---|
| 1793 | # it under the terms of the GNU General Public License as published by
|
|---|
| 1794 | # the Free Software Foundation; either version 2, or (at your option)
|
|---|
| 1795 | # any later version.
|
|---|
| 1796 |
|
|---|
| 1797 | # This program is distributed in the hope that it will be useful,
|
|---|
| 1798 | # but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|---|
| 1799 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|---|
| 1800 | # GNU General Public License for more details.
|
|---|
| 1801 |
|
|---|
| 1802 | # You should have received a copy of the GNU General Public License
|
|---|
| 1803 | # along with this program; if not, write to the Free Software
|
|---|
| 1804 | # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
|
|---|
| 1805 | # 02111-1307, USA.
|
|---|
| 1806 |
|
|---|
| 1807 | # serial 6
|
|---|
| 1808 |
|
|---|
| 1809 | # AM_CONDITIONAL(NAME, SHELL-CONDITION)
|
|---|
| 1810 | # -------------------------------------
|
|---|
| 1811 | # Define a conditional.
|
|---|
| 1812 | AC_DEFUN([AM_CONDITIONAL],
|
|---|
| 1813 | [AC_PREREQ(2.52)dnl
|
|---|
| 1814 | ifelse([$1], [TRUE], [AC_FATAL([$0: invalid condition: $1])],
|
|---|
| 1815 | [$1], [FALSE], [AC_FATAL([$0: invalid condition: $1])])dnl
|
|---|
| 1816 | AC_SUBST([$1_TRUE])
|
|---|
| 1817 | AC_SUBST([$1_FALSE])
|
|---|
| 1818 | if $2; then
|
|---|
| 1819 | $1_TRUE=
|
|---|
| 1820 | $1_FALSE='#'
|
|---|
| 1821 | else
|
|---|
| 1822 | $1_TRUE='#'
|
|---|
| 1823 | $1_FALSE=
|
|---|
| 1824 | fi
|
|---|
| 1825 | AC_CONFIG_COMMANDS_PRE(
|
|---|
| 1826 | [if test -z "${$1_TRUE}" && test -z "${$1_FALSE}"; then
|
|---|
| 1827 | AC_MSG_ERROR([conditional "$1" was never defined.
|
|---|
| 1828 | Usually this means the macro was only invoked conditionally.])
|
|---|
| 1829 | fi])])
|
|---|
| 1830 |
|
|---|
| 1831 | # serial 7 -*- Autoconf -*-
|
|---|
| 1832 |
|
|---|
| 1833 | # Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004
|
|---|
| 1834 | # Free Software Foundation, Inc.
|
|---|
| 1835 |
|
|---|
| 1836 | # This program is free software; you can redistribute it and/or modify
|
|---|
| 1837 | # it under the terms of the GNU General Public License as published by
|
|---|
| 1838 | # the Free Software Foundation; either version 2, or (at your option)
|
|---|
| 1839 | # any later version.
|
|---|
| 1840 |
|
|---|
| 1841 | # This program is distributed in the hope that it will be useful,
|
|---|
| 1842 | # but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|---|
| 1843 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|---|
| 1844 | # GNU General Public License for more details.
|
|---|
| 1845 |
|
|---|
| 1846 | # You should have received a copy of the GNU General Public License
|
|---|
| 1847 | # along with this program; if not, write to the Free Software
|
|---|
| 1848 | # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
|
|---|
| 1849 | # 02111-1307, USA.
|
|---|
| 1850 |
|
|---|
| 1851 |
|
|---|
| 1852 | # There are a few dirty hacks below to avoid letting `AC_PROG_CC' be
|
|---|
| 1853 | # written in clear, in which case automake, when reading aclocal.m4,
|
|---|
| 1854 | # will think it sees a *use*, and therefore will trigger all it's
|
|---|
| 1855 | # C support machinery. Also note that it means that autoscan, seeing
|
|---|
| 1856 | # CC etc. in the Makefile, will ask for an AC_PROG_CC use...
|
|---|
| 1857 |
|
|---|
| 1858 |
|
|---|
| 1859 |
|
|---|
| 1860 | # _AM_DEPENDENCIES(NAME)
|
|---|
| 1861 | # ----------------------
|
|---|
| 1862 | # See how the compiler implements dependency checking.
|
|---|
| 1863 | # NAME is "CC", "CXX", "GCJ", or "OBJC".
|
|---|
| 1864 | # We try a few techniques and use that to set a single cache variable.
|
|---|
| 1865 | #
|
|---|
| 1866 | # We don't AC_REQUIRE the corresponding AC_PROG_CC since the latter was
|
|---|
| 1867 | # modified to invoke _AM_DEPENDENCIES(CC); we would have a circular
|
|---|
| 1868 | # dependency, and given that the user is not expected to run this macro,
|
|---|
| 1869 | # just rely on AC_PROG_CC.
|
|---|
| 1870 | AC_DEFUN([_AM_DEPENDENCIES],
|
|---|
| 1871 | [AC_REQUIRE([AM_SET_DEPDIR])dnl
|
|---|
| 1872 | AC_REQUIRE([AM_OUTPUT_DEPENDENCY_COMMANDS])dnl
|
|---|
| 1873 | AC_REQUIRE([AM_MAKE_INCLUDE])dnl
|
|---|
| 1874 | AC_REQUIRE([AM_DEP_TRACK])dnl
|
|---|
| 1875 |
|
|---|
| 1876 | ifelse([$1], CC, [depcc="$CC" am_compiler_list=],
|
|---|
| 1877 | [$1], CXX, [depcc="$CXX" am_compiler_list=],
|
|---|
| 1878 | [$1], OBJC, [depcc="$OBJC" am_compiler_list='gcc3 gcc'],
|
|---|
| 1879 | [$1], GCJ, [depcc="$GCJ" am_compiler_list='gcc3 gcc'],
|
|---|
| 1880 | [depcc="$$1" am_compiler_list=])
|
|---|
| 1881 |
|
|---|
| 1882 | AC_CACHE_CHECK([dependency style of $depcc],
|
|---|
| 1883 | [am_cv_$1_dependencies_compiler_type],
|
|---|
| 1884 | [if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then
|
|---|
| 1885 | # We make a subdir and do the tests there. Otherwise we can end up
|
|---|
| 1886 | # making bogus files that we don't know about and never remove. For
|
|---|
| 1887 | # instance it was reported that on HP-UX the gcc test will end up
|
|---|
| 1888 | # making a dummy file named `D' -- because `-MD' means `put the output
|
|---|
| 1889 | # in D'.
|
|---|
| 1890 | mkdir conftest.dir
|
|---|
| 1891 | # Copy depcomp to subdir because otherwise we won't find it if we're
|
|---|
| 1892 | # using a relative directory.
|
|---|
| 1893 | cp "$am_depcomp" conftest.dir
|
|---|
| 1894 | cd conftest.dir
|
|---|
| 1895 | # We will build objects and dependencies in a subdirectory because
|
|---|
| 1896 | # it helps to detect inapplicable dependency modes. For instance
|
|---|
| 1897 | # both Tru64's cc and ICC support -MD to output dependencies as a
|
|---|
| 1898 | # side effect of compilation, but ICC will put the dependencies in
|
|---|
| 1899 | # the current directory while Tru64 will put them in the object
|
|---|
| 1900 | # directory.
|
|---|
| 1901 | mkdir sub
|
|---|
| 1902 |
|
|---|
| 1903 | am_cv_$1_dependencies_compiler_type=none
|
|---|
| 1904 | if test "$am_compiler_list" = ""; then
|
|---|
| 1905 | am_compiler_list=`sed -n ['s/^#*\([a-zA-Z0-9]*\))$/\1/p'] < ./depcomp`
|
|---|
| 1906 | fi
|
|---|
| 1907 | for depmode in $am_compiler_list; do
|
|---|
| 1908 | # Setup a source with many dependencies, because some compilers
|
|---|
| 1909 | # like to wrap large dependency lists on column 80 (with \), and
|
|---|
| 1910 | # we should not choose a depcomp mode which is confused by this.
|
|---|
| 1911 | #
|
|---|
| 1912 | # We need to recreate these files for each test, as the compiler may
|
|---|
| 1913 | # overwrite some of them when testing with obscure command lines.
|
|---|
| 1914 | # This happens at least with the AIX C compiler.
|
|---|
| 1915 | : > sub/conftest.c
|
|---|
| 1916 | for i in 1 2 3 4 5 6; do
|
|---|
| 1917 | echo '#include "conftst'$i'.h"' >> sub/conftest.c
|
|---|
| 1918 | # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with
|
|---|
| 1919 | # Solaris 8's {/usr,}/bin/sh.
|
|---|
| 1920 | touch sub/conftst$i.h
|
|---|
| 1921 | done
|
|---|
| 1922 | echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf
|
|---|
| 1923 |
|
|---|
| 1924 | case $depmode in
|
|---|
| 1925 | nosideeffect)
|
|---|
| 1926 | # after this tag, mechanisms are not by side-effect, so they'll
|
|---|
| 1927 | # only be used when explicitly requested
|
|---|
| 1928 | if test "x$enable_dependency_tracking" = xyes; then
|
|---|
| 1929 | continue
|
|---|
| 1930 | else
|
|---|
| 1931 | break
|
|---|
| 1932 | fi
|
|---|
| 1933 | ;;
|
|---|
| 1934 | none) break ;;
|
|---|
| 1935 | esac
|
|---|
| 1936 | # We check with `-c' and `-o' for the sake of the "dashmstdout"
|
|---|
| 1937 | # mode. It turns out that the SunPro C++ compiler does not properly
|
|---|
| 1938 | # handle `-M -o', and we need to detect this.
|
|---|
| 1939 | if depmode=$depmode \
|
|---|
| 1940 | source=sub/conftest.c object=sub/conftest.${OBJEXT-o} \
|
|---|
| 1941 | depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \
|
|---|
| 1942 | $SHELL ./depcomp $depcc -c -o sub/conftest.${OBJEXT-o} sub/conftest.c \
|
|---|
| 1943 | >/dev/null 2>conftest.err &&
|
|---|
| 1944 | grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 &&
|
|---|
| 1945 | grep sub/conftest.${OBJEXT-o} sub/conftest.Po > /dev/null 2>&1 &&
|
|---|
| 1946 | ${MAKE-make} -s -f confmf > /dev/null 2>&1; then
|
|---|
| 1947 | # icc doesn't choke on unknown options, it will just issue warnings
|
|---|
| 1948 | # (even with -Werror). So we grep stderr for any message
|
|---|
| 1949 | # that says an option was ignored.
|
|---|
| 1950 | if grep 'ignoring option' conftest.err >/dev/null 2>&1; then :; else
|
|---|
| 1951 | am_cv_$1_dependencies_compiler_type=$depmode
|
|---|
| 1952 | break
|
|---|
| 1953 | fi
|
|---|
| 1954 | fi
|
|---|
| 1955 | done
|
|---|
| 1956 |
|
|---|
| 1957 | cd ..
|
|---|
| 1958 | rm -rf conftest.dir
|
|---|
| 1959 | else
|
|---|
| 1960 | am_cv_$1_dependencies_compiler_type=none
|
|---|
| 1961 | fi
|
|---|
| 1962 | ])
|
|---|
| 1963 | AC_SUBST([$1DEPMODE], [depmode=$am_cv_$1_dependencies_compiler_type])
|
|---|
| 1964 | AM_CONDITIONAL([am__fastdep$1], [
|
|---|
| 1965 | test "x$enable_dependency_tracking" != xno \
|
|---|
| 1966 | && test "$am_cv_$1_dependencies_compiler_type" = gcc3])
|
|---|
| 1967 | ])
|
|---|
| 1968 |
|
|---|
| 1969 |
|
|---|
| 1970 | # AM_SET_DEPDIR
|
|---|
| 1971 | # -------------
|
|---|
| 1972 | # Choose a directory name for dependency files.
|
|---|
| 1973 | # This macro is AC_REQUIREd in _AM_DEPENDENCIES
|
|---|
| 1974 | AC_DEFUN([AM_SET_DEPDIR],
|
|---|
| 1975 | [AC_REQUIRE([AM_SET_LEADING_DOT])dnl
|
|---|
| 1976 | AC_SUBST([DEPDIR], ["${am__leading_dot}deps"])dnl
|
|---|
| 1977 | ])
|
|---|
| 1978 |
|
|---|
| 1979 |
|
|---|
| 1980 | # AM_DEP_TRACK
|
|---|
| 1981 | # ------------
|
|---|
| 1982 | AC_DEFUN([AM_DEP_TRACK],
|
|---|
| 1983 | [AC_ARG_ENABLE(dependency-tracking,
|
|---|
| 1984 | [ --disable-dependency-tracking speeds up one-time build
|
|---|
| 1985 | --enable-dependency-tracking do not reject slow dependency extractors])
|
|---|
| 1986 | if test "x$enable_dependency_tracking" != xno; then
|
|---|
| 1987 | am_depcomp="$ac_aux_dir/depcomp"
|
|---|
| 1988 | AMDEPBACKSLASH='\'
|
|---|
| 1989 | fi
|
|---|
| 1990 | AM_CONDITIONAL([AMDEP], [test "x$enable_dependency_tracking" != xno])
|
|---|
| 1991 | AC_SUBST([AMDEPBACKSLASH])
|
|---|
| 1992 | ])
|
|---|
| 1993 |
|
|---|
| 1994 | # Generate code to set up dependency tracking. -*- Autoconf -*-
|
|---|
| 1995 |
|
|---|
| 1996 | # Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004 Free Software Foundation, Inc.
|
|---|
| 1997 |
|
|---|
| 1998 | # This program is free software; you can redistribute it and/or modify
|
|---|
| 1999 | # it under the terms of the GNU General Public License as published by
|
|---|
| 2000 | # the Free Software Foundation; either version 2, or (at your option)
|
|---|
| 2001 | # any later version.
|
|---|
| 2002 |
|
|---|
| 2003 | # This program is distributed in the hope that it will be useful,
|
|---|
| 2004 | # but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|---|
| 2005 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|---|
| 2006 | # GNU General Public License for more details.
|
|---|
| 2007 |
|
|---|
| 2008 | # You should have received a copy of the GNU General Public License
|
|---|
| 2009 | # along with this program; if not, write to the Free Software
|
|---|
| 2010 | # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
|
|---|
| 2011 | # 02111-1307, USA.
|
|---|
| 2012 |
|
|---|
| 2013 | #serial 2
|
|---|
| 2014 |
|
|---|
| 2015 | # _AM_OUTPUT_DEPENDENCY_COMMANDS
|
|---|
| 2016 | # ------------------------------
|
|---|
| 2017 | AC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS],
|
|---|
| 2018 | [for mf in $CONFIG_FILES; do
|
|---|
| 2019 | # Strip MF so we end up with the name of the file.
|
|---|
| 2020 | mf=`echo "$mf" | sed -e 's/:.*$//'`
|
|---|
| 2021 | # Check whether this is an Automake generated Makefile or not.
|
|---|
| 2022 | # We used to match only the files named `Makefile.in', but
|
|---|
| 2023 | # some people rename them; so instead we look at the file content.
|
|---|
| 2024 | # Grep'ing the first line is not enough: some people post-process
|
|---|
| 2025 | # each Makefile.in and add a new line on top of each file to say so.
|
|---|
| 2026 | # So let's grep whole file.
|
|---|
| 2027 | if grep '^#.*generated by automake' $mf > /dev/null 2>&1; then
|
|---|
| 2028 | dirpart=`AS_DIRNAME("$mf")`
|
|---|
| 2029 | else
|
|---|
| 2030 | continue
|
|---|
| 2031 | fi
|
|---|
| 2032 | grep '^DEP_FILES *= *[[^ @%:@]]' < "$mf" > /dev/null || continue
|
|---|
| 2033 | # Extract the definition of DEP_FILES from the Makefile without
|
|---|
| 2034 | # running `make'.
|
|---|
| 2035 | DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"`
|
|---|
| 2036 | test -z "$DEPDIR" && continue
|
|---|
| 2037 | # When using ansi2knr, U may be empty or an underscore; expand it
|
|---|
| 2038 | U=`sed -n 's/^U = //p' < "$mf"`
|
|---|
| 2039 | test -d "$dirpart/$DEPDIR" || mkdir "$dirpart/$DEPDIR"
|
|---|
| 2040 | # We invoke sed twice because it is the simplest approach to
|
|---|
| 2041 | # changing $(DEPDIR) to its actual value in the expansion.
|
|---|
| 2042 | for file in `sed -n '
|
|---|
| 2043 | /^DEP_FILES = .*\\\\$/ {
|
|---|
| 2044 | s/^DEP_FILES = //
|
|---|
| 2045 | :loop
|
|---|
| 2046 | s/\\\\$//
|
|---|
| 2047 | p
|
|---|
| 2048 | n
|
|---|
| 2049 | /\\\\$/ b loop
|
|---|
| 2050 | p
|
|---|
| 2051 | }
|
|---|
| 2052 | /^DEP_FILES = / s/^DEP_FILES = //p' < "$mf" | \
|
|---|
| 2053 | sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do
|
|---|
| 2054 | # Make sure the directory exists.
|
|---|
| 2055 | test -f "$dirpart/$file" && continue
|
|---|
| 2056 | fdir=`AS_DIRNAME(["$file"])`
|
|---|
| 2057 | AS_MKDIR_P([$dirpart/$fdir])
|
|---|
| 2058 | # echo "creating $dirpart/$file"
|
|---|
| 2059 | echo '# dummy' > "$dirpart/$file"
|
|---|
| 2060 | done
|
|---|
| 2061 | done
|
|---|
| 2062 | ])# _AM_OUTPUT_DEPENDENCY_COMMANDS
|
|---|
| 2063 |
|
|---|
| 2064 |
|
|---|
| 2065 | # AM_OUTPUT_DEPENDENCY_COMMANDS
|
|---|
| 2066 | # -----------------------------
|
|---|
| 2067 | # This macro should only be invoked once -- use via AC_REQUIRE.
|
|---|
| 2068 | #
|
|---|
| 2069 | # This code is only required when automatic dependency tracking
|
|---|
| 2070 | # is enabled. FIXME. This creates each `.P' file that we will
|
|---|
| 2071 | # need in order to bootstrap the dependency handling code.
|
|---|
| 2072 | AC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS],
|
|---|
| 2073 | [AC_CONFIG_COMMANDS([depfiles],
|
|---|
| 2074 | [test x"$AMDEP_TRUE" != x"" || _AM_OUTPUT_DEPENDENCY_COMMANDS],
|
|---|
| 2075 | [AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"])
|
|---|
| 2076 | ])
|
|---|
| 2077 |
|
|---|
| 2078 |
|
|---|
| 2079 | # Copyright (C) 1996, 1998, 1999, 2000, 2001, 2002, 2003
|
|---|
| 2080 | # Free Software Foundation, Inc.
|
|---|
| 2081 |
|
|---|
| 2082 | # This program is free software; you can redistribute it and/or modify
|
|---|
| 2083 | # it under the terms of the GNU General Public License as published by
|
|---|
| 2084 | # the Free Software Foundation; either version 2, or (at your option)
|
|---|
| 2085 | # any later version.
|
|---|
| 2086 |
|
|---|
| 2087 | # This program is distributed in the hope that it will be useful,
|
|---|
| 2088 | # but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|---|
| 2089 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|---|
| 2090 | # GNU General Public License for more details.
|
|---|
| 2091 |
|
|---|
| 2092 | # You should have received a copy of the GNU General Public License
|
|---|
| 2093 | # along with this program; if not, write to the Free Software
|
|---|
| 2094 | # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
|
|---|
| 2095 | # 02111-1307, USA.
|
|---|
| 2096 |
|
|---|
| 2097 | # serial 2
|
|---|
| 2098 |
|
|---|
| 2099 | AC_DEFUN([AM_WITH_DMALLOC],
|
|---|
| 2100 | [AC_MSG_CHECKING([if malloc debugging is wanted])
|
|---|
| 2101 | AC_ARG_WITH(dmalloc,
|
|---|
| 2102 | [ --with-dmalloc use dmalloc, as in
|
|---|
| 2103 | http://www.dmalloc.com/dmalloc.tar.gz],
|
|---|
| 2104 | [if test "$withval" = yes; then
|
|---|
| 2105 | AC_MSG_RESULT(yes)
|
|---|
| 2106 | AC_DEFINE(WITH_DMALLOC,1,
|
|---|
| 2107 | [Define if using the dmalloc debugging malloc package])
|
|---|
| 2108 | LIBS="$LIBS -ldmalloc"
|
|---|
| 2109 | LDFLAGS="$LDFLAGS -g"
|
|---|
| 2110 | else
|
|---|
| 2111 | AC_MSG_RESULT(no)
|
|---|
| 2112 | fi], [AC_MSG_RESULT(no)])
|
|---|
| 2113 | ])
|
|---|
| 2114 |
|
|---|
| 2115 | AU_DEFUN([fp_WITH_DMALLOC], [AM_WITH_DMALLOC])
|
|---|
| 2116 |
|
|---|
| 2117 | # Do all the work for Automake. -*- Autoconf -*-
|
|---|
| 2118 |
|
|---|
| 2119 | # This macro actually does too much some checks are only needed if
|
|---|
| 2120 | # your package does certain things. But this isn't really a big deal.
|
|---|
| 2121 |
|
|---|
| 2122 | # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003
|
|---|
| 2123 | # Free Software Foundation, Inc.
|
|---|
| 2124 |
|
|---|
| 2125 | # This program is free software; you can redistribute it and/or modify
|
|---|
| 2126 | # it under the terms of the GNU General Public License as published by
|
|---|
| 2127 | # the Free Software Foundation; either version 2, or (at your option)
|
|---|
| 2128 | # any later version.
|
|---|
| 2129 |
|
|---|
| 2130 | # This program is distributed in the hope that it will be useful,
|
|---|
| 2131 | # but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|---|
| 2132 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|---|
| 2133 | # GNU General Public License for more details.
|
|---|
| 2134 |
|
|---|
| 2135 | # You should have received a copy of the GNU General Public License
|
|---|
| 2136 | # along with this program; if not, write to the Free Software
|
|---|
| 2137 | # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
|
|---|
| 2138 | # 02111-1307, USA.
|
|---|
| 2139 |
|
|---|
| 2140 | # serial 11
|
|---|
| 2141 |
|
|---|
| 2142 | # AM_INIT_AUTOMAKE(PACKAGE, VERSION, [NO-DEFINE])
|
|---|
| 2143 | # AM_INIT_AUTOMAKE([OPTIONS])
|
|---|
| 2144 | # -----------------------------------------------
|
|---|
| 2145 | # The call with PACKAGE and VERSION arguments is the old style
|
|---|
| 2146 | # call (pre autoconf-2.50), which is being phased out. PACKAGE
|
|---|
| 2147 | # and VERSION should now be passed to AC_INIT and removed from
|
|---|
| 2148 | # the call to AM_INIT_AUTOMAKE.
|
|---|
| 2149 | # We support both call styles for the transition. After
|
|---|
| 2150 | # the next Automake release, Autoconf can make the AC_INIT
|
|---|
| 2151 | # arguments mandatory, and then we can depend on a new Autoconf
|
|---|
| 2152 | # release and drop the old call support.
|
|---|
| 2153 | AC_DEFUN([AM_INIT_AUTOMAKE],
|
|---|
| 2154 | [AC_PREREQ([2.58])dnl
|
|---|
| 2155 | dnl Autoconf wants to disallow AM_ names. We explicitly allow
|
|---|
| 2156 | dnl the ones we care about.
|
|---|
| 2157 | m4_pattern_allow([^AM_[A-Z]+FLAGS$])dnl
|
|---|
| 2158 | AC_REQUIRE([AM_SET_CURRENT_AUTOMAKE_VERSION])dnl
|
|---|
| 2159 | AC_REQUIRE([AC_PROG_INSTALL])dnl
|
|---|
| 2160 | # test to see if srcdir already configured
|
|---|
| 2161 | if test "`cd $srcdir && pwd`" != "`pwd`" &&
|
|---|
| 2162 | test -f $srcdir/config.status; then
|
|---|
| 2163 | AC_MSG_ERROR([source directory already configured; run "make distclean" there first])
|
|---|
| 2164 | fi
|
|---|
| 2165 |
|
|---|
| 2166 | # test whether we have cygpath
|
|---|
| 2167 | if test -z "$CYGPATH_W"; then
|
|---|
| 2168 | if (cygpath --version) >/dev/null 2>/dev/null; then
|
|---|
| 2169 | CYGPATH_W='cygpath -w'
|
|---|
| 2170 | else
|
|---|
| 2171 | CYGPATH_W=echo
|
|---|
| 2172 | fi
|
|---|
| 2173 | fi
|
|---|
| 2174 | AC_SUBST([CYGPATH_W])
|
|---|
| 2175 |
|
|---|
| 2176 | # Define the identity of the package.
|
|---|
| 2177 | dnl Distinguish between old-style and new-style calls.
|
|---|
| 2178 | m4_ifval([$2],
|
|---|
| 2179 | [m4_ifval([$3], [_AM_SET_OPTION([no-define])])dnl
|
|---|
| 2180 | AC_SUBST([PACKAGE], [$1])dnl
|
|---|
| 2181 | AC_SUBST([VERSION], [$2])],
|
|---|
| 2182 | [_AM_SET_OPTIONS([$1])dnl
|
|---|
| 2183 | AC_SUBST([PACKAGE], ['AC_PACKAGE_TARNAME'])dnl
|
|---|
| 2184 | AC_SUBST([VERSION], ['AC_PACKAGE_VERSION'])])dnl
|
|---|
| 2185 |
|
|---|
| 2186 | _AM_IF_OPTION([no-define],,
|
|---|
| 2187 | [AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE", [Name of package])
|
|---|
| 2188 | AC_DEFINE_UNQUOTED(VERSION, "$VERSION", [Version number of package])])dnl
|
|---|
| 2189 |
|
|---|
| 2190 | # Some tools Automake needs.
|
|---|
| 2191 | AC_REQUIRE([AM_SANITY_CHECK])dnl
|
|---|
| 2192 | AC_REQUIRE([AC_ARG_PROGRAM])dnl
|
|---|
| 2193 | AM_MISSING_PROG(ACLOCAL, aclocal-${am__api_version})
|
|---|
| 2194 | AM_MISSING_PROG(AUTOCONF, autoconf)
|
|---|
| 2195 | AM_MISSING_PROG(AUTOMAKE, automake-${am__api_version})
|
|---|
| 2196 | AM_MISSING_PROG(AUTOHEADER, autoheader)
|
|---|
| 2197 | AM_MISSING_PROG(MAKEINFO, makeinfo)
|
|---|
| 2198 | AM_MISSING_PROG(AMTAR, tar)
|
|---|
| 2199 | AM_PROG_INSTALL_SH
|
|---|
| 2200 | AM_PROG_INSTALL_STRIP
|
|---|
| 2201 | AC_REQUIRE([AM_PROG_MKDIR_P])dnl
|
|---|
| 2202 | # We need awk for the "check" target. The system "awk" is bad on
|
|---|
| 2203 | # some platforms.
|
|---|
| 2204 | AC_REQUIRE([AC_PROG_AWK])dnl
|
|---|
| 2205 | AC_REQUIRE([AC_PROG_MAKE_SET])dnl
|
|---|
| 2206 | AC_REQUIRE([AM_SET_LEADING_DOT])dnl
|
|---|
| 2207 |
|
|---|
| 2208 | _AM_IF_OPTION([no-dependencies],,
|
|---|
| 2209 | [AC_PROVIDE_IFELSE([AC_PROG_CC],
|
|---|
| 2210 | [_AM_DEPENDENCIES(CC)],
|
|---|
| 2211 | [define([AC_PROG_CC],
|
|---|
| 2212 | defn([AC_PROG_CC])[_AM_DEPENDENCIES(CC)])])dnl
|
|---|
| 2213 | AC_PROVIDE_IFELSE([AC_PROG_CXX],
|
|---|
| 2214 | [_AM_DEPENDENCIES(CXX)],
|
|---|
| 2215 | [define([AC_PROG_CXX],
|
|---|
| 2216 | defn([AC_PROG_CXX])[_AM_DEPENDENCIES(CXX)])])dnl
|
|---|
| 2217 | ])
|
|---|
| 2218 | ])
|
|---|
| 2219 |
|
|---|
| 2220 |
|
|---|
| 2221 | # When config.status generates a header, we must update the stamp-h file.
|
|---|
| 2222 | # This file resides in the same directory as the config header
|
|---|
| 2223 | # that is generated. The stamp files are numbered to have different names.
|
|---|
| 2224 |
|
|---|
| 2225 | # Autoconf calls _AC_AM_CONFIG_HEADER_HOOK (when defined) in the
|
|---|
| 2226 | # loop where config.status creates the headers, so we can generate
|
|---|
| 2227 | # our stamp files there.
|
|---|
| 2228 | AC_DEFUN([_AC_AM_CONFIG_HEADER_HOOK],
|
|---|
| 2229 | [# Compute $1's index in $config_headers.
|
|---|
| 2230 | _am_stamp_count=1
|
|---|
| 2231 | for _am_header in $config_headers :; do
|
|---|
| 2232 | case $_am_header in
|
|---|
| 2233 | $1 | $1:* )
|
|---|
| 2234 | break ;;
|
|---|
| 2235 | * )
|
|---|
| 2236 | _am_stamp_count=`expr $_am_stamp_count + 1` ;;
|
|---|
| 2237 | esac
|
|---|
| 2238 | done
|
|---|
| 2239 | echo "timestamp for $1" >`AS_DIRNAME([$1])`/stamp-h[]$_am_stamp_count])
|
|---|
| 2240 |
|
|---|
| 2241 | # AM_PROG_INSTALL_SH
|
|---|
| 2242 | # ------------------
|
|---|
| 2243 | # Define $install_sh.
|
|---|
| 2244 |
|
|---|
| 2245 | # Copyright (C) 2001, 2003 Free Software Foundation, Inc.
|
|---|
| 2246 |
|
|---|
| 2247 | # This program is free software; you can redistribute it and/or modify
|
|---|
| 2248 | # it under the terms of the GNU General Public License as published by
|
|---|
| 2249 | # the Free Software Foundation; either version 2, or (at your option)
|
|---|
| 2250 | # any later version.
|
|---|
| 2251 |
|
|---|
| 2252 | # This program is distributed in the hope that it will be useful,
|
|---|
| 2253 | # but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|---|
| 2254 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|---|
| 2255 | # GNU General Public License for more details.
|
|---|
| 2256 |
|
|---|
| 2257 | # You should have received a copy of the GNU General Public License
|
|---|
| 2258 | # along with this program; if not, write to the Free Software
|
|---|
| 2259 | # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
|
|---|
| 2260 | # 02111-1307, USA.
|
|---|
| 2261 |
|
|---|
| 2262 | AC_DEFUN([AM_PROG_INSTALL_SH],
|
|---|
| 2263 | [AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
|
|---|
| 2264 | install_sh=${install_sh-"$am_aux_dir/install-sh"}
|
|---|
| 2265 | AC_SUBST(install_sh)])
|
|---|
| 2266 |
|
|---|
| 2267 | # -*- Autoconf -*-
|
|---|
| 2268 | # Copyright (C) 2003 Free Software Foundation, Inc.
|
|---|
| 2269 |
|
|---|
| 2270 | # This program is free software; you can redistribute it and/or modify
|
|---|
| 2271 | # it under the terms of the GNU General Public License as published by
|
|---|
| 2272 | # the Free Software Foundation; either version 2, or (at your option)
|
|---|
| 2273 | # any later version.
|
|---|
| 2274 |
|
|---|
| 2275 | # This program is distributed in the hope that it will be useful,
|
|---|
| 2276 | # but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|---|
| 2277 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|---|
| 2278 | # GNU General Public License for more details.
|
|---|
| 2279 |
|
|---|
| 2280 | # You should have received a copy of the GNU General Public License
|
|---|
| 2281 | # along with this program; if not, write to the Free Software
|
|---|
| 2282 | # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
|
|---|
| 2283 | # 02111-1307, USA.
|
|---|
| 2284 |
|
|---|
| 2285 | # serial 1
|
|---|
| 2286 |
|
|---|
| 2287 | # Check whether the underlying file-system supports filenames
|
|---|
| 2288 | # with a leading dot. For instance MS-DOS doesn't.
|
|---|
| 2289 | AC_DEFUN([AM_SET_LEADING_DOT],
|
|---|
| 2290 | [rm -rf .tst 2>/dev/null
|
|---|
| 2291 | mkdir .tst 2>/dev/null
|
|---|
| 2292 | if test -d .tst; then
|
|---|
| 2293 | am__leading_dot=.
|
|---|
| 2294 | else
|
|---|
| 2295 | am__leading_dot=_
|
|---|
| 2296 | fi
|
|---|
| 2297 | rmdir .tst 2>/dev/null
|
|---|
| 2298 | AC_SUBST([am__leading_dot])])
|
|---|
| 2299 |
|
|---|
| 2300 | # Check to see how 'make' treats includes. -*- Autoconf -*-
|
|---|
| 2301 |
|
|---|
| 2302 | # Copyright (C) 2001, 2002, 2003 Free Software Foundation, Inc.
|
|---|
| 2303 |
|
|---|
| 2304 | # This program is free software; you can redistribute it and/or modify
|
|---|
| 2305 | # it under the terms of the GNU General Public License as published by
|
|---|
| 2306 | # the Free Software Foundation; either version 2, or (at your option)
|
|---|
| 2307 | # any later version.
|
|---|
| 2308 |
|
|---|
| 2309 | # This program is distributed in the hope that it will be useful,
|
|---|
| 2310 | # but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|---|
| 2311 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|---|
| 2312 | # GNU General Public License for more details.
|
|---|
| 2313 |
|
|---|
| 2314 | # You should have received a copy of the GNU General Public License
|
|---|
| 2315 | # along with this program; if not, write to the Free Software
|
|---|
| 2316 | # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
|
|---|
| 2317 | # 02111-1307, USA.
|
|---|
| 2318 |
|
|---|
| 2319 | # serial 2
|
|---|
| 2320 |
|
|---|
| 2321 | # AM_MAKE_INCLUDE()
|
|---|
| 2322 | # -----------------
|
|---|
| 2323 | # Check to see how make treats includes.
|
|---|
| 2324 | AC_DEFUN([AM_MAKE_INCLUDE],
|
|---|
| 2325 | [am_make=${MAKE-make}
|
|---|
| 2326 | cat > confinc << 'END'
|
|---|
| 2327 | am__doit:
|
|---|
| 2328 | @echo done
|
|---|
| 2329 | .PHONY: am__doit
|
|---|
| 2330 | END
|
|---|
| 2331 | # If we don't find an include directive, just comment out the code.
|
|---|
| 2332 | AC_MSG_CHECKING([for style of include used by $am_make])
|
|---|
| 2333 | am__include="#"
|
|---|
| 2334 | am__quote=
|
|---|
| 2335 | _am_result=none
|
|---|
| 2336 | # First try GNU make style include.
|
|---|
| 2337 | echo "include confinc" > confmf
|
|---|
| 2338 | # We grep out `Entering directory' and `Leaving directory'
|
|---|
| 2339 | # messages which can occur if `w' ends up in MAKEFLAGS.
|
|---|
| 2340 | # In particular we don't look at `^make:' because GNU make might
|
|---|
| 2341 | # be invoked under some other name (usually "gmake"), in which
|
|---|
| 2342 | # case it prints its new name instead of `make'.
|
|---|
| 2343 | if test "`$am_make -s -f confmf 2> /dev/null | grep -v 'ing directory'`" = "done"; then
|
|---|
| 2344 | am__include=include
|
|---|
| 2345 | am__quote=
|
|---|
| 2346 | _am_result=GNU
|
|---|
| 2347 | fi
|
|---|
| 2348 | # Now try BSD make style include.
|
|---|
| 2349 | if test "$am__include" = "#"; then
|
|---|
| 2350 | echo '.include "confinc"' > confmf
|
|---|
| 2351 | if test "`$am_make -s -f confmf 2> /dev/null`" = "done"; then
|
|---|
| 2352 | am__include=.include
|
|---|
| 2353 | am__quote="\""
|
|---|
| 2354 | _am_result=BSD
|
|---|
| 2355 | fi
|
|---|
| 2356 | fi
|
|---|
| 2357 | AC_SUBST([am__include])
|
|---|
| 2358 | AC_SUBST([am__quote])
|
|---|
| 2359 | AC_MSG_RESULT([$_am_result])
|
|---|
| 2360 | rm -f confinc confmf
|
|---|
| 2361 | ])
|
|---|
| 2362 |
|
|---|
| 2363 | # serial 2
|
|---|
| 2364 |
|
|---|
| 2365 | # AM_PROG_CC_C_O
|
|---|
| 2366 | # --------------
|
|---|
| 2367 | # Like AC_PROG_CC_C_O, but changed for automake.
|
|---|
| 2368 |
|
|---|
| 2369 | # Copyright (C) 1999, 2000, 2001, 2003 Free Software Foundation, Inc.
|
|---|
| 2370 |
|
|---|
| 2371 | # This program is free software; you can redistribute it and/or modify
|
|---|
| 2372 | # it under the terms of the GNU General Public License as published by
|
|---|
| 2373 | # the Free Software Foundation; either version 2, or (at your option)
|
|---|
| 2374 | # any later version.
|
|---|
| 2375 |
|
|---|
| 2376 | # This program is distributed in the hope that it will be useful,
|
|---|
| 2377 | # but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|---|
| 2378 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|---|
| 2379 | # GNU General Public License for more details.
|
|---|
| 2380 |
|
|---|
| 2381 | # You should have received a copy of the GNU General Public License
|
|---|
| 2382 | # along with this program; if not, write to the Free Software
|
|---|
| 2383 | # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
|
|---|
| 2384 | # 02111-1307, USA.
|
|---|
| 2385 |
|
|---|
| 2386 | AC_DEFUN([AM_PROG_CC_C_O],
|
|---|
| 2387 | [AC_REQUIRE([AC_PROG_CC_C_O])dnl
|
|---|
| 2388 | AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
|
|---|
| 2389 | # FIXME: we rely on the cache variable name because
|
|---|
| 2390 | # there is no other way.
|
|---|
| 2391 | set dummy $CC
|
|---|
| 2392 | ac_cc=`echo $[2] | sed ['s/[^a-zA-Z0-9_]/_/g;s/^[0-9]/_/']`
|
|---|
| 2393 | if eval "test \"`echo '$ac_cv_prog_cc_'${ac_cc}_c_o`\" != yes"; then
|
|---|
| 2394 | # Losing compiler, so override with the script.
|
|---|
| 2395 | # FIXME: It is wrong to rewrite CC.
|
|---|
| 2396 | # But if we don't then we get into trouble of one sort or another.
|
|---|
| 2397 | # A longer-term fix would be to have automake use am__CC in this case,
|
|---|
| 2398 | # and then we could set am__CC="\$(top_srcdir)/compile \$(CC)"
|
|---|
| 2399 | CC="$am_aux_dir/compile $CC"
|
|---|
| 2400 | fi
|
|---|
| 2401 | ])
|
|---|
| 2402 |
|
|---|
| 2403 | # -*- Autoconf -*-
|
|---|
| 2404 |
|
|---|
| 2405 |
|
|---|
| 2406 | # Copyright (C) 1997, 1999, 2000, 2001, 2003 Free Software Foundation, Inc.
|
|---|
| 2407 |
|
|---|
| 2408 | # This program is free software; you can redistribute it and/or modify
|
|---|
| 2409 | # it under the terms of the GNU General Public License as published by
|
|---|
| 2410 | # the Free Software Foundation; either version 2, or (at your option)
|
|---|
| 2411 | # any later version.
|
|---|
| 2412 |
|
|---|
| 2413 | # This program is distributed in the hope that it will be useful,
|
|---|
| 2414 | # but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|---|
| 2415 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|---|
| 2416 | # GNU General Public License for more details.
|
|---|
| 2417 |
|
|---|
| 2418 | # You should have received a copy of the GNU General Public License
|
|---|
| 2419 | # along with this program; if not, write to the Free Software
|
|---|
| 2420 | # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
|
|---|
| 2421 | # 02111-1307, USA.
|
|---|
| 2422 |
|
|---|
| 2423 | # serial 3
|
|---|
| 2424 |
|
|---|
| 2425 | # AM_MISSING_PROG(NAME, PROGRAM)
|
|---|
| 2426 | # ------------------------------
|
|---|
| 2427 | AC_DEFUN([AM_MISSING_PROG],
|
|---|
| 2428 | [AC_REQUIRE([AM_MISSING_HAS_RUN])
|
|---|
| 2429 | $1=${$1-"${am_missing_run}$2"}
|
|---|
| 2430 | AC_SUBST($1)])
|
|---|
| 2431 |
|
|---|
| 2432 |
|
|---|
| 2433 | # AM_MISSING_HAS_RUN
|
|---|
| 2434 | # ------------------
|
|---|
| 2435 | # Define MISSING if not defined so far and test if it supports --run.
|
|---|
| 2436 | # If it does, set am_missing_run to use it, otherwise, to nothing.
|
|---|
| 2437 | AC_DEFUN([AM_MISSING_HAS_RUN],
|
|---|
| 2438 | [AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
|
|---|
| 2439 | test x"${MISSING+set}" = xset || MISSING="\${SHELL} $am_aux_dir/missing"
|
|---|
| 2440 | # Use eval to expand $SHELL
|
|---|
| 2441 | if eval "$MISSING --run true"; then
|
|---|
| 2442 | am_missing_run="$MISSING --run "
|
|---|
| 2443 | else
|
|---|
| 2444 | am_missing_run=
|
|---|
| 2445 | AC_MSG_WARN([`missing' script is too old or missing])
|
|---|
| 2446 | fi
|
|---|
| 2447 | ])
|
|---|
| 2448 |
|
|---|
| 2449 | # AM_PROG_MKDIR_P
|
|---|
| 2450 | # ---------------
|
|---|
| 2451 | # Check whether `mkdir -p' is supported, fallback to mkinstalldirs otherwise.
|
|---|
| 2452 |
|
|---|
| 2453 | # Copyright (C) 2003, 2004 Free Software Foundation, Inc.
|
|---|
| 2454 |
|
|---|
| 2455 | # This program is free software; you can redistribute it and/or modify
|
|---|
| 2456 | # it under the terms of the GNU General Public License as published by
|
|---|
| 2457 | # the Free Software Foundation; either version 2, or (at your option)
|
|---|
| 2458 | # any later version.
|
|---|
| 2459 |
|
|---|
| 2460 | # This program is distributed in the hope that it will be useful,
|
|---|
| 2461 | # but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|---|
| 2462 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|---|
| 2463 | # GNU General Public License for more details.
|
|---|
| 2464 |
|
|---|
| 2465 | # You should have received a copy of the GNU General Public License
|
|---|
| 2466 | # along with this program; if not, write to the Free Software
|
|---|
| 2467 | # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
|
|---|
| 2468 | # 02111-1307, USA.
|
|---|
| 2469 |
|
|---|
| 2470 | # Automake 1.8 used `mkdir -m 0755 -p --' to ensure that directories
|
|---|
| 2471 | # created by `make install' are always world readable, even if the
|
|---|
| 2472 | # installer happens to have an overly restrictive umask (e.g. 077).
|
|---|
| 2473 | # This was a mistake. There are at least two reasons why we must not
|
|---|
| 2474 | # use `-m 0755':
|
|---|
| 2475 | # - it causes special bits like SGID to be ignored,
|
|---|
| 2476 | # - it may be too restrictive (some setups expect 775 directories).
|
|---|
| 2477 | #
|
|---|
| 2478 | # Do not use -m 0755 and let people choose whatever they expect by
|
|---|
| 2479 | # setting umask.
|
|---|
| 2480 | #
|
|---|
| 2481 | # We cannot accept any implementation of `mkdir' that recognizes `-p'.
|
|---|
| 2482 | # Some implementations (such as Solaris 8's) are not thread-safe: if a
|
|---|
| 2483 | # parallel make tries to run `mkdir -p a/b' and `mkdir -p a/c'
|
|---|
| 2484 | # concurrently, both version can detect that a/ is missing, but only
|
|---|
| 2485 | # one can create it and the other will error out. Consequently we
|
|---|
| 2486 | # restrict ourselves to GNU make (using the --version option ensures
|
|---|
| 2487 | # this.)
|
|---|
| 2488 | AC_DEFUN([AM_PROG_MKDIR_P],
|
|---|
| 2489 | [if mkdir -p --version . >/dev/null 2>&1 && test ! -d ./--version; then
|
|---|
| 2490 | # Keeping the `.' argument allows $(mkdir_p) to be used without
|
|---|
| 2491 | # argument. Indeed, we sometimes output rules like
|
|---|
| 2492 | # $(mkdir_p) $(somedir)
|
|---|
| 2493 | # where $(somedir) is conditionally defined.
|
|---|
| 2494 | # (`test -n '$(somedir)' && $(mkdir_p) $(somedir)' is a more
|
|---|
| 2495 | # expensive solution, as it forces Make to start a sub-shell.)
|
|---|
| 2496 | mkdir_p='mkdir -p -- .'
|
|---|
| 2497 | else
|
|---|
| 2498 | # On NextStep and OpenStep, the `mkdir' command does not
|
|---|
| 2499 | # recognize any option. It will interpret all options as
|
|---|
| 2500 | # directories to create, and then abort because `.' already
|
|---|
| 2501 | # exists.
|
|---|
| 2502 | for d in ./-p ./--version;
|
|---|
| 2503 | do
|
|---|
| 2504 | test -d $d && rmdir $d
|
|---|
| 2505 | done
|
|---|
| 2506 | # $(mkinstalldirs) is defined by Automake if mkinstalldirs exists.
|
|---|
| 2507 | if test -f "$ac_aux_dir/mkinstalldirs"; then
|
|---|
| 2508 | mkdir_p='$(mkinstalldirs)'
|
|---|
| 2509 | else
|
|---|
| 2510 | mkdir_p='$(install_sh) -d'
|
|---|
| 2511 | fi
|
|---|
| 2512 | fi
|
|---|
| 2513 | AC_SUBST([mkdir_p])])
|
|---|
| 2514 |
|
|---|
| 2515 | # Helper functions for option handling. -*- Autoconf -*-
|
|---|
| 2516 |
|
|---|
| 2517 | # Copyright (C) 2001, 2002, 2003 Free Software Foundation, Inc.
|
|---|
| 2518 |
|
|---|
| 2519 | # This program is free software; you can redistribute it and/or modify
|
|---|
| 2520 | # it under the terms of the GNU General Public License as published by
|
|---|
| 2521 | # the Free Software Foundation; either version 2, or (at your option)
|
|---|
| 2522 | # any later version.
|
|---|
| 2523 |
|
|---|
| 2524 | # This program is distributed in the hope that it will be useful,
|
|---|
| 2525 | # but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|---|
| 2526 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|---|
| 2527 | # GNU General Public License for more details.
|
|---|
| 2528 |
|
|---|
| 2529 | # You should have received a copy of the GNU General Public License
|
|---|
| 2530 | # along with this program; if not, write to the Free Software
|
|---|
| 2531 | # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
|
|---|
| 2532 | # 02111-1307, USA.
|
|---|
| 2533 |
|
|---|
| 2534 | # serial 2
|
|---|
| 2535 |
|
|---|
| 2536 | # _AM_MANGLE_OPTION(NAME)
|
|---|
| 2537 | # -----------------------
|
|---|
| 2538 | AC_DEFUN([_AM_MANGLE_OPTION],
|
|---|
| 2539 | [[_AM_OPTION_]m4_bpatsubst($1, [[^a-zA-Z0-9_]], [_])])
|
|---|
| 2540 |
|
|---|
| 2541 | # _AM_SET_OPTION(NAME)
|
|---|
| 2542 | # ------------------------------
|
|---|
| 2543 | # Set option NAME. Presently that only means defining a flag for this option.
|
|---|
| 2544 | AC_DEFUN([_AM_SET_OPTION],
|
|---|
| 2545 | [m4_define(_AM_MANGLE_OPTION([$1]), 1)])
|
|---|
| 2546 |
|
|---|
| 2547 | # _AM_SET_OPTIONS(OPTIONS)
|
|---|
| 2548 | # ----------------------------------
|
|---|
| 2549 | # OPTIONS is a space-separated list of Automake options.
|
|---|
| 2550 | AC_DEFUN([_AM_SET_OPTIONS],
|
|---|
| 2551 | [AC_FOREACH([_AM_Option], [$1], [_AM_SET_OPTION(_AM_Option)])])
|
|---|
| 2552 |
|
|---|
| 2553 | # _AM_IF_OPTION(OPTION, IF-SET, [IF-NOT-SET])
|
|---|
| 2554 | # -------------------------------------------
|
|---|
| 2555 | # Execute IF-SET if OPTION is set, IF-NOT-SET otherwise.
|
|---|
| 2556 | AC_DEFUN([_AM_IF_OPTION],
|
|---|
| 2557 | [m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])])
|
|---|
| 2558 |
|
|---|
| 2559 |
|
|---|
| 2560 | # Copyright (C) 1996, 1997, 1998, 2000, 2001, 2002, 2003
|
|---|
| 2561 | # Free Software Foundation, Inc.
|
|---|
| 2562 |
|
|---|
| 2563 | # This program is free software; you can redistribute it and/or modify
|
|---|
| 2564 | # it under the terms of the GNU General Public License as published by
|
|---|
| 2565 | # the Free Software Foundation; either version 2, or (at your option)
|
|---|
| 2566 | # any later version.
|
|---|
| 2567 |
|
|---|
| 2568 | # This program is distributed in the hope that it will be useful,
|
|---|
| 2569 | # but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|---|
| 2570 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|---|
| 2571 | # GNU General Public License for more details.
|
|---|
| 2572 |
|
|---|
| 2573 | # You should have received a copy of the GNU General Public License
|
|---|
| 2574 | # along with this program; if not, write to the Free Software
|
|---|
| 2575 | # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
|
|---|
| 2576 | # 02111-1307, USA.
|
|---|
| 2577 |
|
|---|
| 2578 | # serial 3
|
|---|
| 2579 |
|
|---|
| 2580 | AC_DEFUN([AM_C_PROTOTYPES],
|
|---|
| 2581 | [AC_REQUIRE([AC_C_PROTOTYPES])
|
|---|
| 2582 | if test "$ac_cv_prog_cc_stdc" != no; then
|
|---|
| 2583 | U= ANSI2KNR=
|
|---|
| 2584 | else
|
|---|
| 2585 | U=_ ANSI2KNR=./ansi2knr
|
|---|
| 2586 | fi
|
|---|
| 2587 | # Ensure some checks needed by ansi2knr itself.
|
|---|
| 2588 | AC_REQUIRE([AC_HEADER_STDC])
|
|---|
| 2589 | AC_CHECK_HEADERS(string.h)
|
|---|
| 2590 | AC_SUBST(U)dnl
|
|---|
| 2591 | AC_SUBST(ANSI2KNR)dnl
|
|---|
| 2592 | ])
|
|---|
| 2593 |
|
|---|
| 2594 | AU_DEFUN([fp_C_PROTOTYPES], [AM_C_PROTOTYPES])
|
|---|
| 2595 |
|
|---|
| 2596 | #
|
|---|
| 2597 | # Check to make sure that the build environment is sane.
|
|---|
| 2598 | #
|
|---|
| 2599 |
|
|---|
| 2600 | # Copyright (C) 1996, 1997, 2000, 2001, 2003 Free Software Foundation, Inc.
|
|---|
| 2601 |
|
|---|
| 2602 | # This program is free software; you can redistribute it and/or modify
|
|---|
| 2603 | # it under the terms of the GNU General Public License as published by
|
|---|
| 2604 | # the Free Software Foundation; either version 2, or (at your option)
|
|---|
| 2605 | # any later version.
|
|---|
| 2606 |
|
|---|
| 2607 | # This program is distributed in the hope that it will be useful,
|
|---|
| 2608 | # but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|---|
| 2609 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|---|
| 2610 | # GNU General Public License for more details.
|
|---|
| 2611 |
|
|---|
| 2612 | # You should have received a copy of the GNU General Public License
|
|---|
| 2613 | # along with this program; if not, write to the Free Software
|
|---|
| 2614 | # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
|
|---|
| 2615 | # 02111-1307, USA.
|
|---|
| 2616 |
|
|---|
| 2617 | # serial 3
|
|---|
| 2618 |
|
|---|
| 2619 | # AM_SANITY_CHECK
|
|---|
| 2620 | # ---------------
|
|---|
| 2621 | AC_DEFUN([AM_SANITY_CHECK],
|
|---|
| 2622 | [AC_MSG_CHECKING([whether build environment is sane])
|
|---|
| 2623 | # Just in case
|
|---|
| 2624 | sleep 1
|
|---|
| 2625 | echo timestamp > conftest.file
|
|---|
| 2626 | # Do `set' in a subshell so we don't clobber the current shell's
|
|---|
| 2627 | # arguments. Must try -L first in case configure is actually a
|
|---|
| 2628 | # symlink; some systems play weird games with the mod time of symlinks
|
|---|
| 2629 | # (eg FreeBSD returns the mod time of the symlink's containing
|
|---|
| 2630 | # directory).
|
|---|
| 2631 | if (
|
|---|
| 2632 | set X `ls -Lt $srcdir/configure conftest.file 2> /dev/null`
|
|---|
| 2633 | if test "$[*]" = "X"; then
|
|---|
| 2634 | # -L didn't work.
|
|---|
| 2635 | set X `ls -t $srcdir/configure conftest.file`
|
|---|
| 2636 | fi
|
|---|
| 2637 | rm -f conftest.file
|
|---|
| 2638 | if test "$[*]" != "X $srcdir/configure conftest.file" \
|
|---|
| 2639 | && test "$[*]" != "X conftest.file $srcdir/configure"; then
|
|---|
| 2640 |
|
|---|
| 2641 | # If neither matched, then we have a broken ls. This can happen
|
|---|
| 2642 | # if, for instance, CONFIG_SHELL is bash and it inherits a
|
|---|
| 2643 | # broken ls alias from the environment. This has actually
|
|---|
| 2644 | # happened. Such a system could not be considered "sane".
|
|---|
| 2645 | AC_MSG_ERROR([ls -t appears to fail. Make sure there is not a broken
|
|---|
| 2646 | alias in your environment])
|
|---|
| 2647 | fi
|
|---|
| 2648 |
|
|---|
| 2649 | test "$[2]" = conftest.file
|
|---|
| 2650 | )
|
|---|
| 2651 | then
|
|---|
| 2652 | # Ok.
|
|---|
| 2653 | :
|
|---|
| 2654 | else
|
|---|
| 2655 | AC_MSG_ERROR([newly created file is older than distributed files!
|
|---|
| 2656 | Check your system clock])
|
|---|
| 2657 | fi
|
|---|
| 2658 | AC_MSG_RESULT(yes)])
|
|---|
| 2659 |
|
|---|
| 2660 | # AM_PROG_INSTALL_STRIP
|
|---|
| 2661 |
|
|---|
| 2662 | # Copyright (C) 2001, 2003 Free Software Foundation, Inc.
|
|---|
| 2663 |
|
|---|
| 2664 | # This program is free software; you can redistribute it and/or modify
|
|---|
| 2665 | # it under the terms of the GNU General Public License as published by
|
|---|
| 2666 | # the Free Software Foundation; either version 2, or (at your option)
|
|---|
| 2667 | # any later version.
|
|---|
| 2668 |
|
|---|
| 2669 | # This program is distributed in the hope that it will be useful,
|
|---|
| 2670 | # but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|---|
| 2671 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|---|
| 2672 | # GNU General Public License for more details.
|
|---|
| 2673 |
|
|---|
| 2674 | # You should have received a copy of the GNU General Public License
|
|---|
| 2675 | # along with this program; if not, write to the Free Software
|
|---|
| 2676 | # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
|
|---|
| 2677 | # 02111-1307, USA.
|
|---|
| 2678 |
|
|---|
| 2679 | # One issue with vendor `install' (even GNU) is that you can't
|
|---|
| 2680 | # specify the program used to strip binaries. This is especially
|
|---|
| 2681 | # annoying in cross-compiling environments, where the build's strip
|
|---|
| 2682 | # is unlikely to handle the host's binaries.
|
|---|
| 2683 | # Fortunately install-sh will honor a STRIPPROG variable, so we
|
|---|
| 2684 | # always use install-sh in `make install-strip', and initialize
|
|---|
| 2685 | # STRIPPROG with the value of the STRIP variable (set by the user).
|
|---|
| 2686 | AC_DEFUN([AM_PROG_INSTALL_STRIP],
|
|---|
| 2687 | [AC_REQUIRE([AM_PROG_INSTALL_SH])dnl
|
|---|
| 2688 | # Installed binaries are usually stripped using `strip' when the user
|
|---|
| 2689 | # run `make install-strip'. However `strip' might not be the right
|
|---|
| 2690 | # tool to use in cross-compilation environments, therefore Automake
|
|---|
| 2691 | # will honor the `STRIP' environment variable to overrule this program.
|
|---|
| 2692 | dnl Don't test for $cross_compiling = yes, because it might be `maybe'.
|
|---|
| 2693 | if test "$cross_compiling" != no; then
|
|---|
| 2694 | AC_CHECK_TOOL([STRIP], [strip], :)
|
|---|
| 2695 | fi
|
|---|
| 2696 | INSTALL_STRIP_PROGRAM="\${SHELL} \$(install_sh) -c -s"
|
|---|
| 2697 | AC_SUBST([INSTALL_STRIP_PROGRAM])])
|
|---|
| 2698 |
|
|---|
| 2699 | m4_include([acinclude.m4])
|
|---|