reviewed: marka

check whether linking with OpenSSL works at all before checking
whether the version is compatible
This commit is contained in:
Mark Andrews
2002-07-11 02:11:30 +00:00
parent 3e99d38a74
commit 0034db60ba
+17 -2
View File
@@ -13,7 +13,7 @@
# NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION
# WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
AC_REVISION($Revision: 1.294.2.9 $)
AC_REVISION($Revision: 1.294.2.10 $)
AC_INIT(lib/dns/name.c)
AC_PREREQ(2.13)
@@ -311,11 +311,26 @@ case "$use_openssl" in
DNS_OPENSSL_LIBS="-L$use_openssl/lib -lcrypto"
AC_MSG_RESULT(using openssl from $use_openssl/lib and $use_openssl/include)
AC_MSG_CHECKING(OpenSSL library version)
saved_cflags="$CFLAGS"
saved_libs="$LIBS"
CFLAGS="$CFLAGS $DST_OPENSSL_INC"
LIBS="$LIBS $DNS_OPENSSL_LIBS"
AC_MSG_CHECKING(whether linking with OpenSSL works)
AC_TRY_RUN([
#include <openssl/err.h>
int main() {
ERR_clear_error();
return (0);
}
],
[AC_MSG_RESULT(yes)],
[AC_MSG_RESULT(no)
AC_MSG_ERROR(Could not run test program using OpenSSL from
$use_openssl/lib and $use_openssl/include.
Please check the argument to --with-openssl and your
shared library configuration (e.g., LD_LIBRARY_PATH).)],
[AC_MSG_RESULT(assuming it does work on target platform)])
AC_MSG_CHECKING(OpenSSL library version)
AC_TRY_RUN([
#include <stdio.h>
#include <openssl/opensslv.h>