[mm-common] Check for a proper sed program during configure



commit f721ebf065ecf3bb4320be7641d47c58eb90d859
Author: Daniel Elstner <daniel kitta gmail com>
Date:   Sun Sep 13 06:16:28 2009 +0200

    Check for a proper sed program during configure
    
    * configure.ac: Call AC_PROG_SED to check for a proper sed program.
    * Makefile.am (subst_manpage): Use $(SED) variable.
    * build/dist-changelog.am (dist-changelog): ditto, in the expectation
    that most modules using mm-common already assign $(SED) in one way or
    another.

 Makefile.am             |    2 +-
 build/dist-changelog.am |    4 ++--
 configure.ac            |    1 +
 3 files changed, 4 insertions(+), 3 deletions(-)
---
diff --git a/Makefile.am b/Makefile.am
index c9417c8..58c0aa2 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -107,7 +107,7 @@ download_curl = $(CURL) --compressed --connect-timeout 300 -g -L -m 3600 -R --re
 		$(if $(wildcard $@),-z '$@') -o '$@'
 download_wget = $(WGET) -N -nd -T 300 -t 5 -P '$(dir $@)'
 
-subst_manpage = sed 's|[ ]PACKAGE_STRING[@]|$(PACKAGE_STRING)|g;s|[ ]docdir[@]|$(docdir)|g'
+subst_manpage = $(SED) 's|[ ]PACKAGE_STRING[@]|$(PACKAGE_STRING)|g;s|[ ]docdir[@]|$(docdir)|g'
 
 # If maintainer mode is enabled, always check the remote locations
 # of the tag files for updates when building the default target.
diff --git a/build/dist-changelog.am b/build/dist-changelog.am
index a72e77d..5125052 100644
--- a/build/dist-changelog.am
+++ b/build/dist-changelog.am
@@ -25,8 +25,8 @@ endif
 
 dist-changelog:
 	@if git --git-dir="$(top_srcdir)/.git" --work-tree="$(top_srcdir)" \
-		log --date=short --pretty='format:%cd  %an  <%ae>%n%n%s%n%n%b%n' \
-	  | sed	-e '/^[12]...-[01].-[0123].  [^<>]*  <[^<>]*>$$/,/^$$/ b' \
+		log --date=short --pretty='format:%cd  %an  <%ae>%n%n%s%n%n%b%n' | \
+	 $(SED)	-e '/^[12]...-[01].-[0123].  [^<>]*  <[^<>]*>$$/,/^$$/ b' \
 		-e '/[^	 ]/,/^[	 ]*$$/! d' \
 		-e 's/^[	 ]*/	/' \
 		-e 's/^[	 ]*$$//' >.ChangeLog.tmp; \
diff --git a/configure.ac b/configure.ac
index d41e27a..b73ebe0 100644
--- a/configure.ac
+++ b/configure.ac
@@ -26,6 +26,7 @@ AC_ARG_VAR([ACLOCAL_FLAGS], [aclocal flags, e.g. -I <macro dir>])
 AC_ARG_VAR([CURL], [curl transfer command])
 AC_ARG_VAR([WGET], [wget download command])
 
+AC_PROG_SED
 AC_CHECK_PROG([CURL], [curl], [curl])
 AC_CHECK_PROG([WGET], [wget], [wget])
 



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]