Skip to content
This repository was archived by the owner on Dec 2, 2024. It is now read-only.

Commit 805c27c

Browse files
committed
configure: Do not use pkg-config to find OpenSSL
This allows working with both OpenSSL and LibreSSL.
1 parent 2fdbf23 commit 805c27c

3 files changed

Lines changed: 6 additions & 11 deletions

File tree

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
*.framework
33
*.o
44
*.so
5+
*.so.*
56
*~
67
.deps
78
aclocal.m4

autogen.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ set -e
33

44
# Set a version for OpenBSD
55
: ${AUTOCONF_VERSION:=2.69}
6-
: ${AUTOMAKE_VERSION:=1.15}
6+
: ${AUTOMAKE_VERSION:=1.16}
77
export AUTOCONF_VERSION AUTOMAKE_VERSION
88

99
aclocal -I build-aux/m4

configure.ac

Lines changed: 4 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -44,17 +44,11 @@ AS_IF([test x"$enable_static" = x"yes" -o x"$enable_shared" = x"no"], [
4444
AC_SUBST(OBJOPENSSL_STATIC_LIB, "libobjopenssl.a")
4545
])
4646

47-
PKG_CHECK_MODULES(openssl, [openssl >= 1.0.2], [
48-
CPPFLAGS="$CPPFLAGS $openssl_CFLAGS"
49-
LIBS="$LIBS $openssl_LIBS"
47+
AC_CHECK_LIB(ssl, main, [
48+
LIBS="$LIBS -lssl -lcrypto"
5049
], [
51-
PKG_CHECK_MODULES(eopenssl, [eopenssl >= 1.0.2], [
52-
CPPFLAGS="$CPPFLAGS $eopenssl_CFLAGS"
53-
LIBS="$LIBS $eopenssl_LIBS"
54-
], [
55-
AC_MSG_ERROR(You need openssl >= 1.0.2 installed!)
56-
])
57-
])
50+
AC_MSG_ERROR(You need openssl >= 1.0.2 installed!)
51+
], [-lcrypto])
5852

5953
AS_IF([test x"$GOBJC" = x"yes"], [
6054
OBJCFLAGS="$OBJCFLAGS -Wwrite-strings -Wpointer-arith -Werror"

0 commit comments

Comments
 (0)