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 = \