pandora-build v0.75. Also fixed visibility which had accidentally been turned off.
[m6w6/libmemcached] / m4 / pandora_canonical.m4
index 5917d28f9cadc6925c5062b83e829fcbe05b80a2..1a0f15ffd7a939ce118bfff88a62b2f9ed7b0f5f 100644 (file)
@@ -4,7 +4,7 @@ dnl gives unlimited permission to copy and/or distribute it,
 dnl with or without modifications, as long as this notice is preserved.
 
 dnl Which version of the canonical setup we're using
 dnl with or without modifications, as long as this notice is preserved.
 
 dnl Which version of the canonical setup we're using
-AC_DEFUN([PANDORA_CANONICAL_VERSION],[0.74])
+AC_DEFUN([PANDORA_CANONICAL_VERSION],[0.75])
 
 AC_DEFUN([PANDORA_FORCE_DEPEND_TRACKING],[
   dnl Force dependency tracking on for Sun Studio builds
 
 AC_DEFUN([PANDORA_FORCE_DEPEND_TRACKING],[
   dnl Force dependency tracking on for Sun Studio builds
@@ -82,6 +82,10 @@ AC_DEFUN([PANDORA_CANONICAL_TARGET],[
 
   PANDORA_LIBTOOL
 
 
   PANDORA_LIBTOOL
 
+  AS_IF([test "$lt_cv_prog_gnu_ld" = "yes"],[
+    AM_LDFLAGS="${AM_LDFLAGS} -Wl,--default-symver"
+  ])
+
   dnl autoconf doesn't automatically provide a fail-if-no-C++ macro
   dnl so we check c++98 features and fail if we don't have them, mainly
   dnl for that reason
   dnl autoconf doesn't automatically provide a fail-if-no-C++ macro
   dnl so we check c++98 features and fail if we don't have them, mainly
   dnl for that reason
@@ -154,6 +158,18 @@ AC_DEFUN([PANDORA_CANONICAL_TARGET],[
   dnl alloca - but we need to know it anyway for check_stack_overrun.
   PANDORA_STACK_DIRECTION
 
   dnl alloca - but we need to know it anyway for check_stack_overrun.
   PANDORA_STACK_DIRECTION
 
+  save_LIBS="${LIBS}"
+  LIBS=""
+  AC_CHECK_LIB(m, floor, [], AC_CHECK_LIB(m, __infinity))
+  LIBM="${LIBS}"
+  LIBS="${save_LIBS}"
+  AC_SUBST([LIBM])
+  
+  AC_CHECK_FUNC(setsockopt, [], [AC_CHECK_LIB(socket, setsockopt)])
+  AC_CHECK_FUNC(bind, [], [AC_CHECK_LIB(bind, bind)])
+
+
+
   PANDORA_OPTIMIZE
 
   AC_LANG_PUSH(C++)
   PANDORA_OPTIMIZE
 
   AC_LANG_PUSH(C++)
@@ -170,10 +186,10 @@ AC_DEFUN([PANDORA_CANONICAL_TARGET],[
   PANDORA_HAVE_GCC_ATOMICS
 
   dnl We need to inject error into the cflags to test if visibility works or not
   PANDORA_HAVE_GCC_ATOMICS
 
   dnl We need to inject error into the cflags to test if visibility works or not
-  dnl save_CFLAGS="${CFLAGS}"
-  dnl CFLAGS="${CFLAGS} -Werror"
-  dnl gl_VISIBILITY
-  dnl CFLAGS="${save_CFLAGS}"
+  save_CFLAGS="${CFLAGS}"
+  CFLAGS="${CFLAGS} -Werror"
+  gl_VISIBILITY
+  CFLAGS="${save_CFLAGS}"
 
   PANDORA_HEADER_ASSERT
 
 
   PANDORA_HEADER_ASSERT
 
@@ -208,5 +224,6 @@ AC_DEFUN([PANDORA_CANONICAL_TARGET],[
   AC_SUBST([AM_CFLAGS])
   AC_SUBST([AM_CXXFLAGS])
   AC_SUBST([AM_CPPFLAGS])
   AC_SUBST([AM_CFLAGS])
   AC_SUBST([AM_CXXFLAGS])
   AC_SUBST([AM_CPPFLAGS])
+  AC_SUBST([AM_LDFLAGS])
 
 ])
 
 ])