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
15
votes
1 answer

Autoconf -- including a static library (newbie)

I am trying to migrate my application from manual build to autoconf, which is working very nicely so far. But I have one static library that I can't figure out how to integrate. That library will NOT be located in the usual library locations - the…
EBM
  • 1,683
  • 5
  • 15
  • 13
15
votes
3 answers

How do I escape text in autoconf/m4?

The following code from my configuration.ac file does not work (note the nested square brackets with [default=no]): AC_ARG_ENABLE(debug, [ --enable-debug build with debugging support [default=no].], [DEBUG="$enableval"], …
user278429
  • 391
  • 2
  • 6
15
votes
3 answers

How to cross-compile Git for ARM?

Unfortunately, I am having difficulty cross-compiling Git for the ARMv6 architecture. But before I begin describing the steps I've taken and commands I've entered, I should briefly describe the build environment: I am cross-compiling on Ubuntu…
Nathan Osman
  • 71,149
  • 71
  • 256
  • 361
14
votes
4 answers

How to use C++11 features with Autoconf?

I have a project configured via Autoconf, and I want to start using C++11 features in this project. How to have the "-std=gnu++0x" switch always enabled and support for the features checked while configuring?
lvella
  • 12,754
  • 11
  • 54
  • 106
14
votes
4 answers

Autoconf: How to get installation paths into config.h

My program needs to load some files at run time, which will be installed into whatever folder is given to ./configure --datadir=/somewhere As my program needs to know where this folder is at run time, I need to #define a symbol somewhere so the C…
Malvineous
  • 25,144
  • 16
  • 116
  • 151
14
votes
2 answers

Error in automake

I’ve trying to create install package for hello world sample C program. I’ve done following staps. autoscan mv configure.scan configure.ac edit configure.ac to add some macros. aclocal create Makefile.am within bin_PROGRAMS = hello hello_SOURCES =…
user1345414
  • 3,745
  • 9
  • 36
  • 56
14
votes
4 answers

Why would autoconf/automake project link against installed library instead of local development library?

I'm creating a library libgdata that has some tests and non-installed programs. I am running into the problem that once I've installed the library once, the programs seem to be linking to the installed version and not the local version in…
Beau Simensen
  • 4,558
  • 3
  • 38
  • 55
13
votes
2 answers

Using the pkg-config macro PKG_CHECK_MODULES failing

I'm sure this is a fairly simple problem. I have a very simple configure.ac file which I am using to just learn how autoconf & pkg-config work together. The confgure.ac file looks like: AC_PREREQ(2.61) AC_INIT(autoconf_test, 1.0,…
ericg
  • 8,413
  • 9
  • 43
  • 77
13
votes
2 answers

autotools temporary files

I'm trying to debug an autotools problem for an open-source project, which is failing at the configure step. I'd like to see the code/executable that configure is trying to run. However, the config.log only shows that something failed (not the…
paleozogt
  • 6,393
  • 11
  • 51
  • 94
13
votes
3 answers

PKG_CHECK_MODULES syntax error near luajit

I'm new to GNU autotools.In my project when i try ./configure it generates following error : ./configure: line 9852: syntax error near unexpected token `luajit,' ./configure: line 9852: ` PKG_CHECK_MODULES(luajit,…
Prabhakar
  • 513
  • 1
  • 5
  • 22
13
votes
3 answers

Boost and Autoconf

I am making a project that uses Autoconf. I have the following in configure.ac: AC_CHECK_HEADERS([boost/foreach.hpp], [], [AC_MSG_ERROR(You need the Boost libraries.)]) When I run configure, it says it cannot find this header file: checking…
petersohn
  • 11,292
  • 13
  • 61
  • 98
13
votes
2 answers

How to dump conftest.c?

I have problems linking to a lot of libraries with a cross-compiler. Is it possible to dump the file conftest.c to a safe location each time it's being generated? I tried to uncomment the lines rm -f conftest from the configure script, but it…
John Smith
  • 131
  • 1
  • 3
13
votes
1 answer

Which files of an autoconf project to put into .gitignore?

We have the ctemplate library included in our git-managed project which is based on GNU Autoconf. I would like to put everything which is generated by Autoconf into the .gitignore file to avoid conflicts if someone accidentally commits his…
Korbi
  • 1,438
  • 4
  • 15
  • 22
13
votes
1 answer

Autoconf check for struct flock

fcntl() uses struct flock structure to define and check file locks. Unfortunately, on different Unix systems the fields in this structure are in different order. Does anybody know how one could check for it with autoconf or at least check if the…
StasM
  • 10,593
  • 6
  • 56
  • 103
12
votes
2 answers

speed up autoconf/configure of large project

I have a large autoconf/automake project, broken into components using AC_CONFIG_SUBDIRS. Is there any way to make autoconf/configure run faster? Perhaps doing subdirs in parallel, or caching reusable findings? I could easily write a build script…
CAB
  • 1,015
  • 1
  • 14
  • 24