shl: move static_gl_* to shl_gl_*

No need to keep these static helpers outside of SHL. Instead, include them
in SHL to avoid any external linking.

Signed-off-by: David Herrmann <dh.herrmann@gmail.com>
shl: shader: add "len" parameter to shader sources

Shader sources may not be 0 terminated if we mmap() them. Hence, we need
to pass the length to the shader compiler. As glShaderSource() allows this
<0 as zero-terminated strings, we can simply add a parameter for the
shader length.

Signed-off-by: David Herrmann <dh.herrmann@gmail.com>
build: replace genshader by binary linker

Instead of generating C source files, we now use our binary-linker make
target which can link in any arbitrary binary file.

This way, we can delete genshader and instead link the files directly.
This speeds up compilation and makes the code more consistent.
We also strip the shaders from useless comments and whitespaces to reduce
memory consumption.

Signed-off-by: David Herrmann <dh.herrmann@gmail.com>
build: mark XSLTPROC with AC_ARG_VAR

This allows changing the path to XSLTPROC via the command-line option if
it cannot be found by autoconf.

Signed-off-by: David Herrmann <dh.herrmann@gmail.com>
build: mark binary data as read-only with objcopy

Check for objcopy in configure.ac and then mark binary data as read-only
by renaming .data to .rodata and setting the correct flags.

Signed-off-by: David Herrmann <dh.herrmann@gmail.com>
genunifont: remove useless status message

No reason to clutter build output with this debug message. Drop it.

Signed-off-by: David Herrmann <dh.herrmann@gmail.com>
uterm: input: add built-in keymap fallback

This adds a small US-keymap to the uterm library which is loaded if we
cannot find a suitable system default keymap. This allows using the keymap
if no XKB keymaps are installed.

Thanks to Ran Benita for the minimal US keymap.

Signed-off-by: David Herrmann <dh.herrmann@gmail.com>
build: strip \r from shaders

\r is rarely used and probably always escaped in strings so we can safely
erase it together with \n to reduce its size.

Signed-off-by: David Herrmann <dh.herrmann@gmail.com>
uterm: input: use shl_llog instead of shl_log

We should use library-logging in uterm to avoid cluttering stderr for
applications. Hence, use llog instead of log directly.

Signed-off-by: David Herrmann <dh.herrmann@gmail.com>
shl: log: don't use strerror()

strerror() is not re-entrant safe so we should use %m instead.

Signed-off-by: David Herrmann <dh.herrmann@gmail.com>
shl: log: check for trailing newlines

If the format string contains a trailing newline, we now skip writing our
own. We also skip the fn+file information as it would be written on the
next line.

Trailing newlines occur only when forwarding messages from other
libraries. In this case we don't need the fn+file information, anyway.

Signed-off-by: David Herrmann <dh.herrmann@gmail.com>
uterm: input: forward xkbcommon log messages

Instead of letting xkbcommon write to stderr, we now forward these
messages via the llog handler.

Signed-off-by: David Herrmann <dh.herrmann@gmail.com>