Force en_US locale for certain tests. --- maildrop-3.0.0/libs/maildrop/Makefile.am +++ maildrop-3.0.0/libs/maildrop/Makefile.am @@ -71,12 +71,14 @@ maildrop.lsm testsuite.txt.idn testsuite2 check-am: testsuite +if HAS_EN_US VALGRIND="`which valgrind 2>/dev/null`"; export VALGRIND; \ @SHELL@ ./testsuite >testsuite.diff || exit 1; \ sed '/^Message envelope sender/d' /dev/null + return $? +} +AC_MSG_CHECKING([for en_US.utf8]) +AM_CONDITIONAL([HAS_EN_US], [check_en_US]) +AM_COND_IF([HAS_EN_US],[AC_MSG_RESULT([yes])],[AC_MSG_RESULT([not found])]) + dnl Checks for library functions. AC_FUNC_CLOSEDIR_VOID --- maildrop-3.0.0/libs/rfc2045/Makefile.am +++ maildrop-3.0.0/libs/rfc2045/Makefile.am @@ -84,7 +84,10 @@ endif check-am: +if HAS_EN_US @SHELL@ $(srcdir)/testsuite | cmp -s - $(srcdir)/$(TESTSUITE) @SHELL@ $(srcdir)/testsuitemm | cmp -s - $(srcdir)/testsuitemm.txt @SHELL@ $(srcdir)/testrfc3676parsersuite | diff -U 3 $(srcdir)/testrfc3676parsersuite.txt - ./testrfc6533parser +endif + --- maildrop-3.0.0/libs/rfc2045/configure.ac +++ maildrop-3.0.0/libs/rfc2045/configure.ac @@ -62,6 +62,15 @@ AC_CHECK_FUNC(strncasecmp,,CFLAGS="$CFLAGS -Dstrncasecmp=strnicmp") AC_CHECK_FUNC(strcasecmp,,CFLAGS="$CFLAGS -Dstrcasecmp=stricmp") +dnl check for en_US locale +check_en_US() { + locale -a | grep en_US.utf8 > /dev/null + return $? +} +AC_MSG_CHECKING([for en_US.utf8]) +AM_CONDITIONAL([HAS_EN_US], [check_en_US]) +AM_COND_IF([HAS_EN_US],[AC_MSG_RESULT([yes])],[AC_MSG_RESULT([not found])]) + AC_ARG_WITH(package, [], package="$withval", [ package="$PACKAGE"