Skip to content
Browse files

Merge pull request #35 from krisk84/feature-openssl

add -fPIC to CFLAGS by default, use pkg-config to get LDFLAGS and CFLAGS...
  • Loading branch information...
2 parents 843f9f3 + b90f1ba commit ccc39da93487880a4de82ad3f9bada9c4f44059c @jfigus jfigus committed
Showing with 5 additions and 4 deletions.
  1. +5 −4 configure.in
View
9 configure.in
@@ -4,7 +4,7 @@ AC_INIT(srtp)
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 @@ AC_ARG_ENABLE(openssl,
[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 @@ if test "$enable_openssl" = "yes"; then
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

0 comments on commit ccc39da

Please sign in to comment.
Something went wrong with that request. Please try again.