blob: 9b3002ad1488114b8470d53e0d35e4f7990e1109 [file] [log] [blame]
Jeff Thompsonff092f52013-06-19 13:38:12 -07001AC_PREREQ([2.59])
Jeff Thompson93a24162013-09-27 13:28:13 -07002AC_INIT([ndn-cpp], [0.2], [ndn-lib@lists.cs.ucla.edu], [ndn-cpp], [https://github.com/named-data/ndn-cpp])
Jeff Thompsonff092f52013-06-19 13:38:12 -07003AM_INIT_AUTOMAKE([1.10 -Wall no-define foreign])
4
Jeff Thompson93a24162013-09-27 13:28:13 -07005AC_CONFIG_SRCDIR([config.h.in])
Jeff Thompson649e95f2013-10-08 17:13:09 -07006AC_CONFIG_HEADERS([ndn-cpp/ndn-cpp-config.h:config.h.in])
Jeff Thompson47053ad2013-08-05 10:36:53 -07007AM_MAINTAINER_MODE
Jeff Thompson3b3aabf2013-06-21 16:50:20 -07008AM_PROG_AR
Jeff Thompson4f031642013-08-05 11:03:16 -07009AC_PROG_LIBTOOL
10AC_PROG_CXX
Jeff Thompson1a1b4c02013-06-28 22:28:51 -070011AM_PROG_CC_C_O
Jeff Thompsonfcc4daa2013-10-01 14:52:23 -070012AC_PROG_OBJCXX
Jeff Thompsonff092f52013-06-19 13:38:12 -070013AC_LANG([C++])
Jeff Thompson965a3242013-10-02 09:59:35 -070014AX_LIB_SQLITE3()
Jeff Thompson32a23332013-10-07 18:39:00 -070015AC_TYPE_SIZE_T
16AC_TYPE_INT8_T
17AC_TYPE_INT16_T
18AC_TYPE_INT32_T
19AC_TYPE_INT64_T
20AC_TYPE_UINT8_T
21AC_TYPE_UINT16_T
22AC_TYPE_UINT32_T
23AC_TYPE_UINT64_T
24AC_CHECK_FUNCS([memcmp])
25AC_CHECK_FUNCS([memcpy])
26AC_CHECK_FUNCS([memset])
Jeff Thompson3b3aabf2013-06-21 16:50:20 -070027
Jeff Thompson1b8f4c92013-06-19 16:18:46 -070028AX_CXX_COMPILE_STDCXX_11(, optional)
Jeff Thompson8a055e02013-08-09 10:44:28 -070029AC_CHECK_LIB([crypto], [EVP_EncryptInit], [],
30 [AC_MSG_FAILURE([can't find openssl crypto lib])])
Jeff Thompsonff092f52013-06-19 13:38:12 -070031
32AC_MSG_CHECKING([for std::shared_ptr])
33AC_COMPILE_IFELSE([AC_LANG_PROGRAM(
34 [[#include <memory>]]
35 [[std::shared_ptr<int> have_shared_ptr;]])
36], [
37 AC_MSG_RESULT([yes])
38 AC_DEFINE_UNQUOTED([HAVE_STD_SHARED_PTR], 1, [1 if have the `std::shared_ptr' class.])
39], [
40 AC_MSG_RESULT([no])
41 AC_DEFINE_UNQUOTED([HAVE_STD_SHARED_PTR], 0, [1 if have the `std::shared_ptr' class.])
42])
Jeff Thompson9e9ea9f2013-06-22 10:31:18 -070043AC_MSG_CHECKING([for boost::shared_ptr])
Jeff Thompsonff092f52013-06-19 13:38:12 -070044AC_COMPILE_IFELSE([AC_LANG_PROGRAM(
45 [[#include <boost/shared_ptr.hpp>]]
46 [[boost::shared_ptr<int> have_shared_ptr;]])
47], [
48 AC_MSG_RESULT([yes])
49 AC_DEFINE_UNQUOTED([HAVE_BOOST_SHARED_PTR], 1, [1 if have the `boost::shared_ptr' class.])
50], [
51 AC_MSG_RESULT([no])
52 AC_DEFINE_UNQUOTED([HAVE_BOOST_SHARED_PTR], 0, [1 if have the `boost::shared_ptr' class.])
53])
54
Jeff Thompsona28eed82013-08-22 16:21:10 -070055AC_MSG_CHECKING([for std::function])
56AC_COMPILE_IFELSE([AC_LANG_PROGRAM(
57 [[#include <functional>]]
58 [[std::function<int> have_function();]])
59], [
60 AC_MSG_RESULT([yes])
61 AC_DEFINE_UNQUOTED([HAVE_STD_FUNCTION], 1, [1 if have the `std::function' class.])
62], [
63 AC_MSG_RESULT([no])
64 AC_DEFINE_UNQUOTED([HAVE_STD_FUNCTION], 0, [1 if have the `std::function' class.])
65])
66AC_MSG_CHECKING([for boost::function])
67AC_COMPILE_IFELSE([AC_LANG_PROGRAM(
68 [[#include <boost/function.hpp>]]
69 [[boost::function<int> have_function();]])
70], [
71 AC_MSG_RESULT([yes])
72 AC_DEFINE_UNQUOTED([HAVE_BOOST_FUNCTION], 1, [1 if have the `boost::function' class.])
73], [
74 AC_MSG_RESULT([no])
75 AC_DEFINE_UNQUOTED([HAVE_BOOST_FUNCTION], 0, [1 if have the `boost::function' class.])
76])
77
Jeff Thompson9cf9dfb2013-10-04 16:36:52 -070078AC_MSG_CHECKING([for OSX SecKeychain])
79AC_COMPILE_IFELSE([AC_LANG_PROGRAM(
80 [[#include <CoreFoundation/CoreFoundation.h>]]
81 [[#include <Security/Security.h>]]
82 [[#include <CoreServices/CoreServices.h>]]
83 [[void test() { SecKeychainRef x; }]])
84], [
85 AC_MSG_RESULT([yes])
86 AC_DEFINE_UNQUOTED([HAVE_OSX_SECKEYCHAIN], 1, [1 if have OSX SecKeychain.])
87], [
88 AC_MSG_RESULT([no])
89 AC_DEFINE_UNQUOTED([HAVE_OSX_SECKEYCHAIN], 0, [1 if have OSX SecKeychain.])
90])
91
Jeff Thompsonca45e552013-06-26 17:40:06 -070092DX_HTML_FEATURE(ON)
93DX_CHM_FEATURE(OFF)
94DX_CHI_FEATURE(OFF)
95DX_MAN_FEATURE(OFF)
96DX_RTF_FEATURE(OFF)
97DX_XML_FEATURE(OFF)
98DX_PDF_FEATURE(OFF)
99DX_PS_FEATURE(OFF)
100DX_INIT_DOXYGEN([$PACKAGE_NAME],[Doxyfile])
101
Jeff Thompsonff092f52013-06-19 13:38:12 -0700102AC_CONFIG_FILES([Makefile])
103AC_OUTPUT