[mm-common] Skip ACLOCAL_FLAGS notice if it is already set



commit 23916076c083b1372e38cf18c8c1a063b981d6c2
Author: Daniel Elstner <daniel kitta gmail com>
Date:   Thu Jan 7 11:44:45 2010 +0100

    Skip ACLOCAL_FLAGS notice if it is already set
    
    * Makefile.am (postinst-acdir-notice): Test whether $ACLOCAL_FLAGS is
    already set up before showing the informational notice about the need
    to do so.

 Makefile.am |   14 ++++++++------
 1 files changed, 8 insertions(+), 6 deletions(-)
---
diff --git a/Makefile.am b/Makefile.am
index 1f09bde..ccecc72 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -151,10 +151,12 @@ postinst-acdir-notice:
 	@$(POST_INSTALL)
 	@-acdir=`$${ACLOCAL-aclocal} --print-ac-dir 2>/dev/null || :`; \
 	if test "x$$acdir" = 'x$(aclocal_macrodir)'; then :; else \
-	  echo 'NOTICE:'; echo; \
-	  echo 'The $(PACKAGE_NAME) Autoconf macro files have been installed in a different'; \
-	  echo 'prefix than the system aclocal directory.  In order for the installed'; \
-	  echo 'macros to be found, it may be necessary to add the $(PACKAGE_NAME) include'; \
-	  echo 'path to the ACLOCAL_FLAGS environment variable:'; echo; \
-	  echo "  ACLOCAL_FLAGS='-I $(aclocal_macrodir)'; export ACLOCAL_FLAGS"; \
+	  case " $$ACLOCAL_FLAGS " in *' -I $(aclocal_macrodir) '*) ;; *) \
+	    echo; echo 'NOTICE:'; echo; \
+	    echo 'The $(PACKAGE_NAME) Autoconf macro files have been installed in a different'; \
+	    echo 'prefix than the system aclocal directory.  In order for the installed'; \
+	    echo 'macros to be found, it may be necessary to add the $(PACKAGE_NAME) include'; \
+	    echo 'path to the ACLOCAL_FLAGS environment variable:'; echo; \
+	    echo "  ACLOCAL_FLAGS='-I $(aclocal_macrodir)'; export ACLOCAL_FLAGS"; echo;; \
+	  esac; \
 	fi



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