As reported by David Maciejak, when libXinerama was not found on the
system, the configure script still tried to search for associated
header and stopped all with unclear message.
The proper behaviour that was expected is to accept silently that
libXinerama may not be missing, and only stop compilation when the lib
is present but not its header.
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 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 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 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>
There are a number of steps in the library check procedure that are a bit
repetitive, and have been placed into the macro WM_LIB_CHECK to make the
code simpler to write.
Signed-off-by: Christophe CURIS <christophe.curis@free.fr>
The function can have a wider use, so moved then to a more neutral place
and gave them more generic names.
Signed-off-by: Christophe CURIS <christophe.curis@free.fr>
When autoconf encounters a macro name that it does not know, it assumes
that it is just a standard keyword that needs to end up in the generated
configure script.
This patch teaches m4 about the syntax used for our macros so it can now
that it is supposed to be a macro, and then it can stop and report the
problem.
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>
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>
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;
- 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);
- makes uses of shell functions to keep generated configure smaller by
sharing reusable stuff;
- uses an automake conditional to avoid compiling the file is support is
not enabled
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;
- 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);
- makes uses of shell functions to keep generated configure smaller by
sharing reusable stuff;
- uses an automake conditional to avoid compiling the file is support is
not enabled
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;
- 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);
- makes uses of shell functions to keep generated configure smaller by
sharing reusable stuff;
- uses an automake conditional to avoid compiling the file is support is
not enabled
It includes a typo fixed by Amadeusz S-B³awiñski.-A
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;
- 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);
- makes uses of shell functions to keep generated configure smaller by
sharing reusable stuff;
- uses an automake conditional to avoid compiling the file is support is
not enabled
Signed-off-by: Christophe CURIS <christophe.curis@free.fr>
As reported by Nicolas (nhs), compilation of wrlib is broken when
switching to gif_lib v5.
The API of gif_lib has known little change to provide thread-safe usage,
so we now detect this in configure and and use the functions as appropriate
in gif.c
Signed-off-by: Christophe CURIS <christophe.curis@free.fr>
Signed-off-by: Carlos R. Mafra <crmafra@gmail.com>
The use of the conditionals provided by autotools provides a better result
as they avoid unnecessary compilation.
Signed-off-by: Christophe CURIS <christophe.curis@free.fr>
Signed-off-by: Carlos R. Mafra <crmafra@gmail.com>
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;
- 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);
- makes uses of shell functions to keep generated configure smaller by
sharing reusable stuff;
- introduces a tracking of unsupported things to be reported to user
It includes a fixes from a problem found by Amadeusz S-B³awiñski, because-A
the function 'wm_fn_imgfmt_try_link' modified the variable LDFLAGS
instead of LIBS.
Signed-off-by: Christophe CURIS <christophe.curis@free.fr>
Compilation will not work if the header is missing, so make sure
it is present and compilable first. This can highligh sooner if
a user forgot to install the corresponding dev package.
Signed-off-by: Christophe CURIS <christophe.curis@free.fr>
Took the opportunity to rewrite the check using autoconf macros
to generate a more compatible configure script.
Signed-off-by: Christophe CURIS <christophe.curis@free.fr>
This attribute for functions was not standard until recently, so
there are a few different possible syntax. With this patch, the
configure script will search for the proper syntax, and define what
is needed to have the attribute compile correctly.
Signed-off-by: Christophe CURIS <christophe.curis@free.fr>
- according to the automake manual, `acinclude.m4' is the old style
of doing stuff, putting local macros in their own directory is the
way to go, so move acincluce.m4 to m4/windowmaker.m4
- reflect this in autogen.sh and Makefile.am
- while there, add a `conditionally set cflags' macro from the
autoconf macro archive
- use this to slightly pump warning levels up if we are on gcc