]> granicus.if.org Git - libatomic_ops/commitdiff
Support CFLAGS_EXTRA to pass extra user-defined compiler flags (configure)
authorIvan Maidanski <ivmai@mail.ru>
Fri, 9 Dec 2016 21:31:25 +0000 (00:31 +0300)
committerIvan Maidanski <ivmai@mail.ru>
Fri, 9 Dec 2016 21:31:25 +0000 (00:31 +0300)
* configure.ac: Add AC_SUBST(CFLAGS_EXTRA).
* src/Makefile.am (CFLAGS): Append $(CFLAGS_EXTRA).
* tests/Makefile.am (CFLAGS): Likewise.

configure.ac
src/Makefile.am
tests/Makefile.am

index 796dccd62f09ee4f889eb6679070cb9eec55fac4..28e10c0e7646b4c766a28d9e694fe0e5a1a9c68b 100644 (file)
@@ -113,6 +113,9 @@ fi
 AC_SUBST(PICFLAG)
 AC_SUBST(DEFS)
 
+# Extra user-defined C flags.
+AC_SUBST([CFLAGS_EXTRA])
+
 AH_TEMPLATE([_PTHREADS], [Indicates the use of pthreads (NetBSD).])
 
 AH_TEMPLATE([AO_USE_NANOSLEEP],
index 8971370828edc42a6479cf9e066936d5d38b7945..ad4a21cf29c35be142bd2762a2617c3b7e5383d7 100644 (file)
@@ -1,6 +1,8 @@
 AM_CFLAGS=@PICFLAG@
 AM_CPPFLAGS = -I$(top_builddir)/src -I$(top_srcdir)/src
 
+CFLAGS += $(CFLAGS_EXTRA)
+
 include_HEADERS = atomic_ops.h atomic_ops_stack.h atomic_ops_malloc.h
 lib_LTLIBRARIES = libatomic_ops.la libatomic_ops_gpl.la
 if NEED_ASM
index 4cd04de9504f56b141757131adab58dfb045e857..cc4aefd11dca0d7d204e71979fa355b8e8574a61 100644 (file)
@@ -10,6 +10,8 @@ AM_CPPFLAGS = \
         -I$(top_builddir)/src -I$(top_srcdir)/src \
         -I$(top_builddir)/tests -I$(top_srcdir)/tests
 
+CFLAGS += $(CFLAGS_EXTRA)
+
 if HAVE_PTHREAD_H
 TESTS=test_atomic test_atomic_pthreads test_stack test_malloc
 test_atomic_pthreads_SOURCES=$(test_atomic_SOURCES)