commit 13909106a0ab09e3cb89c539abe873bed9e5ad21
parent 510bf6c66349da1180cf1136d4a548f422b8677c
Author: Christian Grothoff <grothoff@gnunet.org>
Date: Sun, 12 Oct 2025 19:35:20 +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 Challenger documentation])],
@@ -62,7 +70,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], [GNUNET_SCHEDULER_run], libgnunetutil=1)])
@@ -97,11 +105,10 @@ 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"])
CPPFLAGS="$CPPFLAGS $POSTGRESQL_CPPFLAGS"
-LDFLAGS="$LDFLAGS -L/usr/local/lib"
AC_CHECK_HEADERS([gnunet/gnunet_pq_lib.h],
[AC_CHECK_LIB([gnunetpq], [GNUNET_PQ_connect_with_cfg], libgnunetpq=1)])
@@ -118,7 +125,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_mhd_lib.h],
@@ -156,7 +163,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])])
@@ -211,7 +218,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)])