summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPaulo Cesar Pereira de Andrade <pcpa@mandriva.com.br>2009-01-26 19:26:46 -0200
committerPaulo Cesar Pereira de Andrade <pcpa@mandriva.com.br>2009-01-26 19:26:46 -0200
commit5dc3873019dfc20f923f18ab73248d7b7ecefce2 (patch)
tree626dea18c778672bca25999031673bdf47c9bf95
parent540ce8c77fe520e6d46571cbc329db6b3784010f (diff)
Correct make distcheck and sparse warnings.
Also apply "by hand" the sed -e 's/__VENDOR__/The X.Org Foundation' (or any other value used in the previous --with-vendor=... configure option) and use a static app-defaults file, matching pattern of changes in other xorg/app programs.
-rw-r--r--.gitignore4
-rw-r--r--Makefile.am14
-rw-r--r--app-defaults/Xvidtune (renamed from app-defaults/Xvidtune.cpp)5
-rw-r--r--configure.ac33
-rw-r--r--xvidtune.c10
5 files changed, 29 insertions, 37 deletions
diff --git a/.gitignore b/.gitignore
index 3b30c57..b3999cb 100644
--- a/.gitignore
+++ b/.gitignore
@@ -19,3 +19,7 @@ stamp-h1
xvidtune
xvidtune.1
*~
+*.o
+xvidtune-*.tar.*
+ChangeLog
+tags
diff --git a/Makefile.am b/Makefile.am
index dd24abe..b56564a 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -58,18 +58,14 @@ SUFFIXES = .$(APP_MAN_SUFFIX) .man
.man.$(APP_MAN_SUFFIX):
sed $(MAN_SUBSTS) < $< > $@
-# App default files (*.ad)
+# App default files
+DISTCHECK_CONFIGURE_FLAGS = --with-appdefaultdir=\$${datadir}/X11/app-defaults
appdefaultdir = @appdefaultdir@
-appdefault_DATA = app-defaults/Xvidtune
+dist_appdefault_DATA = app-defaults/Xvidtune
-app-defaults/Xvidtune: app-defaults/Xvidtune.cpp
- $(mkdir_p) app-defaults
- $(RAWCPP) $(srcdir)/app-defaults/Xvidtune.cpp | \
- sed -e 's/^\#.*$$//g' -e 's|__VENDOR__|$(VENDOR_NAME)|' > $@
-
-EXTRA_DIST = app-defaults/Xvidtune.cpp $(appman_PRE)
+EXTRA_DIST = $(appman_PRE)
CLEANFILES = Xvidtune $(appman_DATA)
@@ -80,6 +76,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/app-defaults/Xvidtune.cpp b/app-defaults/Xvidtune
index 03c79c7..6ba9c5d 100644
--- a/app-defaults/Xvidtune.cpp
+++ b/app-defaults/Xvidtune
@@ -130,8 +130,9 @@ NOW. OTHERWISE, HIT OK TO CONTINUE\n\
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,\n\
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\n\
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.\n\
-IN NO EVENT SHALL Kaleb S. KEITHLEY (or his employer) OR \n\
- __VENDOR__ BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n\
+IN NO EVENT SHALL Kaleb S. KEITHLEY (or his employer) OR\n\
+ The X.Org Foundation \
+BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n\
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING\n\
FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER\n\
DEALINGS IN THE SOFTWARE.\n\n
diff --git a/configure.ac b/configure.ac
index 7bee2c6..41a81aa 100644
--- a/configure.ac
+++ b/configure.ac
@@ -26,38 +26,29 @@ AC_INIT(xvidtune,[1.0.1], [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
-AC_PROG_CPP
-AC_PATH_PROGS(RAWCPP, [cpp], [$(CPP)],
- [$PATH:/bin:/usr/bin:/usr/lib:/usr/libexec:/usr/ccs/lib:/usr/ccs/lbin:/lib])
-
-m4_ifdef([AS_HELP_STRING], , [m4_define([AS_HELP_STRING], m4_defn([AC_HELP_STRING]))])
# Checks for pkg-config packages
-PKG_CHECK_MODULES(XAW, xaw7)
-PKG_CHECK_MODULES(XVIDTUNE, xxf86vm)
-
-XVIDTUNE_CFLAGS="$XVIDTUNE_CFLAGS $XAW_CFLAGS"
-XVIDTUNE_LIBS="$XVIDTUNE_LIBS $XAW_LIBS"
-
+PKG_CHECK_MODULES(XVIDTUNE, xxf86vm xt xaw7)
+xt_appdefaultdir=$(pkg-config --variable=appdefaultdir xt)
+AC_ARG_WITH(appdefaultdir,
+ AC_HELP_STRING([--with-appdefaultdir=<pathname>],
+ [specify directory for app-defaults files (default is autodetected)]),
+ [appdefaultdir="$withval"], [appdefaultdir="${xt_appdefaultdir}"])
+XVIDTUNE_CFLAGS="$CWARNFLAGS $XVIDTUNE_CFLAGS"
+XVIDTUNE_LIBS="$XVIDTUNE_LIBS"
AC_SUBST(XVIDTUNE_CFLAGS)
AC_SUBST(XVIDTUNE_LIBS)
-
-AC_ARG_WITH(vendor-name,
- AS_HELP_STRING([--with-vendor-name=VENDOR],
- [Vendor name for disclaimer statement]),
- [ VENDOR_NAME="$withval" ],
- [ VENDOR_NAME="The X.Org Foundation" ])
-AC_SUBST([VENDOR_NAME])
-
-PKG_CHECK_MODULES(APPDEFS, xt)
-appdefaultdir=$(pkg-config --variable=appdefaultdir xt)
AC_SUBST(appdefaultdir)
XORG_MANPAGE_SECTIONS
XORG_RELEASE_VERSION
+XORG_CHANGELOG
AC_OUTPUT([Makefile])
diff --git a/xvidtune.c b/xvidtune.c
index d7bf290..82a7533 100644
--- a/xvidtune.c
+++ b/xvidtune.c
@@ -49,11 +49,11 @@ from Kaleb S. KEITHLEY.
#include <stdlib.h>
#include <signal.h>
-int MajorVersion, MinorVersion;
-int EventBase, ErrorBase;
-int dot_clock, mode_flags;
-unsigned long TestTimeout=5000; /* Default test timeout */
-XtSignalId sigId;
+static int MajorVersion, MinorVersion;
+static int EventBase, ErrorBase;
+static int dot_clock, mode_flags;
+static unsigned long TestTimeout=5000; /* Default test timeout */
+static XtSignalId sigId;
/* Minimum extension version required */
#define MINMAJOR 0