summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDoğan Çeçen <sepeth@fastmail.com>2024-10-30 22:41:06 +0200
committerAndreas Enge <andreas@enge.fr>2024-11-22 20:12:00 +0100
commit8a7bd211d21f06c1234fbb82bb905d202d58f598 (patch)
tree6f438b833e0b6807d4112ff3c9aadad5b875bf9c
parent043f02462766a913080723ad286028a288b79373 (diff)
daemon: Fix --with-libgcrypt-* args of the configure script.
Since the daemon is written in C++, we need to modify CXXFLAGS instead of CFLAGS to find include files. Use LIBGCRYPT_LDFLAGS instead of LIBGCRYPT_LIBS, since only the former is added to LDFLAGS. * config-daemon.ac: Change LDFLAGS and CXXFLAGS when --with-libgcrypt-* arguments are passed to the configure script. Change-Id: I0f3867491e46608e71b1ea0b3214674bca64b31d Signed-off-by: Andreas Enge <andreas@enge.fr>
-rw-r--r--config-daemon.ac19
1 files changed, 7 insertions, 12 deletions
diff --git a/config-daemon.ac b/config-daemon.ac
index 9854f1d694..1ac204ceed 100644
--- a/config-daemon.ac
+++ b/config-daemon.ac
@@ -39,28 +39,26 @@ if test "x$guix_build_daemon" = "xyes"; then
case "$LIBGCRYPT_PREFIX" in
no)
- LIBGCRYPT_CFLAGS=""
+ LIBGCRYPT_CXXFLAGS=""
;;
*)
- LIBGCRYPT_CFLAGS="-I$LIBGCRYPT_PREFIX/include"
+ LIBGCRYPT_CXXFLAGS="-I$LIBGCRYPT_PREFIX/include"
;;
esac
case "$LIBGCRYPT_LIBDIR" in
no | "")
- LIBGCRYPT_LIBS="-lgcrypt"
+ LIBGCRYPT_LDFLAGS="-lgcrypt"
;;
*)
- LIBGCRYPT_LIBS="-L$LIBGCRYPT_LIBDIR -lgcrypt"
+ LIBGCRYPT_LDFLAGS="-L$LIBGCRYPT_LIBDIR -lgcrypt"
;;
esac
- AC_SUBST([LIBGCRYPT_CFLAGS])
- AC_SUBST([LIBGCRYPT_LIBS])
+ AC_SUBST([LIBGCRYPT_CXXFLAGS])
+ AC_SUBST([LIBGCRYPT_LDFLAGS])
- save_CFLAGS="$CFLAGS"
- save_LDFLAGS="$LDFLAGS"
- CFLAGS="$CFLAGS $LIBGCRYPT_CFLAGS"
+ CXXFLAGS="$CXXFLAGS $LIBGCRYPT_CXXFLAGS"
LDFLAGS="$LDFLAGS $LIBGCRYPT_LDFLAGS"
have_gcrypt=yes
@@ -70,9 +68,6 @@ if test "x$guix_build_daemon" = "xyes"; then
AC_MSG_ERROR([GNU libgcrypt not found; please install it.])
fi
- CFLAGS="$save_CFLAGS"
- LDFLAGS="$save_LDFLAGS"
-
dnl Chroot support.
AC_CHECK_FUNCS([chroot unshare])
AC_CHECK_HEADERS([sched.h sys/param.h sys/mount.h sys/syscall.h])