Skip to content

Commit 22b38fc

Browse files
committed
Merge #2978: [Build] Ubuntu Bionic gmp detection workaround
3e4c231 Build: Ubuntu Bionic gmp detection workaround (Fuzzbawls) Pull request description: Ubuntu Bionic's libgmp-dev package doesn't include pkgconfig files, so we need to do some fallback checking during the configure process. Bionic is still used for PPA and SnapCraft nightly builds, and we do still support Bionic in terms of glibc. ACKs for top commit: 3e4c231 Liquid369: ACK 3e4c231 Liquid369: ACK 3e4c231 Duddino: ACK 3e4c231 Tree-SHA512: 202bc3515a4b0ecf001e5b605f05e35e40fd1e9f08310c2ec0b6b37cee22a9a6d9f6a332384b9696bd8aa85406b9e34adb61d256c5cefa75b3190f969a2d40a6
2 parents 5e29356 + 3e4c231 commit 22b38fc

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

configure.ac

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1169,7 +1169,14 @@ if test x$use_pkgconfig = xyes; then
11691169
PKG_CHECK_MODULES([EVENT_PTHREADS], [libevent_pthreads], [], [AC_MSG_ERROR([libevent_pthreads not found.])])
11701170
fi
11711171
PKG_CHECK_MODULES([SODIUM], [libsodium], [], [AC_MSG_ERROR([libsodium not found.])])
1172-
PKG_CHECK_MODULES([GMP], [gmp], [], [AC_MSG_ERROR([libgmp not found.])])
1172+
dnl Ubuntu Bionic's libgmp-dev package doesn't include pkgconfig files,
1173+
dnl so we need to do some gymnastics here.
1174+
dnl TODO: Remove this drill down once Ubuntu Bionic is no longer supported.
1175+
PKG_CHECK_MODULES([GMP], [gmp], [], [
1176+
AC_CHECK_HEADER([gmp.h], [
1177+
AC_CHECK_LIB([gmp], [__gmpz_init], [LIBS="$LIBS -lgmp"], [AC_MSG_ERROR([libgmp missing])])
1178+
], [AC_MSG_ERROR([libgmp headers missing])])
1179+
])
11731180
fi
11741181
11751182
if test "x$use_zmq" = "xyes"; then

0 commit comments

Comments
 (0)