Hi all, I am trying to conditionally compile [assembly] sources for my archive library. I initially tried:
## Makefile.am: lib_LTLIBRARIES = libfoo.la libfoo_la_SOURCES = main.cpp EXTRA_libfoo_la_SOURCES = x86.s x86_64.s power5.s libfoo_la_LIBADD = $(MY_EXTRA_SOURCES) libfoo_la_DEPENDENCIES = $(MY_EXTRA_SOURCES) (I may be wrong about minute details here - I am quoting the code from memory.) where MY_EXTRA_SOURCES are platform-specific assembly (.s) files, AC_SUBST'ed from autoconf. When I make after configure'ing: $ ./configure --disable-shared ... in order to create an archive library I see that the extra objects from MY_EXTRA_SOURCES are not archived together with the rest of the object files. However, I see the invocation of libtool has all the files on the command line; only the subsequent invocation of the archiver (ar) is missing the extra object files making it look as if libtool has chosen to skip those files when it invoked ar. This problem does not occur in shared builds - all object files end up in the library, as expected. The workaround for me was to use AM_CONDITIONALs and that worked pretty good. But using AM_CONDITIONALs is not as nice as AC_SUBST'ing from autoconf. Does anyone know why it's not working (as detailed in automake manual, the libtool library, section 7.3.4)? Thanks, Liviu _______________________________________________ http://lists.gnu.org/mailman/listinfo/libtool
