How do you “echo” the last configure/make build –options within a source directory?

Incredibly, somehow everyone else missed the canonical way to do this, which has been around since 2 years before this thread began. 🙂 I wondered the same thing as the OP and was disappointed by the lack of proper (non-ugly) ways to do this when I read this thread. A few days later, while idly … Read more

How do you create tests for “make check” with GNU autotools

To make test run when you issue make check, you need to add them to the TESTS variable Assuming you’ve already built the executable that runs the unit tests, you just add the name of the executable to the TESTS variable like this: TESTS=my-test-executable It should then be automatically run when you make check, and … Read more

Automake error ‘./ltmain.sh’ not found

In an autoconf/automake/libtool project you need to run: libtoolize: this copies/links a few support scripts, including ltmain.sh (which is the main component of libtool). aclocal: this looks up all m4 macros that your configure script will need, and make a local copy for easier access. autoheader: optional, if you want to use config.h/AC_CONFIG_HEADERS, otherwise all … Read more

Autotools: how to cleanup files created by “./configure” in lighttpd project?

I personally would really use the features of a source control software (you should use one) for this. This would cleanup make independent of your build process. See e.g. svn-cleanup or git clean. Nevertheless, automake allows some tweaking when to remove which files. This has (intentionally?) built-in limitations on what files generated by autotools can … Read more

Building a library using autotools from cmake

I think that you’d be better off using the ExternalProject feature of cmake. I guess you have your project and have libantrl in a sub directory? project +- libantlr +- mysrc —- etc —- If that’s the case, you can do something like this in the top level CMakeLists.txt: cmake_minimum_required(VERSION 2.8) project(test) include(ExternalProject) ExternalProject_Add(libantlr SOURCE_DIR … Read more

installed libtool but libtoolize not found

You typically need to use glibtool and glibtoolize, since libtool already exists on OS X as a binary tool for creating Mach-O dynamic libraries. So, that’s how MacPorts installs it, using a program name transform, though the port itself is still named ‘libtool’. Some autogen.sh scripts (or their equivalent) will honor the LIBTOOL / LIBTOOLIZE … Read more

Getting started with autotools

Alexandre Duret-Lutz’s tutorial is my resource of choice. There are also: Autotools: a practitioner’s guide to Autoconf, Automake and Libtool Autotools Mythbuster To me, the autobook is not up to date anymore and more difficult to read. However it still contains interesting chapters like Writing Portable Bourne Shell. Also, consider learning about non-recursive automake which … Read more

What’s the point of aclocal?

See Alexandre Duret Lutz’s Autotools tutorial, a must read. It contains diagrams explaining how the different files of an autotools project interact with each other and by which tool they are used: configure, config.h, config.status, aclocal.m4 etc EDIT: John Calcote also explains the purpose of aclocal and aclocal.m4 in the first chapter of his book … Read more

error code: 521