Commit 7df5df74ce10306b638ad5a494bd283c51e1c852
1 parent
134a83c0
Exists in
master
and in
1 other branch
Avoiding libintl dependency to preventing load errors on windows.
Showing
1 changed file
with
21 additions
and
18 deletions
Show diff stats
configure.ac
... | ... | @@ -255,10 +255,31 @@ fi |
255 | 255 | |
256 | 256 | if test "$app_cv_static_ipc3270" == "yes"; then |
257 | 257 | PKG_CHECK_MODULES( [IPC3270], [ipc3270-static], AC_DEFINE(USING_STATIC_IPC3270), AC_MSG_ERROR([IPC3270 static not present.])) |
258 | + AC_MSG_NOTICE([Not using libintl to avoid the dependency.]) | |
258 | 259 | else |
259 | 260 | PKG_CHECK_MODULES( [IPC3270], [ipc3270], AC_DEFINE(USING_DYNAMIC_IPC3270), AC_MSG_ERROR([IPC3270 not present.])) |
261 | + | |
262 | + # Use libintl only if using dynamic ipc3270 to avoid an extra DLL dependency. | |
263 | + AC_CHECK_HEADER(libintl.h, [ | |
264 | + | |
265 | + AC_DEFINE(HAVE_LIBINTL, 1) | |
266 | + | |
267 | + case "$host" in | |
268 | + *-mingw32|*-pc-msys) | |
269 | + INTL_LIBS="-lintl" | |
270 | + ;; | |
271 | + | |
272 | + *) | |
273 | + INTL_LIBS="" | |
274 | + | |
275 | + esac | |
276 | + | |
277 | + ]) | |
278 | + | |
260 | 279 | fi |
261 | 280 | |
281 | +AC_SUBST(INTL_LIBS) | |
282 | + | |
262 | 283 | AC_SUBST(IPC3270_LIBS) |
263 | 284 | AC_SUBST(IPC3270_CFLAGS) |
264 | 285 | |
... | ... | @@ -267,24 +288,6 @@ AC_DEFINE_UNQUOTED(PRODUCT_NAME, $app_cv_product) |
267 | 288 | AC_SUBST(PRODUCT_NAME,$app_cv_product) |
268 | 289 | |
269 | 290 | dnl --------------------------------------------------------------------------- |
270 | -dnl Check for LIBINTL | |
271 | -dnl --------------------------------------------------------------------------- | |
272 | - | |
273 | -AC_CHECK_HEADER(libintl.h, [ | |
274 | - | |
275 | - AC_DEFINE(HAVE_LIBINTL, 1) | |
276 | - | |
277 | -# case "$host" in | |
278 | -# *-mingw32|*-pc-msys) | |
279 | -# LIBS="$LIBS -lintl" | |
280 | -# ;; | |
281 | -# | |
282 | -# *) | |
283 | -# esac | |
284 | - | |
285 | -]) | |
286 | - | |
287 | -dnl --------------------------------------------------------------------------- | |
288 | 291 | dnl Check for pic |
289 | 292 | dnl --------------------------------------------------------------------------- |
290 | 293 | ... | ... |