diff --git a/debian/changelog b/debian/changelog index 4b48835..7f73d08 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,8 +1,12 @@ x11-apps (7.4+3) UNRELEASED; urgency=low + [ Julien Cristau ] * Update xload config.{guess,sub}, adding avr32 support (closes: #536410) - -- Julien Cristau Sun, 02 Aug 2009 16:10:47 +0200 + [ Brice Goglin ] + * xmag 1.0.3. + + -- Brice Goglin Fri, 04 Sep 2009 13:41:15 +0200 x11-apps (7.4+2) unstable; urgency=low diff --git a/xmag/ChangeLog b/xmag/ChangeLog index 206be17..aeb1411 100644 --- a/xmag/ChangeLog +++ b/xmag/ChangeLog @@ -1,3 +1,49 @@ +commit f1f2af7a65d6531814a06b292a28bdc46580e590 +Author: Alan Coopersmith +Date: Mon Aug 3 11:19:07 2009 -0700 + + Version bump: 1.0.3 + + Signed-off-by: Alan Coopersmith + +commit 90ccae7efc5fca9c0f4e45b84806df01332dd869 +Author: Paulo Cesar Pereira de Andrade +Date: Mon Jan 12 20:41:14 2009 -0200 + + Correct problems in make distcheck. + +commit ae94046d8654b9f65df871502de0f08a36aa5d38 +Author: Julien Cristau +Date: Tue Aug 19 01:04:40 2008 +0200 + + xaw8 is gone, use xaw7 + +commit 7ac72ce2e262bf78cb2e8ff50ef932d29e4b65f7 +Author: Julien Cristau +Date: Tue Aug 19 01:04:27 2008 +0200 + + allow build outside of source tree + +commit a3e1a9b4cb732b86b84375013e3fa531395b45cf +Author: Paulo Cesar Pereira de Andrade +Date: Tue Jul 29 14:18:10 2008 -0300 + + Properly handle multiple depth windows. + + This patch will not cause X Errors when magnifying windows with portions + offscreen, or windows with a dimension smaller than the default 64x64. + + A common case where this patch is required is when Composite is enabled, + the default depth has a value other than 24, and some application is + using the Composite argb visual; example is WindowMaker, that will choose + the "best" available visual, unless the visual-id option is used. + +commit cb21acd94353c82c4b49a7ddef99309b31b07500 +Author: Jeremy Huddleston +Date: Thu Mar 27 20:08:04 2008 -0700 + + Build fix for file systems that are not case sensitive + commit a6b0036a082a947b89bdbb27128e20079799857c Author: Alan Coopersmith Date: Wed Aug 15 18:04:12 2007 -0700 diff --git a/xmag/Makefile.am b/xmag/Makefile.am index 83c4dad..39de39e 100644 --- a/xmag/Makefile.am +++ b/xmag/Makefile.am @@ -40,25 +40,15 @@ # App default files (*.ad) +DISTCHECK_CONFIGURE_FLAGS = --with-appdefaultdir=\$${datadir}/X11/app-defaults + appdefaultdir = @appdefaultdir@ - -APPDEFAULTFILES = \ - Xmag - -SUFFIXES = .ad - -.ad: - cp $< $@ - -appdefault_DATA = $(APPDEFAULTFILES) - -EXTRA_DIST = $(APPDEFAULTFILES:%=%.ad) - -CLEANFILES = $(APPDEFAULTFILES) +dist_appdefault_DATA = \ + app-defaults/Xmag # Developer documentation for Scale widget in Scale.c -EXTRA_DIST += Scale.txt +EXTRA_DIST = Scale.txt EXTRA_DIST += xmag.icon @@ -67,7 +57,7 @@ appman_DATA = $(appman_PRE:man=@APP_MAN_SUFFIX@) EXTRA_DIST += $(appman_PRE) -CLEANFILES += $(appman_DATA) +CLEANFILES = $(appman_DATA) SED = sed @@ -88,7 +78,7 @@ -e 's|__miscmansuffix__|$(MISC_MAN_SUFFIX)|g' \ -e 's|__filemansuffix__|$(FILE_MAN_SUFFIX)|g' -SUFFIXES += .$(APP_MAN_SUFFIX) .man +SUFFIXES = .$(APP_MAN_SUFFIX) .man .man.$(APP_MAN_SUFFIX): sed $(MAN_SUBSTS) < $< > $@ @@ -99,6 +89,6 @@ .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/xmag/Makefile.in b/xmag/Makefile.in index a8b555e..8fa0953 100644 --- a/xmag/Makefile.in +++ b/xmag/Makefile.in @@ -56,10 +56,11 @@ host_triplet = @host@ bin_PROGRAMS = xmag$(EXEEXT) subdir = . -DIST_COMMON = README $(am__configure_deps) $(srcdir)/Makefile.am \ - $(srcdir)/Makefile.in $(srcdir)/config.h.in \ - $(top_srcdir)/configure AUTHORS COPYING ChangeLog INSTALL NEWS \ - config.guess config.sub depcomp install-sh missing +DIST_COMMON = README $(am__configure_deps) $(dist_appdefault_DATA) \ + $(srcdir)/Makefile.am $(srcdir)/Makefile.in \ + $(srcdir)/config.h.in $(top_srcdir)/configure AUTHORS COPYING \ + ChangeLog INSTALL NEWS config.guess config.sub depcomp \ + install-sh missing ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ @@ -69,8 +70,8 @@ mkinstalldirs = $(install_sh) -d CONFIG_HEADER = config.h CONFIG_CLEAN_FILES = -am__installdirs = "$(DESTDIR)$(bindir)" "$(DESTDIR)$(appdefaultdir)" \ - "$(DESTDIR)$(appmandir)" +am__installdirs = "$(DESTDIR)$(bindir)" "$(DESTDIR)$(appmandir)" \ + "$(DESTDIR)$(appdefaultdir)" binPROGRAMS_INSTALL = $(INSTALL_PROGRAM) PROGRAMS = $(bin_PROGRAMS) am_xmag_OBJECTS = CutPaste.$(OBJEXT) RootWin.$(OBJEXT) Scale.$(OBJEXT) \ @@ -93,9 +94,9 @@ *) f=$$p;; \ esac; am__strip_dir = `echo $$p | sed -e 's|^.*/||'`; -appdefaultDATA_INSTALL = $(INSTALL_DATA) appmanDATA_INSTALL = $(INSTALL_DATA) -DATA = $(appdefault_DATA) $(appman_DATA) +dist_appdefaultDATA_INSTALL = $(INSTALL_DATA) +DATA = $(appman_DATA) $(dist_appdefault_DATA) ETAGS = etags CTAGS = ctags DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) @@ -108,7 +109,6 @@ DIST_ARCHIVES = $(distdir).tar.gz $(distdir).tar.bz2 GZIP_ENV = --best distuninstallcheck_listfiles = find . -type f -print -distcleancheck_listfiles = find . -type f -print ACLOCAL = @ACLOCAL@ ADMIN_MAN_DIR = @ADMIN_MAN_DIR@ ADMIN_MAN_SUFFIX = @ADMIN_MAN_SUFFIX@ @@ -124,7 +124,10 @@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ +CHANGELOG_CMD = @CHANGELOG_CMD@ +CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ +CWARNFLAGS = @CWARNFLAGS@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ @@ -133,9 +136,11 @@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ +EGREP = @EGREP@ EXEEXT = @EXEEXT@ FILE_MAN_DIR = @FILE_MAN_DIR@ FILE_MAN_SUFFIX = @FILE_MAN_SUFFIX@ +GREP = @GREP@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ @@ -164,8 +169,6 @@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ -TMP_XAW_CFLAGS = @TMP_XAW_CFLAGS@ -TMP_XAW_LIBS = @TMP_XAW_LIBS@ VERSION = @VERSION@ XMAG_CFLAGS = @XMAG_CFLAGS@ XMAG_LIBS = @XMAG_LIBS@ @@ -179,8 +182,6 @@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ - -# App default files (*.ad) appdefaultdir = @appdefaultdir@ bindir = @bindir@ build = @build@ @@ -191,6 +192,7 @@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ +distcleancheck_listfiles = @distcleancheck_listfiles@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ @@ -237,18 +239,18 @@ appman_PRE = \ xmag.man -APPDEFAULTFILES = \ - Xmag - -SUFFIXES = .ad .$(APP_MAN_SUFFIX) .man -appdefault_DATA = $(APPDEFAULTFILES) + +# App default files (*.ad) +DISTCHECK_CONFIGURE_FLAGS = --with-appdefaultdir=\$${datadir}/X11/app-defaults +dist_appdefault_DATA = \ + app-defaults/Xmag + # Developer documentation for Scale widget in Scale.c -EXTRA_DIST = $(APPDEFAULTFILES:%=%.ad) Scale.txt xmag.icon \ - $(appman_PRE) ChangeLog -CLEANFILES = $(APPDEFAULTFILES) $(appman_DATA) +EXTRA_DIST = Scale.txt xmag.icon $(appman_PRE) ChangeLog appmandir = $(APP_MAN_DIR) appman_DATA = $(appman_PRE:man=@APP_MAN_SUFFIX@) +CLEANFILES = $(appman_DATA) SED = sed # Strings to replace in man pages @@ -267,12 +269,13 @@ -e 's|__miscmansuffix__|$(MISC_MAN_SUFFIX)|g' \ -e 's|__filemansuffix__|$(FILE_MAN_SUFFIX)|g' +SUFFIXES = .$(APP_MAN_SUFFIX) .man MAINTAINERCLEANFILES = ChangeLog all: config.h $(MAKE) $(AM_MAKEFLAGS) all-am .SUFFIXES: -.SUFFIXES: .ad .$(APP_MAN_SUFFIX) .man .c .o .obj +.SUFFIXES: .$(APP_MAN_SUFFIX) .man .c .o .obj am--refresh: @: $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) @@ -374,23 +377,6 @@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'` -install-appdefaultDATA: $(appdefault_DATA) - @$(NORMAL_INSTALL) - test -z "$(appdefaultdir)" || $(MKDIR_P) "$(DESTDIR)$(appdefaultdir)" - @list='$(appdefault_DATA)'; for p in $$list; do \ - if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ - f=$(am__strip_dir) \ - echo " $(appdefaultDATA_INSTALL) '$$d$$p' '$(DESTDIR)$(appdefaultdir)/$$f'"; \ - $(appdefaultDATA_INSTALL) "$$d$$p" "$(DESTDIR)$(appdefaultdir)/$$f"; \ - done - -uninstall-appdefaultDATA: - @$(NORMAL_UNINSTALL) - @list='$(appdefault_DATA)'; for p in $$list; do \ - f=$(am__strip_dir) \ - echo " rm -f '$(DESTDIR)$(appdefaultdir)/$$f'"; \ - rm -f "$(DESTDIR)$(appdefaultdir)/$$f"; \ - done install-appmanDATA: $(appman_DATA) @$(NORMAL_INSTALL) test -z "$(appmandir)" || $(MKDIR_P) "$(DESTDIR)$(appmandir)" @@ -407,6 +393,23 @@ f=$(am__strip_dir) \ echo " rm -f '$(DESTDIR)$(appmandir)/$$f'"; \ rm -f "$(DESTDIR)$(appmandir)/$$f"; \ + done +install-dist_appdefaultDATA: $(dist_appdefault_DATA) + @$(NORMAL_INSTALL) + test -z "$(appdefaultdir)" || $(MKDIR_P) "$(DESTDIR)$(appdefaultdir)" + @list='$(dist_appdefault_DATA)'; for p in $$list; do \ + if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ + f=$(am__strip_dir) \ + echo " $(dist_appdefaultDATA_INSTALL) '$$d$$p' '$(DESTDIR)$(appdefaultdir)/$$f'"; \ + $(dist_appdefaultDATA_INSTALL) "$$d$$p" "$(DESTDIR)$(appdefaultdir)/$$f"; \ + done + +uninstall-dist_appdefaultDATA: + @$(NORMAL_UNINSTALL) + @list='$(dist_appdefault_DATA)'; for p in $$list; do \ + f=$(am__strip_dir) \ + echo " rm -f '$(DESTDIR)$(appdefaultdir)/$$f'"; \ + rm -f "$(DESTDIR)$(appdefaultdir)/$$f"; \ done ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) @@ -589,7 +592,7 @@ check: check-am all-am: Makefile $(PROGRAMS) $(DATA) config.h installdirs: - for dir in "$(DESTDIR)$(bindir)" "$(DESTDIR)$(appdefaultdir)" "$(DESTDIR)$(appmandir)"; do \ + for dir in "$(DESTDIR)$(bindir)" "$(DESTDIR)$(appmandir)" "$(DESTDIR)$(appdefaultdir)"; do \ test -z "$$dir" || $(MKDIR_P) "$$dir"; \ done install: install-am @@ -639,7 +642,7 @@ info-am: -install-data-am: install-appdefaultDATA install-appmanDATA +install-data-am: install-appmanDATA install-dist_appdefaultDATA install-dvi: install-dvi-am @@ -676,8 +679,8 @@ ps-am: -uninstall-am: uninstall-appdefaultDATA uninstall-appmanDATA \ - uninstall-binPROGRAMS +uninstall-am: uninstall-appmanDATA uninstall-binPROGRAMS \ + uninstall-dist_appdefaultDATA .MAKE: install-am install-strip @@ -687,20 +690,17 @@ distclean distclean-compile distclean-generic distclean-hdr \ distclean-tags distcleancheck distdir distuninstallcheck dvi \ dvi-am html html-am info info-am install install-am \ - install-appdefaultDATA install-appmanDATA install-binPROGRAMS \ - install-data install-data-am install-dvi install-dvi-am \ - install-exec install-exec-am install-html install-html-am \ - install-info install-info-am install-man install-pdf \ - install-pdf-am install-ps install-ps-am install-strip \ - installcheck installcheck-am installdirs maintainer-clean \ - maintainer-clean-generic mostlyclean mostlyclean-compile \ - mostlyclean-generic pdf pdf-am ps ps-am tags uninstall \ - uninstall-am uninstall-appdefaultDATA uninstall-appmanDATA \ - uninstall-binPROGRAMS - - -.ad: - cp $< $@ + install-appmanDATA install-binPROGRAMS install-data \ + install-data-am install-dist_appdefaultDATA install-dvi \ + install-dvi-am install-exec install-exec-am install-html \ + install-html-am install-info install-info-am install-man \ + install-pdf install-pdf-am install-ps install-ps-am \ + install-strip installcheck installcheck-am installdirs \ + maintainer-clean maintainer-clean-generic mostlyclean \ + mostlyclean-compile mostlyclean-generic pdf pdf-am ps ps-am \ + tags uninstall uninstall-am uninstall-appmanDATA \ + uninstall-binPROGRAMS uninstall-dist_appdefaultDATA + .man.$(APP_MAN_SUFFIX): sed $(MAN_SUBSTS) < $< > $@ @@ -708,7 +708,7 @@ .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 # Tell versions [3.59,3.63) of GNU make to not export all variables. diff --git a/xmag/Xmag.ad b/xmag/Xmag.ad deleted file mode 100644 index 1bc4961..0000000 --- a/xmag/Xmag.ad +++ /dev/null @@ -1,27 +0,0 @@ -! $Xorg: Xmag.ad,v 1.3 2000/08/17 19:54:54 cpqbld Exp $ -! $XFree86$ -*Font: fixed -*pane2*orientation: horizontal -*pane2*showGrip: False -*allowShellResize: on -*Scale.baseTranslations:#augment\ - : set-colors()\n\ - : unset-colors()\n\ - :popup-pixel()\n\ - Button1:popup-pixel()\n\ - :update-pixel()\n\ - :popdown-pixel()\n\ - :popdown-pixel()\n\ - n:new()\n\ - q:close()\n\ - Ctrlc:close()\n\ - space:replace() -*close.accelerators:#augment\ - q:set()notify()unset()\n\ - Ctrlc:set()notify()unset() -*replace.accelerators:#augment\ - space:set()notify()unset()\n\ - :set()notify()unset()\n\ - :set()notify()unset() -*helpLabel.font: 8x13bold -*helpLabel.label: xmag diff --git a/xmag/aclocal.m4 b/xmag/aclocal.m4 index a8f4850..c852fa3 100644 --- a/xmag/aclocal.m4 +++ b/xmag/aclocal.m4 @@ -15,6 +15,545 @@ [m4_fatal([this file was generated for autoconf 2.61. You have another version of autoconf. If you want to use that, you should regenerate the build system entirely.], [63])]) + +dnl xorg-macros.m4. Generated from xorg-macros.m4.in xorgversion.m4 by configure. +dnl +dnl Copyright 2005-2006 Sun Microsystems, Inc. All rights reserved. +dnl +dnl Permission is hereby granted, free of charge, to any person obtaining a +dnl copy of this software and associated documentation files (the +dnl "Software"), to deal in the Software without restriction, including +dnl without limitation the rights to use, copy, modify, merge, publish, +dnl distribute, and/or sell copies of the Software, and to permit persons +dnl to whom the Software is furnished to do so, provided that the above +dnl copyright notice(s) and this permission notice appear in all copies of +dnl the Software and that both the above copyright notice(s) and this +dnl permission notice appear in supporting documentation. +dnl +dnl THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS +dnl OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +dnl MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT +dnl OF THIRD PARTY RIGHTS. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR +dnl HOLDERS INCLUDED IN THIS NOTICE BE LIABLE FOR ANY CLAIM, OR ANY SPECIAL +dnl INDIRECT OR CONSEQUENTIAL DAMAGES, OR ANY DAMAGES WHATSOEVER RESULTING +dnl FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, +dnl NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION +dnl WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. +dnl +dnl Except as contained in this notice, the name of a copyright holder +dnl shall not be used in advertising or otherwise to promote the sale, use +dnl or other dealings in this Software without prior written authorization +dnl of the copyright holder. + +# XORG_MACROS_VERSION(required-version) +# ------------------------------------- +# Minimum version: 1.1.0 +# +# If you're using a macro added in Version 1.1 or newer, include this in +# your configure.ac with the minimum required version, such as: +# XORG_MACROS_VERSION(1.1) +# +# To force at least a version with this macro defined, also add: +# m4_ifndef([XORG_MACROS_VERSION], [AC_FATAL([must install xorg-macros 1.1 or later before running autoconf/autogen])]) +# +# +# See the "minimum version" comment for each macro you use to see what +# version you require. +AC_DEFUN([XORG_MACROS_VERSION],[ + [XORG_MACROS_needed_version=$1 + XORG_MACROS_needed_major=`echo $XORG_MACROS_needed_version | sed 's/\..*$//'` + XORG_MACROS_needed_minor=`echo $XORG_MACROS_needed_version | sed -e 's/^[0-9]*\.//' -e 's/\..*$//'`] + AC_MSG_CHECKING([if xorg-macros used to generate configure is at least ${XORG_MACROS_needed_major}.${XORG_MACROS_needed_minor}]) + [XORG_MACROS_version=1.2.1 + XORG_MACROS_major=`echo $XORG_MACROS_version | sed 's/\..*$//'` + XORG_MACROS_minor=`echo $XORG_MACROS_version | sed -e 's/^[0-9]*\.//' -e 's/\..*$//'`] + if test $XORG_MACROS_major -ne $XORG_MACROS_needed_major ; then + AC_MSG_ERROR([configure built with incompatible version of xorg-macros.m4 - requires version ${XORG_MACROS_major}.x]) + fi + if test $XORG_MACROS_minor -lt $XORG_MACROS_needed_minor ; then + AC_MSG_ERROR([configure built with too old of a version of xorg-macros.m4 - requires version ${XORG_MACROS_major}.${XORG_MACROS_minor}.0 or newer]) + fi + AC_MSG_RESULT([yes, $XORG_MACROS_version]) +]) # XORG_MACROS_VERSION + +# XORG_PROG_RAWCPP() +# ------------------ +# Minimum version: 1.0.0 +# +# Find cpp program and necessary flags for use in pre-processing text files +# such as man pages and config files +AC_DEFUN([XORG_PROG_RAWCPP],[ +AC_REQUIRE([AC_PROG_CPP]) +AC_PATH_PROGS(RAWCPP, [cpp], [${CPP}], + [$PATH:/bin:/usr/bin:/usr/lib:/usr/libexec:/usr/ccs/lib:/usr/ccs/lbin:/lib]) + +# Check for flag to avoid builtin definitions - assumes unix is predefined, +# which is not the best choice for supporting other OS'es, but covers most +# of the ones we need for now. +AC_MSG_CHECKING([if $RAWCPP requires -undef]) +AC_LANG_CONFTEST([Does cpp redefine unix ?]) +if test `${RAWCPP} < conftest.$ac_ext | grep -c 'unix'` -eq 1 ; then + AC_MSG_RESULT([no]) +else + if test `${RAWCPP} -undef < conftest.$ac_ext | grep -c 'unix'` -eq 1 ; then + RAWCPPFLAGS=-undef + AC_MSG_RESULT([yes]) + # under Cygwin unix is still defined even with -undef + elif test `${RAWCPP} -undef -ansi < conftest.$ac_ext | grep -c 'unix'` -eq 1 ; then + RAWCPPFLAGS="-undef -ansi" + AC_MSG_RESULT([yes, with -ansi]) + else + AC_MSG_ERROR([${RAWCPP} defines unix with or without -undef. I don't know what to do.]) + fi +fi +rm -f conftest.$ac_ext + +AC_MSG_CHECKING([if $RAWCPP requires -traditional]) +AC_LANG_CONFTEST([Does cpp preserve "whitespace"?]) +if test `${RAWCPP} < conftest.$ac_ext | grep -c 'preserve \"'` -eq 1 ; then + AC_MSG_RESULT([no]) +else + if test `${RAWCPP} -traditional < conftest.$ac_ext | grep -c 'preserve \"'` -eq 1 ; then + RAWCPPFLAGS="${RAWCPPFLAGS} -traditional" + AC_MSG_RESULT([yes]) + else + AC_MSG_ERROR([${RAWCPP} does not preserve whitespace with or without -traditional. I don't know what to do.]) + fi +fi +rm -f conftest.$ac_ext +AC_SUBST(RAWCPPFLAGS) +]) # XORG_PROG_RAWCPP + +# XORG_MANPAGE_SECTIONS() +# ----------------------- +# Minimum version: 1.0.0 +# +# Determine which sections man pages go in for the different man page types +# on this OS - replaces *ManSuffix settings in old Imake *.cf per-os files. +# Not sure if there's any better way than just hardcoding by OS name. +# Override default settings by setting environment variables + +AC_DEFUN([XORG_MANPAGE_SECTIONS],[ +AC_REQUIRE([AC_CANONICAL_HOST]) + +if test x$APP_MAN_SUFFIX = x ; then + APP_MAN_SUFFIX=1 +fi +if test x$APP_MAN_DIR = x ; then + APP_MAN_DIR='$(mandir)/man$(APP_MAN_SUFFIX)' +fi + +if test x$LIB_MAN_SUFFIX = x ; then + LIB_MAN_SUFFIX=3 +fi +if test x$LIB_MAN_DIR = x ; then + LIB_MAN_DIR='$(mandir)/man$(LIB_MAN_SUFFIX)' +fi + +if test x$FILE_MAN_SUFFIX = x ; then + case $host_os in + solaris*) FILE_MAN_SUFFIX=4 ;; + *) FILE_MAN_SUFFIX=5 ;; + esac +fi +if test x$FILE_MAN_DIR = x ; then + FILE_MAN_DIR='$(mandir)/man$(FILE_MAN_SUFFIX)' +fi + +if test x$MISC_MAN_SUFFIX = x ; then + case $host_os in + solaris*) MISC_MAN_SUFFIX=5 ;; + *) MISC_MAN_SUFFIX=7 ;; + esac +fi +if test x$MISC_MAN_DIR = x ; then + MISC_MAN_DIR='$(mandir)/man$(MISC_MAN_SUFFIX)' +fi + +if test x$DRIVER_MAN_SUFFIX = x ; then + case $host_os in + solaris*) DRIVER_MAN_SUFFIX=7 ;; + *) DRIVER_MAN_SUFFIX=4 ;; + esac +fi +if test x$DRIVER_MAN_DIR = x ; then + DRIVER_MAN_DIR='$(mandir)/man$(DRIVER_MAN_SUFFIX)' +fi + +if test x$ADMIN_MAN_SUFFIX = x ; then + case $host_os in + solaris*) ADMIN_MAN_SUFFIX=1m ;; + *) ADMIN_MAN_SUFFIX=8 ;; + esac +fi +if test x$ADMIN_MAN_DIR = x ; then + ADMIN_MAN_DIR='$(mandir)/man$(ADMIN_MAN_SUFFIX)' +fi + + +AC_SUBST([APP_MAN_SUFFIX]) +AC_SUBST([LIB_MAN_SUFFIX]) +AC_SUBST([FILE_MAN_SUFFIX]) +AC_SUBST([MISC_MAN_SUFFIX]) +AC_SUBST([DRIVER_MAN_SUFFIX]) +AC_SUBST([ADMIN_MAN_SUFFIX]) +AC_SUBST([APP_MAN_DIR]) +AC_SUBST([LIB_MAN_DIR]) +AC_SUBST([FILE_MAN_DIR]) +AC_SUBST([MISC_MAN_DIR]) +AC_SUBST([DRIVER_MAN_DIR]) +AC_SUBST([ADMIN_MAN_DIR]) +]) # XORG_MANPAGE_SECTIONS + +# XORG_CHECK_LINUXDOC +# ------------------- +# Minimum version: 1.0.0 +# +# Defines the variable MAKE_TEXT if the necessary tools and +# files are found. $(MAKE_TEXT) blah.sgml will then produce blah.txt. +# Whether or not the necessary tools and files are found can be checked +# with the AM_CONDITIONAL "BUILD_LINUXDOC" +AC_DEFUN([XORG_CHECK_LINUXDOC],[ +if test x$XORG_SGML_PATH = x ; then + XORG_SGML_PATH=$prefix/share/sgml +fi +HAVE_DEFS_ENT= + +if test x"$cross_compiling" = x"yes" ; then + HAVE_DEFS_ENT=no +else + AC_CHECK_FILE([$XORG_SGML_PATH/X11/defs.ent], [HAVE_DEFS_ENT=yes]) +fi + +AC_PATH_PROG(LINUXDOC, linuxdoc) +AC_PATH_PROG(PS2PDF, ps2pdf) + +AC_MSG_CHECKING([Whether to build documentation]) + +if test x$HAVE_DEFS_ENT != x && test x$LINUXDOC != x ; then + BUILDDOC=yes +else + BUILDDOC=no +fi + +AM_CONDITIONAL(BUILD_LINUXDOC, [test x$BUILDDOC = xyes]) + +AC_MSG_RESULT([$BUILDDOC]) + +AC_MSG_CHECKING([Whether to build pdf documentation]) + +if test x$PS2PDF != x && test x$BUILD_PDFDOC != xno; then + BUILDPDFDOC=yes +else + BUILDPDFDOC=no +fi + +AM_CONDITIONAL(BUILD_PDFDOC, [test x$BUILDPDFDOC = xyes]) + +AC_MSG_RESULT([$BUILDPDFDOC]) + +MAKE_TEXT="SGML_SEARCH_PATH=$XORG_SGML_PATH GROFF_NO_SGR=y $LINUXDOC -B txt" +MAKE_PS="SGML_SEARCH_PATH=$XORG_SGML_PATH $LINUXDOC -B latex --papersize=letter --output=ps" +MAKE_PDF="$PS2PDF" +MAKE_HTML="SGML_SEARCH_PATH=$XORG_SGML_PATH $LINUXDOC -B html --split=0" + +AC_SUBST(MAKE_TEXT) +AC_SUBST(MAKE_PS) +AC_SUBST(MAKE_PDF) +AC_SUBST(MAKE_HTML) +]) # XORG_CHECK_LINUXDOC + +# XORG_CHECK_DOCBOOK +# ------------------- +# Minimum version: 1.0.0 +# +# Checks for the ability to build output formats from SGML DocBook source. +# For XXX in {TXT, PDF, PS, HTML}, the AM_CONDITIONAL "BUILD_XXXDOC" +# indicates whether the necessary tools and files are found and, if set, +# $(MAKE_XXX) blah.sgml will produce blah.xxx. +AC_DEFUN([XORG_CHECK_DOCBOOK],[ +if test x$XORG_SGML_PATH = x ; then + XORG_SGML_PATH=$prefix/share/sgml +fi +HAVE_DEFS_ENT= +BUILDTXTDOC=no +BUILDPDFDOC=no +BUILDPSDOC=no +BUILDHTMLDOC=no + +AC_CHECK_FILE([$XORG_SGML_PATH/X11/defs.ent], [HAVE_DEFS_ENT=yes]) + +AC_PATH_PROG(DOCBOOKPS, docbook2ps) +AC_PATH_PROG(DOCBOOKPDF, docbook2pdf) +AC_PATH_PROG(DOCBOOKHTML, docbook2html) +AC_PATH_PROG(DOCBOOKTXT, docbook2txt) + +AC_MSG_CHECKING([Whether to build text documentation]) +if test x$HAVE_DEFS_ENT != x && test x$DOCBOOKTXT != x && + test x$BUILD_TXTDOC != xno; then + BUILDTXTDOC=yes +fi +AM_CONDITIONAL(BUILD_TXTDOC, [test x$BUILDTXTDOC = xyes]) +AC_MSG_RESULT([$BUILDTXTDOC]) + +AC_MSG_CHECKING([Whether to build PDF documentation]) +if test x$HAVE_DEFS_ENT != x && test x$DOCBOOKPDF != x && + test x$BUILD_PDFDOC != xno; then + BUILDPDFDOC=yes +fi +AM_CONDITIONAL(BUILD_PDFDOC, [test x$BUILDPDFDOC = xyes]) +AC_MSG_RESULT([$BUILDPDFDOC]) + +AC_MSG_CHECKING([Whether to build PostScript documentation]) +if test x$HAVE_DEFS_ENT != x && test x$DOCBOOKPS != x && + test x$BUILD_PSDOC != xno; then + BUILDPSDOC=yes +fi +AM_CONDITIONAL(BUILD_PSDOC, [test x$BUILDPSDOC = xyes]) +AC_MSG_RESULT([$BUILDPSDOC]) + +AC_MSG_CHECKING([Whether to build HTML documentation]) +if test x$HAVE_DEFS_ENT != x && test x$DOCBOOKHTML != x && + test x$BUILD_HTMLDOC != xno; then + BUILDHTMLDOC=yes +fi +AM_CONDITIONAL(BUILD_HTMLDOC, [test x$BUILDHTMLDOC = xyes]) +AC_MSG_RESULT([$BUILDHTMLDOC]) + +MAKE_TEXT="SGML_SEARCH_PATH=$XORG_SGML_PATH $DOCBOOKTXT" +MAKE_PS="SGML_SEARCH_PATH=$XORG_SGML_PATH $DOCBOOKPS" +MAKE_PDF="SGML_SEARCH_PATH=$XORG_SGML_PATH $DOCBOOKPDF" +MAKE_HTML="SGML_SEARCH_PATH=$XORG_SGML_PATH $DOCBOOKHTML" + +AC_SUBST(MAKE_TEXT) +AC_SUBST(MAKE_PS) +AC_SUBST(MAKE_PDF) +AC_SUBST(MAKE_HTML) +]) # XORG_CHECK_DOCBOOK + +# XORG_CHECK_MALLOC_ZERO +# ---------------------- +# Minimum version: 1.0.0 +# +# Defines {MALLOC,XMALLOC,XTMALLOC}_ZERO_CFLAGS appropriately if +# malloc(0) returns NULL. Packages should add one of these cflags to +# their AM_CFLAGS (or other appropriate *_CFLAGS) to use them. +AC_DEFUN([XORG_CHECK_MALLOC_ZERO],[ +AC_ARG_ENABLE(malloc0returnsnull, + AC_HELP_STRING([--enable-malloc0returnsnull], + [malloc(0) returns NULL (default: auto)]), + [MALLOC_ZERO_RETURNS_NULL=$enableval], + [MALLOC_ZERO_RETURNS_NULL=auto]) + +AC_MSG_CHECKING([whether malloc(0) returns NULL]) +if test "x$MALLOC_ZERO_RETURNS_NULL" = xauto; then + AC_RUN_IFELSE([ +char *malloc(); +char *realloc(); +char *calloc(); +main() { + char *m0, *r0, *c0, *p; + m0 = malloc(0); + p = malloc(10); + r0 = realloc(p,0); + c0 = calloc(0); + exit(m0 == 0 || r0 == 0 || c0 == 0 ? 0 : 1); +}], + [MALLOC_ZERO_RETURNS_NULL=yes], + [MALLOC_ZERO_RETURNS_NULL=no]) +fi +AC_MSG_RESULT([$MALLOC_ZERO_RETURNS_NULL]) + +if test "x$MALLOC_ZERO_RETURNS_NULL" = xyes; then + MALLOC_ZERO_CFLAGS="-DMALLOC_0_RETURNS_NULL" + XMALLOC_ZERO_CFLAGS=$MALLOC_ZERO_CFLAGS + XTMALLOC_ZERO_CFLAGS="$MALLOC_ZERO_CFLAGS -DXTMALLOC_BC" +else + MALLOC_ZERO_CFLAGS="" + XMALLOC_ZERO_CFLAGS="" + XTMALLOC_ZERO_CFLAGS="" +fi + +AC_SUBST([MALLOC_ZERO_CFLAGS]) +AC_SUBST([XMALLOC_ZERO_CFLAGS]) +AC_SUBST([XTMALLOC_ZERO_CFLAGS]) +]) # XORG_CHECK_MALLOC_ZERO + +# XORG_WITH_LINT() +# ---------------- +# Minimum version: 1.1.0 +# +# Sets up flags for source checkers such as lint and sparse if --with-lint +# is specified. (Use --with-lint=sparse for sparse.) +# Sets $LINT to name of source checker passed with --with-lint (default: lint) +# Sets $LINT_FLAGS to flags to pass to source checker +# Sets LINT automake conditional if enabled (default: disabled) +# +AC_DEFUN([XORG_WITH_LINT],[ + +# Allow checking code with lint, sparse, etc. +AC_ARG_WITH(lint, [AC_HELP_STRING([--with-lint], + [Use a lint-style source code checker (default: disabled)])], + [use_lint=$withval], [use_lint=no]) +if test "x$use_lint" = "xyes" ; then + LINT="lint" +else + LINT="$use_lint" +fi +if test "x$LINT_FLAGS" = "x" -a "x$LINT" != "xno" ; then + case $LINT in + lint|*/lint) + case $host_os in + solaris*) + LINT_FLAGS="-u -b -h -erroff=E_INDISTING_FROM_TRUNC2" + ;; + esac + ;; + esac +fi + +AC_SUBST(LINT) +AC_SUBST(LINT_FLAGS) +AM_CONDITIONAL(LINT, [test x$LINT != xno]) + +]) # XORG_WITH_LINT + +# XORG_LINT_LIBRARY(LIBNAME) +# -------------------------- +# Minimum version: 1.1.0 +# +# Sets up flags for building lint libraries for checking programs that call +# functions in the library. +# Disabled by default, enable with --enable-lint-library +# Sets: +# @LINTLIB@ - name of lint library file to make +# MAKE_LINT_LIB - automake conditional +# + +AC_DEFUN([XORG_LINT_LIBRARY],[ +AC_REQUIRE([XORG_WITH_LINT]) +# Build lint "library" for more indepth checks of programs calling this library +AC_ARG_ENABLE(lint-library, [AC_HELP_STRING([--enable-lint-library], + [Create lint library (default: disabled)])], + [make_lint_lib=$enableval], [make_lint_lib=no]) +if test "x$make_lint_lib" != "xno" ; then + if test "x$LINT" = "xno" ; then + AC_MSG_ERROR([Cannot make lint library without --with-lint]) + fi + if test "x$make_lint_lib" = "xyes" ; then + LINTLIB=llib-l$1.ln + else + LINTLIB=$make_lint_lib + fi +fi +AC_SUBST(LINTLIB) +AM_CONDITIONAL(MAKE_LINT_LIB, [test x$make_lint_lib != xno]) + +]) # XORG_LINT_LIBRARY + +# XORG_CWARNFLAGS +# --------------- +# Minimum version: 1.2.0 +# +# Defines CWARNFLAGS to enable C compiler warnings. +# +AC_DEFUN([XORG_CWARNFLAGS], [ +AC_REQUIRE([AC_PROG_CC]) +if test "x$GCC" = xyes ; then + CWARNFLAGS="-Wall -Wpointer-arith -Wstrict-prototypes -Wmissing-prototypes \ +-Wmissing-declarations -Wnested-externs -fno-strict-aliasing \ +-Wbad-function-cast" + case `gcc -dumpversion` in + 3.4.* | 4.*) + CWARNFLAGS+=" -Wold-style-definition -Wdeclaration-after-statement" + ;; + esac +else + AC_CHECK_DECL([__SUNPRO_C], [SUNCC="yes"], [SUNCC="no"]) + if test "x$SUNCC" = "xyes"; then + CWARNFLAGS="-v" + fi +fi +AC_SUBST(CWARNFLAGS) +]) # XORG_CWARNFLAGS +dnl Copyright 2005 Red Hat, Inc +dnl +dnl Permission to use, copy, modify, distribute, and sell this software and its +dnl documentation for any purpose is hereby granted without fee, provided that +dnl the above copyright notice appear in all copies and that both that +dnl copyright notice and this permission notice appear in supporting +dnl documentation. +dnl +dnl The above copyright notice and this permission notice shall be included +dnl in all copies or substantial portions of the Software. +dnl +dnl THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS +dnl OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +dnl MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. +dnl IN NO EVENT SHALL THE OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR +dnl OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, +dnl ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR +dnl OTHER DEALINGS IN THE SOFTWARE. +dnl +dnl Except as contained in this notice, the name of the copyright holders shall +dnl not be used in advertising or otherwise to promote the sale, use or +dnl other dealings in this Software without prior written authorization +dnl from the copyright holders. +dnl + +# XORG_RELEASE_VERSION +# -------------------- +# Adds --with/without-release-string and changes the PACKAGE and +# PACKAGE_TARNAME to use "$PACKAGE{_TARNAME}-$RELEASE_VERSION". If +# no option is given, PACKAGE and PACKAGE_TARNAME are unchanged. Also +# defines PACKAGE_VERSION_{MAJOR,MINOR,PATCHLEVEL} for modules to use. + +AC_DEFUN([XORG_RELEASE_VERSION],[ + AC_ARG_WITH(release-version, + AC_HELP_STRING([--with-release-version=STRING], + [Use release version string in package name]), + [RELEASE_VERSION="$withval"], + [RELEASE_VERSION=""]) + if test "x$RELEASE_VERSION" != "x"; then + PACKAGE="$PACKAGE-$RELEASE_VERSION" + PACKAGE_TARNAME="$PACKAGE_TARNAME-$RELEASE_VERSION" + AC_MSG_NOTICE([Building with package name set to $PACKAGE]) + fi + AC_DEFINE_UNQUOTED([PACKAGE_VERSION_MAJOR], + [`echo $PACKAGE_VERSION | cut -d . -f 1`], + [Major version of this package]) + PVM=`echo $PACKAGE_VERSION | cut -d . -f 2 | cut -d - -f 1` + if test "x$PVM" = "x"; then + PVM="0" + fi + AC_DEFINE_UNQUOTED([PACKAGE_VERSION_MINOR], + [$PVM], + [Minor version of this package]) + PVP=`echo $PACKAGE_VERSION | cut -d . -f 3 | cut -d - -f 1` + if test "x$PVP" = "x"; then + PVP="0" + fi + AC_DEFINE_UNQUOTED([PACKAGE_VERSION_PATCHLEVEL], + [$PVP], + [Patch version of this package]) +]) + +# XORG_CHANGELOG() +# ---------------- +# Minimum version: 1.2.0 +# +# Defines the variable CHANGELOG_CMD as the command to generate +# ChangeLog from git. +# +# Arrange that distcleancheck ignores ChangeLog left over by distclean. +# +AC_DEFUN([XORG_CHANGELOG], [ +CHANGELOG_CMD="(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)" +AC_SUBST([CHANGELOG_CMD]) +AC_SUBST([distcleancheck_listfiles], ['find . -type f ! -name ChangeLog -print']) +]) # XORG_CHANGELOG # Copyright (C) 2002, 2003, 2005, 2006 Free Software Foundation, Inc. # @@ -901,72 +1440,7 @@ AC_SUBST([am__untar]) ]) # _AM_PROG_TAR -dnl Copyright 2005 Red Hat, Inc -dnl -dnl Permission to use, copy, modify, distribute, and sell this software and its -dnl documentation for any purpose is hereby granted without fee, provided that -dnl the above copyright notice appear in all copies and that both that -dnl copyright notice and this permission notice appear in supporting -dnl documentation. -dnl -dnl The above copyright notice and this permission notice shall be included -dnl in all copies or substantial portions of the Software. -dnl -dnl THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS -dnl OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -dnl MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. -dnl IN NO EVENT SHALL THE OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR -dnl OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, -dnl ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR -dnl OTHER DEALINGS IN THE SOFTWARE. -dnl -dnl Except as contained in this notice, the name of the copyright holders shall -dnl not be used in advertising or otherwise to promote the sale, use or -dnl other dealings in this Software without prior written authorization -dnl from the copyright holders. -dnl - -# XAW_CHECK_XPRINT_SUPPORT() -# -------------------------- -# Adds --enable/disable-xprint and selects the appropriate version of the Xaw -# library. If neither --enable-xprint nor --disable-xprint are given, -# the presence of an Xaw with Xprint support will be auto detected - -AC_DEFUN([XAW_CHECK_XPRINT_SUPPORT],[ - AC_ARG_ENABLE(xprint, AC_HELP_STRING([--enable-xprint], [Enable XPrint support]), - [use_xprint=$enableval],[use_xprint=auto]) - if test "x$use_xprint" = "xyes"; then - TMP_CHECK1=xaw8 - TMP_CHECK2= - xaw_use_xprint=yes - elif test "x$use_xprint" = "xno"; then - TMP_CHECK1=xaw7 - TMP_CHECK2= - xaw_use_xprint=no - else - TMP_CHECK1=xaw8 - TMP_CHECK2=xaw7 - xaw_use_xprint=yes - fi - - PKG_CHECK_MODULES(TMP_XAW, $TMP_CHECK1, success=yes, success=no) - if [[ ! -z $TMP_CHECK2 ]] ; then - if test $success = no ; then - PKG_CHECK_MODULES(TMP_XAW, $TMP_CHECK2, success=yes, success=no) - xaw_use_xprint=no - fi - fi - - if test "x$success" = "xyes"; then - $1_CFLAGS=$TMP_XAW_CFLAGS - $1_LIBS=$TMP_XAW_LIBS - - AM_CONDITIONAL([XAW_USE_XPRINT], [test "x$xaw_use_xprint" = "xyes"]) - else - AC_MSG_ERROR([No suitable version of Xaw found]) - fi -]) - +dnl xorg-macros.m4. Generated from xorg-macros.m4.in xorgversion.m4 by configure. dnl dnl Copyright 2005-2006 Sun Microsystems, Inc. All rights reserved. dnl @@ -1003,27 +1477,24 @@ # your configure.ac with the minimum required version, such as: # XORG_MACROS_VERSION(1.1) # -# To force at least a version with this macro defined, also add: -# m4_ifndef([XORG_MACROS_VERSION], [AC_FATAL([must install xorg-macros 1.1 or later before running autoconf/autogen])]) +# To ensure that this macro is defined, also add: +# m4_ifndef([XORG_MACROS_VERSION], +# [m4_fatal([must install xorg-macros 1.1 or later before running autoconf/autogen])]) # # # See the "minimum version" comment for each macro you use to see what # version you require. -AC_DEFUN([XORG_MACROS_VERSION],[ - [XORG_MACROS_needed_version=$1 - XORG_MACROS_needed_major=`echo $XORG_MACROS_needed_version | sed 's/\..*$//'` - XORG_MACROS_needed_minor=`echo $XORG_MACROS_needed_version | sed -e 's/^[0-9]*\.//' -e 's/\..*$//'`] - AC_MSG_CHECKING([if xorg-macros used to generate configure is at least ${XORG_MACROS_needed_major}.${XORG_MACROS_needed_minor}]) - [XORG_MACROS_version=1.1.5 - XORG_MACROS_major=`echo $XORG_MACROS_version | sed 's/\..*$//'` - XORG_MACROS_minor=`echo $XORG_MACROS_version | sed -e 's/^[0-9]*\.//' -e 's/\..*$//'`] - if test $XORG_MACROS_major -ne $XORG_MACROS_needed_major ; then - AC_MSG_ERROR([configure built with incompatible version of xorg-macros.m4 - requires version ${XORG_MACROS_major}.x]) - fi - if test $XORG_MACROS_minor -lt $XORG_MACROS_needed_minor ; then - AC_MSG_ERROR([configure built with too old of a version of xorg-macros.m4 - requires version ${XORG_MACROS_major}.${XORG_MACROS_minor}.0 or newer]) - fi - AC_MSG_RESULT([yes, $XORG_MACROS_version]) +m4_defun([XORG_MACROS_VERSION],[ +m4_define([vers_have], [1.2.2]) +m4_define([maj_have], m4_substr(vers_have, 0, m4_index(vers_have, [.]))) +m4_define([maj_needed], m4_substr([$1], 0, m4_index([$1], [.]))) +m4_if(m4_cmp(maj_have, maj_needed), 0,, + [m4_fatal([xorg-macros major version ]maj_needed[ is required but ]vers_have[ found])]) +m4_if(m4_version_compare(vers_have, [$1]), -1, + [m4_fatal([xorg-macros version $1 or higher is required but ]vers_have[ found])]) +m4_undefine([vers_have]) +m4_undefine([maj_have]) +m4_undefine([maj_needed]) ]) # XORG_MACROS_VERSION # XORG_PROG_RAWCPP() @@ -1048,6 +1519,10 @@ if test `${RAWCPP} -undef < conftest.$ac_ext | grep -c 'unix'` -eq 1 ; then RAWCPPFLAGS=-undef AC_MSG_RESULT([yes]) + # under Cygwin unix is still defined even with -undef + elif test `${RAWCPP} -undef -ansi < conftest.$ac_ext | grep -c 'unix'` -eq 1 ; then + RAWCPPFLAGS="-undef -ansi" + AC_MSG_RESULT([yes, with -ansi]) else AC_MSG_ERROR([${RAWCPP} defines unix with or without -undef. I don't know what to do.]) fi @@ -1160,7 +1635,9 @@ # Whether or not the necessary tools and files are found can be checked # with the AM_CONDITIONAL "BUILD_LINUXDOC" AC_DEFUN([XORG_CHECK_LINUXDOC],[ -XORG_SGML_PATH=$prefix/share/sgml +if test x$XORG_SGML_PATH = x ; then + XORG_SGML_PATH=$prefix/share/sgml +fi HAVE_DEFS_ENT= if test x"$cross_compiling" = x"yes" ; then @@ -1216,7 +1693,9 @@ # indicates whether the necessary tools and files are found and, if set, # $(MAKE_XXX) blah.sgml will produce blah.xxx. AC_DEFUN([XORG_CHECK_DOCBOOK],[ -XORG_SGML_PATH=$prefix/share/sgml +if test x$XORG_SGML_PATH = x ; then + XORG_SGML_PATH=$prefix/share/sgml +fi HAVE_DEFS_ENT= BUILDTXTDOC=no BUILDPDFDOC=no @@ -1393,6 +1872,31 @@ ]) # XORG_LINT_LIBRARY +# XORG_CWARNFLAGS +# --------------- +# Minimum version: 1.2.0 +# +# Defines CWARNFLAGS to enable C compiler warnings. +# +AC_DEFUN([XORG_CWARNFLAGS], [ +AC_REQUIRE([AC_PROG_CC]) +if test "x$GCC" = xyes ; then + CWARNFLAGS="-Wall -Wpointer-arith -Wstrict-prototypes -Wmissing-prototypes \ +-Wmissing-declarations -Wnested-externs -fno-strict-aliasing \ +-Wbad-function-cast" + case `$CC -dumpversion` in + 3.4.* | 4.*) + CWARNFLAGS="$CWARNFLAGS -Wold-style-definition -Wdeclaration-after-statement" + ;; + esac +else + AC_CHECK_DECL([__SUNPRO_C], [SUNCC="yes"], [SUNCC="no"]) + if test "x$SUNCC" = "xyes"; then + CWARNFLAGS="-v" + fi +fi +AC_SUBST(CWARNFLAGS) +]) # XORG_CWARNFLAGS dnl Copyright 2005 Red Hat, Inc dnl dnl Permission to use, copy, modify, distribute, and sell this software and its @@ -1439,14 +1943,14 @@ AC_DEFINE_UNQUOTED([PACKAGE_VERSION_MAJOR], [`echo $PACKAGE_VERSION | cut -d . -f 1`], [Major version of this package]) - PVM=`echo $PACKAGE_VERSION | cut -d . -f 2` + PVM=`echo $PACKAGE_VERSION | cut -d . -f 2 | cut -d - -f 1` if test "x$PVM" = "x"; then PVM="0" fi AC_DEFINE_UNQUOTED([PACKAGE_VERSION_MINOR], [$PVM], [Minor version of this package]) - PVP=`echo $PACKAGE_VERSION | cut -d . -f 3` + PVP=`echo $PACKAGE_VERSION | cut -d . -f 3 | cut -d - -f 1` if test "x$PVP" = "x"; then PVP="0" fi @@ -1454,6 +1958,23 @@ [$PVP], [Patch version of this package]) ]) + +# XORG_CHANGELOG() +# ---------------- +# Minimum version: 1.2.0 +# +# Defines the variable CHANGELOG_CMD as the command to generate +# ChangeLog from git. +# +# Arrange that distcleancheck ignores ChangeLog left over by distclean. +# +AC_DEFUN([XORG_CHANGELOG], [ +CHANGELOG_CMD="(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)" +AC_SUBST([CHANGELOG_CMD]) +AC_SUBST([distcleancheck_listfiles], ['find . -type f ! -name ChangeLog -print']) +]) # XORG_CHANGELOG # pkg.m4 - Macros to locate and utilise pkg-config. -*- Autoconf -*- # diff --git a/xmag/app-defaults/Xmag b/xmag/app-defaults/Xmag new file mode 100644 index 0000000..1bc4961 --- /dev/null +++ b/xmag/app-defaults/Xmag @@ -0,0 +1,27 @@ +! $Xorg: Xmag.ad,v 1.3 2000/08/17 19:54:54 cpqbld Exp $ +! $XFree86$ +*Font: fixed +*pane2*orientation: horizontal +*pane2*showGrip: False +*allowShellResize: on +*Scale.baseTranslations:#augment\ + : set-colors()\n\ + : unset-colors()\n\ + :popup-pixel()\n\ + Button1:popup-pixel()\n\ + :update-pixel()\n\ + :popdown-pixel()\n\ + :popdown-pixel()\n\ + n:new()\n\ + q:close()\n\ + Ctrlc:close()\n\ + space:replace() +*close.accelerators:#augment\ + q:set()notify()unset()\n\ + Ctrlc:set()notify()unset() +*replace.accelerators:#augment\ + space:set()notify()unset()\n\ + :set()notify()unset()\n\ + :set()notify()unset() +*helpLabel.font: 8x13bold +*helpLabel.label: xmag diff --git a/xmag/config.h.in b/xmag/config.h.in index 029f380..319be99 100644 --- a/xmag/config.h.in +++ b/xmag/config.h.in @@ -1,4 +1,10 @@ /* config.h.in. Generated from configure.ac by autoheader. */ + +/* Define to 1 if you have the header file. */ +#undef HAVE_INTTYPES_H + +/* Define to 1 if you have the header file. */ +#undef HAVE_MEMORY_H /* Define to 1 if you have the `nanosleep' function. */ #undef HAVE_NANOSLEEP @@ -8,6 +14,27 @@ /* Define to 1 if you have the `select' function. */ #undef HAVE_SELECT + +/* Define to 1 if you have the header file. */ +#undef HAVE_STDINT_H + +/* Define to 1 if you have the header file. */ +#undef HAVE_STDLIB_H + +/* Define to 1 if you have the header file. */ +#undef HAVE_STRINGS_H + +/* Define to 1 if you have the header file. */ +#undef HAVE_STRING_H + +/* Define to 1 if you have the header file. */ +#undef HAVE_SYS_STAT_H + +/* Define to 1 if you have the header file. */ +#undef HAVE_SYS_TYPES_H + +/* Define to 1 if you have the header file. */ +#undef HAVE_UNISTD_H /* Name of package */ #undef PACKAGE @@ -36,5 +63,8 @@ /* Patch version of this package */ #undef PACKAGE_VERSION_PATCHLEVEL +/* Define to 1 if you have the ANSI C header files. */ +#undef STDC_HEADERS + /* Version number of package */ #undef VERSION diff --git a/xmag/configure b/xmag/configure index 333e718..61609b5 100755 --- a/xmag/configure +++ b/xmag/configure @@ -1,6 +1,6 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.61 for xmag 1.0.2. +# Generated by GNU Autoconf 2.61 for xmag 1.0.3. # # Report bugs to . # @@ -574,9 +574,45 @@ # Identity of this package. PACKAGE_NAME='xmag' PACKAGE_TARNAME='xmag' -PACKAGE_VERSION='1.0.2' -PACKAGE_STRING='xmag 1.0.2' +PACKAGE_VERSION='1.0.3' +PACKAGE_STRING='xmag 1.0.3' PACKAGE_BUGREPORT='https://bugs.freedesktop.org/enter_bug.cgi?product=xorg' + +# Factoring default headers for most tests. +ac_includes_default="\ +#include +#ifdef HAVE_SYS_TYPES_H +# include +#endif +#ifdef HAVE_SYS_STAT_H +# include +#endif +#ifdef STDC_HEADERS +# include +# include +#else +# ifdef HAVE_STDLIB_H +# include +# endif +#endif +#ifdef HAVE_STRING_H +# if !defined STDC_HEADERS && defined HAVE_MEMORY_H +# include +# endif +# include +#endif +#ifdef HAVE_STRINGS_H +# include +#endif +#ifdef HAVE_INTTYPES_H +# include +#endif +#ifdef HAVE_STDINT_H +# include +#endif +#ifdef HAVE_UNISTD_H +# include +#endif" ac_subst_vars='SHELL PATH_SEPARATOR @@ -656,11 +692,11 @@ CCDEPMODE am__fastdepCC_TRUE am__fastdepCC_FALSE +CPP +GREP +EGREP +CWARNFLAGS PKG_CONFIG -TMP_XAW_CFLAGS -TMP_XAW_LIBS -XAW_USE_XPRINT_TRUE -XAW_USE_XPRINT_FALSE XMAG_CFLAGS XMAG_LIBS APPDEFS_CFLAGS @@ -686,6 +722,8 @@ MISC_MAN_DIR DRIVER_MAN_DIR ADMIN_MAN_DIR +CHANGELOG_CMD +distcleancheck_listfiles LIBOBJS LTLIBOBJS' ac_subst_files='' @@ -697,9 +735,10 @@ LDFLAGS LIBS CPPFLAGS +CPP PKG_CONFIG -TMP_XAW_CFLAGS -TMP_XAW_LIBS +XMAG_CFLAGS +XMAG_LIBS APPDEFS_CFLAGS APPDEFS_LIBS' @@ -1204,7 +1243,7 @@ # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF -\`configure' configures xmag 1.0.2 to adapt to many kinds of systems. +\`configure' configures xmag 1.0.3 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... @@ -1274,7 +1313,7 @@ if test -n "$ac_init_help"; then case $ac_init_help in - short | recursive ) echo "Configuration of xmag 1.0.2:";; + short | recursive ) echo "Configuration of xmag 1.0.3:";; esac cat <<\_ACEOF @@ -1285,11 +1324,13 @@ (and sometimes confusing) to the casual installer --disable-dependency-tracking speeds up one-time build --enable-dependency-tracking do not reject slow dependency extractors - --enable-xprint Enable XPrint support Optional Packages: --with-PACKAGE[=ARG] use PACKAGE [ARG=yes] --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no) + --with-appdefaultdir= + specify directory for app-defaults files (default is + autodetected) --with-release-version=STRING Use release version string in package name @@ -1301,11 +1342,10 @@ LIBS libraries to pass to the linker, e.g. -l CPPFLAGS C/C++/Objective C preprocessor flags, e.g. -I if you have headers in a nonstandard directory + CPP C preprocessor PKG_CONFIG path to pkg-config utility - TMP_XAW_CFLAGS - C compiler flags for TMP_XAW, overriding pkg-config - TMP_XAW_LIBS - linker flags for TMP_XAW, overriding pkg-config + XMAG_CFLAGS C compiler flags for XMAG, overriding pkg-config + XMAG_LIBS linker flags for XMAG, overriding pkg-config APPDEFS_CFLAGS C compiler flags for APPDEFS, overriding pkg-config APPDEFS_LIBS @@ -1375,7 +1415,7 @@ test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF -xmag configure 1.0.2 +xmag configure 1.0.3 generated by GNU Autoconf 2.61 Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, @@ -1389,7 +1429,7 @@ This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. -It was created by xmag $as_me 1.0.2, which was +It was created by xmag $as_me 1.0.3, which was generated by GNU Autoconf 2.61. Invocation command line was $ $0 $@ @@ -2079,7 +2119,7 @@ # Define the identity of the package. PACKAGE='xmag' - VERSION='1.0.2' + VERSION='1.0.3' cat >>confdefs.h <<_ACEOF @@ -2245,6 +2285,19 @@ fi MAINT=$MAINTAINER_MODE_TRUE + + + +# Require xorg-macros: XORG_CWARNFLAGS, XORG_CHANGELOG + + + + + + + + + @@ -3422,6 +3475,719 @@ +ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu +{ echo "$as_me:$LINENO: checking how to run the C preprocessor" >&5 +echo $ECHO_N "checking how to run the C preprocessor... $ECHO_C" >&6; } +# On Suns, sometimes $CPP names a directory. +if test -n "$CPP" && test -d "$CPP"; then + CPP= +fi +if test -z "$CPP"; then + if test "${ac_cv_prog_CPP+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + # Double quotes because CPP needs to be expanded + for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp" + do + ac_preproc_ok=false +for ac_c_preproc_warn_flag in '' yes +do + # Use a header file that comes with gcc, so configuring glibc + # with a fresh cross-compiler works. + # Prefer to if __STDC__ is defined, since + # exists even on freestanding compilers. + # On the NeXT, cc -E runs the code through the compiler's parser, + # not just through cpp. "Syntax error" is here to catch this case. + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#ifdef __STDC__ +# include +#else +# include +#endif + Syntax error +_ACEOF +if { (ac_try="$ac_cpp conftest.$ac_ext" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } >/dev/null && { + test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || + test ! -s conftest.err + }; then + : +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + # Broken: fails on valid input. +continue +fi + +rm -f conftest.err conftest.$ac_ext + + # OK, works on sane cases. Now check whether nonexistent headers + # can be detected and how. + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include +_ACEOF +if { (ac_try="$ac_cpp conftest.$ac_ext" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } >/dev/null && { + test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || + test ! -s conftest.err + }; then + # Broken: success on invalid input. +continue +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + # Passes both tests. +ac_preproc_ok=: +break +fi + +rm -f conftest.err conftest.$ac_ext + +done +# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. +rm -f conftest.err conftest.$ac_ext +if $ac_preproc_ok; then + break +fi + + done + ac_cv_prog_CPP=$CPP + +fi + CPP=$ac_cv_prog_CPP +else + ac_cv_prog_CPP=$CPP +fi +{ echo "$as_me:$LINENO: result: $CPP" >&5 +echo "${ECHO_T}$CPP" >&6; } +ac_preproc_ok=false +for ac_c_preproc_warn_flag in '' yes +do + # Use a header file that comes with gcc, so configuring glibc + # with a fresh cross-compiler works. + # Prefer to if __STDC__ is defined, since + # exists even on freestanding compilers. + # On the NeXT, cc -E runs the code through the compiler's parser, + # not just through cpp. "Syntax error" is here to catch this case. + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#ifdef __STDC__ +# include +#else +# include +#endif + Syntax error +_ACEOF +if { (ac_try="$ac_cpp conftest.$ac_ext" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } >/dev/null && { + test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || + test ! -s conftest.err + }; then + : +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + # Broken: fails on valid input. +continue +fi + +rm -f conftest.err conftest.$ac_ext + + # OK, works on sane cases. Now check whether nonexistent headers + # can be detected and how. + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include +_ACEOF +if { (ac_try="$ac_cpp conftest.$ac_ext" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } >/dev/null && { + test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || + test ! -s conftest.err + }; then + # Broken: success on invalid input. +continue +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + # Passes both tests. +ac_preproc_ok=: +break +fi + +rm -f conftest.err conftest.$ac_ext + +done +# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. +rm -f conftest.err conftest.$ac_ext +if $ac_preproc_ok; then + : +else + { { echo "$as_me:$LINENO: error: C preprocessor \"$CPP\" fails sanity check +See \`config.log' for more details." >&5 +echo "$as_me: error: C preprocessor \"$CPP\" fails sanity check +See \`config.log' for more details." >&2;} + { (exit 1); exit 1; }; } +fi + +ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu + + +{ echo "$as_me:$LINENO: checking for grep that handles long lines and -e" >&5 +echo $ECHO_N "checking for grep that handles long lines and -e... $ECHO_C" >&6; } +if test "${ac_cv_path_GREP+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + # Extract the first word of "grep ggrep" to use in msg output +if test -z "$GREP"; then +set dummy grep ggrep; ac_prog_name=$2 +if test "${ac_cv_path_GREP+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + ac_path_GREP_found=false +# Loop through the user's path and test for each of PROGNAME-LIST +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_prog in grep ggrep; do + for ac_exec_ext in '' $ac_executable_extensions; do + ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext" + { test -f "$ac_path_GREP" && $as_test_x "$ac_path_GREP"; } || continue + # Check for GNU ac_path_GREP and select it if it is found. + # Check for GNU $ac_path_GREP +case `"$ac_path_GREP" --version 2>&1` in +*GNU*) + ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;; +*) + ac_count=0 + echo $ECHO_N "0123456789$ECHO_C" >"conftest.in" + while : + do + cat "conftest.in" "conftest.in" >"conftest.tmp" + mv "conftest.tmp" "conftest.in" + cp "conftest.in" "conftest.nl" + echo 'GREP' >> "conftest.nl" + "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break + diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break + ac_count=`expr $ac_count + 1` + if test $ac_count -gt ${ac_path_GREP_max-0}; then + # Best one so far, save it but keep looking for a better one + ac_cv_path_GREP="$ac_path_GREP" + ac_path_GREP_max=$ac_count + fi + # 10*(2^10) chars as input seems more than enough + test $ac_count -gt 10 && break + done + rm -f conftest.in conftest.tmp conftest.nl conftest.out;; +esac + + + $ac_path_GREP_found && break 3 + done +done + +done +IFS=$as_save_IFS + + +fi + +GREP="$ac_cv_path_GREP" +if test -z "$GREP"; then + { { echo "$as_me:$LINENO: error: no acceptable $ac_prog_name could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&5 +echo "$as_me: error: no acceptable $ac_prog_name could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&2;} + { (exit 1); exit 1; }; } +fi + +else + ac_cv_path_GREP=$GREP +fi + + +fi +{ echo "$as_me:$LINENO: result: $ac_cv_path_GREP" >&5 +echo "${ECHO_T}$ac_cv_path_GREP" >&6; } + GREP="$ac_cv_path_GREP" + + +{ echo "$as_me:$LINENO: checking for egrep" >&5 +echo $ECHO_N "checking for egrep... $ECHO_C" >&6; } +if test "${ac_cv_path_EGREP+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + if echo a | $GREP -E '(a|b)' >/dev/null 2>&1 + then ac_cv_path_EGREP="$GREP -E" + else + # Extract the first word of "egrep" to use in msg output +if test -z "$EGREP"; then +set dummy egrep; ac_prog_name=$2 +if test "${ac_cv_path_EGREP+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + ac_path_EGREP_found=false +# Loop through the user's path and test for each of PROGNAME-LIST +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_prog in egrep; do + for ac_exec_ext in '' $ac_executable_extensions; do + ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext" + { test -f "$ac_path_EGREP" && $as_test_x "$ac_path_EGREP"; } || continue + # Check for GNU ac_path_EGREP and select it if it is found. + # Check for GNU $ac_path_EGREP +case `"$ac_path_EGREP" --version 2>&1` in +*GNU*) + ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;; +*) + ac_count=0 + echo $ECHO_N "0123456789$ECHO_C" >"conftest.in" + while : + do + cat "conftest.in" "conftest.in" >"conftest.tmp" + mv "conftest.tmp" "conftest.in" + cp "conftest.in" "conftest.nl" + echo 'EGREP' >> "conftest.nl" + "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break + diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break + ac_count=`expr $ac_count + 1` + if test $ac_count -gt ${ac_path_EGREP_max-0}; then + # Best one so far, save it but keep looking for a better one + ac_cv_path_EGREP="$ac_path_EGREP" + ac_path_EGREP_max=$ac_count + fi + # 10*(2^10) chars as input seems more than enough + test $ac_count -gt 10 && break + done + rm -f conftest.in conftest.tmp conftest.nl conftest.out;; +esac + + + $ac_path_EGREP_found && break 3 + done +done + +done +IFS=$as_save_IFS + + +fi + +EGREP="$ac_cv_path_EGREP" +if test -z "$EGREP"; then + { { echo "$as_me:$LINENO: error: no acceptable $ac_prog_name could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&5 +echo "$as_me: error: no acceptable $ac_prog_name could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&2;} + { (exit 1); exit 1; }; } +fi + +else + ac_cv_path_EGREP=$EGREP +fi + + + fi +fi +{ echo "$as_me:$LINENO: result: $ac_cv_path_EGREP" >&5 +echo "${ECHO_T}$ac_cv_path_EGREP" >&6; } + EGREP="$ac_cv_path_EGREP" + + +{ echo "$as_me:$LINENO: checking for ANSI C header files" >&5 +echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6; } +if test "${ac_cv_header_stdc+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include +#include +#include +#include + +int +main () +{ + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + ac_cv_header_stdc=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_cv_header_stdc=no +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + +if test $ac_cv_header_stdc = yes; then + # SunOS 4.x string.h does not declare mem*, contrary to ANSI. + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include + +_ACEOF +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | + $EGREP "memchr" >/dev/null 2>&1; then + : +else + ac_cv_header_stdc=no +fi +rm -f conftest* + +fi + +if test $ac_cv_header_stdc = yes; then + # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI. + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include + +_ACEOF +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | + $EGREP "free" >/dev/null 2>&1; then + : +else + ac_cv_header_stdc=no +fi +rm -f conftest* + +fi + +if test $ac_cv_header_stdc = yes; then + # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi. + if test "$cross_compiling" = yes; then + : +else + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include +#include +#if ((' ' & 0x0FF) == 0x020) +# define ISLOWER(c) ('a' <= (c) && (c) <= 'z') +# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c)) +#else +# define ISLOWER(c) \ + (('a' <= (c) && (c) <= 'i') \ + || ('j' <= (c) && (c) <= 'r') \ + || ('s' <= (c) && (c) <= 'z')) +# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c)) +#endif + +#define XOR(e, f) (((e) && !(f)) || (!(e) && (f))) +int +main () +{ + int i; + for (i = 0; i < 256; i++) + if (XOR (islower (i), ISLOWER (i)) + || toupper (i) != TOUPPER (i)) + return 2; + return 0; +} +_ACEOF +rm -f conftest$ac_exeext +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { ac_try='./conftest$ac_exeext' + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + : +else + echo "$as_me: program exited with status $ac_status" >&5 +echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +( exit $ac_status ) +ac_cv_header_stdc=no +fi +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext +fi + + +fi +fi +{ echo "$as_me:$LINENO: result: $ac_cv_header_stdc" >&5 +echo "${ECHO_T}$ac_cv_header_stdc" >&6; } +if test $ac_cv_header_stdc = yes; then + +cat >>confdefs.h <<\_ACEOF +#define STDC_HEADERS 1 +_ACEOF + +fi + +# On IRIX 5.3, sys/types and inttypes.h are conflicting. + + + + + + + + + +for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \ + inttypes.h stdint.h unistd.h +do +as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` +{ echo "$as_me:$LINENO: checking for $ac_header" >&5 +echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; } +if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +$ac_includes_default + +#include <$ac_header> +_ACEOF +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + eval "$as_ac_Header=yes" +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + eval "$as_ac_Header=no" +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +ac_res=`eval echo '${'$as_ac_Header'}'` + { echo "$as_me:$LINENO: result: $ac_res" >&5 +echo "${ECHO_T}$ac_res" >&6; } +if test `eval echo '${'$as_ac_Header'}'` = yes; then + cat >>confdefs.h <<_ACEOF +#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1 +_ACEOF + +fi + +done + + + + +if test "x$GCC" = xyes ; then + CWARNFLAGS="-Wall -Wpointer-arith -Wstrict-prototypes -Wmissing-prototypes \ +-Wmissing-declarations -Wnested-externs -fno-strict-aliasing \ +-Wbad-function-cast" + case `$CC -dumpversion` in + 3.4.* | 4.*) + CWARNFLAGS="$CWARNFLAGS -Wold-style-definition -Wdeclaration-after-statement" + ;; + esac +else + { echo "$as_me:$LINENO: checking whether __SUNPRO_C is declared" >&5 +echo $ECHO_N "checking whether __SUNPRO_C is declared... $ECHO_C" >&6; } +if test "${ac_cv_have_decl___SUNPRO_C+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +$ac_includes_default +int +main () +{ +#ifndef __SUNPRO_C + (void) __SUNPRO_C; +#endif + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + ac_cv_have_decl___SUNPRO_C=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_cv_have_decl___SUNPRO_C=no +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +{ echo "$as_me:$LINENO: result: $ac_cv_have_decl___SUNPRO_C" >&5 +echo "${ECHO_T}$ac_cv_have_decl___SUNPRO_C" >&6; } +if test $ac_cv_have_decl___SUNPRO_C = yes; then + SUNCC="yes" +else + SUNCC="no" +fi + + if test "x$SUNCC" = "xyes"; then + CWARNFLAGS="-v" + fi +fi + + + @@ -3641,40 +4407,18 @@ fi - # Check whether --enable-xprint was given. -if test "${enable_xprint+set}" = set; then - enableval=$enable_xprint; use_xprint=$enableval -else - use_xprint=auto -fi - - if test "x$use_xprint" = "xyes"; then - TMP_CHECK1=xaw8 - TMP_CHECK2= - xaw_use_xprint=yes - elif test "x$use_xprint" = "xno"; then - TMP_CHECK1=xaw7 - TMP_CHECK2= - xaw_use_xprint=no - else - TMP_CHECK1=xaw8 - TMP_CHECK2=xaw7 - xaw_use_xprint=yes - fi - - pkg_failed=no -{ echo "$as_me:$LINENO: checking for TMP_XAW" >&5 -echo $ECHO_N "checking for TMP_XAW... $ECHO_C" >&6; } +{ echo "$as_me:$LINENO: checking for XMAG" >&5 +echo $ECHO_N "checking for XMAG... $ECHO_C" >&6; } if test -n "$PKG_CONFIG"; then if test -n "$PKG_CONFIG" && \ - { (echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"\$TMP_CHECK1\"") >&5 - ($PKG_CONFIG --exists --print-errors "$TMP_CHECK1") 2>&5 + { (echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"xaw7\"") >&5 + ($PKG_CONFIG --exists --print-errors "xaw7") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; then - pkg_cv_TMP_XAW_CFLAGS=`$PKG_CONFIG --cflags "$TMP_CHECK1" 2>/dev/null` + pkg_cv_XMAG_CFLAGS=`$PKG_CONFIG --cflags "xaw7" 2>/dev/null` else pkg_failed=yes fi @@ -3683,12 +4427,12 @@ fi if test -n "$PKG_CONFIG"; then if test -n "$PKG_CONFIG" && \ - { (echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"\$TMP_CHECK1\"") >&5 - ($PKG_CONFIG --exists --print-errors "$TMP_CHECK1") 2>&5 + { (echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"xaw7\"") >&5 + ($PKG_CONFIG --exists --print-errors "xaw7") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; then - pkg_cv_TMP_XAW_LIBS=`$PKG_CONFIG --libs "$TMP_CHECK1" 2>/dev/null` + pkg_cv_XMAG_LIBS=`$PKG_CONFIG --libs "xaw7" 2>/dev/null` else pkg_failed=yes fi @@ -3697,93 +4441,55 @@ fi if test $pkg_failed = yes; then - TMP_XAW_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "$TMP_CHECK1"` + XMAG_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "xaw7"` # Put the nasty error message in config.log where it belongs - echo "$TMP_XAW_PKG_ERRORS" 1>&5 - - success=no + echo "$XMAG_PKG_ERRORS" 1>&5 + + { { echo "$as_me:$LINENO: error: Package requirements (xaw7) were not met. +Consider adjusting the PKG_CONFIG_PATH environment variable if you +installed software in a non-standard prefix. + +Alternatively you may set the XMAG_CFLAGS and XMAG_LIBS environment variables +to avoid the need to call pkg-config. See the pkg-config man page for +more details." >&5 +echo "$as_me: error: Package requirements (xaw7) were not met. +Consider adjusting the PKG_CONFIG_PATH environment variable if you +installed software in a non-standard prefix. + +Alternatively you may set the XMAG_CFLAGS and XMAG_LIBS environment variables +to avoid the need to call pkg-config. See the pkg-config man page for +more details." >&2;} + { (exit 1); exit 1; }; } elif test $pkg_failed = untried; then - success=no -else - TMP_XAW_CFLAGS=$pkg_cv_TMP_XAW_CFLAGS - TMP_XAW_LIBS=$pkg_cv_TMP_XAW_LIBS + { { echo "$as_me:$LINENO: error: The pkg-config script could not be found or is too old. Make sure it +is in your PATH or set the PKG_CONFIG environment variable to the full +path to pkg-config. + +Alternatively you may set the XMAG_CFLAGS and XMAG_LIBS environment variables +to avoid the need to call pkg-config. See the pkg-config man page for +more details. + +To get pkg-config, see . +See \`config.log' for more details." >&5 +echo "$as_me: error: The pkg-config script could not be found or is too old. Make sure it +is in your PATH or set the PKG_CONFIG environment variable to the full +path to pkg-config. + +Alternatively you may set the XMAG_CFLAGS and XMAG_LIBS environment variables +to avoid the need to call pkg-config. See the pkg-config man page for +more details. + +To get pkg-config, see . +See \`config.log' for more details." >&2;} + { (exit 1); exit 1; }; } +else + XMAG_CFLAGS=$pkg_cv_XMAG_CFLAGS + XMAG_LIBS=$pkg_cv_XMAG_LIBS { echo "$as_me:$LINENO: result: yes" >&5 echo "${ECHO_T}yes" >&6; } - success=yes -fi - if [ ! -z $TMP_CHECK2 ] ; then - if test $success = no ; then - -pkg_failed=no -{ echo "$as_me:$LINENO: checking for TMP_XAW" >&5 -echo $ECHO_N "checking for TMP_XAW... $ECHO_C" >&6; } - -if test -n "$PKG_CONFIG"; then - if test -n "$PKG_CONFIG" && \ - { (echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"\$TMP_CHECK2\"") >&5 - ($PKG_CONFIG --exists --print-errors "$TMP_CHECK2") 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; then - pkg_cv_TMP_XAW_CFLAGS=`$PKG_CONFIG --cflags "$TMP_CHECK2" 2>/dev/null` -else - pkg_failed=yes -fi -else - pkg_failed=untried -fi -if test -n "$PKG_CONFIG"; then - if test -n "$PKG_CONFIG" && \ - { (echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"\$TMP_CHECK2\"") >&5 - ($PKG_CONFIG --exists --print-errors "$TMP_CHECK2") 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; then - pkg_cv_TMP_XAW_LIBS=`$PKG_CONFIG --libs "$TMP_CHECK2" 2>/dev/null` -else - pkg_failed=yes -fi -else - pkg_failed=untried -fi - -if test $pkg_failed = yes; then - TMP_XAW_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "$TMP_CHECK2"` - # Put the nasty error message in config.log where it belongs - echo "$TMP_XAW_PKG_ERRORS" 1>&5 - - success=no -elif test $pkg_failed = untried; then - success=no -else - TMP_XAW_CFLAGS=$pkg_cv_TMP_XAW_CFLAGS - TMP_XAW_LIBS=$pkg_cv_TMP_XAW_LIBS - { echo "$as_me:$LINENO: result: yes" >&5 -echo "${ECHO_T}yes" >&6; } - success=yes -fi - xaw_use_xprint=no - fi - fi - - if test "x$success" = "xyes"; then - XMAG_CFLAGS=$TMP_XAW_CFLAGS - XMAG_LIBS=$TMP_XAW_LIBS - - if test "x$xaw_use_xprint" = "xyes"; then - XAW_USE_XPRINT_TRUE= - XAW_USE_XPRINT_FALSE='#' -else - XAW_USE_XPRINT_TRUE='#' - XAW_USE_XPRINT_FALSE= -fi - - else - { { echo "$as_me:$LINENO: error: No suitable version of Xaw found" >&5 -echo "$as_me: error: No suitable version of Xaw found" >&2;} - { (exit 1); exit 1; }; } - fi - + : +fi +XMAG_CFLAGS="$CWARNFLAGS $XMAG_CFLAGS" @@ -3870,7 +4576,15 @@ echo "${ECHO_T}yes" >&6; } : fi -appdefaultdir=$(pkg-config --variable=appdefaultdir xt) +xt_appdefaultdir=$(pkg-config --variable=appdefaultdir xt) + +# Check whether --with-appdefaultdir was given. +if test "${with_appdefaultdir+set}" = set; then + withval=$with_appdefaultdir; appdefaultdir="$withval" +else + appdefaultdir="${xt_appdefaultdir}" +fi + # Make sure we can run config.sub. @@ -4047,7 +4761,7 @@ #define PACKAGE_VERSION_MAJOR `echo $PACKAGE_VERSION | cut -d . -f 1` _ACEOF - PVM=`echo $PACKAGE_VERSION | cut -d . -f 2` + PVM=`echo $PACKAGE_VERSION | cut -d . -f 2 | cut -d - -f 1` if test "x$PVM" = "x"; then PVM="0" fi @@ -4056,7 +4770,7 @@ #define PACKAGE_VERSION_MINOR $PVM _ACEOF - PVP=`echo $PACKAGE_VERSION | cut -d . -f 3` + PVP=`echo $PACKAGE_VERSION | cut -d . -f 3 | cut -d - -f 1` if test "x$PVP" = "x"; then PVP="0" fi @@ -4064,6 +4778,14 @@ cat >>confdefs.h <<_ACEOF #define PACKAGE_VERSION_PATCHLEVEL $PVP _ACEOF + + + +CHANGELOG_CMD="(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)" + +distcleancheck_listfiles='find . -type f ! -name ChangeLog -print' @@ -4186,13 +4908,6 @@ Usually this means the macro was only invoked conditionally." >&2;} { (exit 1); exit 1; }; } fi -if test -z "${XAW_USE_XPRINT_TRUE}" && test -z "${XAW_USE_XPRINT_FALSE}"; then - { { echo "$as_me:$LINENO: error: conditional \"XAW_USE_XPRINT\" was never defined. -Usually this means the macro was only invoked conditionally." >&5 -echo "$as_me: error: conditional \"XAW_USE_XPRINT\" was never defined. -Usually this means the macro was only invoked conditionally." >&2;} - { (exit 1); exit 1; }; } -fi : ${CONFIG_STATUS=./config.status} ac_clean_files_save=$ac_clean_files @@ -4493,7 +5208,7 @@ # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" -This file was extended by xmag $as_me 1.0.2, which was +This file was extended by xmag $as_me 1.0.3, which was generated by GNU Autoconf 2.61. Invocation command line was CONFIG_FILES = $CONFIG_FILES @@ -4546,7 +5261,7 @@ _ACEOF cat >>$CONFIG_STATUS <<_ACEOF ac_cs_version="\\ -xmag config.status 1.0.2 +xmag config.status 1.0.3 configured by $0, generated by GNU Autoconf 2.61, with options \\"`echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`\\" @@ -4803,11 +5518,11 @@ CCDEPMODE!$CCDEPMODE$ac_delim am__fastdepCC_TRUE!$am__fastdepCC_TRUE$ac_delim am__fastdepCC_FALSE!$am__fastdepCC_FALSE$ac_delim +CPP!$CPP$ac_delim +GREP!$GREP$ac_delim +EGREP!$EGREP$ac_delim +CWARNFLAGS!$CWARNFLAGS$ac_delim PKG_CONFIG!$PKG_CONFIG$ac_delim -TMP_XAW_CFLAGS!$TMP_XAW_CFLAGS$ac_delim -TMP_XAW_LIBS!$TMP_XAW_LIBS$ac_delim -XAW_USE_XPRINT_TRUE!$XAW_USE_XPRINT_TRUE$ac_delim -XAW_USE_XPRINT_FALSE!$XAW_USE_XPRINT_FALSE$ac_delim XMAG_CFLAGS!$XMAG_CFLAGS$ac_delim XMAG_LIBS!$XMAG_LIBS$ac_delim APPDEFS_CFLAGS!$APPDEFS_CFLAGS$ac_delim @@ -4874,11 +5589,13 @@ MISC_MAN_DIR!$MISC_MAN_DIR$ac_delim DRIVER_MAN_DIR!$DRIVER_MAN_DIR$ac_delim ADMIN_MAN_DIR!$ADMIN_MAN_DIR$ac_delim +CHANGELOG_CMD!$CHANGELOG_CMD$ac_delim +distcleancheck_listfiles!$distcleancheck_listfiles$ac_delim LIBOBJS!$LIBOBJS$ac_delim LTLIBOBJS!$LTLIBOBJS$ac_delim _ACEOF - if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 13; then + if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 15; then break elif $ac_last_try; then { { echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5 diff --git a/xmag/configure.ac b/xmag/configure.ac index 2831440..41730b9 100644 --- a/xmag/configure.ac +++ b/xmag/configure.ac @@ -22,27 +22,39 @@ dnl Process this file with autoconf to create configure. AC_PREREQ([2.57]) -AC_INIT(xmag,[1.0.2], [https://bugs.freedesktop.org/enter_bug.cgi?product=xorg],xmag) +AC_INIT(xmag, [1.0.3], [https://bugs.freedesktop.org/enter_bug.cgi?product=xorg],xmag) 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 + AC_CHECK_FUNCS([nanosleep poll select]) # Checks for pkg-config packages -XAW_CHECK_XPRINT_SUPPORT(XMAG) +PKG_CHECK_MODULES(XMAG, xaw7) +XMAG_CFLAGS="$CWARNFLAGS $XMAG_CFLAGS" AC_SUBST(XMAG_CFLAGS) AC_SUBST(XMAG_LIBS) PKG_CHECK_MODULES(APPDEFS, xt) -appdefaultdir=$(pkg-config --variable=appdefaultdir xt) +xt_appdefaultdir=$(pkg-config --variable=appdefaultdir xt) +AC_ARG_WITH(appdefaultdir, + AC_HELP_STRING([--with-appdefaultdir=], + [specify directory for app-defaults files (default is autodetected)]), + [appdefaultdir="$withval"], [appdefaultdir="${xt_appdefaultdir}"]) AC_SUBST(appdefaultdir) XORG_MANPAGE_SECTIONS XORG_RELEASE_VERSION +XORG_CHANGELOG AC_OUTPUT([Makefile]) diff --git a/xmag/xmag.c b/xmag/xmag.c index e40f007..cbcf399 100644 --- a/xmag/xmag.c +++ b/xmag/xmag.c @@ -50,6 +50,10 @@ #ifndef min #define min(a, b) ((a) < (b) ? (a) : (b)) +#endif + +#ifndef max +#define max(a, b) ((a) > (b) ? (a) : (b)) #endif @@ -335,8 +339,8 @@ XtSetArg(wargs[n], XtNx, label_x); n++; XtSetArg(wargs[n], XtNy, label_y); n++; XtSetValues(data->pixShell, wargs, n); - - UpdatePixelAP(w, event, 0, 0); + + UpdatePixelAP(w, event, NULL, NULL); } @@ -763,41 +767,73 @@ GetImageAndAttributes(Window w, int x, int y, int width, int height, hlPtr data) { - /* get parameters of window being magnified */ - XGetWindowAttributes(dpy, w, &data->win_info); - - if (data->win_info.depth == DefaultDepth(dpy, scr)) { - /* avoid off screen pixels */ - if (x < 0) x = 0; if (y < 0) y = 0; - if (x + width > DisplayWidth(dpy,scr)) x = DisplayWidth(dpy,scr) - width; - if (y + height > DisplayHeight(dpy,scr)) - y = DisplayHeight(dpy,scr) - height; - data->x = x; data->y = y; - /* get image pixels */ - data->image = XGetImage (dpy, - RootWindow(dpy, scr), - x, y, - width, height, - AllPlanes, ZPixmap); - } - else { - int xInWin, yInWin; Window childWin; - XTranslateCoordinates(dpy, DefaultRootWindow(dpy), w, x, y, - &xInWin, &yInWin, &childWin); - /* avoid off screen pixels */ - if (x + data->win_info.x < 0) x = abs(data->win_info.x); - if (y + data->win_info.y < 0) y = abs(data->win_info.y); - if (x + width > DisplayWidth(dpy,scr)) x = DisplayWidth(dpy,scr) - width; - if (y + height > DisplayHeight(dpy,scr)) - y = DisplayHeight(dpy,scr) - height; - data->x = x; data->y = y; - data->image = XGetImage (dpy, - w, - xInWin, yInWin, - width, height, - AllPlanes, ZPixmap); - - } + /* get parameters of window being magnified */ + XGetWindowAttributes(dpy, w, &data->win_info); + + if (data->win_info.depth == DefaultDepth(dpy, scr)) { + /* avoid off screen pixels */ + if (x < 0) + x = 0; + if (y < 0) + y = 0; + if (x + width > DisplayWidth(dpy,scr)) + x = DisplayWidth(dpy,scr) - width; + if (y + height > DisplayHeight(dpy,scr)) + y = DisplayHeight(dpy,scr) - height; + data->x = x; data->y = y; + /* get image pixels */ + data->image = XGetImage (dpy, + RootWindow(dpy, scr), + x, y, + width, height, + AllPlanes, ZPixmap); + } + else { + int t0, t1; + int x0, x1, y0, y1; + int xInWin, yInWin; + Window childWin; + + XTranslateCoordinates(dpy, DefaultRootWindow(dpy), w, x, y, + &xInWin, &yInWin, &childWin); + + /* Avoid off screen pixels. Assume this routine is not + * called for totally offscreen windows. */ + x0 = max(x, 0); + y0 = max(y, 0); + x1 = min(DisplayWidth(dpy, scr), + min(x0 + width, x0 + (data->win_info.width - xInWin))); + y1 = min(DisplayHeight(dpy, scr), + min(y0 + height, y0 + (data->win_info.height - yInWin))); + + /* Try to use up to width x height pixels */ + if (x1 - x0 < width) { + t0 = x0; + t1 = max(0, x - xInWin + data->win_info.width - + DisplayWidth(dpy, scr)); + x0 = max(0, x1 - min(width, data->win_info.width - t1)); + xInWin -= t0 - x0; + } + if (y1 - y0 < height) { + t0 = y0; + t1 = max(0, y - yInWin + data->win_info.height - + DisplayHeight(dpy, scr)); + y0 = max(0, y1 - min(height, data->win_info.height - t1)); + yInWin -= t0 - y0; + } + + data->x = x0; + data->y = y0; + data->width = x1 - x0; + data->height = y1 - y0; + + data->image = XGetImage (dpy, + w, + xInWin, yInWin, + data->width, data->height, + AllPlanes, ZPixmap); + + } }