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

source: qspec/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(qspec-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        [qspec_unorderedmap=$enableval],
59        [qspec_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 "$qspec_unorderedmap" != no])
62
63AM_CONDITIONAL(NSIS_NO_WARN_HASHMAP, test "$ac_cv_unordered_map_exists" = yes)
64
65AC_ARG_ENABLE([logging],
66        [AS_HELP_STRING([--disable-logging], [disable logging output (default: logging enabled)])],
67        [qspec_template_logging=$enableval],
68        [qspec_template_logging=yes])
69AM_CONDITIONAL(QSPEC_DISABLE_LOGGING, test "$qspec_template_logging" = no)
70
71# Benchmark
72AC_ARG_ENABLE([benchmark],
73        [AS_HELP_STRING([--enable-benchmark], [enable benchmark output (default: benchmark disabled)])],
74        [qspec_benchmark=$enableval],
75        [qspec_benchmark=no])
76AM_CONDITIONAL(QSPEC_ENABLE_BENCHMARK, test "$qspec_benchmark" = yes)
77
78#further CONFIG_FILES
79AC_CONFIG_FILES([Makefile
80                 src/Makefile
81                 test/Makefile])
82AC_OUTPUT
83
84#end configure.ac
Note: See TracBrowser for help on using the repository browser.