Browse Source

build: fix Windows builds without pkg-config

- guard PKG_PROG_PKG_CONFIG with an m4_ifdef. If not building for windows,
  require it
- add nops as necessary in case the ifdef reduces the if/then to nothing
- AC_SUBST some missing _LIBS. These were split out over time, but not all were
  properly substituted. They continued to work if pkg-config is installed
  because it does the AC_SUBST itself
pull/4/head
Cory Fields 8 years ago
committed by Jack Grigg
parent
commit
d70027148d
No known key found for this signature in database GPG Key ID: 665DBCD284F7DAFF
  1. 25
      configure.ac

25
configure.ac

@ -75,9 +75,6 @@ AC_PATH_PROG(HEXDUMP,hexdump)
AC_PATH_TOOL(READELF,readelf)
AC_PATH_TOOL(CPPFILT,c++filt)
dnl pkg-config check.
PKG_PROG_PKG_CONFIG
# Enable wallet
AC_ARG_ENABLE([wallet],
[AS_HELP_STRING([--enable-wallet],
@ -345,6 +342,16 @@ case $host in
;;
esac
if test x$use_pkgconfig = xyes; then
m4_ifndef([PKG_PROG_PKG_CONFIG], [AC_MSG_ERROR(PKG_PROG_PKG_CONFIG macro not found. Please install pkg-config and re-run autogen.sh.)])
m4_ifdef([PKG_PROG_PKG_CONFIG], [
PKG_PROG_PKG_CONFIG
if test x"$PKG_CONFIG" = "x"; then
AC_MSG_ERROR(pkg-config not found.)
fi
])
fi
if test x$use_comparison_tool != xno; then
if test x$JAVA = x; then
AC_MSG_ERROR("comparison tool set but java not found")
@ -619,12 +626,7 @@ BOOST_LIBS="$BOOST_LDFLAGS $BOOST_SYSTEM_LIB $BOOST_FILESYSTEM_LIB $BOOST_PROGRA
fi
if test x$use_pkgconfig = xyes; then
if test x"$PKG_CONFIG" = "x"; then
AC_MSG_ERROR(pkg-config not found.)
fi
: #NOP
: dnl
m4_ifdef(
[PKG_CHECK_MODULES],
[
@ -861,6 +863,11 @@ AC_SUBST(LIBTOOL_APP_LDFLAGS)
AC_SUBST(BOOST_LIBS)
AC_SUBST(TESTDEFS)
AC_SUBST(LEVELDB_TARGET_FLAGS)
AC_SUBST(CRYPTO_LIBS)
AC_SUBST(SSL_LIBS)
AC_SUBST(EVENT_LIBS)
AC_SUBST(EVENT_PTHREADS_LIBS)
AC_SUBST(ZMQ_LIBS)
AC_SUBST(GMP_LIBS)
AC_SUBST(GMPXX_LIBS)
AC_SUBST(LIBSNARK_DEPINST)

Loading…
Cancel
Save