NSIS-ka
A free C++ implementation of NSIS protocols

source: natfw-nslp/trunk/configure.ac @ 6282

Last change on this file since 6282 was 6282, checked in by bless, 6 years ago
  • use of unorderedmap if available
  • new configure option --disable-unorderedmap
  • -Wall -pedantic is now default
File size: 2.7 KB
Line 
1#                                               -*- Autoconf -*-
2# Process this file with autoconf to produce a configure script.
3
4AC_PREREQ(2.61)
5AC_INIT(natfw-nslp-ka, 0.98, roland.bless@kit.edu)
6AM_INIT_AUTOMAKE([1.11 silent-rules -Wall -Werror foreign])
7
8# silent build by default
9# override with ./configure --disable-silent-rules or make V=1
10AM_SILENT_RULES([yes])
11
12# Checks for programs.
13AC_PROG_CXX
14AC_PROG_CC
15AC_PROG_MAKE_SET
16AC_PROG_CPP
17
18AC_CHECK_LIB([cppunit], [main])
19
20# Checks for header files.
21AC_HEADER_STDC
22AC_CHECK_HEADERS([arpa/inet.h netdb.h netinet/in.h stdlib.h string.h sys/param.h sys/socket.h sys/time.h unistd.h])
23
24# Checks for typedefs, structures, and compiler characteristics.
25AC_HEADER_STDBOOL
26AC_C_CONST
27AC_C_INLINE
28AC_TYPE_MODE_T
29AC_TYPE_PID_T
30AC_TYPE_SIZE_T
31AC_TYPE_SSIZE_T
32AC_HEADER_TIME
33AC_STRUCT_TM
34AC_TYPE_UINT32_T
35
36# Checks for library functions.
37AC_FUNC_ERROR_AT_LINE
38AC_FUNC_MEMCMP
39AC_TYPE_SIGNAL
40AC_CHECK_FUNCS([gethostname gettimeofday memset socket strerror])
41
42AC_PROG_RANLIB
43
44#check for unordered map
45[SAVECXXFLAGS=$CXXFLAGS; CXXFLAGS="-std=c++0x"]
46AC_LANG_CPLUSPLUS
47
48AC_CACHE_CHECK([whether unordered_map is available],
49                        [ac_cv_unordered_map_exists],
50[AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <unordered_map>]],
51                                [[std::unordered_map<int,int> testmap;]])],
52                                [ac_cv_unordered_map_exists=yes],
53                                [ac_cv_unordered_map_exists=no])])
54[CXXFLAGS=$SAVECXXFLAGS]
55
56AC_ARG_ENABLE([unorderedmap],
57        [AS_HELP_STRING([--disable-unorderedmap], [disable unorderedmap (default: unorderedmap enabled)])],
58        [natfwnslp_unorderedmap=$enableval],
59        [natfwnslp_unorderedmap=yes])
60# enable use of UNORDERED_MAP if it exists and its use it not disabled
61AM_CONDITIONAL(USE_UNORDERED_MAP, [test "$ac_cv_unordered_map_exists" = yes -a "$natfwnslp_unorderedmap" != no])
62
63AM_CONDITIONAL(NSIS_NO_WARN_HASHMAP, test "$ac_cv_unordered_map_exists" = yes)
64
65AC_ARG_ENABLE([sctp],
66        [AS_HELP_STRING([--enable-sctp], [include SCTP transport capability (default: enabled)])],
67        [enable_sctp=$enableval],
68        [enable_sctp=no])
69AM_CONDITIONAL(USE_WITH_SCTP, test "$enable_sctp" = yes)
70
71# Logging
72AC_ARG_ENABLE([logging],
73        [AS_HELP_STRING([--disable-logging], [disable logging output (default: logging enabled)])],
74        [natfwnslp_logging=$enableval],
75        [natfwnslp_logging=yes])
76AM_CONDITIONAL(NATFWNSLP_DISABLE_LOGGING, test "$natfwnslp_logging" = no)
77
78# Benchmark
79AC_ARG_ENABLE([benchmark],
80        [AS_HELP_STRING([--enable-benchmark], [enable benchmark output (default: benchmark disabled)])],
81        [natfwnslp_benchmark=$enableval],
82        [natfwnslp_benchmark=no])
83AM_CONDITIONAL(NATFWNSLP_ENABLE_BENCHMARK, test "$natfwnslp_benchmark" = yes)
84
85
86
87AC_CONFIG_FILES([Makefile
88                 src/msg/Makefile
89                 src/Makefile
90                 test/Makefile])
91
92
93AC_OUTPUT
Note: See TracBrowser for help on using the repository browser.