Termux autotools/libtool cannot determine link -lib interface

175 views Asked by At

I'm using Termux for Android 12. I've got a simple C project using autotools. I run:

autoreconf -i
./configure

And it fails saying:

checking the archiver (link -lib) interface... unknown
configure: error: could not determine link -lib interface

In src/Makefile.am:

bin_PROGRAMS = main
main_SOURCES = main.c foo.h
main_LDADD = libfoo.la
lib_LTLIBRARIES = libfoo.la
libfoo_la_SOURCES = foo.c foo.h
1

There are 1 answers

0
Ben On BEST ANSWER

I think you need foo.h in include_HEADERS rather than main_SOURCES:

bin_PROGRAMS = main
main_SOURCES = main.c
include_HEADERS = foo.h
main_LDADD = libfoo.la
lib_LTLIBRARIES = libfoo.la
libfoo_la_SOURCES = foo.c foo.h