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
30
votes
4 answers

How do you "echo" the last configure/make build --options within a source directory?

When doing a a GNU-style " ./configure, make, and install " - with specific options, flags, etc... As you all know, sometimes this can be a black art.. and what works for one piece of software may not for any other... Now, imagine that you had…
Alex Gray
  • 16,007
  • 9
  • 96
  • 118
29
votes
3 answers

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…
Vitor Baptista
  • 2,016
  • 1
  • 23
  • 28
27
votes
3 answers

configure does not recognize androideabi

I am trying to compile a library using android-ndk-r5 standalone toolchain and autotools. When doing a ./configure, it fails with: $ ./configure --host=arm-linux-androideabi ...snip... checking host system type... Invalid configuration…
larvyde
  • 811
  • 1
  • 6
  • 19
26
votes
1 answer

Difference between autoconf and autoreconf

I'm trying to learn how to use autotools and I can't seem to find a good beginner-friendly answer to this question. What's the difference between autoconf and autoreconf.
audiFanatic
  • 2,296
  • 8
  • 40
  • 56
24
votes
5 answers

How to include .m4 files in Autoconf?

I have downloaded a macro from Autoconf Archive, and I want to use it. What do I have to put in my configure.ac file to make use this macro?
petersohn
  • 11,292
  • 13
  • 61
  • 98
23
votes
1 answer

./configure with a specified version of g++

How to tell to a 'configure' file to compile with a specified version of g++ ? Thanks.
Oodini
  • 1,092
  • 6
  • 11
  • 22
23
votes
4 answers

Tips on how to deploy C++ code to work every where

I'm not talking about making portable code. This is more a question of distribution. I have a medium-sized project. It has several dependencies on common libraries (eg openssl, zlib, etc). It compiles fine on my machine and now it's time to give…
User1
  • 39,458
  • 69
  • 187
  • 265
23
votes
2 answers

Autotools check for C++11

I use AX_CXX_COMPILE_STDCXX_0X(can look on autoconf-archive) to check for c++11 capabilities of the compiler. It correctly determines that -std=c++0x required, but does not add it to CXXFLAGS. I took a look at the macro source and it actually checks…
KAction
  • 1,977
  • 15
  • 31
22
votes
7 answers

Library resolution with autoconf?

I'm building my first autoconf managed package. However I can't find any simple examples anywhere of how to specify a required library, and find that library where it might be in various different places. I've currently got: AC_CHECK_LIB(['event'],…
Alnitak
  • 334,560
  • 70
  • 407
  • 495
22
votes
2 answers

Howto add a link to a library in autoconf configure script / makefile

I am an autotools newb and I have difficulties figuring out howto easily link a specific library into one of the configured targets. I have a source package that I want to build the usual way: ./configure && make && make install Unfortunately one of…
AndreasT
  • 9,417
  • 11
  • 46
  • 60
22
votes
1 answer

how to set include paths with autotools

I'm working on a C++ project that uses autoconf & automake, and I'm struggling to correctly set up the include paths in *CPPFLAGS. I've read about 3 hours worth of documents, and I can't figure it out yet. I'm not looking for a hack, but for the…
Matei David
  • 2,322
  • 3
  • 23
  • 36
21
votes
3 answers

How to determine host value for configure when using cross compiler

General question: If I use a cross compiler, how can I tell the value of the "--host" option I should give when I run configure? Specific: I'm using cross compiler for arm64 arch. What is the correct "--host" value to use?
Omer Dagan
  • 14,868
  • 16
  • 44
  • 60
20
votes
3 answers

Can I get UTC offset from Unix command line?

I'm writing an autoconf script that needs the current UTC offset. There's no obvious way to get this out of the date program. Is there any straightforward way to get this from a command-line utility, or should I write a test that gets the…
vy32
  • 28,461
  • 37
  • 122
  • 246
19
votes
2 answers

Autotools : how to set global compilation flag

I have a project with several sources directories : src/A /B /C In each, the Makefile.am contains AM_CXXFLAGS = -fPIC -Wall -Wextra How can avoid repeating this in each source folder ? I tried to modifiy src/Makefile.am and the…
Barth
  • 15,135
  • 20
  • 70
  • 105
19
votes
7 answers

User of autotools-generated tarball gets error message: aclocal-1.13: command not found

I am distributing a tarball with installation scripts generated by autoconf version 2.69. Works fine on many different machines. Now a user, working on a fresh Arch Linux system, reports that configure executes properly, but make immediately…
Joachim W
  • 7,290
  • 5
  • 31
  • 59
1
2
3
75 76