blob: 4bcfd0fd799985949a40b36db19b9b327ac8baad [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 Thompsonb3768ae2013-08-08 21:22:45 -070015AX_CHECK_OPENSSL
Jeff Thompsonff092f52013-06-19 13:38:12 -070016
17AC_MSG_CHECKING([for std::shared_ptr])
18AC_COMPILE_IFELSE([AC_LANG_PROGRAM(
19 [[#include <memory>]]
20 [[std::shared_ptr<int> have_shared_ptr;]])
21], [
22 AC_MSG_RESULT([yes])
23 AC_DEFINE_UNQUOTED([HAVE_STD_SHARED_PTR], 1, [1 if have the `std::shared_ptr' class.])
24], [
25 AC_MSG_RESULT([no])
26 AC_DEFINE_UNQUOTED([HAVE_STD_SHARED_PTR], 0, [1 if have the `std::shared_ptr' class.])
27])
Jeff Thompson9e9ea9f2013-06-22 10:31:18 -070028AC_MSG_CHECKING([for boost::shared_ptr])
Jeff Thompsonff092f52013-06-19 13:38:12 -070029AC_COMPILE_IFELSE([AC_LANG_PROGRAM(
30 [[#include <boost/shared_ptr.hpp>]]
31 [[boost::shared_ptr<int> have_shared_ptr;]])
32], [
33 AC_MSG_RESULT([yes])
34 AC_DEFINE_UNQUOTED([HAVE_BOOST_SHARED_PTR], 1, [1 if have the `boost::shared_ptr' class.])
35], [
36 AC_MSG_RESULT([no])
37 AC_DEFINE_UNQUOTED([HAVE_BOOST_SHARED_PTR], 0, [1 if have the `boost::shared_ptr' class.])
38])
39
Jeff Thompsond4a1e162013-07-11 12:41:31 -070040AC_MSG_CHECKING([for memcmp])
41AC_COMPILE_IFELSE([AC_LANG_PROGRAM(
42 [[#include <memory.h>]]
43 [[void test() { unsigned char buffer[1]; memcmp(buffer, buffer, 1); }]])
44], [
45 AC_MSG_RESULT([yes])
46 AC_DEFINE_UNQUOTED([HAVE_MEMCMP], 1, [1 if have memcmp in memory.h.])
47], [
48 AC_MSG_RESULT([no])
49 AC_DEFINE_UNQUOTED([HAVE_MEMCMP], 0, [1 if have memcmp in memory.h.])
50])
Jeff Thompsonc804d522013-06-27 16:54:27 -070051AC_MSG_CHECKING([for memcpy])
52AC_COMPILE_IFELSE([AC_LANG_PROGRAM(
53 [[#include <memory.h>]]
54 [[void test() { unsigned char buffer[1]; memcpy(buffer, buffer, 1); }]])
55], [
56 AC_MSG_RESULT([yes])
57 AC_DEFINE_UNQUOTED([HAVE_MEMCPY], 1, [1 if have memcpy in memory.h.])
58], [
59 AC_MSG_RESULT([no])
60 AC_DEFINE_UNQUOTED([HAVE_MEMCPY], 0, [1 if have memcpy in memory.h.])
61])
62AC_MSG_CHECKING([for memset])
63AC_COMPILE_IFELSE([AC_LANG_PROGRAM(
64 [[#include <memory.h>]]
65 [[void test() { unsigned char buffer[1]; memset(buffer, 0, 1); }]])
66], [
67 AC_MSG_RESULT([yes])
68 AC_DEFINE_UNQUOTED([HAVE_MEMSET], 1, [1 if have memset in memory.h.])
69], [
70 AC_MSG_RESULT([no])
71 AC_DEFINE_UNQUOTED([HAVE_MEMSET], 0, [1 if have memset in memory.h.])
72])
73
Jeff Thompsonca45e552013-06-26 17:40:06 -070074DX_HTML_FEATURE(ON)
75DX_CHM_FEATURE(OFF)
76DX_CHI_FEATURE(OFF)
77DX_MAN_FEATURE(OFF)
78DX_RTF_FEATURE(OFF)
79DX_XML_FEATURE(OFF)
80DX_PDF_FEATURE(OFF)
81DX_PS_FEATURE(OFF)
82DX_INIT_DOXYGEN([$PACKAGE_NAME],[Doxyfile])
83
Jeff Thompsonff092f52013-06-19 13:38:12 -070084AC_CONFIG_FILES([Makefile])
85AC_OUTPUT