summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPaulo Cesar Pereira de Andrade <pcpa@mandriva.com.br>2009-01-26 18:09:11 -0200
committerPaulo Cesar Pereira de Andrade <pcpa@mandriva.com.br>2009-01-26 18:09:11 -0200
commite5c8a318b62b272ef86afbaac27e886ca2a05e5a (patch)
treed5a95ab5bedea452a689703ceb6db862799ffbbd
parentf84a93017296013508132700739bacc2261c871b (diff)
Correct make distcheck and sparse warnings.
-rw-r--r--.gitignore4
-rw-r--r--Makefile.am4
-rw-r--r--configure.ac6
-rw-r--r--xsetmode.c2
4 files changed, 13 insertions, 3 deletions
diff --git a/.gitignore b/.gitignore
index 4ae2174..9d27f9a 100644
--- a/.gitignore
+++ b/.gitignore
@@ -18,3 +18,7 @@ stamp-h1
xsetmode
xsetmode.1
*~
+*.o
+xsetmode-*.tar.*
+ChangeLog
+tags
diff --git a/Makefile.am b/Makefile.am
index 9ea02fc..754ede9 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -21,7 +21,7 @@
bin_PROGRAMS = xsetmode
-xsetmode_CFLAGS = $(XSETMODE_CFLAGS)
+AM_CFLAGS = $(XSETMODE_CFLAGS)
xsetmode_LDADD = $(XSETMODE_LIBS)
xsetmode_SOURCES = \
@@ -67,6 +67,6 @@ MAINTAINERCLEANFILES = ChangeLog
.PHONY: ChangeLog
ChangeLog:
- (GIT_DIR=$(top_srcdir)/.git git-log > .changelog.tmp && mv .changelog.tmp ChangeLog; rm -f .changelog.tmp) || (touch ChangeLog; echo 'git directory not found: installing possibly empty changelog.' >&2)
+ $(CHANGELOG_CMD)
dist-hook: ChangeLog
diff --git a/configure.ac b/configure.ac
index 2aa2358..2731ba9 100644
--- a/configure.ac
+++ b/configure.ac
@@ -26,17 +26,23 @@ AC_INIT(xsetmode,[1.0.0], [https://bugs.freedesktop.org/enter_bug.cgi?product=xo
AM_INIT_AUTOMAKE([dist-bzip2])
AM_MAINTAINER_MODE
+# Require xorg-macros: XORG_CWARNFLAGS, XORG_CHANGELOG
+m4_ifndef([XORG_MACROS_VERSION], [AC_FATAL([must install xorg-macros 1.2 or later before running autoconf/autogen])])
+XORG_MACROS_VERSION(1.2)
AM_CONFIG_HEADER(config.h)
AC_PROG_CC
AC_PROG_INSTALL
+XORG_CWARNFLAGS
# Checks for pkg-config packages
PKG_CHECK_MODULES(XSETMODE, xi x11)
+XSETMODE_CFLAGS="$CWARNFLAGS $XSETMODE_CFLAGS"
AC_SUBST(XSETMODE_CFLAGS)
AC_SUBST(XSETMODE_LIBS)
XORG_MANPAGE_SECTIONS
XORG_RELEASE_VERSION
+XORG_CHANGELOG
AC_OUTPUT([Makefile])
diff --git a/xsetmode.c b/xsetmode.c
index 863c2b6..2aead84 100644
--- a/xsetmode.c
+++ b/xsetmode.c
@@ -30,7 +30,7 @@
#include <X11/Xproto.h>
#include <X11/extensions/XInput.h>
-int event_type;
+static int event_type;
static int StrCaseCmp(char *s1, char *s2)
{