+2000-01-10 Jean-Marc Lasgouttes <Jean-Marc.Lasgouttes@inria.fr>
+
+ * src/support/block.h: disable operator T* (), since it causes
+ problems with both compilers I tried. See comments in the file.
+
+ * lib/reLyX/configure.in: do not define LYX_DIR. support flag
+ --with-lyxname.
+
+ * lib/reLyX/reLyX.in: change LYX_DIR to pkgdatadir; change env.
+ variable LYX_DIR_10x to LYX_DIR_11x.
+
+ * src/Makefile.am: replace variable LYX_DIR with pkgdatadir.
+
+ * INSTALL: document --with-lyxname.
+ * NEWS: ditto.
+
+ * configure.in: new configure flag --with-lyxname which allows to
+ choose the name under which lyx is installed. Default is "lyx", of
+ course. It used to be possible to do this with --program-suffix,
+ but the later has in fact a different meaning for autoconf.
+
+ * src/support/lstrings.h (lstrchr): reformat a bit.
+
+ * src/lyxlex.h: include LIstream.h, for Sun CC this time.
+ * src/mathed/math_defs.h: ditto.
+
2000-01-08 Lars Gullik Bjønnes <larsbj@lyx.org>
* src/bufferlist.C (close): don't call insetUnlock if the buffer
o --with-extra-prefix[=DIRECTORY] that is equivalent to
--with-extra-lib=DIRECTORY/lib --with-extra-inc=DIRECTORY/include
- If DIRECTORY is not specified, the current prefix is used.
+ If DIRECTORY is not specified, the current prefix is used.
+
+ o --with-lyxname=STRING sets the name of the installed LyX binary and
+ of the LyX library directory to STRING. This may be used to
+ compile lyx as lyx-1.1 and avoid clashes with earlier/later
+ versions. Default is "lyx".
o --with-two-colors=[yes|no] that forces LyX to use two colors pixmaps
(bitmaps) instead of the full-colored standard ones. Defaults to no.
installation. [defaults to where lyx has already been installed or
/usr/local]
- o --program-suffix=STRING sets the name of the installed LyX binary and
- of the LyX library directory to lyxSTRING. This may be used to
- compile lyx as lyx-1.0.0 and avoid clashes with earlier/later versions.
-
o --datadir=DIRECTORY gives the directory where all extra LyX
files (lyxrc example, documentation, templates and layouts
definitions) will be installed.
- improved translations, in particular in finnish (overhauled UI
translation), dutch (tutorial and examples), german
+- new configure flag --with-lyxname which allows to choose the name
+ under which lyx is installed. Default is "lyx", of course. It used
+ to be possible to do this with --program-suffix, but the later has
+ in fact a different meaning for autoconf.
+
And of course, a lot of old bugs have been replaced by new ones ;)
AC_CANONICAL_SYSTEM
AC_VALIDATE_CACHE_SYSTEM_TYPE
-AM_INIT_AUTOMAKE(lyx, $VERSION)
+AC_ARG_WITH(lyxname,
+ [ --with-lyxname the name under which lyx will be installed],
+ [lyxname=$withval],[lyxname=lyx])
+
+AM_INIT_AUTOMAKE($lyxname, $VERSION)
# The list of languages known to LyX
# This is needed by GNU gettext
AC_PREREQ(2.13) dnl We want to use autoconf 2.13
AC_CONFIG_AUX_DIR(../../config)
+dnl PACKAGE=reLyX
+dnl Do this to install in $datadir/lyx/reLyX instead of $datadir/reLyX/reLyX
+
+AC_ARG_WITH(lyxname,
+ [ --with-lyxname the name under which lyx will be installed],
+ [lyxname=$withval],[lyxname=lyx])
+
+dnl must make a macro that gets the reLyX version
+VERSION=2.0
+AM_INIT_AUTOMAKE($lyxname, $VERSION)
+
AC_PREFIX_PROGRAM(reLyX)
# fix the value of the prefixes.
test "x$prefix" = xNONE && prefix=$ac_default_prefix
test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
-dnl PACKAGE=reLyX
-dnl Do this to install in $datadir/lyx/reLyX instead of $datadir/reLyX/reLyX
-PACKAGE=lyx
-VERSION=2.0
-dnl must make a macro that gets the reLyX version
-AM_INIT_AUTOMAKE($PACKAGE, $VERSION)
-
dnl Checks for programs.
AC_PROG_INSTALL
RELYX_CHECK_PERL
dnl Finish the work
-test $program_suffix = NONE && program_suffix=
-LYX_DIR=`eval "echo \`eval \"echo ${datadir}/lyx${program_suffix}\"\`"`
-AC_SUBST(LYX_DIR)
-
AC_OUTPUT(Makefile reLyX noweb2lyx, chmod 755 reLyX noweb2lyx)
RELYX_CHECK_ERRORS
# Do this in a BEGIN block so it's done before the 'use lib' below
BEGIN{
# This points to LyX library dir, e.g. /usr/local/share/lyx
-$lyxdir = "@LYX_DIR@";
+$lyxdir = "@pkgdatadir@";
# This is just "." if you compiled from the source directory
my $srcdir = "@srcdir@";
# This is the name of the program, usually just "lyx"
my $i = 0;
# case 1: for developers, e.g. - reLyX and $mainscript in same directory
$maybe_dir[$i++] = ".";
-# case 2: environment variable LYX_DIR_12 has been set
-if (exists $ENV{LYX_DIR_10x}) { $maybe_dir[$i++] = "$ENV{LYX_DIR_10x}/reLyX"};
+# case 2: environment variable LYX_DIR_11x has been set
+if (exists $ENV{LYX_DIR_11x}) { $maybe_dir[$i++] = "$ENV{LYX_DIR_11x}/reLyX"};
# case 3: ran make but not make install.
$maybe_dir[$i++] = "$dir/$srcdir";
# case 4: e.g., reLyX in /opt/bin, $mainscript in /opt/share/lyx/reLyX
lyx_LDADD = $(lyx_DEPENDENCIES) @INTLLIBS@ $(LYX_LIBS)
EXTRA_DIST = config.h.in stamp-h.in cheaders
ETAGS_ARGS = --c++
-LYX_DIR = $(datadir)/$(PACKAGE)
INCLUDES = -I${top_srcdir}/images
localedir = $(datadir)/locale
lyx_SOURCES = \
lyx_gui.h lyx_gui_misc.h lyxrc.h support/path.h support/filetools.h \
bufferlist.h support/FileInfo.h lastfiles.h intl.h \
lyxserver.h layout.h gettext.h
- $(CXXCOMPILE) -DLYX_DIR=\"$(LYX_DIR)\" -DTOP_SRCDIR=\"$(top_srcdir)\" \
- -c $(top_srcdir)/src/lyx_main.C
+ $(CXXCOMPILE) -DLYX_DIR=\"$(pkgdatadir)\" \
+ -DTOP_SRCDIR=\"$(top_srcdir)\" -c $(top_srcdir)/src/lyx_main.C
main.o: main.C config.h lyx_main.h gettext.h LString.h support/filetools.h
$(CXXCOMPILE) -DLOCALEDIR=\"$(localedir)\" -c $(top_srcdir)/src/main.C
#include <fstream>
using std::filebuf;
+#include "support/LIstream.h"
+
#include "LString.h"
///
#pragma interface
#endif
+#include "support/LIstream.h"
+
#include "LString.h"
#include "debug.h"
#include "array.h"
+
///
enum math_align {
///
typedef T * iterator;
typedef T const * const_iterator;
size_type size() const { return s; }
- operator T* () { return arr; }
+#warning I disabled this to be able to compile... (JMarc)
+ // I think that, sor the same reason that string->char* is not
+ // automatic, we should have a c_array() method to do that. However,
+ // Lars, it is your choice...
+ // operator T* () { return arr; }
reference at(int i) {
Assert(i >= 0 && i < s);
return arr[i];
{
Assert(t); // we don't want null pointers
T * r = const_cast<T*>(t);
- while(*r != 0)
- if (*r == c) return r; else ++r;
+ while(*r != 0) {
+ if (*r == c)
+ return r;
+ else
+ ++r;
+ }
return 0;
}