automake
[Top][All Lists]
Advanced

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

AM_CONDITIONAL not working properly, or I just don't understand :-(


From: Kevin P. Fleming
Subject: AM_CONDITIONAL not working properly, or I just don't understand :-(
Date: Sun, 12 Oct 2003 17:46:10 -0700
User-agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.4) Gecko/20030624

automake-1.7.8/autoconf-2.57/libtool-1.5

in configure.ac (after all the libtool-related macros but before AC_OUTPUT):

AM_CONDITIONAL(INSTALL_LIBS, test x$enable_shared = xyes)

in Makefile.am:

...
LIBLIST = src/lib/libnALFS.la
LIBLIST += src/handlers/alfs.la
LIBLIST += src/handlers/build.la
LIBLIST += src/handlers/chroot.la
LIBLIST += src/handlers/configure.la
LIBLIST += src/handlers/copy.la
LIBLIST += src/handlers/execute.la
... (more of the same)
if INSTALL_LIBS
INSTALL_LIBLIST = $(LIBLIST)
else
INSTALL_LIBLIST =
endif
if !INSTALL_LIBS
NOINST_LIBLIST = $(LIBLIST)
else
NOINST_LIBLIST =
endif
pkglib_LTLIBRARIES = $(INSTALL_LIBLIST)
noinst_LTLIBRARIES = $(NOINST_LIBLIST)

With this construction, automake complains "src/handlers/alfs.la is already going to be installed in 'noinst'" (for each library). All _SOURCES/_LDFLAGS/etc. variables for these libraries appear after this set of lines (I have tried them before and after, no difference). I have tried setting pkglib_LTLIBRARIES and noinst_LTLIBRARIES _directly_ inside the conditional (instead of using intermediate variables), but that didn't help.

This is about the fourth attempt at constructing this logic; I need to _always_ build these libraries, but only install them if the user asked them to be built shared (for a static build, they will be subsumed into the main binary and don't need to be installed). Am I missing something? This seems to be a valid thing to try, but I can't get automake to accept it.





reply via email to

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