summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPeter Breitenlohner <peb@mppmu.mpg.de>2008-11-14 22:26:06 +0100
committerPaulo Cesar Pereira de Andrade <pcpa@mandriva.com.br>2008-11-29 05:13:32 -0200
commitb8a5186c585b4f01971457f0d59cc7480cf528e8 (patch)
tree8cab6c2b3a6acb78a0a2ed26f76343d255f01c1d
parenta3a533044de7c8c360d0de312ac75b32db04e35e (diff)
reorganize autoconf macro files
append xorgversion.m4 to xorg-macros.m4.in, instead of installing it as separate file. Avoid copying some code from xorgversion.m4 to configure.ac.
-rw-r--r--Makefile.am10
-rw-r--r--configure.ac20
-rw-r--r--xorg-macros.m4.in2
3 files changed, 16 insertions, 16 deletions
diff --git a/Makefile.am b/Makefile.am
index fd5c1ea..3e7ff73 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -20,9 +20,15 @@
# CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
aclocaldir = $(datadir)/aclocal
-aclocal_DATA = xorgversion.m4 xorg-macros.m4
+aclocal_DATA = xorg-macros.m4
-EXTRA_DIST = $(aclocal_DATA) ChangeLog
+# Previous versions used to install xorgversion.m4, now integrated
+# into xorg-macros.m4. Explicitly remove that old file in order not
+# to have a macro defined in two different files.
+install-data-hook:
+ rm -f $(DESTDIR)$(aclocaldir)/xorgversion.m4
+
+EXTRA_DIST = ChangeLog
.PHONY: ChangeLog
diff --git a/configure.ac b/configure.ac
index 676a70d..78daa0d 100644
--- a/configure.ac
+++ b/configure.ac
@@ -27,18 +27,10 @@ AC_INIT([util-macros],
[https://bugs.freedesktop.org/enter_bug.cgi?product=xorg])
AM_INIT_AUTOMAKE([foreign dist-bzip2])
-# Since this is the package that installs the xorgversion.m4 file, we
-# cannot use it here. Therefore, we copy the code from the m4 file.
-# Please try to keep them in sync.
-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
+# This is the package that installs xorgversion.m4 as part of xorg-macros.m4.
+# In order to use xorgversion.m4 here, we include it explicitly.
+m4_include([xorgversion.m4])
-AC_OUTPUT([Makefile xorg-macros.m4])
+XORG_RELEASE_VERSION
+
+AC_OUTPUT([Makefile xorg-macros.m4:xorg-macros.m4.in:xorgversion.m4])
diff --git a/xorg-macros.m4.in b/xorg-macros.m4.in
index 0eda9a8..5a1192b 100644
--- a/xorg-macros.m4.in
+++ b/xorg-macros.m4.in
@@ -1,3 +1,4 @@
+dnl @configure_input@
dnl
dnl Copyright 2005-2006 Sun Microsystems, Inc. All rights reserved.
dnl
@@ -423,3 +424,4 @@ AC_SUBST(LINTLIB)
AM_CONDITIONAL(MAKE_LINT_LIB, [test x$make_lint_lib != xno])
]) # XORG_LINT_LIBRARY
+