1 | dnl Process this file with autoconf to produce a configure script. |
---|
2 | AC_PREREQ(2.13) |
---|
3 | AC_REVISION($Revision: 1.1.1.2 $) |
---|
4 | AC_INIT(src/msgfmt.c) |
---|
5 | AM_INIT_AUTOMAKE(gettext, 0.10.40) |
---|
6 | RELEASE_DATE=2001-09-13 dnl in "date +%Y-%m-%d" format |
---|
7 | AM_CONFIG_HEADER(config.h) |
---|
8 | |
---|
9 | dnl Set of available languages. |
---|
10 | ALL_LINGUAS="cs da de el en@quot en@boldquot es et fr gl id it ja ko nl nn no pl pt pt_BR ru sl sv tr zh" |
---|
11 | |
---|
12 | dnl Checks for programs. |
---|
13 | AC_PROG_CC |
---|
14 | AC_PROG_INSTALL |
---|
15 | AC_PROG_YACC |
---|
16 | |
---|
17 | dnl Check for host type. |
---|
18 | AC_CANONICAL_HOST |
---|
19 | |
---|
20 | dnl Checks for UNIX variants that set DEFS, |
---|
21 | AC_ISC_POSIX |
---|
22 | |
---|
23 | dnl Checks for compiler output filename suffixes. |
---|
24 | AC_OBJEXT |
---|
25 | AC_EXEEXT |
---|
26 | |
---|
27 | dnl Check for build configuration. |
---|
28 | AM_PROG_LIBTOOL |
---|
29 | |
---|
30 | AC_DEFINE(_GNU_SOURCE, 1, [Make sure we see all GNU extensions.]) |
---|
31 | |
---|
32 | dnl Checks for libraries. |
---|
33 | |
---|
34 | dnl Checks for header files. |
---|
35 | AC_HEADER_STDC |
---|
36 | AC_CHECK_HEADERS(limits.h malloc.h string.h unistd.h values.h) |
---|
37 | |
---|
38 | dnl Checks for typedefs, structures, and compiler characteristics. |
---|
39 | AC_C_CONST |
---|
40 | AC_C_INLINE |
---|
41 | bh_C_SIGNED |
---|
42 | AC_C_BACKSLASH_A |
---|
43 | jm_AC_TYPE_UNSIGNED_LONG_LONG |
---|
44 | AC_TYPE_OFF_T |
---|
45 | AC_TYPE_SIZE_T |
---|
46 | AM_TYPE_PTRDIFF_T |
---|
47 | jm_AC_TYPE_UINTMAX_T |
---|
48 | |
---|
49 | dnl Checks for library functions. |
---|
50 | AC_FUNC_ALLOCA |
---|
51 | AC_FUNC_VPRINTF |
---|
52 | AC_CHECK_FUNCS([getcwd mblen memcpy strchr strerror uname]) |
---|
53 | AC_REPLACE_FUNCS([memmove memset stpcpy stpncpy strcspn \ |
---|
54 | strcasecmp strncasecmp strstr strtoul vasprintf]) |
---|
55 | AM_FUNC_GETLINE |
---|
56 | if test $am_cv_func_working_getline != yes; then |
---|
57 | AC_CHECK_FUNCS(getdelim) |
---|
58 | fi |
---|
59 | jm_PREREQ_MBSWIDTH |
---|
60 | |
---|
61 | AC_CHECK_FUNC(parse_printf_format, gt_cv_func_parse_printf_format=yes, |
---|
62 | gt_cv_func_parse_printf_format=no) |
---|
63 | if test $gt_cv_func_parse_printf_format = yes; then |
---|
64 | AC_DEFINE(HAVE_PARSE_PRINTF_FORMAT, 1, |
---|
65 | [Define if you have the parse_printf_format() function.]) |
---|
66 | else |
---|
67 | LIBOBJS="$LIBOBJS printf-prs.o" |
---|
68 | fi |
---|
69 | |
---|
70 | AM_FUNC_ERROR_AT_LINE |
---|
71 | |
---|
72 | gt_SETLOCALE |
---|
73 | |
---|
74 | dnl These are the only lines required to internationalize the package. |
---|
75 | dnl (OK, not quite, the AC_OUTPUT has also some parts.) |
---|
76 | AM_GNU_GETTEXT(use-libtool, need-ngettext) |
---|
77 | |
---|
78 | dnl Check for Emacs and where to install .elc files. |
---|
79 | AM_PATH_LISPDIR |
---|
80 | |
---|
81 | dnl The gettextize script test for the version of the aclocal.m4 file in |
---|
82 | dnl user's project. This must correspond to the number the aclocal.m4 |
---|
83 | dnl here has. Extract it. |
---|
84 | changequote(,)dnl |
---|
85 | ACLOCAL_VERSION=`sed -e 's/.*Last updated for gettext-\([0-9][0-9]*\.[0-9][0-9]*\.[0-9][0-9]*\).*/\1/p' -e d $srcdir/aclocal.m4` |
---|
86 | changequote([, ])dnl |
---|
87 | AC_SUBST(ACLOCAL_VERSION) |
---|
88 | |
---|
89 | aclocaldir='${datadir}/aclocal' |
---|
90 | AC_SUBST(aclocaldir) |
---|
91 | |
---|
92 | dnl Check for tools needed for formatting the documentation. |
---|
93 | ac_aux_dir_abs=`cd $ac_aux_dir && pwd` |
---|
94 | AC_PATH_PROG(DVIPS, dvips, $ac_aux_dir_abs/missing dvips) |
---|
95 | AC_PATH_PROG(TEXI2PDF, texi2pdf, $ac_aux_dir_abs/missing texi2pdf) |
---|
96 | AC_PATH_PROG(TEXI2HTML, texi2html, $ac_aux_dir_abs/missing texi2html) |
---|
97 | |
---|
98 | dnl Generate the version information file in the intl/ directory. |
---|
99 | test -d intl || mkdir intl |
---|
100 | echo "GNU gettext library from $PACKAGE-$VERSION" > intl/VERSION |
---|
101 | cat > intl/ChangeLog.inst <<EOF |
---|
102 | $RELEASE_DATE GNU <bug-gnu-utils@gnu.org> |
---|
103 | |
---|
104 | * Version $VERSION released. |
---|
105 | |
---|
106 | EOF |
---|
107 | |
---|
108 | AC_OUTPUT([Makefile lib/Makefile intl/Makefile src/Makefile po/Makefile.in \ |
---|
109 | doc/Makefile man/Makefile tests/Makefile m4/Makefile \ |
---|
110 | misc/Makefile misc/gettextize], [ |
---|
111 | dnl Workaround an automake-1.4 bug which generates a distclean-recursive |
---|
112 | dnl target in Makefile.in which causes a "make distclean" failure on FreeBSD. |
---|
113 | changequote(,)dnl |
---|
114 | sed -e 's/test \([^ ]*\) = \([^ ]*\) \&\& /test \1 != \2 \|\| /' < Makefile \ |
---|
115 | > Makefile.tmp |
---|
116 | changequote([, ])dnl |
---|
117 | mv Makefile.tmp Makefile |
---|
118 | dnl Workaround an automake-1.4 bug which generates an incorrect uninstall |
---|
119 | dnl target in misc/Makefile.in. |
---|
120 | sed -e 's/rm -f \$(lispdir)/rm -f \$(DESTDIR)\$(lispdir)/' < misc/Makefile \ |
---|
121 | > misc/Makefile.tmp |
---|
122 | mv misc/Makefile.tmp misc/Makefile |
---|
123 | dnl Workaround another automake-1.4 bug which generates incorrect install |
---|
124 | dnl and uninstall targets in misc/Makefile.in. |
---|
125 | sed -e "s/list='\\\$(lisp_LISP)'; for/list='\$(lisp_LISP)'; test '\$(EMACS)' = no || for/" \ |
---|
126 | < misc/Makefile > misc/Makefile.tmp |
---|
127 | mv misc/Makefile.tmp misc/Makefile |
---|
128 | dnl Workaround another automake-1.4 bug which forgets to add $(EXEEXT) |
---|
129 | dnl suffixes to elements of EXTRA_PROGRAMS. It does correctly add the suffix |
---|
130 | dnl to the elements of bin_PROGRAMS. |
---|
131 | changequote(,)dnl |
---|
132 | sed -e '/^EXTRA_PROGRAMS = /{' -e 's/\([a-z0-9_]\)\( \)/\1\$(EXEEXT)\2/g' -e 's/\([a-z0-9_]\)$/\1\$(EXEEXT)/g' -e '}' \ |
---|
133 | < tests/Makefile > tests/Makefile.tmp |
---|
134 | changequote([, ])dnl |
---|
135 | mv tests/Makefile.tmp tests/Makefile |
---|
136 | ]) |
---|