Commit | Line | Data |
---|---|---|
bf070c84 | 1 | AC_INIT |
d0ac1c44 | 2 | AC_USE_SYSTEM_EXTENSIONS |
bf070c84 SE |
3 | AC_CONFIG_SRCDIR(gettext.c) |
4 | AC_CONFIG_HEADER(config.h) | |
5 | AC_CONFIG_MACRO_DIR(../config) | |
6 | AM_GNU_GETTEXT_VERSION(0.12.1) | |
f3ce9b3a | 7 | AM_GNU_GETTEXT([], [need-ngettext]) |
bf070c84 SE |
8 | |
9 | # This replaces the extensive use of DEFS in the original Makefile.in. | |
10 | AC_DEFINE(IN_LIBINTL, 1, [Define because this is libintl.]) | |
11 | AC_DEFINE(IN_LIBRARY, 1, [Define because this is a library.]) | |
12 | AC_DEFINE(DEPENDS_ON_LIBICONV, 1, [Define because we depend on libiconv.]) | |
13 | AC_DEFINE(ENABLE_RELOCATABLE, 1, [Define to enable relocation.]) | |
14 | AC_DEFINE(NO_XMALLOC, 1, [Define if there is no xmalloc.]) | |
15 | AC_DEFINE(set_relocation_prefix, libintl_set_relocation_prefix, | |
16 | [Define this entry point correctly.]) | |
17 | AC_DEFINE(relocate, libintl_relocate, | |
18 | [Define this entry point correctly.]) | |
19 | ||
20 | MISSING=`cd $ac_aux_dir && ${PWDCMD-pwd}`/missing | |
21 | AC_CHECK_PROGS([ACLOCAL], [aclocal], [$MISSING aclocal]) | |
22 | AC_CHECK_PROGS([AUTOCONF], [autoconf], [$MISSING autoconf]) | |
23 | AC_CHECK_PROGS([AUTOHEADER], [autoheader], [$MISSING autoheader]) | |
24 | ||
25 | AC_ARG_ENABLE(maintainer-mode, | |
26 | [ --enable-maintainer-mode enable rules only needed by maintainers],, | |
27 | enable_maintainer_mode=no) | |
28 | if test "x$enable_maintainer_mode" = xno; then | |
29 | MAINT='#' | |
30 | else | |
31 | MAINT= | |
32 | fi | |
33 | AC_SUBST(MAINT) | |
34 | ||
35 | # Additional info for config.intl. | |
36 | AC_SUBST(LIBINTL_DEP) | |
37 | AC_SUBST(INCINTL) | |
38 | ||
39 | LIBINTL_DEP= | |
40 | INCINTL= | |
41 | case $USE_INCLUDED_LIBINTL in | |
42 | yes) | |
aee224d6 | 43 | LIBINTL=`echo $LIBINTL | sed 's,${top_builddir},-L&/..,; s,\.\./intl/libintl\.a,../intl -lintl,' ` |
bf070c84 SE |
44 | LIBINTL_DEP='${top_builddir}/../intl/libintl.a' |
45 | INCINTL='-I${top_builddir}/../intl' | |
46 | ;; | |
47 | esac | |
48 | ||
53d4244e NA |
49 | # intl is sometimes linked into shared libraries even without --enable-shared |
50 | # (e.g. gdbsupport's inprocess agent): so always PICify, just in case. | |
51 | GCC_PICFLAG | |
52 | AC_SUBST(PICFLAG) | |
53 | ||
830c5a1f JJ |
54 | BISON3_YES='#' |
55 | BISON3_NO= | |
56 | if test "$INTLBISON" != :; then | |
57 | ac_bison3=no | |
58 | AC_MSG_CHECKING([bison 3 or later]) | |
59 | changequote(<<,>>)dnl | |
60 | ac_prog_version=`$INTLBISON --version 2>&1 | sed -n 's/^.*GNU Bison.* \([0-9]*\.[0-9.]*\).*$/\1/p'` | |
61 | case $ac_prog_version in | |
62 | [3-9].*) | |
63 | changequote([,])dnl | |
64 | ac_prog_version="$ac_prog_version, bison3"; ac_bison3=yes;; | |
65 | *) ac_prog_version="$ac_prog_version, old";; | |
66 | esac | |
67 | AC_MSG_RESULT([$ac_prog_version]) | |
68 | if test $ac_bison3 = yes; then | |
830c5a1f JJ |
69 | BISON3_YES= |
70 | BISON3_NO='#' | |
71 | fi | |
72 | fi | |
73 | AC_SUBST(BISON3_YES) | |
74 | AC_SUBST(BISON3_NO) | |
75 | ||
bf070c84 SE |
76 | AC_CONFIG_FILES(Makefile config.intl) |
77 | AC_OUTPUT |