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.
34 builddir="$(builddir)" \
35 GUILE_AUTO_COMPILE=0 "${top_builddir}/meta/uninstalled-env"
37 ## Check for headers in $(srcdir) and bulid dir before $(CPPFLAGS), which
38 ## may point us to an old, installed version of guile.
39 AM_CPPFLAGS = -I$(top_srcdir) -I$(top_builddir) \
40 -I$(top_srcdir)/lib -I$(top_builddir)/lib
43 -I$(top_srcdir)/test-suite/standalone -I. \
44 $(EXTRA_DEFS) $(GUILE_CFLAGS) $(GCC_CFLAGS)
46 AM_LDFLAGS = $(GUILE_CFLAGS)
48 # How to link with libguile (same as `Libs' in `guile-2.0.pc'.)
50 ${top_builddir}/libguile/libguile-@GUILE_EFFECTIVE_VERSION@.la \
55 -I$(top_srcdir) -I$(top_srcdir)/lib -I$(top_builddir)/lib -I$(top_builddir) \
56 -I. $(DEFS) $(DEFAULT_INCLUDES) $(CPPFLAGS) $(CFLAGS)
60 $(AM_V_SNARF)$(GUILE_SNARF) -o $@ $< $(snarfcppopts)
66 check_SCRIPTS += test-system-cmds
67 TESTS += test-system-cmds
69 check_SCRIPTS += test-bad-identifiers
70 TESTS += test-bad-identifiers
72 check_SCRIPTS += test-require-extension
73 TESTS += test-require-extension
75 check_SCRIPTS += test-guile-snarf
76 TESTS += test-guile-snarf
79 test_num2integral_SOURCES = test-num2integral.c
80 test_num2integral_CFLAGS = ${test_cflags}
81 test_num2integral_LDADD = $(LIBGUILE_LDADD)
82 check_PROGRAMS += test-num2integral
83 TESTS += test-num2integral
86 test_round_CFLAGS = ${test_cflags}
87 test_round_LDADD = $(LIBGUILE_LDADD)
88 check_PROGRAMS += test-round
91 if HAVE_SHARED_LIBRARIES
94 noinst_LTLIBRARIES += libtest-asmobs.la
95 libtest_asmobs_la_SOURCES = test-asmobs-lib.c
96 libtest_asmobs_la_CFLAGS = ${test_cflags}
97 libtest_asmobs_la_LDFLAGS = -module -no-undefined -rpath `pwd` # so libtool will really build an .so
98 libtest_asmobs_la_LIBADD = $(LIBGUILE_LDADD)
99 BUILT_SOURCES += test-asmobs-lib.x
100 check_SCRIPTS += test-asmobs
104 noinst_LTLIBRARIES += libtest-ffi.la
105 libtest_ffi_la_SOURCES = test-ffi-lib.c
106 libtest_ffi_la_CFLAGS = ${test_cflags}
107 libtest_ffi_la_LDFLAGS = -module -no-undefined -rpath `pwd` # so libtool will really build an .so
108 libtest_ffi_la_LIBADD = $(LIBGUILE_LDADD)
109 check_SCRIPTS += test-ffi
112 endif HAVE_SHARED_LIBRARIES
115 test_list_SOURCES = test-list.c
116 test_list_CFLAGS = ${test_cflags}
117 test_list_LDADD = $(LIBGUILE_LDADD)
118 check_PROGRAMS += test-list
122 test_unwind_SOURCES = test-unwind.c
123 test_unwind_CFLAGS = ${test_cflags}
124 test_unwind_LDADD = $(LIBGUILE_LDADD)
125 check_PROGRAMS += test-unwind
129 test_conversion_SOURCES = test-conversion.c
130 test_conversion_CFLAGS = ${test_cflags}
131 test_conversion_LDADD = $(LIBGUILE_LDADD)
132 check_PROGRAMS += test-conversion
133 TESTS += test-conversion
136 test_loose_ends_SOURCES = test-loose-ends.c
137 test_loose_ends_CFLAGS = ${test_cflags}
138 test_loose_ends_LDADD = $(LIBGUILE_LDADD)
139 check_PROGRAMS += test-loose-ends
140 TESTS += test-loose-ends
143 check_SCRIPTS += test-fast-slot-ref
144 TESTS += test-fast-slot-ref
147 check_SCRIPTS += test-mb-regexp
148 TESTS += test-mb-regexp
151 check_SCRIPTS += test-use-srfi
152 TESTS += test-use-srfi
155 test_scm_c_read_SOURCES = test-scm-c-read.c
156 test_scm_c_read_CFLAGS = ${test_cflags}
157 test_scm_c_read_LDADD = $(LIBGUILE_LDADD)
158 check_PROGRAMS += test-scm-c-read
159 TESTS += test-scm-c-read
161 # test-scm-take-locale-symbol
162 test_scm_take_locale_symbol_SOURCES = test-scm-take-locale-symbol.c
163 test_scm_take_locale_symbol_CFLAGS = ${test_cflags}
164 test_scm_take_locale_symbol_LDADD = $(LIBGUILE_LDADD)
165 check_PROGRAMS += test-scm-take-locale-symbol
166 TESTS += test-scm-take-locale-symbol
168 # test-scm-take-u8vector
169 test_scm_take_u8vector_SOURCES = test-scm-take-u8vector.c
170 test_scm_take_u8vector_CFLAGS = ${test_cflags}
171 test_scm_take_u8vector_LDADD = $(LIBGUILE_LDADD)
172 check_PROGRAMS += test-scm-take-u8vector
173 TESTS += test-scm-take-u8vector
175 if HAVE_SHARED_LIBRARIES
178 noinst_LTLIBRARIES += libtest-extensions.la
179 libtest_extensions_la_SOURCES = test-extensions-lib.c
180 libtest_extensions_la_CFLAGS = ${test_cflags}
181 libtest_extensions_la_LDFLAGS = -module -no-undefined -rpath `pwd` # so libtool will really build an .so
182 libtest_extensions_la_LIBADD = $(LIBGUILE_LDADD)
183 check_SCRIPTS += test-extensions
184 TESTS += test-extensions
186 endif HAVE_SHARED_LIBRARIES
188 if BUILD_PTHREAD_SUPPORT
190 # test-with-guile-module
191 test_with_guile_module_CFLAGS = ${test_cflags}
192 test_with_guile_module_LDADD = $(LIBGUILE_LDADD)
193 check_PROGRAMS += test-with-guile-module
194 TESTS += test-with-guile-module
196 test_scm_with_guile_CFLAGS = ${test_cflags}
197 test_scm_with_guile_LDADD = $(LIBGUILE_LDADD)
198 check_PROGRAMS += test-scm-with-guile
199 TESTS += test-scm-with-guile
203 EXTRA_DIST += test-with-guile-module.c test-scm-with-guile.c
207 EXTRA_DIST += ${check_SCRIPTS}