automake

GNU Autotools: How do you include source files in the 'make dist' tarball that are above the root source directory?

I've got a Subversion project that uses Gnu Autotools (i.e., automake, autoconf, and libtool) to manage source code within a subfolder (called 'subpackage'). The subpackage references source files that are above the subpackage's root source directory, and are common to other subpackages. Unfortunately, when running 'make dist' to creat...

external library config macro for autoconf/automake

hello Is there a autoconf macro to configure generic library that can: generates --with configure option setup library and include path setup compiler/preprocessor and linker flags check existence of library and include files setup configuration macros Right now I am doing everything using ARG_WITH, CHECK_LIB, etc. the steps are gen...

Is it possible to specify specific flags/define for DLL/SO build?

Hello, How can I specify some unique flags for DLL only builds. By default libtool adds -DDLL_EXPORT which is fine for most projects that follow GNU conventions, but if I work, for example, with Boost I may need to specify for my library flags: -DDLL_EXPORT -DBOOST_ALL_DYN_LINK for DLL only builds, also sometimes I want conditional buil...

Undefined reference when compiling against libraries generated by Automake

Hi I am having a pretty strange linking error in a project that uses automake. What I do seems pretty simple from the manual, so I really wonder what I can doing wrong ... My project has three folders : src/common, in which I compile a number of C++ files into a libube-common.a static lib src/engine, in which I compile a number of...

Automake and standard shared libraries

How can I force automake to create a standard shared library, instead of a libtoolized one? Normally, I'd create the abc.so which is referenced with a full path and loaded into the main program. Is there a way to force AM to do the same? If I list it as _LIBRARY, automake complains: 'abc.so' is not a standard library name; did you mean '...

What's the best way to insert version and arch info into C++ sources?

I want my C++ program to include a "--version" option which causes it to print out: Architecture it's compiled for Version of the source (e.g., v0.1.0) Name of the application I'm also using autoconf/automake for the first time, and I notice that configure.ac has both the binary and the version. It doesn't currently have architecture...

How would one setup autotools to build a project for separate architectures, concurrently, on multiple systems?

I've got a C++ project which uses automake and autoconf. I'm new to both of these. My home directory is network mounted -- the same on every server we have -- and I want to compile and run the project (and its executable) concurrently on separate machines. Our servers are frequently different architectures. My desktop is 32-bit, but th...

check automake/autoconf version in configure script

I'm trying to edit a configure script that will execute this piece of code if it is above Automake version x.xx, and if it isn't, it executes a different piece of code. So, I think that version I want to check for 1.10. If it's above this version, I want it to be this: m4_rename_force([glibcxx_PRECIOUS],[_AC_ARG_VAR_PRECIOUS]) otherw...

Automake generating binaries to bin/ instead of in src/

I searched for the answer to this question but couldn't find any good. Maybe they're old and something has changed, so I ask again. I have a directory structure as: my_project src bin I want that, when I do make in the root dir, the binaries are put in ./bin, instead of cluttering ./src. But how? EDIT: I am using C++. My Makefile....

Automake: how to handle global and local 'make check' effectively?

In a larger project, I have set up ./tests/Makefile.am to run a number of tests when I call make check. The file global_wrapper.c contains the setup / breakdown code, and it calls test functions implemented in several subdirectories. TESTS = global_test check_PROGRAMS = global_test global_test_SOURCES = global_wrapper.c foo/foo_test.c...

Using pkg-config with autotools

I'm learning about the autotools and made it through a hello world scenario and now wanted to try wrapping up some cppunit tests into a package and build it using the autotools. In order to build the package, cppunit would have to be installed on the system. What's the best way to check for this during the ./configure portion of the bu...

What is the best way to set compilation flags for individual source files using GCC and autotools?

Greetings, I need to disable optimization flag for a individual file using autotools. What is the best way to do it? ...

How do I troubleshoot boost library/header inclusion via autoconf/automake?

I'm new to autom4te, and I'm trying to use autoconf/automake to build and link a C++ program on multiple architectures. Complicating the linking is the fact that the project requires boost (filesystem, system, program_options). I'm using boost.m4 (from http://github.com/tsuna/boost.m4/tree/), and it seems to locate all the libraries and...

How do I specify in a Makefile.am script that I only want to compile object .o files that can be later linked against?

Hi there, I have a Makefile.am which will be responsible for building a final application binary: project/src/Makefile.am also in the src directory is a sub-directory called ctrnn which contains a further Makefile.am: project/src/ctrnn/Makefile.am Now, ctrnn/Makefile.am should only generate object .o files with the idea being that t...

Add one header from a different project to my project using automake

I'm working on a relatively big project that is using automake build system. Now the problem is that I need to link the project with a library from another project (this works fine), but I also need to include a header from the other project source tree (api.h). INCLUDES = -I@REMOTE_PROJECT_DIR@ in Makefile.am doesn't work, because th...

Writing a Makefile.am to invoke googletest unit tests

I am trying to add my first unit test to an existing Open Source project. Specifically, I added a new class, called audio_manager: src/audio/audio_manager.h src/audio/audio_manager.cc I created a src/test directory structure that mirrors the structure of the implementation files, and wrote my googletest unit tests: src/test/audio/aud...

Conflicting PACKAGE_NAME and other macros when using autotools.

When using autotools (with a config.h file) for both a library, and a software built on that library, the compiler complains about a redefinition of some macros (PACKAGE_NAME, PACKAGE_TARNAME and so on). How can I prevent this? The config.h file is needed in the library to propagate it's setting to the software that use it. Right now ...

Where is documentation about EXTRA_SCRIPTS variable in autotools?

What is EXTRA_SCRIPTS variable for in Makefile.am? Where is it documented? ...

How to use multi-level SUBDIRS in Makefile.am:s?

A common issue automake complains about is caused by following lines in various Makefile.am:s Makefile.am: SUBDIRS = deployment transport/http/util transport/http/common engine transport The intent of this line is to force the order of building so that transport/http/util and transport/http/common are build before the engine directory...

Automake: How to add a building step?

Hello, Currently, I have a build chain, completly manage by automake, like: .vala > .c > .o > .exe I would like add a new step for preprocess a XML file .ui into a vala source: .ui > .vala > .c > .o > .exe I did this, in makefile.am gtkbuilder2vala_SOURCES = \ abstract-window.ui \ main.vala \ $(NULL) And: XSLTPROC ...