Commit graph

44 commits

Author SHA1 Message Date
Peter Hutterer
da6de93985 libevdev 0.9.1
libevdev 1.0-rc1

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2014-01-29 15:09:05 +10:00
Peter Hutterer
def04e91e7 Bump soname
Bump once to the stable interface we have now. This isn't really required as
we're compatible with everything but functions deprecated with 0.4 but we
might as well do it now to force a rebuild of everyone. Should've done that
for 0.6 when we actually dropped the function, but ...

Now that we have proper library versioning we shouldn't need any
backwards-incompatible soname bumps for a while.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: David Herrmann <dh.herrmann@gmail.com>
2014-01-29 15:02:45 +10:00
Peter Hutterer
cea8f0b8cc Drop the argparse requirement for make-event-names.py
We only take one option (path to linux/input.h) anyway so drop the argparse
requirement. This way libevdev builds on RHEL6 too which doesn't ship
argparse.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Benjamin Tissoires <benjamin.tissoires@gmail.com>
2014-01-15 08:01:31 +10:00
Peter Hutterer
5c2605c039 libevdev 0.6
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2013-12-23 17:38:07 +10:00
Peter Hutterer
94628309f9 doc: add a placeholder man page
We don't provide man pages (the ones created by doxygen are pretty
terrible) so provide a placeholder page to provide the minimum info and point
people in the right direction.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2013-12-09 08:46:24 +10:00
David Herrmann
cc54b786a7 build: set aux-dir
If we don't set AUX_DIR, I get errors during ./configure:
  /bin/sh: /home/david/missing: No such file or directory
  configure: WARNING: 'missing' script is too old or missing

This error is ignored by default, but may cause failures with newer
autoconf versions. Simply set the AUX_DIR to "build-aux" like many other
autotools projects do.

[This is an automake 1.14 bug, see the upstream report:
http://lists.gnu.org/archive/html/bug-automake/2013-11/msg00007.html]

Signed-off-by: David Herrmann <dh.herrmann@gmail.com>
Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2013-12-04 14:48:17 +10:00
Peter Hutterer
bd5d247b4e libevdev 0.5
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2013-11-22 09:43:31 +10:00
Gaetan Nadon
a6400cd8da python: request version 2.6 or higher
This seems like a reasonable minimum version to require.
Available in RHEL6 (2010) or Ubuntu (2010).

Version 2.7 contains the argparse module so the check could be removed.
The argparse module was introduced in v2.3.5 as an optional module.

http://www.python.org/doc/versions/

Signed-off-by: Gaetan Nadon <memsize@videotron.ca>
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2013-11-20 07:50:22 +10:00
Gaetan Nadon
f15afcb795 configure.ac: remove redundant AC_SUBST(PYTHON)
This is already done by AM_PATH_PYTHON.

Signed-off-by: Gaetan Nadon <memsize@videotron.ca>
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2013-11-20 07:50:22 +10:00
Gaetan Nadon
fdb42481ef configure.ac: AC_PROG_CC_C99: use C99 compiler
Given the close ties with input drivers and xserver, might
as well use the same level of compiler.

Signed-off-by: Gaetan Nadon <memsize@videotron.ca>
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2013-11-20 07:50:22 +10:00
Gaetan Nadon
5c1f55d9ce configure.ac: add copyright statement
Signed-off-by: Gaetan Nadon <memsize@videotron.ca>
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2013-11-20 07:50:22 +10:00
Gaetan Nadon
2b0db220d4 configure.ac: AC_INIT: add bug report url
Signed-off-by: Gaetan Nadon <memsize@videotron.ca>
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2013-11-20 07:50:22 +10:00
David Herrmann
0f4726c3e3 build: set AC_CONFIG_SRCDIR
This macro is used to verify that $srcdir is set correctly by testing for
existance of the passed file. Shouldn't hurt setting it to catch wrong
build setups.

Cc: Gaetan Nadon <memsize@videotron.ca>
Signed-off-by: David Herrmann <dh.herrmann@gmail.com>
Reviewed-by: Gaetan Nadon <memsize@videotron.ca>
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2013-11-06 07:01:44 +10:00
Peter Hutterer
34d52e143d Require autoconf 2.62
According to Gaetan, that's what we really require. And as a bonus point, this makes libevdev build
on RHEL6 out-of-the-box.

CC: Gaetan Nadon <memsize@videotron.ca>
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2013-10-31 11:23:13 +10:00
Peter Hutterer
e1cabf4f67 Revert "Check for linux/input.h during configure"
We now ship our own linux/input.h, so no need to have the header around locally.

This reverts commit fcf80ba371.
2013-10-23 09:04:41 +10:00
Peter Hutterer
db3ecc334b configure: test for python and python-argparse
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: David Herrmann <dh.herrmann@gmail.com>
2013-10-21 20:17:22 +10:00
Peter Hutterer
fcf80ba371 Check for linux/input.h during configure
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2013-10-08 14:53:01 +10:00
Peter Hutterer
3a4706796e Use AC_MSG_RESULT to print the few configuration options
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Benjamin Tissoires <benjamin.tissoires@gmail.com>
2013-10-02 09:55:08 +10:00
Peter Hutterer
c8b5f6a08f Disable gcov by default
Having libevdev build with profiling enabled by default
leaves profiling files around. Profiling is something that only
libevdev developers should need, so let them enable it
case-by-case.

https://bugzilla.redhat.com/show_bug.cgi?id=1012180

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Benjamin Tissoires <benjamin.tissoires@gmail.com>
2013-10-02 09:40:43 +10:00
Peter Hutterer
f6fc441c73 libevdev 0.4
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2013-09-18 14:38:26 +10:00
Peter Hutterer
e156f9a11c Drop duplicate compiler flag
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2013-09-16 16:00:06 +10:00
Peter Hutterer
3dc41b29b7 Revert "Reintroduce -fstack-protector"
http://lists.freedesktop.org/archives/input-tools/2013-September/000332.html
See above a detailed reasoning, but Colin Walters put it this way:

"At a high level, I think components (git repositories) should feel free
to set up default warning flags and possibly use a targeted subset of
-Werror=foo.  But please don't inject non-warning flags like this unless
there is a very good reason.

The right way to do -fstack-protector is to have something like
redhat-rpm-config or other global CFLAGS system controlling *all*
components."

Thus, reverting the -fstack-protector flag. This doesn't completely address
Colin's comments, we still use a few other flags. But this one is the one
that causes real headaches, so drop it.

This reverts commit f5e65ea3ce.
2013-09-16 15:55:10 +10:00
David Herrmann
f5e65ea3ce Reintroduce -fstack-protector
We removed this previously due to build failures in:

  commit 14ac764ec8
  Author: David Herrmann <dh.herrmann@gmail.com>
  Date:   Mon Sep 9 16:03:41 2013 +0200

      build: remove -fstack-protector

Reintroduce it but this time disable it if it's not supported. We use the
CC-flags testing to prevent build-failures on gcc without libssp support.

Cc: Giovanni Campagna <gcampagn@redhat.com>
Signed-off-by: David Herrmann <dh.herrmann@gmail.com>
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2013-09-13 15:51:23 +10:00
David Herrmann
92b2b1ccd5 Test for CFLAGS/LFLAGS availability
Use the CC_CHECK_FLAGS_APPEND() m4 macro to test for availability of
CFLAGS and LFLAGS. It automatically drops the unavailable flags.

This is also used by systemd, so it ought to work with ostree and other
non-standard build-environments.

Signed-off-by: David Herrmann <dh.herrmann@gmail.com>
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2013-09-13 15:49:50 +10:00
Peter Hutterer
7421760eae Require check 0.9.9
0.9.9 is the first released version with fixed ck_assert_* macros that don't do
multiple expansion.

http://sourceforge.net/p/check/code/596/

Reported-by: Martin Minarik <minarik11@student.fiit.stuba.sk>
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2013-09-11 12:07:51 +10:00
David Herrmann
14ac764ec8 build: remove -fstack-protector
If gcc is built without libssp support, it loudly fails linking due to
missing __stack_chk_*() helpers. Unfortunately, gcc isn't smart enough to
disable it automatically.

systemd recently got a CC_CHECK_FLAG_APPEND helper to work around such
issues:
  http://cgit.freedesktop.org/systemd/systemd/tree/m4/attributes.m4

I didn't want to add it now, so let's just drop -fstack-protector. If we
want it, we can try adding it later again.

This partially reverts:
  commit 43752ec17d
  Author: David Herrmann <dh.herrmann@gmail.com>
  Date:   Sun Sep 1 17:45:04 2013 +0200

      Add some gcc/ld optimizations and magic

All other gcc/ld options are kept.

Reported-by: Giovanni Campagna <gcampagn@redhat.com>
Signed-off-by: David Herrmann <dh.herrmann@gmail.com>
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2013-09-10 10:18:06 +10:00
Giovanni Campagna
5b28e0292d configure: add missing comma
Without that, it becomes impossible to build without gcov.

Signed-off-by: Giovanni Campagna <scampa.giovanni@gmail.com>
Reviewed-by: David Herrmann <dh.herrmann@gmail.com>
Reviewed-by: Benjamin Tissoires <benjamin.tissoires@gmail.com>
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2013-09-10 10:01:19 +10:00
Peter Hutterer
0b712e6f86 Check for GNU ld and use the flags depending on the outcome
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: David Herrmann <dh.herrmann@gmail.com>
2013-09-04 07:54:09 +10:00
David Herrmann
95df174f06 Remove -g from default GCC_CFLAGS
-g should be set by debugging-options or in the default CFLAGS="", we
shouldn't force it in GCC_CFLAGS.

Reported-by: Peter Hutterer <peter.hutterer@who-t.net>
Signed-off-by: David Herrmann <dh.herrmann@gmail.com>
Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2013-09-03 07:31:40 +10:00
David Herrmann
43752ec17d Add some gcc/ld optimizations and magic
There are several gcc/ld flags that optimize size and performance without
requiring explicit code changes. In no particular order, this adds:
 - gcc -pipe to avoid temporary files and use pipes during compilation
 - gcc -fno-common avoids putting uninitialized global variables not
   marked as "extern" into a common section. This catches compilation
   errors if we didn't mark global variables explicitly as "extern".
 - gcc -fno-strict-aliasing allows us to use unions for some binary magic.
   Otherwise, -O2 might assume that two different types never point at the
   same memory. We currently don't rely on this but it's common practice
   so avoid any non-obvious runtime errors later.
 - gcc -ffunction-sections and -fdata-sections put each function and
   variable into a separate section. This enables ld's --gc-sections to
   drop any unused sections (sections which aren't referenced from an
   exported section). This is very useful to avoid putting dead code into
   DSOs. We can now link any helper function into libevdev and the linker
   removes all of them if they're unused.
 - gcc -fstack-protector adds small stack-corruption protectors in
   functions which have big buffers on the stack (>8bytes). If the
   stack-protectors are corrupted, the process is aborted. This is highly
   useful to debug stack-corruption issues which often are nearly
   impossible to catch without this.
 - ld --as-needed drops all linked libraries that are not actually
   required by libevdev. So we can link to whatever we want and the linker
   will drop everything which is not actually used.
 - ld -z now, resolve symbols during linking, not during runtime.
 - ld -z relro, add relocation-read-only section. This allows to put
   read-only global variables and alike into a read-only section. This is
   useful for variables that need a relocation and thus cannot be
   explicitly put into a read-only section. This option tells the linker
   to mark them read-only after relocations are done. (that's why -z now
   makes sense in combination with this)

All of these options are common in other open-source projects, including
systemd and weston. Don't ask me why they are not marked as default..

Signed-off-by: David Herrmann <dh.herrmann@gmail.com>
Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2013-09-03 07:31:33 +10:00
Peter Hutterer
a8871e7aea Use AC_USE_SYSTEM_EXTENSIONS
Defines _GNU_SOURCE for us.
http://www.gnu.org/software/autoconf/manual/autoconf-2.67/html_node/Posix-Variants.html

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2013-08-29 13:54:50 +10:00
Peter Hutterer
cc2eaec4ed test: switch udev backend over to new libevdev-uinput bits
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2013-08-29 13:54:49 +10:00
Peter Hutterer
9b924d26eb configure.ac: Drop a superfluous variable
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2013-08-29 13:02:50 +10:00
Peter Hutterer
1619613414 Make the tests optional to drop unneeded dependencies
libevdev has no external dependencies and both check and libudev are
only required for running the unit-tests. Make them optional.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Benjamin Tissoires <benjamin.tissoires@gmail.com>
2013-08-13 07:11:50 +10:00
Peter Hutterer
d8d8e75197 libevdev 0.3
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2013-08-08 13:21:04 +10:00
Peter Hutterer
d0de78cb8c libevdev 0.2.1
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2013-07-25 09:00:59 +10:00
Peter Hutterer
a482fd9256 libevdev 0.2
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2013-07-22 10:50:20 +10:00
Peter Hutterer
479e16725d Use doxygen instead of man pages
Doxygen is bad for man pages, but having an online API documentation
is better and easier to maintain.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2013-06-27 10:41:54 +10:00
Peter Hutterer
b06f6e9d41 Hook up gcov
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2013-06-27 10:41:54 +10:00
Peter Hutterer
7c860d6002 Set up a test harness
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2013-06-04 11:39:33 +10:00
Peter Hutterer
fe34f7cff7 Move libevdev-events over to a tools directory
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2013-06-04 11:39:32 +10:00
Peter Hutterer
a3f89c647d Drop requirement on ffi - copy/paste leftover
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2013-06-04 11:39:32 +10:00
Peter Hutterer
e8e4bc37c7 Add man-pages for the current interface
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2013-06-03 14:15:14 +10:00
Peter Hutterer
a3255d3ec7 libevdev is a library to handle evdev devices
Two main goals of this library:
- 'transparently' handle SYN_DROPPED events
- avoid errors in ioctl handling by providing a simpler interface.

Keeps a cached copy of the device for quick querying.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2013-05-29 15:33:21 +10:00