Commit 6908937756d23f9481916615fa54b9774ba6375b
1 parent
a7ff157e
Exists in
master
and in
1 other branch
Fixing windows builds.
Showing
3 changed files
with
32 additions
and
25 deletions
Show diff stats
client/Makefile.in
| @@ -208,8 +208,7 @@ $(BINRLS)/lib$(MODULE_NAME)@LIBEXT@: \ | @@ -208,8 +208,7 @@ $(BINRLS)/lib$(MODULE_NAME)@LIBEXT@: \ | ||
| 208 | -o $@ \ | 208 | -o $@ \ |
| 209 | $(LDFLAGS) \ | 209 | $(LDFLAGS) \ |
| 210 | $^ \ | 210 | $^ \ |
| 211 | - $(LIBS) \ | ||
| 212 | - $(GTK_LIBS) | 211 | + $(LIBS) |
| 213 | 212 | ||
| 214 | $(BINRLS)/lib$(MODULE_NAME).static.a: \ | 213 | $(BINRLS)/lib$(MODULE_NAME).static.a: \ |
| 215 | $(foreach SRC, $(basename $(MAIN_SOURCES)), $(OBJRLS)/$(SRC).o) | 214 | $(foreach SRC, $(basename $(MAIN_SOURCES)), $(OBJRLS)/$(SRC).o) |
configure.ac
| @@ -82,7 +82,7 @@ case "$host" in | @@ -82,7 +82,7 @@ case "$host" in | ||
| 82 | CFLAGS="$CFLAGS -D_WIN32_WINNT=0x0600" | 82 | CFLAGS="$CFLAGS -D_WIN32_WINNT=0x0600" |
| 83 | LIBS="$LIBS -lws2_32 -lwtsapi32 -lcomdlg32 -lkernel32" | 83 | LIBS="$LIBS -lws2_32 -lwtsapi32 -lcomdlg32 -lkernel32" |
| 84 | LDFLAGS="$LDFLAGS" | 84 | LDFLAGS="$LDFLAGS" |
| 85 | - STATIC_LDFLAGS="-static -static-libgcc -static-libstdc++" | 85 | + STATIC_LDFLAGS="-static-libgcc -static-libstdc++" |
| 86 | STATIC_LIBS="-Wl,-Bstatic,--whole-archive -lwinpthread -Wl,--no-whole-archive,-Bdynamic" | 86 | STATIC_LIBS="-Wl,-Bstatic,--whole-archive -lwinpthread -Wl,--no-whole-archive,-Bdynamic" |
| 87 | DLLEXT=".dll" | 87 | DLLEXT=".dll" |
| 88 | DLLPREFIX="" | 88 | DLLPREFIX="" |
| @@ -210,23 +210,6 @@ AC_PATH_TOOL([MSGMERGE], [msgmerge], [no]) | @@ -210,23 +210,6 @@ AC_PATH_TOOL([MSGMERGE], [msgmerge], [no]) | ||
| 210 | AC_PATH_TOOL([MSGFMT], [msgfmt], [no]) | 210 | AC_PATH_TOOL([MSGFMT], [msgfmt], [no]) |
| 211 | AC_PATH_TOOL([VALGRIND], [valgrind], [no]) | 211 | AC_PATH_TOOL([VALGRIND], [valgrind], [no]) |
| 212 | 212 | ||
| 213 | -AC_CHECK_HEADER(libintl.h, [ | ||
| 214 | - AC_DEFINE(HAVE_LIBINTL, 1) | ||
| 215 | - | ||
| 216 | - case "$host" in | ||
| 217 | - *-mingw32|*-pc-msys) | ||
| 218 | - INTL_LIBS="-lintl" | ||
| 219 | - ;; | ||
| 220 | - | ||
| 221 | - *) | ||
| 222 | - INTL_LIBS="" | ||
| 223 | - | ||
| 224 | - esac | ||
| 225 | - | ||
| 226 | -]) | ||
| 227 | - | ||
| 228 | -AC_SUBST(INTL_LIBS) | ||
| 229 | - | ||
| 230 | dnl --------------------------------------------------------------------------- | 213 | dnl --------------------------------------------------------------------------- |
| 231 | dnl Check for LIB3270 | 214 | dnl Check for LIB3270 |
| 232 | dnl --------------------------------------------------------------------------- | 215 | dnl --------------------------------------------------------------------------- |
| @@ -236,10 +219,7 @@ AC_ARG_WITH([delayed-lib3270], | @@ -236,10 +219,7 @@ AC_ARG_WITH([delayed-lib3270], | ||
| 236 | [ | 219 | [ |
| 237 | app_cv_delayed_lib3270=$withval | 220 | app_cv_delayed_lib3270=$withval |
| 238 | ],[ | 221 | ],[ |
| 239 | - app_cv_delayed_lib3270="auto" | ||
| 240 | -]) | ||
| 241 | 222 | ||
| 242 | -if test "$app_cv_delayed_lib3270" == "auto"; then | ||
| 243 | case "$host" in | 223 | case "$host" in |
| 244 | *-mingw32|*-pc-msys) | 224 | *-mingw32|*-pc-msys) |
| 245 | app_cv_delayed_lib3270="yes" | 225 | app_cv_delayed_lib3270="yes" |
| @@ -250,14 +230,38 @@ if test "$app_cv_delayed_lib3270" == "auto"; then | @@ -250,14 +230,38 @@ if test "$app_cv_delayed_lib3270" == "auto"; then | ||
| 250 | 230 | ||
| 251 | esac | 231 | esac |
| 252 | 232 | ||
| 253 | -fi | 233 | +]) |
| 254 | 234 | ||
| 255 | if test "$app_cv_delayed_lib3270" == "yes"; then | 235 | if test "$app_cv_delayed_lib3270" == "yes"; then |
| 236 | + | ||
| 256 | PKG_CHECK_MODULES( [LIB3270], [lib3270-delayed], AC_DEFINE(LIB3270_DELAYED), AC_MSG_ERROR([LIB3270 delayed module is not present.])) | 237 | PKG_CHECK_MODULES( [LIB3270], [lib3270-delayed], AC_DEFINE(LIB3270_DELAYED), AC_MSG_ERROR([LIB3270 delayed module is not present.])) |
| 238 | + AC_MSG_NOTICE([Not using libintl to avoid the dependency.]) | ||
| 239 | + | ||
| 257 | else | 240 | else |
| 258 | PKG_CHECK_MODULES( [LIB3270], [lib3270], AC_DEFINE(LIB3270_DYNAMIC), AC_MSG_ERROR([LIB3270 dynamic module is not present.])) | 241 | PKG_CHECK_MODULES( [LIB3270], [lib3270], AC_DEFINE(LIB3270_DYNAMIC), AC_MSG_ERROR([LIB3270 dynamic module is not present.])) |
| 242 | + | ||
| 243 | + # Use libintl only if using dynamic lib3270 to avoid an extra DLL dependency. | ||
| 244 | + AC_CHECK_HEADER(libintl.h, [ | ||
| 245 | + | ||
| 246 | + AC_DEFINE(HAVE_LIBINTL, 1) | ||
| 247 | + | ||
| 248 | + case "$host" in | ||
| 249 | + *-mingw32|*-pc-msys) | ||
| 250 | + INTL_LIBS="-lintl" | ||
| 251 | + ;; | ||
| 252 | + | ||
| 253 | + *) | ||
| 254 | + INTL_LIBS="" | ||
| 255 | + | ||
| 256 | + esac | ||
| 257 | + | ||
| 258 | + ]) | ||
| 259 | + | ||
| 259 | fi | 260 | fi |
| 260 | 261 | ||
| 262 | +AC_SUBST(INTL_LIBS) | ||
| 263 | + | ||
| 264 | + | ||
| 261 | AC_SUBST(LIB3270_LIBS) | 265 | AC_SUBST(LIB3270_LIBS) |
| 262 | AC_SUBST(LIB3270_CFLAGS) | 266 | AC_SUBST(LIB3270_CFLAGS) |
| 263 | 267 |
win/x86_64/mingw64-libipc3270.spec
| @@ -76,6 +76,8 @@ See more details at https://softwarepublico.gov.br/social/pw3270/ | @@ -76,6 +76,8 @@ See more details at https://softwarepublico.gov.br/social/pw3270/ | ||
| 76 | %package -n %{name}-%{_libvrs} | 76 | %package -n %{name}-%{_libvrs} |
| 77 | Summary: IPC Library for pw3270 | 77 | Summary: IPC Library for pw3270 |
| 78 | Group: Development/Libraries/C and C++ | 78 | Group: Development/Libraries/C and C++ |
| 79 | +Provides: mingw64(lib:ipc3270) | ||
| 80 | + | ||
| 79 | 81 | ||
| 80 | %description -n %{name}-%{_libvrs} | 82 | %description -n %{name}-%{_libvrs} |
| 81 | 83 | ||
| @@ -117,7 +119,8 @@ See more details at https://softwarepublico.gov.br/social/pw3270/ | @@ -117,7 +119,8 @@ See more details at https://softwarepublico.gov.br/social/pw3270/ | ||
| 117 | NOCONFIGURE=1 \ | 119 | NOCONFIGURE=1 \ |
| 118 | ./autogen.sh | 120 | ./autogen.sh |
| 119 | 121 | ||
| 120 | -%{_mingw64_configure} | 122 | +%{_mingw64_configure} \ |
| 123 | + --enable-static | ||
| 121 | 124 | ||
| 122 | %build | 125 | %build |
| 123 | make all | 126 | make all |
| @@ -153,6 +156,7 @@ rm -rf $RPM_BUILD_ROOT | @@ -153,6 +156,7 @@ rm -rf $RPM_BUILD_ROOT | ||
| 153 | %dir %{_mingw64_includedir}/lib3270/ipc | 156 | %dir %{_mingw64_includedir}/lib3270/ipc |
| 154 | %{_mingw64_includedir}/lib3270/ipc/*.h | 157 | %{_mingw64_includedir}/lib3270/ipc/*.h |
| 155 | %{_mingw64_libdir}/pkgconfig/*.pc | 158 | %{_mingw64_libdir}/pkgconfig/*.pc |
| 159 | +%{_mingw64_libdir}/*.a | ||
| 156 | 160 | ||
| 157 | %changelog | 161 | %changelog |
| 158 | 162 |