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 | 208 | -o $@ \ |
209 | 209 | $(LDFLAGS) \ |
210 | 210 | $^ \ |
211 | - $(LIBS) \ | |
212 | - $(GTK_LIBS) | |
211 | + $(LIBS) | |
213 | 212 | |
214 | 213 | $(BINRLS)/lib$(MODULE_NAME).static.a: \ |
215 | 214 | $(foreach SRC, $(basename $(MAIN_SOURCES)), $(OBJRLS)/$(SRC).o) | ... | ... |
configure.ac
... | ... | @@ -82,7 +82,7 @@ case "$host" in |
82 | 82 | CFLAGS="$CFLAGS -D_WIN32_WINNT=0x0600" |
83 | 83 | LIBS="$LIBS -lws2_32 -lwtsapi32 -lcomdlg32 -lkernel32" |
84 | 84 | LDFLAGS="$LDFLAGS" |
85 | - STATIC_LDFLAGS="-static -static-libgcc -static-libstdc++" | |
85 | + STATIC_LDFLAGS="-static-libgcc -static-libstdc++" | |
86 | 86 | STATIC_LIBS="-Wl,-Bstatic,--whole-archive -lwinpthread -Wl,--no-whole-archive,-Bdynamic" |
87 | 87 | DLLEXT=".dll" |
88 | 88 | DLLPREFIX="" |
... | ... | @@ -210,23 +210,6 @@ AC_PATH_TOOL([MSGMERGE], [msgmerge], [no]) |
210 | 210 | AC_PATH_TOOL([MSGFMT], [msgfmt], [no]) |
211 | 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 | 213 | dnl --------------------------------------------------------------------------- |
231 | 214 | dnl Check for LIB3270 |
232 | 215 | dnl --------------------------------------------------------------------------- |
... | ... | @@ -236,10 +219,7 @@ AC_ARG_WITH([delayed-lib3270], |
236 | 219 | [ |
237 | 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 | 223 | case "$host" in |
244 | 224 | *-mingw32|*-pc-msys) |
245 | 225 | app_cv_delayed_lib3270="yes" |
... | ... | @@ -250,14 +230,38 @@ if test "$app_cv_delayed_lib3270" == "auto"; then |
250 | 230 | |
251 | 231 | esac |
252 | 232 | |
253 | -fi | |
233 | +]) | |
254 | 234 | |
255 | 235 | if test "$app_cv_delayed_lib3270" == "yes"; then |
236 | + | |
256 | 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 | 240 | else |
258 | 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 | 260 | fi |
260 | 261 | |
262 | +AC_SUBST(INTL_LIBS) | |
263 | + | |
264 | + | |
261 | 265 | AC_SUBST(LIB3270_LIBS) |
262 | 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 | 76 | %package -n %{name}-%{_libvrs} |
77 | 77 | Summary: IPC Library for pw3270 |
78 | 78 | Group: Development/Libraries/C and C++ |
79 | +Provides: mingw64(lib:ipc3270) | |
80 | + | |
79 | 81 | |
80 | 82 | %description -n %{name}-%{_libvrs} |
81 | 83 | |
... | ... | @@ -117,7 +119,8 @@ See more details at https://softwarepublico.gov.br/social/pw3270/ |
117 | 119 | NOCONFIGURE=1 \ |
118 | 120 | ./autogen.sh |
119 | 121 | |
120 | -%{_mingw64_configure} | |
122 | +%{_mingw64_configure} \ | |
123 | + --enable-static | |
121 | 124 | |
122 | 125 | %build |
123 | 126 | make all |
... | ... | @@ -153,6 +156,7 @@ rm -rf $RPM_BUILD_ROOT |
153 | 156 | %dir %{_mingw64_includedir}/lib3270/ipc |
154 | 157 | %{_mingw64_includedir}/lib3270/ipc/*.h |
155 | 158 | %{_mingw64_libdir}/pkgconfig/*.pc |
159 | +%{_mingw64_libdir}/*.a | |
156 | 160 | |
157 | 161 | %changelog |
158 | 162 | ... | ... |