diff options
author | Robin Haberkorn <robin.haberkorn@googlemail.com> | 2024-09-21 14:29:11 +0200 |
---|---|---|
committer | Robin Haberkorn <robin.haberkorn@googlemail.com> | 2024-09-21 14:29:11 +0200 |
commit | 4ca4ba21ccfb6c415462d5a748e7dee5a82121e0 (patch) | |
tree | 472e4880f8a6de55d43b00a04283b203d7fe36b7 | |
parent | 6f166676c7cbd9fd572ffa2938f3737436a10f42 (diff) | |
download | sciteco-4ca4ba21ccfb6c415462d5a748e7dee5a82121e0.tar.gz |
disable shared libraries by default
* This is necessary to fix the Unicode test suite on Win32,
so I was always passing in --disable-shared manually.
It's easy to forget though when building from scratch.
* We don't currently install any (shared) library, so this is safe
on all platforms.
In fact on all other platforms, libtool detects that and doesn't
generate wrapper binaries in any way.
Only on win32 it's apparently buggy.
-rw-r--r-- | .github/workflows/ci.yml | 7 | ||||
-rw-r--r-- | .github/workflows/nightly.yml | 12 | ||||
-rw-r--r-- | configure.ac | 7 | ||||
-rw-r--r-- | src/main.c | 5 |
4 files changed, 16 insertions, 15 deletions
diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index de9274e..d42585a 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -119,12 +119,9 @@ jobs: - name: Configure Build env: PDCURSES_CFLAGS: -I/mingw32/include/pdcurses/ - # --disable-shared makes sure that libtool won't create wrapper binaries. - # They are not required and cause problems when running the test suite - # as they don't pass down UTF-8 parameters properly. run: | autoreconf -i - ./configure --with-interface=pdcurses-gui --enable-debug --disable-shared --enable-html-manual + ./configure --with-interface=pdcurses-gui --enable-debug --enable-html-manual - run: make - run: make install @@ -136,7 +133,7 @@ jobs: run: cd doc && make devdoc - name: make distcheck env: - DISTCHECK_CONFIGURE_FLAGS: --with-interface=pdcurses-gui --disable-shared + DISTCHECK_CONFIGURE_FLAGS: --with-interface=pdcurses-gui PDCURSES_CFLAGS: -I/mingw32/include/pdcurses/ run: make distcheck - name: Build Source Tarball diff --git a/.github/workflows/nightly.yml b/.github/workflows/nightly.yml index 918e2c4..0af6612 100644 --- a/.github/workflows/nightly.yml +++ b/.github/workflows/nightly.yml @@ -212,17 +212,14 @@ jobs: CFLAGS: -O3 -flto CXXFLAGS: -O3 -flto LDFLAGS: -flto - # --disable-shared makes sure that libtool won't create wrapper binaries. - # They are not required and cause problems when running the test suite - # as they don't pass down UTF-8 parameters properly. run: | autoreconf -i mkdir build-wingui build-wincon (cd build-wingui - ../configure --with-interface=pdcurses-gui --disable-shared --enable-html-manual --program-prefix=g \ + ../configure --with-interface=pdcurses-gui --enable-html-manual --program-prefix=g \ PDCURSES_LIBS="-lpdcurses_wingui -lgdi32 -lcomdlg32 -lwinmm") (cd build-wincon - ../configure --with-interface=pdcurses --disable-shared --enable-html-manual \ + ../configure --with-interface=pdcurses --enable-html-manual \ PDCURSES_LIBS="-lpdcurses_wincon -lgdi32 -lwinmm") - name: make @@ -300,12 +297,9 @@ jobs: CFLAGS: -O3 -flto CXXFLAGS: -O3 -flto LDFLAGS: -flto - # --disable-shared makes sure that libtool won't create wrapper binaries. - # They are not required and cause problems when running the test suite - # as they don't pass down UTF-8 parameters properly. run: | autoreconf -i - ./configure --with-interface=gtk --disable-shared --enable-html-manual + ./configure --with-interface=gtk --enable-html-manual - name: make run: make -j 2 diff --git a/configure.ac b/configure.ac index d94e5bf..d9dd7e0 100644 --- a/configure.ac +++ b/configure.ac @@ -47,7 +47,12 @@ canonicalize() { } # Checks for programs. -LT_INIT +# +# Disable shared libraries by default (--disable-shared). +# We don't install any library, so this __should__ not matter. +# In reality Libtool builds unnecessary wrapper binaries on win32 (MinGW) without this. +# These wrapper binaries do not handle UTF-8 properly and break the test suite. +LT_INIT([disable-shared]) # FIXME: Check for -std=gnu11? AC_PROG_CC AC_PROG_SED @@ -307,6 +307,11 @@ main(int argc, char **argv) * Important for Unicode handling in curses and glib. * In particular, in order to accept Unicode characters * in option strings. + * + * NOTE: Windows 10 accepts ".UTF8" here, so the "ANSI" + * versions of win32 API functions accept UTF-8. + * We want to support older versions, though and + * glib happily converts to Windows' native UTF-16. */ setlocale(LC_ALL, ""); |