summaryrefslogtreecommitdiff
path: root/configure.ac
diff options
context:
space:
mode:
authorBen Gamari <ben@smart-cactus.org>2021-04-02 12:01:21 -0400
committerMarge Bot <ben+marge-bot@smart-cactus.org>2021-05-05 05:42:38 -0400
commit0de2012cc05b12a810d27f5c9009c870cf6fabfd (patch)
treed2d7981348de4a93b667b356908902a2211213cf /configure.ac
parent34452fbdf556919e563ab57df792a1413051a74a (diff)
downloadhaskell-0de2012cc05b12a810d27f5c9009c870cf6fabfd.tar.gz
configure: Move libnuma check to macro
Diffstat (limited to 'configure.ac')
-rw-r--r--configure.ac58
1 files changed, 1 insertions, 57 deletions
diff --git a/configure.ac b/configure.ac
index 7e104a8f84..2eaa55ac0d 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1333,63 +1333,7 @@ else
fi
AC_DEFINE_UNQUOTED([USE_LIBDW], [$USE_LIBDW], [Set to 1 to use libdw])
-dnl ** Have libnuma?
-dnl --------------------------------------------------------------
-AC_ARG_WITH([libnuma-libraries],
- [AS_HELP_STRING([--with-libnuma-libraries=ARG],
- [Find libraries for libnuma in ARG [default=system default]])
- ],
- [
- LibNumaLibDir="$withval"
- LIBNUMA_LDFLAGS="-L$withval"
- ])
-
-AC_SUBST(LibNumaLibDir)
-
-AC_ARG_WITH([libnuma-includes],
- [AS_HELP_STRING([--with-libnuma-includes=ARG],
- [Find includes for libnuma in ARG [default=system default]])
- ],
- [
- LibNumaIncludeDir="$withval"
- LIBNUMA_CFLAGS="-I$withval"
- ])
-
-AC_SUBST(LibNumaIncludeDir)
-
-HaveLibNuma=0
-AC_ARG_ENABLE(numa,
- [AS_HELP_STRING([--enable-numa],
- [Enable NUMA memory policy and thread affinity support in the
- runtime system via numactl's libnuma [default=auto]])])
-
-if test "$enable_numa" != "no" ; then
- CFLAGS2="$CFLAGS"
- CFLAGS="$LIBNUMA_CFLAGS $CFLAGS"
- LDFLAGS2="$LDFLAGS"
- LDFLAGS="$LIBNUMA_LDFLAGS $LDFLAGS"
-
- AC_CHECK_HEADERS([numa.h numaif.h])
-
- if test "$ac_cv_header_numa_h$ac_cv_header_numaif_h" = "yesyes" ; then
- AC_CHECK_LIB(numa, numa_available,HaveLibNuma=1)
- fi
- if test "$enable_numa:$HaveLibNuma" = "yes:0" ; then
- AC_MSG_ERROR([Cannot find system libnuma (required by --enable-numa)])]
- fi
-
- CFLAGS="$CFLAGS2"
- LDFLAGS="$LDFLAGS2"
-fi
-
-AC_DEFINE_UNQUOTED([HAVE_LIBNUMA], [$HaveLibNuma], [Define to 1 if you have libnuma])
-if test $HaveLibNuma = "1" ; then
- AC_SUBST([UseLibNuma],[YES])
- AC_SUBST([CabalHaveLibNuma],[True])
-else
- AC_SUBST([UseLibNuma],[NO])
- AC_SUBST([CabalHaveLibNuma],[False])
-fi
+FP_FIND_LIBNUMA
dnl ** Documentation
dnl --------------------------------------------------------------