fix open source build
[folly.git] / folly / configure.ac
index 99b4fbbe6380c0ab6346a1833730751e36b79778..023a9fb6e8525dad72ea11e579c1b950d72d4036 100644 (file)
@@ -3,13 +3,14 @@
 # Process this file with autoconf to produce a configure script.
 
 AC_PREREQ(2.59)
-AC_INIT(folly, 0.1, folly@fb.com)
 
-m4_define([folly_libtool_current], [1])
+m4_define([folly_version_str], m4_esyscmd_s([cat VERSION]))
+
+AC_INIT([folly], m4_translit(folly_version_str, [:], [.]), [folly@fb.com])
 
 # We assume all revisions are backwards incompatible.
-LT_VERSION=folly_libtool_current:0:0
-AC_SUBST(LT_VERSION)
+LT_VERSION=folly_version_str:0
+AC_SUBST([LT_VERSION])
 
 AC_CONFIG_SRCDIR([Likely.h])
 AC_CONFIG_HEADERS([config.h])
@@ -57,6 +58,11 @@ AC_CHECK_LIB([glog],[openlog],[],[AC_MSG_ERROR(
 AC_CHECK_LIB([gflags],[getenv],[],[AC_MSG_ERROR(
              [Please install google-gflags library])])
 
+AC_CHECK_LIB(ssl,
+        SSL_ctrl,
+        [],
+        [AC_MSG_ERROR(["Error: libssl required"])])
+
 # check for boost libs
 AX_BOOST_BASE([1.20.0], [], [AC_MSG_ERROR(
               [Please install boost >= 1.20.0 (thread, regex, and system)])])
@@ -71,13 +77,13 @@ AC_CHECK_HEADERS([fcntl.h features.h inttypes.h limits.h stdint.h stdlib.h strin
 
 AC_CHECK_HEADER(double-conversion/double-conversion.h, [], [AC_MSG_ERROR(
                 [Couldn't find double-conversion.h, please download from \
-                http://code.google.com/p/double-conversion/])], [])
+                 https://github.com/floitsch/double-conversion/])], [])
 AC_CHECK_LIB([double-conversion],[ceil],[],[AC_MSG_ERROR(
              [Please install double-conversion library])])
 
 AC_CHECK_LIB([event], [event_set], [], [AC_MSG_ERROR([Unable to find libevent])])
 
-AC_CHECK_LIB([jemalloc], [rallocm])
+AC_CHECK_LIB([jemalloc], [xallocx])
 
 # Checks for typedefs, structures, and compiler characteristics.
 AC_HEADER_STDBOOL
@@ -86,10 +92,8 @@ AC_C_INLINE
 AC_TYPE_SIZE_T
 AC_HEADER_TIME
 AC_C_VOLATILE
-AC_CHECK_TYPE([__int128],
-  [AC_DEFINE([HAVE_INT128_T], [1], [Define if __int128 exists])],
-  [AC_DEFINE([HAVE_INT128_T], [0], [Define if __int128 does not exist])])
-AC_CHECK_TYPES([ptrdiff_t])
+AC_CHECK_TYPE([__int128], AC_DEFINE([HAVE_INT128_T], [1], [Define if we have __int128]))
+AC_CHECK_TYPES([ptrdiff_t, pthread_spinlock_t])
 
 AC_CACHE_CHECK(
   [for ifunc support],
@@ -268,7 +272,7 @@ AC_CHECK_FUNCS([getdelim \
                 pow \
                 strerror \
                 pthread_yield \
-                rallocm \
+                pthread_atfork \
                 malloc_size \
                 malloc_usable_size \
                 memrchr \
@@ -298,7 +302,7 @@ AM_CONDITIONAL([HAVE_X86_64], [test "$build_cpu" = "x86_64"])
 AM_CONDITIONAL([HAVE_LINUX], [test "$build_os" == "linux-gnu"])
 AM_CONDITIONAL([HAVE_WEAK_SYMBOLS],
                [test "$folly_cv_prog_cc_weak_symbols" = "yes"])
-AM_CONDITIONAL([HAVE_BITS_FUNCTEXCEPT], [test "$ac_cv_header_bits_functexcept" = "yes"])
+AM_CONDITIONAL([HAVE_BITS_FUNCTEXCEPT], [test "$ac_cv_header_bits_functexcept_h" = "yes"])
 
 # Output
 AC_CONFIG_FILES([Makefile