1 /* This file is part of
2 * ======================================================
4 * LyX, The Document Processor
6 * Copyright 1995 Matthias Ettrich
7 * Copyright 1995-2000 The LyX Team.
9 * ====================================================== */
14 #include FORMS_H_LOCATION
19 #include "support/filetools.h"
21 // I keep these here so that it will be processed as early in
22 // the compilation process as possible.
23 #if !defined(FL_REVISION) || FL_REVISION < 88 || FL_VERSION != 0
24 #error LyX will not compile with this version of XForms.\
25 Please get version 0.89.\
26 If you want to try to compile anyway, delete this test in src/main.C.
32 static int const xforms_include_version = FL_INCLUDE_VERSION;
34 int main(int argc, char * argv[])
36 // Check the XForms version in the forms.h header against
37 // the one in the libforms. If they don't match quit the
38 // execution of LyX. Better with a clean fast exit than
39 // a strange segfault later.
40 // I realize that this check have to be moved when we
41 // support several toolkits, but IMO all the toolkits
42 // should try to have the same kind of check. This could
43 // be done by having a CheckHeaderAndLib function in
44 // all the toolkit implementations, this function is
45 // responsible for notifing the user.
46 // if (!CheckHeaderAndLib()) {
47 // // header vs. lib version failed
50 int xforms_lib_version = fl_library_version(0, 0);
51 if (xforms_include_version != xforms_lib_version) {
52 cerr << "You are either running LyX with wrong "
53 "version of a dynamic XForms library\n"
54 "or you have build LyX with conflicting header "
55 "and library (different\n"
56 "versions of XForms. Sorry but there is no point "
57 "in continuing executing LyX!" << endl;
61 // lyx_localedir is used by gettext_init() is we have
62 // i18n support built-in
63 string lyx_localedir = GetEnvPath("LYX_LOCALEDIR");
64 if (lyx_localedir.empty())
65 lyx_localedir = LOCALEDIR;
67 // initialize for internationalized version *EK*
72 _wildcard(&argc, &argv);