diff options
Diffstat (limited to 'configure.ac')
| -rw-r--r-- | configure.ac | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/configure.ac b/configure.ac index 165149db..0266a364 100644 --- a/configure.ac +++ b/configure.ac @@ -431,6 +431,31 @@ CFLAGS="$old_CFLAGS"]) AM_CONDITIONAL(HAVE_IMPLICIT_FALLTHROUGH_WARNING, [test "x$ac_cv_implicit_fallthrough" != "xno"]) +dnl Check if gettext is available form libc +AC_LINK_IFELSE( + [AC_LANG_PROGRAM( + [#include <libintl.h>], + [dgettext("foo", "bar"); return 0;] + )], + [libc_has_gettext="true"], + [libc_has_gettext="false"] +) + +dnl If our libc doesn't provide gettext, then test for libintl +if test "$libc_has_gettext" = "false" ; then + AC_MSG_WARN("libc does not have gettext") + AC_CHECK_LIB([intl], [dgettext], [have_intl="true"], [have_intl="false"], [-liconv]) + + if test "$have_intl" = "false"; then + AC_MSG_ERROR("no libintl found") + else + intl_LDADD="-lintl -liconv" + fi +else + intl_LDADD="" +fi +AC_SUBST([intl_LDADD]) + dnl Check if we have <linux/bpf.h> for EM_BPF disassembly. AC_CHECK_HEADERS(linux/bpf.h) AM_CONDITIONAL(HAVE_LINUX_BPF_H, [test "x$ac_cv_header_linux_bpf_h" = "xyes"]) |
