This appears to be aproblem with libtool+automake; if I use a static library
(no libtool) I don't see this problem.

Is there a workaround/bugfix?  This problem means that autoreconf bails with
an error...

(Yes, I've tried a couple of other choices, like using a variable in the
conditionals and setting lib_LTLIBRARIES = $(foo).)

--Makefile.am:
AUTOMAKE_OPTIONS = foreign

if FOO_A
 lib_LTLIBRARIES=libfoo.la
endif

if FOO_B
 lib_LTLIBRARIES=libfoo.la
endif

libfoo_la_SOURCES = foo.c

--configure.ac:
AC_INIT
AC_CONFIG_SRCDIR([Makefile.am])
AM_INIT_AUTOMAKE(foo, 1.0)

AC_PROG_CC
AC_PROG_LIBTOOL

FOO=a
AM_CONDITIONAL(FOO_A, test x"$FOO" = xa)
AM_CONDITIONAL(FOO_B, test x"$FOO" = xb)

AC_CONFIG_FILES(Makefile)

AC_OUTPUT


Reply via email to