Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Where is aclocal's search path

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?

like image 901
user1345414 Avatar asked Mar 20 '14 07:03

user1345414


2 Answers

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.

like image 110
user1345414 Avatar answered Oct 13 '22 00:10

user1345414


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
like image 43
Ganesh Kharad Avatar answered Oct 12 '22 22:10

Ganesh Kharad