Hi Ralf,
It turns out that I can fix my problem by adding @LTLIBOBJS@ to
libcheck_la_DEPENDENCIES, which is something I set explicitly but
neglected to mention earlier.
Ralf Wildenhues wrote:
mkdir src
cat >configure.ac <<\END
AC_INIT(a,1)
AM_INIT_AUTOMAKE(foreign)
AC_CONFIG_FILES(Makefile src/Makefile)
AC_PROG_CC
AC_PROG_LIBTOOL
AC_REPLACE_FUNCS([strsignal])
AC_OUTPUT
END
echo 'SUBDIRS = src' > Makefile.am
cat >src/Makefile.am <<\END
However, if you simply add
libcheck_la_DEPENDENCIES =
at this point (at the top of the src/Makefile.am) to your minimal
example, then strsignal.lo is produced under OS X, but not under
msys/gcc. However, if you then take out the libcheckinternal bits it
fails (correctly) on OS X again. It looks like libcheckinternal is
causing strsignal.lo to get built on OS X but not on sys/gcc.
In tracking this down, I found out that neither @LTLIBOBJS@ nor
@LTALLOCA@ are mentioned in either the "Linking the Program" manual
section or the "Program and Library Variables" section in the paragraphs
talking about _DEPENDENCIES, although @LIBOBJS@ and @ALLOCA@ are.
Minor, but also trivial to fix I guess? I didn't make a patch because I
figured it's faster all around for you to just edit the files.
Cheers,
Chris
libcheck_la_LIBADD = @LTLIBOBJS@
libcheckinternal_la_LIBADD = @LTLIBOBJS@
lib_LTLIBRARIES = libcheck.la libcheckinternal.la
END
touch src/libcheck.c src/libcheckinternal.c
autoreconf -vif # will error out unless src/strsignal.c exists
./configure ac_cv_func_strsignal=no # to fake nonexistent function
make # will build and link strsignal.lo