aboutsummaryrefslogtreecommitdiffhomepage
path: root/m4
AgeCommit message (Collapse)AuthorFilesLines
2025-09-21moved most resources to fmsbw.deRobin Haberkorn1-1/+1
* The new official homepage is https://sciteco.fmsbw.de/ * My new contact address is rhaberkorn AT fmsbw.de. * The scintilla-mirror is now also on https://git.fmsbw.de/scintilla-mirror/ * Added CI script for my server on fmsbw.de that builds the website. It's run in a FreeBSD container, but does not currently distribute FreeBSD binaries.
2025-08-19AX_WITH_NCURSES: also check for NCURSEN_VERSIONRobin Haberkorn1-2/+6
If we find libncursesw or libncurses, but without pkg-config and if ncurses does not install its curses.h into the standard search path, we might theoretically pick up another compatible Curses' curses.h. Better guard against this.
2025-08-19curses: fixed configuration for native netbsd-curses and ncurses (several ↵Robin Haberkorn2-582/+287
corner cases) * pkg-config check for `ncurses` fails if it failed previously for `ncursesw`. This is the case e.g. for ncurses from NetBSD's pkgsrc. * No longer assume that any libncurses is not enhanced (X/Open compatible). * SciTECO and Scinterm require to find a curses.h in the include paths. The ncurses check must therefore not be limited to the first best ncurses/ncurses.h and the like. * We now always check for X/Open compatibility and always require a curses.h in the standard directories or as given by pkg-config. * AX_WITH_CURSES was radically rewritten and is now called AX_WITH_NCURSES. * --with-interface=netbsd-curses gets its own detection code. It always requires a curses.h in the standard paths and a libcurses. It should now be fixed for real NetBSD installations if the ncurses port is installed as well. * Unified all of the curses-arguments to CURSES_CFLAGS and CURSES_LIBS. There is no reason we need PDCURSES_CFLAGS, XCURSES_CFLAGS etc.
2024-12-24added AX_REQUIRE_DEFINED() macro: should fix builds on systems without the ↵Robin Haberkorn1-0/+37
autoconf archive (including CI)
2024-12-24added AX_WITH_CURSES for more robust ncurses checksRobin Haberkorn1-0/+582
* Turns out that on SunOS/OmniOS the ncurses port does not ship with a ncursesw pkg-config file, but the ncurses file is for a version, that does contain widechar support as well. * Instead of adding yet another recursive PKG_CHECK_MODULES() call, we now use the AX_WITH_CURSES() macro, which is probably more robust. This should at least fix ./configure on OmniOS. * It also adds a number of feature C macros, that could be useful to check in the future. * At the moment, we strive to support all X/Open-compatible Curses libraries, but both enhanced and color functions are required. Therefore plain SVr4 Curses is not supported. * source: https://www.gnu.org/software/autoconf-archive/ax_with_curses.html
2023-04-16updated Scintilla to v5.3.4, Scinterm to v4.1 and Lexilla to v5.2.4Robin Haberkorn1-0/+522
* actually everything is updated to their current HEADs but the aforementioned versions are close. * Scintilla uses threads now, so we added checks for pthread. To be on the safe side, we imported AX_PTHREAD from the Autoconf archives. The flags are kept out of the ordinary build system, though and used only for compiling Scintilla and for linking. SciTECO may also use threads, but via Glib. * Scinterm removed SCI_COLOR_PAIR(), so we re-added it to src/interface-curses/interface.c. * There is an Asciidoc lexer now. * The <Ix$> interruption bug (see TODO) is not fixed by this upgrade. Perhaps the Mac OS version runs better now. Feedback is needed (refs #12).
2021-10-24added ./configure --enable-debug and make sure that NDEBUG is defined properlyRobin Haberkorn1-0/+0
* This simplifies writing CFLAGS="-g -O0" CXXFLAGS="-g -O0". * We build "release" binaries by default. NDEBUG will now be defined unless you specify --enable-debug. This enables some optimizations that have long been implemented but were never actually active: * SciTECO shuts down faster since it will not explicitly free memory. On the downside, this would complicate memory debugging with Valgrind/memcheck. * dlmalloc is built with -DINSECURE=1 which is supposedly a bit faster. Some compilers also complained about an unportable preprocessor usage which should now be gone. * All CI builds are now with --enable-debug. This will slow them down but ensure that more code is executed and thus tested.
2021-10-24upgraded ax_cxx_compile_stdcxx.m4Robin Haberkorn1-39/+19
* Fixes warnings when checking for C++ 17 during ./configure * Upstream source and documentation: https://www.gnu.org/software/autoconf-archive/ax_cxx_compile_stdcxx.html
2021-06-08get rid of the GObject Builder (GOB2): converted teco-gtk-info-popup.gob and ↵Robin Haberkorn1-58/+0
teco-gtk-label.gob to plain C * Using modern GObject idioms and macros greatly reduces the necessary boilerplate code. * The plain C versions of our GObject classes are now "final" (cannot be derived) This means we can hide the instance structures from the headers and avoid using explicit private fields. * Avoids some deprecation warnings when building the Gtk UI. * GOB2 is apparently no longer maintained, so this seems like a good idea in the long run. * The most important reason however is that there is no precompiled GOB2 for Windows which prevents compilation on native Windows hosts, eg. during nightly builds. This is even more important as Gtk+3 is distributed on Windows practically exclusively via MSYS. (ArchLinux contains MinGW gtk3 packages as well, so cross-compiling from ArchLinux would have been an alternative.)
2021-05-30THE GREAT CEEIFICATION EVENTRobin Haberkorn1-0/+124
This is a total conversion of SciTECO to plain C (GNU C11). The chance was taken to improve a lot of internal datastructures, fix fundamental bugs and lay the foundations of future features. The GTK user interface is now in an useable state! All changes have been squashed together. The language itself has almost not changed at all, except for: * Detection of string terminators (usually Escape) now takes the string building characters into account. A string is only terminated outside of string building characters. In other words, you can now for instance write I^EQ[Hello$world]$ This removes one of the last bits of shellisms which is out of place in SciTECO where no tokenization/lexing is performed. Consequently, the current termination character can also be escaped using ^Q/^R. This is used by auto completions to make sure that strings are inserted verbatim and without unwanted sideeffects. * All strings can now safely contain null-characters (see also: 8-bit cleanliness). The null-character itself (^@) is not (yet) a valid SciTECO command, though. An incomplete list of changes: * We got rid of the BSD headers for RB trees and lists/queues. The problem with them was that they used a form of metaprogramming only to gain a bit of type safety. It also resulted in less readble code. This was a C++ desease. The new code avoids metaprogramming only to gain type safety. The BSD tree.h has been replaced by rb3ptr by Jens Stimpfle (https://github.com/jstimpfle/rb3ptr). This implementation is also more memory efficient than BSD's. The BSD list.h and queue.h has been replaced with a custom src/list.h. * Fixed crashes, performance issues and compatibility issues with the Gtk 3 User Interface. It is now more or less ready for general use. The GDK lock is no longer used to avoid using deprecated functions. On the downside, the new implementation (driving the Gtk event loop stepwise) is even slower than the old one. A few glitches remain (see TODO), but it is hoped that they will be resolved by the Scintilla update which will be performed soon. * A lot of program units have been split up, so they are shorter and easier to maintain: core-commands.c, qreg-commands.c, goto-commands.c, file-utils.h. * Parser states are simply structs of callbacks now. They still use a kind of polymorphy using a preprocessor trick. TECO_DEFINE_STATE() takes an initializer list that will be merged with the default list of field initializers. To "subclass" states, you can simply define new macros that add initializers to existing macros. * Parsers no longer have a "transitions" table but the input_cb() may use switch-case statements. There are also teco_machine_main_transition_t now which can be used to implement simple transitions. Additionally, you can specify functions to execute during transitions. This largely avoids long switch-case-statements. * Parsers are embeddable/reusable now, at least in parse-only mode. This does not currently bring any advantages but may later be used to write a Scintilla lexer for TECO syntax highlighting. Once parsers are fully embeddable, it will also be possible to run TECO macros in a kind of coroutine which would allow them to process string arguments in real time. * undo.[ch] still uses metaprogramming extensively but via the C preprocessor of course. On the downside, most undo token generators must be initiated explicitly (theoretically we could have used embedded functions / trampolines to instantiate automatically but this has turned out to be dangereous). There is a TECO_DEFINE_UNDO_CALL() to generate closures for arbitrary functions now (ie. to call an arbitrary function at undo-time). This simplified a lot of code and is much shorter than manually pushing undo tokens in many cases. * Instead of the ridiculous C++ Curiously Recurring Template Pattern to achieve static polymorphy for user interface implementations, we now simply declare all functions to implement in interface.h and link in the implementations. This is possible since we no longer hace to define interface subclasses (all state is static variables in the interface's *.c files). * Headers are now significantly shorter than in C++ since we can often hide more of our "class" implementations. * Memory counting is based on dlmalloc for most platforms now. Unfortunately, there is no malloc implementation that provides an efficient constant-time memory counter that is guaranteed to decrease when freeing memory. But since we use a defined malloc implementation now, malloc_usable_size() can be used safely for tracking memory use. malloc() replacement is very tricky on Windows, so we use a poll thread on Windows. This can also be enabled on other supported platforms using --disable-malloc-replacement. All in all, I'm still not pleased with the state of memory limiting. It is a mess. * Error handling uses GError now. This has the advantage that the GError codes can be reused once we support error catching in the SciTECO language. * Added a few more test suite cases. * Haiku is no longer supported as builds are instable and I did not manage to debug them - quite possibly Haiku bugs were responsible. * Glib v2.44 or later are now required. The GTK UI requires Gtk+ v3.12 or later now. The GtkFlowBox fallback and sciteco-wrapper workaround are no longer required. * We now extensively use the GCC/Clang-specific g_auto feature (automatic deallocations when leaving the current code block). * Updated copyright to 2021. SciTECO has been in continuous development, even though there have been no commits since 2018. * Since these changes are so significant, the target release has been set to v2.0. It is planned that beginning with v3.0, the language will be kept stable.
2017-03-03build system portability fixesRobin Haberkorn2-0/+1066
* especially to improve building on FreeBSD 11 * We need GNU Make, yet alone because Scintilla/Scinterm needs it. We now document that dependency and added an Autoconf check from the autoconf-archive. We make sure that the build process is invoked with GNU make by generating only GNUmakefiles. The Makefile.am files have not been renamed, so this change can be rolled back easily. * Some GNU-Make-specific autoreconf warnings have still been resolved. But not all of them, as this would have been unelegant and we need GNU Make anyway. * Declare ACLOCAL_AMFLAGS to appease autoreconf * Added an explicit check for C++11 from the autoconf-archives. In general we should support building with every C++11 compiler that is sufficiently GNU-like. * Do not use `sed` for inplace editing, as different sed-implementations have mutually incompatible syntax for this. Instead of declaring and checking a dependency on GNU sed, we simply use SciTECO for the editing task. This improves code portability on BSDs. * Similarily, BSD/POSIX `cmp` is supported now. This fixes the test suite on BSD without declaring a dependency on the GNU coreutils. * Simplified sciteco-wrapper generation.
2016-02-18replace custom Gob2 check with GOB2_CHECK() from gob2.m4Robin Haberkorn1-0/+58
* Allows us to check for the Gob2 version at ./configure time * this file ships with Gob2 installations, so in most cases it could be found without shipping it with SciTECO. * Autoconf is built such that source distributions will contain all additional external macros compiled in aclocal.m4. * However if somebody builds from Git, he/she would still expect the ./configure checks to produce meaningful results even if not all dependencies are installed properly. It therefore seems to be good practice to include all external M4 macros (gob2.m4) as a fallback with the source tree. * /usr/share/aclocal contains many more useful m4 macros. However since we can depend on pkg-config e.g. for finding Gtk+ and Glib, I won't use those macros as else I would have to bundle them to achieve the same kind of ./configure robustness.