On 05.10.2012 17:36, Graham Leggett wrote:
On 05 Oct 2012, at 5:21 PM, Ruediger Pluem <[email protected]> wrote:
+ AC_MSG_NOTICE(checking for commoncrypto in $withval)
+ AC_CHECK_HEADERS(CommonCrypto/CommonKeyDerivation.h,
[commoncrypto_have_headers=1])
+ AC_CHECK_LIB(System, CCKeyDerivationPBKDF, AC_CHECK_LIB(System,
CCCryptorCreate, [commoncrypto_have_libs=1],,-lcrypto))
+ if test "$commoncrypto_have_headers" != "0" && test "$commoncrypto_have_libs" !=
"0"; then
+ apu_have_commoncrypto=1
+ APR_ADDTO(LDFLAGS, [-L$withval/lib])
+ APR_ADDTO(INCLUDES, [-I$withval/include])
+ fi
+
+ if test "$apu_have_commoncrypto" != "1"; then
+ AC_CHECK_HEADERS(CommonCrypto/CommonKeyDerivation.h,
[commoncrypto_have_headers=1])
+ AC_CHECK_LIB(System, CCKeyDerivationPBKDF, AC_CHECK_LIB(System,
CCCryptorCreate, [commoncrypto_have_libs=1],,-lcrypto))
+ if test "$commoncrypto_have_headers" != "0" && test "$commoncrypto_have_libs" !=
"0"; then
+ apu_have_commoncrypto=1
+ APR_ADDTO(LDFLAGS, [-L$withval/lib])
+ APR_ADDTO(INCLUDES, [-I$withval/include])
+ fi
+ fi
Maybe I am missing something, but why doing the same tests again if they failed?
No idea, this is templated off the openssl tests, which seem to do the same
thing.
I don't see a reason why the openssl tests are done twice, can you confirm?
That part seems to have been added by you back in 2008:
http://svn.apache.org/viewvc?view=revision&revision=692949
Regards,
Rainer