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 | 29 | SONAME=@SONAME@ |
30 | 30 | LIBNAME=libv3270 |
31 | 31 | PRODUCT_NAME=@PRODUCT_NAME@ |
32 | +INSTALL_PACKAGES=@INSTALL_PACKAGES@ | |
32 | 33 | |
33 | 34 | SOURCES= \ |
34 | 35 | $(wildcard src/terminal/*.c) \ |
... | ... | @@ -274,10 +275,7 @@ $(BINRLS)/static/$(LIBNAME).a: \ |
274 | 275 | #---[ Install Targets ]------------------------------------------------------------------ |
275 | 276 | |
276 | 277 | install: \ |
277 | - install-shared \ | |
278 | - install-static \ | |
279 | - install-glade \ | |
280 | - install-dev | |
278 | + $(foreach PKG, $(INSTALL_PACKAGES), install-$(PKG)) | |
281 | 279 | |
282 | 280 | install-shared: \ |
283 | 281 | $(BINRLS)/$(SONAME) | ... | ... |
configure.ac
... | ... | @@ -16,6 +16,7 @@ dnl obter mais detalhes. |
16 | 16 | dnl |
17 | 17 | dnl Você deve ter recebido uma cópia da Licença Pública Geral GNU junto com este |
18 | 18 | dnl programa; se não, escreva para a Free Software Foundation, Inc., 59 Temple |
19 | + | |
19 | 20 | dnl Place, Suite 330, Boston, MA, 02111-1307, USA |
20 | 21 | dnl |
21 | 22 | dnl Contatos: |
... | ... | @@ -73,6 +74,7 @@ APP_RESOURCES="" |
73 | 74 | APP_LDFLAGS="" |
74 | 75 | DLL_LDFLAGS="-shared -Wl,-soname,\$(@F)" |
75 | 76 | STATIC_LDFLAGS="" |
77 | +INSTALL_PACKAGES="shared dev glade" | |
76 | 78 | |
77 | 79 | dnl --------------------------------------------------------------------------- |
78 | 80 | dnl Check for OS specifics |
... | ... | @@ -89,6 +91,8 @@ case "$host" in |
89 | 91 | DLL_LDFLAGS="-shared -Wl,--output-def,\$(@D)/\$(LIBNAME).def" |
90 | 92 | DLLEXT=".dll" |
91 | 93 | |
94 | + app_cv_static='yes' | |
95 | + | |
92 | 96 | app_win32_revision=$(date +%-y.%-m.%-d.%-H) |
93 | 97 | AC_SUBST(WIN32_VERSION,$app_win32_revision) |
94 | 98 | |
... | ... | @@ -98,13 +102,6 @@ case "$host" in |
98 | 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 | 106 | CFLAGS="$CFLAGS -pthread" |
110 | 107 | LDFLAGS="$LDFLAGS -pthread" |
... | ... | @@ -112,6 +109,8 @@ case "$host" in |
112 | 109 | LOGDIR="/var/log" |
113 | 110 | DLLEXT=".so" |
114 | 111 | |
112 | + app_cv_static='no' | |
113 | + | |
115 | 114 | esac |
116 | 115 | |
117 | 116 | AC_SUBST(OSNAME,$app_cv_osname) |
... | ... | @@ -185,6 +184,21 @@ case "$host" in |
185 | 184 | |
186 | 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 | 203 | dnl --------------------------------------------------------------------------- |
190 | 204 | dnl Check for libm (Required for spinner) |
... | ... | @@ -337,6 +351,8 @@ dnl --------------------------------------------------------------------------- |
337 | 351 | dnl Configure which files to generate. |
338 | 352 | dnl --------------------------------------------------------------------------- |
339 | 353 | |
354 | +AC_SUBST(INSTALL_PACKAGES) | |
355 | + | |
340 | 356 | AC_CONFIG_FILES(Makefile) |
341 | 357 | AC_CONFIG_FILES(sdk/libv3270.pc) |
342 | 358 | AC_CONFIG_FILES(glade/v3270.xml) | ... | ... |