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 | 3b3aabf | 2013-06-21 16:50:20 -0700 | [diff] [blame] | 15 | |
Jeff Thompson | 1b8f4c9 | 2013-06-19 16:18:46 -0700 | [diff] [blame] | 16 | AX_CXX_COMPILE_STDCXX_11(, optional) |
Jeff Thompson | 8a055e0 | 2013-08-09 10:44:28 -0700 | [diff] [blame] | 17 | AC_CHECK_LIB([crypto], [EVP_EncryptInit], [], |
| 18 | [AC_MSG_FAILURE([can't find openssl crypto lib])]) |
Jeff Thompson | ff092f5 | 2013-06-19 13:38:12 -0700 | [diff] [blame] | 19 | |
| 20 | AC_MSG_CHECKING([for std::shared_ptr]) |
| 21 | AC_COMPILE_IFELSE([AC_LANG_PROGRAM( |
| 22 | [[#include <memory>]] |
| 23 | [[std::shared_ptr<int> have_shared_ptr;]]) |
| 24 | ], [ |
| 25 | AC_MSG_RESULT([yes]) |
| 26 | AC_DEFINE_UNQUOTED([HAVE_STD_SHARED_PTR], 1, [1 if have the `std::shared_ptr' class.]) |
| 27 | ], [ |
| 28 | AC_MSG_RESULT([no]) |
| 29 | AC_DEFINE_UNQUOTED([HAVE_STD_SHARED_PTR], 0, [1 if have the `std::shared_ptr' class.]) |
| 30 | ]) |
Jeff Thompson | 9e9ea9f | 2013-06-22 10:31:18 -0700 | [diff] [blame] | 31 | AC_MSG_CHECKING([for boost::shared_ptr]) |
Jeff Thompson | ff092f5 | 2013-06-19 13:38:12 -0700 | [diff] [blame] | 32 | AC_COMPILE_IFELSE([AC_LANG_PROGRAM( |
| 33 | [[#include <boost/shared_ptr.hpp>]] |
| 34 | [[boost::shared_ptr<int> have_shared_ptr;]]) |
| 35 | ], [ |
| 36 | AC_MSG_RESULT([yes]) |
| 37 | AC_DEFINE_UNQUOTED([HAVE_BOOST_SHARED_PTR], 1, [1 if have the `boost::shared_ptr' class.]) |
| 38 | ], [ |
| 39 | AC_MSG_RESULT([no]) |
| 40 | AC_DEFINE_UNQUOTED([HAVE_BOOST_SHARED_PTR], 0, [1 if have the `boost::shared_ptr' class.]) |
| 41 | ]) |
| 42 | |
Jeff Thompson | a28eed8 | 2013-08-22 16:21:10 -0700 | [diff] [blame] | 43 | AC_MSG_CHECKING([for std::function]) |
| 44 | AC_COMPILE_IFELSE([AC_LANG_PROGRAM( |
| 45 | [[#include <functional>]] |
| 46 | [[std::function<int> have_function();]]) |
| 47 | ], [ |
| 48 | AC_MSG_RESULT([yes]) |
| 49 | AC_DEFINE_UNQUOTED([HAVE_STD_FUNCTION], 1, [1 if have the `std::function' class.]) |
| 50 | ], [ |
| 51 | AC_MSG_RESULT([no]) |
| 52 | AC_DEFINE_UNQUOTED([HAVE_STD_FUNCTION], 0, [1 if have the `std::function' class.]) |
| 53 | ]) |
| 54 | AC_MSG_CHECKING([for boost::function]) |
| 55 | AC_COMPILE_IFELSE([AC_LANG_PROGRAM( |
| 56 | [[#include <boost/function.hpp>]] |
| 57 | [[boost::function<int> have_function();]]) |
| 58 | ], [ |
| 59 | AC_MSG_RESULT([yes]) |
| 60 | AC_DEFINE_UNQUOTED([HAVE_BOOST_FUNCTION], 1, [1 if have the `boost::function' class.]) |
| 61 | ], [ |
| 62 | AC_MSG_RESULT([no]) |
| 63 | AC_DEFINE_UNQUOTED([HAVE_BOOST_FUNCTION], 0, [1 if have the `boost::function' class.]) |
| 64 | ]) |
| 65 | |
Jeff Thompson | d4a1e16 | 2013-07-11 12:41:31 -0700 | [diff] [blame] | 66 | AC_MSG_CHECKING([for memcmp]) |
| 67 | AC_COMPILE_IFELSE([AC_LANG_PROGRAM( |
| 68 | [[#include <memory.h>]] |
| 69 | [[void test() { unsigned char buffer[1]; memcmp(buffer, buffer, 1); }]]) |
| 70 | ], [ |
| 71 | AC_MSG_RESULT([yes]) |
| 72 | AC_DEFINE_UNQUOTED([HAVE_MEMCMP], 1, [1 if have memcmp in memory.h.]) |
| 73 | ], [ |
| 74 | AC_MSG_RESULT([no]) |
| 75 | AC_DEFINE_UNQUOTED([HAVE_MEMCMP], 0, [1 if have memcmp in memory.h.]) |
| 76 | ]) |
Jeff Thompson | c804d52 | 2013-06-27 16:54:27 -0700 | [diff] [blame] | 77 | AC_MSG_CHECKING([for memcpy]) |
| 78 | AC_COMPILE_IFELSE([AC_LANG_PROGRAM( |
| 79 | [[#include <memory.h>]] |
| 80 | [[void test() { unsigned char buffer[1]; memcpy(buffer, buffer, 1); }]]) |
| 81 | ], [ |
| 82 | AC_MSG_RESULT([yes]) |
| 83 | AC_DEFINE_UNQUOTED([HAVE_MEMCPY], 1, [1 if have memcpy in memory.h.]) |
| 84 | ], [ |
| 85 | AC_MSG_RESULT([no]) |
| 86 | AC_DEFINE_UNQUOTED([HAVE_MEMCPY], 0, [1 if have memcpy in memory.h.]) |
| 87 | ]) |
| 88 | AC_MSG_CHECKING([for memset]) |
| 89 | AC_COMPILE_IFELSE([AC_LANG_PROGRAM( |
| 90 | [[#include <memory.h>]] |
| 91 | [[void test() { unsigned char buffer[1]; memset(buffer, 0, 1); }]]) |
| 92 | ], [ |
| 93 | AC_MSG_RESULT([yes]) |
| 94 | AC_DEFINE_UNQUOTED([HAVE_MEMSET], 1, [1 if have memset in memory.h.]) |
| 95 | ], [ |
| 96 | AC_MSG_RESULT([no]) |
| 97 | AC_DEFINE_UNQUOTED([HAVE_MEMSET], 0, [1 if have memset in memory.h.]) |
| 98 | ]) |
| 99 | |
Jeff Thompson | 0c13a53 | 2013-09-24 15:43:41 -0700 | [diff] [blame] | 100 | AC_MSG_CHECKING([for stdint]) |
| 101 | AC_COMPILE_IFELSE([AC_LANG_PROGRAM( |
| 102 | [[#include <stdint.h>]] |
| 103 | [[void test() { uint8_t x; }]]) |
| 104 | ], [ |
| 105 | AC_MSG_RESULT([yes]) |
| 106 | AC_DEFINE_UNQUOTED([HAVE_STDINT], 1, [1 if have stdint.h.]) |
| 107 | ], [ |
| 108 | AC_MSG_RESULT([no]) |
| 109 | AC_DEFINE_UNQUOTED([HAVE_STDINT], 0, [1 if have stdint.h.]) |
| 110 | ]) |
| 111 | |
Jeff Thompson | 9cf9dfb | 2013-10-04 16:36:52 -0700 | [diff] [blame^] | 112 | AC_MSG_CHECKING([for OSX SecKeychain]) |
| 113 | AC_COMPILE_IFELSE([AC_LANG_PROGRAM( |
| 114 | [[#include <CoreFoundation/CoreFoundation.h>]] |
| 115 | [[#include <Security/Security.h>]] |
| 116 | [[#include <CoreServices/CoreServices.h>]] |
| 117 | [[void test() { SecKeychainRef x; }]]) |
| 118 | ], [ |
| 119 | AC_MSG_RESULT([yes]) |
| 120 | AC_DEFINE_UNQUOTED([HAVE_OSX_SECKEYCHAIN], 1, [1 if have OSX SecKeychain.]) |
| 121 | ], [ |
| 122 | AC_MSG_RESULT([no]) |
| 123 | AC_DEFINE_UNQUOTED([HAVE_OSX_SECKEYCHAIN], 0, [1 if have OSX SecKeychain.]) |
| 124 | ]) |
| 125 | |
Jeff Thompson | ca45e55 | 2013-06-26 17:40:06 -0700 | [diff] [blame] | 126 | DX_HTML_FEATURE(ON) |
| 127 | DX_CHM_FEATURE(OFF) |
| 128 | DX_CHI_FEATURE(OFF) |
| 129 | DX_MAN_FEATURE(OFF) |
| 130 | DX_RTF_FEATURE(OFF) |
| 131 | DX_XML_FEATURE(OFF) |
| 132 | DX_PDF_FEATURE(OFF) |
| 133 | DX_PS_FEATURE(OFF) |
| 134 | DX_INIT_DOXYGEN([$PACKAGE_NAME],[Doxyfile]) |
| 135 | |
Jeff Thompson | ff092f5 | 2013-06-19 13:38:12 -0700 | [diff] [blame] | 136 | AC_CONFIG_FILES([Makefile]) |
| 137 | AC_OUTPUT |