Commit ca0bc53c4cde8bc2fe04ad1f81a8c21060f3ed87
1 parent
6036b25b
Exists in
master
Winpthread is only for windows.
Showing
1 changed file
with
19 additions
and
5 deletions
Show diff stats
configure.ac
... | ... | @@ -85,6 +85,10 @@ AC_SUBST(PACKAGE_REVISION,$app_cv_revision) |
85 | 85 | AC_SUBST(PACKAGE_MAJOR_RELEASE,$app_rls_major) |
86 | 86 | AC_SUBST(PACKAGE_MINOR_RELEASE,$app_rls_minor) |
87 | 87 | |
88 | +AC_ARG_WITH([product-name], [AS_HELP_STRING([--with-product-name], [Set product name])], [ app_cv_product="$withval" ],[ app_cv_product=`$PKG_CONFIG --variable=product_name ipc3270` ]) | |
89 | +AC_DEFINE_UNQUOTED(PRODUCT_NAME, $app_cv_product) | |
90 | +AC_SUBST(PRODUCT_NAME,$app_cv_product) | |
91 | + | |
88 | 92 | dnl --------------------------------------------------------------------------- |
89 | 93 | dnl Check for OS specifics |
90 | 94 | dnl --------------------------------------------------------------------------- |
... | ... | @@ -178,19 +182,29 @@ AC_ARG_WITH([static-ipc3270], |
178 | 182 | ]) |
179 | 183 | |
180 | 184 | if test "$app_cv_static_ipc3270" == "yes"; then |
185 | + | |
181 | 186 | PKG_CHECK_MODULES( [IPC3270], [ipc3270-static], AC_DEFINE(USING_STATIC_IPC3270), AC_MSG_ERROR([IPC3270 not present.])) |
187 | + | |
182 | 188 | else |
183 | - LDFLAGS="$LDFLAGS -Wl,-Bstatic,--whole-archive -lwinpthread -Wl,--no-whole-archive,-Bdynamic" | |
189 | + | |
184 | 190 | PKG_CHECK_MODULES( [IPC3270], [ipc3270], AC_DEFINE(USING_SHARED_IPC3270), AC_MSG_ERROR([IPC3270 not present.])) |
191 | + | |
192 | + case "$host" in | |
193 | + *-mingw32|*-pc-msys) | |
194 | + LDFLAGS="$LDFLAGS -Wl,-Bstatic,--whole-archive -lwinpthread -Wl,--no-whole-archive,-Bdynamic" | |
195 | + AC_MSG_NOTICE([Using shared version of libipc3270 with static winpthread.]) | |
196 | + ;; | |
197 | + | |
198 | + *) | |
199 | + AC_MSG_NOTICE([Using shared version of libipc3270.]) | |
200 | + | |
201 | + esac | |
202 | + | |
185 | 203 | fi |
186 | 204 | |
187 | 205 | AC_SUBST(IPC3270_LIBS) |
188 | 206 | AC_SUBST(IPC3270_CFLAGS) |
189 | 207 | |
190 | -AC_ARG_WITH([product-name], [AS_HELP_STRING([--with-product-name], [Set product name])], [ app_cv_product="$withval" ],[ app_cv_product=`$PKG_CONFIG --variable=product_name ipc3270` ]) | |
191 | -AC_DEFINE_UNQUOTED(PRODUCT_NAME, $app_cv_product) | |
192 | -AC_SUBST(PRODUCT_NAME,$app_cv_product) | |
193 | - | |
194 | 208 | dnl --------------------------------------------------------------------------- |
195 | 209 | dnl Check for Python |
196 | 210 | dnl --------------------------------------------------------------------------- | ... | ... |