configure: Do not use pkg-config to find OpenSSL
This allows working with both OpenSSL and LibreSSL.
This commit is contained in:
parent
2fdbf231bb
commit
805c27ce67
3 changed files with 6 additions and 11 deletions
1
.gitignore
vendored
1
.gitignore
vendored
|
@ -2,6 +2,7 @@
|
||||||
*.framework
|
*.framework
|
||||||
*.o
|
*.o
|
||||||
*.so
|
*.so
|
||||||
|
*.so.*
|
||||||
*~
|
*~
|
||||||
.deps
|
.deps
|
||||||
aclocal.m4
|
aclocal.m4
|
||||||
|
|
|
@ -3,7 +3,7 @@ set -e
|
||||||
|
|
||||||
# Set a version for OpenBSD
|
# Set a version for OpenBSD
|
||||||
: ${AUTOCONF_VERSION:=2.69}
|
: ${AUTOCONF_VERSION:=2.69}
|
||||||
: ${AUTOMAKE_VERSION:=1.15}
|
: ${AUTOMAKE_VERSION:=1.16}
|
||||||
export AUTOCONF_VERSION AUTOMAKE_VERSION
|
export AUTOCONF_VERSION AUTOMAKE_VERSION
|
||||||
|
|
||||||
aclocal -I build-aux/m4
|
aclocal -I build-aux/m4
|
||||||
|
|
14
configure.ac
14
configure.ac
|
@ -44,17 +44,11 @@ AS_IF([test x"$enable_static" = x"yes" -o x"$enable_shared" = x"no"], [
|
||||||
AC_SUBST(OBJOPENSSL_STATIC_LIB, "libobjopenssl.a")
|
AC_SUBST(OBJOPENSSL_STATIC_LIB, "libobjopenssl.a")
|
||||||
])
|
])
|
||||||
|
|
||||||
PKG_CHECK_MODULES(openssl, [openssl >= 1.0.2], [
|
AC_CHECK_LIB(ssl, main, [
|
||||||
CPPFLAGS="$CPPFLAGS $openssl_CFLAGS"
|
LIBS="$LIBS -lssl -lcrypto"
|
||||||
LIBS="$LIBS $openssl_LIBS"
|
|
||||||
], [
|
], [
|
||||||
PKG_CHECK_MODULES(eopenssl, [eopenssl >= 1.0.2], [
|
AC_MSG_ERROR(You need openssl >= 1.0.2 installed!)
|
||||||
CPPFLAGS="$CPPFLAGS $eopenssl_CFLAGS"
|
], [-lcrypto])
|
||||||
LIBS="$LIBS $eopenssl_LIBS"
|
|
||||||
], [
|
|
||||||
AC_MSG_ERROR(You need openssl >= 1.0.2 installed!)
|
|
||||||
])
|
|
||||||
])
|
|
||||||
|
|
||||||
AS_IF([test x"$GOBJC" = x"yes"], [
|
AS_IF([test x"$GOBJC" = x"yes"], [
|
||||||
OBJCFLAGS="$OBJCFLAGS -Wwrite-strings -Wpointer-arith -Werror"
|
OBJCFLAGS="$OBJCFLAGS -Wwrite-strings -Wpointer-arith -Werror"
|
||||||
|
|
Reference in a new issue