diff options
author | Florian Fainelli <florian@openwrt.org> | 2010-11-14 14:23:51 +0100 |
---|---|---|
committer | Steve Bennett <steveb@workware.net.au> | 2010-11-15 07:45:47 +1000 |
commit | 31d09164ecc9581d1767a12c6d614d70daa232e4 (patch) | |
tree | 56d6a4d672ac366e8c75116391dbfd400c9eb2ff | |
parent | 4d2954cb95b89c1b26981d0eea99378cdaa8d1c3 (diff) | |
download | jimtcl-31d09164ecc9581d1767a12c6d614d70daa232e4.zip jimtcl-31d09164ecc9581d1767a12c6d614d70daa232e4.tar.gz jimtcl-31d09164ecc9581d1767a12c6d614d70daa232e4.tar.bz2 |
Add --enable-{shared,static} to configure args
It is common to use --enable-{shared,static} to select a library flavour.
--enable-shared is equivalent to --with-jim-shared. The default behavior of
building a static library is kept.
Signed-off-by: Florian Fainelli <florian@openwrt.org>
-rwxr-xr-x | configure | 24 | ||||
-rwxr-xr-x | configure.ac | 16 |
2 files changed, 40 insertions, 0 deletions
@@ -687,6 +687,8 @@ with_jim_ext with_out_jim_ext with_jim_extmod with_jim_shared +enable_shared +enable_static ' ac_precious_vars='build_alias host_alias @@ -1316,6 +1318,8 @@ Optional Features: --disable-fork do not use fork (no exec, etc.) --enable-math include support for math functions --enable-ipv6 include ipv6 support in the aio extension + --enable-shared build a shared library instead of a static library + --enable-static build a static library instead of a shared library Optional Packages: --with-PACKAGE[=ARG] use PACKAGE [ARG=yes] @@ -3698,6 +3702,26 @@ if test "${with_jim_shared+set}" = set; then : fi +# Check whether --enable-shared was given. +if test "${enable_shared+set}" = set; then : + enableval=$enable_shared; + if test "x$enableval" = "xyes" ; then + JIM_LIBTYPE=shared + fi + + +fi + +# Check whether --enable-static was given. +if test "${enable_static+set}" = set; then : + enableval=$enable_static; + if test "x$enableval" = "xyes" ; then + JIM_LIBTYPE=static + fi + + +fi + JIM_LIBTYPE=$JIM_LIBTYPE diff --git a/configure.ac b/configure.ac index 7554ecc..46d36c2 100755 --- a/configure.ac +++ b/configure.ac @@ -164,6 +164,22 @@ AC_ARG_WITH(jim-shared, fi ] ) +AC_ARG_ENABLE(shared, + [ --enable-shared build a shared library instead of a static library], + [ + if test "x$enableval" = "xyes" ; then + JIM_LIBTYPE=shared + fi + ] +) +AC_ARG_ENABLE(static, + [ --enable-static build a static library instead of a shared library], + [ + if test "x$enableval" = "xyes" ; then + JIM_LIBTYPE=static + fi + ] +) AC_SUBST(JIM_LIBTYPE,$JIM_LIBTYPE) AC_CHECK_HEADERS([sys/un.h dlfcn.h]) |