commit e8cfd6adc6bf27ddb32f8ea35445c3415057a0b5
parent 925fc7d5e57752607d1bf76d367979c1f5e6b3fa
Author: Christian Grothoff <grothoff@gnunet.org>
Date: Sun, 12 Oct 2025 19:35:52 +0200
improve multiarch support
Diffstat:
1 file changed, 13 insertions(+), 6 deletions(-)
diff --git a/configure.ac b/configure.ac
@@ -32,6 +32,14 @@ DX_RTF_FEATURE(OFF),
DX_CHI_FEATURE(OFF),
DX_XML_FEATURE(OFF))
+
+AC_CHECK_PROG([DPKG_ARCH], [dpkg-architecture], [yes], [no])
+if test "x$DPKG_ARCH" = "xyes"; then
+ MULTIARCH=`dpkg-architecture -qDEB_HOST_MULTIARCH`
+else
+ MULTIARCH=""
+fi
+
AC_MSG_CHECKING([whether to compile documentation ONLY])
AC_ARG_ENABLE([only-doc],
[AS_HELP_STRING([--enable-only-doc], [only compile Taler documentation])],
@@ -82,7 +90,7 @@ AC_ARG_WITH(gnunet,
AS_CASE([$with_gnunet],
[yes], [],
[no], [AC_MSG_ERROR([--with-gnunet is required])],
- [LDFLAGS="-L$with_gnunet/lib $LDFLAGS"
+ [LDFLAGS="-L$with_gnunet/lib/$MULTIARCH -L$with_gnunet/lib/ $LDFLAGS"
CPPFLAGS="-I$with_gnunet/include $CPPFLAGS"])
AC_CHECK_HEADERS([gnunet/gnunet_util_lib.h],
[AC_CHECK_LIB([gnunetutil],
@@ -138,7 +146,7 @@ AC_ARG_WITH(gnunet,
AS_CASE([$with_gnunet],
[yes], [],
[no], [AC_MSG_ERROR([--with-gnunet is required])],
- [LDFLAGS="-L$with_gnunet/lib $LDFLAGS"
+ [LDFLAGS="-L$with_gnunet/lib/$MULTIARCH -L$with_gnunet/lib/ $LDFLAGS"
CPPFLAGS="-I$with_gnunet/include $CPPFLAGS"])
AC_CHECK_HEADERS([gnunet/gnunet_curl_lib.h],
[AC_CHECK_LIB([gnunetcurl], [GNUNET_CURL_get_select_info], libgnunetcurl=1)])
@@ -195,7 +203,7 @@ AC_ARG_WITH(exchange,
AS_CASE([$with_exchange],
[yes], [],
[no], [AC_MSG_ERROR([--with-exchange is required])],
- [LDFLAGS="-L$with_exchange/lib $LDFLAGS"
+ [LDFLAGS="-L$with_exchange/lib/$MULTIARCH -L$with_exchange/lib/ $LDFLAGS"
CPPFLAGS="-I$with_exchange/include $CPPFLAGS $POSTGRESQL_CPPFLAGS"])
AC_CHECK_HEADERS([taler/taler_util.h],
@@ -208,7 +216,6 @@ AC_CHECK_HEADERS([taler/taler_util.h],
CPPFLAGS="$CPPFLAGS $POSTGRESQL_CPPFLAGS"
-LDFLAGS="$LDFLAGS -L/usr/local/lib"
# Require minimum libgcrypt version
need_libgcrypt_version=1.6.1
@@ -235,7 +242,7 @@ AC_ARG_WITH(merchant,
AS_CASE([$with_merchant],
[yes], [],
[no], [AC_MSG_ERROR([--with-merchant is required])],
- [LDFLAGS="-L$with_merchant/lib $LDFLAGS"
+ [LDFLAGS="-L$with_merchant/lib/$MULTIARCH -L$with_merchant/lib/ $LDFLAGS"
CPPFLAGS="-I$with_merchant/include $CPPFLAGS $POSTGRESQL_CPPFLAGS"])
AC_CHECK_HEADERS([taler/taler_merchant_service.h],
@@ -260,7 +267,7 @@ AC_ARG_WITH([microhttpd],
AS_CASE([$with_microhttpd],
[yes], [],
[no], [AC_MSG_ERROR([--with-microhttpd is required])],
- [LDFLAGS="-L$with_microhttpd/lib $LDFLAGS"
+ [LDFLAGS="-L$with_microhttpd/lib/$MULTIARCH -L$with_microhttpd/lib/ $LDFLAGS"
CPPFLAGS="-I$with_microhttpd/include $CPPFLAGS"])
AC_CHECK_LIB(microhttpd,MHD_start_daemon,
[AC_CHECK_HEADER([microhttpd.h],[microhttpd=1])])