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

source: qspec/trunk/configure.ac @ 6768

Last change on this file since 6768 was 6768, checked in by bless@…, 4 years ago
  • better autotools checks for libraries
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
17AM_PROG_AR
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        [qspec_unorderedmap=$enableval],
60        [qspec_unorderedmap=yes])
61# enable use of UNORDERED_MAP if it exists and its use it not disabled
62AM_CONDITIONAL(USE_UNORDERED_MAP, [test "$ac_cv_unordered_map_exists" = yes -a "$qspec_unorderedmap" != no])
63
64AM_CONDITIONAL(NSIS_NO_WARN_HASHMAP, test "$ac_cv_unordered_map_exists" = yes)
65
66AC_ARG_ENABLE([logging],
67        [AS_HELP_STRING([--disable-logging], [disable logging output (default: logging enabled)])],
68        [qspec_template_logging=$enableval],
69        [qspec_template_logging=yes])
70AM_CONDITIONAL(QSPEC_DISABLE_LOGGING, test "$qspec_template_logging" = no)
71
72# Benchmark
73AC_ARG_ENABLE([benchmark],
74        [AS_HELP_STRING([--enable-benchmark], [enable benchmark output (default: benchmark disabled)])],
75        [qspec_benchmark=$enableval],
76        [qspec_benchmark=no])
77AM_CONDITIONAL(QSPEC_ENABLE_BENCHMARK, test "$qspec_benchmark" = yes)
78
79#further CONFIG_FILES
80AC_CONFIG_FILES([Makefile
81                 src/Makefile
82                 test/Makefile])
83AC_OUTPUT
84
85#end configure.ac
Note: See TracBrowser for help on using the repository browser.