Some package tools run configure as fakeroot. This triggers code in
configure.ac that detects uid 0 to hardcode the installation path of the
m4 macros to the system aclocal macro dir. This ignores any DESTDIR the
packaging tools may have set and installation fails since it attempts to
write to a system dir without proper permissions. These patches
maintain the current behaviour if uid==0 && DESTDIR is empty.
Otherwise, DESTDIR and the regular datadir path are used.
Index: m4/Makefile.am
===================================================================
--- m4/Makefile.am (revision 1175)
+++ m4/Makefile.am (working copy)
@@ -1,11 +1,23 @@
include $(top_srcdir)/misc/Makefile.common
-EXTRA_DIST = dvdnav.m4
-
if INSTALL_M4
m4datadir = @ACLOCAL_DIR@
else
m4datadir = $(datadir)/aclocal
endif
-m4data_DATA = dvdnav.m4
+uninstall-local:
+ @-if test -z "$(DESTDIR)"; then \
+ rm -f $(m4datadir)/dvdnav.m4 ; \
+ else \
+ rm -r $(DESTDIR)$(datadir)/aclocal/dvdnav.m4 ; \
+ fi
+
+install-data-local:
+ @-if test -z "$(DESTDIR)"; then \
+ test -z "$(m4datadir)" || $(MKDIR_P) "$(m4datadir)" ; \
+ $(INSTALL_DATA) $(srcdir)/dvdnav.m4 $(m4datadir)/dvdnav.m4 ; \
+ else \
+ test -z "$(DESTDIR)$(datadir)/aclocal" || $(MKDIR_P) "$(DESTDIR)$(datadir)/aclocal" ; \
+ $(INSTALL_DATA) $(srcdir)/dvdnav.m4 $(DESTDIR)$(datadir)/aclocal/dvdnav.m4 ; \
+ fi
Index: m4/Makefile.am
===================================================================
--- m4/Makefile.am (revision 1175)
+++ m4/Makefile.am (working copy)
@@ -1,11 +1,23 @@
include $(top_srcdir)/misc/Makefile.common
-EXTRA_DIST = dvdread.m4
-
if INSTALL_M4
m4datadir = @ACLOCAL_DIR@
else
m4datadir = $(datadir)/aclocal
endif
-m4data_DATA = dvdread.m4
+uninstall-local:
+ @-if test -z "$(DESTDIR)"; then \
+ rm -f $(m4datadir)/dvdread.m4 ; \
+ else \
+ rm -r $(DESTDIR)$(datadir)/aclocal/dvdread.m4 ; \
+ fi
+
+install-data-local:
+ @-if test -z "$(DESTDIR)"; then \
+ test -z "$(m4datadir)" || $(MKDIR_P) "$(m4datadir)" ; \
+ $(INSTALL_DATA) $(srcdir)/dvdread.m4 $(m4datadir)/dvdread.m4 ; \
+ else \
+ test -z "$(DESTDIR)$(datadir)/aclocal" || $(MKDIR_P) "$(DESTDIR)$(datadir)/aclocal" ; \
+ $(INSTALL_DATA) $(srcdir)/dvdread.m4 $(DESTDIR)$(datadir)/aclocal/dvdread.m4 ; \
+ fi
_______________________________________________
DVDnav-discuss mailing list
[email protected]
https://lists.mplayerhq.hu/mailman/listinfo/dvdnav-discuss