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?
I can see aclocal’ srearch path with aclocal --print-ac-dir
It was /opt/libtool/share/aclocal
But there isn’t any resource without README.
In my case aclocal is installed different with automake
And there is some m4 related files in /opt/automake/share/aclocal
Then I made symbolic link to /opt/automake/share/aclocal
/opt/libtool/share/aclocal-> /opt/automake/share/aclocal
Now automake completes with no error.
the error indicates missing package "LIBTOOL"
mylib/Makefile.am:1: error: Libtool library used but 'LIBTOOL' is undefined
just install it
sudo apt-get install libtool
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With