1 ## Process this file with automake to produce Makefile.in.
3 ## Copyright 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010,
4 ## 2011 Free Software Foundation, Inc.
6 ## This file is part of GUILE.
8 ## GUILE is free software; you can redistribute it and/or modify it
9 ## under the terms of the GNU Lesser General Public License as
10 ## published by the Free Software Foundation; either version 3, or
11 ## (at your option) any later version.
13 ## GUILE is distributed in the hope that it will be useful, but
14 ## WITHOUT ANY WARRANTY; without even the implied warranty of
15 ## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 ## GNU Lesser General Public License for more details.
18 ## You should have received a copy of the GNU Lesser General Public
19 ## License along with GUILE; see the file COPYING.LESSER. If not,
20 ## write to the Free Software Foundation, Inc., 51 Franklin Street,
21 ## Fifth Floor, Boston, MA 02110-1301 USA
23 include $(top_srcdir)/am/snarf
25 # initializations so we can use += below.
35 builddir="$(builddir)" \
36 GUILE_AUTO_COMPILE=0 "${top_builddir}/meta/uninstalled-env"
38 ## Check for headers in $(srcdir) and bulid dir before $(CPPFLAGS), which
39 ## may point us to an old, installed version of guile.
40 AM_CPPFLAGS = -I$(top_srcdir) -I$(top_builddir) \
41 -I$(top_srcdir)/lib -I$(top_builddir)/lib
44 -I$(top_srcdir)/test-suite/standalone -I. \
45 $(EXTRA_DEFS) $(GUILE_CFLAGS) $(GCC_CFLAGS)
47 AM_LDFLAGS = $(GUILE_CFLAGS)
49 # How to link with libguile (same as `Libs' in `guile-2.0.pc'.)
51 ${top_builddir}/libguile/libguile-@GUILE_EFFECTIVE_VERSION@.la \
56 -I$(top_srcdir) -I$(top_srcdir)/lib -I$(top_builddir)/lib -I$(top_builddir) \
57 -I. $(DEFS) $(DEFAULT_INCLUDES) $(CPPFLAGS) $(CFLAGS)
61 $(AM_V_SNARF)$(GUILE_SNARF) -o $@ $< $(snarfcppopts)
67 check_SCRIPTS += test-system-cmds
68 TESTS += test-system-cmds
70 check_SCRIPTS += test-bad-identifiers
71 TESTS += test-bad-identifiers
73 check_SCRIPTS += test-require-extension
74 TESTS += test-require-extension
76 check_SCRIPTS += test-guile-snarf
77 TESTS += test-guile-snarf
79 check_SCRIPTS += test-import-order
80 TESTS += test-import-order
81 EXTRA_DIST += test-import-order-a.scm test-import-order-b.scm \
82 test-import-order-c.scm test-import-order-d.scm
85 test_num2integral_SOURCES = test-num2integral.c
86 test_num2integral_CFLAGS = ${test_cflags}
87 test_num2integral_LDADD = $(LIBGUILE_LDADD)
88 check_PROGRAMS += test-num2integral
89 TESTS += test-num2integral
92 test_round_CFLAGS = ${test_cflags}
93 test_round_LDADD = $(LIBGUILE_LDADD)
94 check_PROGRAMS += test-round
97 if HAVE_SHARED_LIBRARIES
100 noinst_LTLIBRARIES += libtest-asmobs.la
101 libtest_asmobs_la_SOURCES = test-asmobs-lib.c
102 libtest_asmobs_la_CFLAGS = ${test_cflags}
103 libtest_asmobs_la_LDFLAGS = -module -no-undefined -rpath `pwd` # so libtool will really build an .so
104 libtest_asmobs_la_LIBADD = $(LIBGUILE_LDADD)
105 BUILT_SOURCES += test-asmobs-lib.x
106 check_SCRIPTS += test-asmobs
110 noinst_LTLIBRARIES += libtest-ffi.la
111 libtest_ffi_la_SOURCES = test-ffi-lib.c
112 libtest_ffi_la_CFLAGS = ${test_cflags}
113 libtest_ffi_la_LDFLAGS = -module -no-undefined -rpath `pwd` # so libtool will really build an .so
114 libtest_ffi_la_LIBADD = $(LIBGUILE_LDADD)
115 check_SCRIPTS += test-ffi
118 endif HAVE_SHARED_LIBRARIES
121 test_list_SOURCES = test-list.c
122 test_list_CFLAGS = ${test_cflags}
123 test_list_LDADD = $(LIBGUILE_LDADD)
124 check_PROGRAMS += test-list
128 test_unwind_SOURCES = test-unwind.c
129 test_unwind_CFLAGS = ${test_cflags}
130 test_unwind_LDADD = $(LIBGUILE_LDADD)
131 check_PROGRAMS += test-unwind
135 test_conversion_SOURCES = test-conversion.c
136 test_conversion_CFLAGS = ${test_cflags}
137 test_conversion_LDADD = $(LIBGUILE_LDADD)
138 check_PROGRAMS += test-conversion
139 TESTS += test-conversion
142 test_loose_ends_SOURCES = test-loose-ends.c
143 test_loose_ends_CFLAGS = ${test_cflags}
144 test_loose_ends_LDADD = $(LIBGUILE_LDADD)
145 check_PROGRAMS += test-loose-ends
146 TESTS += test-loose-ends
149 check_SCRIPTS += test-fast-slot-ref
150 TESTS += test-fast-slot-ref
153 check_SCRIPTS += test-mb-regexp
154 TESTS += test-mb-regexp
157 check_SCRIPTS += test-use-srfi
158 TESTS += test-use-srfi
161 test_scm_c_read_SOURCES = test-scm-c-read.c
162 test_scm_c_read_CFLAGS = ${test_cflags}
163 test_scm_c_read_LDADD = $(LIBGUILE_LDADD)
164 check_PROGRAMS += test-scm-c-read
165 TESTS += test-scm-c-read
167 # test-scm-take-locale-symbol
168 test_scm_take_locale_symbol_SOURCES = test-scm-take-locale-symbol.c
169 test_scm_take_locale_symbol_CFLAGS = ${test_cflags}
170 test_scm_take_locale_symbol_LDADD = $(LIBGUILE_LDADD)
171 check_PROGRAMS += test-scm-take-locale-symbol
172 TESTS += test-scm-take-locale-symbol
174 # test-scm-take-u8vector
175 test_scm_take_u8vector_SOURCES = test-scm-take-u8vector.c
176 test_scm_take_u8vector_CFLAGS = ${test_cflags}
177 test_scm_take_u8vector_LDADD = $(LIBGUILE_LDADD)
178 check_PROGRAMS += test-scm-take-u8vector
179 TESTS += test-scm-take-u8vector
181 # test-scm-take-u8vector
182 test_scm_to_latin1_string_SOURCES = test-scm-to-latin1-string.c
183 test_scm_to_latin1_string_CFLAGS = ${test_cflags}
184 test_scm_to_latin1_string_LDADD = $(LIBGUILE_LDADD)
185 check_PROGRAMS += test-scm-to-latin1-string
186 TESTS += test-scm-to-latin1-string
188 if HAVE_SHARED_LIBRARIES
191 noinst_LTLIBRARIES += libtest-extensions.la
192 libtest_extensions_la_SOURCES = test-extensions-lib.c
193 libtest_extensions_la_CFLAGS = ${test_cflags}
194 libtest_extensions_la_LDFLAGS = -module -no-undefined -rpath `pwd` # so libtool will really build an .so
195 libtest_extensions_la_LIBADD = $(LIBGUILE_LDADD)
196 check_SCRIPTS += test-extensions
197 TESTS += test-extensions
199 endif HAVE_SHARED_LIBRARIES
201 if BUILD_PTHREAD_SUPPORT
203 # test-with-guile-module
204 test_with_guile_module_CFLAGS = ${test_cflags}
205 test_with_guile_module_LDADD = $(LIBGUILE_LDADD)
206 check_PROGRAMS += test-with-guile-module
207 TESTS += test-with-guile-module
209 test_scm_with_guile_CFLAGS = ${test_cflags}
210 test_scm_with_guile_LDADD = $(LIBGUILE_LDADD)
211 check_PROGRAMS += test-scm-with-guile
212 TESTS += test-scm-with-guile
214 test_scm_spawn_thread_CFLAGS = ${test_cflags}
215 test_scm_spawn_thread_LDADD = $(LIBGUILE_LDADD)
216 check_PROGRAMS += test-scm-spawn-thread
217 TESTS += test-scm-spawn-thread
219 test_pthread_create_CFLAGS = ${test_cflags}
220 test_pthread_create_LDADD = $(LIBGUILE_LDADD)
221 check_PROGRAMS += test-pthread-create
222 TESTS += test-pthread-create
224 test_pthread_create_secondary_CFLAGS = ${test_cflags} $(BDW_GC_CFLAGS)
225 test_pthread_create_secondary_LDADD = $(LIBGUILE_LDADD)
226 check_PROGRAMS += test-pthread-create-secondary
227 TESTS += test-pthread-create-secondary
231 EXTRA_DIST += test-with-guile-module.c test-scm-with-guile.c
235 EXTRA_DIST += ${check_SCRIPTS}