I get following message when I run automake --foreign --add-missing
for my C program compiling.
mylib/Makefile.am:1: error: Libtool library used but 'LIBTOOL' is undefined
mylib/Makefile.am:1: The usual way to define 'LIBTOOL' is to add 'LT_INIT'
mylib/Makefile.am:1: to 'configure.ac' and run 'aclocal' and 'autoconf' again.
mylib/Makefile.am:1: If 'LT_INIT' is in 'configure.ac', make sure
mylib/Makefile.am:1: its definition is in aclocal's search path.
This is my configure.ac
whitch includs LT_INIT.
AC_PREREQ([2.69])
AC_INIT([drive], [1], [admin@local])
AM_INIT_AUTOMAKE
AC_CONFIG_SRCDIR([src/drive.c])
AC_CONFIG_HEADERS([config.h])
# Checks for programs.
AC_PROG_CC
LT_INIT
AC_CONFIG_FILES([Makefile
src/Makefile
mylib/Makefile])
AC_OUTPUT
also mylib/Makefile.am is here
lib_LTLIBRARIES = libmylib.la
libmylib_la_SOURCES = mylib.c
include_HEADERS = mylib.h
Then where is aclocal’ srearch path and how can I write definition of LT_ININT?
aclocal
's search path?" Moreover, although the recommended action might sometimes resolve an issue such as the OP describes, the OP already self-answered the question, over six years ago, with a different solution demonstrating that missing libtool in fact was not the issue in this case. Your efforts would be more fruitfully devoted to answering questions that do not already have an accepted answer. – Sargassum