commit a33cbe88925d68796ea9e7745b06cdc2b50b8567
parent 2e7c80b2ce9e58454b6c548bc9996a6fc981d944
Author: Christian Grothoff <grothoff@gnunet.org>
Date: Sun, 12 Oct 2025 19:36:13 +0200
improve multiarch support
Diffstat:
1 file changed, 13 insertions(+), 6 deletions(-)
diff --git a/configure.ac b/configure.ac
@@ -14,6 +14,13 @@ AM_INIT_AUTOMAKE
# pretty build rules
AM_SILENT_RULES([yes])
+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_PROG_CC
LT_INIT([disable-static])
@@ -104,7 +111,7 @@ AC_ARG_WITH(qrencode,
[
CPPFLAGS="-I$with_qrencode/include $CPPFLAGS"
QR_CFLAGS="-I$with_qrencode/include"
- QR_LIBS="-L$with_qrencode/lib -lqrencode"
+ QR_LIBS="-L$with_qrencode/lib/$MULTIARCH -L$with_qrencode/lib -lqrencode"
AC_CHECK_HEADERS(qrencode.h,qrencode=1)
])
],
@@ -136,7 +143,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],
@@ -158,7 +165,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)])
@@ -183,7 +190,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_json_lib.h],
[AC_CHECK_LIB([gnunetjson], [GNUNET_JSON_parse], libgnunetjson=1)])
@@ -206,7 +213,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)])
@@ -262,7 +269,7 @@ AC_ARG_WITH([jansson],
AS_CASE([$with_jansson],
[yes], [],
[no], [AC_MSG_ERROR([--with-jansson is required])],
- [LDFLAGS="-L$with_jansson/lib $LDFLAGS"
+ [LDFLAGS="-L$with_jansson/lib/$MULTIARCH -L$with_jansson/lib $LDFLAGS"
CPPFLAGS="-I$with_jansson/include $CPPFLAGS"])
AC_CHECK_LIB(jansson,json_dumpb,
[AC_CHECK_HEADER([jansson.h],[jansson=1])])