Commit 880e560996d4839dcb7a2d1de7f912b332779de2
1 parent
610c78d4
Exists in
master
and in
3 other branches
Static library build is now optional and defaults only for windows.
Showing
2 changed files
with
30 additions
and
3 deletions
Show diff stats
Makefile.in
| ... | ... | @@ -27,6 +27,8 @@ |
| 27 | 27 | MODULES= \ |
| 28 | 28 | lib@LIB3270_NAME@@DLLEXT@ |
| 29 | 29 | |
| 30 | +INSTALL_PACKAGES=@INSTALL_PACKAGES@ | |
| 31 | + | |
| 30 | 32 | #---[ Tools ]---------------------------------------------------------------------------- |
| 31 | 33 | |
| 32 | 34 | MKDIR=@MKDIR_P@ |
| ... | ... | @@ -155,9 +157,7 @@ doc: |
| 155 | 157 | #---[ Install Targets ]------------------------------------------------------------------ |
| 156 | 158 | |
| 157 | 159 | install: \ |
| 158 | - install-shared \ | |
| 159 | - install-static \ | |
| 160 | - install-dev | |
| 160 | + $(foreach PKG, $(INSTALL_PACKAGES), install-$(PKG)) | |
| 161 | 161 | |
| 162 | 162 | install-shared: |
| 163 | 163 | @$(MAKE) DESTDIR=$(DESTDIR) -C src/lib3270 $@ | ... | ... |
configure.ac
| ... | ... | @@ -67,6 +67,7 @@ APP_RESOURCES="" |
| 67 | 67 | APP_LDFLAGS="" |
| 68 | 68 | DLL_LDFLAGS="-shared -Wl,-soname,\$(@F)" |
| 69 | 69 | STATIC_LDFLAGS="" |
| 70 | +INSTALL_PACKAGES="shared dev" | |
| 70 | 71 | |
| 71 | 72 | dnl --------------------------------------------------------------------------- |
| 72 | 73 | dnl Check for OS specifics |
| ... | ... | @@ -88,6 +89,9 @@ case "$host" in |
| 88 | 89 | |
| 89 | 90 | AC_CONFIG_FILES(src/lib3270/windows/resources.rc) |
| 90 | 91 | AC_CONFIG_FILES(src/lib3270++/windows/resources.rc) |
| 92 | + | |
| 93 | + app_cv_static='yes' | |
| 94 | + | |
| 91 | 95 | ;; |
| 92 | 96 | |
| 93 | 97 | s390x-*) |
| ... | ... | @@ -97,6 +101,9 @@ case "$host" in |
| 97 | 101 | app_cv_confdir="/etc" |
| 98 | 102 | app_cv_osname="linux" |
| 99 | 103 | LOGDIR="/var/log" |
| 104 | + | |
| 105 | + app_cv_static='no' | |
| 106 | + | |
| 100 | 107 | ;; |
| 101 | 108 | |
| 102 | 109 | *) |
| ... | ... | @@ -108,6 +115,8 @@ case "$host" in |
| 108 | 115 | LOGDIR="/var/log" |
| 109 | 116 | DLLEXT=".so" |
| 110 | 117 | |
| 118 | + app_cv_static='no' | |
| 119 | + | |
| 111 | 120 | esac |
| 112 | 121 | |
| 113 | 122 | AC_DEFINE_UNQUOTED(LIB3270_DATADIR,$app_cv_datadir) |
| ... | ... | @@ -434,6 +443,22 @@ AC_SUBST(LIB3270_SDK_VERSION,$app_cv_sdkversion) |
| 434 | 443 | |
| 435 | 444 | AC_ARG_WITH([default-host], [AS_HELP_STRING([--with-default-host], [Set lib3270 default host url])], [ AC_DEFINE_UNQUOTED(LIB3270_DEFAULT_HOST,"$withval") ],[ AC_MSG_NOTICE(No default host)]) |
| 436 | 445 | |
| 446 | +AC_ARG_ENABLE([static], | |
| 447 | + [AS_HELP_STRING([--enable-static], [Enable build and install the static library])], | |
| 448 | +[ | |
| 449 | + app_cv_static="$enableval" | |
| 450 | +],[ | |
| 451 | + AC_MSG_NOTICE([Keep default selection for static library.]) | |
| 452 | +]) | |
| 453 | + | |
| 454 | +if test "$app_cv_expired_crl" == "yes"; then | |
| 455 | + AC_DEFINE(SSL_ENABLE_CRL_EXPIRATION_CHECK) | |
| 456 | +fi | |
| 457 | + | |
| 458 | +if test "$app_cv_static" == "yes"; then | |
| 459 | + INSTALL_PACKAGES="$INSTALL_PACKAGES static" | |
| 460 | +fi | |
| 461 | + | |
| 437 | 462 | dnl --------------------------------------------------------------------------- |
| 438 | 463 | dnl Check for headers |
| 439 | 464 | dnl --------------------------------------------------------------------------- |
| ... | ... | @@ -554,6 +579,8 @@ dnl --------------------------------------------------------------------------- |
| 554 | 579 | dnl Configure which files to generate. |
| 555 | 580 | dnl --------------------------------------------------------------------------- |
| 556 | 581 | |
| 582 | +AC_SUBST(INSTALL_PACKAGES) | |
| 583 | + | |
| 557 | 584 | AC_CONFIG_FILES(Makefile) |
| 558 | 585 | |
| 559 | 586 | AC_CONFIG_FILES(src/lib3270/Makefile) | ... | ... |