From: Michael Jeanson Date: Fri, 19 Mar 2021 00:58:47 +0000 (-0400) Subject: configure: regroup automake conditionals X-Git-Tag: v0.13.0~31 X-Git-Url: https://git.lttng.org./?a=commitdiff_plain;h=1136f4540f901b884c76fe011a468f2257d30a0f;p=urcu.git configure: regroup automake conditionals This is part of an effort to standardise our autotools setup across project to simplify maintenance. Change-Id: I5be5e254670e2ca6c26564ab391ea1dbfea105cd Signed-off-by: Michael Jeanson Signed-off-by: Mathieu Desnoyers --- diff --git a/configure.ac b/configure.ac index 70e8e01..cb560aa 100644 --- a/configure.ac +++ b/configure.ac @@ -219,11 +219,6 @@ AE_IF_FEATURE_ENABLED([cds-lfht-iter-debug], [ AC_DEFINE([CONFIG_CDS_LFHT_ITER_DEBUG], [1], [Enable extra debugging checks for lock-free hash table iterator traversal. Alters the rculfhash ABI. Make sure to compile both library and application with matching configuration.]) ]) -AM_CFLAGS="$AM_CFLAGS $PTHREAD_CFLAGS" - -AM_CONDITIONAL([NO_SHARED], [test "x$enable_shared" = "xno"]) - - # From the sched_setaffinity(2)'s man page: # ~~~~ @@ -327,6 +322,15 @@ AC_CHECK_FUNCS([sched_setaffinity],[ ]) ]) + +## ## +## Set automake variables for optional feature conditionnals in Makefile.am ## +## ## + +# Building the examples requires the shared libraries to be enabled +AM_CONDITIONAL([ENABLE_EXAMPLES], AE_IS_FEATURE_ENABLED([shared])) + + ## ## ## Substitute variables for use in Makefile.am ## ## ## @@ -339,7 +343,7 @@ AC_SUBST(LT_NO_UNDEFINED) AM_CPPFLAGS="-include config.h" AC_SUBST(AM_CPPFLAGS) -AM_CFLAGS="-Wall -Wextra -Wno-unused-parameter $AM_CFLAGS" +AM_CFLAGS="-Wall -Wextra -Wno-unused-parameter $PTHREAD_CFLAGS" AC_SUBST(AM_CFLAGS) AC_CONFIG_FILES([ diff --git a/doc/examples/Makefile.am b/doc/examples/Makefile.am index edf00eb..2046381 100644 --- a/doc/examples/Makefile.am +++ b/doc/examples/Makefile.am @@ -111,10 +111,8 @@ dist_doc_examples_rculfhash_DATA = \ rculfhash/cds_lfht_lookup.c \ rculfhash/cds_lfht_for_each_entry_duplicate.c -if NO_SHARED -# Don't build examples if shared libraries support was explicitly -# disabled. -else +# Building the examples requires the shared libraries to be enabled +if ENABLE_EXAMPLES SUBDIRS_PROXY = hlist list urcu-flavors wfcqueue rculfqueue \ wfstack lfstack rculfhash