blob: 70213430a0f20a0d0404f473ed9c3c7481a31169 [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 Thompson1a1b4c02013-06-28 22:28:51 -070010AM_PROG_CC_C_O
Jeff Thompsonff092f52013-06-19 13:38:12 -070011AC_LANG([C++])
Jeff Thompson3b3aabf2013-06-21 16:50:20 -070012
Jeff Thompson1b8f4c92013-06-19 16:18:46 -070013AX_CXX_COMPILE_STDCXX_11(, optional)
Jeff Thompsonff092f52013-06-19 13:38:12 -070014
15AC_MSG_CHECKING([for std::shared_ptr])
16AC_COMPILE_IFELSE([AC_LANG_PROGRAM(
17 [[#include <memory>]]
18 [[std::shared_ptr<int> have_shared_ptr;]])
19], [
20 AC_MSG_RESULT([yes])
21 AC_DEFINE_UNQUOTED([HAVE_STD_SHARED_PTR], 1, [1 if have the `std::shared_ptr' class.])
22], [
23 AC_MSG_RESULT([no])
24 AC_DEFINE_UNQUOTED([HAVE_STD_SHARED_PTR], 0, [1 if have the `std::shared_ptr' class.])
25])
Jeff Thompson9e9ea9f2013-06-22 10:31:18 -070026AC_MSG_CHECKING([for boost::shared_ptr])
Jeff Thompsonff092f52013-06-19 13:38:12 -070027AC_COMPILE_IFELSE([AC_LANG_PROGRAM(
28 [[#include <boost/shared_ptr.hpp>]]
29 [[boost::shared_ptr<int> have_shared_ptr;]])
30], [
31 AC_MSG_RESULT([yes])
32 AC_DEFINE_UNQUOTED([HAVE_BOOST_SHARED_PTR], 1, [1 if have the `boost::shared_ptr' class.])
33], [
34 AC_MSG_RESULT([no])
35 AC_DEFINE_UNQUOTED([HAVE_BOOST_SHARED_PTR], 0, [1 if have the `boost::shared_ptr' class.])
36])
37
Jeff Thompsond4a1e162013-07-11 12:41:31 -070038AC_MSG_CHECKING([for memcmp])
39AC_COMPILE_IFELSE([AC_LANG_PROGRAM(
40 [[#include <memory.h>]]
41 [[void test() { unsigned char buffer[1]; memcmp(buffer, buffer, 1); }]])
42], [
43 AC_MSG_RESULT([yes])
44 AC_DEFINE_UNQUOTED([HAVE_MEMCMP], 1, [1 if have memcmp in memory.h.])
45], [
46 AC_MSG_RESULT([no])
47 AC_DEFINE_UNQUOTED([HAVE_MEMCMP], 0, [1 if have memcmp in memory.h.])
48])
Jeff Thompsonc804d522013-06-27 16:54:27 -070049AC_MSG_CHECKING([for memcpy])
50AC_COMPILE_IFELSE([AC_LANG_PROGRAM(
51 [[#include <memory.h>]]
52 [[void test() { unsigned char buffer[1]; memcpy(buffer, buffer, 1); }]])
53], [
54 AC_MSG_RESULT([yes])
55 AC_DEFINE_UNQUOTED([HAVE_MEMCPY], 1, [1 if have memcpy in memory.h.])
56], [
57 AC_MSG_RESULT([no])
58 AC_DEFINE_UNQUOTED([HAVE_MEMCPY], 0, [1 if have memcpy in memory.h.])
59])
60AC_MSG_CHECKING([for memset])
61AC_COMPILE_IFELSE([AC_LANG_PROGRAM(
62 [[#include <memory.h>]]
63 [[void test() { unsigned char buffer[1]; memset(buffer, 0, 1); }]])
64], [
65 AC_MSG_RESULT([yes])
66 AC_DEFINE_UNQUOTED([HAVE_MEMSET], 1, [1 if have memset in memory.h.])
67], [
68 AC_MSG_RESULT([no])
69 AC_DEFINE_UNQUOTED([HAVE_MEMSET], 0, [1 if have memset in memory.h.])
70])
71
Jeff Thompsonca45e552013-06-26 17:40:06 -070072DX_HTML_FEATURE(ON)
73DX_CHM_FEATURE(OFF)
74DX_CHI_FEATURE(OFF)
75DX_MAN_FEATURE(OFF)
76DX_RTF_FEATURE(OFF)
77DX_XML_FEATURE(OFF)
78DX_PDF_FEATURE(OFF)
79DX_PS_FEATURE(OFF)
80DX_INIT_DOXYGEN([$PACKAGE_NAME],[Doxyfile])
81
Jeff Thompsonff092f52013-06-19 13:38:12 -070082AC_CONFIG_FILES([Makefile])
83AC_OUTPUT