Only run `test-with-guile-module' when pthread support is built.
[bpt/guile.git] / test-suite / standalone / Makefile.am
1 ## Process this file with automake to produce Makefile.in.
2 ##
3 ## Copyright 2003, 2004, 2005, 2006, 2007, 2008 Software Foundation, Inc.
4 ##
5 ## This file is part of GUILE.
6 ##
7 ## GUILE is free software; you can redistribute it and/or modify
8 ## it under the terms of the GNU General Public License as
9 ## published by the Free Software Foundation; either version 2, or
10 ## (at your option) any later version.
11 ##
12 ## GUILE is distributed in the hope that it will be useful, but
13 ## WITHOUT ANY WARRANTY; without even the implied warranty of
14 ## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 ## GNU General Public License for more details.
16 ##
17 ## You should have received a copy of the GNU General Public
18 ## License along with GUILE; see the file COPYING. If not, write
19 ## to the Free Software Foundation, Inc., 51 Franklin Street, Fifth
20 ## Floor, Boston, MA 02110-1301 USA
21
22
23 # initializations so we can use += below.
24 TESTS =
25 noinst_LTLIBRARIES =
26 check_PROGRAMS =
27 check_SCRIPTS =
28 BUILT_SOURCES =
29 EXTRA_DIST =
30
31 TESTS_ENVIRONMENT = "${top_builddir}/pre-inst-guile-env"
32
33 test_cflags = \
34 -I$(top_srcdir)/test-suite/standalone \
35 -I$(top_srcdir) \
36 -I$(top_srcdir)/lib -I$(top_builddir)/lib \
37 $(EXTRA_DEFS) $(GUILE_CFLAGS)
38
39 AM_LDFLAGS = $(GUILE_CFLAGS)
40
41 snarfcppopts = \
42 $(DEFS) $(DEFAULT_INCLUDES) $(CPPFLAGS) $(CFLAGS) -I$(top_srcdir) \
43 -I$(top_srcdir)/lib -I$(top_builddir)/lib
44
45 SUFFIXES = .x
46 .c.x:
47 ${top_builddir}/libguile/guile-snarf -o $@ $< $(snarfcppopts)
48
49 CLEANFILES = *.x
50
51 .DELETE_ON_ERROR:
52
53 check_SCRIPTS += test-system-cmds
54 TESTS += test-system-cmds
55
56 check_SCRIPTS += test-bad-identifiers
57 TESTS += test-bad-identifiers
58
59 check_SCRIPTS += test-require-extension
60 TESTS += test-require-extension
61
62 # test-num2integral
63 test_num2integral_SOURCES = test-num2integral.c
64 test_num2integral_CFLAGS = ${test_cflags}
65 test_num2integral_LDADD = ${top_builddir}/libguile/libguile.la
66 check_PROGRAMS += test-num2integral
67 TESTS += test-num2integral
68
69 # test-round
70 test_round_CFLAGS = ${test_cflags}
71 test_round_LDADD = ${top_builddir}/libguile/libguile.la
72 check_PROGRAMS += test-round
73 TESTS += test-round
74
75 # test-gh
76 test_gh_SOURCES = test-gh.c
77 test_gh_CFLAGS = ${test_cflags}
78 test_gh_LDADD = ${top_builddir}/libguile/libguile.la
79 check_PROGRAMS += test-gh
80 TESTS += test-gh
81
82 # test-asmobs
83 noinst_LTLIBRARIES += libtest-asmobs.la
84 libtest_asmobs_la_SOURCES = test-asmobs-lib.c test-asmobs-lib.x
85 libtest_asmobs_la_CFLAGS = ${test_cflags}
86 libtest_asmobs_la_LDFLAGS = -no-undefined -rpath `pwd` # so libtool will really build an .so
87 libtest_asmobs_la_LIBADD = ${top_builddir}/libguile/libguile.la
88 BUILT_SOURCES += test-asmobs-lib.x
89 check_SCRIPTS += test-asmobs
90 TESTS += test-asmobs
91
92 # test-list
93 test_list_SOURCES = test-list.c
94 test_list_CFLAGS = ${test_cflags}
95 test_list_LDADD = ${top_builddir}/libguile/libguile.la
96 check_PROGRAMS += test-list
97 TESTS += test-list
98
99 # test-unwind
100 test_unwind_SOURCES = test-unwind.c
101 test_unwind_CFLAGS = ${test_cflags}
102 test_unwind_LDADD = ${top_builddir}/libguile/libguile.la
103 check_PROGRAMS += test-unwind
104 TESTS += test-unwind
105
106 # test-conversion
107 test_conversion_SOURCES = test-conversion.c
108 test_conversion_CFLAGS = ${test_cflags}
109 test_conversion_LDADD = ${top_builddir}/libguile/libguile.la
110 check_PROGRAMS += test-conversion
111 TESTS += test-conversion
112
113 # test-use-srfi
114 check_SCRIPTS += test-use-srfi
115 TESTS += test-use-srfi
116
117 if BUILD_PTHREAD_SUPPORT
118
119 # test-with-guile-module
120 test_with_guile_module_CFLAGS = ${test_cflags}
121 test_with_guile_module_LDADD = ${top_builddir}/libguile/libguile.la
122 check_PROGRAMS += test-with-guile-module
123 TESTS += test-with-guile-module
124
125 else
126
127 EXTRA_DIST += test-with-guile-module.c
128
129 endif
130
131 all-local:
132 cd ${srcdir} && chmod u+x ${check_SCRIPTS}
133
134 EXTRA_DIST += ${check_SCRIPTS}