autoconf
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Not installing local library.


From: Edward Tomasz Napierala
Subject: Not installing local library.
Date: Tue, 10 Jun 2008 13:51:28 +0200
User-agent: Mutt/1.5.16 (2007-06-09)

I have a program thad depends on a library.  I want to achieve
the following: if the library is already installed, than use it,
linking dynamically.  If it's not installed, then build it (it's
included in the program tarball) and link against it statically.
It pretty much works, except that in the latter case 'make install'
in program source directory installs the library too, and I don't
want that to happen - I want it to install only the main program,
and not the library and its headers.  How to do that?

Relevant parts of programs' configure.ac:

PKG_CHECK_MODULES(SMF, smf >= 1.1, [with_libsmf=system], [with_libsmf=local])
if test "x$with_libsmf" = "xlocal"; then
        AC_CONFIG_SUBDIRS([libsmf])
        SMF_CFLAGS="-I../libsmf/src"
        SMF_LIBS="../libsmf/src/.libs/libsmf.a"
        LOCAL_LIBSMF="libsmf"
else
        LOCAL_LIBSMF=""
fi

AC_SUBST(LOCAL_LIBSMF)
AC_SUBST(SMF_CFLAGS)
AC_SUBST(SMF_LIBS)

And Makefile.am:

SUBDIRS = $(LOCAL_LIBSMF) src man
DIST_SUBDIRS = libsmf src man

If I'm doing something suboptimally, please tell ;-)

-- 
If you cut off my head, what would I say?  Me and my head, or me and my body?





reply via email to

[Prev in Thread] Current Thread [Next in Thread]