+
+############################## Tests ##################################
+
+EXTRA_DIST += \
+ tests/test_convert \
+ tests/test_filetools \
+ tests/test_lstrings \
+ tests/test_trivstring \
+ tests/regfiles/convert \
+ tests/regfiles/filetools \
+ tests/regfiles/lstrings \
+ tests/regfiles/trivstring
+
+
+TESTS = \
+ tests/test_convert \
+ tests/test_filetools \
+ tests/test_lstrings \
+ tests/test_trivstring
+
+check_PROGRAMS = \
+ check_convert \
+ check_filetools \
+ check_lstrings \
+ check_trivstring
+
+if INSTALL_MACOSX
+ADD_FRAMEWORKS = -framework QtCore -framework AppKit -framework ApplicationServices
+endif
+
+check_convert_LDADD = liblyxsupport.a $(LIBICONV) $(BOOST_LIBS) $(QT_CORE_LIBS) $(LIBSHLWAPI) @LIBS@
+check_convert_LDFLAGS = $(QT_CORE_LDFLAGS) $(ADD_FRAMEWORKS)
+check_convert_SOURCES = \
+ tests/check_convert.cpp \
+ tests/dummy_functions.cpp \
+ tests/boost.cpp
+
+check_filetools_LDADD = liblyxsupport.a $(LIBICONV) $(BOOST_LIBS) $(QT_CORE_LIBS) $(LIBSHLWAPI) @LIBS@
+check_filetools_LDFLAGS = $(QT_CORE_LDFLAGS) $(ADD_FRAMEWORKS)
+check_filetools_SOURCES = \
+ tests/check_filetools.cpp \
+ tests/dummy_functions.cpp \
+ tests/boost.cpp
+
+check_lstrings_LDADD = liblyxsupport.a $(LIBICONV) $(BOOST_LIBS) $(QT_CORE_LIBS) $(LIBSHLWAPI) @LIBS@
+check_lstrings_LDFLAGS = $(QT_CORE_LDFLAGS) $(ADD_FRAMEWORKS)
+check_lstrings_SOURCES = \
+ tests/check_lstrings.cpp \
+ tests/dummy_functions.cpp \
+ tests/boost.cpp
+
+check_trivstring_LDADD = liblyxsupport.a $(LIBICONV) $(BOOST_LIBS) $(QT_CORE_LIBS) $(LIBSHLWAPI) @LIBS@
+check_trivstring_LDFLAGS = $(QT_CORE_LDFLAGS) $(ADD_FRAMEWORKS)
+check_trivstring_SOURCES = \
+ tests/check_trivstring.cpp \
+ tests/dummy_functions.cpp \
+ tests/boost.cpp
+
+makeregfiles: ${check_PROGRAMS}
+ for all in ${check_PROGRAMS} ; do \
+ ./$$all > ${srcdir}/tests/regfiles/$$all ; \
+ done