Commit cacab413 authored by Jelte Jansen's avatar Jelte Jansen
Browse files

[master] fix BOTAN_LDFLAGS and BOTAN_INCLUDES

parent ec1ad752
......@@ -392,9 +392,17 @@ if test -z "$with_botan"; then
done
fi
if test "${botan_path}" ; then
CPPFLAGS="$CPPFLAGS -I${botan_path}/include"
LDFLAGS="$LDFLAGS -L${botan_path}/lib -lbotan"
BOTAN_LDFLAGS="-L${botan_path}/lib -lbotan"
BOTAN_INCLUDES="-I${botan_path}/include"
AC_SUBST(BOTAN_LDFLAGS)
AC_SUBST(BOTAN_INCLUDES)
fi
CPPFLAGS_SAVED=$CPPFLAGS
CPPFLAGS="$BOTAN_INCLUDES $CPPFLAGS"
LDFLAGS_SAVED=$LDFLAGS
LDFLAGS="$BOTAN_LDFLAGS $LDFLAGS"
AC_CHECK_HEADERS([botan/botan.h],,AC_MSG_ERROR([Missing required header files.]))
AC_LINK_IFELSE(
[AC_LANG_PROGRAM([#include <botan/botan.h>
......@@ -408,6 +416,8 @@ AC_LINK_IFELSE(
[AC_MSG_RESULT([checking for Botan library... no])
AC_MSG_ERROR([Needs Botan library 1.8 or higher])]
)
CPPFLAGS=$CPPFLAGS_SAVED
LDFLAGS=$LDFLAGS_SAVED
#
# Configure Boost header path
......
SUBDIRS = . tests
AM_CPPFLAGS = -I$(top_srcdir)/src/lib -I$(top_builddir)/src/lib
AM_CPPFLAGS += $(BOOST_INCLUDES)
AM_CPPFLAGS += $(BOOST_INCLUDES) $(BOTAN_INCLUDES)
AM_CXXFLAGS = $(B10_CXXFLAGS)
CLEANFILES = *.gcno *.gcda
......
......@@ -16,7 +16,7 @@ TESTS += run_unittests
run_unittests_SOURCES = run_unittests.cc
run_unittests_SOURCES += crypto_unittests.cc
run_unittests_CPPFLAGS = $(AM_CPPFLAGS) $(GTEST_INCLUDES)
run_unittests_LDFLAGS = $(AM_LDFLAGS) $(GTEST_LDFLAGS)
run_unittests_LDFLAGS = $(BOTAN_LDFLAGS) $(AM_LDFLAGS) $(GTEST_LDFLAGS)
run_unittests_LDADD = $(GTEST_LDADD)
run_unittests_LDADD += $(top_builddir)/src/lib/cryptolink/libcryptolink.la
run_unittests_LDADD += $(top_builddir)/src/lib/util/libutil.la
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment