summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPaulo Cesar Pereira de Andrade <pcpa@mandriva.com.br>2009-01-21 15:44:01 -0200
committerPaulo Cesar Pereira de Andrade <pcpa@mandriva.com.br>2009-01-21 15:44:01 -0200
commit7d42ea90bc9494f248d5fc5ed4c0ae9c90e6e6ca (patch)
tree8357012a9bfd79a95cca0e7e780dc2c47ec3cabb
parent8f43f498326ffc7491dc2c1e9feec39c74dfdcbb (diff)
Correct make distcheck and some sparse/gcc warnings.
Most remaining warnings are due to a macro that checks if it's argument is not NULL, but arguments are strings in the stack.
-rw-r--r--.gitignore4
-rw-r--r--Makefile.am6
-rw-r--r--configure.ac14
-rw-r--r--xfindproxy.c8
4 files changed, 22 insertions, 10 deletions
diff --git a/.gitignore b/.gitignore
index 222ddc1..fdbda24 100644
--- a/.gitignore
+++ b/.gitignore
@@ -18,3 +18,7 @@ stamp-h1
xfindproxy
xfindproxy.1
*~
+*.o
+xfindproxy-*.tar.*
+ChangeLog
+tags
diff --git a/Makefile.am b/Makefile.am
index 29db26c..473a5ac 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -21,8 +21,8 @@
bin_PROGRAMS = xfindproxy
-xfindproxy_CFLAGS = $(DEP_CFLAGS)
-xfindproxy_LDADD = $(DEP_LIBS)
+AM_CFLAGS = $(XFINDPROXY_CFLAGS)
+xfindproxy_LDADD = $(XFINDPROXY_LIBS)
xfindproxy_SOURCES = \
xfindproxy.c \
@@ -69,6 +69,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 cb0946f..8a79589 100644
--- a/configure.ac
+++ b/configure.ac
@@ -26,17 +26,25 @@ AC_INIT(xfindproxy,[1.0.1], [xorg@freedesktop.org],xfindproxy)
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(DEP, x11 ice xt xproxymngproto)
-AC_SUBST(DEP_CFLAGS)
-AC_SUBST(DEP_LIBS)
+PKG_CHECK_MODULES(XFINDPROXY, x11 ice xt xproxymngproto)
+XFINDPROXY_CFLAGS="$CWARNFLAGS $XFINDPROXY_CFLAGS"
+AC_SUBST(XFINDPROXY_CFLAGS)
+AC_SUBST(XFINDPROXY_LIBS)
XORG_MANPAGE_SECTIONS
XORG_RELEASE_VERSION
+XORG_CHANGELOG
AC_OUTPUT([Makefile])
diff --git a/xfindproxy.c b/xfindproxy.c
index aa2385f..bb144c2 100644
--- a/xfindproxy.c
+++ b/xfindproxy.c
@@ -54,13 +54,13 @@ static void _XtIceWatchProc(IceConn ice_conn, IcePointer client_data,
Bool opening, IcePointer *watch_data);
static Status InitWatchProcs(XtAppContext appContext);
-int PMopcode;
+static int PMopcode;
-int PMversionCount = 1;
-IcePoVersionRec PMversions[] =
+static int PMversionCount = 1;
+static IcePoVersionRec PMversions[] =
{{PM_MAJOR_VERSION, PM_MINOR_VERSION, PMprocessMessages}};
-XtAppContext appContext;
+static XtAppContext appContext;
typedef struct {
int status;