Jeff Thompson | ff092f5 | 2013-06-19 13:38:12 -0700 | [diff] [blame] | 1 | AC_PREREQ([2.59]) |
Jeff Thompson | 93a2416 | 2013-09-27 13:28:13 -0700 | [diff] [blame] | 2 | AC_INIT([ndn-cpp], [0.2], [ndn-lib@lists.cs.ucla.edu], [ndn-cpp], [https://github.com/named-data/ndn-cpp]) |
Jeff Thompson | ff092f5 | 2013-06-19 13:38:12 -0700 | [diff] [blame] | 3 | AM_INIT_AUTOMAKE([1.10 -Wall no-define foreign]) |
| 4 | |
Jeff Thompson | 93a2416 | 2013-09-27 13:28:13 -0700 | [diff] [blame] | 5 | AC_CONFIG_SRCDIR([config.h.in]) |
Jeff Thompson | ff092f5 | 2013-06-19 13:38:12 -0700 | [diff] [blame] | 6 | AC_CONFIG_HEADERS([config.h]) |
Jeff Thompson | 47053ad | 2013-08-05 10:36:53 -0700 | [diff] [blame] | 7 | AM_MAINTAINER_MODE |
Jeff Thompson | 3b3aabf | 2013-06-21 16:50:20 -0700 | [diff] [blame] | 8 | AM_PROG_AR |
Jeff Thompson | 4f03164 | 2013-08-05 11:03:16 -0700 | [diff] [blame] | 9 | AC_PROG_LIBTOOL |
| 10 | AC_PROG_CXX |
Jeff Thompson | 1a1b4c0 | 2013-06-28 22:28:51 -0700 | [diff] [blame] | 11 | AM_PROG_CC_C_O |
Jeff Thompson | fcc4daa | 2013-10-01 14:52:23 -0700 | [diff] [blame] | 12 | AC_PROG_OBJCXX |
Jeff Thompson | ff092f5 | 2013-06-19 13:38:12 -0700 | [diff] [blame] | 13 | AC_LANG([C++]) |
Jeff Thompson | 965a324 | 2013-10-02 09:59:35 -0700 | [diff] [blame] | 14 | AX_LIB_SQLITE3() |
Jeff Thompson | 32a2333 | 2013-10-07 18:39:00 -0700 | [diff] [blame] | 15 | AC_TYPE_SIZE_T |
| 16 | AC_TYPE_INT8_T |
| 17 | AC_TYPE_INT16_T |
| 18 | AC_TYPE_INT32_T |
| 19 | AC_TYPE_INT64_T |
| 20 | AC_TYPE_UINT8_T |
| 21 | AC_TYPE_UINT16_T |
| 22 | AC_TYPE_UINT32_T |
| 23 | AC_TYPE_UINT64_T |
| 24 | AC_CHECK_FUNCS([memcmp]) |
| 25 | AC_CHECK_FUNCS([memcpy]) |
| 26 | AC_CHECK_FUNCS([memset]) |
Jeff Thompson | 3b3aabf | 2013-06-21 16:50:20 -0700 | [diff] [blame] | 27 | |
Jeff Thompson | 1b8f4c9 | 2013-06-19 16:18:46 -0700 | [diff] [blame] | 28 | AX_CXX_COMPILE_STDCXX_11(, optional) |
Jeff Thompson | 8a055e0 | 2013-08-09 10:44:28 -0700 | [diff] [blame] | 29 | AC_CHECK_LIB([crypto], [EVP_EncryptInit], [], |
| 30 | [AC_MSG_FAILURE([can't find openssl crypto lib])]) |
Jeff Thompson | ff092f5 | 2013-06-19 13:38:12 -0700 | [diff] [blame] | 31 | |
| 32 | AC_MSG_CHECKING([for std::shared_ptr]) |
| 33 | AC_COMPILE_IFELSE([AC_LANG_PROGRAM( |
| 34 | [[#include <memory>]] |
| 35 | [[std::shared_ptr<int> have_shared_ptr;]]) |
| 36 | ], [ |
| 37 | AC_MSG_RESULT([yes]) |
| 38 | AC_DEFINE_UNQUOTED([HAVE_STD_SHARED_PTR], 1, [1 if have the `std::shared_ptr' class.]) |
| 39 | ], [ |
| 40 | AC_MSG_RESULT([no]) |
| 41 | AC_DEFINE_UNQUOTED([HAVE_STD_SHARED_PTR], 0, [1 if have the `std::shared_ptr' class.]) |
| 42 | ]) |
Jeff Thompson | 9e9ea9f | 2013-06-22 10:31:18 -0700 | [diff] [blame] | 43 | AC_MSG_CHECKING([for boost::shared_ptr]) |
Jeff Thompson | ff092f5 | 2013-06-19 13:38:12 -0700 | [diff] [blame] | 44 | AC_COMPILE_IFELSE([AC_LANG_PROGRAM( |
| 45 | [[#include <boost/shared_ptr.hpp>]] |
| 46 | [[boost::shared_ptr<int> have_shared_ptr;]]) |
| 47 | ], [ |
| 48 | AC_MSG_RESULT([yes]) |
| 49 | AC_DEFINE_UNQUOTED([HAVE_BOOST_SHARED_PTR], 1, [1 if have the `boost::shared_ptr' class.]) |
| 50 | ], [ |
| 51 | AC_MSG_RESULT([no]) |
| 52 | AC_DEFINE_UNQUOTED([HAVE_BOOST_SHARED_PTR], 0, [1 if have the `boost::shared_ptr' class.]) |
| 53 | ]) |
| 54 | |
Jeff Thompson | a28eed8 | 2013-08-22 16:21:10 -0700 | [diff] [blame] | 55 | AC_MSG_CHECKING([for std::function]) |
| 56 | AC_COMPILE_IFELSE([AC_LANG_PROGRAM( |
| 57 | [[#include <functional>]] |
| 58 | [[std::function<int> have_function();]]) |
| 59 | ], [ |
| 60 | AC_MSG_RESULT([yes]) |
| 61 | AC_DEFINE_UNQUOTED([HAVE_STD_FUNCTION], 1, [1 if have the `std::function' class.]) |
| 62 | ], [ |
| 63 | AC_MSG_RESULT([no]) |
| 64 | AC_DEFINE_UNQUOTED([HAVE_STD_FUNCTION], 0, [1 if have the `std::function' class.]) |
| 65 | ]) |
| 66 | AC_MSG_CHECKING([for boost::function]) |
| 67 | AC_COMPILE_IFELSE([AC_LANG_PROGRAM( |
| 68 | [[#include <boost/function.hpp>]] |
| 69 | [[boost::function<int> have_function();]]) |
| 70 | ], [ |
| 71 | AC_MSG_RESULT([yes]) |
| 72 | AC_DEFINE_UNQUOTED([HAVE_BOOST_FUNCTION], 1, [1 if have the `boost::function' class.]) |
| 73 | ], [ |
| 74 | AC_MSG_RESULT([no]) |
| 75 | AC_DEFINE_UNQUOTED([HAVE_BOOST_FUNCTION], 0, [1 if have the `boost::function' class.]) |
| 76 | ]) |
| 77 | |
Jeff Thompson | 9cf9dfb | 2013-10-04 16:36:52 -0700 | [diff] [blame] | 78 | AC_MSG_CHECKING([for OSX SecKeychain]) |
| 79 | AC_COMPILE_IFELSE([AC_LANG_PROGRAM( |
| 80 | [[#include <CoreFoundation/CoreFoundation.h>]] |
| 81 | [[#include <Security/Security.h>]] |
| 82 | [[#include <CoreServices/CoreServices.h>]] |
| 83 | [[void test() { SecKeychainRef x; }]]) |
| 84 | ], [ |
| 85 | AC_MSG_RESULT([yes]) |
| 86 | AC_DEFINE_UNQUOTED([HAVE_OSX_SECKEYCHAIN], 1, [1 if have OSX SecKeychain.]) |
| 87 | ], [ |
| 88 | AC_MSG_RESULT([no]) |
| 89 | AC_DEFINE_UNQUOTED([HAVE_OSX_SECKEYCHAIN], 0, [1 if have OSX SecKeychain.]) |
| 90 | ]) |
| 91 | |
Jeff Thompson | ca45e55 | 2013-06-26 17:40:06 -0700 | [diff] [blame] | 92 | DX_HTML_FEATURE(ON) |
| 93 | DX_CHM_FEATURE(OFF) |
| 94 | DX_CHI_FEATURE(OFF) |
| 95 | DX_MAN_FEATURE(OFF) |
| 96 | DX_RTF_FEATURE(OFF) |
| 97 | DX_XML_FEATURE(OFF) |
| 98 | DX_PDF_FEATURE(OFF) |
| 99 | DX_PS_FEATURE(OFF) |
| 100 | DX_INIT_DOXYGEN([$PACKAGE_NAME],[Doxyfile]) |
| 101 | |
Jeff Thompson | ff092f5 | 2013-06-19 13:38:12 -0700 | [diff] [blame] | 102 | AC_CONFIG_FILES([Makefile]) |
| 103 | AC_OUTPUT |