diff --git a/configure.ac b/configure.ac index c7fee50..e9a227e 100644 --- a/configure.ac +++ b/configure.ac @@ -255,10 +255,31 @@ fi if test "$app_cv_static_ipc3270" == "yes"; then PKG_CHECK_MODULES( [IPC3270], [ipc3270-static], AC_DEFINE(USING_STATIC_IPC3270), AC_MSG_ERROR([IPC3270 static not present.])) + AC_MSG_NOTICE([Not using libintl to avoid the dependency.]) else PKG_CHECK_MODULES( [IPC3270], [ipc3270], AC_DEFINE(USING_DYNAMIC_IPC3270), AC_MSG_ERROR([IPC3270 not present.])) + + # Use libintl only if using dynamic ipc3270 to avoid an extra DLL dependency. + AC_CHECK_HEADER(libintl.h, [ + + AC_DEFINE(HAVE_LIBINTL, 1) + + case "$host" in + *-mingw32|*-pc-msys) + INTL_LIBS="-lintl" + ;; + + *) + INTL_LIBS="" + + esac + + ]) + fi +AC_SUBST(INTL_LIBS) + AC_SUBST(IPC3270_LIBS) AC_SUBST(IPC3270_CFLAGS) @@ -267,24 +288,6 @@ AC_DEFINE_UNQUOTED(PRODUCT_NAME, $app_cv_product) AC_SUBST(PRODUCT_NAME,$app_cv_product) dnl --------------------------------------------------------------------------- -dnl Check for LIBINTL -dnl --------------------------------------------------------------------------- - -AC_CHECK_HEADER(libintl.h, [ - - AC_DEFINE(HAVE_LIBINTL, 1) - -# case "$host" in -# *-mingw32|*-pc-msys) -# LIBS="$LIBS -lintl" -# ;; -# -# *) -# esac - -]) - -dnl --------------------------------------------------------------------------- dnl Check for pic dnl --------------------------------------------------------------------------- -- libgit2 0.21.2