blob: ae0303c835f0deecaea4beb0f730ded79b158d7b [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])
7AC_PROG_CXX
Jeff Thompson3b3aabf2013-06-21 16:50:20 -07008AC_PROG_RANLIB
9AM_PROG_AR
Jeff Thompsonff092f52013-06-19 13:38:12 -070010AC_LANG([C++])
Jeff Thompson3b3aabf2013-06-21 16:50:20 -070011
Jeff Thompson1b8f4c92013-06-19 16:18:46 -070012AX_CXX_COMPILE_STDCXX_11(, optional)
Jeff Thompsonff092f52013-06-19 13:38:12 -070013
14AC_MSG_CHECKING([for std::shared_ptr])
15AC_COMPILE_IFELSE([AC_LANG_PROGRAM(
16 [[#include <memory>]]
17 [[std::shared_ptr<int> have_shared_ptr;]])
18], [
19 AC_MSG_RESULT([yes])
20 AC_DEFINE_UNQUOTED([HAVE_STD_SHARED_PTR], 1, [1 if have the `std::shared_ptr' class.])
21], [
22 AC_MSG_RESULT([no])
23 AC_DEFINE_UNQUOTED([HAVE_STD_SHARED_PTR], 0, [1 if have the `std::shared_ptr' class.])
24])
Jeff Thompson9e9ea9f2013-06-22 10:31:18 -070025AC_MSG_CHECKING([for boost::shared_ptr])
Jeff Thompsonff092f52013-06-19 13:38:12 -070026AC_COMPILE_IFELSE([AC_LANG_PROGRAM(
27 [[#include <boost/shared_ptr.hpp>]]
28 [[boost::shared_ptr<int> have_shared_ptr;]])
29], [
30 AC_MSG_RESULT([yes])
31 AC_DEFINE_UNQUOTED([HAVE_BOOST_SHARED_PTR], 1, [1 if have the `boost::shared_ptr' class.])
32], [
33 AC_MSG_RESULT([no])
34 AC_DEFINE_UNQUOTED([HAVE_BOOST_SHARED_PTR], 0, [1 if have the `boost::shared_ptr' class.])
35])
36
Jeff Thompsonc804d522013-06-27 16:54:27 -070037AC_MSG_CHECKING([for memcpy])
38AC_COMPILE_IFELSE([AC_LANG_PROGRAM(
39 [[#include <memory.h>]]
40 [[void test() { unsigned char buffer[1]; memcpy(buffer, buffer, 1); }]])
41], [
42 AC_MSG_RESULT([yes])
43 AC_DEFINE_UNQUOTED([HAVE_MEMCPY], 1, [1 if have memcpy in memory.h.])
44], [
45 AC_MSG_RESULT([no])
46 AC_DEFINE_UNQUOTED([HAVE_MEMCPY], 0, [1 if have memcpy in memory.h.])
47])
48AC_MSG_CHECKING([for memset])
49AC_COMPILE_IFELSE([AC_LANG_PROGRAM(
50 [[#include <memory.h>]]
51 [[void test() { unsigned char buffer[1]; memset(buffer, 0, 1); }]])
52], [
53 AC_MSG_RESULT([yes])
54 AC_DEFINE_UNQUOTED([HAVE_MEMSET], 1, [1 if have memset in memory.h.])
55], [
56 AC_MSG_RESULT([no])
57 AC_DEFINE_UNQUOTED([HAVE_MEMSET], 0, [1 if have memset in memory.h.])
58])
59
Jeff Thompsonca45e552013-06-26 17:40:06 -070060DX_HTML_FEATURE(ON)
61DX_CHM_FEATURE(OFF)
62DX_CHI_FEATURE(OFF)
63DX_MAN_FEATURE(OFF)
64DX_RTF_FEATURE(OFF)
65DX_XML_FEATURE(OFF)
66DX_PDF_FEATURE(OFF)
67DX_PS_FEATURE(OFF)
68DX_INIT_DOXYGEN([$PACKAGE_NAME],[Doxyfile])
69
Jeff Thompsonff092f52013-06-19 13:38:12 -070070AC_CONFIG_FILES([Makefile])
71AC_OUTPUT