Hi Szaka and all,
ntfs-3g has been forked from ntfsprogs, which contained manly programs
which use the included libntfs, so make install installs libntfs also.
AFAICS, In ntfs-3g, libntfs-3g is handled in the Makefiles like libntfs
was in ntfsprogs, but it is used by only one program, which is ntfs-3g
itself.
As there is only one user of libntfs-3g, I wonder if it makes sense
to install libntfs-3g with ntfs-3g, or if it would make more sense
to just link libntfs-3g into ntfs-3g.
Advantages of doing so:
* libntfs-3g is not compiled with -fPIC, yielding more efficient,
and smaller code.
On my system, libntfs-3g.so.9.0.0 + ntfs-3g have a size of ~200k,
while the ntfs-3g with linked-in ntfs-3g has a size of ~170k.
* when libntfs-3g is not dynamically linked, it does not reside in
it's own virtutal address space, so the CPU does not have to switch
beteen virtutal address spaces when ntfs-3g calls a function in
libntfs-3g, yielding less CPU overhead.
* No extra libntfs-3g files in /lib. If someone wants to use ntfs-3g
in an initrd, there is one library less to care of.
Disadvantages:
* Debugging tools which can trace shared library calls like ltrace
are not able to trace calls into libntfs-3g, but tools like ltrace
does seem to be neccessary in debugging libntfs-3g right now as
I am not aware of any issues which could feasibly be debugged with
ltrace and not be better debugged by other means. If such issue
would arise, one could always link ntfs-3g with a shared libntfs-3g,
but I do not see a reason why anyone would need that now. If that
should be wanted, replacing AM_ENABLE_SHARED with AM_DISABLE_SHARED
in configure.ac would keep the option to create a shared libntfs-3g
with configure --enable-shared.
Comments?
Bernhard
PS: Description of the patch:
The changes in configure.ac remove the --{enable,disable}-{static,shared}
optoins from configure after running autoconf to regenerate configure
The changes in include/ntfs-3g/Makefile.am cause that the headers
for libntfs-3g are not installed on make install
The change in libntfs-3g/Makefile.am causes that libntfs-3g is
not installed on make install
You have to run automake to regenerate the respective Makefile.in
files with the changed Makefile.am files, configure has to run
afterwards to generate Makefiles with the repective changes.
Run "autoreconf" with automake and autoconf installed to regnerate
all GNO autotools files, running automake and autoconf individually
may get those files into an inconsistant state, yielding to errors.
--- ntfs-3g-1.810/configure.ac
+++ ntfs-3g-nolib/configure.ac
@@ -33,8 +33,6 @@
AC_CONFIG_HEADERS([config.h])
AM_INIT_AUTOMAKE
AM_MAINTAINER_MODE
-AM_ENABLE_SHARED
-AM_ENABLE_STATIC
AC_PREFIX_DEFAULT(/usr/local)
if test "x$prefix" = "xNONE"; then
--- ntfs-3g-1.810/include/ntfs-3g/Makefile.am
+++ ntfs-3g-nolib/include/ntfs-3g/Makefile.am
@@ -1,6 +1,5 @@
-linux_ntfsincludedir = $(includedir)/ntfs-3g
-linux_ntfsinclude_HEADERS = \
+noinst_HEADERS = \
attrib.h \
attrlist.h \
bitmap.h \
--- ntfs-3g-1.810/libntfs-3g/Makefile.am
+++ ntfs-3g-nolib/libntfs-3g/Makefile.am
@@ -27,7 +27,7 @@
linux_ntfsincludedir = -I$(top_srcdir)/include/ntfs-3g
-lib_LTLIBRARIES = libntfs-3g.la
+noinst_LTLIBRARIES = libntfs-3g.la
libntfs_3g_la_LDFLAGS = -version-number $(LIBNTFS_3G_VERSION)
libntfs_3g_la_CFLAGS = $(LIBNTFS_3G_CFLAGS)
libntfs_3g_la_SOURCES = \--- ntfs-3g-1.810/configure.ac
+++ ntfs-3g-nolib/configure.ac
@@ -33,8 +33,6 @@
AC_CONFIG_HEADERS([config.h])
AM_INIT_AUTOMAKE
AM_MAINTAINER_MODE
-AM_ENABLE_SHARED
-AM_ENABLE_STATIC
AC_PREFIX_DEFAULT(/usr/local)
if test "x$prefix" = "xNONE"; then
--- ntfs-3g-1.810/include/ntfs-3g/Makefile.am
+++ ntfs-3g-nolib/include/ntfs-3g/Makefile.am
@@ -1,6 +1,5 @@
-linux_ntfsincludedir = $(includedir)/ntfs-3g
-linux_ntfsinclude_HEADERS = \
+noinst_HEADERS = \
attrib.h \
attrlist.h \
bitmap.h \
--- ntfs-3g-1.810/libntfs-3g/Makefile.am
+++ ntfs-3g-nolib/libntfs-3g/Makefile.am
@@ -27,7 +27,7 @@
linux_ntfsincludedir = -I$(top_srcdir)/include/ntfs-3g
-lib_LTLIBRARIES = libntfs-3g.la
+noinst_LTLIBRARIES = libntfs-3g.la
libntfs_3g_la_LDFLAGS = -version-number $(LIBNTFS_3G_VERSION)
libntfs_3g_la_CFLAGS = $(LIBNTFS_3G_CFLAGS)
libntfs_3g_la_SOURCES = \
-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems? Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >> http://get.splunk.com/
_______________________________________________
ntfs-3g-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/ntfs-3g-devel