blob: 1ae5acc1dde3f95f47c2375e8fec9cf9cbb3a1b6 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
|
From b12ca226c111730e2ef5d8a3d929dbd943fbe763 Mon Sep 17 00:00:00 2001
From: Fabrice Fontaine <fontaine.fabrice@gmail.com>
Date: Thu, 9 Feb 2017 21:40:43 +0100
Subject: [PATCH] Add --disable-tests to configure
Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
---
Makefile.am | 6 +++++-
configure.ac | 10 ++++++++++
2 files changed, 15 insertions(+), 1 deletion(-)
diff --git a/Makefile.am b/Makefile.am
index 1804945..cebcd31 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -5,8 +5,12 @@ nodist_include_HEADERS = include/maxminddb_config.h
SUBDIRS = \
src \
- bin \
+ bin
+
+if TESTS
+SUBDIRS += \
t
+endif
EXTRA_DIST = doc t Changes.md LICENSE NOTICE README.md projects/VS12 projects/VS12-tests
dist-hook:
diff --git a/configure.ac b/configure.ac
index 7916212..fc53ffd 100644
--- a/configure.ac
+++ b/configure.ac
@@ -119,6 +119,16 @@ AC_ARG_ENABLE(
esac],[debug=false])
AM_CONDITIONAL([DEBUG], [test x$debug = xtrue])
+AC_ARG_ENABLE(
+ [tests],
+ [ --enable-tests Compilation of tests code],
+ [case "${enableval}" in
+ yes) tests=true ;;
+ no) tests=false ;;
+ *) AC_MSG_ERROR([bad value ${enableval} for --enable-tests]) ;;
+ esac],[tests=false])
+AM_CONDITIONAL([TESTS], [test x$tests = xtrue])
+
AC_CONFIG_FILES([Makefile
src/Makefile
bin/Makefile
--
2.5.0
|