From 68422bdf941815a209cc939034988c5842b2f968 Mon Sep 17 00:00:00 2001 From: szaka Date: Sat, 3 Mar 2007 10:52:06 +0000 Subject: [PATCH] add --disable-ldconfig configure option and reorganize *-hook rules to *-local and *-hook ones in src/Makefile.am for simplicity and to be more compatible with older automake versions (Andreas Hanke) --- configure.ac | 12 +++++++++++- src/Makefile.am | 8 ++++++-- 2 files changed, 17 insertions(+), 3 deletions(-) diff --git a/configure.ac b/configure.ac index fbb5c5d8..c3990dd2 100644 --- a/configure.ac +++ b/configure.ac @@ -59,6 +59,13 @@ AC_ARG_ENABLE(warnings, enable_warnings=no ) +AC_ARG_ENABLE(ldconfig, + AS_HELP_STRING(--disable-ldconfig,do not update dynamic linker cache + using ldconfig), , + enable_ldconfig=yes +) +AM_CONDITIONAL(RUN_LDCONFIG, test "$enable_ldconfig" = yes) + # Use GNU extensions if available. AC_GNU_SOURCE @@ -67,7 +74,10 @@ AC_PROG_CC AC_PROG_GCC_TRADITIONAL AC_PROG_INSTALL AC_PATH_PROG(RM, rm, rm) -AC_PATH_PROG(LDCONFIG, ldconfig, true, [/sbin /usr/sbin $PATH]) +# No need to check for ldconfig if --disable-ldconfig was given +if test "$enable_ldconfig" = yes; then + AC_PATH_PROG(LDCONFIG, ldconfig, true, [/sbin /usr/sbin $PATH]) +fi AC_PROG_LN_S AC_PROG_MAKE_SET AC_PROG_LIBTOOL diff --git a/src/Makefile.am b/src/Makefile.am index ca0d07d3..f7e10dbc 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -35,12 +35,16 @@ strip: $(bin_PROGRAMS) libs: (cd ../libntfs-3g && $(MAKE) libs) || exit 1; +if RUN_LDCONFIG install-exec-hook: + $(LDCONFIG) +endif + +install-exec-local: $(INSTALL) -d $(DESTDIR)/sbin $(LN_S) -f $(bindir)/ntfs-3g $(DESTDIR)/sbin/mount.ntfs-3g - $(LDCONFIG) -install-data-hook: +install-data-local: $(INSTALL) -d $(DESTDIR)$(man8dir) $(LN_S) -f ntfs-3g.8 $(DESTDIR)$(man8dir)/mount.ntfs-3g.8