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
This commit is contained in:
parent
341ab74532
commit
d70027148d
25
configure.ac
25
configure.ac
|
@ -75,9 +75,6 @@ AC_PATH_PROG(HEXDUMP,hexdump)
|
||||||
AC_PATH_TOOL(READELF,readelf)
|
AC_PATH_TOOL(READELF,readelf)
|
||||||
AC_PATH_TOOL(CPPFILT,c++filt)
|
AC_PATH_TOOL(CPPFILT,c++filt)
|
||||||
|
|
||||||
dnl pkg-config check.
|
|
||||||
PKG_PROG_PKG_CONFIG
|
|
||||||
|
|
||||||
# Enable wallet
|
# Enable wallet
|
||||||
AC_ARG_ENABLE([wallet],
|
AC_ARG_ENABLE([wallet],
|
||||||
[AS_HELP_STRING([--enable-wallet],
|
[AS_HELP_STRING([--enable-wallet],
|
||||||
|
@ -345,6 +342,16 @@ case $host in
|
||||||
;;
|
;;
|
||||||
esac
|
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$use_comparison_tool != xno; then
|
||||||
if test x$JAVA = x; then
|
if test x$JAVA = x; then
|
||||||
AC_MSG_ERROR("comparison tool set but java not found")
|
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
|
fi
|
||||||
|
|
||||||
if test x$use_pkgconfig = xyes; then
|
if test x$use_pkgconfig = xyes; then
|
||||||
|
: dnl
|
||||||
if test x"$PKG_CONFIG" = "x"; then
|
|
||||||
AC_MSG_ERROR(pkg-config not found.)
|
|
||||||
fi
|
|
||||||
|
|
||||||
: #NOP
|
|
||||||
m4_ifdef(
|
m4_ifdef(
|
||||||
[PKG_CHECK_MODULES],
|
[PKG_CHECK_MODULES],
|
||||||
[
|
[
|
||||||
|
@ -861,6 +863,11 @@ AC_SUBST(LIBTOOL_APP_LDFLAGS)
|
||||||
AC_SUBST(BOOST_LIBS)
|
AC_SUBST(BOOST_LIBS)
|
||||||
AC_SUBST(TESTDEFS)
|
AC_SUBST(TESTDEFS)
|
||||||
AC_SUBST(LEVELDB_TARGET_FLAGS)
|
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(GMP_LIBS)
|
||||||
AC_SUBST(GMPXX_LIBS)
|
AC_SUBST(GMPXX_LIBS)
|
||||||
AC_SUBST(LIBSNARK_DEPINST)
|
AC_SUBST(LIBSNARK_DEPINST)
|
||||||
|
|
Loading…
Reference in New Issue