You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@trafficserver.apache.org by zw...@apache.org on 2012/05/07 05:19:41 UTC

git commit: TS-1090 Avoid gobs of autoconf warnings. Bart, feel free to undo and fix it as you see fit, I just got tired of the warnings

Updated Branches:
  refs/heads/master 58bc52e99 -> a30f95766


TS-1090 Avoid gobs of autoconf warnings. Bart, feel free to undo and fix it as you see fit, I just got tired of the warnings


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

Branch: refs/heads/master
Commit: a30f9576643c8f97e7cdad1dac14ecccdb594f98
Parents: 58bc52e
Author: Leif Hedstrom <zw...@apache.org>
Authored: Sun May 6 21:18:42 2012 -0600
Committer: Leif Hedstrom <zw...@apache.org>
Committed: Sun May 6 21:18:42 2012 -0600

----------------------------------------------------------------------
 configure.ac |   59 +++++++++++++++++++++-------------------------------
 1 files changed, 24 insertions(+), 35 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/trafficserver/blob/a30f9576/configure.ac
----------------------------------------------------------------------
diff --git a/configure.ac b/configure.ac
index 75c9dcd..e191848 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1306,45 +1306,34 @@ AC_SUBST(use_tproxy)
 AC_SUBST(ip_transparent)
 
 AC_MSG_CHECKING([for SO_MARK])
-AC_LANG_PUSH(C)
-AC_COMPILE_IFELSE(AC_LANG_PROGRAM([[
-	#include <sys/socket.h>
-	]],[[
-	if( SO_MARK > 0) return 0;
-	else return 1;
-	]]), [so_mark_found='yes'], [so_mark_found='no'])
-AC_LANG_POP()
-
-if test "x${so_mark_found}" = "xyes"; then
-  has_so_mark=1
-  AC_MSG_RESULT([found])
-else
-  has_so_mark=0
-  AC_MSG_RESULT([not found])
-fi
+AC_TRY_COMPILE([
+#include <sys/socket.h>
+], [
+if( SO_MARK > 0) return 0;
+else return 1;
+], [has_so_mark=1]
+msg=yes, [
+has_so_mark=0
+msg=no ] )
+
+AC_MSG_RESULT([$msg])
 AC_SUBST(has_so_mark)
 
 AC_MSG_CHECKING([for IP_TOS])
-AC_LANG_PUSH(C)
-AC_COMPILE_IFELSE(AC_LANG_PROGRAM([[
-	#include <sys/socket.h>
-	#include <netinet/in.h>
-	#include <netinet/ip.h>
-	]],[[
-	if( IP_TOS > 0) return 0;
-	else return 1;
-	]]), [ip_tos_found='yes'], [ip_tos_found='no'])
-AC_LANG_POP()
-
-if test "x${ip_tos_found}" = "xyes"; then
-  has_ip_tos=1
-  AC_MSG_RESULT([found])
-else
-  has_ip_tos=0
-  AC_MSG_RESULT([not found])
-fi
-AC_SUBST(has_ip_tos)
+AC_TRY_COMPILE([
+#include <sys/socket.h>
+#include <netinet/in.h>
+#include <netinet/ip.h>
+],[
+if( IP_TOS > 0) return 0;
+else return 1;
+], [has_ip_tos=1]
+msg=yes, [
+has_ip_tos=0
+msg=no ] )
 
+AC_MSG_RESULT([$msg])
+AC_SUBST(has_ip_tos)
 
 TS_CHECK_LOOPBACK_IFACE
 TS_CHECK_GETHOSTBYNAME_R_STYLE