This repository has been archived by the owner on Apr 13, 2019. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathconfigure.ac
83 lines (72 loc) · 3.48 KB
/
configure.ac
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
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
#
# This file is part of libec (https://github.com/erayd/libec/).
# Copyright (C) 2014-2015, Erayd LTD
#
# Permission to use, copy, modify, and/or distribute this software for any purpose
# with or without fee is hereby granted, provided that the above copyright notice
# and this permission notice appear in all copies.
#
# THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
# REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND
# FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT,
# OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE,
# DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS
# ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
AC_PREREQ([2.68])
AC_CONFIG_MACRO_DIR([m4])
AC_CONFIG_SRCDIR([src/libec/libec.c])
AC_INIT([libec], [0.2.2-dev], [[email protected]], [libec], [https://github.com/erayd/libec/])
LT_INIT
AM_INIT_AUTOMAKE([1.11 dist-bzip2 tar-ustar foreign subdir-objects])
m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])])
AC_SUBST([EC_LIBTOOL_VERSION], [1:0:0])
# | | |
# +-----+ | +----+
# | | |
# current:revision:age
# | | |
# | | +-- Increment if interfaces have been added, or set to
# | | zero if interfaces have been removed or changed.
# | |
# | +----------Increment if source has changed, or set to zero if
# | current has been incremented.
# |
# +------------------Increment if interfaces have been added, changed, or
# removed.
# Features
AC_ARG_ENABLE([debug], AS_HELP_STRING([--enable-debug], [Enable debugging]), [], [enable_debug=no])
AS_IF([test "x$enable_debug" != xno], [
AC_DEFINE(DEBUG, 1, [Define this to enable additional debugging features. Not for production builds.])
AM_CONDITIONAL(DEBUG, true)
], [
AM_CONDITIONAL(DEBUG, false)
])
AC_ARG_ENABLE([pa], AS_HELP_STRING([--enable-pa], [Enable debug output for passing assertions]), [], [enable_pa=no])
AS_IF([test "x$enable_pa" != xno], [
AC_DEFINE(DEBUG_PA, 1, [Define this to enable debug output for passing assertions. Not for production builds.])
AM_CONDITIONAL(DEBUG_PA, true)
], [
AM_CONDITIONAL(DEBUG_PA, false)
])
# Checks for pkgconfig modules
PKG_CHECK_MODULES([SODIUM], [libsodium >= 1.0.0] , , [AC_MSG_ERROR([libsodium must be at least v1.0.0!])])
PKG_CHECK_MODULES([TALLOC], [talloc >= 2.0.0] , , [AC_MSG_ERROR([talloc must be at least v2.0.0!])])
# Checks for programs.
AC_PROG_LIBTOOL
AM_PROG_LIBTOOL
AM_PROG_CC_C_O
# Checks for libraries.
AC_CHECK_LIB([sodium], [main], [], [AC_MSG_ERROR([libsodium is missing!])])
AC_CHECK_LIB([talloc], [main], [], [AC_MSG_ERROR([libtalloc is missing!])])
# Checks for header files.
AC_CHECK_HEADER([sodium.h], [], [AC_MSG_ERROR([sodium.h is missing!])])
AC_CHECK_HEADER([talloc.h], [], [AC_MSG_ERROR([talloc.h is missing!])])
# Checks for typedefs, structures, and compiler characteristics.
# Checks for library functions.
AM_CONFIG_HEADER([src/config.h])
AC_OUTPUT([libec.pc
Makefile
src/Makefile
src/libec/Makefile
src/libec/tests/Makefile
])