-----------------------------
If you have checked this out from Git, you need to have:
-* automake (supported versions are 1.8--1.15)
-* autoconf (supported versions are 2.60--2.69)
+* automake (supported versions are 1.14--1.15)
+* autoconf (supported versions are 2.65--2.69)
Then type "./autogen.sh" to build the needed configuration
files and proceed as stated above/below.
test "$automake_version" != "" && {
echo "Using $automake_version"
} || {
- echo "LyX requires automake >= 1.8"
+ echo "LyX requires automake >= 1.14"
exit 1
}
case $automake_version in
- *' '1.[8-9]*|*' '1.1[012345]*)
+ *' '1.1[45]*)
;;
*)
echo "This automake version is not supported by LyX."
- echo "LyX only supports automake 1.8 to 1.15."
+ echo "LyX only supports automake 1.14 to 1.15."
exit 1
;;
esac
test "$autoversion" != "" && {
echo "Using $autoversion"
} || {
- echo "LyX requires autoconf >= 2.60"
+ echo "LyX requires autoconf >= 2.65"
exit 1
}
case $autoversion in
- *' '2.60[ab]|*' '2.6[0-9])
+ *' '2.6[5-9])
;;
*)
echo "This autoconf version is not supported by LyX."
- echo "LyX only supports autoconf 2.60-2.69."
+ echo "LyX only supports autoconf 2.65-2.69."
exit 1
;;
esac
AC_PRESERVE_HELP_ORDER
# Use ISO format only. The frontend needs to parse this
AC_SUBST(LYX_DATE, ["2016-04-16"])
-AC_PREREQ(2.60)
+AC_PREREQ(2.65)
AC_CONFIG_SRCDIR(src/main.cpp)
AC_CONFIG_HEADERS([config.h])
enable_maintainer_mode=$lyx_devel_version
fi
AM_MAINTAINER_MODE
-
-save_PACKAGE=$PACKAGE
-dnl The test for _AM_PROG_CC_C_O intends to test for automake 1.14 or newer,
-dnl which are the versions where subdir-objects can beused.
-dnl see: https://www.mail-archive.com/lyx-devel@lists.lyx.org/msg181023.html
-m4_define([LYX_OBJECTS_LAYOUT], m4_ifdef([_AM_PROG_CC_C_O],[subdir-objects],))
+AM_SILENT_RULES([yes])
# Automake is pulling the historical V7 format. This tar format supports
# file names only up to 99 characters. tar-ustar selects the ustar format defined
# by POSIX 1003.1-1988. This format is believed to be old enough to be portable.
-AM_INIT_AUTOMAKE([foreign dist-bzip2 no-define 1.8 tar-ustar] LYX_OBJECTS_LAYOUT)
-m4_ifdef([AM_SILENT_RULES],[AM_SILENT_RULES([yes])])
+save_PACKAGE=$PACKAGE
+AM_INIT_AUTOMAKE([foreign dist-bzip2 no-define 1.8 tar-ustar subdir-objects])
PACKAGE=$save_PACKAGE
# Allow to build some parts of the code as one big chunk
AM_PATH_PYTHON
# Tools for creating libraries (note that we do not use libtool)
-m4_ifdef([AM_PROG_AR], [AM_PROG_AR]) dnl AM_PROG_AR requires automake 1.12
+AM_PROG_AR
AC_PROG_RANLIB
dnl Recent debian/ubuntu (at least) have built 'ar' so that deterministic mode is the default.
dnl This means that it does not make sense to use the 'u' flag (default ARFLAGS is 'cru').
EXTRA_DIST += \
tests/test_ExternalTransforms \
tests/test_ListingsCaption \
+ tests/test_layout \
+ tests/test_Length \
tests/regfiles/ExternalTransforms \
tests/regfiles/Length \
tests/regfiles/ListingsCaption \
- tests/test_layout \
- tests/test_Length
+ tests/dummy_functions.cpp \
+ tests/boost.cpp
-TESTS = tests/test_ExternalTransforms tests/test_Length tests/test_ListingsCaption
+TESTS = tests/test_ExternalTransforms tests/test_ListingsCaption \
+ tests/test_layout tests/test_Length
alltests: check alltests-recursive
ADD_FRAMEWORKS = -framework QtGui -framework QtCore -framework AppKit -framework ApplicationServices
endif
-check_layout_CPPFLAGS = $(AM_CPPFLAGS)
-check_layout_LDADD = support/liblyxsupport.a CiteEnginesList.o $(LIBICONV) $(BOOST_LIBS) @LIBS@ \
+TESTS_LIBS = support/liblyxsupport.a \
+ $(LIBICONV) $(BOOST_LIBS) @LIBS@ \
$(ICONV_LIBS) $(ZLIB_LIBS) $(QT_LIB) $(LIBSHLWAPI)
+
+check_layout_CPPFLAGS = $(AM_CPPFLAGS)
+check_layout_LDADD = $(check_layout_LYX_OBJS) $(TESTS_LIBS)
check_layout_LDFLAGS = $(QT_LDFLAGS) $(ADD_FRAMEWORKS)
check_layout_SOURCES = \
- insets/InsetLayout.cpp \
- Color.cpp \
- Counters.cpp \
- Floating.cpp \
- FloatList.cpp \
- FontInfo.cpp \
- Layout.cpp \
- LayoutFile.cpp \
- Lexer.cpp \
- ModuleList.cpp \
- Spacing.cpp \
- TextClass.cpp \
- support/tests/dummy_functions.cpp \
- tests/check_layout.cpp \
- tests/boost.cpp
+ tests/check_layout.cpp
+check_layout_LYX_OBJS = \
+ insets/InsetLayout.o \
+ CiteEnginesList.o \
+ Color.o \
+ Counters.o \
+ Floating.o \
+ FloatList.o \
+ FontInfo.o \
+ Layout.o \
+ LayoutFile.o \
+ Lexer.o \
+ ModuleList.o \
+ Spacing.o \
+ TextClass.o \
+ tests/dummy_functions.o \
+ tests/boost.o
check_ExternalTransforms_CPPFLAGS = $(AM_CPPFLAGS)
-check_ExternalTransforms_LDADD = support/liblyxsupport.a $(LIBICONV) $(BOOST_LIBS) @LIBS@ \
- $(ICONV_LIBS) $(ZLIB_LIBS) $(QT_LIB) $(LIBSHLWAPI)
+check_ExternalTransforms_LDADD = $(check_ExternalTransforms_LYX_OBJS) $(TESTS_LIBS)
check_ExternalTransforms_LDFLAGS = $(QT_LDFLAGS) $(ADD_FRAMEWORKS)
check_ExternalTransforms_SOURCES = \
- graphics/GraphicsParams.cpp \
- insets/ExternalTransforms.cpp \
- Length.cpp \
- lengthcommon.cpp \
- support/tests/dummy_functions.cpp \
- tests/check_ExternalTransforms.cpp \
- tests/boost.cpp
+ tests/check_ExternalTransforms.cpp
+check_ExternalTransforms_LYX_OBJS = \
+ tests/dummy_functions.o \
+ tests/boost.o \
+ graphics/GraphicsParams.o \
+ insets/ExternalTransforms.o \
+ Length.o \
+ lengthcommon.o
check_Length_CPPFLAGS = $(AM_CPPFLAGS)
-check_Length_LDADD = support/liblyxsupport.a $(LIBICONV) $(BOOST_LIBS) @LIBS@ \
- $(ICONV_LIBS) $(ZLIB_LIBS) $(QT_LIB) $(LIBSHLWAPI)
+check_Length_LDADD = $(check_Length_LYX_OBJS) $(TESTS_LIBS)
check_Length_LDFLAGS = $(QT_LDFLAGS) $(ADD_FRAMEWORKS)
check_Length_SOURCES = \
- Length.cpp \
- lengthcommon.cpp \
- support/tests/dummy_functions.cpp \
- tests/check_Length.cpp \
- tests/boost.cpp
+ tests/check_Length.cpp
+check_Length_LYX_OBJS = \
+ tests/dummy_functions.o \
+ tests/boost.o \
+ Length.o \
+ lengthcommon.o
check_ListingsCaption_CPPFLAGS = $(AM_CPPFLAGS)
-check_ListingsCaption_LDADD = support/liblyxsupport.a $(LIBICONV) $(BOOST_LIBS) @LIBS@ \
- $(ICONV_LIBS) $(ZLIB_LIBS) $(QT_LIB) $(LIBSHLWAPI)
+check_ListingsCaption_LDADD = $(check_ListingsCaption_LYX_OBJS) $(TESTS_LIBS)
check_ListingsCaption_LDFLAGS = $(QT_LDFLAGS) $(ADD_FRAMEWORKS)
check_ListingsCaption_SOURCES = \
- support/tests/dummy_functions.cpp \
- tests/check_ListingsCaption.cpp \
- tests/boost.cpp
+ tests/check_ListingsCaption.cpp
+check_ListingsCaption_LYX_OBJS = \
+ tests/dummy_functions.o \
+ tests/boost.o
.PHONY: alltests alltests-recursive updatetests
--- /dev/null
+#include <config.h>
+
+#include "Format.h"
+#include "LyXRC.h"
+
+#include "support/Messages.h"
+
+using namespace std;
+
+namespace lyx {
+ // Dummy verbose support
+ bool verbose = false;
+
+ // Dummy LyXRC support
+ LyXRC::LyXRC() {}
+ LyXRC lyxrc;
+
+ // Dummy LyXAlignment support
+ enum LyXAlignment {
+ DUMMY
+ };
+
+ // Keep the linker happy on Windows
+ void lyx_exit(int) {}
+
+ // Dummy language support
+ Messages const & getGuiMessages()
+ {
+ static Messages lyx_messages;
+
+ return lyx_messages;
+ }
+ Messages const & getMessages(string const &)
+ {
+ static Messages lyx_messages;
+
+ return lyx_messages;
+ }
+
+ // Dummy formats support (needed by Lexer)
+ Formats & theFormats()
+ {
+ static Formats dummy_formats;
+ return dummy_formats;
+ }
+
+ string alignmentToCSS(LyXAlignment)
+ {
+ return string();
+ }
+
+ //
+ // Dummy FontMetrics (needed by Length)
+ //
+ namespace frontend {
+ class FontMetrics {
+ int em() const { return 0; };
+ };
+ }
+
+ class FontInfo;
+
+ frontend::FontMetrics const & theFontMetrics(FontInfo const &) {
+ static frontend::FontMetrics dummy;
+ return dummy;
+ }
+}
updatetests: tex2lyx
$(PYTHON) "$(srcdir)/test/runtests.py" ./tex2lyx "$(top_srcdir)/lib/scripts" "$(srcdir)/test"
-LINKED_FILES = \
- ../Author.cpp \
- ../CiteEnginesList.cpp \
- ../Color.cpp \
- ../Counters.cpp \
- ../Encoding.cpp \
- ../FloatList.cpp \
- ../Floating.cpp \
- ../FontInfo.cpp \
- ../graphics/GraphicsParams.cpp \
- ../insets/ExternalTemplate.cpp \
- ../insets/ExternalTransforms.cpp \
- ../insets/InsetLayout.cpp \
- ../LaTeXPackages.cpp \
- ../Layout.cpp \
- ../LayoutFile.cpp \
- ../LayoutModuleList.cpp \
- ../Length.cpp \
- ../lengthcommon.cpp \
- ../Lexer.cpp \
- ../ModuleList.cpp \
- ../Spacing.cpp \
- ../TextClass.cpp \
- ../version.cpp
+LYX_OBJS = \
+ ../Author.o \
+ ../CiteEnginesList.o \
+ ../Color.o \
+ ../Counters.o \
+ ../Encoding.o \
+ ../FloatList.o \
+ ../Floating.o \
+ ../FontInfo.o \
+ ../graphics/GraphicsParams.o \
+ ../insets/ExternalTemplate.o \
+ ../insets/ExternalTransforms.o \
+ ../insets/InsetLayout.o \
+ ../LaTeXPackages.o \
+ ../Layout.o \
+ ../LayoutFile.o \
+ ../LayoutModuleList.o \
+ ../Length.o \
+ ../lengthcommon.o \
+ ../Lexer.o \
+ ../ModuleList.o \
+ ../Spacing.o \
+ ../TextClass.o \
+ ../version.o
tex2lyx_SOURCES = \
- $(LINKED_FILES) \
boost.cpp \
Context.cpp \
Context.h \
text.cpp
tex2lyx_LDADD = \
+ $(LYX_OBJS) \
$(top_builddir)/src/support/liblyxsupport.a \
$(LIBICONV) $(BOOST_LIBS) \
$(QT_LIB) $(QT_LDFLAGS) \