add -fPIC to CFLAGS by default, use pkg-config to get LDFLAGS and CFLAGS for openssl, output enable_openssl status
diff --git a/configure.in b/configure.in
index 122778f..e518936 100644
--- a/configure.in
+++ b/configure.in
@@ -4,7 +4,7 @@
dnl Must come before AC_PROG_CC
if test -z "$CFLAGS"; then
dnl Default value for CFLAGS if not specified.
- CFLAGS="-Wall -O4 -fexpensive-optimizations -funroll-loops"
+ CFLAGS="-fPIC -Wall -O4 -fexpensive-optimizations -funroll-loops"
fi
dnl Checks for programs.
@@ -143,9 +143,9 @@
[compile in OpenSSL crypto engine])],
[], enable_openssl=no)
if test "$enable_openssl" = "yes"; then
-
- LDFLAGS="$LDFLAGS -L/usr/local/ssl/lib ";
- CFLAGS="$CFLAGS -I/usr/local/ssl/include ";
+ echo $enable_openssl
+ LDFLAGS="$LDFLAGS $(pkg-config --libs openssl)";
+ CFLAGS="$CFLAGS $(pkg-config --cflags openssl)";
AC_CHECK_LIB([crypto], [EVP_EncryptInit], [],
[AC_MSG_FAILURE([can't find openssl >1.0.1 crypto lib])])
@@ -160,6 +160,7 @@
USE_OPENSSL=1
AC_SUBST(USE_OPENSSL)
else
+ echo $enable_openssl
AES_ICM_OBJS="crypto/cipher/aes_icm.o crypto/cipher/aes.o crypto/cipher/aes_cbc.o"
AC_MSG_CHECKING(which random device to use)
if test "$enable_kernel_linux" = "yes"; then