Jeff Thompson | ff092f5 | 2013-06-19 13:38:12 -0700 | [diff] [blame] | 1 | AC_INIT([ndn-cpp], [0.5], [], |
| 2 | [ndn-cpp], [https://github.com/named-data/ndn-cpp]) |
| 3 | AC_PREREQ([2.59]) |
| 4 | AM_INIT_AUTOMAKE([1.10 -Wall no-define foreign]) |
| 5 | |
| 6 | AC_CONFIG_HEADERS([config.h]) |
Jeff Thompson | 47053ad | 2013-08-05 10:36:53 -0700 | [diff] [blame] | 7 | AM_MAINTAINER_MODE |
Jeff Thompson | ff092f5 | 2013-06-19 13:38:12 -0700 | [diff] [blame] | 8 | AC_PROG_CXX |
Jeff Thompson | 3b3aabf | 2013-06-21 16:50:20 -0700 | [diff] [blame] | 9 | AC_PROG_RANLIB |
| 10 | AM_PROG_AR |
Jeff Thompson | 1a1b4c0 | 2013-06-28 22:28:51 -0700 | [diff] [blame] | 11 | AM_PROG_CC_C_O |
Jeff Thompson | ff092f5 | 2013-06-19 13:38:12 -0700 | [diff] [blame] | 12 | AC_LANG([C++]) |
Jeff Thompson | 3b3aabf | 2013-06-21 16:50:20 -0700 | [diff] [blame] | 13 | |
Jeff Thompson | 1b8f4c9 | 2013-06-19 16:18:46 -0700 | [diff] [blame] | 14 | AX_CXX_COMPILE_STDCXX_11(, optional) |
Jeff Thompson | ff092f5 | 2013-06-19 13:38:12 -0700 | [diff] [blame] | 15 | |
| 16 | AC_MSG_CHECKING([for std::shared_ptr]) |
| 17 | AC_COMPILE_IFELSE([AC_LANG_PROGRAM( |
| 18 | [[#include <memory>]] |
| 19 | [[std::shared_ptr<int> have_shared_ptr;]]) |
| 20 | ], [ |
| 21 | AC_MSG_RESULT([yes]) |
| 22 | AC_DEFINE_UNQUOTED([HAVE_STD_SHARED_PTR], 1, [1 if have the `std::shared_ptr' class.]) |
| 23 | ], [ |
| 24 | AC_MSG_RESULT([no]) |
| 25 | AC_DEFINE_UNQUOTED([HAVE_STD_SHARED_PTR], 0, [1 if have the `std::shared_ptr' class.]) |
| 26 | ]) |
Jeff Thompson | 9e9ea9f | 2013-06-22 10:31:18 -0700 | [diff] [blame] | 27 | AC_MSG_CHECKING([for boost::shared_ptr]) |
Jeff Thompson | ff092f5 | 2013-06-19 13:38:12 -0700 | [diff] [blame] | 28 | AC_COMPILE_IFELSE([AC_LANG_PROGRAM( |
| 29 | [[#include <boost/shared_ptr.hpp>]] |
| 30 | [[boost::shared_ptr<int> have_shared_ptr;]]) |
| 31 | ], [ |
| 32 | AC_MSG_RESULT([yes]) |
| 33 | AC_DEFINE_UNQUOTED([HAVE_BOOST_SHARED_PTR], 1, [1 if have the `boost::shared_ptr' class.]) |
| 34 | ], [ |
| 35 | AC_MSG_RESULT([no]) |
| 36 | AC_DEFINE_UNQUOTED([HAVE_BOOST_SHARED_PTR], 0, [1 if have the `boost::shared_ptr' class.]) |
| 37 | ]) |
| 38 | |
Jeff Thompson | d4a1e16 | 2013-07-11 12:41:31 -0700 | [diff] [blame] | 39 | AC_MSG_CHECKING([for memcmp]) |
| 40 | AC_COMPILE_IFELSE([AC_LANG_PROGRAM( |
| 41 | [[#include <memory.h>]] |
| 42 | [[void test() { unsigned char buffer[1]; memcmp(buffer, buffer, 1); }]]) |
| 43 | ], [ |
| 44 | AC_MSG_RESULT([yes]) |
| 45 | AC_DEFINE_UNQUOTED([HAVE_MEMCMP], 1, [1 if have memcmp in memory.h.]) |
| 46 | ], [ |
| 47 | AC_MSG_RESULT([no]) |
| 48 | AC_DEFINE_UNQUOTED([HAVE_MEMCMP], 0, [1 if have memcmp in memory.h.]) |
| 49 | ]) |
Jeff Thompson | c804d52 | 2013-06-27 16:54:27 -0700 | [diff] [blame] | 50 | AC_MSG_CHECKING([for memcpy]) |
| 51 | AC_COMPILE_IFELSE([AC_LANG_PROGRAM( |
| 52 | [[#include <memory.h>]] |
| 53 | [[void test() { unsigned char buffer[1]; memcpy(buffer, buffer, 1); }]]) |
| 54 | ], [ |
| 55 | AC_MSG_RESULT([yes]) |
| 56 | AC_DEFINE_UNQUOTED([HAVE_MEMCPY], 1, [1 if have memcpy in memory.h.]) |
| 57 | ], [ |
| 58 | AC_MSG_RESULT([no]) |
| 59 | AC_DEFINE_UNQUOTED([HAVE_MEMCPY], 0, [1 if have memcpy in memory.h.]) |
| 60 | ]) |
| 61 | AC_MSG_CHECKING([for memset]) |
| 62 | AC_COMPILE_IFELSE([AC_LANG_PROGRAM( |
| 63 | [[#include <memory.h>]] |
| 64 | [[void test() { unsigned char buffer[1]; memset(buffer, 0, 1); }]]) |
| 65 | ], [ |
| 66 | AC_MSG_RESULT([yes]) |
| 67 | AC_DEFINE_UNQUOTED([HAVE_MEMSET], 1, [1 if have memset in memory.h.]) |
| 68 | ], [ |
| 69 | AC_MSG_RESULT([no]) |
| 70 | AC_DEFINE_UNQUOTED([HAVE_MEMSET], 0, [1 if have memset in memory.h.]) |
| 71 | ]) |
| 72 | |
Jeff Thompson | ca45e55 | 2013-06-26 17:40:06 -0700 | [diff] [blame] | 73 | DX_HTML_FEATURE(ON) |
| 74 | DX_CHM_FEATURE(OFF) |
| 75 | DX_CHI_FEATURE(OFF) |
| 76 | DX_MAN_FEATURE(OFF) |
| 77 | DX_RTF_FEATURE(OFF) |
| 78 | DX_XML_FEATURE(OFF) |
| 79 | DX_PDF_FEATURE(OFF) |
| 80 | DX_PS_FEATURE(OFF) |
| 81 | DX_INIT_DOXYGEN([$PACKAGE_NAME],[Doxyfile]) |
| 82 | |
Jeff Thompson | ff092f5 | 2013-06-19 13:38:12 -0700 | [diff] [blame] | 83 | AC_CONFIG_FILES([Makefile]) |
| 84 | AC_OUTPUT |