Permalink
Browse files

Update to use the latest build tools.

    The latest build tools allows us to turn on/off the building
    of static/dynamic libraries if supported by the project.

    ThorsSerialize support both static/shared libraries but the
    default is shared only. By using --enable-static you can turn
    on the static libraries.
  • Loading branch information...
1 parent 08b22d2 commit 2f7769de46570d10f10226c2794b42a89a455049 @Loki-Astari committed Sep 4, 2016
Showing with 52 additions and 36 deletions.
  1. +1 −0 Makefile.config.in
  2. +1 −0 Makefile.extra.in
  3. +1 −1 build
  4. +46 −33 configure
  5. +2 −1 configure.ac
  6. +1 −1 src/Serialize/Makefile
View
@@ -4,6 +4,7 @@ COV=@COV@
CXXSTDVER=@CXXSTDVER@
CXX_STD_FLAG=@CXX_STD_FLAG@
+THOR_TARGETLIBS=@THOR_TARGETLIBS@
yaml_ROOT_DIR=@yaml_ROOT_DIR@
yaml_ROOT_LIB=@yaml_ROOT_LIB@
View
@@ -305,6 +305,7 @@ STRIP = @STRIP@
StdFlag11 = @StdFlag11@
StdFlag14 = @StdFlag14@
StdFlag17 = @StdFlag17@
+THOR_TARGETLIBS = @THOR_TARGETLIBS@
TestVera = @TestVera@
UNZIP = @UNZIP@
VERA = @VERA@
View
@@ -684,6 +684,7 @@ StdFlag17
StdFlag14
StdFlag11
CXXMaxLanguage
+THOR_TARGETLIBS
BINARY_REP
yaml_ROOT_LIB
yaml_ROOT_DIR
@@ -783,8 +784,8 @@ ac_user_opts='
enable_option_checking
with_thor_build_on_travis
enable_vera
-enable_shared
enable_static
+enable_shared
with_pic
enable_fast_install
with_aix_soname
@@ -1432,8 +1433,8 @@ Optional Features:
--enable-FEATURE[=ARG] include FEATURE [ARG=yes]
--disable-vera Disable vera. Disable Static analysis of source.
+ --enable-static[=PKGS] build static libraries [default=no]
--enable-shared[=PKGS] build shared libraries [default=yes]
- --enable-static[=PKGS] build static libraries [default=yes]
--enable-fast-install[=PKGS]
optimize for fast installation [default=yes]
--disable-libtool-lock avoid locking (might break parallel builds)
@@ -4303,8 +4304,8 @@ esac
-macro_version='2.4.5'
-macro_revision='2.4.5'
+macro_version='2.4.6'
+macro_revision='2.4.6'
@@ -8121,36 +8122,27 @@ func_stripname_cnf ()
# Set options
-
-
-
- enable_dlopen=no
-
-
- enable_win32_dll=no
-
-
- # Check whether --enable-shared was given.
-if test "${enable_shared+set}" = set; then :
- enableval=$enable_shared; p=${PACKAGE-default}
+# Check whether --enable-static was given.
+if test "${enable_static+set}" = set; then :
+ enableval=$enable_static; p=${PACKAGE-default}
case $enableval in
- yes) enable_shared=yes ;;
- no) enable_shared=no ;;
+ yes) enable_static=yes ;;
+ no) enable_static=no ;;
*)
- enable_shared=no
+ enable_static=no
# Look at the argument we got. We use all the common list separators.
lt_save_ifs=$IFS; IFS=$IFS$PATH_SEPARATOR,
for pkg in $enableval; do
IFS=$lt_save_ifs
if test "X$pkg" = "X$p"; then
- enable_shared=yes
+ enable_static=yes
fi
done
IFS=$lt_save_ifs
;;
esac
else
- enable_shared=yes
+ enable_static=no
fi
@@ -8161,27 +8153,34 @@ fi
- # Check whether --enable-static was given.
-if test "${enable_static+set}" = set; then :
- enableval=$enable_static; p=${PACKAGE-default}
+
+ enable_dlopen=no
+
+
+ enable_win32_dll=no
+
+
+ # Check whether --enable-shared was given.
+if test "${enable_shared+set}" = set; then :
+ enableval=$enable_shared; p=${PACKAGE-default}
case $enableval in
- yes) enable_static=yes ;;
- no) enable_static=no ;;
+ yes) enable_shared=yes ;;
+ no) enable_shared=no ;;
*)
- enable_static=no
+ enable_shared=no
# Look at the argument we got. We use all the common list separators.
lt_save_ifs=$IFS; IFS=$IFS$PATH_SEPARATOR,
for pkg in $enableval; do
IFS=$lt_save_ifs
if test "X$pkg" = "X$p"; then
- enable_static=yes
+ enable_shared=yes
fi
done
IFS=$lt_save_ifs
;;
esac
else
- enable_static=yes
+ enable_shared=yes
fi
@@ -8193,6 +8192,7 @@ fi
+
# Check whether --with-pic was given.
if test "${with_pic+set}" = set; then :
withval=$with_pic; lt_p=${PACKAGE-default}
@@ -16213,6 +16213,19 @@ if test "x$enable_binary" != "xno"; then :
fi
+ THOR_TARGETLIBS=""
+ if test "x$enable_shared" == "xyes"; then :
+ THOR_TARGETLIBS+=" slib"
+
+fi
+ if test "x$enable_static" == "xyes"; then :
+ THOR_TARGETLIBS+=" a"
+
+fi
+ THOR_TARGETLIBS=${THOR_TARGETLIBS}
+
+
+
SERIALIZATION_EXTERN_LIBS="$with_yamllib $SERIALIZATION_EXTERN_LIBS"
@@ -18177,8 +18190,8 @@ double_quote_subst='$double_quote_subst'
delay_variable_subst='$delay_variable_subst'
macro_version='`$ECHO "$macro_version" | $SED "$delay_single_quote_subst"`'
macro_revision='`$ECHO "$macro_revision" | $SED "$delay_single_quote_subst"`'
-enable_shared='`$ECHO "$enable_shared" | $SED "$delay_single_quote_subst"`'
enable_static='`$ECHO "$enable_static" | $SED "$delay_single_quote_subst"`'
+enable_shared='`$ECHO "$enable_shared" | $SED "$delay_single_quote_subst"`'
pic_mode='`$ECHO "$pic_mode" | $SED "$delay_single_quote_subst"`'
enable_fast_install='`$ECHO "$enable_fast_install" | $SED "$delay_single_quote_subst"`'
shared_archive_member_spec='`$ECHO "$shared_archive_member_spec" | $SED "$delay_single_quote_subst"`'
@@ -19212,12 +19225,12 @@ available_tags='CXX '
macro_version=$macro_version
macro_revision=$macro_revision
-# Whether or not to build shared libraries.
-build_libtool_libs=$enable_shared
-
# Whether or not to build static libraries.
build_old_libs=$enable_static
+# Whether or not to build shared libraries.
+build_libtool_libs=$enable_shared
+
# What type of objects to build.
pic_mode=$pic_mode
View
@@ -12,7 +12,7 @@ AC_CONFIG_SRCDIR([src/Serialize/JsonParser.cpp])
AC_PROG_CXX
AX_THOR_PROG_COV
AX_THOR_PROG_LEX
-LT_INIT
+LT_INIT([disable-static])
AC_SUBST([SERIALIZATION_EXTERN_LIBS], [])
@@ -24,6 +24,7 @@ AS_IF(
AC_SUBST([BINARY_REP], [BinaryRep])
]
)
+AX_THOR_LIB_SELECT
AC_SUBST([SERIALIZATION_EXTERN_LIBS], ["$with_yamllib $SERIALIZATION_EXTERN_LIBS"])
@@ -1,7 +1,7 @@
THORSANVIL_ROOT ?= $(realpath ../../)
-TARGET = ThorSerialize.slib
+TARGET = ThorSerialize.lib
#
# Note: SERIALIZATION_EXTERN_LIBS

0 comments on commit 2f7769d

Please sign in to comment.