Questions tagged [autoconf]

GNU Autoconf creates a shell script `configure` that is used to configure software for compilation for UNIX-like operating systems.

GNU Autoconf creates a shell script configure that is used to configure software for compilation for UNIX-like operating systems. It is extensible through the use of shell script and m4 macros. It is frequently used with GNU Automake and GNU Libtool (collectively known as Autotools).

1135 questions
12
votes
5 answers

Using rake with a non-ruby project

A workmate floated the idea of using rake as a build system for a non-ruby project. Is it possible to extend rake to compliment other languages where the autoconf toolset would usually be used?
Nick Gerakines
  • 1,432
  • 1
  • 11
  • 20
12
votes
4 answers

how to create binary and .so using libtool

I have a set of cpp files that I want to compile directly into a binary and also to compile into a shared library. I have bin_PROGRAMS=mybin lib_LTLIBRARIES=libmylib.la COMMON_SOURCES=f1.cpp f2.cpp f3.cpp mybin_SOURCES=main.cpp…
pm100
  • 48,078
  • 23
  • 82
  • 145
12
votes
2 answers

Does a list of all known target triplets in use exist?

When cross compiling tools, you will often have to provide "a target triplet". Example given i686-pc-linux-gnu arm-none-linux-gnueabi powerpc-unknown-linux and so on... These triplets, which are sometimes in fact four components, have the…
Mecki
  • 125,244
  • 33
  • 244
  • 253
12
votes
2 answers

Makefile.in and variable substitution

In Makefile.in I see variable definition where an external variable name is enclosed between two @ symbols # @configure_input@ package = @PACKAGE_NAME@ Where those external variables come from? Also, I couldn't find in GNU manual what does exactly…
pic11
  • 14,267
  • 21
  • 83
  • 119
12
votes
4 answers

How to test a C++ library usability in configure.in?

I'm working on a C++ project on GNU/Linux and I'm looking for a way to test the existence and usability of IBM Informix's library with the Autotools - namely, editing a configure.in. I don't have experience with Autotools, so basically I'm picking…
jbatista
  • 2,747
  • 8
  • 30
  • 48
11
votes
6 answers

How can I use AC_REVISION with Git?

When using Autoconf in a project managed with Subversion, I would put this code in configure.ac: AC_REVISION($Revision: 1234 $) With svn:keywords Revision, AC_REVISION would insert the revision number of configure.ac into the generated configure…
cjm
  • 61,471
  • 9
  • 126
  • 175
11
votes
1 answer

How to select the autoconf build directory?

Is there a way to set where autoconf generates the object files. I would like to have autoconf create all object files in a src/build/ instead of src/ I've tried setting VPATH but that doesn't seem to do anything. VPATH = build
Adam Magaluk
  • 1,716
  • 20
  • 29
11
votes
1 answer

How to generate a source file when building using autotools

With Make, I do something like generated.c: input.txt generator ./generator input.txt > generated.c How would I get equivalent functionality out of autotools? (removing generated.c on cleaning would also be a bonus).
Jeremy Salwen
  • 8,061
  • 5
  • 50
  • 73
11
votes
3 answers

Why doesn't autoconf pass the AC_CHECK_HEADER test when the .h is file clearly available?

I am having a bear of a time getting autoconf to check for the presence of a particular header file. Let's call the header dependency "inky.h", and let's say that inky is a library that was installed (seperately) with the prefix set to "/usr/local".…
dusktreader
  • 3,845
  • 7
  • 30
  • 40
11
votes
6 answers

how to compile MPI and non-MPI version of the same program with automake?

I have a C++ code that can be compiled with MPI support depending on a certain preprocessor flag; missing the appropriate flag, the sources compile to a non-parallel version. I would like to setup the Makefile.am so that it compiles both…
Riccardo Murri
  • 1,045
  • 1
  • 11
  • 19
11
votes
3 answers

Should I include configure and makefile in a github repository?

We recently moved from subversion to git, and then to Github, for several open source projects. Github was nice in that it provided a lot of functionality. One of the things I particularly like is the ability to download tags as zip or .tar.gz…
vy32
  • 28,461
  • 37
  • 122
  • 246
10
votes
1 answer

Writing `configure` file for an r package

I am writing an r package which provides a wrapper around the libSBML C library. I am using the rcppgsl package as a reference, which looks for the location of header files and the library files for GNU Scientific Library GSL and uses that…
Satya
  • 1,708
  • 1
  • 15
  • 39
10
votes
3 answers

Injecting mercurial changeset as version information in a C executable

I would like the executables for a project I am working on to have the latest mercurial changeset recorded so that when a user complains about buggy behavior, I can track which version they are using. Some of my executables are Python and others are…
Setjmp
  • 27,279
  • 27
  • 74
  • 92
10
votes
1 answer

autoconf with -pthread

Greetings. I am trying to create an autoconf configure script that automatically checks for which pthread option to use and, ideally, specifies -pthread when compiling with gcc. It was my hope that AX_PTHREAD would work, but neither seems to work on…
vy32
  • 28,461
  • 37
  • 122
  • 246
10
votes
2 answers

How to get absolute path to top build directory in autoconf configure.ac?

I am working on a project which requires a subproject which has its own makefile and configure.ac. The subproject is a program which is used to generate source files for the main project. There is an option to disable the building of this project…
crobar
  • 2,810
  • 4
  • 28
  • 46