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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
This flag is always detected as unsupported because every time autoconf is
generating a test program for any feature, it puts at the beginning of the
test source all the '#define' that have been detected so far, which is what
we expect normally.
But for this option, as we cannot reasonably make a dummy use of every
macro, the warning triggers and falsely gets autoconf into thinking it does
not work.
This patch creates a dedicated macro (WM_CFLAGS_GCC_OPTION_UNUSEDMACROS)
for this flag, which works around the problem by having no '#define' in the
test source. It also adds a new macro WM_CFLAGS_GCC_OPTION_POSTPONED
because if the flag works, we still cannot add it to the compilation
command because it could fail all further tests done, so the macro will add
it to CFLAGS only at the end.
Signed-off-by: Christophe CURIS <christophe.curis@free.fr>
There are a few cases in which nested functions are an helpful way to write
code, as this is explained in 'script/nested-func-to-macro.sh'. However,
some compiler do not support them (like clang), so this patch proposes an
elegant solution, where developers can get the benefit of them, but for
users they are automatically converted to C macro if needed.
The advantage of this solution is that we keep the code simple, there is no
hack in the source (like #ifdef and code duplication), yet still having the
full advantages.
The translation is done according to what have been detected by configure
(see the WM_PROG_CC_NESTEDFUNC macro) so that user has nothing to do.
Signed-off-by: Christophe CURIS <christophe.curis@free.fr>
As reported by Milan Čermák, Solaris needs extra library 'rt' to have
access to that POSIX function, so we properly check for it.
Signed-off-by: Christophe CURIS <christophe.curis@free.fr>
Currently WINGs renders text using Xft directly which does not support
any advanced text layout that is needed for scripts like Arabic or Indic
scripts (or even things like automatic ligature support for Latin
script).
With Pango we also get text fallback for free, so no more square boxes
for characters not supported in the current font (unless no font on the
system supports the specified character, of course).
This patch introduces support for using Pango to render the text (though
its Xft backed), to avoid forcing the additional dependency to everyone
it is made off by default.
Signed-off-by: Carlos R. Mafra <crmafra@gmail.com>
This patch is removing the experimental status of
drag-nd-drop support on the dock and adding an option
to disable the feature from the configure step.
WRaster:
- new function 'RShutdown'
- removed flag 'optimize_for_speed' from RContext
- new functions '...(operate_xxx)', '...(flip_image)'
WUtil:
- new function 'wutil_shutdown'
- new macro 'wlengthof'
WINGs:
- new function 'WMReleaseApplication'
- new function 'WMCreateScaledBlendedPixmapFromFile'
(And maybe a few more I missed)
Signed-off-by: Christophe CURIS <christophe.curis@free.fr>
Based on libexif feature, this patch is adding orientation
detection and provides 2 more shortcuts for live
right/left rotation. Internal version was bumped to 0.7.
As pointed by Coverity (#50226), the function getenv can return unreliable
data, so if a sensitive application makes uses of the function 'wgethomedir'
or 'wusergnusteppath' we'd better use the GNU function secure_getenv which
ignore environment variable when used in a known critical cases.
Signed-off-by: Christophe CURIS <christophe.curis@free.fr>
Took the opportunity to expand the WM_LIB_CHECK macro because it is not
suited for the case where compilation flags can be queried but was meant
for the case when they have to be guessed
Signed-off-by: Christophe CURIS <christophe.curis@free.fr>
This patch is adding support for google webp image format, if you
don't know it a quick recap is to say that according to their tests
they claim it is better than png and jpeg.
Follow the link below for some more details:
https://developers.google.com/speed/webp/
Signed-off-by: Carlos R. Mafra <crmafra@gmail.com>
This patch is used to add support for syslog messaging implemented in
WINGs lib directly, so available from the lib itself and wmaker too.
I believe it will in a first time help to get some logging info
centralized in one point, and in a second time maybe add some info
level messages like wmaker is starting, stopping, restarting and else.
For now, it's built by default when the syslog support is found, maybe
we could also disable it by default.
This patch is replacing XRandR naming to RandR,
as XRandR is the name of the tool used in X11 and RandR
is the technology WMaker wants to support.
I had to update the info panel too, when many features are
activated not all of them can be displayed properly.
Because the existing nl locale files are ancient and obsolete,
the user interface stays mainly in English with hardly Dutch text
showing up.
This is a complete translation in 6 parts from scratch, using the
current (pl)menus and Makefile generated .pot files. These files
provide a very good, and thoroughly checked user interface in the
Dutch language.
Adding me as a maintainer in related README files; removing previous
maintainer (e-mail bounced).
Removing unnecessary executable bit from pt.po on the fly.
The original code supposed that the library was available and ready to use.
As it may not be the case (modern distro generally don't include dev files
by defaults), add a the appropriate checks to make sure WRaster compilation
will not fail later.
Signed-off-by: Christophe CURIS <christophe.curis@free.fr>
The original check was not compliant with autoconf's syntax, did not have
a very good behaviour for user and was not easy to make evolve.
The new macro:
- uses as much as possible autoconf macros for portability and code
consistency;
- checks also for header usability with the compiler;
- provides a consistent behaviour on yes/no/auto (if user explicitly
enables support, do not silently disable if not found; if library is found
but not the header, complain to let user install it or explicitly disable
support)
Signed-off-by: Christophe CURIS <christophe.curis@free.fr>
The usual way to define a macro in is to name macro with 'USE_xxx' when
they are used to enable a feature 'xxx'.
Signed-off-by: Christophe CURIS <christophe.curis@free.fr>
The original check was not compliant with autoconf's syntax, did not have
a very good behaviour for user and was not easy to make evolve.
The new macro:
- uses as much as possible autoconf macros for portability and code
consistency;
- checks also for header usability with the compiler;
- provides a consistent behaviour on yes/no/auto (if user explicitly
enables support, do not silently disable if not found; if library is found
but not the header, complain to let user install it or explicitly disable
support)
Signed-off-by: Christophe CURIS <christophe.curis@free.fr>
The usual way to define a macro in is to name macro with 'USE_xxx' when
they are used to enable a feature 'xxx'.
Signed-off-by: Christophe CURIS <christophe.curis@free.fr>
The original check was not compliant with autoconf's syntax, did not have
a very good behaviour for user and was not easy to make evolve.
The new macro:
- uses as much as possible autoconf macros for portability and code
consistency;
- checks also for header usability with the compiler;
- provides a consistent behaviour on yes/no/auto (if user explicitly
enables support, do not silently disable if not found; if library is found
but not the header, complain to let user install it or explicitly disable
support)
The feature is also no more disabled by default, as it is something user
would expect from a modern window manager.
Signed-off-by: Christophe CURIS <christophe.curis@free.fr>
The usual way to define a macro in is to name macro with 'USE_xxx' when
they are used to enable a feature 'xxx'
Signed-off-by: Christophe CURIS <christophe.curis@free.fr>
The original check was not compliant with autoconf's syntax, did not
have a very good behaviour for user and was not easy to make evolve.
The new macro:
- uses as much as possible autoconf macros for portability and code
consistency;
- checks also for header usability with the compiler;
- provides a consistent behaviour on yes/no/auto (if user explicitly
enables support, do not silently disable if not found; if library is found
but not the header, complain to let user install it or explicitly disable
support)
Signed-off-by: Christophe CURIS <christophe.curis@free.fr>
The usual way to define a macro in is to name macro with 'USE_xxx' when
they are used to enable a feature 'xxx'
Signed-off-by: Christophe CURIS <christophe.curis@free.fr>
The macro 'AC_ISC_POSIX' is now said to be deprecated, so we use the new
recommended check instead as we make light use of the corresponding
function.
Signed-off-by: Christophe CURIS <christophe.curis@free.fr>
This attribute reports cases where GCC has to generate special code to
handle some C constructs, for which we'd prefer an explicit code instead
of counting on GCC doing the work.
Signed-off-by: Christophe CURIS <christophe.curis@free.fr>
This attribute helps the compiler checking the type matching between
arguments and the specification in a printf-like format string, to
avoid invalid output. This attribute is optional, but some compilers
can suggest functions that could have it.
This patch adds the appropriate compiler flags if they are supported when
the source is being compiled with DEBUG enabled.
The patch also introduces a new macro WM_CFLAGS_CHECK_FIRST because in some
cases AX_CFLAGS_GCC_OPTION is not really efficient and in present case it
does not fits the job.
Signed-off-by: Christophe CURIS <christophe.curis@free.fr>
The idea is to:
- have a consistent looking file by using autoconf macros
- provide better feedback on improper option usage
Signed-off-by: Christophe CURIS <christophe.curis@free.fr>
Some compiler support C11 standard by default, some need an explicit
option, and some don't support at all; this new macro only tries to enable
support if possible, the actual feature support being done by other checks
on case-by-case
Signed-off-by: Christophe CURIS <christophe.curis@free.fr>