diff --git a/client/Makefile.in b/client/Makefile.in index bd9aa92..2bb870b 100644 --- a/client/Makefile.in +++ b/client/Makefile.in @@ -208,8 +208,7 @@ $(BINRLS)/lib$(MODULE_NAME)@LIBEXT@: \ -o $@ \ $(LDFLAGS) \ $^ \ - $(LIBS) \ - $(GTK_LIBS) + $(LIBS) $(BINRLS)/lib$(MODULE_NAME).static.a: \ $(foreach SRC, $(basename $(MAIN_SOURCES)), $(OBJRLS)/$(SRC).o) diff --git a/configure.ac b/configure.ac index d8fcfcb..4c54e3f 100644 --- a/configure.ac +++ b/configure.ac @@ -82,7 +82,7 @@ case "$host" in CFLAGS="$CFLAGS -D_WIN32_WINNT=0x0600" LIBS="$LIBS -lws2_32 -lwtsapi32 -lcomdlg32 -lkernel32" LDFLAGS="$LDFLAGS" - STATIC_LDFLAGS="-static -static-libgcc -static-libstdc++" + STATIC_LDFLAGS="-static-libgcc -static-libstdc++" STATIC_LIBS="-Wl,-Bstatic,--whole-archive -lwinpthread -Wl,--no-whole-archive,-Bdynamic" DLLEXT=".dll" DLLPREFIX="" @@ -210,23 +210,6 @@ AC_PATH_TOOL([MSGMERGE], [msgmerge], [no]) AC_PATH_TOOL([MSGFMT], [msgfmt], [no]) AC_PATH_TOOL([VALGRIND], [valgrind], [no]) -AC_CHECK_HEADER(libintl.h, [ - AC_DEFINE(HAVE_LIBINTL, 1) - - case "$host" in - *-mingw32|*-pc-msys) - INTL_LIBS="-lintl" - ;; - - *) - INTL_LIBS="" - - esac - -]) - -AC_SUBST(INTL_LIBS) - dnl --------------------------------------------------------------------------- dnl Check for LIB3270 dnl --------------------------------------------------------------------------- @@ -236,10 +219,7 @@ AC_ARG_WITH([delayed-lib3270], [ app_cv_delayed_lib3270=$withval ],[ - app_cv_delayed_lib3270="auto" -]) -if test "$app_cv_delayed_lib3270" == "auto"; then case "$host" in *-mingw32|*-pc-msys) app_cv_delayed_lib3270="yes" @@ -250,14 +230,38 @@ if test "$app_cv_delayed_lib3270" == "auto"; then esac -fi +]) if test "$app_cv_delayed_lib3270" == "yes"; then + PKG_CHECK_MODULES( [LIB3270], [lib3270-delayed], AC_DEFINE(LIB3270_DELAYED), AC_MSG_ERROR([LIB3270 delayed module is not present.])) + AC_MSG_NOTICE([Not using libintl to avoid the dependency.]) + else PKG_CHECK_MODULES( [LIB3270], [lib3270], AC_DEFINE(LIB3270_DYNAMIC), AC_MSG_ERROR([LIB3270 dynamic module is not present.])) + + # Use libintl only if using dynamic lib3270 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(LIB3270_LIBS) AC_SUBST(LIB3270_CFLAGS) diff --git a/win/x86_64/mingw64-libipc3270.spec b/win/x86_64/mingw64-libipc3270.spec index a133b43..fa4b8d1 100644 --- a/win/x86_64/mingw64-libipc3270.spec +++ b/win/x86_64/mingw64-libipc3270.spec @@ -76,6 +76,8 @@ See more details at https://softwarepublico.gov.br/social/pw3270/ %package -n %{name}-%{_libvrs} Summary: IPC Library for pw3270 Group: Development/Libraries/C and C++ +Provides: mingw64(lib:ipc3270) + %description -n %{name}-%{_libvrs} @@ -117,7 +119,8 @@ See more details at https://softwarepublico.gov.br/social/pw3270/ NOCONFIGURE=1 \ ./autogen.sh -%{_mingw64_configure} +%{_mingw64_configure} \ + --enable-static %build make all @@ -153,6 +156,7 @@ rm -rf $RPM_BUILD_ROOT %dir %{_mingw64_includedir}/lib3270/ipc %{_mingw64_includedir}/lib3270/ipc/*.h %{_mingw64_libdir}/pkgconfig/*.pc +%{_mingw64_libdir}/*.a %changelog -- libgit2 0.21.2