blob: e52453c5bbbf732ea05a822247039d4473796859 [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 Thompsonff092f52013-06-19 13:38:12 -07006AC_CONFIG_HEADERS([config.h])
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 Thompson3b3aabf2013-06-21 16:50:20 -070014
Jeff Thompson1b8f4c92013-06-19 16:18:46 -070015AX_CXX_COMPILE_STDCXX_11(, optional)
Jeff Thompson8a055e02013-08-09 10:44:28 -070016AC_CHECK_LIB([crypto], [EVP_EncryptInit], [],
17 [AC_MSG_FAILURE([can't find openssl crypto lib])])
Jeff Thompsonff092f52013-06-19 13:38:12 -070018
19AC_MSG_CHECKING([for std::shared_ptr])
20AC_COMPILE_IFELSE([AC_LANG_PROGRAM(
21 [[#include <memory>]]
22 [[std::shared_ptr<int> have_shared_ptr;]])
23], [
24 AC_MSG_RESULT([yes])
25 AC_DEFINE_UNQUOTED([HAVE_STD_SHARED_PTR], 1, [1 if have the `std::shared_ptr' class.])
26], [
27 AC_MSG_RESULT([no])
28 AC_DEFINE_UNQUOTED([HAVE_STD_SHARED_PTR], 0, [1 if have the `std::shared_ptr' class.])
29])
Jeff Thompson9e9ea9f2013-06-22 10:31:18 -070030AC_MSG_CHECKING([for boost::shared_ptr])
Jeff Thompsonff092f52013-06-19 13:38:12 -070031AC_COMPILE_IFELSE([AC_LANG_PROGRAM(
32 [[#include <boost/shared_ptr.hpp>]]
33 [[boost::shared_ptr<int> have_shared_ptr;]])
34], [
35 AC_MSG_RESULT([yes])
36 AC_DEFINE_UNQUOTED([HAVE_BOOST_SHARED_PTR], 1, [1 if have the `boost::shared_ptr' class.])
37], [
38 AC_MSG_RESULT([no])
39 AC_DEFINE_UNQUOTED([HAVE_BOOST_SHARED_PTR], 0, [1 if have the `boost::shared_ptr' class.])
40])
41
Jeff Thompsona28eed82013-08-22 16:21:10 -070042AC_MSG_CHECKING([for std::function])
43AC_COMPILE_IFELSE([AC_LANG_PROGRAM(
44 [[#include <functional>]]
45 [[std::function<int> have_function();]])
46], [
47 AC_MSG_RESULT([yes])
48 AC_DEFINE_UNQUOTED([HAVE_STD_FUNCTION], 1, [1 if have the `std::function' class.])
49], [
50 AC_MSG_RESULT([no])
51 AC_DEFINE_UNQUOTED([HAVE_STD_FUNCTION], 0, [1 if have the `std::function' class.])
52])
53AC_MSG_CHECKING([for boost::function])
54AC_COMPILE_IFELSE([AC_LANG_PROGRAM(
55 [[#include <boost/function.hpp>]]
56 [[boost::function<int> have_function();]])
57], [
58 AC_MSG_RESULT([yes])
59 AC_DEFINE_UNQUOTED([HAVE_BOOST_FUNCTION], 1, [1 if have the `boost::function' class.])
60], [
61 AC_MSG_RESULT([no])
62 AC_DEFINE_UNQUOTED([HAVE_BOOST_FUNCTION], 0, [1 if have the `boost::function' class.])
63])
64
Jeff Thompsond4a1e162013-07-11 12:41:31 -070065AC_MSG_CHECKING([for memcmp])
66AC_COMPILE_IFELSE([AC_LANG_PROGRAM(
67 [[#include <memory.h>]]
68 [[void test() { unsigned char buffer[1]; memcmp(buffer, buffer, 1); }]])
69], [
70 AC_MSG_RESULT([yes])
71 AC_DEFINE_UNQUOTED([HAVE_MEMCMP], 1, [1 if have memcmp in memory.h.])
72], [
73 AC_MSG_RESULT([no])
74 AC_DEFINE_UNQUOTED([HAVE_MEMCMP], 0, [1 if have memcmp in memory.h.])
75])
Jeff Thompsonc804d522013-06-27 16:54:27 -070076AC_MSG_CHECKING([for memcpy])
77AC_COMPILE_IFELSE([AC_LANG_PROGRAM(
78 [[#include <memory.h>]]
79 [[void test() { unsigned char buffer[1]; memcpy(buffer, buffer, 1); }]])
80], [
81 AC_MSG_RESULT([yes])
82 AC_DEFINE_UNQUOTED([HAVE_MEMCPY], 1, [1 if have memcpy in memory.h.])
83], [
84 AC_MSG_RESULT([no])
85 AC_DEFINE_UNQUOTED([HAVE_MEMCPY], 0, [1 if have memcpy in memory.h.])
86])
87AC_MSG_CHECKING([for memset])
88AC_COMPILE_IFELSE([AC_LANG_PROGRAM(
89 [[#include <memory.h>]]
90 [[void test() { unsigned char buffer[1]; memset(buffer, 0, 1); }]])
91], [
92 AC_MSG_RESULT([yes])
93 AC_DEFINE_UNQUOTED([HAVE_MEMSET], 1, [1 if have memset in memory.h.])
94], [
95 AC_MSG_RESULT([no])
96 AC_DEFINE_UNQUOTED([HAVE_MEMSET], 0, [1 if have memset in memory.h.])
97])
98
Jeff Thompson0c13a532013-09-24 15:43:41 -070099AC_MSG_CHECKING([for stdint])
100AC_COMPILE_IFELSE([AC_LANG_PROGRAM(
101 [[#include <stdint.h>]]
102 [[void test() { uint8_t x; }]])
103], [
104 AC_MSG_RESULT([yes])
105 AC_DEFINE_UNQUOTED([HAVE_STDINT], 1, [1 if have stdint.h.])
106], [
107 AC_MSG_RESULT([no])
108 AC_DEFINE_UNQUOTED([HAVE_STDINT], 0, [1 if have stdint.h.])
109])
110
Jeff Thompsonca45e552013-06-26 17:40:06 -0700111DX_HTML_FEATURE(ON)
112DX_CHM_FEATURE(OFF)
113DX_CHI_FEATURE(OFF)
114DX_MAN_FEATURE(OFF)
115DX_RTF_FEATURE(OFF)
116DX_XML_FEATURE(OFF)
117DX_PDF_FEATURE(OFF)
118DX_PS_FEATURE(OFF)
119DX_INIT_DOXYGEN([$PACKAGE_NAME],[Doxyfile])
120
Jeff Thompsonff092f52013-06-19 13:38:12 -0700121AC_CONFIG_FILES([Makefile])
122AC_OUTPUT