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

source: sessionauth/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.5 KB
Line 
1#                                               -*- Autoconf -*-
2# Process this file with autoconf to produce a configure script.
3
4AC_PREREQ(2.61)
5AC_INIT(sessionauth, 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
18
19AC_CHECK_LIB([cppunit], [main])
20
21# Checks for header files.
22AC_HEADER_STDC
23AC_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])
24
25# Checks for typedefs, structures, and compiler characteristics.
26AC_HEADER_STDBOOL
27AC_C_CONST
28AC_C_INLINE
29AC_TYPE_MODE_T
30AC_TYPE_PID_T
31AC_TYPE_SIZE_T
32AC_TYPE_SSIZE_T
33AC_HEADER_TIME
34AC_STRUCT_TM
35AC_TYPE_UINT32_T
36
37# Checks for library functions.
38AC_FUNC_ERROR_AT_LINE
39AC_FUNC_MEMCMP
40AC_TYPE_SIGNAL
41AC_CHECK_FUNCS([gethostname gettimeofday memset socket strerror])
42
43AC_PROG_RANLIB
44
45#check for unordered map
46[SAVECXXFLAGS=$CXXFLAGS; CXXFLAGS="-std=c++0x"]
47AC_LANG_CPLUSPLUS
48
49AC_CACHE_CHECK([whether unordered_map is available],
50                        [ac_cv_unordered_map_exists],
51[AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <unordered_map>]],
52                                [[std::unordered_map<int,int> testmap;]])],
53                                [ac_cv_unordered_map_exists=yes],
54                                [ac_cv_unordered_map_exists=no])])
55[CXXFLAGS=$SAVECXXFLAGS]
56
57AC_ARG_ENABLE([unorderedmap],
58        [AS_HELP_STRING([--disable-unorderedmap], [disable unorderedmap (default: unorderedmap enabled)])],
59        [sessionauth_unorderedmap=$enableval],
60        [sessionauth_unorderedmap=yes])
61
62AM_CONDITIONAL(NSIS_NO_WARN_HASHMAP, test "$ac_cv_unordered_map_exists" = yes)
63# enable use of UNORDERED_MAP if it exists and its use it not disabled
64AM_CONDITIONAL(USE_UNORDERED_MAP, [test "$ac_cv_unordered_map_exists" = yes -a "$sessionauth_unorderedmap" != no])
65
66
67# Logging
68AC_ARG_ENABLE([logging],
69        [AS_HELP_STRING([--disable-logging], [disable logging output (default: logging enabled)])],
70        [sauth_logging=$enableval],
71        [sauth_logging=yes])
72AM_CONDITIONAL(SAUTH_DISABLE_LOGGING, test "$sauth_logging" = no)
73
74# Benchmark
75AC_ARG_ENABLE([benchmark],
76        [AS_HELP_STRING([--enable-benchmark], [enable benchmark output (default: benchmark disabled)])],
77        [sauth_benchmark=$enableval],
78        [sauth_benchmark=no])
79AM_CONDITIONAL(SAUTH_ENABLE_BENCHMARK, test "$sauth_benchmark" = yes)
80
81
82#further CONFIG_FILES
83AC_CONFIG_FILES([Makefile
84                 src/Makefile
85                 test/Makefile])
86AC_OUTPUT
87
88# end configure.ac
Note: See TracBrowser for help on using the repository browser.