You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@trafficserver.apache.org by jp...@apache.org on 2014/08/26 00:57:20 UTC

[7/7] git commit: TS-3042: fix the static traffic_server build

TS-3042: fix the static traffic_server build

Rename --enable-static-libts to --enable-static-proxy, since that's
a better description of what it does. Use this option to default
the libtool static library options so that it works correctly.


Project: http://git-wip-us.apache.org/repos/asf/trafficserver/repo
Commit: http://git-wip-us.apache.org/repos/asf/trafficserver/commit/60d2106e
Tree: http://git-wip-us.apache.org/repos/asf/trafficserver/tree/60d2106e
Diff: http://git-wip-us.apache.org/repos/asf/trafficserver/diff/60d2106e

Branch: refs/heads/master
Commit: 60d2106eddc841882a9a111b008ed67bd0953f41
Parents: 02d9200
Author: James Peach <jp...@apache.org>
Authored: Sun Aug 24 16:08:32 2014 -0700
Committer: James Peach <jp...@apache.org>
Committed: Mon Aug 25 15:55:26 2014 -0700

----------------------------------------------------------------------
 configure.ac      | 20 ++++++++++----------
 proxy/Makefile.am | 13 ++++++-------
 2 files changed, 16 insertions(+), 17 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/trafficserver/blob/60d2106e/configure.ac
----------------------------------------------------------------------
diff --git a/configure.ac b/configure.ac
index 0065b4b..3b37aa2 100644
--- a/configure.ac
+++ b/configure.ac
@@ -47,8 +47,6 @@ AC_CONFIG_HEADERS([lib/ts/ink_autoconf.h])
 # http://www.gnu.org/software/automake/manual/html_node/Automake-silent_002drules-Option.html
 m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])])
 
-AC_DISABLE_STATIC
-
 # Libtool versioning uses different conventions on different
 # platforms.  At least on FreeBSD, libtool uses an overly complex
 # convention that attempts to solve problems that most people just
@@ -224,15 +222,17 @@ AM_CONDITIONAL([BUILD_TESTS], [test 0 -ne $has_tests])
 #
 # Force some static linkage (for testing / development only)
 #
-AC_MSG_CHECKING([whether to build some static libts (dev only)])
-AC_ARG_ENABLE([static-libts],
-  [AS_HELP_STRING([--enable-static-libts],[build some static libts (dev only)])],
-  [],
-  [enable_static_libts=no]
+AC_MSG_CHECKING([whether to build a static traffic_server binary])
+AC_ARG_ENABLE([static-proxy], [AS_HELP_STRING([--enable-static-proxy],[build a static traffic_server binary])], [
+    AC_ENABLE_STATIC
+  ], [
+    AC_DISABLE_STATIC
+    enable_static_proxy=no
+  ]
 )
-AC_MSG_RESULT([$enable_static_libts])
-TS_ARG_ENABLE_VAR([has],[static-libts])
-AM_CONDITIONAL([STATIC_LIBTS], [test 0 -ne $has_static_libts])
+AC_MSG_RESULT([$enable_static_proxy])
+TS_ARG_ENABLE_VAR([has],[static-proxy])
+AM_CONDITIONAL([BUILD_STATIC_PROXY], [test 0 -ne $has_static_proxy])
 
 #
 # Remote Coverity Prevent commit

http://git-wip-us.apache.org/repos/asf/trafficserver/blob/60d2106e/proxy/Makefile.am
----------------------------------------------------------------------
diff --git a/proxy/Makefile.am b/proxy/Makefile.am
index 091502b..8ae605f 100644
--- a/proxy/Makefile.am
+++ b/proxy/Makefile.am
@@ -122,12 +122,6 @@ LUAJIT = \
   lj_vmevent.o \
   lj_vmmath.o
 
-if STATIC_LIBTS
-    which_libts = $(top_builddir)/lib/ts/.libs/libtsutil.a
-else
-    which_libts = $(top_builddir)/lib/ts/libtsutil.la
-endif
-
 EXTRA_DIST = InkAPITestTool.cc example_alarm_bin.sh example_prep.sh
 
 traffic_server_SOURCES = \
@@ -192,6 +186,11 @@ if BUILD_TESTS
 endif
 
 traffic_server_LDFLAGS = @EXTRA_CXX_LDFLAGS@ @LIBTOOL_LINK_FLAGS@
+
+if BUILD_STATIC_PROXY
+traffic_server_LDFLAGS += -all-static
+endif
+
 traffic_server_LDADD = \
   http/libhttp.a \
   http2/libhttp2.a \
@@ -218,7 +217,7 @@ traffic_server_LDADD = \
   $(top_builddir)/iocore/eventsystem/libinkevent.a \
   $(top_builddir)/lib/records/librecords_p.a \
   $(top_builddir)/iocore/eventsystem/libinkevent.a \
-  $(which_libts) \
+  $(top_builddir)/lib/ts/libtsutil.la \
   @HWLOC_LIBS@ \
   @LIBPCRE@ \
   @OPENSSL_LIBS@ \