summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--.gitignore4
-rw-r--r--INSTALL0
-rw-r--r--Makefile.am9
-rw-r--r--configure.ac8
-rw-r--r--xhost.c8
5 files changed, 20 insertions, 9 deletions
diff --git a/.gitignore b/.gitignore
index 5dad303..46496e9 100644
--- a/.gitignore
+++ b/.gitignore
@@ -18,3 +18,7 @@ stamp-h1
xhost
xhost.1
*~
+*.o
+xhost-*.tar.*
+ChangeLog
+tags
diff --git a/INSTALL b/INSTALL
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/INSTALL
diff --git a/Makefile.am b/Makefile.am
index 8101e2b..fa811ff 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -2,9 +2,8 @@ bin_PROGRAMS = xhost
xhost_SOURCES = xhost.c
-AM_CFLAGS = @XHOST_CFLAGS@
-
-xhost_LDADD = @XHOST_LIBS@
+AM_CFLAGS = $(XHOST_CFLAGS)
+xhost_LDADD = $(XHOST_LIBS)
appman_PRE = xhost.man
@@ -12,14 +11,14 @@ appmandir = $(APP_MAN_DIR)
appman_DATA = $(appman_PRE:man=@APP_MAN_SUFFIX@)
-EXTRA_DIST = $(appman_PRE) ChangeLog autogen.sh
+EXTRA_DIST = $(appman_PRE) ChangeLog
CLEANFILES = $(appman_DATA)
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 3338041..7a7167c 100644
--- a/configure.ac
+++ b/configure.ac
@@ -5,6 +5,10 @@ AC_INIT(xhost,[1.0.2], [https://bugs.freedesktop.org/enter_bug.cgi?product=xorg]
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
@@ -12,8 +16,11 @@ AC_PROG_INSTALL
AC_TYPE_SIGNAL
+XORG_CWARNFLAGS
+
# Checks for pkg-config packages
PKG_CHECK_MODULES(XHOST, x11 xmuu xau)
+XHOST_CFLAGS="$CWARNFLAGS $XHOST_CFLAGS"
AC_SUBST(XHOST_CFLAGS)
AC_SUBST(XHOST_LIBS)
@@ -25,5 +32,6 @@ XTRANS_SECURE_RPC_FLAGS
XORG_MANPAGE_SECTIONS
XORG_RELEASE_VERSION
+XORG_CHANGELOG
AC_OUTPUT([Makefile])
diff --git a/xhost.c b/xhost.c
index 276e370..90a9b9c 100644
--- a/xhost.c
+++ b/xhost.c
@@ -141,9 +141,9 @@ static signal_t nameserver_lost(int sig);
#define NAMESERVER_TIMEOUT 5 /* time to wait for nameserver */
-volatile int nameserver_timedout;
-
-char *ProgramName;
+static volatile int nameserver_timedout;
+
+static char *ProgramName;
#ifdef NEEDSOCKETS
static int
@@ -175,7 +175,7 @@ XFamily(int af)
}
#endif /* NEEDSOCKETS */
-Display *dpy;
+static Display *dpy;
int
main(int argc, char *argv[])