Skip to content

Commit

Permalink
Remember OPENSSL_CPPFLAGS and use them
Browse files Browse the repository at this point in the history
  • Loading branch information
alandekok committed Oct 29, 2014
1 parent db00cd4 commit 4ac9c60
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 6 deletions.
2 changes: 2 additions & 0 deletions Make.inc.in
Expand Up @@ -76,6 +76,7 @@ TALLOC_LDFLAGS = @TALLOC_LDFLAGS@

OPENSSL_LIBS = @OPENSSL_LIBS@
OPENSSL_LDFLAGS = @OPENSSL_LDFLAGS@
OPENSSL_CPPFLAGS = @OPENSSL_CPPFLAGS@

PCAP_LIBS = @PCAP_LIBS@
PCAP_LDFLAGS = @PCAP_LDFLAGS@
Expand Down Expand Up @@ -129,6 +130,7 @@ HOSTINFO = @HOSTINFO@
#
ifeq "$(WITH_OPENSSL)" "yes"
CFLAGS += -DWITH_OPENSSL_MD4 -DWITH_OPENSSL_MD5
CPPFLAGS := "$(OPENSSL_CPPFLAGS) $(CPPFLAGS)"
endif

OPENSSL_LIBS = @OPENSSL_LIBS@
Expand Down
8 changes: 5 additions & 3 deletions configure
Expand Up @@ -638,6 +638,7 @@ COLLECTDC_LDFLAGS
COLLECTDC_LIBS
PCAP_LDFLAGS
PCAP_LIBS
OPENSSL_CPPFLAGS
OPENSSL_LDFLAGS
OPENSSL_LIBS
LIBREADLINE
Expand Down Expand Up @@ -8346,7 +8347,7 @@ if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
cat >>confdefs.h <<_ACEOF
#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
_ACEOF
OPENSSL_CPPFLAGS="$smart_include"
else
{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
Expand Down Expand Up @@ -8391,7 +8392,7 @@ rm -f conftest*
old_CPPFLAGS="$CPPFLAGS"
CPPFLAGS="$OPENSSL_LDFLAGS $CPPFLAGS"
CPPFLAGS="$OPENSSL_CPPFLAGS $CPPFLAGS"
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking OpenSSL library and header version consistency" >&5
$as_echo_n "checking OpenSSL library and header version consistency... " >&6; }
Expand Down Expand Up @@ -8450,7 +8451,8 @@ fi
LIBS="$OLD_LIBS"
export OPENSSL_LIBS OPENSSL_LDFLAGS
export OPENSSL_LIBS OPENSSL_LDFLAGS OPENSSL_CPPFLAGS
fi
if test "x$PCAP_LIBS" = x; then
Expand Down
7 changes: 4 additions & 3 deletions configure.ac
Expand Up @@ -1045,7 +1045,7 @@ if test "x$WITH_OPENSSL" = xyes; then
openssl/sha.h \
openssl/ocsp.h \
openssl/engine.h,
[],
[ OPENSSL_CPPFLAGS="$smart_include" ],
[
AC_MSG_FAILURE([failed locating OpenSSL headers. Use --with-openssl-include-dir=<path>, or --with-openssl=no (builds without OpenSSL)])
]
Expand Down Expand Up @@ -1073,7 +1073,7 @@ if test "x$WITH_OPENSSL" = xyes; then
dnl # library location we discovered previously.
dnl #
old_CPPFLAGS="$CPPFLAGS"
CPPFLAGS="$OPENSSL_LDFLAGS $CPPFLAGS"
CPPFLAGS="$OPENSSL_CPPFLAGS $CPPFLAGS"

dnl #
dnl # Now check that the header versions match the library
Expand Down Expand Up @@ -1109,7 +1109,8 @@ if test "x$WITH_OPENSSL" = xyes; then
LIBS="$OLD_LIBS"
AC_SUBST(OPENSSL_LIBS)
AC_SUBST(OPENSSL_LDFLAGS)
export OPENSSL_LIBS OPENSSL_LDFLAGS
AC_SUBST(OPENSSL_CPPFLAGS)
export OPENSSL_LIBS OPENSSL_LDFLAGS OPENSSL_CPPFLAGS
fi

dnl #
Expand Down

0 comments on commit 4ac9c60

Please sign in to comment.