configure: regroup automake conditionals
authorMichael Jeanson <mjeanson@efficios.com>
Fri, 19 Mar 2021 00:58:47 +0000 (20:58 -0400)
committerMathieu Desnoyers <mathieu.desnoyers@efficios.com>
Fri, 19 Mar 2021 18:32:42 +0000 (14:32 -0400)
This is part of an effort to standardise our autotools setup across
project to simplify maintenance.

Change-Id: I5be5e254670e2ca6c26564ab391ea1dbfea105cd
Signed-off-by: Michael Jeanson <mjeanson@efficios.com>
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
configure.ac
doc/examples/Makefile.am

index 70e8e01b7a687275a23e41c32d6735eda1adfdfe..cb560aa88dc0e2eed6d8d5b827d665316d106f20 100644 (file)
@@ -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([
index edf00ebe3e6222a523c30baf287e13ab093e6dc4..20463812866b31a592152141e9dd417ee7655d0d 100644 (file)
@@ -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
This page took 0.035752 seconds and 4 git commands to generate.