include a proper check for memmem when configuring unit tests

This allows the proper compatibility header definition to be exposed.
This commit is contained in:
Brent Cook 2014-10-22 12:37:06 -05:00
parent 48520cf629
commit 54259e50a5
2 changed files with 7 additions and 0 deletions

View File

@ -117,6 +117,11 @@ AC_CHECK_FUNC(strtonum,
AC_DEFINE(NO_STRTONUM)
AM_CONDITIONAL(NO_STRTONUM, true))
AC_CHECK_FUNC(memmem,
AM_CONDITIONAL(NO_MEMMEM, false),
AC_DEFINE(NO_MEMMEM)
AM_CONDITIONAL(NO_MEMMEM, true))
AC_CHECK_FUNC(explicit_bzero,
AM_CONDITIONAL(NO_EXPLICIT_BZERO, false),
AC_DEFINE(NO_EXPLICIT_BZERO)

View File

@ -321,7 +321,9 @@ $CP $libc_src/string/memmem.c tests/
echo "${TEST}_LDADD = \$(top_builddir)/ssl/libssl.la" >> Makefile.am
echo "${TEST}_LDADD += \$(top_builddir)/crypto/libcrypto.la" >> Makefile.am
done
echo "if NO_MEMMEM" >> Makefile.am
echo "explicit_bzero_SOURCES += memmem.c" >> Makefile.am
echo "endif" >> Makefile.am
)
$CP $libcrypto_regress/evp/evptests.txt tests
$CP $libcrypto_regress/aead/aeadtests.txt tests