summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBen Gamari <ben@smart-cactus.org>2021-09-17 17:53:39 -0400
committerMarge Bot <ben+marge-bot@smart-cactus.org>2021-09-23 16:00:18 -0400
commit316ac68fb88e2d61e2dc07c2a75bcfb6d43e0d43 (patch)
tree76bcd01d1394c79e8187ab58d171b4661e0e3399
parent0282706681ccc7748082c8ada61a7ca916fcc820 (diff)
downloadhaskell-316ac68fb88e2d61e2dc07c2a75bcfb6d43e0d43.tar.gz
configure: Clarify meaning of CabalHaveLibffi
Previously the meaning of this flag was unclear and as a result I suspect that CabalHaveLibffi could be incorrectly False.
-rw-r--r--configure.ac4
-rw-r--r--rts/package.conf.in2
-rw-r--r--rts/rts.cabal.in4
3 files changed, 3 insertions, 7 deletions
diff --git a/configure.ac b/configure.ac
index 84d7e0fd87..a1a561d70e 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1117,7 +1117,6 @@ AC_ARG_WITH([ffi-libraries],
AC_SUBST(FFILibDir)
-AC_SUBST([CabalHaveLibffi],[False])
AS_IF([test "$UseSystemLibFFI" = "YES"], [
CFLAGS2="$CFLAGS"
CFLAGS="$LIBFFI_CFLAGS $CFLAGS"
@@ -1134,8 +1133,7 @@ AS_IF([test "$UseSystemLibFFI" = "YES"], [
fi
AC_CHECK_LIB(ffi, ffi_call,
[AC_CHECK_HEADERS([ffi.h], [break], [])
- AC_DEFINE([HAVE_LIBFFI], [1], [Define to 1 if you have libffi.])]
- AC_SUBST([CabalHaveLibffi],[True]),
+ AC_DEFINE([HAVE_SYSTEM_LIBFFI], [1], [Define to 1 if you have libffi.])],
[AC_MSG_ERROR([Cannot find system libffi])])
CFLAGS="$CFLAGS2"
LDFLAGS="$LDFLAGS2"
diff --git a/rts/package.conf.in b/rts/package.conf.in
index 8baf62bc7d..6bc38e592d 100644
--- a/rts/package.conf.in
+++ b/rts/package.conf.in
@@ -35,7 +35,7 @@ extra-libraries:
#if defined(HAVE_LIBDL)
, "dl"
#endif
-#if defined(HAVE_LIBFFI)
+#if defined(HAVE_SYSTEM_LIBFFI)
, "ffi"
#endif
#if HAVE_LIBNUMA
diff --git a/rts/rts.cabal.in b/rts/rts.cabal.in
index 300a3bcd46..5739af6713 100644
--- a/rts/rts.cabal.in
+++ b/rts/rts.cabal.in
@@ -10,8 +10,6 @@ flag librt
default: @CabalHaveLibrt@
flag libdl
default: @CabalHaveLibdl@
-flag ffi
- default: @CabalHaveLibffi@
flag use-system-libffi
default: @CabalUseSystemLibFFI@
flag libffi-adjustors
@@ -106,7 +104,7 @@ library
extra-libraries: rt
if flag(libdl)
extra-libraries: dl
- if flag(ffi)
+ if flag(use-system-libffi)
extra-libraries: ffi
if os(windows)
extra-libraries: