From b9a5da652feac38e215e525cc02ed96a7af5520b Mon Sep 17 00:00:00 2001 From: Thomas Adam Date: Sat, 8 Feb 2025 21:45:58 +0000 Subject: [PATCH 01/20] build: set next version --- configure.ac | 4 ++-- meson.build | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/configure.ac b/configure.ac index 8e5811e1d..cef25d3e0 100644 --- a/configure.ac +++ b/configure.ac @@ -3,7 +3,7 @@ dnl AC_PREREQ(2.60) dnl should be "yes" only within the released distribution -ISRELEASED="yes" +ISRELEASED="no" if test $ISRELEASED = "no"; then RELDATELONG="" RELDATESHORT="" @@ -14,7 +14,7 @@ fi # Silence warning: ar: 'u' modifier ignored since 'D' is the default AC_SUBST(AR_FLAGS, [cr]) -AC_INIT([fvwm3], 1.1.2, [fvwm-workers@fvwm.org]) +AC_INIT([fvwm3], 1.1.3, [fvwm-workers@fvwm.org]) AC_CONFIG_AUX_DIR(etc) AC_CONFIG_LIBOBJ_DIR(libs) AM_INIT_AUTOMAKE([foreign subdir-objects]) diff --git a/meson.build b/meson.build index bf0b6e671..3d8928a9d 100644 --- a/meson.build +++ b/meson.build @@ -1,7 +1,7 @@ project( 'fvwm3', 'c', - version: '1.1.2', + version: '1.1.3', license: 'GPL-2.0-or-later', meson_version: '>=1.5.1', # Required to configure perl files without eating \@s default_options: [ From 7b901c04ac4598b62b936c454ab12b3553edf575 Mon Sep 17 00:00:00 2001 From: Gene Carlson Date: Thu, 13 Feb 2025 16:26:13 +0900 Subject: [PATCH 02/20] FvwmRearrange: Use -on_screen to tile/cascade all windows on the monitor. --- doc/FvwmRearrange.adoc | 4 ++++ modules/FvwmRearrange/FvwmRearrange.c | 19 ++++++++++++++++--- 2 files changed, 20 insertions(+), 3 deletions(-) diff --git a/doc/FvwmRearrange.adoc b/doc/FvwmRearrange.adoc index e0cd55b79..2474f3761 100644 --- a/doc/FvwmRearrange.adoc +++ b/doc/FvwmRearrange.adoc @@ -265,6 +265,10 @@ or cascaded. -desk:: Causes all windows on the desk to be cascaded/tiled instead of only windows that intersect the bounding box. +-on_screen:: + Causes all windows on the monitor to be cascaded/tiled instead of only + windows that intersect the bounding box. Has no effect when used together + with _-desk_. === ORDERING OPTIONS diff --git a/modules/FvwmRearrange/FvwmRearrange.c b/modules/FvwmRearrange/FvwmRearrange.c index a8c9bbc13..0eabd5ec8 100644 --- a/modules/FvwmRearrange/FvwmRearrange.c +++ b/modules/FvwmRearrange/FvwmRearrange.c @@ -129,6 +129,7 @@ int transients = 0; int maximized = 1; int titled = 1; int desk = 0; +int on_screen = 0; int reversed = 0; int do_ewmhiwa = 0; int is_init = 1; @@ -343,9 +344,19 @@ is_suitable_window(unsigned long *body) int y = (int)cfgpacket->frame_y; int w = (int)cfgpacket->frame_width; int h = (int)cfgpacket->frame_height; - if (x >= box_x + box_w || x + w <= box_x - || y >= box_y + box_h || y + h <= box_y) - return 0; + if (on_screen) { + int mon_x = mon->si->x; + int mon_y = mon->si->y; + int mon_w = mon->si->w; + int mon_h = mon->si->h; + if (x >= mon_x + mon_w || x + w <= mon_x + || y >= mon_y + mon_h || y + h <= mon_y) + return 0; + } else { + if (x >= box_x + box_w || x + w <= box_x + || y >= box_y + box_h || y + h <= box_y) + return 0; + } } if (!transients && IS_TRANSIENT(cfgpacket)) @@ -761,6 +772,8 @@ parse_args(int argc, char *argv[], int argi) titled = 0; } else if (StrEquals(argv[argi], "-desk")) { desk = 1; + } else if (StrEquals(argv[argi], "-on_screen")) { + on_screen = 1; } else if (StrEquals(argv[argi], "-ewmhiwa")) { do_ewmhiwa = 1; From 49637b0c7ee3a4097223e0fc1c60756dadb0598f Mon Sep 17 00:00:00 2001 From: Thomas Adam Date: Thu, 20 Feb 2025 17:32:34 +0000 Subject: [PATCH 03/20] build: macos: fix path to fribidi On MacOS, it seems that fribidi.h isn't in its own subfolder of fribidi/ -- therefore, elide this if the compiling host is MacOS. --- libs/BidiJoin.h | 4 ++++ libs/FBidi.c | 5 +++++ 2 files changed, 9 insertions(+) diff --git a/libs/BidiJoin.h b/libs/BidiJoin.h index 5b9290d5f..e9c279b67 100644 --- a/libs/BidiJoin.h +++ b/libs/BidiJoin.h @@ -14,7 +14,11 @@ #ifdef HAVE_BIDI +#if !defined(HOST_MACOS) #include +#else +#include +#endif /* * Shape/Join a passed-in visual string diff --git a/libs/FBidi.c b/libs/FBidi.c index 5e437a373..21954dce6 100644 --- a/libs/FBidi.c +++ b/libs/FBidi.c @@ -27,7 +27,12 @@ #include "safemalloc.h" #include "BidiJoin.h" +#if !defined(HOST_MACOS) #include +#else +#include +#endif + #include Bool FBidiIsApplicable(const char *charset) From 44028d3dd05e2017ea3694898df71e7e3f8351ab Mon Sep 17 00:00:00 2001 From: Thomas Adam Date: Fri, 21 Feb 2025 17:03:24 +0000 Subject: [PATCH 04/20] fvwm-convert-2.6: fix syntax error Noticed by AlaricToo on #fvwm IRC. --- bin/fvwm-convert-2.6.in | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/bin/fvwm-convert-2.6.in b/bin/fvwm-convert-2.6.in index d0b1defff..09d27e4c8 100644 --- a/bin/fvwm-convert-2.6.in +++ b/bin/fvwm-convert-2.6.in @@ -196,7 +196,7 @@ sub convert_desk { my( $line ) = @_; - $line =~ s/^\s*desk/GotoDesk/i; + $line =~ s/^\s*desk\s+/GotoDesk/i; push( @converted_lines, $line); } @@ -217,7 +217,7 @@ sub convert_windowfont { my( $line ) = @_; - $line =~ s/windowfont/Style Font \*/i; + $line =~ s/windowfont/Style \* Font/i; push( @converted_lines, $line ); } @@ -227,7 +227,7 @@ sub convert_iconfont { my( $line ) = @_; - $line =~ s/iconfont/Style IconFont \*/i; + $line =~ s/iconfont/Style \* IconFont/i; push( @converted_lines, $line ); } From 4592849dc38e6e96ff8feded3117e8f6f207aa68 Mon Sep 17 00:00:00 2001 From: Jaimos Skriletz Date: Sat, 22 Feb 2025 13:08:20 -0700 Subject: [PATCH 05/20] FvwmRearrange: Add -win_cmd COMMAND option. This adds an option to run an fvwm command in the context of all windows rearranged by FvwmRearrange. This was added to allow setting the state of all windows via `-win_cmd "State n"` to allow matching them with conditionals. A general option was added to allow users to run any fvwm command in all window's context. --- doc/FvwmRearrange.adoc | 7 +++++++ modules/FvwmRearrange/FvwmRearrange.c | 8 ++++++++ 2 files changed, 15 insertions(+) diff --git a/doc/FvwmRearrange.adoc b/doc/FvwmRearrange.adoc index 2474f3761..a0b6500bc 100644 --- a/doc/FvwmRearrange.adoc +++ b/doc/FvwmRearrange.adoc @@ -214,6 +214,13 @@ stretched or resized. When rearranging windows, make the calculation ignore the working area, such as _EwmhBaseStruts_; by default, FvwmRearrange will honour the working area. This option may place windows outside of the current monitor. +-win_cmd _COMMAND_:: + Runs the fvwm _COMMAND_ in the context of every window that is rearranged. + This can be used to set the state of all affected windows with the _COMMAND_ + "State n" so they can be matched using the "State n" conditional. The + _COMMAND_ is sent after the window is moved/resized, so any change in + window's size, adding removing title bars, etc, will not be used in + computing the new position/size of the window. === RESIZING OPTIONS diff --git a/modules/FvwmRearrange/FvwmRearrange.c b/modules/FvwmRearrange/FvwmRearrange.c index 0eabd5ec8..341ac3a56 100644 --- a/modules/FvwmRearrange/FvwmRearrange.c +++ b/modules/FvwmRearrange/FvwmRearrange.c @@ -90,6 +90,7 @@ fd_set_size_t fd_width; window_list wins = NULL, wins_tail = NULL; int wins_count = 0; FILE *console; +char *win_cmd = NULL; static void Loop(int *); static void process_message(unsigned long, unsigned long *); @@ -142,6 +143,7 @@ void free_resources(void) { free_window_list(wins); + free(win_cmd); if (console != stderr) fclose(console); @@ -453,6 +455,8 @@ move_resize_raise_window(window_item *wi, int x, int y, int w, int h) SendText(fd, msg, wi->frame); } + if (win_cmd) + SendText(fd, win_cmd, wi->frame); if (raise_window) SendText(fd, "Raise", wi->frame); } @@ -740,6 +744,10 @@ parse_args(int argc, char *argv[], int argi) do_animate = 1; } else if (StrEquals(argv[argi], "-ewmhiwa")) { do_ewmhiwa = 1; + } else if (StrEquals(argv[argi], "-win_cmd") + && ((argi + 1) < argc)) { + free(win_cmd); + win_cmd = fxstrdup(argv[++argi]); /* Resizing options */ } else if (StrEquals(argv[argi], "-noresize")) { From d49736cb6c814450e967f814dac79c8e1819b8cd Mon Sep 17 00:00:00 2001 From: Thomas Adam Date: Mon, 24 Mar 2025 22:46:44 +0000 Subject: [PATCH 06/20] style: remove superfluous debug --- fvwm/style.c | 3 --- 1 file changed, 3 deletions(-) diff --git a/fvwm/style.c b/fvwm/style.c index 600eab15a..9e1d1de63 100644 --- a/fvwm/style.c +++ b/fvwm/style.c @@ -1128,7 +1128,6 @@ static int remove_all_of_style_from_list(style_id_t style_id) /* Check if it's to be wiped */ if (style_id_equals_id(nptr, &style_id)) { - fvwm_debug(__func__, "Style matched. REMOVING"); remove_style_from_list(list, nptr, True); is_changed = True; } @@ -5583,12 +5582,10 @@ void CMD_DestroyStyle(F_CMD_ARGS) action = parse_style_id(action, &s_id); if (action == NULL) { - fvwm_debug(__func__, "ACTION IS NULL. RETURNING"); return; } /* Do it */ - fvwm_debug(__func__, "NAME: %s, CLASS: %s", s_id.class, s_id.name); style_destroy_style(s_id); } From 4693f2d0276c2b20fad5cf2b601d8c492ef8767b Mon Sep 17 00:00:00 2001 From: Thomas Adam Date: Sat, 10 May 2025 10:49:27 +0100 Subject: [PATCH 07/20] build: move check for ISRELEASED outside of configure The status of the release needs to be kept, but it can no longer be a part of ./configure as that is being removed. --- .release-status | 1 + utils/fvwm-version-str.sh | 6 +++++- 2 files changed, 6 insertions(+), 1 deletion(-) create mode 100644 .release-status diff --git a/.release-status b/.release-status new file mode 100644 index 000000000..f483404c2 --- /dev/null +++ b/.release-status @@ -0,0 +1 @@ +ISRELEASED=no diff --git a/utils/fvwm-version-str.sh b/utils/fvwm-version-str.sh index 59480bdce..b3070700c 100755 --- a/utils/fvwm-version-str.sh +++ b/utils/fvwm-version-str.sh @@ -14,7 +14,11 @@ VERSION="released" [ -d ".git" ] || { echo "$VERSION" && exit 0 ; } -if grep -q -i '^ISRELEASED="yes"' ./configure.ac; then +[ -e "./.release-status" ] && source "./.release-status" + +[ -z "$ISRELEASED" ] && { echo "UNKNOWN" && exit 0 ; } + +if [ "$ISRELEASED" = "yes" ]; then echo "$VERSION" else git describe --always --long --dirty --tags From 8a28822aeaf4651c31eee4cf1d35e93cdf2656ad Mon Sep 17 00:00:00 2001 From: Thomas Adam Date: Sat, 10 May 2025 12:21:53 +0100 Subject: [PATCH 08/20] build: remove autotools autotools has now been replaced with meson. Original rationale is here: https://github.com/fvwmorg/fvwm3/discussions/1068 A massive thanks to Kangie (Matt Jolly) for all his hard work in making this happen! --- .github/workflows/release.yml | 1 - Dockerfile | 2 +- Makefile.am | 58 - acinclude.m4 | 1221 ------------------- autogen.sh | 9 - bin/FvwmPrompt/Makefile.am | 26 - bin/Makefile.am | 38 - configure.ac | 1514 ------------------------ default-config/Makefile.am | 29 - dev-docs/DEVELOPERS.md | 47 +- dev-docs/INSTALL.md | 44 +- doc/Makefile.am | 69 -- fvwm/Makefile.am | 52 - libs/Makefile.am | 45 - meson-scripts/dist-tarball.sh | 1 - mkrelease.sh | 64 - modules/FvwmAnimate/Makefile.am | 21 - modules/FvwmAuto/Makefile.am | 18 - modules/FvwmBacker/Makefile.am | 21 - modules/FvwmButtons/Makefile.am | 30 - modules/FvwmConsole/Makefile.am | 32 - modules/FvwmEvent/Makefile.am | 16 - modules/FvwmForm/Makefile.am | 61 - modules/FvwmIconMan/Makefile.am | 29 - modules/FvwmIdent/Makefile.am | 26 - modules/FvwmMFL/Makefile.am | 32 - modules/FvwmPager/Makefile.am | 28 - modules/FvwmPerl/Makefile.am | 9 - modules/FvwmRearrange/Makefile.am | 18 - modules/FvwmScript/Makefile.am | 58 - modules/FvwmScript/Scripts/Makefile.am | 22 - modules/FvwmScript/Widgets/Makefile.am | 11 - modules/Makefile.am | 10 - perllib/FVWM/Makefile.am | 22 - perllib/FVWM/Module/Makefile.am | 7 - perllib/FVWM/Tracker/Makefile.am | 9 - perllib/General/Makefile.am | 7 - perllib/Makefile.am | 7 - po/Makefile.am | 138 --- po/README.md | 3 +- utils/Makefile.am | 8 - utils/fvwm-version-str.sh | 2 +- 42 files changed, 11 insertions(+), 3854 deletions(-) delete mode 100644 Makefile.am delete mode 100644 acinclude.m4 delete mode 100755 autogen.sh delete mode 100644 bin/FvwmPrompt/Makefile.am delete mode 100644 bin/Makefile.am delete mode 100644 configure.ac delete mode 100644 default-config/Makefile.am delete mode 100644 doc/Makefile.am delete mode 100644 fvwm/Makefile.am delete mode 100644 libs/Makefile.am delete mode 100755 mkrelease.sh delete mode 100644 modules/FvwmAnimate/Makefile.am delete mode 100644 modules/FvwmAuto/Makefile.am delete mode 100644 modules/FvwmBacker/Makefile.am delete mode 100644 modules/FvwmButtons/Makefile.am delete mode 100644 modules/FvwmConsole/Makefile.am delete mode 100644 modules/FvwmEvent/Makefile.am delete mode 100644 modules/FvwmForm/Makefile.am delete mode 100644 modules/FvwmIconMan/Makefile.am delete mode 100644 modules/FvwmIdent/Makefile.am delete mode 100644 modules/FvwmMFL/Makefile.am delete mode 100644 modules/FvwmPager/Makefile.am delete mode 100644 modules/FvwmPerl/Makefile.am delete mode 100644 modules/FvwmRearrange/Makefile.am delete mode 100644 modules/FvwmScript/Makefile.am delete mode 100644 modules/FvwmScript/Scripts/Makefile.am delete mode 100644 modules/FvwmScript/Widgets/Makefile.am delete mode 100644 modules/Makefile.am delete mode 100644 perllib/FVWM/Makefile.am delete mode 100644 perllib/FVWM/Module/Makefile.am delete mode 100644 perllib/FVWM/Tracker/Makefile.am delete mode 100644 perllib/General/Makefile.am delete mode 100644 perllib/Makefile.am delete mode 100644 po/Makefile.am delete mode 100644 utils/Makefile.am diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index cddf65941..61937fad2 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -8,7 +8,6 @@ on: jobs: createrelease: runs-on: blacksmith-4vcpu-ubuntu-2204 - steps: - name: Checkout code uses: actions/checkout@v2 diff --git a/Dockerfile b/Dockerfile index 8a03d5fdb..30ec09c1f 100644 --- a/Dockerfile +++ b/Dockerfile @@ -8,4 +8,4 @@ ENV GO111MODULE="on" COPY . /build WORKDIR /build -RUN ./autogen.sh && ./configure --enable-mandoc --enable-golang && make -j4 +RUN meson setup --reconfigure build -Dmandoc=true && meson compile -C build diff --git a/Makefile.am b/Makefile.am deleted file mode 100644 index 07dd901a3..000000000 --- a/Makefile.am +++ /dev/null @@ -1,58 +0,0 @@ -## -*- Makefile -*- mode -## Process this file with automake to create Makefile.in - -## Make sure we have a current version of automake -AUTOMAKE_OPTIONS = 1.4 - -SUBDIRS = \ - default-config \ - libs \ - fvwm \ - modules \ - bin \ - utils \ - $(FVWM_PERLLIB) \ - doc \ - $(POSUB) - -XSESSIONFILE = contrib/xsession/fvwm3.desktop -xsessionsdir = $(datarootdir)/xsessions -xsessions_DATA = $(XSESSIONFILE) - -CLEANFILES = $(XSESSIONFILE) - -EXTRA_DIST = CHANGELOG.md \ - $(XSESSIONFILE).in \ - meson.build \ - meson.options \ - meson-scripts \ - config_defines.h - -## --------------------------------------------------------------------------- -## Manage bzip2 archive together with gzip archive -# Usage: -# make dist2 # instead of make dist -# make distcheck2 # instead of make distcheck -# make distclean2 # instead of make distclean - -DISTCHECK_CONFIGURE_FLAGS = --enable-mandoc - -distcheck2: distcheck - @banner="$(distdir).tar.gz - ready for distribution"; \ - dashes=`echo "$$banner" | sed s/./=/g`; \ - echo "$$banner"; \ - echo "$$dashes" - @if test "x$(ISRELEASED)" != xyes; then \ - echo 'Warning: ISRELEASED is not set to "yes".'; \ - echo ' So these can not be the official tarballs.'; \ - exit 1; \ - fi - -distclean2: distclean - -uninstall-hook: - -rmdir @FVWM_DATADIR@ - -$(XSESSIONFILE): $(XSESSIONFILE).in - ${SED} -e 's|[@]bindir@|$(bindir)|g' \ - -e 's|[@]datadir@|$(datadir)|g' < "$@.in" > "$@" diff --git a/acinclude.m4 b/acinclude.m4 deleted file mode 100644 index 836ba1343..000000000 --- a/acinclude.m4 +++ /dev/null @@ -1,1221 +0,0 @@ -dnl Convenience macros - - -# =========================================================================== -# https://www.gnu.org/software/autoconf-archive/ax_compare_version.html -# =========================================================================== -# -# SYNOPSIS -# -# AX_COMPARE_VERSION(VERSION_A, OP, VERSION_B, [ACTION-IF-TRUE], [ACTION-IF-FALSE]) -# -# DESCRIPTION -# -# This macro compares two version strings. Due to the various number of -# minor-version numbers that can exist, and the fact that string -# comparisons are not compatible with numeric comparisons, this is not -# necessarily trivial to do in a autoconf script. This macro makes doing -# these comparisons easy. -# -# The six basic comparisons are available, as well as checking equality -# limited to a certain number of minor-version levels. -# -# The operator OP determines what type of comparison to do, and can be one -# of: -# -# eq - equal (test A == B) -# ne - not equal (test A != B) -# le - less than or equal (test A <= B) -# ge - greater than or equal (test A >= B) -# lt - less than (test A < B) -# gt - greater than (test A > B) -# -# Additionally, the eq and ne operator can have a number after it to limit -# the test to that number of minor versions. -# -# eq0 - equal up to the length of the shorter version -# ne0 - not equal up to the length of the shorter version -# eqN - equal up to N sub-version levels -# neN - not equal up to N sub-version levels -# -# When the condition is true, shell commands ACTION-IF-TRUE are run, -# otherwise shell commands ACTION-IF-FALSE are run. The environment -# variable 'ax_compare_version' is always set to either 'true' or 'false' -# as well. -# -# Examples: -# -# AX_COMPARE_VERSION([3.15.7],[lt],[3.15.8]) -# AX_COMPARE_VERSION([3.15],[lt],[3.15.8]) -# -# would both be true. -# -# AX_COMPARE_VERSION([3.15.7],[eq],[3.15.8]) -# AX_COMPARE_VERSION([3.15],[gt],[3.15.8]) -# -# would both be false. -# -# AX_COMPARE_VERSION([3.15.7],[eq2],[3.15.8]) -# -# would be true because it is only comparing two minor versions. -# -# AX_COMPARE_VERSION([3.15.7],[eq0],[3.15]) -# -# would be true because it is only comparing the lesser number of minor -# versions of the two values. -# -# Note: The characters that separate the version numbers do not matter. An -# empty string is the same as version 0. OP is evaluated by autoconf, not -# configure, so must be a string, not a variable. -# -# The author would like to acknowledge Guido Draheim whose advice about -# the m4_case and m4_ifvaln functions make this macro only include the -# portions necessary to perform the specific comparison specified by the -# OP argument in the final configure script. -# -# LICENSE -# -# Copyright (c) 2008 Tim Toolan -# -# Copying and distribution of this file, with or without modification, are -# permitted in any medium without royalty provided the copyright notice -# and this notice are preserved. This file is offered as-is, without any -# warranty. - -#serial 13 - -dnl ######################################################################### -AC_DEFUN([AX_COMPARE_VERSION], [ - AC_REQUIRE([AC_PROG_AWK]) - - # Used to indicate true or false condition - ax_compare_version=false - - # Convert the two version strings to be compared into a format that - # allows a simple string comparison. The end result is that a version - # string of the form 1.12.5-r617 will be converted to the form - # 0001001200050617. In other words, each number is zero padded to four - # digits, and non digits are removed. - AS_VAR_PUSHDEF([A],[ax_compare_version_A]) - A=`echo "$1" | sed -e 's/\([[0-9]]*\)/Z\1Z/g' \ - -e 's/Z\([[0-9]]\)Z/Z0\1Z/g' \ - -e 's/Z\([[0-9]][[0-9]]\)Z/Z0\1Z/g' \ - -e 's/Z\([[0-9]][[0-9]][[0-9]]\)Z/Z0\1Z/g' \ - -e 's/[[^0-9]]//g'` - - AS_VAR_PUSHDEF([B],[ax_compare_version_B]) - B=`echo "$3" | sed -e 's/\([[0-9]]*\)/Z\1Z/g' \ - -e 's/Z\([[0-9]]\)Z/Z0\1Z/g' \ - -e 's/Z\([[0-9]][[0-9]]\)Z/Z0\1Z/g' \ - -e 's/Z\([[0-9]][[0-9]][[0-9]]\)Z/Z0\1Z/g' \ - -e 's/[[^0-9]]//g'` - - dnl # In the case of le, ge, lt, and gt, the strings are sorted as necessary - dnl # then the first line is used to determine if the condition is true. - dnl # The sed right after the echo is to remove any indented white space. - m4_case(m4_tolower($2), - [lt],[ - ax_compare_version=`echo "x$A -x$B" | sed 's/^ *//' | sort -r | sed "s/x${A}/false/;s/x${B}/true/;1q"` - ], - [gt],[ - ax_compare_version=`echo "x$A -x$B" | sed 's/^ *//' | sort | sed "s/x${A}/false/;s/x${B}/true/;1q"` - ], - [le],[ - ax_compare_version=`echo "x$A -x$B" | sed 's/^ *//' | sort | sed "s/x${A}/true/;s/x${B}/false/;1q"` - ], - [ge],[ - ax_compare_version=`echo "x$A -x$B" | sed 's/^ *//' | sort -r | sed "s/x${A}/true/;s/x${B}/false/;1q"` - ],[ - dnl Split the operator from the subversion count if present. - m4_bmatch(m4_substr($2,2), - [0],[ - # A count of zero means use the length of the shorter version. - # Determine the number of characters in A and B. - ax_compare_version_len_A=`echo "$A" | $AWK '{print(length)}'` - ax_compare_version_len_B=`echo "$B" | $AWK '{print(length)}'` - - # Set A to no more than B's length and B to no more than A's length. - A=`echo "$A" | sed "s/\(.\{$ax_compare_version_len_B\}\).*/\1/"` - B=`echo "$B" | sed "s/\(.\{$ax_compare_version_len_A\}\).*/\1/"` - ], - [[0-9]+],[ - # A count greater than zero means use only that many subversions - A=`echo "$A" | sed "s/\(\([[0-9]]\{4\}\)\{m4_substr($2,2)\}\).*/\1/"` - B=`echo "$B" | sed "s/\(\([[0-9]]\{4\}\)\{m4_substr($2,2)\}\).*/\1/"` - ], - [.+],[ - AC_WARNING( - [invalid OP numeric parameter: $2]) - ],[]) - - # Pad zeros at end of numbers to make same length. - ax_compare_version_tmp_A="$A`echo $B | sed 's/./0/g'`" - B="$B`echo $A | sed 's/./0/g'`" - A="$ax_compare_version_tmp_A" - - # Check for equality or inequality as necessary. - m4_case(m4_tolower(m4_substr($2,0,2)), - [eq],[ - test "x$A" = "x$B" && ax_compare_version=true - ], - [ne],[ - test "x$A" != "x$B" && ax_compare_version=true - ],[ - AC_WARNING([invalid OP parameter: $2]) - ]) - ]) - - AS_VAR_POPDEF([A])dnl - AS_VAR_POPDEF([B])dnl - - dnl # Execute ACTION-IF-TRUE / ACTION-IF-FALSE. - if test "$ax_compare_version" = "true" ; then - m4_ifvaln([$4],[$4],[:])dnl - m4_ifvaln([$5],[else $5])dnl - fi -]) dnl AX_COMPARE_VERSION - -dnl new version of FUNC_SELECT -dnl - submitted to autoconf maintainer; expected to appear in next version - -AC_DEFUN([AC_FUNC_SELECT], -[AC_CHECK_FUNCS(select) -if test "$ac_cv_func_select" = yes; then - AC_CHECK_HEADERS(unistd.h sys/types.h sys/time.h sys/select.h sys/socket.h) - AC_MSG_CHECKING([argument types of select()]) - AC_CACHE_VAL(ac_cv_type_fd_set_size_t,dnl - [AC_CACHE_VAL(ac_cv_type_fd_set,dnl - [for ac_cv_type_fd_set in 'fd_set' 'int' 'void'; do - for ac_cv_type_fd_set_size_t in 'int' 'size_t' 'unsigned long' 'unsigned'; do - for ac_type_timeval in 'struct timeval' 'const struct timeval'; do - AC_TRY_COMPILE(dnl -[#ifdef HAVE_SYS_TIME_H -#include -#endif -#ifdef HAVE_SYS_TYPES_H -#include -#endif -#ifdef HAVE_UNISTD_H -#include -#endif -#ifdef HAVE_SYS_SELECT_H -#include -#endif -#ifdef HAVE_SYS_SOCKET_H -#include -#endif], -[extern select ($ac_cv_type_fd_set_size_t, - $ac_cv_type_fd_set *, $ac_cv_type_fd_set *, $ac_cv_type_fd_set *, - $ac_type_timeval *);], -[ac_found=yes ; break 3],ac_found=no) - done - done - done - ])dnl AC_CACHE_VAL - ])dnl AC_CACHE_VAL - if test "$ac_found" = no; then - AC_MSG_ERROR([can not determine argument types]) - fi - - AC_MSG_RESULT([select($ac_cv_type_fd_set_size_t,$ac_cv_type_fd_set *,...)]) - AH_TEMPLATE([fd_set_size_t], - [Define to the type used in argument 1 `select'. Usually this is an `int'.]) - AC_DEFINE_UNQUOTED(fd_set_size_t, $ac_cv_type_fd_set_size_t) - ac_cast= - if test "$ac_cv_type_fd_set" != fd_set; then - # Arguments 2-4 are not fd_set. Some weirdo systems use fd_set type for - # FD_SET macros, but insist that you cast the argument to select. I don't - # understand why that might be, but it means we cannot define fd_set. - AC_EGREP_CPP(dnl -changequote(<<,>>)dnl -<<(^|[^a-zA-Z_0-9])fd_set[^a-zA-Z_0-9]>>dnl -changequote([,]),dnl -[#ifdef HAVE_SYS_TIME_H -#include -#endif -#ifdef HAVE_SYS_TYPES_H -#include -#endif -#ifdef HAVE_UNISTD_H -#include -#endif -#ifdef HAVE_SYS_SELECT_H -#include -#endif -#ifdef HAVE_SYS_SOCKET_H -#include -#endif],dnl - # We found fd_set type in a header, need special cast - ac_cast="($ac_cv_type_fd_set *)",dnl - # No fd_set type; it is safe to define it - AH_TEMPLATE([fd_set], - [Define to the type used in arguments 2-4 of `select', if not set by system - headers.]) - AC_DEFINE_UNQUOTED(fd_set,$ac_cv_type_fd_set)) - fi - AH_TEMPLATE([SELECT_FD_SET_CAST], - [Define a suitable cast for arguments 2-4 of `select'. On most systems, - this will be the empty string, as select usually takes pointers to fd_set.]) - AC_DEFINE_UNQUOTED(SELECT_FD_SET_CAST,$ac_cast) -fi -]) - - - -dnl Checking for typedefs, with extra headers - - -dnl pds_CHECK_TYPE(TYPE, DEFAULT, [HEADERS], [comment]) -AC_DEFUN([pds_CHECK_TYPE], -[AC_REQUIRE([AC_HEADER_STDC])dnl -AC_MSG_CHECKING(for $1) -AC_CACHE_VAL(ac_cv_type_$1, -[AC_EGREP_CPP(dnl -changequote(<<,>>)dnl -<<(^|[^a-zA-Z_0-9])$1[^a-zA-Z_0-9]>>dnl -changequote([,]), [#include -#if STDC_HEADERS -#include -#include -#endif -$3], ac_cv_type_[$1]=yes, ac_cv_type_[$]1=no)])dnl -AC_MSG_RESULT($ac_cv_type_[$1]) -if test $ac_cv_type_[$1] = no; then - AH_TEMPLATE([$1],[$4]) - AC_DEFINE_UNQUOTED($1, $2) -fi -]) - - -dnl Configure-time switch with default -dnl -dnl Each switch defines an --enable-FOO and --disable-FOO option in -dnl the resulting configure script. -dnl -dnl Usage: -dnl smr_SWITCH(name, description, default, pos-def, neg-def, -dnl pos-def-comment, neg-def-comment) -dnl -dnl where: -dnl -dnl name name of switch; generates --enable-name & --disable-name -dnl options -dnl description help string is set to this prefixed by "enable" or -dnl "disable", whichever is the non-default value -dnl default either "on" or "off"; specifies default if neither -dnl --enable-name nor --disable-name is specified -dnl pos-def a symbol to AC_DEFINE if switch is on (optional) -dnl neg-def a symbol to AC_DEFINE if switch is off (optional) -dnl -AC_DEFUN([smr_SWITCH], [ - AC_MSG_CHECKING(whether to enable [$2]) - AC_ARG_ENABLE( - $1, - ifelse($3, on, - [AC_HELP_STRING([--disable-$1], [disable $2])], - [AC_HELP_STRING([--enable-$1], [enable $2])] - ), - ifelse([$4], , , [AH_TEMPLATE([$4],[$6])]) - ifelse([$5], , , [AH_TEMPLATE([$5],[$7])]) - [ if test "$enableval" = yes; then - AC_MSG_RESULT(yes) - ifelse($4, , , [AC_DEFINE($4)]) - else - AC_MSG_RESULT(no) - ifelse($5, , , [AC_DEFINE($5)]) - fi ], - ifelse($3, on, - [ AC_MSG_RESULT(yes) - ifelse($4, , , [AC_DEFINE($4)]) ], - [ AC_MSG_RESULT(no) - ifelse($5, , , [AC_DEFINE($5)])]) - ) -]) - - -dnl Allow argument for optional libraries; wraps AC_ARG_WITH, to -dnl provide a "--with-foo-library" option in the configure script, where foo -dnl is presumed to be a library name. The argument given by the user -dnl (i.e. "bar" in ./configure --with-foo-library=bar) may be one of three -dnl things: -dnl * boolean (no, yes or blank): whether to use library or not -dnl * file: assumed to be the name of the library -dnl * directory: assumed to *contain* the library -dnl -dnl The argument is sanity-checked. If all is well, two variables are -dnl set: "with_foo" (value is yes, no, or maybe), and "foo_LIBS" (value -dnl is either blank, a file, -lfoo, or '-L/some/dir -lfoo'). The idea -dnl is: the first tells you whether the library is to be used or not -dnl (or the user didn't specify one way or the other) and the second -dnl to put on the command line for linking with the library. -dnl -dnl Usage: -dnl smr_ARG_WITHLIB(name, libname, description) -dnl -dnl name name for --with argument ("foo" for libfoo) -dnl libname (optional) actual name of library, -dnl if different from name -dnl description (optional) used to construct help string -dnl -AC_DEFUN([smr_ARG_WITHLIB], [ - -ifelse($2, , smr_lib=[$1], smr_lib=[$2]) - -AC_ARG_WITH([$1]-library, -ifelse($3, , -AS_HELP_STRING([--with-$1-library[=PATH]],[use $1 library]), -AS_HELP_STRING([--with-$1-library[=PATH]],[use $1 library ($3)])), -[ - if test "$withval" = yes; then - with_[$1]=yes - [$1]_LIBS="-l${smr_lib}" - elif test "$withval" = no; then - with_[$1]=no - [$1]_LIBS= - else - with_[$1]=yes - if test -f "$withval"; then - [$1]_LIBS=$withval - elif test -d "$withval"; then - [$1]_LIBS="-L$withval -l${smr_lib}" - else - AC_MSG_ERROR([--with-$1-library argument must be yes/no, file or directory]) - fi - fi -], [ - with_[$1]=maybe - [$1]_LIBS="-l${smr_lib}" -])]) - - -dnl Check if the include files for a library are accessible, and -dnl define the variable "name_CFLAGS" with the proper "-I" flag for -dnl the compiler. The user has a chance to specify the includes -dnl location, using "--with-foo-includes". -dnl -dnl This should be used *after* smr_ARG_WITHLIB *and* AC_CHECK_LIB are -dnl successful. -dnl -dnl Usage: -dnl smr_ARG_WITHINCLUDES(name, header, extra-flags) -dnl -dnl name library name, MUST same as used with smr_ARG_WITHLIB -dnl header a header file required for using the lib -dnl extra-flags (optional) flags required when compiling the -dnl header, typically more includes; for ex. X_CFLAGS -dnl -AC_DEFUN([smr_ARG_WITHINCLUDES], [ - -AC_ARG_WITH([$1]-includes, -AS_HELP_STRING([--with-$1-includes=DIR],[set directory for $1 headers]), -[ - if test -d "$withval"; then - [$1]_CFLAGS="-I${withval}" - else - AC_MSG_ERROR([argument must be a directory]) - fi]) - - dnl We need to put the given include directory into CPPFLAGS temporarily, but - dnl then restore CPPFLAGS to its old value. - dnl - smr_save_CPPFLAGS="$CPPFLAGS" - CPPFLAGS="$CPPFLAGS ${[$1]_CFLAGS}" - ifelse($3, , , CPPFLAGS="$CPPFLAGS [$3]") - - AC_CHECK_HEADERS($2) - - CPPFLAGS=$smr_save_CPPFLAGS -]) - - -dnl Probe for an optional library. This macro creates both -dnl --with-foo-library and --with-foo-includes options for the configure -dnl script. If --with-foo-library is *not* specified, the default is to -dnl probe for the library, and use it if found. -dnl -dnl Usage: -dnl smr_CHECK_LIB(name, libname, desc, func, header, x-libs, x-flags) -dnl -dnl name name for --with options -dnl libname (optional) real name of library, if different from -dnl above -dnl desc (optional) short descr. of library, for help string -dnl func function of library, to probe for -dnl header (optional) header required for using library -dnl x-libs (optional) extra libraries, if needed to link with lib -dnl x-flags (optional) extra flags, if needed to include header files -dnl -AC_DEFUN([smr_CHECK_LIB], -[ -ifelse($2, , smr_lib=[$1], smr_lib=[$2]) -ifelse($5, , , smr_header=[$5]) -smr_ARG_WITHLIB($1,$2,$3) -if test "$with_$1" != no; then - AC_CHECK_LIB(ifelse($2, , $1, $2), $4, - smr_havelib=yes, - smr_havelib=no; problem_$1=": Can't find working lib$smr_lib", - ifelse($6, , ${$1_LIBS}, [${$1_LIBS} $6])) - if test "$smr_havelib" = yes -a "$smr_header" != ""; then - smr_ARG_WITHINCLUDES($1, $smr_header, $7) - smr_safe=`echo "$smr_header" | sed 'y%./+-%__p_%'` - if eval "test \"`echo '$ac_cv_header_'$smr_safe`\" != yes"; then - smr_havelib=no - problem_$1=": Can't find working $smr_header" - fi - fi - if test "$smr_havelib" = yes; then - with_$1=yes - problem_$1= - else - $1_LIBS= - $1_CFLAGS= - with_$1=no - fi -else - problem_$1=": Explicitly disabled" -fi]) - - -dnl Defines a boolean variable for config.h depending on a condition. -dnl -dnl Usage: -dnl mg_DEFINE_IF_NOT(c-code, cpp-if-cond, var-name, extra-flags, var-comment) -dnl -dnl c-code the first code part inside main() -dnl cpp-if-cond boolean preprocessor condition -dnl var-name this variable will be defined if the given condition is false -dnl extra-flags (optional) extra flags for compiling, typically more -I glags -dnl -dnl Example: -dnl mg_DEFINE_IF_NOT([#include ], [defined __USE_BSD], [NON_BSD]) -dnl -AC_DEFUN([mg_DEFINE_IF_NOT], [ -mg_save_CPPFLAGS="$CPPFLAGS" -ifelse($4, , , CPPFLAGS="$CPPFLAGS [$4]") - -AH_TEMPLATE([$3],[$5]) -AC_TRY_RUN([ -#include -int main(int c, char **v) { -$1 -#if $2 - return 0; -#else - return 1; -#endif -} -], [:], [AC_DEFINE($3)]) - -CPPFLAGS="$mg_save_CPPFLAGS" -]) - - -# -# check if iconv second argument use const char. -# -AC_DEFUN([ICONV_SECOND_ARG],[ - AC_MSG_CHECKING(check if second arg of iconv is const) - AC_TRY_COMPILE([ -#include -#include -extern -#if defined(__STDC__) -size_t iconv (iconv_t cd, char * *inbuf, size_t *inbytesleft, char * *outbuf, size_t *outbytesleft); -#else -size_t iconv(); -#endif -], [], use_const=no, use_const=yes) - AC_MSG_RESULT($use_const) - AH_TEMPLATE([ICONV_ARG_CONST], - [define if second arg of iconv use const]) - if test "x$use_const" = "xyes"; then - AC_DEFINE(ICONV_ARG_CONST, const) - else - AC_DEFINE(ICONV_ARG_CONST, ) - fi -]) - -# -# check for locale_charset if libiconv is used -# -AC_DEFUN([CHECK_LIBCHARSET],[ - AC_MSG_CHECKING(check for libcharset) - ac_save_CFLAGS="$CFLAGS" - ac_save_LIBS="$LIBS" - CFLAGS="$CFLAGS $iconv_CFLAGS" - LIBS="$LIBS $iconv_LIBS" - AC_TRY_LINK([ -#include ], -[const char *c; -c = locale_charset (); -], r=yes, r=no) - AC_MSG_RESULT($r) - if test "x$r" = "xyes"; then - AC_DEFINE(HAVE_LIBCHARSET) - fi - CFLAGS="$ac_save_CFLAGS" - LIBS="$ac_save_LIBS" -]) - -#----------------------------------------------------------------------------- -# Configure paths for fontconfig -# Marcelo Magallon 2001-10-26, based on gtk.m4 by Owen Taylor -# modified by olicha for fontconfig - -dnl AM_CHECK_FC([MINIMUM-VERSION, [ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND]]]) -dnl Test for fontconfig, and define FC_CFLAGS and FC_LIBS -dnl -AC_DEFUN([AM_CHECK_FC], -[dnl -dnl Get the cflags and libraries from the fontconfig-config script -dnl -AC_ARG_WITH(fontconfig-prefix, -AS_HELP_STRING([--with-fontconfig-prefix=PFX],[prefix where fontconfig is installed (for Xft2)]), - fc_config_prefix="$withval", fc_config_prefix="") -AC_ARG_WITH(fontconfig-exec-prefix, -AS_HELP_STRING([--with-fontconfig-exec-prefix=PFX],[exec prefix where fontconfig is installed]), - fc_config_exec_prefix="$withval", fc_config_exec_prefix="") -AC_ARG_ENABLE(fontconfigtest, -AS_HELP_STRING([--disable-fontconfigtest],[do not try to compile and run a test fontconfig program]), - [], enable_fctest=yes) - -if test x$fc_config_exec_prefix != x ; then - fc_config_args="$fc_config_args --exec-prefix=$fc_config_exec_prefix" - if test x${FC_CONFIG+set} != xset ; then - FC_CONFIG=$fc_config_exec_prefix/bin/fontconfig-config - fi -fi -if test x$fc_config_prefix != x ; then - fc_config_args="$fc_config_args --prefix=$fc_config_prefix" - if test x${FC_CONFIG+set} != xset ; then - FC_CONFIG=$fc_config_prefix/bin/fontconfig-config - fi -fi -AC_PATH_PROG(FC_CONFIG, fontconfig-config, no) - -min_fc_version=ifelse([$1], ,1.0.1,$1) -AC_MSG_CHECKING(for Fontconfig - version >= $min_fc_version) -no_fc="" -pkg_config_fontconfig_exists="" - -if test "$FC_CONFIG" = "no" ; then - if test "x$PKG_CONFIG" != "xno" ; then - if $PKG_CONFIG --exists 'fontconfig' ; then - if $PKG_CONFIG --exists 'fontconfig >= $1' ; then - FC_CFLAGS=`$PKG_CONFIG --cflags fontconfig` - FC_LIBS=`$PKG_CONFIG --libs fontconfig` - else - no_fc=yes - fc_config_is_lt=yes - fi - else - pkg_config_fontconfig_exists="maybe" - no_fc=yes - fi - else - no_fc=yes - fi -else - FC_CFLAGS=`$FC_CONFIG $fc_config_args --cflags` - FC_LIBS=`$FC_CONFIG $fc_config_args --libs` - fc_config_major_version=`$FC_CONFIG $fc_config_args --version | \ - sed 's/^[[^0-9.]]*\([[0-9]]*\)\.\([[0-9]]*\)\.\([[0-9]]*\).*$/\1/'` - fc_config_minor_version=`$FC_CONFIG $fc_config_args --version | \ - sed 's/^[[^0-9.]]*\([[0-9]]*\)\.\([[0-9]]*\)\.\([[0-9]]*\).*$/\2/'` - fc_config_micro_version=`$FC_CONFIG $fc_config_args --version | \ - sed 's/^[[^0-9.]]*\([[0-9]]*\)\.\([[0-9]]*\)\.\([[0-9]]*\).*$/\3/'` - fc_min_major_version=`echo $min_fc_version | \ - sed 's/^[[^0-9.]]*\([[0-9]]*\)\.\([[0-9]]*\)\.\([[0-9]]*\).*$/\1/'` - fc_min_minor_version=`echo $min_fc_version | \ - sed 's/^[[^0-9.]]*\([[0-9]]*\)\.\([[0-9]]*\)\.\([[0-9]]*\).*$/\2/'` - fc_min_micro_version=`echo $min_fc_version | \ - sed 's/^[[^0-9.]]*\([[0-9]]*\)\.\([[0-9]]*\)\.\([[0-9]]*\).*$/\3/'` - fc_config_is_lt=no - if test $fc_config_major_version -lt $fc_min_major_version ; then - fc_config_is_lt=yes - else - if test $fc_config_major_version -eq $fc_min_major_version ; then - if test $fc_config_minor_version -lt $fc_min_minor_version ; then - fc_config_is_lt=yes - else - if test $fc_config_minor_version -eq $fc_min_minor_version ; then - if test $fc_config_micro_version -lt $fc_min_micro_version ; then - fc_config_is_lt=yes - fi - fi - fi - fi - fi - if test "x$fc_config_is_lt" = "xyes" ; then - no_fc=yes - fi -fi - -if test "x$no_fc" = x ; then - if test "x$enable_fctest" = "xyes" ; then - ac_save_CFLAGS="$CFLAGS" - ac_save_LIBS="$LIBS" - CFLAGS="$CFLAGS $FC_CFLAGS $FT2_CFLAGS" - LIBS="$FC_LIBS $LIBS $FT2_LIBS" -dnl -dnl Sanity checks for the results of fontconfig-config/pkg-config to some extent -dnl - AC_TRY_RUN([ -#include -#include -#include - -int -main() -{ - FcBool result; - - result = FcInit(); - - if (result) - { - return 0; - } - else - { - return 1; - } -} -],, no_fc=yes,[echo $ac_n "cross compiling; assumed OK... $ac_c"]) - CFLAGS="$ac_save_CFLAGS" - LIBS="$ac_save_LIBS" - fi -fi - -if test "x$no_fc" = x; then - AC_MSG_RESULT(yes) - ifelse([$2], , :, [$2]) -else - AC_MSG_RESULT(no) - if test "x$fc_config_is_lt" = "xyes"; then - echo "*** Your Fontconfig package version is < $1" - elif test "x$pkg_config_fontconfig_exists" = "xmaybe"; then - echo "*** fontconfig was not found in the pkg-config search path." - echo "*** either fontconfig is not installed or perhaps you should" - echo "*** add the directory containing fontconfig.pc to the " - echo "*** PKG_CONFIG_PATH environment variable." - elif test "$FC_CONFIG" != "no"; then - echo "*** The Fontconfig test program failed to run. If your system uses" - echo "*** shared libraries and they are installed outside the normal" - echo "*** system library path, make sure the variable LD_LIBRARY_PATH" - echo "*** (or whatever is appropriate for your system) is correctly set." - fi - FC_CFLAGS="" - FC_LIBS="" - ifelse([$3], , :, [$3]) -fi -AC_SUBST(FC_CFLAGS) -AC_SUBST(FC_LIBS) -]) - -#----------------------------------------------------------------------------- -# Configure paths for xft 2 -# Marcelo Magallon 2001-10-26, based on gtk.m4 by Owen Taylor -# modified by olicha for xft - -dnl AM_CHECK_XFT([MINIMUM-VERSION, [ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND]]]) -dnl Test for xft, and define XFT_CFLAGS and XFT_LIBS -dnl -AC_DEFUN([AM_CHECK_XFT], -[dnl -dnl Get the cflags and libraries from the xft-config script -dnl -AC_ARG_WITH(xft-prefix, -AS_HELP_STRING([--with-xft-prefix=PFX],[prefix where Xft2 is installed (optional)]), - xft_config_prefix="$withval", xft_config_prefix="") -AC_ARG_WITH(xft-exec-prefix, -AS_HELP_STRING([--with-xft-exec-prefix=PFX],[exec prefix where Xft2 is installed]), - xft_config_exec_prefix="$withval", xft_config_exec_prefix="") -AC_ARG_ENABLE(xfttest, -AS_HELP_STRING([--disable-xfttest],[do not try to compile and run a test Xft program]), - [], enable_xfttest=yes) - -if test x$xft_config_exec_prefix != x ; then - xft_config_args="$xft_config_args --exec-prefix=$xft_config_exec_prefix" - if test x${XFT_CONFIG+set} != xset ; then - XFT_CONFIG=$xft_config_exec_prefix/bin/xft-config - fi -fi -if test x$xft_config_prefix != x ; then - xft_config_args="$xft_config_args --prefix=$xft_config_prefix" - if test x${XFT_CONFIG+set} != xset ; then - XFT_CONFIG=$xft_config_prefix/bin/xft-config - fi -fi -AC_PATH_PROG(XFT_CONFIG, xft-config, no) - -min_xft_version=ifelse([$1], ,2.0.0,$1) -AC_MSG_CHECKING(for Xft - version >= $min_xft_version) -no_xft="" -pkg_config_xft_exists="" - -if test "$XFT_CONFIG" = "no" ; then - if test "x$PKG_CONFIG" != "xno" ; then - if $PKG_CONFIG --exists 'xft' ; then - if $PKG_CONFIG --exists 'xft >= $1' ; then - XFT_CFLAGS=`$PKG_CONFIG --cflags xft` - XFT_LIBS=`$PKG_CONFIG --libs xft` - else - no_xft=yes - xft_config_is_lt=yes - fi - else - pkg_config_xft_exists="maybe" - no_xft=yes - fi - else - no_xft=yes - fi -else - XFT_CFLAGS=`$XFT_CONFIG $xft_config_args --cflags` - XFT_LIBS=`$XFT_CONFIG $xft_config_args --libs` - xft_config_major_version=`$XFT_CONFIG $xft_config_args --version | \ - sed 's/^[[^0-9.]]*\([[0-9]]*\)\.\([[0-9]]*\)\.\([[0-9]]*\).*$/\1/'` - xft_config_minor_version=`$XFT_CONFIG $xft_config_args --version | \ - sed 's/^[[^0-9.]]*\([[0-9]]*\)\.\([[0-9]]*\)\.\([[0-9]]*\).*$/\2/'` - xft_config_micro_version=`$XFT_CONFIG $xft_config_args --version | \ - sed 's/^[[^0-9.]]*\([[0-9]]*\)\.\([[0-9]]*\)\.\([[0-9]]*\).*$/\3/'` - xft_min_major_version=`echo $min_xft_version | \ - sed 's/^[[^0-9.]]*\([[0-9]]*\)\.\([[0-9]]*\)\.\([[0-9]]*\).*$/\1/'` - xft_min_minor_version=`echo $min_xft_version | \ - sed 's/^[[^0-9.]]*\([[0-9]]*\)\.\([[0-9]]*\)\.\([[0-9]]*\).*$/\2/'` - xft_min_micro_version=`echo $min_xft_version | \ - sed 's/^[[^0-9.]]*\([[0-9]]*\)\.\([[0-9]]*\)\.\([[0-9]]*\).*$/\3/'` - xft_config_is_lt=no - if test $xft_config_major_version -lt $xft_min_major_version ; then - xft_config_is_lt=yes - else - if test $xft_config_major_version -eq $xft_min_major_version ; then - if test $xft_config_minor_version -lt $xft_min_minor_version ; then - xft_config_is_lt=yes - else - if test $xft_config_minor_version -eq $xft_min_minor_version ; then - if test $xft_config_micro_version -lt $xft_min_micro_version ; then - xft_config_is_lt=yes - fi - fi - fi - fi - fi - if test "x$xft_config_is_lt" = "xyes" ; then - ifelse([$3], , :, [$3]) - fi -fi - -if test "x$no_xft" = x ; then - if test "x$enable_xfttest" = "xyes" ; then - ac_save_CFLAGS="$CFLAGS" - ac_save_LIBS="$LIBS" - CFLAGS="$XFT_CFLAGS $CFLAGS" - LIBS="$XFT_LIBS $LIBS" -dnl -dnl Sanity checks for the results of xft-config/pkg-config to some extent -dnl - AC_TRY_RUN([ -#include -#include -#include - -int -main() -{ - FcBool result = 1; - - result = XftInit(NULL); - - if (result) - { - return 0; - } - else - { - return 1; - } -} -],, no_xft=yes,[echo $ac_n "cross compiling; assumed OK... $ac_c"]) - CFLAGS="$ac_save_CFLAGS" - LIBS="$ac_save_LIBS" - fi -fi - -if test "x$no_xft" = x; then - AC_MSG_RESULT(yes) - ifelse([$2], , :, [$2]) -else - AC_MSG_RESULT(no) - if test "x$xft_config_is_lt" = "xyes"; then - echo "*** Your xft2 package version is < $1" - elif test "x$pkg_config_fontconfig_exists" = "xmaybe" ; then - echo "*** xft2 was not found in the pkg-config search path." - echo "*** either xft is not installed or perhaps you should" - echo "*** add the directory containing xft.pc to the " - echo "*** PKG_CONFIG_PATH environment variable." - elif test "$XFT_CONFIG" = "no"; then - echo "*** The xft-config script installed by Xft 2 could not be found." - echo "*** If Xft 2 was installed in PREFIX, make sure PREFIX/bin is in" - echo "*** your path, or set the XFT_CONFIG environment variable to the" - echo "*** full path to xft-config." - else - echo "*** The Xft test program failed to run. If your system uses" - echo "*** shared libraries and they are installed outside the normal" - echo "*** system library path, make sure the variable LD_LIBRARY_PATH" - echo "*** (or whatever is appropriate for your system) is correctly set." - fi - XFT_CFLAGS="" - XFT_LIBS="" - ifelse([$3], , :, [$3]) -fi -AC_SUBST(XFT_CFLAGS) -AC_SUBST(XFT_LIBS) -]) - -#----------------------------------------------------------------------------- -# gettext stuff from the gettext package -# -# Authors: Ulrich Drepper , 1996. -# modified by the fvwm workers -# - -AC_DEFUN([AM_GNU_FGETTEXT], -[ - AC_REQUIRE([AM_PO_SUBDIRS])dnl - - intl_LIBS= - intl_CFLAGS= - POSUB= - - found_gettext=yes - - dnl check for the necessary stuff in the libc - dnl the pbs is that we can detect this stuff but in fact the included - dnl libintl.h is from gettext - dnl Moreover, we do not try to use other implementation, but we may try - dnl one day - $UNSET ac_cv_header_intl_h - $UNSET ac_cv_func_gettext - $UNSET ac_cv_func_bindtextdomain - $UNSET ac_cv_func_textdomain - dnl a "gnu extension" - $UNSET ac_cv_func_dgettext - #bind_textdomain_codeset - AC_CHECK_HEADER(libintl.h, - [AC_CHECK_FUNCS(gettext bindtextdomain textdomain dgettext,, - found_gettext=no)], found_gettext=no) - - AC_MSG_CHECKING([for gnu gettext in libc]) - if test x"$found_gettext" = "xyes"; then - problem_gettext=" (libc)" - AC_MSG_RESULT([yes]) - AC_MSG_CHECKING(if a simple gettext program link) - AC_TRY_LINK([ - #include - ], - [const char *c; c = gettext("foo");], - found_gettext=yes;problem_gettext=" (libc)", found_gettext=no) - AC_MSG_RESULT($found_gettext) - else - AC_MSG_RESULT([no]) - fi - - if test x"$found_gettext" = xno; then - dnl not found, check for libintl - $UNSET ac_cv_header_intl_h - $UNSET ac_cv_lib_intl_bindtextdomain - $UNSET ac_cv_lib_intl_textdomain - $UNSET ac_cv_lib_intl_dgettext - smr_CHECK_LIB(intl, intl, for Native Language Support, - bindtextdomain, libintl.h) - if test x"$intl_LIBS" != x; then - no_textdomain=no - no_dgettext=no - ac_save_CFLAGS="$CFLAGS" - ac_save_LIBS="$LIBS" - AC_CHECK_LIB(intl, textdomain,, no_textdomain=yes, - [$intl_LIBS $iconv_LIBS]) - if test "$no_textdomain" != "yes"; then - AC_CHECK_LIB(intl, dgettext,, no_dgettext=yes, [$intl_LIBS $iconv_LIBS]) - if test "$no_dgettext" != "yes"; then - CFLAGS="$CFLAGS $intl_LIBS $iconv_LIBS" - LIBS="$LIBS $intl_LIBS $iconv_LIBS" - echo "LIBS: $LIBS" - echo "CFLAGS: $CFLAGS" - AC_MSG_CHECKING(if a simple gettext program link) - AC_TRY_LINK([ - #include - ], - [const char *c; c = gettext("foo");], - found_gettext=yes;problem_gettext=" (intl library)", found_gettext=no) - AC_MSG_RESULT($found_gettext) - fi - fi - CFLAGS="$ac_save_CFLAGS" - LIBS="$ac_save_LIBS" - fi - fi - - if test "$found_gettext" = "yes"; then - dnl Mark actions to use GNU gettext tools. - CATOBJEXT=.gmo - USE_NLS=yes - dnl We need to process the po/ directory. - POSUB=po - else - USE_NLS=no - fi - - dnl Make the po/ variables we use known to autoconf -]) - - -dnl Checks for all prerequisites of the po subdirectory, -dnl except for USE_NLS. -AC_DEFUN([AM_PO_SUBDIRS], -[ - AC_REQUIRE([AC_PROG_MAKE_SET])dnl - AC_REQUIRE([AC_PROG_INSTALL])dnl - AC_REQUIRE([AM_MKINSTALLDIRS])dnl - - dnl Perform the following tests also if --disable-nls has been given, - dnl because they are needed for "make dist" to work. - - dnl Search for GNU msgfmt in the PATH. - dnl The first test excludes Solaris msgfmt and early GNU msgfmt versions. - dnl The second test excludes FreeBSD msgfmt. - AM_PATH_PROG_WITH_TEST(MSGFMT, msgfmt, - [$ac_dir/$ac_word --statistics /dev/null >/dev/null 2>&1 && - (if $ac_dir/$ac_word --statistics /dev/null 2>&1 >/dev/null | grep usage >/dev/null; then exit 1; else exit 0; fi)], - :) - AC_PATH_PROG(GMSGFMT, gmsgfmt, $MSGFMT) - - dnl Search for GNU xgettext 0.11 or newer in the PATH. - dnl The first test excludes Solaris xgettext and early GNU xgettext versions. - dnl The second test excludes FreeBSD xgettext. - AM_PATH_PROG_WITH_TEST(XGETTEXT, xgettext, - [$ac_dir/$ac_word --omit-header --copyright-holder= /dev/null >/dev/null 2>&1 && - (if $ac_dir/$ac_word --omit-header --copyright-holder= /dev/null 2>&1 >/dev/null | grep usage >/dev/null; then exit 1; else exit 0; fi)], - :) - dnl Remove leftover from FreeBSD xgettext call. - rm -f messages.po - - dnl Search for GNU msgmerge 0.11 or newer in the PATH. - AM_PATH_PROG_WITH_TEST(MSGMERGE, msgmerge, - [$ac_dir/$ac_word --update -q /dev/null /dev/null >/dev/null 2>&1], :) - - dnl This could go away some day; the PATH_PROG_WITH_TEST already does it. - dnl Test whether we really found GNU msgfmt. - if test "$GMSGFMT" != ":"; then - dnl If it is no GNU msgfmt we define it as : so that the - dnl Makefiles still can work. - if $GMSGFMT --statistics /dev/null >/dev/null 2>&1 && - (if $GMSGFMT --statistics /dev/null 2>&1 >/dev/null | grep usage >/dev/null; then exit 1; else exit 0; fi); then - : ; - else - GMSGFMT=`echo "$GMSGFMT" | sed -e 's,^.*/,,'` - AC_MSG_RESULT( - [found $GMSGFMT program is not GNU msgfmt; ignore it]) - GMSGFMT=":" - fi - fi - - dnl This could go away some day; the PATH_PROG_WITH_TEST already does it. - dnl Test whether we really found GNU xgettext. - if test "$XGETTEXT" != ":"; then - dnl If it is no GNU xgettext we define it as : so that the - dnl Makefiles still can work. - if $XGETTEXT --omit-header --copyright-holder= /dev/null >/dev/null 2>&1 && - (if $XGETTEXT --omit-header --copyright-holder= /dev/null 2>&1 >/dev/null | grep usage >/dev/null; then exit 1; else exit 0; fi); then - : ; - else - AC_MSG_RESULT( - [found xgettext program is not GNU xgettext; ignore it]) - XGETTEXT=":" - fi - dnl Remove leftover from FreeBSD xgettext call. - rm -f messages.po - fi - - AC_PATH_PROG(MSGUNIQ, msguniq, $MSGUNIQ) - - AC_MSG_CHECKING([for NLS fvwm messages catalogs]) - AC_MSG_RESULT([$ALL_LINGUAS]) - POFILES= - GMOFILES= - UPDATEPOFILES= - DUMMYPOFILES= - for lang in $ALL_LINGUAS; do - for dom in $ALL_DOMAINS; do - POFILES="$POFILES $lang.po" - GMOFILES="$GMOFILES $dom.$lang.gmo" - UPDATEPOFILES="$UPDATEPOFILES $dom.$lang.po-update" - DUMMYPOFILES="$DUMMYPOFILES $dom.$lang.nop" - done - done - # CATALOGS depends on both $ac_dir and the user's LINGUAS environment variable. - INST_LINGUAS= - AC_MSG_CHECKING([for NLS desired catalogs to be installed]) - #if test "%UNSET%" != "$LINGUAS"; then - # FIXME: How to check if LINGUAS has been *set* to "" - if test -n "$LINGUAS"; then - AC_MSG_RESULT([$LINGUAS]) - else - AC_MSG_RESULT([all]) - fi - AC_MSG_CHECKING([for NLS messages catalogs to be installed]) - if test -n "$ALL_LINGUAS"; then - for presentlang in $ALL_LINGUAS; do - useit=no - #if test "%UNSET%" != "$LINGUAS"; then - if test -n "$LINGUAS"; then - desiredlanguages="$LINGUAS" - else - desiredlanguages="$ALL_LINGUAS" - fi - for desiredlang in $desiredlanguages; do - # Use the presentlang catalog if desiredlang is - # a. equal to presentlang, or - # b. a variant of presentlang (because in this case, - # presentlang can be used as a fallback for messages - # which are not translated in the desiredlang catalog). - case "$desiredlang" in - "$presentlang"*) useit=yes;; - esac - done - if test $useit = yes; then - INST_LINGUAS="$INST_LINGUAS $presentlang" - fi - done - fi - AC_MSG_RESULT([$INST_LINGUAS]) - CATALOGS= - if test -n "$INST_LINGUAS"; then - for lang in $INST_LINGUAS; do - CATALOGS="$CATALOGS $lang.gmo" - done - fi - -]) - - -AC_DEFUN([AM_MKINSTALLDIRS], -[ - dnl If the AC_CONFIG_AUX_DIR macro for autoconf is used we possibly - dnl find the mkinstalldirs script in another subdir but $(top_srcdir). - dnl Try to locate is. - MKINSTALLDIRS= - if test -n "$ac_aux_dir"; then - MKINSTALLDIRS="$ac_aux_dir/mkinstalldirs" - fi - if test -z "$MKINSTALLDIRS"; then - MKINSTALLDIRS="\$(top_srcdir)/mkinstalldirs" - fi -]) - -# Search path for a program which passes the given test. - -dnl AM_PATH_PROG_WITH_TEST(VARIABLE, PROG-TO-CHECK-FOR, -dnl TEST-PERFORMED-ON-FOUND_PROGRAM [, VALUE-IF-NOT-FOUND [, PATH]]) -AC_DEFUN([AM_PATH_PROG_WITH_TEST], -[# Extract the first word of "$2", so it can be a program name with args. -set dummy $2; ac_word=[$]2 -AC_MSG_CHECKING([for $ac_word]) -AC_CACHE_VAL(ac_cv_path_$1, -[case "[$]$1" in - /*) - ac_cv_path_$1="[$]$1" # Let the user override the test with a path. - ;; - *) - IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:" - for ac_dir in ifelse([$5], , $PATH, [$5]); do - test -z "$ac_dir" && ac_dir=. - if test -f $ac_dir/$ac_word; then - if [$3]; then - ac_cv_path_$1="$ac_dir/$ac_word" - break - fi - fi - done - IFS="$ac_save_ifs" -dnl If no 4th arg is given, leave the cache variable unset, -dnl so AC_PATH_PROGS will keep looking. -ifelse([$4], , , [ test -z "[$]ac_cv_path_$1" && ac_cv_path_$1="$4" -])dnl - ;; -esac])dnl -$1="$ac_cv_path_$1" -if test ifelse([$4], , [-n "[$]$1"], ["[$]$1" != "$4"]); then - AC_MSG_RESULT([$]$1) -else - AC_MSG_RESULT(no) -fi -AC_SUBST($1)dnl -]) - - -dnl Usage: AM_GNU_GETTEXT_VERSION([gettext-version]) -AC_DEFUN([AM_GNU_GETTEXT_VERSION], []) - - -#----------------------------------------------------------------------------- -# Safety check for mkstemp -# -AC_DEFUN([AM_SAFETY_CHECK_MKSTEMP],[ - AC_CHECK_FUNCS(mkstemp) - has_safety_mkstemp=no - AC_MSG_CHECKING(if mkstemp is safe) - if test x$ac_cv_func_mkstemp != xno; then - AC_TRY_RUN([ -#include -#include -#include -#include -int main(void) -{ - char template[128]; - char template_orig[128]; - int fd; - - sprintf(template, "configure-mkstemp-test.XXXXXX"); - strcpy(template_orig, template); - fd = mkstemp(template); - if (fd == -1) - { - /* could not create temp file */ - return 1; - } - if (strcmp(template, template_orig) == 0) - { - /* mkstemp broken */ - return 2; - } - if (close(fd) != 0) - { - /* doh! */ - return 3; - } - if (unlink(template)) - { - return 4; - } - /* mkstemp works properly */ - return 0; -} - ], - [has_safety_mkstemp=yes], [has_safety_mkstemp=no]) - fi - AH_TEMPLATE([HAVE_SAFETY_MKSTEMP],[Enable the use of mkstemp]) - if test x$has_safety_mkstemp = xno; then - AC_MSG_RESULT(no, use our mkstemp) - else - AC_MSG_RESULT(yes) - AC_DEFINE(HAVE_SAFETY_MKSTEMP) - fi -]) diff --git a/autogen.sh b/autogen.sh deleted file mode 100755 index af198ec99..000000000 --- a/autogen.sh +++ /dev/null @@ -1,9 +0,0 @@ -#!/bin/sh - -die() -{ - echo "$1" >&2 - exit $2 -} - -autoreconf -f -i -v || die "autoreconf failed" $? diff --git a/bin/FvwmPrompt/Makefile.am b/bin/FvwmPrompt/Makefile.am deleted file mode 100644 index 028208745..000000000 --- a/bin/FvwmPrompt/Makefile.am +++ /dev/null @@ -1,26 +0,0 @@ -if FVWM_BUILD_GOLANG -GOCMD=go -GOBUILD=$(GOCMD) build -GOFLAGS=-ldflags="-s -w" -GOCLEAN=$(GOCMD) clean -BINARY_NAME=FvwmPrompt -EXTRA_DIST=meson.build - -all: build -build: - $(GOBUILD) $(GOFLAGS) -mod=vendor -o $(BINARY_NAME) -v -clean: - $(GOCLEAN) - rm -f $(BINARY_NAME) - rm -f $(BINARY_UNIX) -run: - $(GOBUILD) $(GOFLAGS) -mod=vendor -o $(BINARY_NAME) -v ./... - ./$(BINARY_NAME) - -install: - rm -f $(DESTDIR)$(bindir)/$(BINARY_NAME) - install $(BINARY_NAME) $(DESTDIR)$(bindir) - -uninstall: - rm -f $(DESTDIR)$(bindir)/$(BINARY_NAME) -endif diff --git a/bin/Makefile.am b/bin/Makefile.am deleted file mode 100644 index 8153bef98..000000000 --- a/bin/Makefile.am +++ /dev/null @@ -1,38 +0,0 @@ -## Process this file with automake to create Makefile.in - -SUBDIRS = FvwmPrompt - -bin_PROGRAMS = fvwm-root -fvwm_root_SOURCE= fvwm-root.c -fvwm_root_DEPENDENCIES = $(top_builddir)/libs/libfvwm3.a - -bin_SCRIPTS = fvwm-perllib \ - fvwm-convert-2.6 \ - fvwm-menu-xlock fvwm-menu-directory \ - fvwm-menu-desktop \ - FvwmCommand - -LDADD = -L$(top_builddir)/libs $(X_LIBS) -lfvwm3 $(xpm_LIBS) $(Xcursor_LIBS) \ - $(X_PRE_LIBS) -lXext -lX11 -lm $(X_EXTRA_LIBS) $(Xrender_LIBS) \ - $(Xcursor_LIBS) $(png_LIBS) $(rsvg_LIBS) $(XRandR_LIBS) \ - $(XFT_LIBS) -AM_CPPFLAGS = -I$(top_srcdir) $(xpm_CFLAGS) $(X_CFLAGS) $(png_CFLAGS) \ - $(rsvg_CFLAGS) $(XRandR_CFLAGS) $(XFT_CFLAGS) - -configdir = @FVWM_DATADIR@ -config_DATA = fvwm-menu-desktop-config.fpl - -EXTRA_DIST = fvwm-menu-desktop-config.fpl FvwmPrompt meson.build - -dist-hook: - rm -f $(distdir)/FvwmPrompt/FvwmPrompt - -## Create compatibility symlinks if available - -fvwm_root_name =`echo "fvwm-root" | "$(SED)" -e "${transform}"` -FvwmCommand_name =`echo "FvwmCommand" | "$(SED)" -e "${transform}"` - -uninstall-local: - @rm -f $(DESTDIR)$(bindir)/$(FvwmCommand_name)$(EXEEXT) - -CLEANFILES = $(bin_SCRIPTS) $(bin_PROGRAMS) diff --git a/configure.ac b/configure.ac deleted file mode 100644 index cef25d3e0..000000000 --- a/configure.ac +++ /dev/null @@ -1,1514 +0,0 @@ -dnl Process this file with autoconf to produce a configure script. -dnl -AC_PREREQ(2.60) - -dnl should be "yes" only within the released distribution -ISRELEASED="no" -if test $ISRELEASED = "no"; then - RELDATELONG="" - RELDATESHORT="" - RELDATENUM="" - -fi - -# Silence warning: ar: 'u' modifier ignored since 'D' is the default -AC_SUBST(AR_FLAGS, [cr]) - -AC_INIT([fvwm3], 1.1.3, [fvwm-workers@fvwm.org]) -AC_CONFIG_AUX_DIR(etc) -AC_CONFIG_LIBOBJ_DIR(libs) -AM_INIT_AUTOMAKE([foreign subdir-objects]) -AM_SILENT_RULES([yes]) -AM_CONFIG_HEADER(config.h) - -VERSIONINFO=m4_esyscmd([./utils/fvwm-version-str.sh]) - -dnl date of the released version (please zero pad the day in the last 2 dates) -dnl for example: "4 February 2003", "04 Feb 2003", "2003-02-04" -dnl date format strings: "%e %B %Y", "%d-%b-%Y", "%Y-%m-%d" -RELDATELONG=" 8 February 25" -RELDATESHORT="08-Feb-25" -RELDATENUM="25-02-08" - -# constant variable settings -FVWMNAMELONG="F? Virtual Window Manager" -FVWMHOMEPAGE="http://fvwm.org/" -FVWMLIST="fvwm@fvwm.org" -FVWMWORKERSLIST="fvwm-workers@fvwm.org" -FVWMWORKERSLISTLONG="fvwm workers list " -MANPAGE_PREAMBLE='.\" WARNING: This file was automatically generated. Edit the .in file instead.' - -AC_SUBST(ISRELEASED) -AH_TEMPLATE([VERSIONINFO],[Additional version information, like date]) -AC_DEFINE_UNQUOTED(VERSIONINFO, "$VERSIONINFO") -AC_SUBST(VERSIONINFO) -AC_SUBST(RELDATELONG) -AC_SUBST(RELDATESHORT) -AC_SUBST(RELDATENUM) -AC_SUBST(FVWMNAMELONG) -AC_SUBST(FVWMHOMEPAGE) -AC_SUBST(FVWMLIST) -AC_SUBST(FVWMWORKERSLIST) -AC_SUBST(FVWMWORKERSLISTLONG) -AC_SUBST(MANPAGE_PREAMBLE) - -# check for programs needed to build html docs -AC_CHECK_PROG(SED, sed, sed, "") -AC_SUBST(SED) - -# optional python: -PYTHON= -REQUIRED_PYTHON_VERSION=3.0 -AC_SUBST(REQUIRED_PYTHON_VERSION) -AC_PATH_PROG([PYTHON],[python3],[:]) -AS_IF([test "$PYTHON" != ":"], - [AM_PYTHON_CHECK_VERSION([$PYTHON],[$REQUIRED_PYTHON_VERSION],[:], - [PYTHON=":"])]) - -# Golang -problem_golang="" -AC_ARG_ENABLE(golang, - AS_HELP_STRING([--enable-golang],[enable compilation of modules written in Go]), - [ if test x"$enableval" = xyes; then - with_golang="yes, check" - else - with_golang="no" - problem_golang=": Explicitly disabled" - fi ], - [ with_golang="no" ] -) - -if test ! x"$with_golang" = xno; then - AC_CHECK_PROGS(GO, go) - if test -n "$GO"; then - GOVERSIONOPTION=version - go_version=$($GO $GOVERSIONOPTION | sed -e 's/go version go//' | sed -e 's/ .*$//') - AX_COMPARE_VERSION([$go_version], [ge], ["1.14.0"], - [with_golang="yes"; - problem_golang=" ($go_version)"; - GO=], - [with_golang="no"; - AC_MSG_ERROR([Go version ($go_version) is lower than the minimum required version ($REQUIRED_GO_VERSION)])]) - fi -fi -AM_CONDITIONAL([FVWM_BUILD_GOLANG], [test x"$with_golang" = xyes]) -AC_SUBST(GO) - -#!!! -PERL="" -REQUIRED_PERL_VERSION=5.004 -AC_SUBST(REQUIRED_PERL_VERSION) -if test x"$PERL" = x; then - AC_PATH_PROG(PERL, perl) -fi -if test ! x"$PERL" = x; then - AC_MSG_CHECKING([for perl $REQUIRED_PERL_VERSION or better]) - if ("$PERL" -e "require $REQUIRED_PERL_VERSION;") 2>/dev/null; then - AC_MSG_RESULT(yes) - else - AC_MSG_RESULT(no) - AC_MSG_WARN([$PERL not found or too old]) - fi -else - AC_MSG_WARN([perl is not found, it is required for some scripts and modules]) - AC_MSG_WARN([It is recommended to install perl $REQUIRED_PERL_VERSION or better later]) - PERL=/usr/bin/perl -fi -AC_MSG_RESULT([assuming $PERL as perl location]) -AC_SUBST(PERL) - -# installation paths -transform=`echo "${program_transform_name}" | "$SED" -e 's/\\$\\$/\\$/'` -PPACKAGE=`echo "${PACKAGE}" | "$SED" -e "${transform}"` -FVWM_MODULESUBDIR=/${PPACKAGE}/${VERSION} -FVWM_DATASUBDIR=/${PPACKAGE} - -AC_ARG_ENABLE(package-subdirs, - AS_HELP_STRING([--disable-package-subdirs], - [do not create subdirs for modules and data]), - [if test x"$enableval" = xno; then FVWM_MODULESUBDIR=""; FVWM_DATASUBDIR=""; - fi], []) - - -FVWM_MODULEDIR='${libexecdir}'"$FVWM_MODULESUBDIR" -FVWM_DATADIR='${datadir}'"$FVWM_DATASUBDIR" -FVWM_DOCDIR='${datadir}'"$FVWM_DATASUBDIR/htmldoc" -FVWM_PERLLIBDIR='${datadir}'"$FVWM_DATASUBDIR/perllib" -FVWM_CONFDIR='${sysconfdir}'dnl used _only_ to search for system.fvwm2rc - -AC_SUBST(FVWM_MODULEDIR) -AC_SUBST(FVWM_DATADIR) -AC_SUBST(FVWM_PERLLIBDIR) -AC_SUBST(FVWM_CONFDIR) -AC_SUBST(FVWM_DOCDIR) - -# Check for compatibility for missing implementations. -AC_REPLACE_FUNCS([ \ - asprintf \ -]) - -AH_TEMPLATE([FVWM_CONFIG], - [Name of config filenames in FVWM_USERDIR and FVWM_DATADIR]) -AC_DEFINE(FVWM_CONFIG, "config") - -AH_TEMPLATE([FVWM2RC],[Suffix for old (to be deprecated) config filenames]) -AC_DEFINE(FVWM2RC, ".fvwm2rc") - -# Various configure-time options - -dnl dummy: smr_SWITCH(sm, dummy for test script, on, SESSION) - -# Need to know where X is, for finding some libraries (e.g. xpm) -no_x="" -AC_PATH_XTRA -if test x"$no_x" = x"yes"; then - echo - echo "X11 libraries or header files could not be found. Please make" - echo "sure the X11 development package is installed on your system." - echo "If it is definitely installed, try setting the include and library" - echo "paths with the --x-include and --x-libraries options of configure." - echo "Fvwm can not be compiled without the X11 development environment." - echo - echo "Aborting." - echo - exit 1 -fi - -# FIXME: default value should be derived from computed path to X -# includes. Actually, this should probably not appear in configure -# at all: it is settable at runtime, and only confuses the issue to -# have it settable here too. -# -AC_MSG_CHECKING(imagepath) -val="/usr/include/X11/bitmaps:/usr/include/X11/pixmaps" -AC_ARG_WITH(imagepath, - AS_HELP_STRING([--with-imagepath=PATH], - [colon-delimited search path for images]), -[ case "$withval" in - no) - AC_MSG_ERROR([Can not disable image path.]) - ;; - yes) - ;; - *) - val="$withval" - ;; - esac ]) -AH_TEMPLATE([FVWM_IMAGEPATH],[Where to search for images.]) -AC_DEFINE_UNQUOTED(FVWM_IMAGEPATH, "$val") - -FVWM_IMAGEPATH="$val" -AC_SUBST(FVWM_IMAGEPATH) -AC_MSG_RESULT($val) - -# Minimal checks for programs: enough to enable checking for -# optional libraries. -AC_PROG_CC -AC_PROG_CPP - -# added -Wall for gcc, what about for others? -if test "x$GCC" = "xyes"; then - CFLAGS="-Wall -Wno-implicit-int -fno-common -Wno-error=format-security $CFLAGS" -fi - -# Help finding POSIX functions on some systems -AC_ISC_POSIX -AC_MINIX - -# check size of some types -ac_save_CFLAGS="$CFLAGS" -CFLAGS="$CFLAGS $X_CFLAGS" -AC_CHECK_SIZEOF(int) -AC_CHECK_SIZEOF(long) -AC_CHECK_SIZEOF(Window, , [#include -#include ]) -AC_CHECK_SIZEOF(Pixel, , [#include -#include ]) -AC_CHECK_SIZEOF(void *) -CFLAGS="$ac_save_CFLAGS" -size_check_failed="" -if test "$ac_cv_sizeof_void_p" -gt "$ac_cv_sizeof_long"; then - echo "The type void * is bigger than long." - size_check_failed=1 -fi -if test "$ac_cv_sizeof_Window" -gt "$ac_cv_sizeof_long"; then - echo "The type Window is bigger than long." - size_check_failed=1 -fi -if test "$ac_cv_sizeof_Pixel" -gt "$ac_cv_sizeof_long"; then - echo "The type Pixel is bigger than long." - size_check_failed=1 -fi -if test x"$size_check_failed" = x1; then - echo "This is not supported by the module interface yet (make_new_vpacket)." - echo "Detected type sizes are: int($ac_cv_sizeof_int), long($ac_cv_sizeof_long), void*($ac_cv_sizeof_void_p), Window($ac_cv_sizeof_Window), Pixel($ac_cv_sizeof_Pixel)" - echo "Please report details of your system and this message to ${FVWMWORKERSLIST}." - echo - exit 1 -fi - -# 'unset' is not portable, but setting to null is not enough to avoid using -# the cached value! For ancient shells "rm config.cache" is a solution. -UNSET=true -if unset UNSET 2>/dev/null; then UNSET=unset; fi - - -# ********* multibyte -# FreeBSD has libxpg4, check this and use if found. -AC_CANONICAL_HOST -AC_MSG_CHECKING(platform) -case "$host_os" in -freebsd*) - PLATFORM=freebsd - AC_MSG_RESULT(FreeBSD) - AC_CHECK_LIB(xpg4, setlocale, [LIBS="$LIBS -lxpg4"]) - ;; -*openbsd*) - PLATFORM=openbsd - AC_MSG_RESULT(OpenBSD) - CFLAGS="$CFLAGS -I/usr/local/include" - LDFLAGS="$LDFLAGS -L/usr/local/lib" - ;; -*darwin*) - PLATFORM=macos - AC_MSG_RESULT(MacOS) - ;; -*) - PLATFORM=unknown - AC_MSG_RESULT(unknown) - ;; -esac - -AC_SUBST(PLATFORM) - -AM_CONDITIONAL([HOST_MACOS], [test "$PLATFORM" = "macos"]) - -if test "x$PLATFORM" = "xmacos"; then -AC_DEFINE([HOST_MACOS], [macos], [Host is MacOS]) -fi - -PKG_PROG_PKG_CONFIG - -PKG_CHECK_MODULES([xt],[xt], -[], -[ - AC_MSG_ERROR([*** libxt not found. ***]) -]) - -problem_mandoc="" -AC_CHECK_PROG(ASCIIDOC, asciidoctor, asciidoctor, "") -AC_SUBST(ASCIIDOC) - -AC_ARG_ENABLE(mandoc, - AS_HELP_STRING([--enable-mandoc], - [enable generation of man pages]), - [ if test x"$enableval" = xyes; then - with_mandoc="yes, check" - else - with_mandoc="no" - problem_mandoc=": Explicitly disabled" - fi ], - [ with_mandoc="no" ] -) - -if test ! x"$with_mandoc" = xno; then - if test x"$ASCIIDOC" = x ; then - with_mandoc="no" - problem_mandoc=": No asciidoctor found in PATH" - else - with_mandoc="yes" - fi -fi -AM_CONDITIONAL([FVWM_BUILD_MANDOC], [test x"$with_mandoc" = xyes]) - -AC_ARG_ENABLE(htmldoc, - AS_HELP_STRING([--enable-htmldoc], - [enable generation of html man pages]), - [ if test x"$enableval" = xyes; then - with_htmldoc="yes, check" - else - with_htmldoc="no" - problem_htmldoc=": Explicitly disabled" - fi ], - [ with_htmldoc="no" ] -) - -if test ! x"$with_htmldoc" = xno; then - if test x"$ASCIIDOC" = x ; then - with_htmldoc="no" - problem_htmldoc=": No asciidoctor found in PATH" - else - with_htmldoc="yes" - fi -fi -AM_CONDITIONAL([FVWM_BUILD_HTMLDOC], [test x"$with_htmldoc" = xyes]) -AM_CONDITIONAL([FVWM_BUILD_DOC], [test x"$with_mandoc" = xyes || test x"$with_htmldoc" = xyes]) - -# ********* session management -# Check the availability of SM; we don't have to add any extra libraries, -# since -lSM -lICE are in X_PRE_LIBS when they exist. -dnl [old check] AC_CHECK_LIB(SM, SmcOpenConnection, AC_DEFINE(SESSION), , -dnl [old check] [$X_LIBS $X_PRE_LIBS -lX11 $X_EXTRA_LIBS]) - -problem_sm="" - -AC_ARG_ENABLE(sm, - AS_HELP_STRING([--disable-sm],[disable session management support]), - [ if test x"$enableval" = xyes; then - with_sm="yes, check" - else - with_sm="no" - problem_sm=": Explicitly disabled" - fi ], - [ with_sm="not specified, check" ] -) - -if test ! x"$with_sm" = xno; then - dnl Uncomment the following and comment out AC_CHECK_LIB to get --with-sm-* - dnl $UNSET ac_cv_lib_SM_SmcOpenConnection - dnl $UNSET ac_cv_header_X11_SM_SMlib_h - dnl smr_CHECK_LIB(sm, SM, adds session management support, SmcOpenConnection, - dnl X11/SM/SMlib.h, - dnl [$X_LIBS $X_PRE_LIBS $X_EXTRA_LIBS], $X_CFLAGS) - dnl test "$sm_LIBS" && AC_DEFINE(SESSION) - - $UNSET ac_cv_lib_SM_SmcOpenConnection - AH_TEMPLATE([SESSION],[Enables session management functionality.]) - AC_CHECK_LIB(SM, SmcOpenConnection, with_sm=yes; AC_DEFINE(SESSION), - with_sm=no; problem_sm=": Failed to detect libSM", - [$X_LIBS $X_PRE_LIBS -lX11 $X_EXTRA_LIBS]) - ac_LIBS="$LIBS" - LIBS="$LIBS -lICE" - AC_CHECK_FUNCS([_IceTransNoListen], - [AC_CHECK_HEADERS([X11/Xtrans/Xtrans.h], - [AC_DEFINE(ICE_t, 1, [Xtrans transport type]) - dnl AC_DEFINE(TRANS_CLIENT, 1, [Xtrans transport client code]) - AC_DEFINE(TRANS_SERVER, 1, [Xtrans transport server code])])]) - LIBS="$ac_LIBS" -fi -dnl AC_SUBST(sm_LIBS) -dnl AC_SUBST(sm_CFLAGS) - - -# Checking for optional libraries -# Default is to use them if found; can be disable using --without -# These are put up front so that if they are requested, but -# configure fails to find them, we fail early. - - -# ********* shape extension -dnl smr_SWITCH(shape, shape extensions, on, SHAPE) -AC_ARG_ENABLE(shape, - AS_HELP_STRING([--disable-shape],[disable shaped window support]), - [ if test x"$enableval" = xyes; then - with_shape="yes, check" - else - with_shape="no" - problem_shape=": Explicitly disabled" - fi ], - [ with_shape="not specified, check" ] -) - -AH_TEMPLATE(SHAPE, -[ Define if you want the Shaped window extensions. - Shaped window extensions seem to increase the window managers RSS - by about 60 Kbytes. They provide for leaving a title-bar on the window - without a border. - If you don't use shaped window extension, you can either make your - shaped windows undecorated, or live with a border and backdrop around - all your shaped windows (oclock, xeyes) - - If you normally use a shaped window (xeyes or oclock), you might as - well compile this extension in, since the memory cost is minimal in - this case (The shaped window shared libs will be loaded anyway). If you - don't normally use a shaped window, you have to decide for yourself. - - Note: if it is compiled in, run time detection is used to make sure that - the currently running X server supports it.]) -if test ! x"$with_shape" = xno; then - $UNSET ac_cv_lib_Xext_XShapeQueryExtension - AC_CHECK_LIB(Xext, XShapeQueryExtension, - with_shape=yes; AC_DEFINE(SHAPE), - with_shape=no; - problem_shape=": Failed to detect Shape extension", - [$X_LIBS $X_PRE_LIBS -lX11 $X_EXTRA_LIBS]) -fi - -# ********* MIT Shared Memory Extension -AC_ARG_ENABLE(shm, - AS_HELP_STRING([--disable-shm],[disable MIT Shared Memory Extension]), - [ if test x"$enableval" = xyes; then - with_shm="yes, check" - else - with_shm="no" - problem_shm=": Explicitly disabled" - fi ], - [ with_shm="not specified, check" ] -) - -AH_TEMPLATE([HAVE_XSHM],[Define if MIT Shared Memory extension is used.]) -if test ! x"$with_shm" = xno; then - $UNSET ac_cv_lib_Xext_XShmQueryExtension - AC_CHECK_LIB(Xext, XShmQueryExtension, - with_shm=yes; AC_DEFINE(HAVE_XSHM), - with_shm=no; - problem_shm=": Can't detect MIT Shared Memory ext.", - [$X_LIBS $X_PRE_LIBS -lX11 $X_EXTRA_LIBS]) -fi - -# Silently look for X11/XKBlib.h -AH_TEMPLATE([HAVE_X11_XKBLIB_H],[Define if Xkb extension is used.]) -AC_CHECK_HEADER(X11/XKBlib.h, AC_DEFINE(HAVE_X11_XKBLIB_H)) - -# libevent -AH_TEMPLATE([HAVE_LIBEVENT],[Define if libevent is used.]) -PKG_CHECK_MODULES([libevent], [libevent >= 2.0], -[ - AC_DEFINE(HAVE_LIBEVENT) - libevent_LIBS=`pkg-config --libs libevent` -], -[ - AC_MSG_ERROR([*** libevent >=2 not found. Install its header files. ***]) -]) -AC_SUBST(libevent_LIBS) -AC_SUBST(libevent_CFLAGS) - -# ********* XRandR -AH_TEMPLATE([HAVE_XRANDR],[Define if XRandR library is used.]) -PKG_CHECK_MODULES([xrandr], [xrandr >= 1.5], -[ - AC_DEFINE(HAVE_XRANDR) - XRandR_LIBS=-lXrandr -], -[ - AC_MSG_ERROR([*** XRandR not found. Install its header files. ***]) -]) - -AC_SUBST(XRandR_LIBS) -AC_SUBST(XRandR_CFLAGS) - -# ********* xrender -problem_xrender="" -AC_ARG_ENABLE(xrender, - AS_HELP_STRING([--disable-xrender],[disable Xrender alpha-blend rendering]), - [ if test x"$enableval" = xyes; then - with_xrender="yes, check" - else - with_xrender="no" - problem_xrender=": Explicitly disabled" - fi ], - [ with_xrender="not specified, check" ] -) - -AH_TEMPLATE([HAVE_XRENDER],[Define if Xrender library is used.]) -if test ! x"$with_xrender" = xno; then - $UNSET ac_cv_lib_Xrender_XRenderComposite - AC_CHECK_LIB(Xrender, XRenderComposite, - with_xrender=yes; Xrender_LIBS=-lXrender; - AC_DEFINE(HAVE_XRENDER), - with_xrender=no; Xrender_LIBS= - problem_xrender=": Failed to detect libXrender", - [$X_LIBS $X_PRE_LIBS -lXext -lX11 $X_EXTRA_LIBS]) -fi -AC_SUBST(Xrender_LIBS) -AC_SUBST(Xrender_CFLAGS) - -# ********* xcursor -AH_TEMPLATE([HAVE_XCURSOR],[Define if Xcursor library is used.]) -xcursor_CFLAGS="" -xcursor_LIBS="" -AC_ARG_ENABLE(xcursor, - AS_HELP_STRING([--disable-xcursor], - [disable Xcursor ARGB/animated cursor loading]), - [ if test x"$enableval" = xno; then - with_xcursor=no - problem_xcursor=": Explicitly disabled" - fi ], -) -if test ! x"$with_xcursor" = xno; then - with_xcursor=no - if test ! x"$with_xrender" = xno; then - $UNSET ac_cv_lib_Xrender_XRenderCreateCursor - AC_CHECK_LIB(Xrender, XRenderCreateCursor, [ - with_xcursor=yes - ],[ - problem_xcursor=": Your libXrender version is too old" - ], - [$X_LIBS $X_PRE_LIBS -lXext -lX11 $X_EXTRA_LIBS]) - else - problem_xcursor=": Need Xrender support" - fi -fi -if test x"$with_xcursor" = xyes ; then - $UNSET ac_cv_lib_Xcursor_XcursorImageLoadCursor - AC_CHECK_LIB(Xcursor, XcursorImageLoadCursor, [ - AC_DEFINE(HAVE_XCURSOR) - Xcursor_LIBS=-lXcursor - problem_xcursor="" - ],[ - with_xcursor=no - problem_xcursor=": Failed to detect libXcursor" - ],[$X_LIBS $X_PRE_LIBS -lXext -lX11 $X_EXTRA_LIBS]) -fi -AC_SUBST(Xcursor_CFLAGS) -AC_SUBST(Xcursor_LIBS) - -freetype_CFLAGS="" -freetype_LIBS="" -AH_TEMPLATE([HAVE_XFT],[Define if Xft library is used.]) -AH_TEMPLATE([HAVE_XFT2],[Define if Xft 2 library is used.]) -AH_TEMPLATE([HAVE_XFT_UTF8],[Define if Xft library can handle utf8 encoding]) - AC_MSG_CHECKING([whether pkg-config could find freetype2]) - if "${PKG_CONFIG}" --exists freetype2; then - AC_MSG_RESULT([yes]) - CFLAGS_FREETYPE=`"${PKG_CONFIG}" --cflags freetype2` - FREETYPE_LIBS=`"${PKG_CONFIG}" --libs freetype2` - freetype_CFLAGS="$CFLAGS_FREETYPE" - freetype_LIBS="$FREETYPE_LIBS" - - have_freetype=yes - else - AC_MSG_RESULT([no]) - have_freetype=no - fi - - AC_SUBST(freetype_CFLAGS) - AC_SUBST(freetype_LIBS) - - # check for fontconfig for Xft 2 - have_fontconfig=no - if test ! x"$have_freetype" = xno ; then - AM_CHECK_FC(1.0.1) - if test x"$no_fc" = x ; then - have_fontconfig=yes - fontconfig_CFLAGS=`$PKG_CONFIG --cflags fontconfig` - fontconfig_LIBS=`$PKG_CONFIG --libs fontconfig` - CFLAGS="$CFLAGS $fontconfig_CFLAGS" - LIBS="$LIBS $fontconfig_LIBS" - else - have_fontconfig=no - problem_xft=": Can't detect fontconfig >= 1.0.1" - fi - fi - - # now check for Xft 2 - with_xft=no - if test ! x"$have_fontconfig" = xno ; then - # Xft 2 - AM_CHECK_XFT(2.0.0) - if test x"$no_xft" = x; then - with_xft=yes - problem_xft=" (version 2)" - AC_DEFINE(HAVE_XFT2) - AC_DEFINE(HAVE_XFT) - AC_DEFINE(HAVE_XFT_UTF8) - Xft_LIBS=$XFT_LIBS - Xft_CFLAGS=$XFT_CFLAGS - else - problem_xft=": Can't detect Xft2, detected fontconfig" - fi - fi - - # if Xft2 not detected check for Xft1 - if test ! x"$have_freetype" = xno && test ! x"$with_xft" = xyes; then - #Xft 1 - $UNSET ac_cv_lib_XftConfigSubstitute - $UNSET ac_cv_lib_Xft_XftFontOpen - $UNSET ac_cv_lib_Xft_XftDrawStringUtf8 - AC_CHECK_LIB(Xft, XftFontOpen, - with_xft=yes, with_xft=no, - [$X_LIBS $X_PRE_LIBS -lXext -lX11 $X_EXTRA_LIBS $FT2_LIBS $Xrender_LIBS]) - if test x"$with_xft" = xyes ; then - AC_CHECK_LIB(Xft, XftConfigSubstitute, is_xft1=yes, is_xft1=no, - [$X_LIBS $X_PRE_LIBS -lXext -lX11 $X_EXTRA_LIBS $FT2_LIBS $Xrender_LIBS]) - if test x"$is_xft1" = xyes; then - Xft_LIBS="-lXft $FT2_LIBS" - Xft_CFLAGS="$Xft_CFLAGS $FT2_CFLAGS" - problem_xft=" (version 1)" - AC_DEFINE(HAVE_XFT) - else - with_xft=no - problem_xft=": Can't detect Xft 1 or fontconfig" - fi - else - problem_xft=": Can't detect Xft 1 or 2 and fontconfig" - fi - if test x"$with_xft" = xyes; then - AC_CHECK_LIB(Xft, XftDrawStringUtf8, - AC_DEFINE(HAVE_XFT_UTF8),, - [$X_LIBS $X_PRE_LIBS -lXext -lX11 $X_EXTRA_LIBS $FT2_LIBS $Xrender_LIBS]) - fi - fi - -AC_SUBST(Xft_LIBS) -AC_SUBST(Xft_CFLAGS) - -if test x"$with_xft" = "no" || test x"$with_fontconfig" = "xno" || \ - test x"$have_freetype" = "xno"; then - AC_MSG_ERROR(["*** XFT/Fontconfig/Freetype not found. ***]) -fi - -# ********* xpm -problem_xpm=": Xpm library or header not found" - -$UNSET ac_cv_header_X11_xpm_h -$UNSET ac_cv_lib_Xpm_XpmReadFileToXpmImage -smr_CHECK_LIB(xpm, Xpm, for coloured or shaped icons, - XpmReadFileToXpmImage, X11/xpm.h, - [$X_LIBS $X_PRE_LIBS -lX11 $X_EXTRA_LIBS], $X_CFLAGS) - -if test ! x"$xpm_LIBS" = x; then - # Check for proper version of Xpm -- from XEmacs 21.x configure.in - AC_MSG_CHECKING([for Xpm 3.4g or better]) - my_CPPFLAGS="$CPPFLAGS" - my_LIBS="$LIBS" - CPPFLAGS="$CPPFLAGS $xpm_CFLAGS $X_CFLAGS" - LIBS="$LIBS $xpm_LIBS $X_LIBS $X_PRE_LIBS -lX11 $X_EXTRA_LIBS" - AC_TRY_RUN([#include - int main(int c, char **v) { - return c == 1 ? 0 : - XpmIncludeVersion != XpmLibraryVersion() ? 1 : - XpmIncludeVersion < 30407 ? 2 : 0 ;}], - [./conftest dummy_arg; xpm_status=$?; - if test x"$xpm_status" = x0; then - with_xpm=yes - problem_xpm="" - else - with_xpm=no; - if test x"$xpm_status" = x1; then - problem_xpm=": Xpm library and header versions don't match" - elif test x"$xpm_status" = x2x; then - problem_xpm=": Xpm library version is too old" - else - problem_xpm=": Internal xpm detection logic error" - fi - fi], - [with_xpm=no; problem_xpm=": Xpm test error, see config.log"], - [echo $ac_n "cross compiling; assumed OK... $ac_c"]) - AC_MSG_RESULT($with_xpm) - CPPFLAGS="$my_CPPFLAGS" - LIBS="$my_LIBS" - - AH_TEMPLATE([XPM],[Define if Xpm library is used.]) - if test x"$with_xpm" = xyes; then - AC_DEFINE(XPM) - # FVWMBANNER=FvwmBanner AC_SUBST(FVWMBANNER) - # FVWMSCRIPT=FvwmScript AC_SUBST(FVWMSCRIPT) - else - xpm_LIBS= - xpm_CFLAGS= - fi -fi -AC_SUBST(xpm_LIBS) -AC_SUBST(xpm_CFLAGS) - -# ********* png -png_LIBS="" -png_CFLAGS="" - -AH_TEMPLATE([HAVE_PNG], [Define PNG]) -AC_ARG_ENABLE(png, - AS_HELP_STRING([--disable-png], - [Disables libpng support.]), - [with_png="$enableval"], - [with_png="yes"]) - -if test "$with_png" = no; then - AC_MSG_WARN([*** - disabling PNG support will mean the default - configuration shipped with FVWM will be without icon - support. Be sure this is what you mean to do. - ***]) -else - AC_MSG_CHECKING([for libpng...]) - PKG_CHECK_MODULES([png], [libpng >= 1.2], - [ - AC_DEFINE(HAVE_PNG) - ], - [ - AC_MSG_ERROR([*** - libpng not found, and --disable-png not given. - It is recommended to use libpng so that PNG icons can - be rendered by FVWM, which the default configuration - file needs, as well as other third-party programs - which generate menus, for example. - - If it is critical that FVWM does not link against - libpng (perhaps due to size limitations of the - binary), then use --disable-png - ***]) - ]) - # ** needed by the png support - AC_C_BIGENDIAN -fi - -AC_SUBST(png_LIBS) -AC_SUBST(png_CFLAGS) - -# ********* rsvg -rsvg_min_version=2.13.92 -AH_TEMPLATE([HAVE_RSVG], [Define if librsvg library is used.]) - -AC_ARG_ENABLE(rsvg, - AS_HELP_STRING([--disable-rsvg], - [disable scalable vector graphics (SVG images)]), - [ if test x"$enableval" = xno; then - with_rsvg=no - problem_rsvg=": Explicitly disabled" - fi ], -) -if test ! x"$with_rsvg" = xno; then - with_rsvg=no - if test ! x"$PKG_CONFIG" = x ; then - AC_MSG_CHECKING(for librsvg - version >= $rsvg_min_version) - if $PKG_CONFIG --exists librsvg-2.0 ; then - if $PKG_CONFIG --exists "librsvg-2.0 >= $rsvg_min_version" ; then - AC_MSG_RESULT(yes) - - AC_MSG_CHECKING(for cairo svg backend) - if $PKG_CONFIG --exists cairo-svg ; then - svg_packages="librsvg-2.0 cairo-svg" - elif $PKG_CONFIG --exists libsvg-cairo ; then - svg_packages="librsvg-2.0 libsvg-cairo" - elif $PKG_CONFIG --exists cairo ; then - svg_packages="librsvg-2.0 cairo" - else - svg_packages="" - fi - if test ! x"$svg_packages" = x ; then - AC_MSG_RESULT(yes) - rsvg_CFLAGS=`$PKG_CONFIG --cflags $svg_packages` - rsvg_LIBS=`$PKG_CONFIG --libs $svg_packages` - with_rsvg=yes - else - AC_MSG_RESULT(no) - AC_MSG_WARN([*** cairo was not found in the pkg-config search]) - AC_MSG_WARN([*** path. Add the directory containing cairo.pc]) - AC_MSG_WARN([*** to the PKG_CONFIG_PATH environment variable.]) - problem_rsvg=": Cannot detect cairo backend" - fi - else - AC_MSG_RESULT(no) - AC_MSG_WARN([*** Your librsvg version is < $rsvg_min_version]) - problem_rsvg=": Your librsvg version is too old" - fi - else - AC_MSG_RESULT(no) - AC_MSG_WARN([*** librsvg-2.0 was not found in the pkg-config search]) - AC_MSG_WARN([*** path. Either librsvg is not installed or you need]) - AC_MSG_WARN([*** to add the directory containing librsvg-2.0.pc to]) - AC_MSG_WARN([*** the PKG_CONFIG_PATH environment variable.]) - problem_rsvg=": librsvg library or header not found" - fi - else - problem_rsvg=": pkg-config not found" - fi -fi -if test x"$with_rsvg" = xyes ; then - AC_MSG_CHECKING(whether a librsvg program compiles and runs) - original_CFLAGS="$CFLAGS" - original_LIBS="$LIBS" - CFLAGS="$CFLAGS $rsvg_CFLAGS" - LIBS="$LIBS $rsvg_LIBS" - AC_TRY_RUN([ - #include - #include - int main() { - RsvgHandle *rsvg; - g_type_init(); - if(!(rsvg = rsvg_handle_new())) return 1; - g_object_unref(G_OBJECT(rsvg)); - return 0; - } - ], [ - AC_MSG_RESULT(yes) - ], [ - AC_MSG_RESULT(no) - AC_MSG_WARN([*** The librsvg test program failed to run. If your system]) - AC_MSG_WARN([*** has shared libraries outside the normal system library]) - AC_MSG_WARN([*** path, you need to make sure that the LD_LIBRARY_PATH]) - AC_MSG_WARN([*** (or the like) environment variable is correctly set.]) - with_rsvg=no - problem_rsvg=": Failed to run test program" - ], [echo $ac_n "cross compiling; assumed OK... $ac_c"]) - CFLAGS="$original_CFLAGS" - LIBS="$original_LIBS" -fi -if test x"$with_rsvg" = xyes ; then - AC_DEFINE(HAVE_RSVG) - problem_rsvg="" -else - rsvg_CFLAGS="" - rsvg_LIBS="" -fi -AC_SUBST(rsvg_CFLAGS) -AC_SUBST(rsvg_LIBS) - -# ********* readline -with_readline=no -problem_readline=": Both termcap and ncurses disabled" - -smr_ARG_WITHLIB(termcap, , to accomplish readline) -AH_TEMPLATE([HAVE_READLINE],[Define if readline is available.]) -if test ! x"$with_termcap" = xno; then - # Forget cached values, so user can re-run configure - $UNSET ac_cv_header_readline_history_h - $UNSET ac_cv_lib_readline_readline - AC_MSG_CHECKING([with termcap]) - smr_CHECK_LIB(readline, , line editing/history, readline, readline/history.h, - $termcap_LIBS) - if test ! x"$readline_LIBS" = x; then - with_readline=yes - readline_LIBS="$readline_LIBS $termcap_LIBS" - AC_DEFINE(HAVE_READLINE) - fi -fi -smr_ARG_WITHLIB(ncurses, , to accomplish readline) -if test ! x"$with_ncurses" = xno && test x"$readline_LIBS" = x; then - # We couldn't use readline with termcap; try with ncurses? - # Doesn't this seem a hacky way to do this?? - # unset cached values from last check... - $UNSET ac_cv_header_readline_history_h - $UNSET ac_cv_lib_readline_readline - AC_MSG_CHECKING([with ncurses]) - dnl We can not call smr_CHECK_LIB twice here without having the usage twice. - dnl old_LIBS=$LIBS - dnl AC_CHECK_LIB(readline, readline, , , $ncurses_LIBS) - dnl LIBS=$old_LIBS - dnl if test x"$ac_cv_lib_readline_readline" = xyes; then - dnl AC_CHECK_HEADERS(readline/history.h) - dnl if test x"$ac_cv_header_readline_history_h" = xyes; then - dnl with_readline=yes - dnl readline_LIBS="$readline_LIBS $ncurses_LIBS" - dnl AC_DEFINE(HAVE_READLINE) - dnl fi - dnl fi - smr_CHECK_LIB(readline, , line editing/history, readline, readline/history.h, - $ncurses_LIBS) - if test ! x"$readline_LIBS" = x; then - with_readline=yes - readline_LIBS="$readline_LIBS $ncurses_LIBS" - AC_DEFINE(HAVE_READLINE) - fi -fi -dnl We need to check if we have GNU readline or BSD editline -AH_TEMPLATE([HAVE_GNU_READLINE],[Define if readline has full GNU interface]) -if test x"$with_readline" = xyes; then - AC_CHECK_LIB(readline, append_history, AC_DEFINE(HAVE_GNU_READLINE), [], $readline_LIBS) -fi -AC_SUBST(readline_LIBS) -AC_SUBST(readline_CFLAGS) - - -# Check if Xsetlocale() is available or not. -AH_TEMPLATE([X_LOCALE],[Enables to use setlocale() provided by X]) -AC_CHECK_LIB(X11, _Xsetlocale, AC_DEFINE(X_LOCALE),, $X_LIBS -lX11) - -# Check if Xsetlocale() is available or not. -AH_TEMPLATE([HAVE_XOUTPUT_METHOD],[Enable X output method]) -AC_CHECK_LIB(X11, XOpenOM, AC_DEFINE(HAVE_XOUTPUT_METHOD),, $X_LIBS -lX11) - -# ******** iconv -with_iconv=no -with_iconv_type=no -with_lib_iconv=no -with_sys_iconv=no -problem_iconv=": Explicitly disabled" - -AC_ARG_ENABLE(iconv, - AS_HELP_STRING([--disable-iconv], - [disable support for iconv character conversion]), - [ac_cv_iconv="$enableval"], - [ac_cv_iconv="yes"]) - -AH_TEMPLATE([USE_LIBICONV], - [define if we use libiconv (not needed in general: for example iconv is - native with recent glibc)]) -AH_TEMPLATE([HAVE_ICONV], - [Define if iconv (in the libc) or libiconv is available]) -if test ! x"$ac_cv_iconv" = xno; then - # * first check for gnu libiconv - $UNSET ac_cv_header_libiconv_h - $UNSET ac_cv_lib_libiconv_libiconv_open - smr_CHECK_LIB( - iconv, , if not found sys iconv is used, libiconv_open, iconv.h) - if test ! x"$iconv_LIBS" = x; then - AC_DEFINE(USE_LIBICONV) - with_lib_iconv=yes - fi - AC_SUBST(iconv_LIBS) - AC_SUBST(iconv_CFLAGS) - - # * check for system iconv - - AC_CHECK_FUNC(iconv_open, with_sys_iconv=yes) - - if test x"$with_lib_iconv" = xyes && test x"$with_sys_iconv" = xyes; then - AC_MSG_WARN([*** Both system iconv and libiconv found: use libiconv]) - AC_MSG_WARN([*** Use --with-iconv-library=no to use the system iconv]) - fi - - # * libiconv found check for libcharset to get the good iconv charset - if test x"$with_lib_iconv" = xyes; then - CHECK_LIBCHARSET - fi - - test x"$with_lib_iconv" = xyes -o x"$with_sys_iconv" = xyes && - with_iconv=yes && problem_iconv="" - test x"$with_lib_iconv" = xyes && with_iconv_type="yes (libiconv)" - test x"$with_sys_iconv" = xyes && with_iconv_type="yes (from C library)" - - if test x"$with_iconv" = xno; then - AC_MSG_WARN([*** ]) - AC_MSG_WARN([*** No iconv() implementation found in C library or libiconv]) - AC_MSG_WARN([*** Please install libiconv ftp://ftp.gnu.org/pub/gnu/libiconv/]) - AC_MSG_WARN([*** ]) - fi - - if test x"$with_iconv" = xyes; then - AC_DEFINE(HAVE_ICONV) - ICONV_SECOND_ARG - fi -fi -AH_VERBATIM([_HAVE_LIBCHARSET], -[#ifdef USE_LIBICONV -/* define to use locale_charset in the place of nl_langinfog if libiconv - * is used */ -#undef HAVE_LIBCHARSET -#endif]) - - -# ******** nl_langinfo and CODESET -AH_TEMPLATE([HAVE_CODESET],[Have nl_langinfo (CODESET)]) -AC_MSG_CHECKING([for nl_langinfo (CODESET)]) -AC_TRY_COMPILE([#include -#include ], -[char *codeset = nl_langinfo(CODESET); setlocale(LC_CTYPE, "");], - AC_DEFINE(HAVE_CODESET) - have_codeset=yes, - have_codeset=no) -AC_MSG_RESULT($have_codeset) - - -# ********* fribidi -AC_ARG_ENABLE(bidi, - AS_HELP_STRING([--disable-bidi],[disable bi-directional text support]), - [ if test x"$enableval" = xyes; then - with_bidi="yes, check" - else - with_bidi="no" - problem_bidi=": Explicitly disabled" - fi ], - [ with_bidi="not specified, check" ] -) - -fribidi_min_version=0.19.2 -if test ! x"$with_bidi" = xno; then - AC_ARG_WITH(fribidi-bindir, - AS_HELP_STRING([--with-fribidi-bindir=DIR], - [directory of fribidi-config if not in PATH]), - FRIBIDI_BINDIR="$withval", FRIBIDI_BINDIR=".") - if test ! x"$PKG_CONFIG" = x && $PKG_CONFIG --exists "fribidi >= $fribidi_min_version"; then - FRIBIDI_CONFIG="$PKG_CONFIG fribidi" - else - AC_PATH_PROG(FRIBIDI_CONFIG, fribidi-config,, [$FRIBIDI_BINDIR:$PATH]) - fi - - if test x"$FRIBIDI_CONFIG" = x; then - with_bidi=no - problem_bidi=": pkgconfig fribidi: fribidi version >= $fribidi_min_version needed." - else - Bidi_CFLAGS=`$FRIBIDI_CONFIG --cflags` - Bidi_LIBS=`$FRIBIDI_CONFIG --libs` - AC_CHECK_LIB(fribidi, fribidi_log2vis, - with_bidi=yes; problem_bidi=, - with_bidi=no; problem_bidi=": No good libs via $FRIBIDI_CONFIG", - [$Bidi_LIBS $Bidi_CFLAGS]) - fi -fi - -if test ! x"$with_bidi" = xno; then - fribidi_in_path=yes - ac_save_LIBS="$LIBS" - LIBS="$LIBS $Bidi_LIBS" - AC_TRY_RUN([#include -#include -int main() -{ - FriBidiChar *logical_unicode_str = - (FriBidiChar *)malloc((4 + 1) * sizeof(FriBidiChar)); - fribidi_charset_to_unicode( - fribidi_parse_charset("iso8859-8"), "test", 4, - logical_unicode_str); - return 0; -} -], [:], [fribidi_in_path=no]) - LIBS="$ac_save_LIBS" - if test ! x"$fribidi_in_path" = xyes; then - ac_save_CFLAGS="$CFLAGS" - ac_save_LIBS="$LIBS" - CFLAGS="$CFLAGS $Bidi_CFLAGS" - LIBS="$LIBS $Bidi_LIBS" - AC_TRY_RUN([#include -#include -int main() -{ - FriBidiChar *logical_unicode_str = - (FriBidiChar *)malloc((4 + 1) * sizeof(FriBidiChar)); - fribidi_charset_to_unicode( - fribidi_parse_charset("iso8859-8"), "test", 4, - logical_unicode_str); - return 0; -} -], [:], [with_bidi=no; problem_bidi=": Bad fribidi version, see config.log"]) - CFLAGS="$ac_save_CFLAGS" - LIBS="$ac_save_LIBS" - fi - if test ! x"$fribidi_in_path" = xno; then - Bidi_CFLAGS= - Bidi_LIBS=-lfribidi - fi -fi - -AH_TEMPLATE([HAVE_BIDI],[Define if fribidi library is used.]) -AH_TEMPLATE([FRIBIDI_CHARSET_SPELLING], - [Support fribidi-0.10.4 and older with "CHARSET" spelling.]) -if test x"$with_bidi" = xno; then - Bidi_CFLAGS= - Bidi_LIBS= -else - AC_DEFINE(HAVE_BIDI) - AC_TRY_RUN([#include - int main(int c, char **v) { - return FRIBIDI_CHARSET_NOT_FOUND * 0; - } - ], [AC_DEFINE(FRIBIDI_CHARSET_SPELLING)]) -fi -AH_VERBATIM([_FRIBIDI_CHARSET_SPELLING], -[#ifdef FRIBIDI_CHARSET_SPELLING -# define FRIBIDI_CHAR_SET_NOT_FOUND FRIBIDI_CHARSET_NOT_FOUND -#endif]) - -AC_SUBST(Bidi_LIBS) -AC_SUBST(Bidi_CFLAGS) - - -# ********* perllib -with_perllib="yes" -problem_perllib="" -FVWM_PERLLIB=perllib -AC_ARG_ENABLE(perllib, - AS_HELP_STRING([--disable-perllib],[disable installing fvwm perl library]), - [ if test x"$enableval" = xno; then - with_perllib="no" - problem_perllib=": Explicitly disabled" - FVWM_PERLLIB="" - fi ], -) -AC_SUBST(FVWM_PERLLIB) - -# ******* gettext -ALL_LINGUAS="ar da de es fr ru sv_SE zh_CN zh_TW" -FVWM_DOMAIN="fvwm3" -ALL_DOMAINS="$FVWM_DOMAIN" - -AC_SUBST(ALL_LINGUAS) -AC_SUBST(FVWM_DOMAIN) -AC_SUBST(ALL_DOMAINS) - -LOCALEDIR="$FVWM_DATADIR/locale" -with_gettext="yes" -problem_gettext="" - -AC_ARG_ENABLE(nls, - AS_HELP_STRING([--disable-nls],[do not use Native Language Support]), - [ if test x"$enableval" = xno; then - with_gettext="no" - problem_gettext=": Explicitly disabled" - fi ], -) - -AH_TEMPLATE([HAVE_NLS], - [Define to 1 if translation of program messages to the user's native - language is requested.]) -if test ! x"$with_gettext" = xno; then - AM_GNU_FGETTEXT - if test x"$USE_NLS" = "xyes"; then - AC_DEFINE(HAVE_NLS, 1) - else - with_gettext="no" - problem_gettext=": Failed to detected GNU gettext" - fi -else - USE_NLS=no -fi - -# libs and build -AC_SUBST(intl_LIBS) -AC_SUBST(intl_CFLAGS) -AC_SUBST(USE_NLS) -AC_SUBST(POSUB) -AC_SUBST(LOCALEDIR) -AC_SUBST(MKINSTALLDIRS) -# programs for devel -AC_SUBST(XGETTEXT) -AC_SUBST(GMSGFMT) -AC_SUBST(MSGMERGE) -AC_SUBST(MSGFMT) -AC_SUBST(MSGUNIQ) -#catalogs -AC_SUBST(INST_LINGUAS) -AC_SUBST(CATALOGS) -AC_SUBST(POFILES) -AC_SUBST(GMOFILES) -AC_SUBST(UPDATEPOFILES) -AC_SUBST(DUMMYPOFILES) -AC_SUBST(CATOBJEXT) - -# Check for REQUIRED headers and functions before going any -# further. - -# The module interface uses variadic functions for message passing. -AC_CHECK_HEADERS(stdarg.h) -AC_CHECK_FUNCS(vfprintf) -if test x$ac_cv_header_stdarg_h = xno -o \ - $ac_cv_func_vfprintf = no; then - AC_MSG_ERROR([stdarg.h and vfprintf required]) -fi - -# For reaping children, fvwm needs either waitpid() or wait3() -# Some extra modules may need wait4() too -AC_CHECK_FUNCS(waitpid) -if test x$ac_cv_func_waitpid = xno; then - AC_CHECK_FUNCS(wait3 wait4) - if test x$ac_cv_func_wait3 = xno; then - AC_MSG_ERROR([Either waitpid or wait3 function is required]) - fi -fi - -# C89/C99 signal handling -AC_CHECK_FUNCS(sigsetjmp siglongjmp) - -# Finish checking for programs. -AC_PROG_INSTALL -AC_PROG_LN_S -AC_PROG_MAKE_SET -AC_PROG_RANLIB -dnl lex+yacc now only needed for FvwmScript developers when syntax is changed -dnl AM_PROG_LEX -dnl AC_PROG_YACC - -# Checks for header files. -AC_HEADER_STDC -AC_HEADER_SYS_WAIT -AC_CHECK_HEADERS(stdlib.h fcntl.h limits.h malloc.h string.h memory.h unistd.h) -AC_CHECK_HEADERS(stdint.h inttypes.h) -AC_CHECK_HEADERS(getopt.h sys/select.h sys/systeminfo.h sys/time.h) - -# Checks for typedefs, structures, and compiler characteristics. -AC_C_CONST -AC_C_INLINE -AC_TYPE_OFF_T -AC_TYPE_PID_T -AC_TYPE_SIZE_T -AC_HEADER_TIME -dnl AC_STRUCT_TM -AC_TYPE_SIGNAL -AC_TYPE_INT16_T -AC_TYPE_UINT16_T - -# Checks for library functions. -AC_FUNC_STRFTIME -AC_FUNC_SETPGRP -AC_CHECK_FUNCS(gettimeofday mkfifo putenv setvbuf socket waitpid) -AC_CHECK_FUNCS(strdup strstr strtol memmove memcpy strchr sysconf uname div) -AC_CHECK_FUNCS(sigaction siginterrupt getpwuid) -AC_CHECK_FUNCS(setpgrp setpgid) -AC_CHECK_FUNCS(lstat) - - - -pds_CHECK_TYPE(sig_atomic_t, int, [#include ], [Specify a type for sig_atomic_t if it's not available.]) - -if test x$ac_cv_func_setvbuf = xyes; then - AC_FUNC_SETVBUF_REVERSED -fi - -AC_FUNC_SELECT -if test ! x"$ac_cv_func_select" = xyes; then - AC_MSG_ERROR([select required]) -fi - -# check for mkstemp, see the discution on this subject on the fvwm workers -# list (2001-02-16 and 2001-02-24) -AM_SAFETY_CHECK_MKSTEMP - -# Define some compatibility macros needed for config.h. -mg_DEFINE_IF_NOT([#include ], - [defined XK_Page_Up && defined XK_Page_Down], - [COMPAT_OLD_KEYSYMDEF], [$X_CFLAGS], - [Old AIX systems (3.2.5) don't define some common keysyms.]) -AH_VERBATIM([_COMPAT_OLD_KEYSYMDEF], -[#ifdef COMPAT_OLD_KEYSYMDEF -# define XK_Page_Up XK_Prior -# define XK_Page_Down XK_Next -#endif]) - - -# some explicit definitions for config.h file -AH_VERBATIM([_ZEND_EXPLICIT_DEFINITIONS], -[ -/** - * The next few defines are options that are only changed from their values - * shown here on systems that _don't_ use the configure script. - **/ - -/* Define if the X11 ConnectionNumber is actually a file descriptor. */ -#define HAVE_X11_FD 1 - -/* Define if fork() has unix semantics. On VMS, no child process is created - until after a successful exec(). */ -#define FORK_CREATES_CHILD 1 - -/* Suffix for executable filenames; NULL if no extension needed. */ -#define EXECUTABLE_EXTENSION NULL - -/* Define to remove the extension from executable pathnames before calling - exec(). */ -#undef REMOVE_EXECUTABLE_EXTENSION - -/* Enables the "MiniIcon" Style option to specify a small pixmap which - * can be used as one of the title-bar buttons, shown in window list, - * utilized by modules, etc. Requires PIXMAP_BUTTONS to be defined - * (see below). */ -/* #undef MINI_ICONS */ -/* NOTE: hard coded to 1 */ -#if 1 -#define FMiniIconsSupported 1 -#else -#define FMiniIconsSupported 0 -#endif - -#if RETSIGTYPE != void -#define SIGNAL_RETURN return 0 -#else -#define SIGNAL_RETURN return -#endif - -/* Allow GCC extensions to work, if you have GCC. */ -#ifndef __attribute__ -/* This feature is available in gcc versions 2.5 and later. */ -# if __GNUC__ < 2 || (__GNUC__ == 2 && __GNUC_MINOR__ < 5) || __STRICT_ANSI__ -# define __attribute__(x) -# endif -/* The __-protected variants of `format' and `printf' attributes - * are accepted by gcc versions 2.6.4 (effectively 2.7) and later. */ -# if __GNUC__ < 2 || (__GNUC__ == 2 && __GNUC_MINOR__ < 7) -# define __format__ format -# define __printf__ printf -# endif -#endif - -#ifdef HAVE_STRING_H -# include -#endif -#ifdef HAVE_STRINGS_H -# include -#endif -#ifdef HAVE_MEMORY_H -# include -#endif -#ifdef HAVE_STDLIB_H -# include -#endif - -#if defined (HAVE_MALLOC_H) && !defined (__FreeBSD__) && !defined (__OpenBSD__) && !defined(__NetBSD__) -# include -#endif -#ifdef HAVE_FCNTL_H -# include -#endif -#ifndef HAVE_STRCHR -# define strchr(_s,_c) index((_s),(_c)) -# define strrchr(_s,_c) rindex((_s),(_c)) -#endif - -#ifndef HAVE_MEMCPY -# define memcpy(_d,_s,_l) bcopy((_s),(_d),(_l)) -#endif -#ifndef HAVE_MEMMOVE -# define memmove(_d,_s,_l) bcopy((_s),(_d),(_l)) -#endif - -#if HAVE_SYS_TYPES_H -# include -#endif - -#if HAVE_UNISTD_H -# include -#endif - -#ifndef min -# define min(a,b) (((a)<(b)) ? (a) : (b)) -#endif -#ifndef max -# define max(a,b) (((a)>(b)) ? (a) : (b)) -#endif -#ifndef abs -# define abs(a) (((a)>=0)?(a):-(a)) -#endif - -#include "libs/defaults.h" - -#ifndef O_NOFOLLOW -#define O_NOFOLLOW 0 -#endif - -#ifdef HAVE_LSTAT -#define DO_USE_LSTAT 1 -#define fvwm_lstat(x,y) lstat(x,y) -#else -#define DO_USE_LSTAT 0 -#define fvwm_lstat(x,y) -1 -#endif - -/* A macro that touches a variable in a compiler independent way to suppress - * warnings. */ -#define SUPPRESS_UNUSED_VAR_WARNING(x) \ -do { void *p; p = (void *)&x; (void)p; } while (0); - -#ifdef HOST_MACOS -#undef HAVE_STRLCAT -#undef HAVE_STRLCPY -#else -#ifndef HAVE_STRLCAT -# include "libs/strlcat.h" -#endif - -#ifndef HAVE_STRLCPY -# include "libs/strlcpy.h" -#endif -#endif - -#ifndef HAVE_ASPRINTF -int asprintf(char **, const char *, ...); -int vasprintf(char **, const char *, va_list); -#endif - -#include "libs/log.h" -]) - -dnl with autoconf <2.60 this is needed -AC_SUBST(datarootdir) -AC_SUBST(docdir) - -AC_OUTPUT( - Makefile - libs/Makefile - fvwm/Makefile - modules/Makefile -dnl -dnl bin/fvwm-menu-directory.1 -dnl bin/fvwm-menu-xlock.1 -dnl bin/fvwm-perllib.1 -dnl - bin/Makefile - bin/FvwmCommand - bin/FvwmPrompt/Makefile - bin/fvwm-perllib - bin/fvwm-menu-xlock - bin/fvwm-menu-directory - bin/fvwm-menu-desktop - bin/fvwm-convert-2.6 -dnl - utils/Makefile - perllib/Makefile - perllib/General/Makefile - perllib/FVWM/Makefile - perllib/FVWM/Module/Makefile - perllib/FVWM/Tracker/Makefile - perllib/FVWM/Module.pm - default-config/Makefile - doc/Makefile - po/Makefile -dnl - modules/FvwmAnimate/Makefile - modules/FvwmAuto/Makefile - modules/FvwmBacker/Makefile - modules/FvwmButtons/Makefile - modules/FvwmConsole/Makefile - modules/FvwmEvent/Makefile - modules/FvwmForm/Makefile - modules/FvwmIconMan/Makefile - modules/FvwmIdent/Makefile - modules/FvwmMFL/Makefile - modules/FvwmPager/Makefile - modules/FvwmPerl/Makefile - modules/FvwmPerl/FvwmPerl - modules/FvwmRearrange/Makefile - modules/FvwmScript/Makefile - modules/FvwmScript/Scripts/Makefile - modules/FvwmScript/Widgets/Makefile -) - -# --------------------------------------------------------------------------- -# Original config.status is patched to make generated scripts executable. -sed 's/> $ac_file/> $ac_file; test x"`head -1 $ac_file | cut -c1-2`" = x"#!" \&\& chmod a+rx $ac_file/' config.status-t && \ -mv config.status-t config.status -chmod +x config.status -# --------------------------------------------------------------------------- - -# --------------------------------------------------------------------------- -cat >config.status-t <>config.status-t && \ -mv config.status-t config.status -chmod +x config.status -# --------------------------------------------------------------------------- - -eval my_bindir="`eval echo ${bindir}`" -eval my_mandir="`eval echo ${mandir}`" -eval my_moddir="`eval echo ${FVWM_MODULEDIR}`"; eval my_moddir="$my_moddir" -eval my_datdir="`eval echo ${FVWM_DATADIR}`" -eval my_docdir="`eval echo ${FVWM_DOCDIR}`" -eval my_plldir="`eval echo ${FVWM_PERLLIBDIR}`" -test x"$FVWM_PERLLIB" = x && my_plldir="(Not installed) $my_plldir" -eval my_localedir="`eval echo ${LOCALEDIR}`" -test x"$USE_NLS" = xno && my_localedir="(Not installed) $my_localdir" - -echo " -Fvwm3 Configuration: - - Version: $VERSION ($VERSIONINFO) - - Executables: $my_bindir - Man pages: $my_mandir - Modules: $my_moddir - Data files: $my_datdir - HTML docs: $my_docdir - Perl lib: $my_plldir - Locale msg: $my_localedir $INST_LINGUAS - - With Asian bi-direct. text support? $with_bidi$problem_bidi - With Gettext Native Lang support? $with_gettext$problem_gettext - With Iconv support? $with_iconv_type$problem_iconv - With ReadLine sup. in FvwmConsole? $with_readline$problem_readline - With Shaped window support? $with_shape$problem_shape - With Shared memory for XImage? $with_shm$problem_shm - With Session Management support? $with_sm$problem_sm - With SVG image support? $with_rsvg$problem_rsvg - With Xcursor support? $with_xcursor$problem_xcursor - With Xft anti-alias font support? $with_xft$problem_xft - With XPM image support? $with_xpm$problem_xpm - With Xrender image support? $with_xrender$problem_xrender - With Golang support? $with_golang$problem_golang - Build man pages? $with_mandoc$problem_mandoc - Build html man pages? $with_htmldoc$problem_htmldoc - -" diff --git a/default-config/Makefile.am b/default-config/Makefile.am deleted file mode 100644 index 02da915a6..000000000 --- a/default-config/Makefile.am +++ /dev/null @@ -1,29 +0,0 @@ -## Process this file with automake to create Makefile.in - -configdir = @FVWM_DATADIR@/default-config -inst_location = $(DESTDIR)@FVWM_DATADIR@ -config_DATA = config \ - stalonetrayrc \ - FvwmScript-DateTime \ - FvwmScript-ConfirmQuit \ - FvwmScript-ConfirmCopyConfig - -EXTRA_DIST = images \ - config \ - stalonetrayrc \ - FvwmScript-DateTime \ - FvwmScript-ConfirmQuit \ - FvwmScript-ConfirmCopyConfig \ - meson.build - -install-data-hook: - cp -r $(srcdir)/images $(inst_location)/default-config - ln -sf default-config/FvwmScript-DateTime $(inst_location) - ln -sf default-config/FvwmScript-ConfirmQuit $(inst_location) - ln -sf default-config/FvwmScript-ConfirmCopyConfig $(inst_location) - -uninstall-hook: - rm -fr $(DESTDIR)/$(configdir) - rm -f $(inst_location)/FvwmScript-DateTime - rm -f $(inst_location)/FvwmScript-ConfirmQuit - rm -f $(inst_location)/FvwmScript-ConfirmCopyConfig diff --git a/dev-docs/DEVELOPERS.md b/dev-docs/DEVELOPERS.md index a82b5cbe1..672b17714 100644 --- a/dev-docs/DEVELOPERS.md +++ b/dev-docs/DEVELOPERS.md @@ -147,8 +147,7 @@ New Code Files #include "config.h" ``` -as the first non-comment line. Otherwise the settings made by the configure -script may not be used. This can cause random problems. +as the first non-comment line. File Names ---------- @@ -175,49 +174,7 @@ Maintaining Man Pages Creating a release ================== -Make sure you have all optional libraries installed. - -**NOTE: as `main` is a protected branch, changes made to files during the -release phase must be done on a separate branch, and not on main directly, -as pushes to this branch are not allowed until checks have been done on it. -This means the end result of the release-phase must have these changes issued -as a pull-request against `main`.** - -0. `git checkout main && git pull && git checkout -b release/x.y.z` - **Where: `x.y.z` will be the next release**. -1. Change the dates in configure.ac and fill in the release dates. -2. Set `ISRELEASED` to `"yes"`. -3. Change `utils/fvwm-version-str.sh` and include the appropriate version - string. -4. Commit the results. -5. Run: `./autogen.sh && make clean` to get the tree into a clean - slate. Because this is a release, the source needs compiling. To do - that, run: - - ``` - make CFLAGS="-g -O2 -Wall -Wpointer-arith -fno-strict-aliasing -Werror" - ``` - - Fix all warnings and problems, commit the changes and repeat the previous - command until no more warnings occur. -6. Tag the release: `git tag -a x.y.z` -- where `x.y.z` represents the - appropriate version number for the release. -7. Build and test the release tarballs: - - Run: `make dist` - - If that succeeds, check for `fvwm-x.y.z.tar.gz` in the current working - directory. This is the release tarball which will be uploaded to Github. - Unpack it to a temporary directory and build it; check the version as well, - via: `./fvwm --version`. -8. Push the tag out: `git push origin x.y.z` -- where `x.y.z` is the specific - tag created in step 6. -9. Set `ISRELEASED` to `"no"` in configure.ac and commit and push that out. -10. Issue a PR (pull-request) against `main` and merge that in assuming all - checks pass. If not, fix the problems, and repeat this step. -11. Upload the `fvwm-x.y.z.tar.gz` tarball to Github against the tag just - pushed. -12. Update the fvwm web site (see below) +Use Github Actions. Updating fvwm-web ================= diff --git a/dev-docs/INSTALL.md b/dev-docs/INSTALL.md index 41c0caccf..25b4cddb9 100644 --- a/dev-docs/INSTALL.md +++ b/dev-docs/INSTALL.md @@ -1,8 +1,7 @@ Installation Instructions ========================= -FVWM3 prefers `meson` as its build tool chain, but provides `autotools` as a -legacy fallback on older systems. +FVWM3 uses `meson` as its build tooling. Dependencies ============ @@ -63,44 +62,13 @@ To generate `fvwm3`'s documentation: 3. To generate HTML docs: pass `-Dhtmldoc=true` to `meson` -Installing From Git +Installing From Git or a Release Tarball =================== -## Build Systems - -`fvwm3` has traditionally been using autotools. However, this is now -deprecated in favour of `meson`. It is suggested that all systems which -support `meson` use this instead as it is now the preferred build system to -use. - -The `autotools` build system remains to provide legacy support but is not -going to see any updates to it. - -### Autotools - -``` -./autogen.sh && ./configure && make && sudo make install -``` - -### Meson - -``` -meson setup build && ninja -C build && ninja -C build install -``` - -Installing From Release Tarball -=============================== - -## Autotools - -Release tarballs will come bundled with `./configure` already, hence: - -``` -./configure && make && sudo make install -``` - -## Meson +Compiling `fvwm3` with meson involves the following command. Note that this +is an example; the setup command can be passed various options, see the +`meson.options` file. ``` -meson setup build && ninja -C build && meson install -C build +meson setup build && meson compile -C build && meson install -C build ``` diff --git a/doc/Makefile.am b/doc/Makefile.am deleted file mode 100644 index 2f2e9ce33..000000000 --- a/doc/Makefile.am +++ /dev/null @@ -1,69 +0,0 @@ -docdir = @FVWM_DOCDIR@ -MODULE_ADOC_SRCS = \ - fvwm3.adoc \ - fvwm3all.adoc \ - fvwm3commands.adoc \ - fvwm3_manpage_source.adoc \ - fvwm3menus.adoc \ - fvwm3styles.adoc \ - $(wildcard Fvwm*.adoc) \ - $(wildcard fvwm-*.adoc) - -# If building FvwmPrompt, don't generate the manpage for FvwmConsole as that -# won't ever be installed, otherwise don't generate FvwmPrompt manpage. -if FVWM_BUILD_GOLANG -MODULE_ADOC = $(filter-out FvwmConsole.adoc, $(MODULE_ADOC_SRCS)) -REMOVE_LINK = FvwmConsole.adoc -else -MODULE_ADOC = $(filter-out FvwmPrompt.adoc, $(MODULE_ADOC_SRCS)) -REMOVE_LINK = FvwmPrompt.adoc -endif - -EXTRA_DIST = $(MODULE_ADOC_SRCS) meson.build index.adoc.in - -nothing: - -clean: - rm -f *.1 *.ad *.html index.adoc - -distclean-local: clean - -if FVWM_BUILD_DOC -M1M = $(filter-out fvwm3_manpage_source.adoc, $(MODULE_ADOC)) -if FVWM_BUILD_MANDOC -man1_MANS = $(patsubst %.adoc,%.1, $(M1M)) -endif -if FVWM_BUILD_HTMLDOC -html_MANS = index.html $(patsubst %.adoc,%.html, $(M1M)) -doc_DATA = $(html_MANS) -endif - -EXTRACT_SECTIONS = \ - commands \ - menus \ - styles -SECTION_FILES = $(patsubst %,fvwm3_%.ad, $(EXTRACT_SECTIONS)) - -all: docs -docs: $(man1_MANS) $(html_MANS) -$(man1_MANS): $(SECTION_FILES) -$(html_MANS): $(SECTION_FILES) - -%.ad: fvwm3_manpage_source.adoc - SECTION=$(patsubst fvwm3_%.ad,%,$@); \ - cat "$<" | \ - "$(GREP)" -A 1000000 -- "^// BEGIN '$$SECTION'" | \ - "$(GREP)" -B 1000000 -- "^// END '$$SECTION'" | \ - "$(GREP)" -v "^// .* '$$SECTION'" > "$@" - -%.1: %.adoc - "$(ASCIIDOC)" -b manpage -a "$(patsubst %.1,%,$@)" "$<" -o "$@" - -index.html: - "$(SED)" '/$(REMOVE_LINK)/d' index.adoc.in > index.adoc; \ - "$(ASCIIDOC)" -b html5 -a toc -a webfonts! -a index index.adoc -o index.html - -%.html: %.adoc - "$(ASCIIDOC)" -b html5 -a toc -a webfonts! -a "$(patsubst %.html,%,$@)" "$<" -o "$@" - -endif diff --git a/fvwm/Makefile.am b/fvwm/Makefile.am deleted file mode 100644 index e3742ec80..000000000 --- a/fvwm/Makefile.am +++ /dev/null @@ -1,52 +0,0 @@ -## Process this file with automake to create Makefile.in - -configdir = @FVWM_DATADIR@ -bin_PROGRAMS = fvwm3 - -EXTRA_DIST = $(config_DATA) meson.build - -config_DATA = ConfigFvwmDefaults - -## please keep .c file in largest first order to speed up parallel makes -fvwm3_SOURCES = \ - add_window.h bindings.h borders.h builtins.h colormaps.h colorset.h \ - commands.h conditional.h condrc.h cursor.h decorations.h events.h \ - eventhandler.h eventmask.h ewmh.h ewmh_intern.h expand.h externs.h \ - focus.h functable.h functions.h fvwm.h geometry.h focus_policy.h \ - icccm2.h icons.h menubindings.h menudim.h menugeometry.h \ - menuitem.h menuroot.h menuparameters.h menus.h menustyle.h misc.h \ - modconf.h module_interface.h module_list.h move_resize.h \ - placement.h read.h execcontext.h schedule.h screen.h \ - session.h stack.h style.h update.h virtual.h window_flags.h frame.h \ - infostore.h \ - cmdparser.h cmdparser_hooks.h cmdparser_old.h functable_complex.h \ - \ - menus.c style.c borders.c events.c move_resize.c builtins.c \ - add_window.c icons.c fvwm3.c frame.c placement.c virtual.c \ - menustyle.c conditional.c ewmh.c stack.c session.c colorset.c \ - functions.c ewmh_events.c geometry.c module_list.c focus.c \ - windowlist.c functable.c menuitem.c expand.c module_interface.c \ - menubindings.c decorations.c ewmh_icons.c update.c bindings.c misc.c \ - cursor.c colormaps.c modconf.c ewmh_conf.c read.c schedule.c \ - menucmd.c ewmh_names.c icccm2.c windowshade.c focus_policy.c \ - execcontext.c menugeometry.c menudim.c condrc.c infostore.c \ - cmdparser_old.c functable_complex.c - -fvwm3_DEPENDENCIES = $(top_builddir)/libs/libfvwm3.a - -LDADD = \ - -L$(top_builddir)/libs -lfvwm3 $(Xft_LIBS) $(X_LIBS) $(xpm_LIBS) \ - $(X_PRE_LIBS) -lXext -lX11 \ - $(X_EXTRA_LIBS) -lm $(iconv_LIBS) $(Xrender_LIBS) $(Xcursor_LIBS) \ - $(Bidi_LIBS) $(png_LIBS) $(rsvg_LIBS) $(intl_LIBS) $(XRandR_LIBS) - -AM_CPPFLAGS = \ - -I$(top_srcdir) $(Xft_CFLAGS) \ - $(xpm_CFLAGS) $(X_CFLAGS) $(iconv_CFLAGS) $(Xrender_CFLAGS) \ - $(Bidi_CFLAGS) $(png_CFLAGS) $(rsvg_CFLAGS) $(intl_CFLAGS) - -AM_CFLAGS = \ - -DFVWM_MODULEDIR=\"$(FVWM_MODULEDIR)\" \ - -DFVWM_DATADIR=\"$(FVWM_DATADIR)\" \ - -DFVWM_CONFDIR=\"$(FVWM_CONFDIR)\" \ - -DLOCALEDIR=\"$(LOCALEDIR)\" diff --git a/libs/Makefile.am b/libs/Makefile.am deleted file mode 100644 index 848fa3fdd..000000000 --- a/libs/Makefile.am +++ /dev/null @@ -1,45 +0,0 @@ -## Process this file with automake to create Makefile.in - -noinst_LIBRARIES = libfvwm3.a - -EXTRA_DIST=meson.build - -## please keep .c files in largest first order to speed up parallel makes -libfvwm3_a_SOURCES = \ - BidiJoin.h Bindings.h ClientMsg.h ColorUtils.h Colorset.h \ - CombineChars.h Cursor.h Event.h FBidi.h FEvent.h FGettext.h FImage.h \ - FRender.h FRenderInit.h FRenderInterface.h FSMlib.h FScreen.h \ - FShape.h FShm.h FTips.h Fcursor.h FftInterface.h Ficonv.h \ - Flocale.h FlocaleCharset.h Fpng.h Fsvg.h Fxpm.h Grab.h \ - Graphics.h Module.h Parse.h Picture.h PictureBase.h \ - PictureDitherMatrice.h PictureGraphics.h PictureImageLoader.h \ - PictureUtils.h Rectangles.h Strings.h System.h Target.h WinMagic.h \ - XError.h XResource.h charmap.h defaults.h envvar.h fio.h flist.h fqueue.h \ - fsm.h ftime.h fvwm_sys_stat.h fvwm_x11.h fvwmlib.h fvwmrect.h fvwmsignal.h \ - gravity.c gravity.h getpwuid.h lang-strings.h log.h modifiers.h queue.h \ - safemalloc.h setpgrp.h timeout.h vpacket.h wcontext.h wild.h \ - cJSON.h tree.h strtonum.h \ - \ - BidiJoin.c Flocale.c PictureUtils.c FScreen.c Graphics.c \ - PictureGraphics.c Bindings.c FlocaleCharset.c Parse.c \ - PictureImageLoader.c Colorset.c ColorUtils.c CombineChars.c Module.c \ - FRender.c Ficonv.c envvar.c Fft.c gravity.c log.c \ - XResource.c FEvent.c FImage.c WinMagic.c Target.c Picture.c XError.c \ - fqueue.c fvwmsignal.c System.c PictureBase.c Cursor.c Strings.c \ - fvwmrect.c FRenderInit.c safemalloc.c FBidi.c \ - wild.c Grab.c Event.c ClientMsg.c setpgrp.c FShape.c \ - FGettext.c Rectangles.c timeout.c flist.c charmap.c wcontext.c \ - modifiers.c fsm.c FTips.c fio.c fvwmlib3.c \ - getpwuid.c cJSON.c strtonum.c - -if HOST_MACOS -foo= -else -libfvwm3_a_SOURCES += strlcpy.h strlcat.h strlcpy.c strlcat.c -endif - -libfvwm3_a_LIBADD = @LIBOBJS@ - -AM_CPPFLAGS = -I$(top_srcdir) $(xpm_CFLAGS) $(Xft_CFLAGS) $(X_CFLAGS) \ - $(iconv_CFLAGS) $(Xrender_CFLAGS) $(Bidi_CFLAGS) $(png_CFLAGS) \ - $(rsvg_CFLAGS) $(intl_CFLAGS) $(XRandR_CFLAGS) diff --git a/meson-scripts/dist-tarball.sh b/meson-scripts/dist-tarball.sh index d4ed42c4c..877cdb5bb 100755 --- a/meson-scripts/dist-tarball.sh +++ b/meson-scripts/dist-tarball.sh @@ -6,7 +6,6 @@ # TODO: ".*" as a glob might be too much in the future; expand this out... FILES_TO_IGNORE=".* -mkrelease.sh dev-docs" ( diff --git a/mkrelease.sh b/mkrelease.sh deleted file mode 100755 index bcf151729..000000000 --- a/mkrelease.sh +++ /dev/null @@ -1,64 +0,0 @@ -#!/bin/bash - -set -xv - -# mkrelease -- script to help ease the burden of creating a fvwm3 release. -# -# Originally published December 2020. Released under the same licence as -# fvwm3 itself. - -function die() -{ - echo "$@" >&2 - exit 1 -} - -[ -z "$1" ] && die "No version given" -next_version="$1" - -current_ver="$(git describe --tags --abbrev=0)" -current_tag="$(git describe --tags --abbrev=0)" -pre_tag="${current_tag%.*}" -current_tag="${current_tag##*.}" - -next_release_branch="release/$next_version" - -echo "*** updating configure.ac:" -echo "*** new version ($next_version)..." -sed -i -e "/AC_INIT/ s/$current_ver/$next_version/" configure.ac || \ - die "Unable to update configure.ac to next version" - -echo "*** released to yes" -sed -i -e 's/ISRELEASED="no"/ISRELEASED="yes"/' configure.ac || \ - die "Unable to update configure.ac to released" - -echo "*** updating release dates" -reldatelong="$(date -d "now" +"%e %B %y")" -reldateshort="$(date -d "now" +"%d-%b-%y")" -reldatenum="$(date -d "now" +"%y-%m-%d")" - -sed -i -e "/^RELDATELONG=/cRELDATELONG=\"$reldatelong\"" configure.ac -sed -i -e "/^RELDATESHORT=/cRELDATESHORT=\"$reldateshort\"" configure.ac -sed -i -e "/^RELDATENUM=/cRELDATENUM=\"$reldatenum\"" configure.ac - -exit - -echo -echo "*** generating release tarball" -make dist || die "Couldn't generate dist tarball" - -echo "*** test compiling release tarball" -cp ./fvwm3-${next_version}.tar.gz /tmp && { - (cd /tmp && { - tar xzf ./fvwm3-${next_version}.tar.gz && \ - (cd fvwm3-${next_version} && \ - ./configure --enable-mandoc &>/dev/null && \ - make -j$(nproc) &>/dev/null || \ - die "Unable to compile fvwm3 dist") - }) -} -fvwm3_ver="$(/tmp/fvwm3-$next_version/fvwm/fvwm3 --version | head -n 1)" -[ -z "$fvwm3_ver" ] && die "Couldn't determine fvwm3 version" - -echo "*** version reports as: $fvwm3_ver" -rm -fr /tmp/fvwm3-${next_version} && rm -f /tmp/fvwm3-${next_version}*.tar.gz diff --git a/modules/FvwmAnimate/Makefile.am b/modules/FvwmAnimate/Makefile.am deleted file mode 100644 index c82ab96e8..000000000 --- a/modules/FvwmAnimate/Makefile.am +++ /dev/null @@ -1,21 +0,0 @@ -## Process this file with automake to create Makefile.in - -program_transform_name = - -moduledir = @FVWM_MODULEDIR@ -module_PROGRAMS = FvwmAnimate - -EXTRA_DIST = meson.build - -FvwmAnimate_SOURCES = FvwmAnimate.c FvwmAnimate.h -FvwmAnimate_DEPENDENCIES = $(top_builddir)/libs/libfvwm3.a - -## Xpm note: while this module may not depend on Xpm explicitly, -## there are sometimes dependencies through functions in libfvwm -## so we might as well link against libXpm, if present. -LDADD = -L$(top_builddir)/libs $(X_LIBS) -lfvwm3 $(xpm_LIBS) \ - $(X_PRE_LIBS) -lXext -lX11 $(X_EXTRA_LIBS) -lm $(png_LIBS) \ - $(rsvg_LIBS) $(Xrender_LIBS) $(Xcursor_LIBS) $(freetype_LIBS) - -AM_CPPFLAGS = -I$(top_srcdir) $(xpm_CFLAGS) $(X_CFLAGS) \ - $(png_CFLAGS) $(Xrender_CFLAGS) $(freetype_CFLAGS) diff --git a/modules/FvwmAuto/Makefile.am b/modules/FvwmAuto/Makefile.am deleted file mode 100644 index 1385a6e53..000000000 --- a/modules/FvwmAuto/Makefile.am +++ /dev/null @@ -1,18 +0,0 @@ -## Process this file with automake to create Makefile.in - -program_transform_name = - -moduledir = @FVWM_MODULEDIR@ -module_PROGRAMS = FvwmAuto - -EXTRA_DIST = meson.build - -FvwmAuto_SOURCES = FvwmAuto.c -FvwmAuto_DEPENDENCIES = $(top_builddir)/libs/libfvwm3.a - -LDADD = -L$(top_builddir)/libs $(X_LIBS) -lfvwm3 \ - $(X_PRE_LIBS) -lXext -lX11 $(X_EXTRA_LIBS) $(XRandR_LIBS) \ - $(freetype_LIBS) - -AM_CPPFLAGS = -I$(top_srcdir) $(X_CFLAGS) $(freetype_CFLAGS) - diff --git a/modules/FvwmBacker/Makefile.am b/modules/FvwmBacker/Makefile.am deleted file mode 100644 index 41fd56f1c..000000000 --- a/modules/FvwmBacker/Makefile.am +++ /dev/null @@ -1,21 +0,0 @@ -## Process this file with automake to create Makefile.in - -program_transform_name = - -moduledir = @FVWM_MODULEDIR@ -configdir = @FVWM_DATADIR@ - -module_PROGRAMS = FvwmBacker - -EXTRA_DIST = ConfigFvwmBacker meson.build -config_DATA = ConfigFvwmBacker - -FvwmBacker_SOURCES = FvwmBacker.c FvwmBacker.h root_bits.c -FvwmBacker_DEPENDENCIES = $(top_builddir)/libs/libfvwm3.a - -LDADD = -L$(top_builddir)/libs $(X_LIBS) -lfvwm3 \ - $(X_PRE_LIBS) $(XRandR_LIBS) -lXext -lX11 -lm $(X_EXTRA_LIBS) \ - $(Xrender_LIBS) $(rsvg_LIBS) $(freetype_LIBS) - -AM_CPPFLAGS = -I$(top_srcdir) $(X_CFLAGS) $(Xrender_CFLAGS) $(freetype_CFLAGS) - diff --git a/modules/FvwmButtons/Makefile.am b/modules/FvwmButtons/Makefile.am deleted file mode 100644 index bb655174d..000000000 --- a/modules/FvwmButtons/Makefile.am +++ /dev/null @@ -1,30 +0,0 @@ -## Process this file with automake to create Makefile.in - -program_transform_name = - -moduledir = @FVWM_MODULEDIR@ -configdir = @FVWM_DATADIR@ - -module_PROGRAMS = FvwmButtons -EXTRA_DIST = CHANGES samplebuttonrc BUGS ConfigFvwmButtons meson.build - -config_DATA = ConfigFvwmButtons - -FvwmButtons_SOURCES = \ - FvwmButtons.c FvwmButtons.h button.c button.h draw.c draw.h \ - icons.c icons.h misc.c misc.h output.c parse.c parse.h \ - dynamic.c dynamic.h - -FvwmButtons_DEPENDENCIES = $(top_builddir)/libs/libfvwm3.a - -## Xpm note: while this module may not depend on Xpm explicitly, -## there are sometimes dependencies through functions in libfvwm -## so we might as well link against libXpm, if present. -LDADD = -L$(top_builddir)/libs -lfvwm3 $(Xft_LIBS) $(X_LIBS) $(xpm_LIBS) \ - $(X_PRE_LIBS) $(XRandR_LIBS) -lXext -lX11 -lm $(X_EXTRA_LIBS) \ - $(iconv_LIBS) $(Xrender_LIBS) $(Xcursor_LIBS) $(Bidi_LIBS) \ - $(png_LIBS) $(rsvg_LIBS) - -AM_CPPFLAGS = -I$(top_srcdir) $(xpm_CFLAGS) $(Xft_CFLAGS) $(X_CFLAGS) \ - $(iconv_CFLAGS) $(Xrender_CFLAGS) $(fribidi_CFLAGS) $(png_CFLAGS) - diff --git a/modules/FvwmConsole/Makefile.am b/modules/FvwmConsole/Makefile.am deleted file mode 100644 index cc011f829..000000000 --- a/modules/FvwmConsole/Makefile.am +++ /dev/null @@ -1,32 +0,0 @@ -## Process this file with automake to create Makefile.in -program_transform_name = - -PERL = @PERL@ -moduledir = @FVWM_MODULEDIR@ - -# If FVWM_BUILD_GOLANG has been defined via --enable-golang, then FvwmPrompt -# is preferred. In this case, disable compiling/installing FvwmConsole -- -# eventually, FvwmConsole will go away completely, but for compatibility -# reasons, remains here only under this condition. -if !FVWM_BUILD_GOLANG - -module_PROGRAMS = FvwmConsole FvwmConsoleC - -EXTRA_DIST = meson.build - -FvwmConsole_SOURCES = FvwmConsole.c FvwmConsole.h -FvwmConsoleC_SOURCES = FvwmConsoleC.c FvwmConsole.h getline.c - -FvwmConsole_DEPENDENCIES = $(top_builddir)/libs/libfvwm3.a -FvwmConsoleC_DEPENDENCIES = $(top_builddir)/libs/libfvwm3.a - -# Use X_EXTRA_LIBS to get socket(), etc. -LDADD = -L$(top_builddir)/libs -lfvwm3 $(readline_LIBS) $(freetype_LIBS) \ - $(X_EXTRA_LIBS) $(XFT_LIBS) - -# FIXME: -# Despite not using X functions explicitly, the code includes -# fvwmlib.h, which *does* include X headers and xpm.h! -AM_CPPFLAGS = -I$(top_srcdir) $(readline_CFLAGS) $(xpm_CFLAGS) \ - $(freetype_CFLAGS) $(X_CFLAGS) $(XFT_CFLAGS) -endif !FVWM_BUILD_GOLANG diff --git a/modules/FvwmEvent/Makefile.am b/modules/FvwmEvent/Makefile.am deleted file mode 100644 index fa1a95900..000000000 --- a/modules/FvwmEvent/Makefile.am +++ /dev/null @@ -1,16 +0,0 @@ -## Process this file with automake to create Makefile.in - -program_transform_name = - -moduleexecdir = @FVWM_MODULEDIR@ -moduleexec_PROGRAMS = FvwmEvent - -EXTRA_DIST = meson.build - -FvwmEvent_SOURCES = FvwmEvent.c -FvwmEvent_DEPENDENCIES = $(top_builddir)/libs/libfvwm3.a - -LDADD = -L$(top_builddir)/libs $(X_LIBS) -lfvwm3 \ - $(X_PRE_LIBS) -lXext -lX11 $(X_EXTRA_LIBS) $(freetype_LIBS) - -AM_CPPFLAGS = -I$(top_srcdir) $(X_CFLAGS) $(freetype_CFLAGS) diff --git a/modules/FvwmForm/Makefile.am b/modules/FvwmForm/Makefile.am deleted file mode 100644 index 48117c656..000000000 --- a/modules/FvwmForm/Makefile.am +++ /dev/null @@ -1,61 +0,0 @@ -## Process this file with automake to create Makefile.in - -program_transform_name = - -moduledir = @FVWM_MODULEDIR@ -configdir = @FVWM_DATADIR@ - -module_PROGRAMS = FvwmForm - -## FvwmTalk was made obsolete in March 1999. -## This provides compatibility. -module_SCRIPTS = FvwmTalk - -FvwmTalk: ../../config.h Makefile - echo "#!/bin/sh" > $@ - echo exec ${moduledir}/FvwmForm '$$@' FvwmForm-Talk>> $@ - -## NB: Neither _MANS nor _DATA are included by default in -## distributions! -EXTRA_DIST = Changes \ - FvwmForm-Form \ - FvwmForm-Capture \ - FvwmForm-Desktop \ - FvwmForm-QuitVerify \ - FvwmForm-Rlogin \ - FvwmForm-RootCursor \ - FvwmForm-Talk \ - FvwmForm-TalkHelp \ - FvwmForm-XDGOptionsHelp \ - FvwmForm-XDGMenuHelp \ - FvwmTalk-wrapper.in \ - meson.build - -FvwmForm_SOURCES = FvwmForm.c FvwmForm.h ReadXServer.c ParseCommand.c - -FvwmForm_DEPENDENCIES = $(top_builddir)/libs/libfvwm3.a - -config_DATA = \ - FvwmForm-Form \ - FvwmForm-Capture \ - FvwmForm-Desktop \ - FvwmForm-QuitVerify \ - FvwmForm-Rlogin \ - FvwmForm-RootCursor \ - FvwmForm-Talk \ - FvwmForm-TalkHelp \ - FvwmForm-XDGOptionsHelp \ - FvwmForm-XDGMenuHelp - -## Xpm note: while this module may not depend on Xpm explicitly, -## there are sometimes dependencies through functions in libfvwm -## so we might as well link against libXpm, if present. -LDADD = -L$(top_builddir)/libs -lfvwm3 $(Xft_LIBS) $(X_LIBS) \ - $(X_PRE_LIBS) $(XRandR_LIBS) -lXext -lX11 $(X_EXTRA_LIBS) \ - -lm $(Xrender_LIBS) $(rsvg_LIBS) $(iconv_LIBS) $(Bidi_LIBS) \ - $(libevent_LIBS) - -AM_CPPFLAGS = -I$(top_srcdir) $(Xft_CFLAGS) $(X_CFLAGS) $(iconv_CFLAGS) \ - $(Bidi_CFLAGS) $(Xrender_CFLAGS) $(libevent_CFLAGS) - -CLEANFILES = $(module_SCRIPTS) diff --git a/modules/FvwmIconMan/Makefile.am b/modules/FvwmIconMan/Makefile.am deleted file mode 100644 index 58c0f50c3..000000000 --- a/modules/FvwmIconMan/Makefile.am +++ /dev/null @@ -1,29 +0,0 @@ -## Process this file with automake to create Makefile.in - -program_transform_name = - -moduledir = @FVWM_MODULEDIR@ -configdir = @FVWM_DATADIR@ - -module_PROGRAMS = FvwmIconMan -EXTRA_DIST = ConfigFvwmIconMan meson.build - -config_DATA = \ - ConfigFvwmIconMan - -FvwmIconMan_SOURCES = FvwmIconMan.c FvwmIconMan.h debug.c debug.h \ - functions.c fvwm.c globals.c readconfig.c readconfig.h \ - winlist.c x.c x.h xmanager.c xmanager.h - -FvwmIconMan_DEPENDENCIES = $(top_builddir)/libs/libfvwm3.a - -## Xpm note: while this module may not depend on Xpm explicitly, -## there are sometimes dependencies through functions in libfvwm -## so we might as well link against libXpm, if present. -LDADD = -L$(top_builddir)/libs -lfvwm3 $(Xft_LIBS) $(X_LIBS) \ - $(X_PRE_LIBS) $(XRandR_LIBS) -lXext -lX11 $(X_EXTRA_LIBS) \ - $(iconv_LIBS) $(Xrender_LIBS) $(rsvg_LIBS) -lm $(Bidi_LIBS) - -AM_CPPFLAGS = -I$(top_srcdir) $(Xft_CFLAGS) $(X_CFLAGS) \ - $(iconv_CFLAGS) $(Xrender_CFLAGS) $(Bidi_CFLAGS) - diff --git a/modules/FvwmIdent/Makefile.am b/modules/FvwmIdent/Makefile.am deleted file mode 100644 index 2098c3066..000000000 --- a/modules/FvwmIdent/Makefile.am +++ /dev/null @@ -1,26 +0,0 @@ -## Process this file with automake to create Makefile.in - -program_transform_name = - -moduledir = @FVWM_MODULEDIR@ -configdir = @FVWM_DATADIR@ - -module_PROGRAMS = FvwmIdent -EXTRA_DIST = ConfigFvwmIdent meson.build - -config_DATA = \ - ConfigFvwmIdent - -FvwmIdent_SOURCES = FvwmIdent.c FvwmIdent.h -FvwmIdent_DEPENDENCIES = $(top_builddir)/libs/libfvwm3.a - -## Xpm note: while this module may not depend on Xpm explicitly, -## there are sometimes dependencies through functions in libfvwm -## so we might as well link against libXpm, if present. -LDADD = -L$(top_builddir)/libs -lfvwm3 $(Xft_LIBS) $(X_LIBS) $(xpm_LIBS) \ - $(png_LIBS) $(X_PRE_LIBS) $(XRandR_LIBS) -lXext -lX11 -lm \ - $(X_EXTRA_LIBS) $(Xrender_LIBS) $(rsvg_LIBS) $(iconv_LIBS) $(Bidi_LIBS) - -AM_CPPFLAGS = -I$(top_srcdir) $(Xft_CFLAGS) $(xpm_CFLAGS) $(png_CFLAGS) \ - $(X_CFLAGS) $(Xrender_CFLAGS) $(iconv_CFLAGS) $(Bidi_CFLAGS) - diff --git a/modules/FvwmMFL/Makefile.am b/modules/FvwmMFL/Makefile.am deleted file mode 100644 index d62783cf4..000000000 --- a/modules/FvwmMFL/Makefile.am +++ /dev/null @@ -1,32 +0,0 @@ -## Process this file with automake to create Makefile.in - -program_transform_name = - -moduledir = @FVWM_MODULEDIR@ -module_PROGRAMS = FvwmMFL -module_SCRIPTS = FvwmCommandS - -EXTRA_DIST = meson.build FvwmCommandS.in - -FvwmMFL_SOURCES = FvwmMFL.c -FvwmMFL_DEPENDENCIES = $(top_builddir)/libs/libfvwm3.a - -## FvwmCommand/FvwmCommandS was made obsolete via -## -## 7b8684385 (Deprecation of modules, 2019-04-14) -## -## However, to maintain backwards compatibility with version 2, provide a -## wrapper for FvwmCommandS to point to FvwmMFL so that there's better parity. -FvwmCommandS: Makefile - echo "#!/bin/sh" > $@ - echo 'modargs="$$1 $$2 $$3 $$4 $$5"' >> $@ - echo 'shift; shift; shift; shift; shift' >> $@ - echo exec $(moduledir)'/FvwmMFL $$modargs $$@' >> $@ - -CLEANFILES = $(module_SCRIPTS) - -LDADD = -L$(top_builddir)/libs $(X_LIBS) -lfvwm3 \ - $(X_PRE_LIBS) -lXext -lX11 $(X_EXTRA_LIBS) $(XRandR_LIBS) \ - $(libevent_LIBS) $(Xft_LIBS) - -AM_CPPFLAGS = -I$(top_srcdir) $(X_CFLAGS) $(Xft_CFLAGS) $(libevent_CFLAGS) diff --git a/modules/FvwmPager/Makefile.am b/modules/FvwmPager/Makefile.am deleted file mode 100644 index 28ac55604..000000000 --- a/modules/FvwmPager/Makefile.am +++ /dev/null @@ -1,28 +0,0 @@ -## Process this file with automake to create Makefile.in - -program_transform_name = - -moduledir = @FVWM_MODULEDIR@ -configdir = @FVWM_DATADIR@ - -module_PROGRAMS = FvwmPager -EXTRA_DIST = ConfigFvwmPager meson.build - -config_DATA = \ - ConfigFvwmPager - -FvwmPager_SOURCES = FvwmPager.c FvwmPager.h x_pager.c fpmonitor.c \ - messages.c init_pager.c x_update.c -FvwmPager_DEPENDENCIES = $(top_builddir)/libs/libfvwm3.a - -## Xpm note: while this module may not depend on Xpm explicitly, -## there are sometimes dependencies through functions in libfvwm -## so we might as well link against libXpm, if present. -LDADD = -L$(top_builddir)/libs -lfvwm3 $(Xft_LIBS) $(X_LIBS) $(xpm_LIBS) \ - $(png_LIBS) $(rsvg_LIBS) $(X_PRE_LIBS) $(XRandR_LIBS) -lXext -lX11 \ - $(X_EXTRA_LIBS) -lm $(Xrender_LIBS) $(Xcursor_LIBS) $(iconv_LIBS) \ - $(Bidi_LIBS) - -AM_CPPFLAGS = -I$(top_srcdir) $(xpm_CFLAGS) $(png_CFLAGS) $(Xft_CFLAGS) \ - $(X_CFLAGS) $(Xrender_CFLAGS) $(iconv_CFLAGS) $(Bidi_CFLAGS) - diff --git a/modules/FvwmPerl/Makefile.am b/modules/FvwmPerl/Makefile.am deleted file mode 100644 index 3fa99e243..000000000 --- a/modules/FvwmPerl/Makefile.am +++ /dev/null @@ -1,9 +0,0 @@ -## Process this file with automake to create Makefile.in - -program_transform_name = - -moduledir = @FVWM_MODULEDIR@ - -module_SCRIPTS = FvwmPerl - -EXTRA_DIST = meson.build FvwmPerl.in diff --git a/modules/FvwmRearrange/Makefile.am b/modules/FvwmRearrange/Makefile.am deleted file mode 100644 index adeb96d4f..000000000 --- a/modules/FvwmRearrange/Makefile.am +++ /dev/null @@ -1,18 +0,0 @@ -## This is a -*- Makefile -*- -## Process this file with automake to create Makefile.in - -program_transform_name = - -moduledir = @FVWM_MODULEDIR@ -module_PROGRAMS = FvwmRearrange - -EXTRA_DIST = meson.build - -FvwmRearrange_SOURCES = FvwmRearrange.c -FvwmRearrange_DEPENDENCIES = $(top_builddir)/libs/libfvwm3.a - -LDADD = -L$(top_builddir)/libs $(X_LIBS) -lm -lfvwm3 \ - $(X_PRE_LIBS) $(XRandR_LIBS) -lXext -lX11 $(X_EXTRA_LIBS) - -AM_CPPFLAGS = -I$(top_srcdir) $(Xft_CFLAGS) $(X_CFLAGS) $(XRandR_CFLAGS) - diff --git a/modules/FvwmScript/Makefile.am b/modules/FvwmScript/Makefile.am deleted file mode 100644 index 0d0541b7b..000000000 --- a/modules/FvwmScript/Makefile.am +++ /dev/null @@ -1,58 +0,0 @@ -## This is a -*- Makefile -*- -## Process this file with automake to create Makefile.in - -SUBDIRS = Scripts Widgets - -program_transform_name = - -moduledir = @FVWM_MODULEDIR@ - -module_PROGRAMS = FvwmScript - -FvwmScript_SOURCES = FvwmScript.c Instructions.c libyywrap.c \ - types.h scanner.c script.c script.h -FvwmScript_DEPENDENCIES = $(top_builddir)/libs/libfvwm3.a Widgets/libWidgets.a - -YFLAGS = -d - -EXTRA_DIST = scanner.l script.y TODO meson.build - -LDADD = Widgets/libWidgets.a -L$(top_builddir)/libs -lfvwm3 $(Xft_LIBS) \ - $(X_LIBS) $(xpm_LIBS) $(XRandR_LIBS) $(X_PRE_LIBS) -lXext -lX11 \ - $(X_EXTRA_LIBS) -lm $(Xrender_LIBS) $(Xcursor_LIBS) $(iconv_LIBS) \ - $(Bidi_LIBS) $(png_LIBS) $(rsvg_LIBS) $(intl_LIBS) - -AM_CPPFLAGS = -I$(top_srcdir) $(xpm_CFLAGS) $(Xft_CFLAGS) $(X_CFLAGS) \ - $(Xrender_CFLAGS) $(iconv_CFLAGS) $(Bidi_CFLAGS) $(png_CFLAGS) - -# Need this to get datadir into FvwmScript.c: -AM_CFLAGS = -DFVWM_DATADIR=\"$(FVWM_DATADIR)\" -DLOCALEDIR=\"$(LOCALEDIR)\" - -.PHONY: syntax - -# We don't autoconfigure lex/yacc, since these tools only needed for -# developers that want to regenerate the FvwmScript syntax. -# To override the default values use: make YACC="bison -y" syntax -LEX = flex -YACC = yacc - -syntax: - rm -f lex.yy.c y.tab.c y.tab.h script.tab.c script.tab.h || true - if $(LEX) --nounput --help 2>/dev/null > /dev/null; then \ - $(LEX) $(AM_LFLAGS) $(LFLAGS) --nounput scanner.l; \ - else \ - $(LEX) $(AM_LFLAGS) $(LFLAGS) scanner.l; \ - fi && mv lex.yy.c scanner.c - - @# detect and prefer bison; bison without -y uses file.tab.[ch] names - YACC=$(YACC); if which bison >/dev/null 2>&1; then YACC="bison -y"; fi; \ - $$YACC $(AM_YFLAGS) $(YFLAGS) script.y && mv *.tab.c script.c - - @# don't touch unmodified header to reduce rebuilds - if test -f y.tab.h -o -f script.tab.h; then \ - if cmp -s *.tab.h script.h; then \ - rm -f y.tab.h; \ - else \ - mv *.tab.h script.h; \ - fi; \ - else :; fi diff --git a/modules/FvwmScript/Scripts/Makefile.am b/modules/FvwmScript/Scripts/Makefile.am deleted file mode 100644 index 200bddbd2..000000000 --- a/modules/FvwmScript/Scripts/Makefile.am +++ /dev/null @@ -1,22 +0,0 @@ -## Process this file with automake to create Makefile.in - -configdir = @FVWM_DATADIR@ - -common_samples = \ - FvwmScript-BaseConfig FvwmScript-BellSetup FvwmScript-Buttons \ - FvwmScript-Colorset FvwmScript-Date FvwmScript-FileBrowser \ - FvwmScript-Find FvwmScript-KeyboardSetup FvwmScript-PointerSetup \ - FvwmScript-Quit FvwmScript-ScreenDump FvwmScript-ScreenSetup \ - FvwmScript-WidgetDemo fvwm-script-ComExample.pl - -config_DATA = $(common_samples) FvwmScript-ComExample - -EXTRA_DIST = $(common_samples) \ - TerminalSettings.fss UpdateFvwm2TermMenu FvwmScript-ComExample.in - -FvwmScript-ComExample: FvwmScript-ComExample.in Makefile - rm -f $@ - sed -e 's,xFVWM_DATADIRx,$(FVWM_DATADIR),' -e 's,xPERLx,$(PERL),' $(top_srcdir)/modules/FvwmScript/Scripts/FvwmScript-ComExample.in > $@-t - mv $@-t $@ - -CLEANFILES = FvwmScript-ComExample diff --git a/modules/FvwmScript/Widgets/Makefile.am b/modules/FvwmScript/Widgets/Makefile.am deleted file mode 100644 index 01cddbe51..000000000 --- a/modules/FvwmScript/Widgets/Makefile.am +++ /dev/null @@ -1,11 +0,0 @@ -## Process this file with automake to create Makefile.in - -noinst_LIBRARIES = libWidgets.a - -libWidgets_a_SOURCES = CheckBox.c HDipstick.c HScrollBar.c ItemDraw.c \ - List.c Menu.c MiniScroll.c PopupMenu.c PushButton.c \ - RadioButton.c Rectangle.c Swallow.c TextField.c Tools.c \ - Tools.h VDipstick.c VScrollBar.c Widget.c - -AM_CPPFLAGS = -I$(top_srcdir) $(xpm_CFLAGS) $(Xft_CFLAGS) $(X_CFLAGS) - diff --git a/modules/Makefile.am b/modules/Makefile.am deleted file mode 100644 index 2b3aaa729..000000000 --- a/modules/Makefile.am +++ /dev/null @@ -1,10 +0,0 @@ -## Process this file with automake to create Makefile.in - -SUBDIRS = \ - FvwmAnimate FvwmAuto FvwmBacker FvwmButtons FvwmConsole FvwmEvent \ - FvwmForm FvwmIconMan FvwmIdent FvwmPager FvwmPerl FvwmRearrange \ - FvwmScript FvwmMFL - -uninstall-hook: - -rmdir @FVWM_MODULEDIR@ - -rmdir ${pkglibexecdir} diff --git a/perllib/FVWM/Makefile.am b/perllib/FVWM/Makefile.am deleted file mode 100644 index ddd0ed505..000000000 --- a/perllib/FVWM/Makefile.am +++ /dev/null @@ -1,22 +0,0 @@ -## Process this file with automake to create Makefile.in - -SUBDIRS = Module Tracker - -configdir = @FVWM_PERLLIBDIR@/FVWM - -ORIGINAL_PMS = \ - Commands.pm Constants.pm EventNames.pm Event.pm Tracker.pm - -config_DATA = $(ORIGINAL_PMS) Module.pm - -EXTRA_DIST = $(ORIGINAL_PMS) create-commands create-constants - -_Constants.pm: Makefile.am $(top_srcdir)/libs/Module.h - cd $(top_builddir)/perllib/FVWM && \ - (fvwm_libdir=$(top_builddir)/libs ./create-constants) - -_Commands.pm: Makefile $(top_srcdir)/fvwm/functable.c - cd $(top_builddir)/perllib/FVWM && \ - (fvwm_libdir=$(top_builddir)/libs ./create-commands) - -regenerate: _Constants.pm _Commands.pm diff --git a/perllib/FVWM/Module/Makefile.am b/perllib/FVWM/Module/Makefile.am deleted file mode 100644 index 7b867f3f4..000000000 --- a/perllib/FVWM/Module/Makefile.am +++ /dev/null @@ -1,7 +0,0 @@ -## Process this file with automake to create Makefile.in - -configdir = @FVWM_PERLLIBDIR@/FVWM/Module - -config_DATA = Toolkit.pm Terminal.pm - -EXTRA_DIST = $(config_DATA) diff --git a/perllib/FVWM/Tracker/Makefile.am b/perllib/FVWM/Tracker/Makefile.am deleted file mode 100644 index 02991de5f..000000000 --- a/perllib/FVWM/Tracker/Makefile.am +++ /dev/null @@ -1,9 +0,0 @@ -## Process this file with automake to create Makefile.in - -configdir = @FVWM_PERLLIBDIR@/FVWM/Tracker - -config_DATA = \ - Colorsets.pm GlobalConfig.pm ModuleConfig.pm PageInfo.pm \ - Scheduler.pm WindowList.pm - -EXTRA_DIST = $(config_DATA) diff --git a/perllib/General/Makefile.am b/perllib/General/Makefile.am deleted file mode 100644 index b6dd9e8f9..000000000 --- a/perllib/General/Makefile.am +++ /dev/null @@ -1,7 +0,0 @@ -## Process this file with automake to create Makefile.in - -configdir = @FVWM_PERLLIBDIR@/General - -config_DATA = FileSystem.pm Parse.pm - -EXTRA_DIST = $(config_DATA) diff --git a/perllib/Makefile.am b/perllib/Makefile.am deleted file mode 100644 index 228e8179e..000000000 --- a/perllib/Makefile.am +++ /dev/null @@ -1,7 +0,0 @@ -## Process this file with automake to create Makefile.in - -SUBDIRS = FVWM General -EXTRA_DIST = meson.build - -uninstall-hook: - rm -fr @FVWM_DATADIR@/perllib diff --git a/po/Makefile.am b/po/Makefile.am deleted file mode 100644 index 2e0a2b49f..000000000 --- a/po/Makefile.am +++ /dev/null @@ -1,138 +0,0 @@ - -localedir = @LOCALEDIR@ - -EXTRA_DIST = \ - @POFILES@ @GMOFILES@ fvwm3.pot meson.build - -# This is the list of locale categories, beyond LC_MESSAGES, for which the -# message catalogs shall be used. It is usually empty. -EXTRA_LOCALE_CATEGORIES = - -all-local: all-local-@USE_NLS@ - -# make [all] should do nothing ... -all-local-yes: -all-local-no: - -catalogs: $(CATALOGS) - -install-data-local: install-data-local-@USE_NLS@ -install-data-local-no: all -install-data-local-yes: all - $(mkinstalldirs) $(DESTDIR)$(datadir) - @catalogs='$(CATALOGS)'; \ - all_domains='$(ALL_DOMAINS)'; \ - for dom in $$all_domains; do \ - for cat in $$catalogs; do \ - cat=`basename $$cat`; \ - lang=`echo $$cat | sed -e 's/\.gmo$$//'`; \ - cat="$$dom.$$cat"; \ - dir=$(localedir)/$$lang/LC_MESSAGES; \ - $(mkinstalldirs) $(DESTDIR)$$dir; \ - if test -r $$cat; \ - then realcat=$$cat; \ - else realcat=$(srcdir)/$$cat; \ - fi; \ - if test -f $$realcat; then \ - $(INSTALL_DATA) $$realcat $(DESTDIR)$$dir/$$dom.mo; \ - echo "installing $$realcat as $(DESTDIR)$$dir/$$dom.mo"; \ - for lc in '' $(EXTRA_LOCALE_CATEGORIES); do \ - if test -n "$$lc"; then \ - if (cd $(DESTDIR)$(localedir)/$$lang && \ - LC_ALL=C ls -l -d $$lc 2>/dev/null) | grep ' -> ' \ - >/dev/null; then \ - link=`cd $(DESTDIR)$(localedir)/$$lang && \ - LC_ALL=C ls -l -d $$lc | sed -e 's/^.* -> //'`; \ - mv $(DESTDIR)$(localedir)/$$lang/$$lc \ - $(DESTDIR)$(localedir)/$$lang/$$lc.old; \ - mkdir $(DESTDIR)$(localedir)/$$lang/$$lc; \ - (cd $(DESTDIR)$(localedir)/$$lang/$$lc.old && \ - for file in *; do \ - if test -f $$file; then \ - ln -s ../$$link/$$file \ - $(DESTDIR)$(localedir)/$$lang/$$lc/$$file; \ - fi; \ - done); \ - rm -f $(DESTDIR)$(localedir)/$$lang/$$lc.old; \ - else \ - if test -d $(DESTDIR)$(localedir)/$$lang/$$lc; then \ - :; \ - else \ - rm -f $(DESTDIR)$(localedir)/$$lang/$$lc; \ - mkdir $(DESTDIR)$(localedir)/$$lang/$$lc; \ - fi; \ - fi; \ - rm -f $(DESTDIR)$(localedir)/$$lang/$$lc/$$dom.mo; \ - ln -s ../LC_MESSAGES/$$dom.mo \ - $(DESTDIR)$(localedir)/$$lang/$$lc/$$dom.mo 2>/dev/null || \ - ln $(DESTDIR)$(localedir)/$$lang/LC_MESSAGES/$$dom.mo \ - $(DESTDIR)$(localedir)/$$lang/$$lc/$$dom.mo 2>/dev/null || \ - cp -p $(DESTDIR)$(localedir)/$$lang/LC_MESSAGES/$$dom.mo \ - $(DESTDIR)$(localedir)/$$lang/$$lc/$$dom.mo; \ - echo "installing $$realcat link as \ - $(DESTDIR)$(localedir)/$$lang/$$lc/$$dom.mo"; \ - fi; \ - done; \ - fi; \ - done; \ - done - -installdirs-data: installdirs-data-local-@USE_NLS@ -installdirs-data-local-no: -installdirs-data-local-yes: - $(mkinstalldirs) $(DESTDIR)$(datadir) - @catalogs='$(CATALOGS)'; \ - all_domains='$(ALL_DOMAINS)'; \ - for dom in $$all_domainss; do \ - for cat in $$catalogs; do \ - cat=`basename $$cat`; \ - lang=`echo $$cat | sed -e 's/\.gmo$$//'`; \ - dir=$(localedir)/$$lang/LC_MESSAGES; \ - $(mkinstalldirs) $(DESTDIR)$$dir; \ - for lc in '' $(EXTRA_LOCALE_CATEGORIES); do \ - if test -n "$$lc"; then \ - if (cd $(DESTDIR)$(localedir)/$$lang && \ - LC_ALL=C ls -l -d $$lc 2>/dev/null) | grep ' -> ' \ - >/dev/null; then \ - link=`cd $(DESTDIR)$(localedir)/$$lang && \ - LC_ALL=C ls -l -d $$lc | sed -e 's/^.* -> //'`; \ - mv $(DESTDIR)$(localedir)/$$lang/$$lc \ - $(DESTDIR)$(localedir)/$$lang/$$lc.old; \ - mkdir $(DESTDIR)$(localedir)/$$lang/$$lc; \ - (cd $(DESTDIR)$(localedir)/$$lang/$$lc.old && \ - for file in *; do \ - if test -f $$file; then \ - ln -s ../$$link/$$file \ - $(DESTDIR)$(localedir)/$$lang/$$lc/$$file; \ - fi; \ - done); \ - rm -f $(DESTDIR)$(localedir)/$$lang/$$lc.old; \ - else \ - if test -d $(DESTDIR)$(localedir)/$$lang/$$lc; then \ - :; \ - else \ - rm -f $(DESTDIR)$(localedir)/$$lang/$$lc; \ - mkdir $(DESTDIR)$(localedir)/$$lang/$$lc; \ - fi; \ - fi; \ - fi; \ - done; \ - done; \ - done - -uninstall-local: uninstall-local-@USE_NLS@ -uninstall-local-no: -uninstall-local-yes: - catalogs='$(CATALOGS)'; \ - all_domains='$(ALL_DOMAINS)'; \ - for dom in $$all_domains; do \ - for cat in $$catalogs; do \ - cat=`basename $$cat`; \ - lang=`echo $$cat | sed -e 's/\.gmo$$//'`; \ - for lc in LC_MESSAGES $(EXTRA_LOCALE_CATEGORIES); do \ - rm -f $(DESTDIR)$(localedir)/$$lang/$$lc/$$dom.mo; \ - done; \ - done; \ - done - if test -d @FVWM_DATADIR@"/locale"; then rm -fr @FVWM_DATADIR@"/locale"; fi - diff --git a/po/README.md b/po/README.md index 4bc1240df..7800bd019 100644 --- a/po/README.md +++ b/po/README.md @@ -59,8 +59,7 @@ To update an existing translation: To create a new translation from a template file: -1) Add your language to the `ALL_LINGUAS` variable in - `../configure.ac` and `fvwmpo.sh` files. +1) Add your language to the `ALL_LINGUAS` variable in `fvwmpo.sh`. 2) Use the template file to create a new LL_CC (e.g., fr, zh_CN) translation `.po` file. diff --git a/utils/Makefile.am b/utils/Makefile.am deleted file mode 100644 index 98bc67b61..000000000 --- a/utils/Makefile.am +++ /dev/null @@ -1,8 +0,0 @@ -## Process this file with automake to create Makefile.in - -EXTRA_DIST = fvwm_make_browse_menu.sh fvwm_make_directory_menu.sh \ - fvwm-version-str.sh - -LDADD = -L$(top_builddir)/libs $(X_LIBS) -lfvwm3 $(xpm_LIBS) \ - $(X_PRE_LIBS) -lXext -lX11 -lm $(X_EXTRA_LIBS) $(png_LIBS) -AM_CPPFLAGS = -I$(top_srcdir) $(xpm_CFLAGS) $(X_CFLAGS) $(png_CFLAGS) diff --git a/utils/fvwm-version-str.sh b/utils/fvwm-version-str.sh index b3070700c..339de92ae 100755 --- a/utils/fvwm-version-str.sh +++ b/utils/fvwm-version-str.sh @@ -8,7 +8,7 @@ # # # -# Intended to be called from configure.ac (via autogen.sh) +# Intended to be called from meson. VERSION="released" From 26182df48cff392f02346bfa9467195cda9896d9 Mon Sep 17 00:00:00 2001 From: Thomas Adam Date: Sat, 10 May 2025 12:38:22 +0100 Subject: [PATCH 09/20] build: GH workflow: automate releases Rewrite the release process such that releases can be fully automated. --- .current-version | 1 + .editorconfig | 5 ++- .github/workflows/ccpp.yml | 24 +++------- .github/workflows/release.yml | 83 ++++++++++++++++++++++++----------- .gitignore | 5 --- dev-docs/DEVELOPERS.md | 45 ++++++++++++++++++- meson-scripts/dist-tarball.sh | 8 +++- meson.build | 2 +- 8 files changed, 119 insertions(+), 54 deletions(-) create mode 100644 .current-version diff --git a/.current-version b/.current-version new file mode 100644 index 000000000..781dcb07c --- /dev/null +++ b/.current-version @@ -0,0 +1 @@ +1.1.3 diff --git a/.editorconfig b/.editorconfig index af65f0c79..55d4e48e7 100644 --- a/.editorconfig +++ b/.editorconfig @@ -9,8 +9,9 @@ end_of_line = lf insert_final_newline = true # Tab indentation (no size specified) -[Makefile] -indent_style = tab +[meson.build] +indent_style = space +indent_size = 4 [*.{c,h}] indent_style = tab diff --git a/.github/workflows/ccpp.yml b/.github/workflows/ccpp.yml index dcc73133c..7a254392b 100644 --- a/.github/workflows/ccpp.yml +++ b/.github/workflows/ccpp.yml @@ -18,7 +18,6 @@ jobs: strategy: matrix: os: [blacksmith-4vcpu-ubuntu-2204, alpine] - build-system: [autotools, meson] compiler: [gcc, clang] steps: @@ -30,24 +29,13 @@ jobs: - name: Configure and Build run: | - if [ "${{ matrix.build-system }}" = "autotools" ]; then - if [ "${{ matrix.compiler }}" = "gcc" ]; then - export CFLAGS="-flto -Werror=odr -Werror=lto-type-mismatch -Werror=strict-aliasing" - else - export CC_LD=lld - fi - export CC=${{ matrix.compiler }} - ./autogen.sh && ./configure --enable-mandoc --enable-golang && make -j - fi - if [ "${{ matrix.build-system }}" = "meson" ]; then - if [ "${{ matrix.compiler }}" = "gcc" ]; then - export CFLAGS="-flto -Werror=odr -Werror=lto-type-mismatch -Werror=strict-aliasing" - else - export CC_LD=lld - fi - export CC=${{ matrix.compiler }} - meson setup builddir -Dhtmldoc=true -Dmandoc=true && ninja -C builddir + export CC=${{ matrix.compiler }} + if [ "${{ matrix.compiler }}" = "gcc" ]; then + export CFLAGS="-flto -Werror=odr -Werror=lto-type-mismatch -Werror=strict-aliasing" + else + export CC_LD=lld fi + meson setup builddir -Dhtmldoc=true -Dmandoc=true && ninja -C builddir notification: runs-on: blacksmith-4vcpu-ubuntu-2204 diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 61937fad2..63f36de5d 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -1,29 +1,43 @@ -name: Create Release Branch +name: Create Release on: workflow_dispatch: inputs: - versionRelease: - description: 'Release version' + nextVersion: + description: 'The next version of fvwm3 after this release: ' + required: true + isDraft: + description: 'Make a draft release, rather than an official release' + type: boolean required: true jobs: createrelease: runs-on: blacksmith-4vcpu-ubuntu-2204 + container: fvwmorg/fvwm3-build:latest steps: - name: Checkout code - uses: actions/checkout@v2 + uses: actions/checkout@v4 with: fetch-depth: 0 + token: ${{ secrets.GITHUB_TOKEN }} + - name: Repo Settings + run: | + git config --global user.name "Thomas Adam" + git config --global user.email "thomas@fvwm.org" + git config --global --add safe.directory /__w/fvwm3/fvwm3 + - name: Get Current Version (for release...) + id: versionRelease + run: | + git fetch -q -n origin + echo "versionRelease=$(git show HEAD:./.current-version)" >> $GITHUB_ENV - name: Create release branch - run: git checkout -b release/${{ github.event.inputs.versionRelease }} - - name: Change files for release run: | - ./mkrelease.sh ${{ github.event.inputs.versionRelease }} + git checkout -b release/${{ env.versionRelease }} - name: Get date id: date run: echo "date=$(date -d 'now' +'%Y-%m-%d')" >> $GITHUB_ENV - name: Generate changelog run: | - printf "## [${{ github.event.inputs.versionRelease }}](https://github.com/fvwmorg/fvwm3/tree/${{ github.event.inputs.versionRelease }}) (${{ env.date }})\n" >./tmp.out + printf "## [${{ env.versionRelease }}](https://github.com/fvwmorg/fvwm3/tree/${{ env.versionRelease }}) (${{ env.date }})\n" >./tmp.out curl \ --silent \ -X POST \ @@ -31,25 +45,42 @@ jobs: -H "Authorization: Bearer ${{ secrets.GITHUB_TOKEN }}" \ -H "X-GitHub-Api-Version: 2022-11-28" \ https://api.github.com/repos/fvwmorg/fvwm3/releases/generate-notes \ - -d '{"tag_name":"${{ github.event.inputs.versionRelease }}","target_commitish":"main","configuration_file_path":".github/release.yml"}' | \ + -d '{"tag_name":"${{ env.versionRelease }}","target_commitish":"main","configuration_file_path":".github/release.yml"}' | \ jq -r '.body' >> ./tmp.out sed -i '2d' ./tmp.out sed -i "2r tmp.out" CHANGELOG.md - - name: Commit Changes + - name: Create release commit run: | - git config user.name "Thomas Adam" - git config user.email "thomas@fvwm.org" - git commit -a --author="Thomas Adam " -m "[AUTO]: release ${{ github.event.inputs.versionRelease }}" - git push -u origin HEAD - - name: Create pull request into main - uses: thomaseizinger/create-pull-request@1.0.0 - with: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - head: release/${{ github.event.inputs.versionRelease }} - base: main - title: release ${{ github.event.inputs.versionRelease }} - reviewers: ${{ github.event.issue.user.login }} - body: | - Hello, - This PR was created in response to a release workflow running. - I've updated the version name and code commit: ${{ steps.make-commit.outputs.commit }}. + echo "ISRELEASED=yes" > .release-status + git add .release-status + git add CHANGELOG.md + git commit -a --author="Thomas Adam " -m "[AUTO]: release ${{ env.versionRelease }}" + git checkout main + git merge --ff-only release/${{ env.versionRelease }} + git tag -am "Release ${{ env.versionRelease }}" ${{ env.versionRelease }} + git push + git push origin --tags ${{ env.versionRelease }} + - name: Build artefacts + run: | + meson setup --reconfigure build -Dmandoc=true -Dhtmldoc=true -Dgolang=enabled && \ + meson compile -C build && meson dist --formats gztar -C build + - name: Create a draft release + run: | + echo "${{ secrets.GITHUB_TOKEN }}" | gh auth login --with-token + gh \ + release \ + create ${{ env.versionRelease }} \ + ${{ github.event.inputs.isDraft == 'true' && '--draft' || '' }} \ + --target main \ + --generate-notes \ + ./build/meson-dist/fvwm3-${{ env.versionRelease }}.tar.gz + - name: Bump next version + run: | + git clean -dfx + git checkout main + git pull -q + echo "${{ github.event.inputs.nextVersion }}" > .current-version + git add .current-version + echo "ISRELEASED=no" > .release-status + git commit -am "build: set next version" + git push diff --git a/.gitignore b/.gitignore index d9a4a1598..465a91f8c 100644 --- a/.gitignore +++ b/.gitignore @@ -9,10 +9,6 @@ *~ *# .#* -Makefile -Makefile.in -aclocal.m4 -autom4te.cache/ bin/FvwmCommand bin/FvwmPrompt/FvwmPrompt bin/fvwm-bug @@ -76,6 +72,5 @@ modules/FvwmScript/Scripts/FvwmScript-ComExample modules/FvwmScroll/FvwmScroll modules/fmd/fmd perllib/FVWM/Module.pm -stamp-h1 tags tests/hints/hints_test diff --git a/dev-docs/DEVELOPERS.md b/dev-docs/DEVELOPERS.md index 672b17714..3ff8103fe 100644 --- a/dev-docs/DEVELOPERS.md +++ b/dev-docs/DEVELOPERS.md @@ -174,7 +174,50 @@ Maintaining Man Pages Creating a release ================== -Use Github Actions. +Releases are created entirely automatically from Github Actions. + +The `.github/workflows/release.yml` contains the code which underpins this. + +To create an actual release, means going to the following: + +https://github.com/fvwmorg/fvwm3/actions/workflows/release.yml + +The branch defaults to `main` which is where we want to generate the release +from. Don't change this. + +The input will ask for the next version fvwm3 will be after release. For +instance, if the current version is `1.1.3`, then the correct input to use is +`1.1.4`. + +If you want to find the current release fvwm3 is at, see the +`.current-release` file. + +**Unfortunately there is no way of programatically showing the current version, +so this needs to be looked up manually before confirming the new versioon +befpre running this workflow.** + +There's a second input, defaulting to "false", asking whether the release +should be published as a draft or not. Generally, this shouldn't need to be +set to `true` -- but it's left in as a means of allowing the person doing the +release some degree of flexibility. + +Note that the act of publishing a release -- whether it's a draft or not, will +still tag the release and bump `fvwm3` to the next version,. This is also by +design. + +If a release has to be re-rolled, then it is up to the person doing that +release to delete it and recreate it, perhaps via the following commands: + +``` +git tag -d ; git push origin --delete +``` + +The specific release of `` would also have to be removed. +This can be done directly on GitHub, or via the `gh` client: + +``` +gh release delete +``` Updating fvwm-web ================= diff --git a/meson-scripts/dist-tarball.sh b/meson-scripts/dist-tarball.sh index 877cdb5bb..3ec38ed05 100755 --- a/meson-scripts/dist-tarball.sh +++ b/meson-scripts/dist-tarball.sh @@ -5,7 +5,13 @@ # version of "make dist". # TODO: ".*" as a glob might be too much in the future; expand this out... -FILES_TO_IGNORE=".* +FILES_TO_IGNORE=".clang-format +.disabled-travis.yml +.editorconfig +.git +.github +.gitignore +.mailmap dev-docs" ( diff --git a/meson.build b/meson.build index 3d8928a9d..7ef68c6da 100644 --- a/meson.build +++ b/meson.build @@ -1,7 +1,7 @@ project( 'fvwm3', 'c', - version: '1.1.3', + version: run_command(['cat', '.current-version'], check: true).stdout().strip(), license: 'GPL-2.0-or-later', meson_version: '>=1.5.1', # Required to configure perl files without eating \@s default_options: [ From be79cdfd5fd38b94d62aeded11c344cc663f98ac Mon Sep 17 00:00:00 2001 From: Thomas Adam Date: Thu, 15 May 2025 09:38:17 +0000 Subject: [PATCH 10/20] docs: move INSTALL.md to the root of the project This is mostly relevant for release tarballs, but developer documentation doesn't get shipped in a release. However, installation instructions are still required. Therefore, make the INSTALL.md file part of the root of the project. Fixes #1194 --- dev-docs/INSTALL.md => INSTALL.md | 0 README.md | 2 +- 2 files changed, 1 insertion(+), 1 deletion(-) rename dev-docs/INSTALL.md => INSTALL.md (100%) diff --git a/dev-docs/INSTALL.md b/INSTALL.md similarity index 100% rename from dev-docs/INSTALL.md rename to INSTALL.md diff --git a/README.md b/README.md index 684b61826..6630a3a24 100644 --- a/README.md +++ b/README.md @@ -30,7 +30,7 @@ Releases / Changelog Installation ------------ -See [the installation instructions](./dev-docs/INSTALL.md) +See [the installation instructions](./INSTALL.md) Help & Support -------------- From bf195004582f7920f807b70a70c8326afc149fbe Mon Sep 17 00:00:00 2001 From: Thomas Adam Date: Thu, 15 May 2025 21:38:55 +0100 Subject: [PATCH 11/20] build: remove go-1.14.0 check The need for go-1.14 was only needed for autotools, so this check can be removed. Additionally, go-1.14 was released over five years ago so the chances are a newer version is likely ubiquitous. --- Dockerfile | 2 +- meson.build | 3 +-- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/Dockerfile b/Dockerfile index 30ec09c1f..7d1486a80 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,7 +1,7 @@ FROM fvwmorg/fvwm3-build:latest #FROM docker.pkg.github.com/fvwmorg/fvwm3/fvwm3-build:latest -ENV GOROOT="/usr/lib/go-1.14/" +ENV GOROOT="/usr/lib/go/" ENV PATH="$GOROOT/bin:$PATH" ENV GO111MODULE="on" diff --git a/meson.build b/meson.build index 7ef68c6da..f3a7f157d 100644 --- a/meson.build +++ b/meson.build @@ -231,8 +231,7 @@ if golang.found() if gover.version_compare('<1.20.0') error( '''A version of Go >= 1.20.0 is required to use the FVWM3 meson build Go modules. - Either disable Go for this build (`-Dgolang=disabled`) or upgrade Go to a version >= 1.20.0. - The Autotools build can use Go 1.14.0, this is another option if upgrading is not feasible.''', + Either disable Go for this build (`-Dgolang=disabled`) or upgrade Go to a version >= 1.20.0.''', ) endif else From 6370adf1cb3f3c1462bf7be123e1783df5ce08b3 Mon Sep 17 00:00:00 2001 From: Jaimos Skriletz Date: Sun, 18 May 2025 12:46:04 -0600 Subject: [PATCH 12/20] Fix crash in FvwmPager and clarify Balloons option. FvwmPager would crash if `WindowFont` was set then later set to `None`. This makes sure that if `WindowFont None` is used, the font is set back to Null for fallback checks. This also clarifies the `Balloon type` option. This option no longer accepts NULL inputs, use All as an example to show balloon windows everywhere, and state default is None. --- doc/FvwmPager.adoc | 9 +++++---- modules/FvwmPager/init_pager.c | 1 + 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/doc/FvwmPager.adoc b/doc/FvwmPager.adoc index afef7d8bd..7ea2e9b32 100644 --- a/doc/FvwmPager.adoc +++ b/doc/FvwmPager.adoc @@ -297,13 +297,14 @@ Balloon windows provide popup labels for each window when the mouse hovers over it. The label, font, color, and position of these balloon windows can be configured below. -*FvwmPager: Balloons [type]:: +*FvwmPager: Balloons type:: Show a balloon describing the window when the pointer is moved into a window in the pager. The default format (the window's icon name) can be changed using _BalloonStringFormat_. If _type_ is "Pager" balloons - are just shown for an un-iconified pager; if _type_ is "Icon" balloons - are just shown for an iconified pager. If _type_ is anything else (or - null) balloons are always shown. + are just shown for an un-iconified pager. If _type_ is "Icon" balloons + are just shown for an iconified pager. If _type_ is "All" (or any unused + non blank value) balloons are always shown. If _type_ is "None" balloons + are never shown (the default behavior). *FvwmPager: BalloonFont font-name:: Specifies a font to use for the balloon text. Defaults to _fixed_. diff --git a/modules/FvwmPager/init_pager.c b/modules/FvwmPager/init_pager.c index 0c863061a..ae99765d8 100644 --- a/modules/FvwmPager/init_pager.c +++ b/modules/FvwmPager/init_pager.c @@ -1187,6 +1187,7 @@ void parse_options(void) StrEquals(resource, "SmallFont")) { FlocaleUnloadFont(dpy, Scr.winFfont); + Scr.winFfont = NULL; if (strncasecmp(next, "none", 4) != 0) Scr.winFfont = FlocaleLoadFont( dpy, next, MyName); From f154130601d19f7748702ebe00a7cd2a7f9a30f8 Mon Sep 17 00:00:00 2001 From: Gene Carlson Date: Wed, 21 May 2025 23:10:27 +0900 Subject: [PATCH 13/20] Add maximum and minimum to math. --- doc/fvwm3_manpage_source.adoc | 5 +++-- fvwm/expand.c | 6 ++++++ 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/doc/fvwm3_manpage_source.adoc b/doc/fvwm3_manpage_source.adoc index 658fca015..dc61af9f3 100644 --- a/doc/fvwm3_manpage_source.adoc +++ b/doc/fvwm3_manpage_source.adoc @@ -1637,11 +1637,12 @@ $[bg.cs3.lighten15.hash]. + Please refer to the *Colorsets* section for details about colorsets. -$[math.+.,] $[math.-.,] $[math.*.,] $[math./.,] $[math.%.,] $[math.^.,]:: +$[math.+.,] $[math.-.,] $[math.*.,] $[math./.,] $[math.%.,] $[math.^.,] $[math.<.,] $[math.>.,]:: The math expansion variables can be used to do some basic arithmetic on the integers and . These expressions can be used to add ({plus}), subtract (-), multiply ({asterisk}), divide (/), modulus - (%), and exponentiation ({caret}). This can be useful when computing + (%), and exponentiation ({caret}). Maximum (>) returns the greater of + two values, and minimum (<) the lesser. This can be useful when computing the size of panels or locations of windows relative to a monitor, for example $[math.-.$[monitor.$[monitor.primary].height],200] will subtract 200 pixels from the height of the primary monitor. These can diff --git a/fvwm/expand.c b/fvwm/expand.c index 5d22a69d0..afb320a8c 100644 --- a/fvwm/expand.c +++ b/fvwm/expand.c @@ -718,6 +718,12 @@ static signed int expand_vars_extended( val *= x; } break; + case '>': + val = x > y ? x : y; + break; + case '<': + val = x < y ? x : y; + break; default: /* undefined operation */ return -1; From 9ec477f7c0c8867b9c87eafe7c88dd91c9afb8aa Mon Sep 17 00:00:00 2001 From: Thomas Adam Date: Fri, 23 May 2025 17:56:07 +0100 Subject: [PATCH 14/20] build: modify release version script * set -e for the worse case * POSIX check on source --- utils/fvwm-version-str.sh | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/utils/fvwm-version-str.sh b/utils/fvwm-version-str.sh index 339de92ae..3ab58c62a 100755 --- a/utils/fvwm-version-str.sh +++ b/utils/fvwm-version-str.sh @@ -9,17 +9,17 @@ # # # Intended to be called from meson. +set -e VERSION="released" +RS=".release-status" [ -d ".git" ] || { echo "$VERSION" && exit 0 ; } -[ -e "./.release-status" ] && source "./.release-status" +. "./$RS" [ -z "$ISRELEASED" ] && { echo "UNKNOWN" && exit 0 ; } +[ "$ISRELEASED" = "yes" ] && { echo "$VERSION" && exit 0 ; } + +git describe --always --long --dirty --tags -if [ "$ISRELEASED" = "yes" ]; then - echo "$VERSION" -else - git describe --always --long --dirty --tags -fi From d1a215c212d2ac78bc49e3b2109199c9164dcd52 Mon Sep 17 00:00:00 2001 From: Matt Jolly Date: Thu, 22 May 2025 08:11:34 +1000 Subject: [PATCH 15/20] meson: do a link test for `locale_charset()` We can't just check for `locale_charset` as some (very silly) distributions ship, or allow end users to install, GNU libiconv on GNU libc systems. - Move `HAVE_CODESET` and `HAVE_LIBCHARSET` checks into `iconv` dep conditional - perform link test against libcharset to see if it is usable - add a visible warning that GNU libiconv should not be installed on a GNU libc system, if libcharset (libiconv) linking fails due to apparent conflicts with glibc iconv. See Also: https://github.com/fvwmorg/fvwm3/pull/1186 Signed-off-by: Matt Jolly --- meson.build | 103 ++++++++++++++++++++++++++++++++-------------------- 1 file changed, 64 insertions(+), 39 deletions(-) diff --git a/meson.build b/meson.build index f3a7f157d..e78d4e25a 100644 --- a/meson.build +++ b/meson.build @@ -126,53 +126,43 @@ foreach h : headers endif endforeach -if cc.has_header_symbol('libcharset.h', 'locale_charset') - conf.set10('HAVE_LIBCHARSET', true) -endif - if conf.has('HAVE_SYS_SELECT_H') conf.set10('HAVE_SELECT', true) conf.set('SELECT_FD_SET_CAST', '') endif # Function checks. -functions = { - 'div': {}, - 'getpwuid': {}, - 'gettimeofday': {}, - 'lstat': {}, - 'memcpy': {}, - 'memmove': {}, - 'mkfifo': {}, - 'nl_langinfo': {'have': 'HAVE_CODESET'}, - 'putenv': {}, - 'setpgid': {}, - 'setpgrp': {}, - 'setvbuf': {}, - 'sigaction': {}, - 'siginterrupt': {}, - 'siglongjmp': {}, - 'sigsetjmp': {}, - 'socket': {}, - 'strchr': {}, - 'strdup': {}, - 'strstr': {}, - 'strtol': {}, - 'sysconf': {}, - 'intl': {}, - 'uname': {}, - 'wait3': {}, - 'waitpid': {}, -} +functions = [ + 'div', + 'getpwuid', + 'gettimeofday', + 'lstat', + 'memcpy', + 'memmove', + 'mkfifo', + 'putenv', + 'setpgid', + 'setpgrp', + 'setvbuf', + 'sigaction', + 'siginterrupt', + 'siglongjmp', + 'sigsetjmp', + 'socket', + 'strchr', + 'strdup', + 'strstr', + 'strtol', + 'sysconf', + 'intl', + 'uname', + 'wait3', + 'waitpid', +] -foreach f, v : functions +foreach f : functions if cc.has_function(f, dependencies: syslibs) - val = '' - if 'have' in v - val = v['have'] - else - val = 'HAVE_' + f.to_upper().underscorify() - endif + val = 'HAVE_' + f.to_upper().underscorify() conf.set10(val, true) endif endforeach @@ -269,10 +259,34 @@ if fribidi.found() conf.set10('HAVE_BIDI', true) endif +iconv_warning = false + iconv = dependency('iconv', required: get_option('iconv')) if iconv.found() conf.set10('HAVE_ICONV', true) all_found_deps += iconv + + # Check if we have nl_langinfo function (typically glibc) + if cc.has_function('nl_langinfo') + conf.set10('HAVE_CODESET', true) + endif + + libcharset_code = ''' + #include + + int main(void) { + const char *charset = locale_charset(); + return 0; + } + ''' + + if cc.links(libcharset_code, dependencies: iconv, name: 'libcharset check') + conf.set10('HAVE_LIBCHARSET', true) + elif cc.has_header_symbol('libcharset.h', 'locale_charset') + # If header is present but linking fails, it might be a conflict + # we'll warn after the summary so that this isn't lost in configure noise + iconv_warning = true + endif endif libintl = dependency('intl', required: get_option('nls')) @@ -593,3 +607,14 @@ summary( bool_yn: true, section: 'Dependencies', ) + +if iconv_warning + warning( + '''Found libcharset.h header, but couldn't link against locale_charset() function. + This typically happens when GNU libiconv conflicts with the iconv built into libc. + GNU libc systems shouldn't have GNU libiconv installed as they already provide iconv. + This is a bug in your distribution's packaging. + Please report this to your distribution's developers. + ''' + ) +endif From 829a5155bace584ee3915c5420dd284ee96d9686 Mon Sep 17 00:00:00 2001 From: Thomas Adam Date: Thu, 29 May 2025 22:12:01 +0100 Subject: [PATCH 16/20] randr: monitor_change: recalc panframes When a monitor is marked as changed, recalculate the panframes as these could now be in different coordinates. --- fvwm/events.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/fvwm/events.c b/fvwm/events.c index 5e3a21fc3..c98949746 100644 --- a/fvwm/events.c +++ b/fvwm/events.c @@ -1788,9 +1788,11 @@ static void monitor_update_ewmh(void) mref = RB_MIN(monitors, &monitor_q); RB_FOREACH(m, monitors, &monitor_q) { - if (m->flags & MONITOR_CHANGED) { + if (m->flags == MONITOR_CHANGED) { + apply_desktops_monitor(m); + calculate_page_sizes(m, mref->dx, mref->dy); + initPanFrames(m); m->flags &= ~MONITOR_CHANGED; - continue; } if (m->flags & MONITOR_NEW) { fvwm_debug(__func__, "Applying EWMH changes to new %s", From 378b6ed5101dcce8a5fe0c3a9c86730548f6eb13 Mon Sep 17 00:00:00 2001 From: Thomas Adam Date: Thu, 29 May 2025 22:15:03 +0100 Subject: [PATCH 17/20] randr: run screenchange at least once When reacting a screen change, ensure we run the set of actions at least once. --- fvwm/events.c | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/fvwm/events.c b/fvwm/events.c index c98949746..eae8c787d 100644 --- a/fvwm/events.c +++ b/fvwm/events.c @@ -4131,6 +4131,12 @@ void dispatch_event(XEvent *e) switch (e->type - randr_event) { case RRScreenChangeNotify: + XRRUpdateConfiguration(e); + monitor_output_change(e->xany.display, NULL); + monitor_update_ewmh(); + monitor_emit_broadcast(); + initPanFrames(NULL); + /* Avoid processing identical RandR events twice. */ if (e->xany.serial == prev_serial) { @@ -4140,11 +4146,6 @@ void dispatch_event(XEvent *e) } prev_serial = e->xany.serial; - XRRUpdateConfiguration(e); - monitor_output_change(e->xany.display, NULL); - monitor_update_ewmh(); - monitor_emit_broadcast(); - initPanFrames(NULL); break; } From 88cf43485dd0942fb254fdc19ffe54f115a6cf74 Mon Sep 17 00:00:00 2001 From: Thomas Adam Date: Thu, 29 May 2025 22:17:53 +0100 Subject: [PATCH 18/20] randr: scan_screens: move MONITOR_FOUND Mark the monitor as found before marking it as changed so that it makes it easier to differentiate the two conditions. --- libs/FScreen.c | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/libs/FScreen.c b/libs/FScreen.c index ddb2ec81a..fa8db3ebd 100644 --- a/libs/FScreen.c +++ b/libs/FScreen.c @@ -575,21 +575,24 @@ scan_screens(Display *dpy) */ fvwm_debug(__func__, "Case 2: processing %d monitors", n); for (i = 0; i < n; i++) { - if ((name = XGetAtomName(dpy, rrm[i].name)) == NULL) + if ((name = XGetAtomName(dpy, rrm[i].name)) == NULL) { + fvwm_debug(__func__, "NAME WAS NULL!"); continue; + } if ((m = monitor_by_name(name)) == NULL) { /* Case 2.1 -- new monitor. */ - fvwm_debug(__func__, "Case 2.1: new monitor"); + fvwm_debug(__func__, "Case 2.1: new monitor (%s)", + name); monitor_add(&rrm[i]); } + /* Flag monitor as MONITOR_FOUND. */ + monitor_mark_inlist(name); + if (monitor_mark_changed(m, &rrm[i])) { fvwm_debug(__func__, "Case 2.2: %s changed", m->si->name); } - /* Flag monitor as MONITOR_FOUND. */ - monitor_mark_inlist(name); - XFree(name); } From 4166fe000746e71fbdddc3b0f679d8e119c3dd73 Mon Sep 17 00:00:00 2001 From: Thomas Adam Date: Fri, 30 May 2025 16:55:52 +0100 Subject: [PATCH 19/20] setup_visible_names: don't ignore when both set When updating the visible_name or icon_name of a window, don't miss anything. Fixes #1202 --- fvwm/add_window.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/fvwm/add_window.c b/fvwm/add_window.c index 8b70b7903..36237b257 100644 --- a/fvwm/add_window.c +++ b/fvwm/add_window.c @@ -1562,6 +1562,10 @@ int setup_visible_names(FvwmWindow *fw, int what_changed) changed_names = (what_changed & 3); changed_styles = ((what_changed >> 2) & 3); + + if (changed_styles == 0 && changed_names > 0) + changed_styles = 3; + force_update = changed_styles; if (fw->visible_name == NULL) { From 3c770e519aaa715109d5e98a393cfc2f4d213bd3 Mon Sep 17 00:00:00 2001 From: Thomas Adam Date: Sun, 1 Jun 2025 13:59:03 +0000 Subject: [PATCH 20/20] [AUTO]: release 1.1.3 --- .release-status | 2 +- CHANGELOG.md | 21 +++++++++++++++++++++ 2 files changed, 22 insertions(+), 1 deletion(-) diff --git a/.release-status b/.release-status index f483404c2..e160db335 100644 --- a/.release-status +++ b/.release-status @@ -1 +1 @@ -ISRELEASED=no +ISRELEASED=yes diff --git a/CHANGELOG.md b/CHANGELOG.md index 3d9975fb1..fe6dbe7ad 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,26 @@ # Changelog +## [1.1.3](https://github.com/fvwmorg/fvwm3/tree/1.1.3) (2025-06-01) + +## What's Changed +### Enhancements +* FvwmRearrange: Use -on_screen to tile/cascade all windows on the monitor. by @pghvlaans in https://github.com/fvwmorg/fvwm3/pull/1170 +* FvwmRearrange: Add -win_cmd COMMAND option. by @somiaj in https://github.com/fvwmorg/fvwm3/pull/1179 +* expand.c: Add "maximum" and "minimum" to math. by @pghvlaans in https://github.com/fvwmorg/fvwm3/pull/1176 +### Other Changes +* build: macos: fix path to fribidi by @ThomasAdam in https://github.com/fvwmorg/fvwm3/pull/1174 +* fvwm-convert-2.6: fix syntax error by @ThomasAdam in https://github.com/fvwmorg/fvwm3/pull/1177 +* style: remove superfluous debug by @ThomasAdam in https://github.com/fvwmorg/fvwm3/pull/1181 +* Remove autotools & modernise build CI/CD by @ThomasAdam in https://github.com/fvwmorg/fvwm3/pull/1191 +* build: remove go-1.14.0 check by @ThomasAdam in https://github.com/fvwmorg/fvwm3/pull/1195 +* Fix crash in FvwmPager and clarify Balloons option. by @somiaj in https://github.com/fvwmorg/fvwm3/pull/1197 +* build: modify release version script by @ThomasAdam in https://github.com/fvwmorg/fvwm3/pull/1201 +* meson: do a link test for `locale_charset()` by @Kangie in https://github.com/fvwmorg/fvwm3/pull/1203 +* Small RandR fixes by @ThomasAdam in https://github.com/fvwmorg/fvwm3/pull/1207 +* setup_visible_names: don't ignore when both set by @ThomasAdam in https://github.com/fvwmorg/fvwm3/pull/1208 + + +**Full Changelog**: https://github.com/fvwmorg/fvwm3/compare/1.1.2...1.1.3 ## [1.1.2](https://github.com/fvwmorg/fvwm3/tree/1.1.2) (2025-02-08) ## What's Changed