summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPaulo Cesar Pereira de Andrade <pcpa@mandriva.com.br>2009-01-12 19:03:00 -0200
committerPaulo Cesar Pereira de Andrade <pcpa@mandriva.com.br>2009-01-12 19:03:00 -0200
commit58072d1db611ad95059044cb3ec1302c8475c754 (patch)
tree83d322e613d036f37b06bfb4afb8975ad7f322c8
parentf0c7399100f25d2c512ee7c922cf13a4bd9c507e (diff)
Ansification and compile warning fixes.
This also uses XORG_CHANGELOG and XORG_CWARNFLAGS, corrects make distcheck and all gcc 4.3 and sparse warnings.
-rw-r--r--.gitignore4
-rw-r--r--Makefile.am2
-rw-r--r--configure.ac9
-rw-r--r--showrgb.c3
4 files changed, 14 insertions, 4 deletions
diff --git a/.gitignore b/.gitignore
index 693425b..467a79d 100644
--- a/.gitignore
+++ b/.gitignore
@@ -19,3 +19,7 @@ showrgb
showrgb.1
stamp-h1
*~
+*.o
+rgb-*.tar.*
+ChangeLog
+tags
diff --git a/Makefile.am b/Makefile.am
index c1a0892..649bffc 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -98,6 +98,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 69cc6a7..bef02e1 100644
--- a/configure.ac
+++ b/configure.ac
@@ -32,11 +32,17 @@ AC_INIT(rgb,[1.0.3],[https://bugs.freedesktop.org/enter_bug.cgi?product=xorg],rg
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
+
PKG_CHECK_MODULES(RGB, xproto)
AC_MSG_CHECKING([for rgb database location])
@@ -95,10 +101,11 @@ fi
AC_SUBST([RGB_DB_TYPE])
AC_SUBST([RGB_DB_FILES])
AM_CONDITIONAL(RGB_DB, [test x$db_type != xtext])
-
+RGB_CFLAGS="$CWARNFLAGS $RGB_CFLAGS"
AC_SUBST(RGB_CFLAGS)
XORG_MANPAGE_SECTIONS
XORG_RELEASE_VERSION
+XORG_CHANGELOG
AC_OUTPUT([Makefile])
diff --git a/showrgb.c b/showrgb.c
index 78db676..bf676cf 100644
--- a/showrgb.c
+++ b/showrgb.c
@@ -115,8 +115,7 @@ dumprgb (char *filename)
#else /* USE_RGB_TXT */
static void
-dumprgb (filename)
- char *filename;
+dumprgb (char *filename)
{
FILE *rgb;
char *path;