include $(top_srcdir)/config/common.am
-SUBDIRS = . tests
-
CLEANFILES += $(BUILT_SOURCES)
-EXTRA_DIST = package.C.in pch.h \
- os_cygwin.C os_os2.C os_unix.C os_win32.C os_win32.h
+EXTRA_DIST = pch.h \
+ os_cygwin.cpp os_unix.cpp os_win32.cpp os_win32.h
-noinst_LTLIBRARIES = libsupport.la
+noinst_LTLIBRARIES = liblyxsupport.la
-if USE_COMPRESSION
-COMPRESSION = gzstream.C gzstream.h
-endif
+liblyxsupport_la_LIBADD = $(LIBSHLWAPI) $(QT4_CORE_LIB) $(BOOST_SIGNALS)
+liblyxsupport_la_LDFLAGS = $(QT4_CORE_LDFLAGS)
+
+BUILT_SOURCES = $(PCH_FILE)
+
+######################### Qt stuff #############################
+#
+
+MOCHEADER = SignalSlotPrivate.h
+
+MOCEDFILES = $(MOCHEADER:%.h=%_moc.cpp)
-BUILT_SOURCES = $(PCH_FILE) package.C
+CLEANFILES += $(MOCEDFILES)
+BUILT_SOURCES += $(MOCEDFILES)
+
+%_moc.cpp: %.h
+ $(MOC4) -o $@ $<
+
+liblyxsupport_la_DEPENDENCIES = $(MOCEDFILES)
+
+#
+##################################################################
AM_CPPFLAGS += $(PCH_FLAGS) -I$(srcdir)/.. $(BOOST_INCLUDES)
+AM_CPPFLAGS += $(QT4_CPPFLAGS) $(QT4_CORE_INCLUDES) -I$(srcdir)/minizip
-libsupport_la_SOURCES = \
+# force the use of C++ compiler for minizip/*.c files, because
+# gcc can not go through the included boost files.
+liblyxsupport_la_CFLAGS = -x c++
+
+liblyxsupport_la_SOURCES = \
FileMonitor.h \
- FileMonitor.C \
+ FileMonitor.cpp \
RandomAccessList.h \
- abort.C \
- chdir.C \
- convert.C \
+ assert.h \
+ assert.cpp \
+ convert.cpp \
convert.h \
- copy.C \
copied_ptr.h \
- cow_ptr.h \
- debugstream.h \
+ debug.cpp \
+ debug.h \
+ docstream.cpp \
+ docstream.h \
+ docstring.cpp \
+ docstring.h \
environment.h \
- environment.C \
- filefilterlist.C \
- filefilterlist.h \
- filename.C \
- filename.h \
- filetools.C \
+ environment.cpp \
+ ExceptionMessage.h \
+ FileFilterList.cpp \
+ FileFilterList.h \
+ FileName.cpp \
+ FileName.h \
+ FileNameList.h \
+ filetools.cpp \
filetools.h \
- forkedcall.C \
- forkedcall.h \
- forkedcallqueue.C \
- forkedcallqueue.h \
- forkedcontr.C \
- forkedcontr.h \
- fs_extras.C \
- fs_extras.h \
- getcwd.C \
- $(COMPRESSION) kill.C \
+ FileZipListDir.h \
+ foreach.h \
+ ForkedCalls.cpp \
+ ForkedCalls.h \
+ gettext.cpp \
+ gettext.h \
+ gzstream.cpp \
+ gzstream.h \
+ kill.cpp \
limited_stack.h \
- lstrings.C \
+ lstrings.cpp \
lstrings.h \
lyxalgo.h \
lyxlib.h \
- lyxmanip.h \
- lyxtime.C \
+ lyxtime.cpp \
lyxtime.h \
- lyxsum.C \
- mkdir.C \
- os.C \
+ lyxsum.cpp \
+ Messages.cpp \
+ Messages.h \
+ os.cpp \
os.h \
- os2_defines.h \
- os2_errortable.h \
- path.C \
- path.h \
- package.C \
- package.h \
- rename.C \
- socktools.C \
+ Path.cpp \
+ Path.h \
+ Package.cpp \
+ Package.h \
+ qstring_helpers.h \
+ socktools.cpp \
socktools.h \
- std_istream.h \
- std_ostream.h \
- systemcall.C \
- systemcall.h \
- tempname.C \
+ strfwd.h \
+ Systemcall.cpp \
+ Systemcall.h \
+ SignalSlot.cpp \
+ SignalSlot.h \
+ SignalSlotPrivate.cpp \
+ SignalSlotPrivate.h \
textutils.h \
- translator.h \
+ Translator.h \
+ Timeout.cpp \
+ Timeout.h \
types.h \
- userinfo.C \
+ userinfo.cpp \
userinfo.h \
- unlink.C
-
-
-package.C: build_package
-
-# Solaris sed does not like spaces bewteen the ;-delimited commands
-build_package: package.C.in
- @rm -f tmp_package ;\
- sed "s,%LYX_DIR%,$(LYX_ABS_INSTALLED_DATADIR),;\
-s,%LOCALEDIR%,$(LYX_ABS_INSTALLED_LOCALEDIR),;\
-s,%TOP_SRCDIR%,$(LYX_ABS_TOP_SRCDIR)," \
- $(srcdir)/package.C.in > tmp_package ;\
- if cmp -s tmp_package package.C ; then \
- rm -f tmp_package ;\
- else \
- rm -f package.C ;\
- mv tmp_package package.C ;\
- fi
+ unicode.cpp \
+ unicode.h \
+ weighted_btree.h \
+ minizip/crypt.h \
+ minizip/ioapi.c \
+ minizip/ioapi.h \
+ minizip/iowin32.c \
+ minizip/iowin32.h \
+ minizip/unzip.c \
+ minizip/unzip.h \
+ minizip/zip.c \
+ minizip/zip.h \
+ minizip/zipunzip.cpp
+
+if INSTALL_MACOSX
+liblyxsupport_la_SOURCES += \
+ linkback/LinkBack.h \
+ linkback/LinkBack.m \
+ linkback/LinkBackProxy.h \
+ linkback/LinkBackProxy.m \
+ linkback/LinkBackServer.h \
+ linkback/LinkBackServer.m
+endif
+
+############################## Tests ##################################
+
+EXTRA_DIST += \
+ tests/test_convert \
+ tests/test_filetools \
+ tests/test_lstrings \
+ tests/regfiles/convert \
+ tests/regfiles/filetools \
+ tests/regfiles/lstrings
+
+
+TESTS = \
+ tests/test_convert \
+ tests/test_filetools \
+ tests/test_lstrings
+
+check_PROGRAMS = \
+ check_convert \
+ check_filetools \
+ check_lstrings
+
+check_convert_LDADD = liblyxsupport.la \
+ $(BOOST_LIBS) $(QT4_CORE_LIB)
+check_convert_LDFLAGS = $(QT4_CORE_LDFLAGS)
+check_convert_SOURCES = \
+ tests/check_convert.cpp \
+ tests/boost.cpp
+
+check_filetools_LDADD = liblyxsupport.la $(BOOST_LIBS)
+check_filetools_SOURCES = \
+ tests/check_filetools.cpp \
+ tests/boost.cpp
+
+check_lstrings_LDADD = liblyxsupport.la $(BOOST_LIBS) $(QT4_CORE_LIB)
+check_lstrings_LDFLAGS = $(QT4_CORE_LDFLAGS)
+check_lstrings_SOURCES = \
+ tests/check_lstrings.cpp \
+ tests/boost.cpp
+
+makeregfiles: ${check_PROGRAMS}
+ for all in ${check_PROGRAMS} ; do \
+ ./$$all > ${srcdir}/tests/regfiles/$$all ; \
+ done