blob: 5cfd9ca3ec0727a48af3a5a66f130bb0df05647a [file] [log] [blame]
Jeff Thompsonff092f52013-06-19 13:38:12 -07001AC_INIT([ndn-cpp], [0.5], [],
2 [ndn-cpp], [https://github.com/named-data/ndn-cpp])
3AC_PREREQ([2.59])
4AM_INIT_AUTOMAKE([1.10 -Wall no-define foreign])
5
6AC_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 Thompsonff092f52013-06-19 13:38:12 -070012AC_LANG([C++])
Jeff Thompson3b3aabf2013-06-21 16:50:20 -070013
Jeff Thompson1b8f4c92013-06-19 16:18:46 -070014AX_CXX_COMPILE_STDCXX_11(, optional)
Jeff Thompson8a055e02013-08-09 10:44:28 -070015AC_CHECK_LIB([ssl], [SSL_library_init], [],
16 [AC_MSG_FAILURE([can't find openssl ssl lib])])
17AC_CHECK_LIB([crypto], [EVP_EncryptInit], [],
18 [AC_MSG_FAILURE([can't find openssl crypto lib])])
Jeff Thompsonff092f52013-06-19 13:38:12 -070019
20AC_MSG_CHECKING([for std::shared_ptr])
21AC_COMPILE_IFELSE([AC_LANG_PROGRAM(
22 [[#include <memory>]]
23 [[std::shared_ptr<int> have_shared_ptr;]])
24], [
25 AC_MSG_RESULT([yes])
26 AC_DEFINE_UNQUOTED([HAVE_STD_SHARED_PTR], 1, [1 if have the `std::shared_ptr' class.])
27], [
28 AC_MSG_RESULT([no])
29 AC_DEFINE_UNQUOTED([HAVE_STD_SHARED_PTR], 0, [1 if have the `std::shared_ptr' class.])
30])
Jeff Thompson9e9ea9f2013-06-22 10:31:18 -070031AC_MSG_CHECKING([for boost::shared_ptr])
Jeff Thompsonff092f52013-06-19 13:38:12 -070032AC_COMPILE_IFELSE([AC_LANG_PROGRAM(
33 [[#include <boost/shared_ptr.hpp>]]
34 [[boost::shared_ptr<int> have_shared_ptr;]])
35], [
36 AC_MSG_RESULT([yes])
37 AC_DEFINE_UNQUOTED([HAVE_BOOST_SHARED_PTR], 1, [1 if have the `boost::shared_ptr' class.])
38], [
39 AC_MSG_RESULT([no])
40 AC_DEFINE_UNQUOTED([HAVE_BOOST_SHARED_PTR], 0, [1 if have the `boost::shared_ptr' class.])
41])
42
Jeff Thompsond4a1e162013-07-11 12:41:31 -070043AC_MSG_CHECKING([for memcmp])
44AC_COMPILE_IFELSE([AC_LANG_PROGRAM(
45 [[#include <memory.h>]]
46 [[void test() { unsigned char buffer[1]; memcmp(buffer, buffer, 1); }]])
47], [
48 AC_MSG_RESULT([yes])
49 AC_DEFINE_UNQUOTED([HAVE_MEMCMP], 1, [1 if have memcmp in memory.h.])
50], [
51 AC_MSG_RESULT([no])
52 AC_DEFINE_UNQUOTED([HAVE_MEMCMP], 0, [1 if have memcmp in memory.h.])
53])
Jeff Thompsonc804d522013-06-27 16:54:27 -070054AC_MSG_CHECKING([for memcpy])
55AC_COMPILE_IFELSE([AC_LANG_PROGRAM(
56 [[#include <memory.h>]]
57 [[void test() { unsigned char buffer[1]; memcpy(buffer, buffer, 1); }]])
58], [
59 AC_MSG_RESULT([yes])
60 AC_DEFINE_UNQUOTED([HAVE_MEMCPY], 1, [1 if have memcpy in memory.h.])
61], [
62 AC_MSG_RESULT([no])
63 AC_DEFINE_UNQUOTED([HAVE_MEMCPY], 0, [1 if have memcpy in memory.h.])
64])
65AC_MSG_CHECKING([for memset])
66AC_COMPILE_IFELSE([AC_LANG_PROGRAM(
67 [[#include <memory.h>]]
68 [[void test() { unsigned char buffer[1]; memset(buffer, 0, 1); }]])
69], [
70 AC_MSG_RESULT([yes])
71 AC_DEFINE_UNQUOTED([HAVE_MEMSET], 1, [1 if have memset in memory.h.])
72], [
73 AC_MSG_RESULT([no])
74 AC_DEFINE_UNQUOTED([HAVE_MEMSET], 0, [1 if have memset in memory.h.])
75])
76
Jeff Thompsonca45e552013-06-26 17:40:06 -070077DX_HTML_FEATURE(ON)
78DX_CHM_FEATURE(OFF)
79DX_CHI_FEATURE(OFF)
80DX_MAN_FEATURE(OFF)
81DX_RTF_FEATURE(OFF)
82DX_XML_FEATURE(OFF)
83DX_PDF_FEATURE(OFF)
84DX_PS_FEATURE(OFF)
85DX_INIT_DOXYGEN([$PACKAGE_NAME],[Doxyfile])
86
Jeff Thompsonff092f52013-06-19 13:38:12 -070087AC_CONFIG_FILES([Makefile])
88AC_OUTPUT