Questions tagged [automake]

Automake is a tool provided by GNU for the purpose of automating the generation of portable, configurable Makefiles.

Automake is a tool for automatically generating Makefile.ins from files called Makefile.am. Each Makefile.am is basically a series of make variable definitions, with rules being thrown in occasionally. The generated Makefile.ins are compliant with the GNU Makefile standards.

The GNU Makefile Standards Document (see Makefile Conventions) is long, complicated, and subject to change. The goal of Automake is to remove the burden of Makefile maintenance from the back of the individual GNU maintainer (and put it on the back of the Automake maintainers).

The typical Automake input file is simply a series of variable definitions. Each such file is processed to create a Makefile.in. There should generally be one Makefile.am per directory of a project.

Automake does constrain a project in certain ways; for instance, it assumes that the project uses Autoconf (see Introduction), and enforces certain restrictions on the configure.ac contents.

For more details, take a look into automake manual

1092 questions
5
votes
3 answers

autoconf: Set AC_CHECK_LIB compiler flags

I am trying to set up my project to use the autotools build system for distribution. However, I am having a problem when it comes to including a few extra libraries. My code depends on a few libraries: One I wrote (I'll call libfoo) One that is…
fergu
  • 329
  • 1
  • 5
  • 12
5
votes
1 answer

Check framework example giving me error when running './configure'

I'm building the check framework example 'check_money', but it's not building on my machine. The error is: configure: error: cannot find install-sh, install.sh, or shtool in "." "./.." "./../.." I've tried installing it using: libtoolize…
macmania314
  • 457
  • 2
  • 18
5
votes
1 answer

automake: automatically run unit tests

I am maintaining an autoconf package and wanted to integrate automatic testing. I use the Boost Unit Test Framework for my unit tests and was able to sucessfully integrate it into the package. That is it can be compiled via make check, but is is not…
5
votes
2 answers

What is the place of libtool, when to use it?

After getting used and comfortable to GNU autoconf and GNU automake. I decided to start learning about libtool. But still I cannot see clearly the benefit of using it in the real world. As I read the main benefit is the main portability issue which…
Vicente Bolea
  • 1,409
  • 16
  • 39
5
votes
2 answers

Automake AM_LDADD workaround

I want to set the same LDADD attribute (Unit test library) to a large number of targets (unit test C++ files). I first though that maybe automake has AM_LDADD variable to add that library to all the targets within the file but is not the case. In…
Vicente Bolea
  • 1,409
  • 16
  • 39
5
votes
1 answer

Building and installing for multiple versions of Python using autotools

I'm trying to figure out how to build my project for multiple versions of Python. I'm testing this on Debian wheezy, where the default version of Python is 2.7. but 2.6 is also supported and installed. However, automake is only installing and…
Faheem Mitha
  • 6,096
  • 7
  • 48
  • 83
5
votes
2 answers

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…
user1345414
  • 3,745
  • 9
  • 36
  • 56
5
votes
3 answers

glib2 build can't find automake 1.13 when automake 1.14 is installed

I'm attempting to build glib-2.36.4 on CentOS5. I realize it would be wiser to upgrade to 6 but this isn't possible because of a customer requirement. I've started a make build and I get the below error. The error complains that automake-1.13…
Thomas Lann
  • 1,124
  • 5
  • 17
  • 35
5
votes
1 answer

Automake: variable not expanded on Solaris

I have an variable declared in configure.ac: MY_VERSION="0:0:0" AC_SUBST(MY_VERSION) AC_MSG_NOTICE([$MY_VERSION]) The value of the variable is printed out correctly during ./configure phase. In Makefile.am there's following…
Martin Sustrik
  • 783
  • 10
  • 22
5
votes
2 answers

libtool install preserves temporary rpath of executable

I am modifying a project that is very similar to examples provided by the Automake/libtool documentation. Excerpts: Top-leve configure.ac: LT_INIT Top-level Makefile.am: ACLOCAL_AMFLAGS = -I m4 SUBDIRS = src doc ./src Makefile.am: lib_LTLIBRARIES…
user19087
  • 1,899
  • 1
  • 16
  • 21
5
votes
3 answers

automake 1.12 changes bison/yacc output names, backwards incompatible change?

I have posted a repository at https://github.com/Habbie/autoyacc-problem to demonstrate my issue. With automake 1.11 and below, using AC_PROG_YACC in configure.ac and AM_YFLAGS=-d in Makefile.am, parser.yy gets turned into parser.cc and parser.h.…
Habbie
  • 2,150
  • 15
  • 17
5
votes
2 answers

Automake: AM_CFLAGS has no effect

I am trying to add some compilation options in Automake, but none of the approaches work. Here is my configure.ac: AC_INIT(...) AC_PREREQ([2.59]) AC_CONFIG_AUX_DIR([build-aux]) AM_INIT_AUTOMAKE([1.10 foreign -Wall…
eold
  • 5,972
  • 11
  • 56
  • 75
5
votes
2 answers

Adding additional make/test targets to an autotools project

We have an autotools project that has a mixture of unit and integration tests, all of which run via 'make check'. This isn't ideal, as some of the integration tests take a while, and have all sorts of dependencies (database, etc.) I'd like to…
Bill B
  • 1,280
  • 13
  • 16
5
votes
1 answer

Running valgrind on project compiled with autotools outputs multiple heap summaries

I'm compiling a project with automake, but when attempting to run valgrind on the resulting executable, it does not behave as expected, appearing to run 8 times before actually executing the code that I want to check, and the heap summary for that…
heuristicus
  • 1,130
  • 12
  • 31
5
votes
2 answers

Handling whitespaces in file names using autotools

How do I tell automake to use a file with whitespaces in its name? This doesn't seem to work. bin_PROGRAMS = prog prog_SOURCES = "a file.c" "another file.c"
Hristo Venev
  • 972
  • 5
  • 17