Skip to content

Commit eee338c

Browse files
authored
Merge pull request #132 from haydenroche5/dist
Make changes to get make distcheck working.
2 parents 2fab294 + df5834f commit eee338c

File tree

4 files changed

+35
-4
lines changed

4 files changed

+35
-4
lines changed

Makefile.am

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
1-
21
SUFFIXES =
32
TESTS =
43
noinst_PROGRAMS =
54
noinst_HEADERS =
65
check_PROGRAMS =
76
dist_noinst_SCRIPTS =
87
DISTCLEANFILES =
8+
pkginclude_HEADERS =
99

1010
ACLOCAL_AMFLAGS = -I m4
1111

@@ -22,3 +22,17 @@ bench_LDADD = libwolfengine.la
2222
DISTCLEANFILES += .libs/bench
2323

2424
test: check
25+
26+
# By default, make distcheck will only add wolfEngine/ as an include directory.
27+
# So, for example, a file like unit.h that has #include
28+
# <wolfengine/we_logging.h> won't be able to find we_logging.h, because
29+
# wolfEngine/include isn't an include directory. We add it here.
30+
#
31+
# The OpenSSL lib and include directories won't be visible to make distcheck
32+
# either because make distcheck runs ./configure with no other options. If
33+
# OpenSSL isn't installed in a standard location, this naked configure command
34+
# will fail to find it. We tell it where to find the include and lib directory
35+
# for OpenSSL here.
36+
AM_DISTCHECK_CONFIGURE_FLAGS=CPPFLAGS="-I@abs_top_srcdir@/include \
37+
@OPENSSL_INCLUDES@" \
38+
LDFLAGS="@OPENSSL_LDFLAGS@"

configure.ac

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,21 @@ USER_CFLAGS="$CFLAGS"
2424
AC_PROG_CC
2525
AC_LANG(C)
2626

27+
# shared library versioning
28+
WOLFENGINE_LIBRARY_VERSION=1:0:0
29+
# | | |
30+
# +------+ | +---+
31+
# | | |
32+
# current:revision:age
33+
# | | |
34+
# | | +- increment if interfaces have been added
35+
# | | set to zero if interfaces have been removed
36+
# | | or changed
37+
# | +- increment if source code has changed
38+
# | set to zero if current is incremented
39+
# +- increment if interfaces have been added, removed or changed
40+
AC_SUBST([WOLFENGINE_LIBRARY_VERSION])
41+
2742
LIBS="$LIBS -ldl"
2843

2944
AC_CHECK_HEADERS([openssl/engine.h])

include/include.am

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,6 @@
55
noinst_HEADERS += include/wolfengine/we_internal.h \
66
include/wolfengine/we_openssl_bc.h
77

8-
pkginclude_HEADERS = include/wolfengine/we_wolfengine.h \
9-
include/wolfengine/we_logging.h \
10-
include/wolfengine/we_fips.h
8+
pkginclude_HEADERS += include/wolfengine/we_wolfengine.h \
9+
include/wolfengine/we_logging.h \
10+
include/wolfengine/we_fips.h

src/include.am

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@
22
# included from Top Level Makefile.am
33
# All paths should be given relative to the root
44

5+
libwolfengine_la_LDFLAGS = ${AM_LDFLAGS} -no-undefined -version-info ${WOLFENGINE_LIBRARY_VERSION}
6+
57
libwolfengine_la_SOURCES =
68
libwolfengine_la_SOURCES += src/we_aes_block.c
79
libwolfengine_la_SOURCES += src/we_aes_cbc_hmac.c

0 commit comments

Comments
 (0)