summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Elstner <daniel.kitta@gmail.com>2009-12-31 14:27:52 +0100
committerDaniel Elstner <daniel.kitta@gmail.com>2009-12-31 14:27:52 +0100
commit2ccef97c83ccc2d9c72803e3539790e8a9580236 (patch)
treea10f1a6a6054698bc3aca77301981ad68858b665
parent4aac599ca77a0028163dc6d34ad200e4d4b45b09 (diff)
downloadmm-common-2ccef97c83ccc2d9c72803e3539790e8a9580236.tar.gz
Display post-install notice about ACLOCAL_FLAGS
* Makefile.am (install-data-hook): If mm-common has been installed in a different prefix than the system aclocal, print a message to inform the installer that it may be necessary to set ACLOCAL_FLAGS.
-rw-r--r--Makefile.am18
1 files changed, 17 insertions, 1 deletions
diff --git a/Makefile.am b/Makefile.am
index e43cb9d..1f09bde 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -122,7 +122,7 @@ else
check_updates =
endif
-.PHONY: $(check_updates)
+.PHONY: $(check_updates) postinst-acdir-notice
# Avoid shipping partially downloaded files.
.DELETE_ON_ERROR:
@@ -142,3 +142,19 @@ skeletonmm.tar.gz: $(skeletonmm_files)
$(AM_V_GEN)($(srctar_stdout) $(skeletonmm_files)) | gzip -c >$@
include $(top_srcdir)/build/dist-changelog.am
+
+install-data-hook: $(if $(DESTDIR),,postinst-acdir-notice)
+
+# Inform the installer that M4 macro files installed in a prefix
+# not known to aclocal will not be picked up automatically.
+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"; \
+ fi