From 8159f5930df5cc8bde25c69e064a203dcbfdd6bf Mon Sep 17 00:00:00 2001 From: Robin Haberkorn Date: Wed, 24 Sep 2025 02:13:40 +0200 Subject: ./configure --with-launcher=LAUNCHER can be used to run SciTECO with a launcher command (e.g. wine or wine64) * This can be used for bootstrapping Windows binaries cross-compiled on FreeBSD or Linux without requiring a native build to be installed first. It will also allow running the test suite under Wine. While Linux allows registering Wine as the launcher via binfmt_misc, on FreeBSD we have no choice than to use --with-launcher. * Unfortunately, SciTECO cannot currently be properly built with versions running under Wine and the test suite also fails. --- bootstrap.am | 8 ++++---- configure.ac | 6 ++++++ tests/atlocal.in | 2 +- 3 files changed, 11 insertions(+), 5 deletions(-) diff --git a/bootstrap.am b/bootstrap.am index 61fc0d3..872ed70 100644 --- a/bootstrap.am +++ b/bootstrap.am @@ -11,11 +11,11 @@ export SCITECOPATH=@top_srcdir@/lib # available after the binary has been built in src/ # (ie. in SUBDIRS after src/). if BOOTSTRAP -SCITECO_MINIMAL = @top_builddir@/src/sciteco-minimal$(EXEEXT) -SCITECO_FULL = @top_builddir@/src/sciteco$(EXEEXT) +SCITECO_MINIMAL = @LAUNCHER@ @top_builddir@/src/sciteco-minimal$(EXEEXT) +SCITECO_FULL = @LAUNCHER@ @top_builddir@/src/sciteco$(EXEEXT) else -SCITECO_MINIMAL = @SCITECO@ -SCITECO_FULL = @SCITECO@ +SCITECO_MINIMAL = @LAUNCHER@ @SCITECO@ +SCITECO_FULL = @LAUNCHER@ @SCITECO@ endif # Path of installed `sciteco` binary, diff --git a/configure.ac b/configure.ac index e4b8ce0..caaf057 100644 --- a/configure.ac +++ b/configure.ac @@ -489,6 +489,12 @@ AC_ARG_ENABLE(static-executables, [static_executables=$enableval], [static_executables=no]) AM_CONDITIONAL(STATIC_EXECUTABLES, [test x$static_executables = xyes]) +AC_ARG_WITH(launcher, + AS_HELP_STRING([--with-launcher=LAUNCHER], + [Use the given launcher when executing SciTECO (e.g. wine)]), + [LAUNCHER=$withval], [LAUNCHER=]) +AC_SUBST(LAUNCHER) + AC_CONFIG_FILES([GNUmakefile:Makefile.in src/GNUmakefile:src/Makefile.in] [src/interface-gtk/GNUmakefile:src/interface-gtk/Makefile.in] [src/interface-curses/GNUmakefile:src/interface-curses/Makefile.in] diff --git a/tests/atlocal.in b/tests/atlocal.in index a8a5242..b2ceda1 100644 --- a/tests/atlocal.in +++ b/tests/atlocal.in @@ -4,7 +4,7 @@ host=@host@ # built. # Using the $BOOTSTRAP_SCITECO wouldn't make sense # anyway as we don't want to test some preinstalled SciTECO. -SCITECO="@abs_top_builddir@/src/sciteco" +SCITECO="@LAUNCHER@ @abs_top_builddir@/src/sciteco@EXEEXT@" if [ $at_arg_valgrind != false ]; then SCITECO="valgrind --tool=memcheck --leak-check=full --error-exitcode=66 $SCITECO" -- cgit v1.2.3