Now that the built-in parser has support for all the feature of CPP
being used by WindowMaker's default menu, we can remove the stuff
related to calling CPP:
- code for preparing and running CPP;
- compile-time option to de-activate the call to CPP;
- command-line option
Xrandr support is currently very primitive and stupid, but people
do not seem to be aware of its problems and still enable it in distros.
Try to scare them to not do that.
It was removed on 67a8a82670 with the assumption that
nothing was using it. But that was not really the case - FSViewer
used it.
I've just tested it. After a trivial fix regarding the change in
the function definition of WMWritePropListToFile(), FSViewer
compiles and even seems to work (didn't test much though).
So let's not be unfair with FSViewer and put wmlib back. FSViewer
might even be used for educational purposes for people wanting to
write apps using WINGs etc.
The summary now looks like:
Window Maker was configured as follows:
Installation path prefix : /usr/local
Installation path for binaries : /usr/local/bin
Installation path for libraries : /usr/lib64
Installation path for WPrefs.app : /usr/local
Supported graphic format libraries : XPM PNG JPEG TIFF builtin-PPM
Antialiased text support in WINGs : yes
Xinerama extension support : yes
XRandR extension support : yes
Translated message files to install : None
I want to see the library line in order to avoid forgetting that
I should put them in /usr/lib64 (and not in the defaul /usr/local/lib)
* Remove assigned but not used variables (GCC 4.6)
* Bump _XOPEN_SOURCE to 600, ridding of FreeBSD warnings (this probably need
to be tweaked on a per-implementation basis as problems arise)
The previous patch "Fix path substitutions" accidentally caused autoconf
to overwrite automake's pkgdatadir. Since configure.ac does absolutely
nothing interesting with pkgdatadir anyway, just remove it completely.
Signed-off-by: Brad Jorsch <anomie@users.sourceforge.net>
Autoconf uses multiple levels of variables when defining paths. For
example, ${datadir} by default is ${datarootdir}, which by default is
${prefix}/share, which by default is /usr/local. Substituting from
./configure, as is done by AC_DEFINE or AC_DEFINE_UNQUOTED, does not
expand all these variables. This was causing some of our defines to have
garbage like "${prefix}/share/pixmaps" rather than the intended
"/usr/local/share/pixmaps".
The solution is to generate the files needing these paths from the
Makefile rather than from ./configure, because make does fully expand
all those levels.
Signed-off-by: Brad Jorsch <anomie@users.sourceforge.net>
How to use:
- Install LCOV (http://ltp.sourceforge.net/coverage/lcov.php)
- AFAICT, compiler must be GCC.
- ./configure --prefix=/some/path --enable-lcov=/var/www
This will configure the sources so that generated coverage information
(HTML pages) will end up in /var/www/coverage-report. Choose a directory
you have write access to.
- make
No installation necessary (although it probably doesn't hurt to have
WM installed in ${prefix} so it can find resources and stuff, but the
build tree must be kept intact anyway).
- Put ${srcroot}/src, ${srcroot}/WPrefs.app and ${srcroot}/util first in
your path.
- Arrange for your .xinitrc or DM to start ${srcroot}/src/wmaker as your
window manager.
- Use it as you normally would, possibly for an extended period of time.
- make coverage.
This will create a tree of web pages under /var/www/coverage-report
- Further `make coverage's (after some more use) will re-generate the
report (deleting the directory first).
- `make coverage-reset' will reset execution counts to zero (see lcov(1)).
Signed-off-by: Tamas TEVESZ <ice@extreme.hu>
- Change the wusleep abomination to be a simple wrapper around
nanosleep (man says it's been POSIX for almost a decade)
- Remove autoconf tests that became unnecessary along the way
Signed-off-by: Tamas TEVESZ <ice@extreme.hu>
- on_exit is nowhere to be found in recent written history
- so there haven't for long been a system with !HAVE_ATEXIT
- so there is no need for either #ifdef HAVE_ATEXITs or configure
checks for atexit
Signed-off-by: Tamas TEVESZ <ice@extreme.hu>
On the one hand, libWINGs wasn't linking against -lX11 when it should
have been. And on the other, only libWINGs needs Xft, only wmaker needs
Xrandr, only wmaker and wmsetbg need Xinerama, only libwraster needs
Xmu, and -lpng may not need -lz.
Cleaning this up can help distributions get their dependencies correct,
and might even avoid loading the unused libraries at runtime, so we may
as well do it.
Signed-off-by: Brad Jorsch <anomie@users.sourceforge.net>
On BSD systems, strlcat and strlcpy are included in the C library and
nothing special is needed. On Linux systems they are not, but libbsd may
be available to provide them. Use it if so.
This also adds wstrlcat and wstrlcpy instead of trying to maybe-provide
strlcat and strlcpy themselves, as that way there is no risk of symbol
conflicts. Not bumping the library version at this time, that should be
done (if necessary) before release.
Signed-off-by: Brad Jorsch <anomie@users.sourceforge.net>
The comment in WINGs/memory.c:wfree() pretty much explains the current
situation. There's an incredible amount of mixing the wmalloc/wfree
wrappers with native mallocs/frees on the other side, and a good several
cases of misusing external libraries' APIs. Until this is thoroughly
cleaned, WM with --enable-boehm-gc will hardly even start.
Signed-off-by: Tamas TEVESZ <ice@extreme.hu>
Commit acc868d91d tried to change
--with-appspath to --with-gnustepdir, but either it wasn't done
correctly (and no one noticed) or old versions of AC_ARG_WITH worked
completely differently (and in an extremely odd way) because the option
remained --with-appspath and just the help text was changed. Then commit
bde572f673, which claims to have been
fixing some sort of issue with path assignment, broke it completely (i
guess) because the author there trusted the help text.
This completes the change from commit
acc868d91d that makes the option really be
--with-gnustepdir.
Signed-off-by: Brad Jorsch <anomie@users.sourceforge.net>
Remove local strcasecmp implementation; whatever system doesn't have it
is off the table for now.
memcmp is used by WINGs; add autoconf check
Signed-off-by: Tamas TEVESZ <ice@extreme.hu>
Some people using nvidia and/or playing some games (e.g. Einstein)
are reporting some issues with the restart induced by the
resolution changing. Let's disable it by default.
People without nvidia cards etc can still enable it with
--enable-xrandr.
Signed-off-by: Carlos R. Mafra <crmafra@gmail.com>
When generating menus, lookup translations for menu entries in
specified textdomain. Often used by linux distributions.
Original-patch-by: Alexey Voinov <voins@altlinux.ru>
Signed-off-by: Alexey I. Froloff <raorn@altlinux.org>
Keep libtool's -version-info arguments for the three libraries
(libwraster, libWINGs and libWUtil) centralized in configure.ac
instead of in the specific Makefile.am.
If AC_INIT is invoked without tarname argument PACKAGE_TARNAME and
PACKAGE will be sanitized (lowercased, and all characters other than
alphanumerics and underscores are changed to ‘-’.)
For windowmaker this has the sideeffect of changing install directories,
util/wmaker.inst installs stuff to #pkgdatadir# which suddenly is
/usr/share/windowmaker instead of /usr/share/WindowMaker.
Supplement AC_INIT invokation with tarname (and while we are at it url)
argument to fix this.
The code was added in 2001 in commit acdc0e3d6b for
"backwards compat". This motivation no longer exists in 2010,
so there is no reason to keep a private implementation of
a standard function from the C library.
Instead of using the --disable-verbose-compile hack, let's
use the standard option --enable-silent-rules (or 'make V=0' directly)
available with autoconf 1.11 and higher.
This is enabled in autoconf by using 'silent-rules' in AM_INIT_AUTOMAKE.
The verbosity of compilation is reduced in a similar manner as using
the --disable-verbose-compile option, so we can remove all that ugly
hackery.
According to the autoconf manual, using AS_HELP_STRING is recommended
to avoid having to manually adjust the alignment of help text
in ./configure --help
This patch makes wmaker automatically Restart() to take into account
resolution changes done by xrandr.
The motivation to write this patch is that when I start my laptop connected
to an external monitor (VGA1), the resolution in the monitor is initially
wrong (perhaps this is a bug in XOrg or OpenSuse, but anyway), so I always
do this after starting wmaker:
xrandr --output VGA1 --preferred
The resolution in the external monitor gets fixed, but wmaker does not
recognize the change automatically and I have to manually restart it.
So this patch avoids the last step by making wmaker be XRandR-aware.
Wmaker now restarts automatically when it receives a RRChangeScreenNotify
event and I don't have to do the last part of the silly procedure described
above.
I am not sure if restarting wmaker is the most elegant solution, but
it at least solves part of my issue with wmaker + xrandr.
libWINGs is using mathematical functions (atan, sqrt, etc.). Check
whether we need to lik against libm to use these and link libWINGs
against it if necessary.
The "make dist" command can be used to generate the release tarball, but
only if the Makefile.am correctly specifies EXTRA_DIST, specifies
headers in foo_SOURCES, and so on.
- 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
- Does away with the O_BINARY abomination
- as a byproduct, plugs an fd leak in wcolorpanel.c:fetchFile()
- sprinkle some fsync()s to files that have been written to (this
needs to be done everywhere)
+ fix brown paper bag thinko in configure.ac