1
0
mirror of https://github.com/gryf/wmaker.git synced 2025-12-18 20:10:29 +01:00

249 Commits

Author SHA1 Message Date
Christophe CURIS
308b9f4975 Configure: Fix non-working libbsd usage when explicitly requested
Due to a missing comma, in the AS_IF the action run-if-false is actually
merged with run-if-true action, which means that with_libbsd is always
empty when user provides --with[out]-libbsd.
2021-09-04 19:03:53 +01:00
Christophe CURIS
1d1c904126 Configure: Place the argument checks at the beginning of execution
The autotool provides a simple mechanism which allows us to move ("divert")
the checks we do on the user arguments to the beginning of the script, yet
without needing to scatter the code.

This is good because we can raise errors very fast, user do not have to
wait until many other checks have passed before knowing he has to correct
his argument list; yet on our side we can keep related things together.

Signed-off-by: Christophe CURIS <christophe.curis@free.fr>
2021-09-04 19:03:53 +01:00
Christophe CURIS
54c8535365 Configure: Add an error message when using deprecated "--with-defsdatadir" 2021-08-10 09:42:43 +01:00
John D Pell
24f5b32469 Configure: Rename setting DEFSDATADIR to PKGCONFDIR
Directory /etc/WindowMaker is for global defaults configuration, it is not
a "data" folder which is $PREFIX/share/WindowMaker.

The name change make it more consistent with other names.
2021-08-10 09:42:43 +01:00
Christophe CURIS
351e05dca9 Configure: Add a maintainer option to prepare generation of HTML for the website
When the new configure option '--with-web-repo' is used, the new target
'make website' becomes available and will generate HTML pages to be placed
in the Homepage Repository.

This patch does not generate any content yet but it prepares the skeleton
to handle everything.

Signed-off-by: Christophe CURIS <christophe.curis@free.fr>
2021-06-05 23:54:15 +01:00
Christophe CURIS
f049635fa5 Configure: Rewrite the detection for Pango library
Make use of the standard macro for PKG_CONFIG; the default behaviour is now
to use Pango if present, instead of requiring explicit user request, yet
still not making it mandatory.

The detection code was moved to a macro to keep the configure.ac script
(relatively) small, and consistent with what is done for most other libs.

Signed-off-by: Christophe CURIS <christophe.curis@free.fr>
2021-05-29 20:15:09 +01:00
Christophe CURIS
0bbb122b94 Configure: Rewrite detection for Xft2 to properly use PKG_CONFIG macro
The goal is to use standard macros, which make code easier to maintain
(smaller, more consistent). We still keep the legacy "xfg-config" method
because we don't want to drop support for old hardware/software.

A side effect is the change in the name of the variables for the makefile,
but this goes in favour of consistency.

Signed-off-by: Christophe CURIS <christophe.curis@free.fr>
2021-05-22 20:00:41 +01:00
Christophe CURIS
70f89fd9c5 WRaster: Add initialisation for locale support
Because the library does not have an initialisation function, we need to
rely on an automatic called-on-load mechanism, which is provided through
a compiler attribute 'constructor'.

However, as the project aims to still compile on old hard/software, we
include a check in 'configure' to ensure it works, and if not use the
legacy solution.

Note: Because we introduce a new DEFINE, the 'config.h.in' needs to be
regenerated, otherwise you may get a compilation error in wrlib. This is
done by re-running './autogen.sh'

Signed-off-by: Christophe CURIS <christophe.curis@free.fr>
2021-05-18 17:49:17 +01:00
Christophe CURIS
aadd694a6b WRaster: Create structure to make the library translatable
The library did not propose the mechanisms to be translated, this patch is
creating the structure in autoconf/automake and the translation directory
so its messages can be also translated.

Signed-off-by: Christophe CURIS <christophe.curis@free.fr>
2021-05-18 17:49:17 +01:00
Doug Torrance
583f66ec4e Turn off automake's warning messages about using GNU make extensions
We've been using addsuffix in WindowMaker/Makefile.am and may use others
in the future.
2020-06-22 18:07:09 +01:00
Doug Torrance
54a24ab6f7 Remove trailing whitespace.
Also, the script is a one-liner, stolen from [1]:

ack --print0 -l '[ \t]+$' | xargs -0 -n1 perl -pi -e 's/[ \t]+$//'

[1]
https://stackoverflow.com/questions/149057/how-to-remove-trailing-whitespace-of-all-files-recursively
2020-04-09 14:28:09 +01:00
Doug Torrance
a17d131da3 Remove apostrophes from instances of possessive "its".
I noticed one instance of this while looking at the code the other day,
and after a quick grep, realized it happened a *lot*!  One of the many
frustrating things about the English language is that we use apostrophes
to make pretty much everything possessive *except* the pronoun "it".
In that case, we use "its".  "It's" is reserved for the contraction
meaning "it is" or "it has".
2020-04-09 09:05:50 +01:00
David Michael
6320bb6219 configure: Allow changing default search paths
This changes the behavior of the --with-{inc,lib}s-from arguments
to replace the default paths instead of adding to them.  This is
required when cross-compiling in a sysroot, since the default paths
will include files from the host system which can have an
incompatible architecture.
2020-04-06 16:35:53 +01:00
Carlos R. Mafra
f9bc310fa6 Window Maker 0.95.9 2020-04-04 11:02:28 +01:00
Doug Torrance
673ea18020 Update mailing list links to new Google Groups. 2018-05-14 16:51:23 +01:00
Carlos R. Mafra
30cd22859a Merge branch 'master' into next
I forgot to add the wmaker 0.95.8 commit back into the next
branch. Doing it now.
2017-03-20 18:03:24 +00:00
Doug Torrance
f6320d4fa5 configure: Remove deprecated --with-nlsdir option.
Deprecated in December 2014, and over two years have passed.
2017-03-12 00:12:18 +00:00
Carlos R. Mafra
5d643a67dd Window Maker 0.95.8 2017-03-11 11:10:26 +00:00
Doug Torrance
6fa1c0c009 configure: Add option to specify global defaults directory.
Previously, this was only (partially) possible by redefining the macro
GLOBAL_DEFAULTS_SUBDIR.  This told Window Maker to look for the global
config files in a particular subdirectory of SYSCONFDIR.

However:
* This is undocumented.
* GLOBAL_DEFAULTS_SUBDIR is ignored when installing the config files.  They
  are always installed to SYSCONFDIR/WindowMaker.

To solve these issues, we add a "--with-defsdatadir" option to configure
which allows a user to specify the global defaults directory.
2017-03-10 10:20:58 +00:00
Doug Torrance
ac92f1a844 wrlib: Bump soname version to 6.
Usually, a soname bump is reserved for when an interface is added, changed,
or removed.  This has not happened to wrlib.  However, I think there is a
special circumstance that warrants the bump.

In particular, there are two versions of wrlib version 5 in the wild:
* The one that shipped with wmaker 0.95.6, which uses symbol version
  LIBWRASTER3.
* The one that shipped with wmaker 0.95.7, which uses symbol version
  LIBWRASTER5.
This was reported in Debian bug #811304 [1].  Binaries which were built
against the older wrlib won't run after upgrading to the newer one, even
though they are supposedly using the same soname version.

(We get around this currently in Debian by patching the old LIBWRASTER3
symbol version back in.)

I propose we bump to version 6 and put this mess behind us.

[1] https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=811304
2017-03-10 10:20:58 +00:00
Doug Torrance
92bc458fac configure: Use PKG_PROG_PKG_CONFIG macro to allow cross building.
Patch by Helmut Grohne <helmut@subdivi.de> to fix Debian bug #853236 [1]:

> wmaker fails to cross build from source, because it forces the use of
> pkg-config without $ac_tool_prefix. Discovering pkg-config with the
> PKG_PROG_PKG_CONFIG macro considers $ac_tool_prefix and thus makes cross
> compilation succeed. Please consider applying the attached patch after
> stretch is released.
>
> Helmut

[1] https://bugs.debian.org/853236
2017-01-31 01:44:56 +00:00
Carlos R. Mafra
2db044993b Window Maker 0.95.7 2015-08-02 11:52:08 +01:00
Rodolfo García Peñas (kix)
e545b2abf9 configure: fixed incorrect variable name that prevented --disable-xdnd to work
The name of the variable used in the AM_CONDITIONAL check was not aligned
with the name used at the other places of the file, which made the test
always succeed, making the conditional always enabled, causing an
unnecessary file to be included if user asked to disable the feature,
feature which was still not enabled.

Signed-off-by: Christophe CURIS <christophe.curis@free.fr>
2015-06-28 19:44:17 -03:00
Josip Deanovic
0dfb42caae configure: Fix output of libdir directory in summary
This patch fixes the output status of the configure script which
currently gives output such as this:
<output>

Window Maker was configured as follows:
Installation path prefix            : /usr/local/windowmaker-0.95.7.next
Installation path for binaries      : /usr/local/windowmaker-0.95.7.next/bin
Installation path for libraries     : ${exec_prefix}/lib
Installation path for WPrefs.app    : /usr/local/windowmaker-0.95.7.next
...
2015-06-20 17:34:56 +01:00
Christophe CURIS
6691a653a7 Configure: increased the version of Automake requested
The compilation of the WRaster library needs the keyword
EXTRA_*_DEPENDENCIES in its Makefile so the configure.ac have been updated
to require at least the version of automake in which it is added.

Reported-by: Josip Deanovic <djosip+news@linuxpages.net>
Signed-off-by: Christophe CURIS <christophe.curis@free.fr>
2015-06-20 17:34:56 +01:00
Christophe CURIS
1df08cc492 configure: Add compiler detection on non optimal floating point constant
Signed-off-by: Christophe CURIS <christophe.curis@free.fr>
2015-05-24 23:25:57 +01:00
Christophe CURIS
ea2b5f0641 wmaker: make the '--replace' de-activable at compile time
As it is really unlikely that in normal use case someone would need this
feature, it is now conditional code, which is not enabled by default; the
configure scripts now propose a '--enable-wmreplace' option to enable the
corresponding code, as people making package for distributions may want to
enable the feature to provide users the ability to give a try of all the
window managers.

Suggested-by: Carlos R. Mafra <crmafra@gmail.com>
Signed-off-by: Christophe CURIS <christophe.curis@free.fr>
2015-05-15 17:44:50 +01:00
Christophe CURIS
0bab67f9be configure: Added option to disable animations
The old behaviour was to expect the user to go modify manually a source
file which is not a great idea because that's typically the kind of things
in charge of the configure script.

Signed-off-by: Christophe CURIS <christophe.curis@free.fr>
2015-05-08 18:53:29 +01:00
Christophe CURIS
b4cf94aacd Code refactoring: replaced macro 'XDND' by 'USE_DOCK_XDND' for consistency
The usual way to define a macro in is to name macro with 'USE_xxx' when
they are used to enable a feature 'xxx'.

As the feature concerns the Dock and not DnD in general (WINGs support is
not disabled), make it a bit more clear in the macro name and document the
configure flag in the Installation Manual.

Took opportunity to compile the corresponding file only when the feature is
not disabled.

Signed-off-by: Christophe CURIS <christophe.curis@free.fr>
2015-04-18 23:29:37 +01:00
Christophe CURIS
2ebfcd9c5c configure: Added option to disable Motif WM Hints support
The old behaviour was to expect the user to go modify manually a source
file which is not a great idea because that's typically the kind of things
in charge of the configure script.

As a side effect, we can now use an automake conditional to avoid compiling
the source file in charge of the feature when not used, instead of trying
to compile an empty-looking file.

Signed-off-by: Christophe CURIS <christophe.curis@free.fr>
2015-04-18 23:29:37 +01:00
Christophe CURIS
d543decee6 configure: rewrote support for option '--disable-locale'
Renamed it to '--disable-xlocale' because the original name is misleading
about what the option really is for (it sets locale for X, not locales in
general) and updated its documentation;

Added checks to report incorrect uses to the user;

It is now possible to use '--enable-xlocale' to explicitely request for the
feature, so configure would stop if it were not found.

Signed-off-by: Christophe CURIS <christophe.curis@free.fr>
2015-01-20 21:29:24 +00:00
Christophe CURIS
f222a319b1 configure: rewrote the support for option '--with-menu-textdomain'
The idea is to include consistency check to warn the user if he is not
using it properly, instead of silently misbehaving;

Updated code style to use Autoconf macros for consistency.

Took opportunity to remove the hacky setting inside 'config-paths.h' where
it is a bit out of place, in favour of a standard DEFINE in the 'config.h'.

Include in the i18n documentation the explanation on how Window Maker
translates the menus, both when the 'menu-textdomain' option is used and
when it is not.

Signed-off-by: Christophe CURIS <christophe.curis@free.fr>
2015-01-20 21:29:24 +00:00
Christophe CURIS
bf6bc120a5 configure: replaced option '--with-nls' by autoconf's '--localedir'
Autoconf have been providing the option '--localedir' for a long time now,
so this patch removes the deprecated '--with-nls' option and makes use of
the standard '--localedir' instead.

Took opportunity to define the path in the 'config-paths.h' in the same way
the other paths are defined to be consistent, which also simplify the
compilation commands.

Signed-off-by: Christophe CURIS <christophe.curis@free.fr>
2015-01-20 21:29:24 +00:00
Christophe CURIS
2cfb2b5276 configure: rewrote detection for 'xgettext'
The main change is to use Autoconf's syntax for consistency;

Now the detected program is used in the makefiles (user has the possibility
to change the name of the command);

A conditional is used to avoid enabling make targets that would fail if
the command does not exist.

Took opportunity to implement the silent-rules compliance to POT generation
rules.

Signed-off-by: Christophe CURIS <christophe.curis@free.fr>
2015-01-20 21:29:24 +00:00
Christophe CURIS
80e00c3521 configure: rewrote the support for languages in localisation
The code was moved to a dedicated file (wm_i18n.m4) to reduce the size of
configure.ac;

It now searches for gettext+libintl only if LINGUAS is specified, because
there is no need for them otherwise;

The list of supported locales is created automatically from the list of
files present in the source tree, so there won't be problem forgetting to
update the variables when a new language is added, or removed because
one is considered outdated;

The new syntax is now using as much as possible Autoconf's syntax to ensure
consistency and better portability;

Took opportunity to improve the language check loop to make it smaller and
to tell when a locale that the user asked for is not fully supported.

Signed-off-by: Christophe CURIS <christophe.curis@free.fr>
2015-01-20 21:29:24 +00:00
Christophe CURIS
6efbb812b0 doc: create the skeleton to have a documentation for Internationalisation
The source of the documentation is in Texinfo format to have the
possibility someday to distribute in more format that just plain text;

There is a new Makefile to generate automatically the plain text file to be
distributed from the source; this doc is also generated by 'autogen.sh'
because a user would expect to find it before compiling the program, so
even before the 'configure' script have been generated, in the case he is
compiling from a git checkout;

There is a new script to generate the documentation, because from the way
we generate it we cannot assume that 'texi2any' is available  and working
on the user's computer; it is also the opportunity to generate a better
looking document (see the description at the beginning of the script);

In this commit, the documentation only contains the base skeleton, it does
not contain yet any useful content because it is worth it's own commit.

Signed-off-by: Christophe CURIS <christophe.curis@free.fr>
2015-01-20 21:29:24 +00:00
Christophe CURIS
796b557c3a configure: rewrote 2 ARG_WITH for paths to provide better feedback
The 2 options '--with-pixmapdir' and '--with-gnustepdir' did not provide
any feedback to the user if they were not used correctly. The new code now
performs more checks and tell the user about problems.

Signed-off-by: Christophe CURIS <christophe.curis@free.fr>
2015-01-02 10:08:10 +00:00
Christophe CURIS
c7843e3f3b configure: rewrote 3 ARG_ENABLEs to get them to behave properly
In addition to proper quoting for M4, the macro would not behave totally as
expected: for example, providing '--disable-modelock' would enable the
feature instead of keeping it disabled as the default.

The definitions now properly behave as expectable, so the user can
explicitly specify how he wants the feature even if it is the default; it
will also fail on improper use which is always a good idea to ease possible
future evolution.

Signed-off-by: Christophe CURIS <christophe.curis@free.fr>
2015-01-02 10:08:10 +00:00
Christophe CURIS
85a3fb13cc configure: minor updates on quoting for consistency with Autoconf's syntax
Using the appropriate quoting (with [xxx]) can spare us some problem, so
for maintainability of the script the proper quoting was added in a few
places to have a consistent file.

Signed-off-by: Christophe CURIS <christophe.curis@free.fr>
2015-01-02 10:08:10 +00:00
Christophe CURIS
78690de103 configure: cosmetic improvements on comments
This patch brings more consistency in the presentation of comments,
including:
 - 2 line spaces between blocks (M4 macro tend to make the file look quite
bulky, so it is making the file more aerated)
 - fixes in the length of underlining
 - adding a few comments on the reason of the check to ease maintainance

Signed-off-by: Christophe CURIS <christophe.curis@free.fr>
2015-01-02 10:08:09 +00:00
Christophe CURIS
2c6c7d51c9 configure: add email address for bug reports in AC_INIT
The mail address we use is the developer's mailing list; putting it in the
macro will get Autoconf to place it in a few strategic places where it is a
good idea to have it.

Signed-off-by: Christophe CURIS <christophe.curis@free.fr>
2015-01-02 10:08:09 +00:00
Christophe CURIS
f956609a43 configure: added the copyright notice at the begining of the file
This include using the AC_COPYRIGHT macro so our copyright will also be
placed in the generated configure script.

Took opportunity to update the comment on how the file should be processed
to simplify user's life.

Signed-off-by: Christophe CURIS <christophe.curis@free.fr>
2015-01-02 10:08:09 +00:00
Christophe CURIS
200b0d4098 configure: remove a few commented-out stuff that are deprecated
Signed-off-by: Christophe CURIS <christophe.curis@free.fr>
2015-01-02 10:08:09 +00:00
Christophe CURIS
99b1e26412 configure: updates as reported by 'autoupdate'
Some macros have evolved, so this patch brings the appropriate updates:
 - AC_OUTPUT(...) is now split in AC_CONFIG_FILES(...) and AC_OUTPUT, took
the opportunity to sort the list of files so it is easier to maintain

 - the macro AC_DECL_SYS_SIGLIST is now replaced by the more generic
AC_CHECK_DECLS([sys_siglist]), but as it turns out that we're not using it,
the check was just removed

 - autoconf assumes that AC_TYPE_SIGNAL is deprecated because the type was
fixed since C89, but as we expect to still run on old hardware, we keep the
macro given by autoupdate on our side for when Autoconf will stop providing
the macro

Signed-off-by: Christophe CURIS <christophe.curis@free.fr>
2015-01-02 10:08:09 +00:00
Christophe CURIS
9b67b36276 configure: add detection for O_NOFOLLOW flag to the open function
As discovered by Douglas Torrance, this flag is not really portable, so
this patch adds a check in the configure script to detect if any known
define could help. If no value works, we fall back to defining it with the
neutral value '0', so the compilation will not fail.

Signed-off-by: Christophe CURIS <christophe.curis@free.fr>
2014-12-17 17:33:56 +00:00
Christophe CURIS
be1c2a01dc configure: require a minimum version for Autoconf to avoid wrong generation
As found by Douglas Torrance, when the 'configure' script is generated
using v2.68 of autoconf then it gets wrongly generated due to a regression
in the handling of names in AS_VAR_PUSHDEF, and crashes with this kind of
sibylline messages:

checking CFLAGS for -Wtrampolines... ./configure: line 11916: wm_cv_c_check_compopt_Werror_trampolines=no, unknown: command not found

This patch adds a check on autoconf version to ensure the problem will get
caught as soon as possible.

Signed-off-by: Christophe CURIS <christophe.curis@free.fr>
2014-12-15 20:24:22 +00:00
David Maciejak
c6e323e75d WINGs: increment version
This patch is incrementing version number as the API changed.
2014-12-10 10:19:54 +00:00
Christophe CURIS
e5efbe0cf2 configure: make the gcc check for trampolines stronger
Because the use of trampolines can be a lot of problems, this patch changes
the use of the flag to:
 - make it an error if possible, so coders are forced to not use them;
 - always enable them, not just for debug, so we increase the probability
to get them caught.

Signed-off-by: Christophe CURIS <christophe.curis@free.fr>
2014-12-10 10:19:18 +00:00
Christophe CURIS
149f6b0390 configure: add a few warning flags for gcc and clang to help catch bugs
They concern topics like:
 - portability;
 - dangerous constructs;
 - clearer code for maintainability

Signed-off-by: Christophe CURIS <christophe.curis@free.fr>
2014-12-10 10:19:18 +00:00
Christophe CURIS
30e1fad926 configure: add macro to check compiler flag '-Wstrict-prototype'
Strict prototype are better for portability and to avoid bugs because it
makes sure the compiler has the information to properly validate the
arguments given when a function is called.

This flag however need special care when checking for it, because the
declaration for 'main' generated by autoconf cannot be a strict prototype
so the detection would always see the flag as failing.

This patch handles this by creating a dedicated macro for this detection
which uses a good prototype because we're in a case where it is possible,
so the detection will not always fail; it also makes sure to add the flag
to CFLAG only at the end, to avoid falsely crashing any further test done
in the configure script.

Signed-off-by: Christophe CURIS <christophe.curis@free.fr>
2014-12-10 10:19:18 +00:00