forked from cryptotronix/jose-c
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathconfigure.ac
80 lines (65 loc) · 2.69 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
# Copyright (C) 2014-2015 Cryptotronix, LLC.
# This file is part of libcryptoauth.
# libcryptoauth is free software: you can redistribute it and/or modify
# it under the terms of the GNU Lesser General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# any later version.
# libcryptoauth is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU Lesser General Public License for more details.
# You should have received a copy of the GNU Lesser General Public License
# along with libcryptoauth. If not, see <http://www.gnu.org/licenses/>.
AC_INIT([libjose-c], [0.12.0], [[email protected]], [josec],
[https://github.com/cryptotronix/jose-c])
AC_PREREQ([2.59])
AC_USE_SYSTEM_EXTENSIONS
AM_INIT_AUTOMAKE([1.10 -Wall no-define])
AC_CONFIG_MACRO_DIR([m4])
PKG_PROG_PKG_CONFIG
AM_PROG_AR
#Check for check
PKG_CHECK_MODULES([CHECK], [check >= 0.9.8])
#Check for libjannson
PKG_CHECK_MODULES([JANSSON], [jansson])
#Check for libyacl
PKG_CHECK_MODULES([YACL], [yacl])
# Generate two configuration headers; one for building the library itself with
# an autogenerated template, and a second one that will be installed alongside
# the library.
AC_CONFIG_HEADERS([config.h])
AC_PROG_CC
AC_PROG_CC_C_O
AM_PROG_CC_C_O
LT_INIT([static])
gl_EARLY
gl_INIT
#Optional openssl dependency
dnl Example of default-disabled feature
AC_ARG_WITH([openssl],
AS_HELP_STRING([--with-openssl], [Use OpenSSL for crypto backend]))
AS_IF([test "x$with_openssl" = "xyes"], [
PKG_CHECK_MODULES([OPENSSL], [libssl])
PKG_CHECK_MODULES([CRYPTO], [libcrypto])
AC_DEFINE([JOSEC_HAVE_OPENSSL], [1], [Use OpenSSL backend])
])
# Define these substitions here to keep all version information in one place.
# For information on how to properly maintain the library version information,
# refer to the libtool manual, section "Updating library version information":
# http://www.gnu.org/software/libtool/manual/html_node/Updating-version-info.html
AC_SUBST([JOSEC_SO_VERSION], [8:0:0])
AC_SUBST([JOSEC_API_VERSION], [0.11])
# Override the template file name of the generated .pc file, so that there
# is no need to rename the template file when the API version changes.
AC_CONFIG_FILES([Makefile test/Makefile lib/Makefile
josec.pc:josec.pc.in])
AC_OUTPUT
echo "
$PACKAGE_NAME version $PACKAGE_VERSION
Prefix.........: $prefix
Debug Build....: $debug
C Compiler.....: $CC $CFLAGS $CPPFLAGS
C++ Compiler...: $CXX $CXXFLAGS $CPPFLAGS
Linker.........: $LD $LDFLAGS $LIBS
Using OpenSSL..: $with_openssl
"