forked from cryptotronix/libcrypti2c
-
Notifications
You must be signed in to change notification settings - Fork 1
/
configure.ac
83 lines (68 loc) · 3 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
# 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([cryptoauth], [0.4.0], [bugs@cryptotronix.com], [libcryptoauth],
[https://www.github.com/cryptotronix/libcryptoauth])
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 libxml
PKG_CHECK_MODULES([XML], [libxml-2.0 >= 2.8])
#Check for check
PKG_CHECK_MODULES([CHECK], [check >= 0.9.8],,[AC_MSG_WARN("Check not found")])
#Check for libgcrypt
AM_PATH_LIBGCRYPT([], [], AC_MSG_ERROR([libgcrypt is not installed]))
AC_PATH_PROG([DEBUILD], [dpkg-buildpackage], [notfound])
AC_PATH_PROG([TEST], [test])
# 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
AC_PROG_MKDIR_P
# 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([CRYPTOAUTH_SO_VERSION], [3:0:0])
AC_SUBST([CRYPTOAUTH_API_VERSION], [0.4])
# --enable-deb copies only the ni executable to the dist package, for use in
# building DEB packages.
AC_ARG_ENABLE([deb],
[AS_HELP_STRING([--enable-deb=@<:@yes/no@:>@],
[Configure for building Debian package @<:@default=no@:>@ (requires dpkg-buildpackage)])],
[AS_IF([$TEST "x$enable_deb" = xyes],
[AS_IF([$TEST "x$DEBUILD" = xnotfound],
[AC_MSG_ERROR([dpkg-buildpackage is required for --enable-deb])],
[$TEST "x$enable_rpm" = xyes],
[AC_MSG_ERROR([--enable-rpm and --enable-deb are mutually exclusive])])])],
[enable_deb=no])
AM_CONDITIONAL([BUILDING_DEB], [$TEST "x$enable_deb" = xyes])
AC_CONFIG_FILES([Makefile test/Makefile lib/Makefile
cryptoauth.pc:cryptoauth.pc.in])
AC_OUTPUT
echo "
$PACKAGE_NAME version $PACKAGE_VERSION
Prefix..........: $prefix
Deb Build.......: $enable_deb
C Compiler......: $CC $CFLAGS $CPPFLAGS
C++ Compiler....: $CXX $CXXFLAGS $CPPFLAGS
Linker..........: $LD $LDFLAGS $LIBS
"