diff options
author | Paulo Cesar Pereira de Andrade <pcpa@mandriva.com.br> | 2009-01-15 16:03:07 -0200 |
---|---|---|
committer | Paulo Cesar Pereira de Andrade <pcpa@mandriva.com.br> | 2009-01-15 16:03:07 -0200 |
commit | 5f333c293892a30d76ca4e7ac9414b7fb8565b86 (patch) | |
tree | 390505c34bd87bd1a1d106abdcb0636ffac6b0ef | |
parent | fb3e77d8c0fab811c5ff08f8b57b011cd5275b6c (diff) |
Ansification and compile warning fixes.
This also uses XORG_CHANGELOG and XORG_CWARNFLAGS, corrects
make distcheck and most gcc 4.3 and sparse warnings.
-rw-r--r-- | .gitignore | 4 | ||||
-rw-r--r-- | Makefile.am | 2 | ||||
-rw-r--r-- | configure.ac | 24 | ||||
-rw-r--r-- | xdbedizzy.c | 4 |
4 files changed, 15 insertions, 19 deletions
@@ -18,3 +18,7 @@ stamp-h1 xdbedizzy xdbedizzy.1 *~ +*.o +xdbedizzy-*.tar.* +ChangeLog +tags diff --git a/Makefile.am b/Makefile.am index 060f79b..6f297ef 100644 --- a/Makefile.am +++ b/Makefile.am @@ -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 05c5541..64de6c2 100644 --- a/configure.ac +++ b/configure.ac @@ -26,32 +26,24 @@ AC_INIT(xdbedizzy,[1.0.2], [https://bugs.freedesktop.org/enter_bug.cgi?product=x 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 -# Boiler plate xprint checks - -AC_ARG_ENABLE(xprint, AC_HELP_STRING([--enable-xprint], - [Enable XPrint support]), - [use_xprint=$enableval],[use_xprint=no]) - -# Checks for pkg-config packages - -if test "x$use_xprint" = "xyes"; then - xprintmodules="xprintutil xp xau" - AC_DEFINE(USE_XPRINT, 1, [Define to enable Xprint]) -else - xprintmodules="" -fi - -PKG_CHECK_MODULES(XDBEDIZZY, $xprintmodules xext x11) +XORG_CWARNFLAGS +PKG_CHECK_MODULES(XDBEDIZZY, xext x11) +XDBEDIZZY_CFLAGS="$CWARNFLAGS $XDBEDIZZY_CFLAGS" AC_SUBST(XDBEDIZZY_CFLAGS) AC_SUBST(XDBEDIZZY_LIBS) XORG_MANPAGE_SECTIONS XORG_RELEASE_VERSION +XORG_CHANGELOG AC_OUTPUT([Makefile]) diff --git a/xdbedizzy.c b/xdbedizzy.c index 8875a51..93766dd 100644 --- a/xdbedizzy.c +++ b/xdbedizzy.c @@ -480,14 +480,14 @@ int main(int argc, char *argv[]) Visual *visual; Colormap cmap; XGCValues gcvals; +#ifdef USE_XPRINT void *printtofile_handle = NULL; /* "context" when printing to file */ const char *printername = NULL; /* printer to query */ const char *toFile = NULL; /* output file (instead of printer) */ -#ifdef USE_XPRINT XPPrinterList plist = NULL; /* list of printers */ int plist_count; /* number of entries in |plist|-array */ -#endif unsigned short dummy; +#endif Bool use_threadsafe_api = True; ProgramName = argv[0]; |