[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: LTLIBOBJS not built when using AC_REPLACE_FUNCS without AC_CONFIG_LI
From: |
Chris Pickett |
Subject: |
Re: LTLIBOBJS not built when using AC_REPLACE_FUNCS without AC_CONFIG_LIBOBJ_DIR |
Date: |
Tue, 23 Dec 2008 04:05:34 -0500 |
User-agent: |
Thunderbird 1.5.0.14 (Macintosh/20071210) |
Hi Ralf,
Ralf Wildenhues wrote:
* Chris Pickett wrote on Tue, Dec 23, 2008 at 07:00:08AM CET:
I'm trying to use AC_REPLACE_FUNCS to provide strsignal. However, when
I run make it doesn't build a strsignal.lo for me, and libtool complains
"link: `strsignal.lo' is not a valid libtool object". This is using the
latest versions of the Autotools on MinGW/MSYS.
My problem is that I do have the strsignal.c source in the same
directory as the src/Makefile.am but it isn't apparently getting built.
Is this an Automake bug or is it my fault, and if it is my fault, what
am I doing wrong? Relevant files/file snippets follow.
Not sure; please compare what you are doing differently.
Weird, if I do exactly what you say below it works. If I use what I
currently have, it behaves as you say on OS X with
ac_cv_func_strsignal=no but does not behave that way on MinGW/MSYS:
strsignal.lo still isn't getting built.
mkdir src
cat >configure.ac <<\END
AC_INIT(a,1)
AM_INIT_AUTOMAKE(foreign)
AC_CONFIG_FILES(Makefile src/Makefile)
I have AC_CONFIG_FILES right at the end before AC_OUTPUT, but otherwise
configure.ac matches well enough.
AC_PROG_CC
AC_PROG_LIBTOOL
AC_REPLACE_FUNCS([strsignal])
AC_OUTPUT
END
echo 'SUBDIRS = src' > Makefile.am
cat >src/Makefile.am <<\END
libcheck_la_LIBADD = @LTLIBOBJS@
libcheckinternal_la_LIBADD = @LTLIBOBJS@
lib_LTLIBRARIES = libcheck.la libcheckinternal.la
libcheckinternal is used for make check only, so I have:
lib_LTLIBRARIES = libcheck.la
noinst_LTLIBRARIES = libcheckinternal.la
END
touch src/libcheck.c src/libcheckinternal.c
I don't have these two files, but even if I do touch them it doesn't
make a difference. On the other hand they are required for your minimal
working example.
autoreconf -vif # will error out unless src/strsignal.c exists
No errors.
./configure ac_cv_func_strsignal=no # to fake nonexistent function
make # will build and link strsignal.lo
I guess I need to do some minimal test case minimization...
Cheers,
Chris