TS-1838 Improve the compiler handling a bit in configure.ac.

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

Branch: refs/heads/sphinx-docs
Commit: 2d419fc979fdd476e8ae5d96b0053c20b95fbe9c
Parents: d8c5262
Author: Leif Hedstrom <[email protected]>
Authored: Tue Apr 30 23:11:01 2013 -0700
Committer: Leif Hedstrom <[email protected]>
Committed: Tue Apr 30 23:12:59 2013 -0700

----------------------------------------------------------------------
 CHANGES      |    2 ++
 configure.ac |   21 ++++++++++-----------
 2 files changed, 12 insertions(+), 11 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/trafficserver/blob/2d419fc9/CHANGES
----------------------------------------------------------------------
diff --git a/CHANGES b/CHANGES
index dd1321b..648df17 100644
--- a/CHANGES
+++ b/CHANGES
@@ -2,6 +2,8 @@
   Changes with Apache Traffic Server 3.3.3
 
 
+  *) [TS-1838] Improve configure.ac to recognize compiler setup better.
+
   *) [TS-1865] Support DESTDIR in tsxs.
 
   *) [TS-1864] Illumos / OmniOS needs -m64 with gcc to compile properly on

http://git-wip-us.apache.org/repos/asf/trafficserver/blob/2d419fc9/configure.ac
----------------------------------------------------------------------
diff --git a/configure.ac b/configure.ac
index 7f2c313..b4c629a 100644
--- a/configure.ac
+++ b/configure.ac
@@ -551,15 +551,6 @@ fi
 
 AC_LANG_POP()
 
-# Check for ccache (if explicitly enabled)
-if test "x$enable_ccache" = "xyes"; then
-    AC_CHECK_PROG([CCACHE],[ccache],[ccache],[])
-    if test "x${CCACHE}" = "xccache"; then
-       CC="$CCACHE $CC"
-       CXX="$CCACHE $CXX"
-    fi
-fi
-
 dnl AC_PROG_SED is only available from version 2.6 (released in 2003). CentosOS
 dnl 5.9 still has an ancient version, but we have macros that require
 dnl AC_PROG_SED. The actual AC_PROG_SED macro does functional checks, but here
@@ -719,7 +710,7 @@ AS_IF([test "x${has_optimizer_flags}" = "xno"],
 AM_CONDITIONAL([BUILD_HAVE_LIBCXX], [ false ])
 
 base_cc=`basename $CC`
-# These are shortcuts used in combination for the compiler options below
+
 case $host_os_def in
   linux)
     case $base_cc in
@@ -767,7 +758,7 @@ case $host_os_def in
   darwin)
     case $base_cc in
     *clang*)
-      common_opt="-pipe -Wall -Werror -Wno-deprecated-declarations"
+      common_opt="-pipe -Wall -Werror -Wno-deprecated-declarations 
-Qunused-arguments"
       debug_opt="$common_opt"
       release_opt="-g $common_opt $optimizing_flags -fno-strict-aliasing"
       cxx_opt="-Wno-invalid-offsetof"
@@ -960,6 +951,14 @@ AC_ARG_WITH([cpp11api],
 AC_MSG_RESULT([$cpp11api])
 AM_CONDITIONAL([BUILD_CPP11API], [test "$cpp11api" = yes])
 
+# Check for ccache (if explicitly enabled)
+if test "x$enable_ccache" = "xyes"; then
+    AC_CHECK_PROG([CCACHE],[ccache],[ccache],[])
+    if test "x${CCACHE}" = "xccache"; then
+       CC="$CCACHE $CC"
+       CXX="$CCACHE $CXX"
+    fi
+fi
 
 # -----------------------------------------------------------------------------
 # 4. CHECK FOR LIBRARIES

Reply via email to