Move gettext macros earlier, so the right include directory is used when checking for libintl.h, and add the relevant options to LDFLAGS.

This commit is contained in:
Andrew Wood
2023-08-28 20:28:41 +01:00
parent 4c71e96cba
commit 2cd74c7ff7
+6 -4
View File
@@ -16,6 +16,12 @@ AC_USE_SYSTEM_EXTENSIONS
AC_C_CONST
AC_HEADER_STDBOOL
AC_SYS_LARGEFILE
AM_GNU_GETTEXT_VERSION([0.21])
AM_GNU_GETTEXT([external])
if test "$USE_NLS" = "yes"; then
CPPFLAGS="$CPPFLAGS -DLOCALEDIR=\\\"\$(localedir)\\\""
LDFLAGS="$LDFLAGS $LIBINTL"
fi
AC_CHECK_FUNCS([getopt_long])
AC_CHECK_HEADERS([getopt.h])
AC_CHECK_FUNCS([memcpy basename vsnprintf strlcat])
@@ -29,10 +35,6 @@ AC_CHECK_HEADERS([sys/ioctl.h])
AC_CHECK_HEADERS([libintl.h locale.h])
AH_BOTTOM([#include "config-aux.h"])
AM_GNU_GETTEXT_VERSION([0.21])
AM_GNU_GETTEXT([external])
CPPFLAGS="$CPPFLAGS -DLOCALEDIR=\\\"\$(localedir)\\\""
AC_ARG_ENABLE([debugging],
[ --enable-debugging compile with debugging support],
if test "$enable_debugging" = "yes"; then