diff options
author | Nicolas Viennot <nicolas@viennot.biz> | 2016-01-09 21:35:13 -0500 |
---|---|---|
committer | Nicolas Viennot <nicolas@viennot.biz> | 2016-01-09 22:00:28 -0500 |
commit | 3a73f1735437ef08d32e3d14966f813a5ed7dfb9 (patch) | |
tree | f973f0760009709cb158b4cd914807f49f88b246 /configure.ac | |
parent | a397be388cc3552304fcb1f7195e660eeca6b8ae (diff) |
Allow static linking
Diffstat (limited to 'configure.ac')
-rw-r--r-- | configure.ac | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/configure.ac b/configure.ac index e8074373..6c1c5b77 100644 --- a/configure.ac +++ b/configure.ac @@ -49,6 +49,20 @@ AC_ARG_ENABLE( if test "x$found_static" = xyes; then LDFLAGS="$LDFLAGS -static" PKG_CONFIG="pkg-config --static" + + CFLAGS="$CFLAGS -flto" + LDFLAGS="$LDFLAGS -flto" + + PKG_CHECK_MODULES([ZLIB], [zlib], [ + CPPFLAGS="$ZLIB_CFLAGS $CPPFLAGS" + LIBS="$ZLIB_LIBS $LIBS" + ]) + + PKG_CHECK_MODULES([LIBCRYPTO], [libcrypto], [ + CPPFLAGS="$LIBCRYPTO_CFLAGS $CPPFLAGS" + LIBS="$LIBCRYPTO_LIBS $LIBS" + ]) + AC_CHECK_LIB(dl, dlopen) fi # Is this gcc? |