Change the variables from their defaults only in the --with-openssl
section. This leaves the default conspicuous and makes --help show the
correct default behavior.
Signed-off-by: Mike Miller <mtmiller@ieee.org>
Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
-Wpointer-arith
-Wwrite-strings")
+AC_ENABLE_SHARED
+AC_DISABLE_STATIC
+
AC_ARG_WITH([openssl],
AS_HELP_STRING([--with-openssl],
[Location of OpenSSL build dir]),
OPENSSL_LIBS="${with_openssl}/libssl.a ${with_openssl}/libcrypto.a -ldl -lz"
AC_SUBST(OPENSSL_CFLAGS)
AC_SUBST(OPENSSL_LIBS)
- AC_ENABLE_STATIC
- AC_DISABLE_SHARED],
+ enable_static=yes
+ enable_shared=no],
[PKG_CHECK_MODULES(OPENSSL, openssl, [],
[oldLIBS="$LIBS"
LIBS="$LIBS -lssl -lcrypto"
AC_SUBST([OPENSSL_CFLAGS], [])],
[AC_MSG_RESULT(no)
AC_ERROR([Could not build against OpenSSL])])
- LIBS="$oldLIBS"])
- AC_ENABLE_SHARED
- AC_DISABLE_STATIC])
+ LIBS="$oldLIBS"])])
# Needs to happen after we default to static/shared libraries based on OpenSSL
AC_PROG_LIBTOOL