Not installing local library.

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

 



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?



_______________________________________________
Autoconf mailing list
Autoconf@xxxxxxx
http://lists.gnu.org/mailman/listinfo/autoconf

[Index of Archives]     [GCC Help]     [Kernel Discussion]     [RPM Discussion]     [Red Hat Development]     [Yosemite News]     [Linux USB]     [Samba]

  Powered by Linux