Where is aclocal's search path
Asked Answered
R

2

5

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?

Rosaline answered 20/3, 2014 at 7:37 Comment(0)
R
5

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.

Rosaline answered 20/3, 2014 at 10:41 Comment(0)
D
3

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
Dogtooth answered 5/10, 2020 at 8:36 Comment(1)
This answer does not address the title question, "Where is 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

© 2022 - 2024 — McMap. All rights reserved.