Commit b72c2222b90df5d077d2e128e99e801145f52f45
1 parent
a1359805
Exists in
master
and in
1 other branch
WIN32 Static build should include libwinpthread to avoid unnecessary dll
dependencies on windows.
Showing
3 changed files
with
8 additions
and
3 deletions
Show diff stats
client/Makefile.in
... | ... | @@ -105,9 +105,12 @@ CFLAGS= \ |
105 | 105 | @LIB3270_CFLAGS@ \ |
106 | 106 | @DBUS_CFLAGS@ |
107 | 107 | |
108 | -LDFLAGS=@STATIC_LDFLAGS@ @LDFLAGS@ | |
108 | +LDFLAGS=\ | |
109 | + @STATIC_LDFLAGS@ \ | |
110 | + @LDFLAGS@ | |
109 | 111 | |
110 | 112 | LIBS= \ |
113 | + @STATIC_LIBS@ \ | |
111 | 114 | @LIBS@ \ |
112 | 115 | @LIBICONV@ \ |
113 | 116 | @INTL_LIBS@ \ | ... | ... |
client/sdk/ipc3270-static.pc.in
... | ... | @@ -8,7 +8,7 @@ product_name=@PRODUCT_NAME@ |
8 | 8 | Name: @PACKAGE_NAME@-static |
9 | 9 | Description: @PACKAGE_DESCRIPTION@ (static library) |
10 | 10 | Version: @PACKAGE_VERSION@ |
11 | -Libs: -lipc3270.static @LIB3270_LIBS@ @DBUS_LIBS@ @LIBS@ @LIBICONV@ @INTL_LIBS@ | |
11 | +Libs: -lipc3270.static @LIB3270_LIBS@ @STATIC_LIBS@ @DBUS_LIBS@ @LIBS@ @LIBICONV@ @INTL_LIBS@ | |
12 | 12 | Cflags: -I@includedir@ |
13 | 13 | |
14 | 14 | ... | ... |
configure.ac
... | ... | @@ -67,9 +67,9 @@ APP_RESOURCES="" |
67 | 67 | APP_LDFLAGS="" |
68 | 68 | DLL_LDFLAGS="-shared" |
69 | 69 | STATIC_LDFLAGS="" |
70 | +STATIC_LIBS="" | |
70 | 71 | CLIENT_TARGETS="shared devel" |
71 | 72 | |
72 | - | |
73 | 73 | dnl --------------------------------------------------------------------------- |
74 | 74 | dnl Check for OS specifics |
75 | 75 | dnl --------------------------------------------------------------------------- |
... | ... | @@ -83,6 +83,7 @@ case "$host" in |
83 | 83 | LIBS="$LIBS -lws2_32 -lwtsapi32 -lcomdlg32 -lkernel32" |
84 | 84 | LDFLAGS="$LDFLAGS" |
85 | 85 | STATIC_LDFLAGS="-static -static-libgcc -static-libstdc++" |
86 | + STATIC_LIBS="-Wl,-Bstatic,--whole-archive -lwinpthread -Wl,--no-whole-archive,-Bdynamic" | |
86 | 87 | DLLEXT=".dll" |
87 | 88 | DLLPREFIX="" |
88 | 89 | |
... | ... | @@ -123,6 +124,7 @@ AC_SUBST(LOGDIR) |
123 | 124 | AC_SUBST(DLLEXT) |
124 | 125 | AC_SUBST(DLLPREFIX) |
125 | 126 | AC_SUBST(STATIC_LDFLAGS) |
127 | +AC_SUBST(STATIC_LIBS) | |
126 | 128 | |
127 | 129 | AC_CHECK_FUNC(vasprintf, AC_DEFINE(HAVE_VASPRINTF) ) |
128 | 130 | ... | ... |