* configure.ac: Add AC_SUBST(CFLAGS_EXTRA).
* src/Makefile.am (CFLAGS): Append $(CFLAGS_EXTRA).
* tests/Makefile.am (CFLAGS): Likewise.
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],
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
-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)