Commit 73c2260f99955c8fd9af9664496a2c42617cf42a
1 parent
60bc0bfa
Exists in
master
and in
1 other branch
Static library is now optional on linux and default on windows.
Showing
2 changed files
with
30 additions
and
3 deletions
Show diff stats
client/Makefile.in
... | ... | @@ -39,6 +39,9 @@ MAIN_SOURCES= \ |
39 | 39 | TEST_SOURCES= \ |
40 | 40 | $(wildcard src/testprogram/*.cc) |
41 | 41 | |
42 | +TARGETS= \ | |
43 | + @CLIENT_TARGETS@ | |
44 | + | |
42 | 45 | #---[ Tools ]---------------------------------------------------------------------------- |
43 | 46 | |
44 | 47 | CXX=@CXX@ |
... | ... | @@ -222,9 +225,7 @@ $(BINRLS)/lib$(MODULE_NAME).a: \ |
222 | 225 | #---[ Install Targets ]------------------------------------------------------------------ |
223 | 226 | |
224 | 227 | install: \ |
225 | - install-shared \ | |
226 | - install-static \ | |
227 | - install-devel | |
228 | + $(foreach TARGET, $(TARGETS), install-$(TARGET)) | |
228 | 229 | |
229 | 230 | install-shared: \ |
230 | 231 | $(BINRLS)/lib$(MODULE_NAME)@DLLEXT@.@PACKAGE_MAJOR_VERSION@.@PACKAGE_MINOR_VERSION@ | ... | ... |
configure.ac
... | ... | @@ -67,6 +67,8 @@ APP_RESOURCES="" |
67 | 67 | APP_LDFLAGS="" |
68 | 68 | DLL_LDFLAGS="-shared" |
69 | 69 | STATIC_LDFLAGS="" |
70 | +CLIENT_TARGETS="shared devel" | |
71 | + | |
70 | 72 | |
71 | 73 | dnl --------------------------------------------------------------------------- |
72 | 74 | dnl Check for OS specifics |
... | ... | @@ -88,6 +90,9 @@ case "$host" in |
88 | 90 | AC_CONFIG_FILES(server/src/plugin/windows/resources.rc) |
89 | 91 | AC_CONFIG_FILES(server/src/service/windows/resources.rc) |
90 | 92 | AC_CONFIG_FILES(client/src/core/windows/resources.rc) |
93 | + | |
94 | + app_cv_static='yes' | |
95 | + | |
91 | 96 | ;; |
92 | 97 | |
93 | 98 | *) |
... | ... | @@ -99,6 +104,9 @@ case "$host" in |
99 | 104 | LOGDIR="/var/log" |
100 | 105 | DLLEXT=".so" |
101 | 106 | |
107 | + app_cv_static='no' | |
108 | + | |
109 | + | |
102 | 110 | esac |
103 | 111 | |
104 | 112 | AC_SUBST(DATADIR,$app_cv_datadir) |
... | ... | @@ -149,6 +157,24 @@ AC_SUBST(PACKAGE_MAJOR_RELEASE,$app_rls_major) |
149 | 157 | AC_SUBST(PACKAGE_MINOR_RELEASE,$app_rls_minor) |
150 | 158 | |
151 | 159 | dnl --------------------------------------------------------------------------- |
160 | +dnl Build options | |
161 | +dnl --------------------------------------------------------------------------- | |
162 | + | |
163 | +AC_ARG_ENABLE([static], | |
164 | + [AS_HELP_STRING([--enable-static], [Enable build and install the static library])], | |
165 | +[ | |
166 | + app_cv_static="$enableval" | |
167 | +],[ | |
168 | + AC_MSG_NOTICE([Keep default selection for static library.]) | |
169 | +]) | |
170 | + | |
171 | +if test "$app_cv_static" == "yes"; then | |
172 | + CLIENT_TARGETS="$CLIENT_TARGETS static" | |
173 | +fi | |
174 | + | |
175 | +AC_SUBST(CLIENT_TARGETS) | |
176 | + | |
177 | +dnl --------------------------------------------------------------------------- | |
152 | 178 | dnl Check for libintl |
153 | 179 | dnl --------------------------------------------------------------------------- |
154 | 180 | ... | ... |