autotools

Calling SED for a source in Makefile.am

I've got c++ code that needs a sed done to it prior to compilation. How do I place this into Makefile.am? I tried the typical makefile setup and the target appears to not exist: gentest.cc: $(SED) -i "s|FIND|REPLACE|" gentest.cc If you are interested as to why I want to do this, it's because I wrote my program (slid...

Precompiled headers with Autotools

Is it possible to use gcc precompiled headers in projects using automake / libtool? Adding new make rules to build precompiled headers is not difficult. The issue is that you also have to add compilation flags introduced by libtool and AFAIK it can't handle header input files. How can you do that? ...

libtool deleted by 'make distclean'

I've copied libtool into my program's source tree to distribute it with the program. But when I run 'make distclean' libtool is deleted with the rest of the rest of the generated files. How do I stop that from happening? I tried putting EXTRA_DIST = libtool in Makefile.am but that doesn't work. Here is basically what my configure.ac ...

Autoconf problem: “error: C compiler cannot create executables”

I'm trying to build a program I've written in C using GNU autotools, but I evidently have it set up wrong because when configure runs, it spits out: configure: error: C compiler cannot create executables If I look in config.log, I see: configure:2846: checking for C compiler default output file name configure:2868: gcc conftest.c ...

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 separate the integration tests and assign them their own make target. That way, unit tests ca...

How should I run a prebuilt Makefile from a Makefile.am?

How should I run a prebuilt Makefile from a Makefile.am? I am new to automake/autoconf build system. The package I am implementing autotools for has a couple libraries and test executables for each. Some of the libraries are auto-generated ASN1C code that come with prebuilt makefiles. I am not sure of the best way to say inside of the M...

Why has nobody created an open source build system for the brain dead?

I want to build a shared library. GNU/Linux is the development and target platform. C is the implementation language. I can't decide how I want to setup the build system and keep flitting around three options each of which have lots of reasons to dislike: hand crafted Makefiles - I've worked this way almost exclusively in the past GNU...

What is the best way to auto detect library dependencies in a C/C++ project?

What is the best way to auto detect library dependencies in a C/C++ project? I have a project where I have all the dependencies on the machine. It builds and runs. Now I want to put together a autotools build system. I am looking for a good way to auto detect all the dependencies needed such as header files used and libraries needed for...

Cross-compile Autotools-based Libraries for Official iPhone SDK

Background I am writing a program that targets several different phones, including the iPhone. The program depends on several thirdparty libraries. I am having difficulty cross-compiling these thirdparty libraries for the iPhone and iPhone simulator. The libraries include the Apache Portable Runtime and GNUTLS, as well as their dependen...

Cross-compile Apache Portable Runtime to the iPhone

This is a followup to a previous question on cross-compiling for the iPhone: http://stackoverflow.com/questions/1602182/cross-compile-autotools-based-libraries-for-official-iphone-sdk Basically, I am trying to compile the Apache Portable Runtime (APR) version 1.3.8 (latest) for the iPhone. I am currently running into the following error...

How should AC_CACHE_CHECK be reset?

How should AC_CACHE_CHECK be reset? In autoconf I am checking for headers. I've added some logic to try a little harder to find header files in std folders that might not be in the default include path. The way I do this is first attempt to find a header file with the built-in AC_CHECK_HEADER. If header is not found, I modify the CPPFLA...

In autotools, what is dnl'ed?

I see alot in autoconf code about stuff being dnl'ed and not dnl'ed. What is dnl'ed? ...

How do you set the order of libraries in automake?

How do you set the order of libraries in automake? In my am file I have something like: myprog_DEPENDENCIES = adhoc-target myprog_SOURCES = myprog.c myprog_LDADD = libmine.la myprog_LFLAGS = -static -L/home/user/lib -ladhoc Now, when I compile I get this compile line similar too: gcc -static myprog-myprog.o -o myprog -L/home/user/li...

Autotools local destination directory

When I run my autotools-generated Makefile with "make" it generates the files in the current directory. I would prefer it to not "pollute" my directory but move the programs to "bin/" (since the source is in "src/") Is this possible with autotools? (Using autoconf and automake - Not libtool) ...

Portably include GLib headers in autoconf/automake

I need to include the GLib headers for a project that is built with an autoconf-based system for portability. How can I safely import the GLib headers in a portable manner? I know about pkg-config, but that is not entirely portable (since some systems don't have it and I would prefer to only rely on autoconf for configuration). ...

Qt and QMake build dir

I would like to build qt and qt application out of the source tree. Do you know how to set from the command line the .obj directory both with configure and qmake? ...

Getting started with autotools

Anyone recommend how a person could get started with autotools in building a C project? ...

automake dependency tracking for nonstandard C++ suffix

hello how can i force automake to generate dependency tracking for nonstandard C++ suffix files? in particular I mean generating .deps directory file content. I am using libtool as well. Thanks ...

Build system for a highly modular portable open source project

We have an Open Source software project in the very beginning. The program is thought to be highly modular: for example, the underlying database can be either sqlite, postgre, or berkley, depending on the preferences of the end-user. Only one systematic approach I'm confident with, is to use Autotools (GNU build system). I would like to...

Fix source file search path when doing out-of-source autotools build within emacs

Hi I have a project that uses autotools. A nice feature of autotools is 'out-of-source' builds, wheras instead of doing : cd foobar ./configure make I actually create a folder for builds, in which I do the configuration : cd foobar/builds/linux ../../configure make (The nicety is that my source folder is not crippled with the ge...