build: add requirement for openssl to configure_ac
Add requirement for openssl to configure_ac so that configure will fail
when not found.
Tested: Verified OPENSSL_LIBS contained libraries.
Change-Id: I255fd4098e804b6db70e5164fa626e23e2894b3f
Signed-off-by: Patrick Venture <venture@google.com>
diff --git a/Makefile.am b/Makefile.am
index 968d3db..0970c26 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -17,6 +17,6 @@
-module \
-avoid-version \
-shared \
- -lssl \
+ $(OPENSSL_LIBS) \
$(LIBPAM) \
$(LIBCRYPT)
diff --git a/configure.ac b/configure.ac
index 446df9c..2abafda 100644
--- a/configure.ac
+++ b/configure.ac
@@ -14,6 +14,8 @@
AC_PROG_INSTALL
AC_PROG_MAKE_SET
+AX_CHECK_OPENSSL([], [AC_MSG_ERROR(["openssl required and not found"])])
+
# Checks for library functions.
LT_INIT # Removes 'unrecognized options: --with-libtool-sysroot