From 1d8d0171bbd6433e966f6efaaf8c1a9fc3d8e354 Mon Sep 17 00:00:00 2001
From: Alexandre Julliard <julliard@winehq.org>
Date: Fri, 2 Aug 2002 19:34:21 +0000
Subject: [PATCH] Install the aclocal macros for use by Winelib apps.

---
 Make.rules.in |  1 +
 Makefile.in   | 14 +++++++++++---
 aclocal.m4    |  5 +++++
 3 files changed, 17 insertions(+), 3 deletions(-)

diff --git a/Make.rules.in b/Make.rules.in
index ccd958575b2..f07b8d1408d 100644
--- a/Make.rules.in
+++ b/Make.rules.in
@@ -101,6 +101,7 @@ prefix          = @prefix@
 exec_prefix     = @exec_prefix@
 bindir          = @bindir@
 libdir          = @libdir@
+datadir         = @datadir@
 infodir         = @infodir@
 mandir          = @mandir@
 sysconfdir      = @sysconfdir@
diff --git a/Makefile.in b/Makefile.in
index 7012b11daa4..edca0b99d05 100644
--- a/Makefile.in
+++ b/Makefile.in
@@ -82,11 +82,15 @@ wine: $(WINEWRAPPER)
 
 # Installation rules
 
+install-aclocal: dummy
+	$(MKINSTALLDIRS) $(datadir)/aclocal
+	$(INSTALL_DATA) $(SRCDIR)/aclocal.m4 $(datadir)/aclocal/wine.m4
+
 install-lib:: $(INSTALLLIBSUBDIRS:%=%/__install__)
 
-install-dev:: $(INSTALLDEVSUBDIRS:%=%/__install__)
+install-dev:: $(INSTALLDEVSUBDIRS:%=%/__install__) install-aclocal
 
-install::
+install:: install-aclocal
 	-$(LDCONFIG)
 	@if test -n "`LANG=C $(LDD) $(bindir)/wine|grep not.found`";	\
 	then								\
@@ -100,7 +104,11 @@ install::
 		echo "*************************************************" ; \
 	fi
 
-.PHONY: install-lib install-dev
+uninstall::
+	$(RM) $(datadir)/aclocal/wine.m4
+	-rmdir $(datadir)/aclocal
+
+.PHONY: install-aclocal install-lib install-dev
 
 # Dependencies between directories
 
diff --git a/aclocal.m4 b/aclocal.m4
index af4600380bc..2c9692c2d29 100644
--- a/aclocal.m4
+++ b/aclocal.m4
@@ -16,6 +16,11 @@ dnl You should have received a copy of the GNU Lesser General Public
 dnl License along with this library; if not, write to the Free Software
 dnl Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
 dnl
+dnl As a special exception to the GNU Lesser General Public License,
+dnl if you distribute this file as part of a program that contains a
+dnl configuration script generated by Autoconf, you may include it
+dnl under the same distribution terms that you use for the rest of
+dnl that program.
 
 dnl **** Get the ldd program name; used by WINE_GET_SONAME ****
 dnl
-- 
GitLab