From 965dd72bb37248aa9cf7b39bb3f35f1b63c7d281 Mon Sep 17 00:00:00 2001 From: szaka Date: Thu, 23 Aug 2007 22:32:25 +0000 Subject: [PATCH] Add --disable-library option: don't install libntfs-3g but link into ntfs-3g. Binary size is 10-15% down, performance is 2-5% up (Bernhard Kaindl) --- configure.ac | 10 ++++++++++ include/ntfs-3g/Makefile.am | 2 ++ libntfs-3g/Makefile.am | 5 +++++ 3 files changed, 17 insertions(+) diff --git a/configure.ac b/configure.ac index 707daec8..de05f15b 100644 --- a/configure.ac +++ b/configure.ac @@ -78,6 +78,16 @@ AC_ARG_ENABLE(ldconfig, ) AM_CONDITIONAL(RUN_LDCONFIG, test "$enable_ldconfig" = yes) +AC_ARG_ENABLE(library, + AS_HELP_STRING(--disable-library,do not install libntfs-3g but link + it into ntfs-3g), , + enable_library=yes +) +if test "$enable_library" != yes; then + enable_shared=no +fi +AM_CONDITIONAL(INSTALL_LIBRARY, test "$enable_library" = yes) + # Use GNU extensions if available. AC_GNU_SOURCE diff --git a/include/ntfs-3g/Makefile.am b/include/ntfs-3g/Makefile.am index e58428d9..e37ea840 100644 --- a/include/ntfs-3g/Makefile.am +++ b/include/ntfs-3g/Makefile.am @@ -1,4 +1,5 @@ +if INSTALL_LIBRARY linux_ntfsincludedir = $(includedir)/ntfs-3g linux_ntfsinclude_HEADERS = \ attrib.h \ @@ -30,5 +31,6 @@ linux_ntfsinclude_HEADERS = \ unistr.h \ version.h \ volume.h +endif MAINTAINERCLEANFILES = Makefile.in diff --git a/libntfs-3g/Makefile.am b/libntfs-3g/Makefile.am index 50de3e86..5dca7cf5 100644 --- a/libntfs-3g/Makefile.am +++ b/libntfs-3g/Makefile.am @@ -27,7 +27,12 @@ linux_ntfsincludedir = -I$(top_srcdir)/include/ntfs-3g +if INSTALL_LIBRARY lib_LTLIBRARIES = libntfs-3g.la +else +noinst_LTLIBRARIES = libntfs-3g.la +endif + libntfs_3g_la_LDFLAGS = -version-number $(LIBNTFS_3G_VERSION) libntfs_3g_la_CFLAGS = $(LIBNTFS_3G_CFLAGS) libntfs_3g_la_SOURCES = \