Commit 2a5373ae28760f9db6f693b429b32549798c4897
1 parent
ddd14c01
Exists in
master
and in
1 other branch
Adding configure option to enable/disable the installation of the static
library.
Showing
2 changed files
with
25 additions
and
11 deletions
Show diff stats
Makefile.in
| @@ -29,6 +29,7 @@ | @@ -29,6 +29,7 @@ | ||
| 29 | SONAME=@SONAME@ | 29 | SONAME=@SONAME@ |
| 30 | LIBNAME=libv3270 | 30 | LIBNAME=libv3270 |
| 31 | PRODUCT_NAME=@PRODUCT_NAME@ | 31 | PRODUCT_NAME=@PRODUCT_NAME@ |
| 32 | +INSTALL_PACKAGES=@INSTALL_PACKAGES@ | ||
| 32 | 33 | ||
| 33 | SOURCES= \ | 34 | SOURCES= \ |
| 34 | $(wildcard src/terminal/*.c) \ | 35 | $(wildcard src/terminal/*.c) \ |
| @@ -274,10 +275,7 @@ $(BINRLS)/static/$(LIBNAME).a: \ | @@ -274,10 +275,7 @@ $(BINRLS)/static/$(LIBNAME).a: \ | ||
| 274 | #---[ Install Targets ]------------------------------------------------------------------ | 275 | #---[ Install Targets ]------------------------------------------------------------------ |
| 275 | 276 | ||
| 276 | install: \ | 277 | install: \ |
| 277 | - install-shared \ | ||
| 278 | - install-static \ | ||
| 279 | - install-glade \ | ||
| 280 | - install-dev | 278 | + $(foreach PKG, $(INSTALL_PACKAGES), install-$(PKG)) |
| 281 | 279 | ||
| 282 | install-shared: \ | 280 | install-shared: \ |
| 283 | $(BINRLS)/$(SONAME) | 281 | $(BINRLS)/$(SONAME) |
configure.ac
| @@ -16,6 +16,7 @@ dnl obter mais detalhes. | @@ -16,6 +16,7 @@ dnl obter mais detalhes. | ||
| 16 | dnl | 16 | dnl |
| 17 | dnl Você deve ter recebido uma cópia da Licença Pública Geral GNU junto com este | 17 | dnl Você deve ter recebido uma cópia da Licença Pública Geral GNU junto com este |
| 18 | dnl programa; se não, escreva para a Free Software Foundation, Inc., 59 Temple | 18 | dnl programa; se não, escreva para a Free Software Foundation, Inc., 59 Temple |
| 19 | + | ||
| 19 | dnl Place, Suite 330, Boston, MA, 02111-1307, USA | 20 | dnl Place, Suite 330, Boston, MA, 02111-1307, USA |
| 20 | dnl | 21 | dnl |
| 21 | dnl Contatos: | 22 | dnl Contatos: |
| @@ -73,6 +74,7 @@ APP_RESOURCES="" | @@ -73,6 +74,7 @@ APP_RESOURCES="" | ||
| 73 | APP_LDFLAGS="" | 74 | APP_LDFLAGS="" |
| 74 | DLL_LDFLAGS="-shared -Wl,-soname,\$(@F)" | 75 | DLL_LDFLAGS="-shared -Wl,-soname,\$(@F)" |
| 75 | STATIC_LDFLAGS="" | 76 | STATIC_LDFLAGS="" |
| 77 | +INSTALL_PACKAGES="shared dev glade" | ||
| 76 | 78 | ||
| 77 | dnl --------------------------------------------------------------------------- | 79 | dnl --------------------------------------------------------------------------- |
| 78 | dnl Check for OS specifics | 80 | dnl Check for OS specifics |
| @@ -89,6 +91,8 @@ case "$host" in | @@ -89,6 +91,8 @@ case "$host" in | ||
| 89 | DLL_LDFLAGS="-shared -Wl,--output-def,\$(@D)/\$(LIBNAME).def" | 91 | DLL_LDFLAGS="-shared -Wl,--output-def,\$(@D)/\$(LIBNAME).def" |
| 90 | DLLEXT=".dll" | 92 | DLLEXT=".dll" |
| 91 | 93 | ||
| 94 | + app_cv_static='yes' | ||
| 95 | + | ||
| 92 | app_win32_revision=$(date +%-y.%-m.%-d.%-H) | 96 | app_win32_revision=$(date +%-y.%-m.%-d.%-H) |
| 93 | AC_SUBST(WIN32_VERSION,$app_win32_revision) | 97 | AC_SUBST(WIN32_VERSION,$app_win32_revision) |
| 94 | 98 | ||
| @@ -98,13 +102,6 @@ case "$host" in | @@ -98,13 +102,6 @@ case "$host" in | ||
| 98 | AC_CONFIG_FILES(src/terminal/windows/resources.rc) | 102 | AC_CONFIG_FILES(src/terminal/windows/resources.rc) |
| 99 | ;; | 103 | ;; |
| 100 | 104 | ||
| 101 | - s390x-*) | ||
| 102 | - CFLAGS="$CFLAGS -pthread" | ||
| 103 | - LDFLAGS="$LDFLAGS -pthread" | ||
| 104 | - app_cv_osname="linux" | ||
| 105 | - LOGDIR="/var/log" | ||
| 106 | - ;; | ||
| 107 | - | ||
| 108 | *) | 105 | *) |
| 109 | CFLAGS="$CFLAGS -pthread" | 106 | CFLAGS="$CFLAGS -pthread" |
| 110 | LDFLAGS="$LDFLAGS -pthread" | 107 | LDFLAGS="$LDFLAGS -pthread" |
| @@ -112,6 +109,8 @@ case "$host" in | @@ -112,6 +109,8 @@ case "$host" in | ||
| 112 | LOGDIR="/var/log" | 109 | LOGDIR="/var/log" |
| 113 | DLLEXT=".so" | 110 | DLLEXT=".so" |
| 114 | 111 | ||
| 112 | + app_cv_static='no' | ||
| 113 | + | ||
| 115 | esac | 114 | esac |
| 116 | 115 | ||
| 117 | AC_SUBST(OSNAME,$app_cv_osname) | 116 | AC_SUBST(OSNAME,$app_cv_osname) |
| @@ -185,6 +184,21 @@ case "$host" in | @@ -185,6 +184,21 @@ case "$host" in | ||
| 185 | 184 | ||
| 186 | esac | 185 | esac |
| 187 | 186 | ||
| 187 | +dnl --------------------------------------------------------------------------- | ||
| 188 | +dnl Check for static library options | ||
| 189 | +dnl --------------------------------------------------------------------------- | ||
| 190 | + | ||
| 191 | +AC_ARG_ENABLE([static], | ||
| 192 | + [AS_HELP_STRING([--enable-static], [Enable build and install the static library])], | ||
| 193 | +[ | ||
| 194 | + app_cv_static="$enableval" | ||
| 195 | +],[ | ||
| 196 | + AC_MSG_NOTICE([Keep default selection for static library.]) | ||
| 197 | +]) | ||
| 198 | + | ||
| 199 | +if test "$app_cv_static" == "yes"; then | ||
| 200 | + INSTALL_PACKAGES="$INSTALL_PACKAGES static" | ||
| 201 | +fi | ||
| 188 | 202 | ||
| 189 | dnl --------------------------------------------------------------------------- | 203 | dnl --------------------------------------------------------------------------- |
| 190 | dnl Check for libm (Required for spinner) | 204 | dnl Check for libm (Required for spinner) |
| @@ -337,6 +351,8 @@ dnl --------------------------------------------------------------------------- | @@ -337,6 +351,8 @@ dnl --------------------------------------------------------------------------- | ||
| 337 | dnl Configure which files to generate. | 351 | dnl Configure which files to generate. |
| 338 | dnl --------------------------------------------------------------------------- | 352 | dnl --------------------------------------------------------------------------- |
| 339 | 353 | ||
| 354 | +AC_SUBST(INSTALL_PACKAGES) | ||
| 355 | + | ||
| 340 | AC_CONFIG_FILES(Makefile) | 356 | AC_CONFIG_FILES(Makefile) |
| 341 | AC_CONFIG_FILES(sdk/libv3270.pc) | 357 | AC_CONFIG_FILES(sdk/libv3270.pc) |
| 342 | AC_CONFIG_FILES(glade/v3270.xml) | 358 | AC_CONFIG_FILES(glade/v3270.xml) |