Subject: bug#11465: libtool --mode=install: please add an option to install DSO to /lib and development library to /usr/lib

From: Jonathan Nieder <[email-masked]>
Date: Sun, 13 May 2012 17:10:45 -0500

Severity: wishlist

Hi,

On Linux-based systems sometimes one wants to install basic DSOs that
need to be available before /usr is mounted to /lib.  Static libraries
and the development symlink stay in /usr/lib.  The usual method for
doing so is to stage an install to $(DESTDIR)/usr/lib and then move
selected files up one level:

	install_using_libtool_as_usual
	mv $(DESTDIR)/usr/lib/libfoo.so.* $(DESTDIR)/lib/
	rm $(DESTDIR)/usr/lib/libfoo.so $(DESTDIR)/usr/lib/libfoo.la
	ln -s /lib/libfoo.so.0 $(DESTDIR)/usr/lib/libfoo.so

It would be nicer if this after-the-fact tweaking could be taken
care of automatically.  That is, I am imagining being able to do

	libtool --destdir=$(DESTDIR) --dsodir=/lib \
		--mode=install install libfoo.la $(DESTDIR)/usr/lib

Semantics:

 - static library goes to /usr/lib
 - shared library goes to /lib
 - libtool library goes to /lib, I guess
 - development symlink goes to /usr/lib

Alternatively, the syntax could be

	libtool --destdir=$(DESTDIR) --develdir=/usr/lib \
		--mode=install install libfoo.la $(DESTDIR)/lib

What do you think?  Would this be sensible?

Thanks,
Jonathan