You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@trafficserver.apache.org by pq...@apache.org on 2009/11/26 03:53:19 UTC
svn commit: r884379 - in /incubator/trafficserver/traffic/trunk:
configure.ac libinktomi++/ink_platform.h
Author: pquerna
Date: Thu Nov 26 02:53:19 2009
New Revision: 884379
URL: http://svn.apache.org/viewvc?rev=884379&view=rev
Log:
TS-2: Work on making configure.ac usable.
* configure.ac: Don't error out if we can't find that ancient db185 symbol.
* configure.ac: Check for various headers.
* libinktomi++/ink_platform.h: Use HAVE_ defines to detect if a header is available, rather than looking for specific operating systems.
Modified:
incubator/trafficserver/traffic/trunk/configure.ac
incubator/trafficserver/traffic/trunk/libinktomi++/ink_platform.h
Modified: incubator/trafficserver/traffic/trunk/configure.ac
URL: http://svn.apache.org/viewvc/incubator/trafficserver/traffic/trunk/configure.ac?rev=884379&r1=884378&r2=884379&view=diff
==============================================================================
--- incubator/trafficserver/traffic/trunk/configure.ac (original)
+++ incubator/trafficserver/traffic/trunk/configure.ac Thu Nov 26 02:53:19 2009
@@ -370,11 +370,6 @@
AC_CHECK_LIB([rt],[clock_gettime],[AC_SUBST([LIBRT],["-lrt"])])
AC_CHECK_LIB([posix4],[clock_gettime],[AC_SUBST([LIBRT],["-lposix4"])])
-AC_CHECK_FUNC([gnu_get_libc_version],
- [],
- [AC_MSG_FAILURE([check for glibc failed. Have you installed glibc-devel?])]
-)
-
AC_CHECK_LIB([ssl],[SSL_CTX_new],
[AC_SUBST([LIBSSL],["-lssl -lcrypto"])
AC_DEFINE([HAVE_LIBSSL],[1],[Define if you have libssl])
@@ -403,12 +398,25 @@
[$LIBTHREAD]
)
+ts_have_db=0
AC_CHECK_LIB([db],[__db185_open],
- [LIBDB="-ldb"],
- [AC_MSG_FAILURE([check for libdb failed. Have you installed db4-devel?])]
+ [LIBDB="-ldb"
+ ts_have_db=1
+ ],
+ [AC_MSG_WARN([check for libdb failed. Have you installed db4-devel?])]
)
-AC_CHECK_LIB([c],[dbopen],[LIBDB=""])
+
+AC_CHECK_LIB([c],[dbopen],
+ [LIBDB=""
+ ts_have_db=1
+ ])
AC_SUBST([LIBDB])
+
+if test "$ts_have_db" = "0"; then
+ AC_MSG_FAILURE([No DB interface found])
+fi
+
+
# For SunPro 5.2 - we need the demangle symbol for
# ink_stack_trace.cc in libinktomi++. Because this
@@ -429,6 +437,8 @@
AC_CHECK_HEADER([execinfo.h],[],[])
+AC_CHECK_HEADERS([sys/epoll.h sys/event.h machine/endian.h endian.h sys/sysinfo.h sys/sysctl.h sys/systeminfo.h netinet/ip.h sys/ioctl.h sys/byteorder.h sys/sockio.h sys/sysctl.h sys/sysinfo.h sys/systeminfo.h arpa/nameser_compat.h], [], [])
+
#
# use modular IOCORE
#
Modified: incubator/trafficserver/traffic/trunk/libinktomi++/ink_platform.h
URL: http://svn.apache.org/viewvc/incubator/trafficserver/traffic/trunk/libinktomi%2B%2B/ink_platform.h?rev=884379&r1=884378&r2=884379&view=diff
==============================================================================
--- incubator/trafficserver/traffic/trunk/libinktomi++/ink_platform.h (original)
+++ incubator/trafficserver/traffic/trunk/libinktomi++/ink_platform.h Thu Nov 26 02:53:19 2009
@@ -100,7 +100,6 @@
#include <stropts.h>
#endif
-#ifdef __alpha
//
// Gnu C++ doesn't define __STDC__ == 0 as needed to
// have ip_hl be defined.
@@ -108,23 +107,29 @@
#if defined(__GNUC__) && !defined(__STDC__)
#define __STDC__ 0
#endif
+
+#ifdef HAVE_NETINET_IP_H
# include <netinet/ip.h>
+#endif
+
+#ifdef HAVE_MACHINE_ENDIAN_H
# include <machine/endian.h>
-# include <sys/ioctl.h>
-#elif (HOST_OS == linux)
-# include <netinet/ip.h>
+#endif
+
+#ifdef HAVE_ENDIAN_H
# include <endian.h>
+#endif
+
+#ifdef HAVE_SYS_IOCTL_H
# include <sys/ioctl.h>
-# ifdef __KERNEL__
-# include <linux/sockios.h>
-# endif
-#elif (HOST_OS == freebsd)
-# include <netinet/ip.h>
-# include <machine/endian.h>
-# include <sys/ioctl.h>
-#else
-# include <netinet/ip.h>
+#endif
+
+
+#ifdef HAVE_SYS_BYTEORDER_H
# include <sys/byteorder.h>
+#endif
+
+#ifdef HAVE_SYS_SOCKIO_H
# include <sys/sockio.h>
#endif
@@ -141,14 +146,22 @@
typedef unsigned int in_addr_t;
#endif
-#if (HOST_OS == linux)
-#include <sys/sysinfo.h>
-#elif (HOST_OS == freebsd)
-#include <sys/sysctl.h>
-#else
-#include <sys/systeminfo.h>
+#ifdef HAVE_SYS_SYSINFO_H
+# include <sys/sysinfo.h>
+#endif
+
+#ifdef HAVE_SYS_SYSCTL_H
+# include <sys/sysctl.h>
+#endif
+
+#ifdef HAVE_SYS_SYSTEMINFO_H
+# include <sys/systeminfo.h>
#endif
#include <dlfcn.h>
+#ifdef HAVE_ARPA_NAMESER_COMPAT_H
+# include <arpa/nameser_compat.h>
+#endif
+
#endif /* _PLATFORM_H_ */