diff options
| author | Ivan Maidanski <ivmai@mail.ru> | 2011-09-21 13:14:29 +0400 |
|---|---|---|
| committer | Ivan Maidanski <ivmai@mail.ru> | 2011-09-21 13:14:29 +0400 |
| commit | ad82960e07f9e9b8431778d3e99e548212713ce7 (patch) | |
| tree | a6620b0040be968eb04def426f0ccf64e3152a21 /tests/Makefile.am | |
| parent | a57f21af8336f875080b8bb73cdbff05ce72cb5d (diff) | |
| download | libatomic_ops-ad82960e07f9e9b8431778d3e99e548212713ce7.tar.gz | |
Fix configure for mingw-w64/32.
* configure.ac (PICFLAG, THREADDLLIBS): Define as empty for MinGW.
* configure.ac (have_pthreads): New definition (set to true unless
MinGW).
* configure.ac (HAVE_PTHREAD_H): New AM conditional (based on
have_pthreads value).
* tests/Makefile.am (test_atomic_pthreads_SOURCES,
test_atomic_pthreads_CPPFLAGS, test_atomic_pthreads_LDADD): Define
only if HAVE_PTHREAD_H.
* tests/Makefile.am (TESTS): Don't include test_atomic_pthreads unless
HAVE_PTHREAD_H.
* tests/Makefile.am (check_PROGRAMS): Define to TESTS value.
Diffstat (limited to 'tests/Makefile.am')
| -rw-r--r-- | tests/Makefile.am | 28 |
1 files changed, 15 insertions, 13 deletions
diff --git a/tests/Makefile.am b/tests/Makefile.am index b5891fd..66f83bb 100644 --- a/tests/Makefile.am +++ b/tests/Makefile.am @@ -1,5 +1,5 @@ EXTRA_DIST=test_atomic_include.template list_atomic.template run_parallel.h \ - test_atomic_include.h list_atomic.c + test_atomic_include.h list_atomic.c # We distribute test_atomic_include.h and list_atomic.c, since it is hard # to regenerate them on Windows without sed. @@ -7,30 +7,32 @@ BUILT_SOURCES = test_atomic_include.h list_atomic.i CLEANFILES = list_atomic.i AM_CPPFLAGS = \ - -I$(top_builddir)/src -I$(top_srcdir)/src \ - -I$(top_builddir)/tests -I$(top_srcdir)/tests + -I$(top_builddir)/src -I$(top_srcdir)/src \ + -I$(top_builddir)/tests -I$(top_srcdir)/tests +if HAVE_PTHREAD_H TESTS=test_atomic test_atomic_pthreads test_stack test_malloc +test_atomic_pthreads_SOURCES=$(test_atomic_SOURCES) +test_atomic_pthreads_CPPFLAGS=-DAO_USE_PTHREAD_DEFS $(AM_CPPFLAGS) +test_atomic_pthreads_LDADD=$(test_atomic_LDADD) +else +TESTS=test_atomic test_stack test_malloc +endif -#create the test_atomic test program -check_PROGRAMS=test_atomic test_atomic_pthreads test_stack test_malloc +check_PROGRAMS=$(TESTS) test_atomic_SOURCES=test_atomic.c test_atomic_LDADD = $(THREADDLLIBS) $(top_builddir)/src/libatomic_ops.la -test_atomic_pthreads_SOURCES=test_atomic.c -test_atomic_pthreads_CPPFLAGS=-DAO_USE_PTHREAD_DEFS $(AM_CPPFLAGS) -test_atomic_pthreads_LDADD = $(THREADDLLIBS) $(top_builddir)/src/libatomic_ops.la - test_stack_SOURCES=test_stack.c test_stack_LDADD = $(THREADDLLIBS) \ - $(top_builddir)/src/libatomic_ops_gpl.la \ - $(top_builddir)/src/libatomic_ops.la + $(top_builddir)/src/libatomic_ops_gpl.la \ + $(top_builddir)/src/libatomic_ops.la test_malloc_SOURCES=test_malloc.c test_malloc_LDADD = $(THREADDLLIBS) \ - $(top_builddir)/src/libatomic_ops_gpl.la \ - $(top_builddir)/src/libatomic_ops.la + $(top_builddir)/src/libatomic_ops_gpl.la \ + $(top_builddir)/src/libatomic_ops.la test_atomic_include.h: test_atomic_include.template sed -e s/XX// $? > $@ |
