X-Git-Url: http://drtracing.org/?a=blobdiff_plain;f=configure.ac;h=4f58d027df1a462ab3e5b3d74dec3d3e47622fc8;hb=367e559c27a9c9637ff26c9531fd44ef22991aea;hp=ac0883f3eeacd72a161421980a4be34795c68d68;hpb=ef6695f10502099b68005a8248a0c90a3323a0e6;p=librseq.git diff --git a/configure.ac b/configure.ac index ac0883f..4f58d02 100644 --- a/configure.ac +++ b/configure.ac @@ -196,11 +196,32 @@ PKG_CHECK_MODULES([SECCOMP], [libseccomp], ## Optional features selection ## ## ## +# Enabled by default +AE_FEATURE_DEFAULT_ENABLE +AE_FEATURE([numa],[disable NUMA support]) + # When given, add -Werror to WARN_CFLAGS and WARN_CXXFLAGS. # Disabled by default AE_FEATURE_DEFAULT_DISABLE AE_FEATURE([Werror], [Treat compiler warnings as errors.]) +## ## +## Check for optional features dependencies ## +## ## + +# The numa integration requires libnuma +AE_IF_FEATURE_ENABLED([numa], [ + AC_CHECK_LIB([numa], [numa_available], [ + AC_DEFINE([HAVE_LIBNUMA], [1], [Define to 1 if libnuma is available.]) + ], [ + AC_MSG_ERROR([dnl +libnuma is not available. Please either install it (e.g. libnuma-dev) or use +[LDFLAGS]=-Ldir to specify the right location, or use --disable-numa configure +argument to disable NUMA support. + ]) + ]) +]) + ## ## ## Set automake variables for optional feature conditionnals in Makefile.am ## @@ -208,7 +229,7 @@ AE_FEATURE([Werror], [Treat compiler warnings as errors.]) AM_CONDITIONAL([ENABLE_SHARED], [test "x${enable_shared}" = "xyes"]) AM_CONDITIONAL([ENABLE_SECCOMP], [test "x${have_seccomp}" = "xyes"]) - +AM_CONDITIONAL([ENABLE_NUMA], AE_IS_FEATURE_ENABLED([numa])) ## ## ## Substitute variables for use in Makefile.am ## @@ -264,6 +285,8 @@ AS_ECHO PPRINT_SUBTITLE([Features]) PPRINT_PROP_STRING([Target architecture], $host_cpu) +AE_IS_FEATURE_ENABLED([numa]) && value=1 || value=0 +PPRINT_PROP_BOOL([NUMA], $value) report_bindir="`eval eval echo $bindir`" report_libdir="`eval eval echo $libdir`"