AC_ARG_WITH(included-gettext,
[ --with-included-gettext use the GNU gettext library included here],
nls_cv_force_use_gnu_gettext=$withval,
- nls_cv_force_use_gnu_gettext=no)
+ nls_cv_force_use_gnu_gettext=yes)
AC_MSG_RESULT($nls_cv_force_use_gnu_gettext)
nls_cv_use_gnu_gettext="$nls_cv_force_use_gnu_gettext"
AC_PATH_PROG(GMSGFMT, gmsgfmt, no)
if test "$GMSGFMT" = "no"; then
AM_PATH_PROG_WITH_TEST(GMSGFMT, msgfmt,
- [test -z "`$ac_dir/$ac_word -h 2>&1 | grep 'dv '`"], no)
+ [test -z "`$ac_dir/$ac_word -h 2>&1 | grep 'dv '`"], msgfmt)
+ if test "$GMSGFMT" = "msgfmt"; then
+ AC_MSG_WARN(No program for catalog building found, so disabling building them)
+ create_catalogs="no"
+ fi
fi
AM_PATH_PROG_WITH_TEST(XGETTEXT, xgettext,
[test -z "`$ac_dir/$ac_word -h 2>&1 | grep '(HELP)'`"], :)
AM_PATH_PROG_WITH_TEST(MSGFMT, msgfmt,
[test -z "`$ac_dir/$ac_word -h 2>&1 | grep 'dv '`"], msgfmt)
AC_PATH_PROG(GMSGFMT, gmsgfmt, $MSGFMT)
+ dnl If we didn't find either msgfmt or gmsgfmt, don't try to
+ dnl create a catalog.
+ if test "$MSGFMT" = "msgfmt" && test "$GMSGFMT" = "msgfmt"; then
+ AC_MSG_WARN(Neither msgfmt nor gmsgfmt found. No catalogs will be built)
+ create_catalogs="no"
+ fi
AM_PATH_PROG_WITH_TEST(XGETTEXT, xgettext,
[test -z "`$ac_dir/$ac_word -h 2>&1 | grep '(HELP)'`"], :)
AC_SUBST(MSGFMT)
fi
fi
+
+
# We need to process the po/ directory.
POSUB=po
else
AM_LC_MESSAGES
AM_WITH_NLS
- if test "x$CATOBJEXT" != "x"; then
+ if test "x$CATOBJEXT" != "x" && test "x$create_catalogs" != "xno" ; then
if test "x$ALL_LINGUAS" = "x"; then
LINGUAS=
else
AC_MSG_CHECKING(for catalogs to be installed)
- NEW_LINGUAS=
- for lang in ${LINGUAS=$ALL_LINGUAS}; do
- case "$ALL_LINGUAS" in
- *$lang*) NEW_LINGUAS="$NEW_LINGUAS $lang" ;;
- esac
- done
- LINGUAS=$NEW_LINGUAS
+ if test "x$LINGUAS" = "x"; then
+ LINGUAS=$ALL_LINGUAS
+ else
+ NEW_LINGUAS=
+ for lang in $ALL_LINGUAS; do
+ case " $LINGUAS " in
+ *" $lang "*) NEW_LINGUAS="$NEW_LINGUAS $lang" ;;
+ esac
+ done
+ LINGUAS=$NEW_LINGUAS
+ fi
AC_MSG_RESULT($LINGUAS)
fi
AC_SUBST($1)dnl
])
-# Check whether mmap can map an arbitrary page from /dev/zero, without
-# MAP_FIXED.
+# Check whether mmap can map an arbitrary page from /dev/zero or with
+# MAP_ANONYMOUS, without MAP_FIXED.
AC_DEFUN([AC_FUNC_MMAP_ANYWHERE],
[AC_CHECK_HEADERS(unistd.h)
AC_CHECK_FUNCS(getpagesize)
-AC_CACHE_CHECK(for working mmap from /dev/zero, ac_cv_func_mmap_anywhere,
+AC_CACHE_CHECK(for working mmap which provides zeroed pages anywhere,
+ ac_cv_func_mmap_anywhere,
[AC_TRY_RUN([
/* Test by Richard Henderson and Alexandre Oliva.
- Check whether mmap from /dev/zero works. */
+ Check whether mmap MAP_ANONYMOUS or mmap from /dev/zero works. */
#include <sys/types.h>
#include <fcntl.h>
#include <sys/mman.h>
+#if !defined (MAP_ANONYMOUS) && defined (MAP_ANON)
+# define MAP_ANONYMOUS MAP_ANON
+#endif
+
/* This mess was copied from the GNU getpagesize.h. */
#ifndef HAVE_GETPAGESIZE
# ifdef HAVE_UNISTD_H
char *x;
int fd, pg;
+#ifndef MAP_ANONYMOUS
fd = open("/dev/zero", O_RDWR);
if (fd < 0)
exit(1);
+#endif
pg = getpagesize();
+#ifdef MAP_ANONYMOUS
+ x = (char*)mmap(0, pg, PROT_READ|PROT_WRITE,
+ MAP_PRIVATE | MAP_ANONYMOUS, -1, 0);
+#else
x = (char*)mmap(0, pg, PROT_READ|PROT_WRITE, MAP_PRIVATE, fd, 0);
+#endif
if (x == (char *) -1)
exit(2);
ac_cv_func_mmap_anywhere=no)])
if test $ac_cv_func_mmap_anywhere = yes; then
AC_DEFINE(HAVE_MMAP_ANYWHERE, 1,
- [Define if mmap can get us zeroed pages from /dev/zero.])
+ [Define if mmap can get us zeroed pages without MAP_FIXED.])
fi
])