1
0
mirror of https://github.com/gryf/wmaker.git synced 2025-12-19 12:28:22 +01:00
Commit Graph

25 Commits

Author SHA1 Message Date
Christophe CURIS
101e24b0be Fixed xinerama detection
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.
2014-02-13 09:02:38 +00:00
Christophe CURIS
c7f745c353 Configure: Added proper check for Xmu library for WRaster
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>
2013-12-30 18:11:06 +00:00
Christophe CURIS
b8b59d939d Configure: Moved configure's detection of XShm to a dedicated macro
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>
2013-12-30 18:11:06 +00:00
Christophe CURIS
ee3422dd10 configure: Moved configure's detection of XRandR to a dedicated macro
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>
2013-12-30 18:11:06 +00:00
Christophe CURIS
2a7a4d77d7 configure: Moved configure's detection of Xinerama to a dedicated macro
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>
2013-12-30 18:11:06 +00:00
Christophe CURIS
1292b5a0cc configure: Moved configure's detection of XShape to a dedicated macro
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>
2013-12-30 18:11:06 +00:00
Christophe CURIS
64a95b73c3 configure: Created new macro to perform the repetitive part of Library check
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>
2013-12-30 18:11:06 +00:00
Christophe CURIS
da597a4b87 configure: Created new macro to append only once a flag to a variable
Signed-off-by: Christophe CURIS <christophe.curis@free.fr>
2013-12-30 18:11:06 +00:00
Christophe CURIS
fbe202f49b configure: made the functions to try lib link+compile more generic
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>
2013-12-30 18:11:06 +00:00
Christophe CURIS
e946ef3ae5 configure: Added m4 check to detect possible non-expanded macros
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>
2013-12-30 18:11:05 +00:00
Christophe CURIS
a3ee595115 configure: Removed macro that are not used anymore
...and took opportunity to add the traditional copyright notice

Signed-off-by: Christophe CURIS <christophe.curis@free.fr>
2013-12-30 18:11:05 +00:00
Christophe CURIS
fc825382d6 configure: Enable compiler warnings to help add 'format' attribute
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>
2013-12-30 18:11:04 +00:00
Christophe CURIS
f9c1265604 configure: Added a check to try to enable STD C11 if possible
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>
2013-12-30 18:11:03 +00:00
Christophe CURIS
b66a890404 wrlib: Moved configure's detection of XPM support to a dedicated macro
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>
2013-12-30 18:11:03 +00:00
Christophe CURIS
a5ca34ccb1 wrlib: Moved configure's detection of TIFF support to a dedicated macro
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>
2013-12-30 18:11:02 +00:00
Christophe CURIS
1c21d946ec wrlib: Moved configure's detection of PNG support to a dedicated macro
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>
2013-12-30 18:11:02 +00:00
Christophe CURIS
777bf28ab3 wrlib: Moved configure's detection of JPEG support to a dedicated macro
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>
2013-12-30 18:11:02 +00:00
Christophe CURIS
a7663fbbcf wrlib: Add support for v5 of the gif_lib API
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>
2013-12-30 18:11:02 +00:00
Christophe CURIS
7831acebe3 wrlib: Use a Conditional for GIF in the makefile instead of #if in source
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>
2013-12-30 18:11:02 +00:00
Christophe CURIS
f892ce4d37 configure: Moved detection of GIF support to a dedicated macro
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>
2013-12-30 18:11:02 +00:00
Christophe CURIS
95ee539d6d Configure: Added explicit check for math library header
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>
2013-06-17 01:54:06 +01:00
Christophe CURIS
f68ec6c913 Configure: Moved check for Math lib to a dedicated M4 macro
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>
2013-06-17 01:16:51 +01:00
Christophe CURIS
34089d7661 Configure: Added check for compiler attribute 'noreturn'
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>
2013-06-09 18:46:56 +01:00
Andreas Metzler
44edeea804 Import ld-version-script.m4 from gnulib
ld-version-script.m4 provides a test to check whether binutils support
symbol versioning.
2010-08-29 18:38:21 +02:00
Tamas TEVESZ
1bc042c172 Autoconf mods
- 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
2010-04-01 11:40:08 +02:00