Questions tagged [autotools]

Autotools is a suite of programming tools (mainly autoconf, automake, and libtool) designed to assist in making source-code packages portable to many Unix-like systems.

Consider adding one of the more specific tags below to a question.

Related tags:

1517 questions
27
votes
5 answers

Use autotools with README.md

I'm using autotools for a libraries hosted on GitHub. Instead of using an ordinary README text file, I want to use README.md. When running automake, I get the following error Makefile.am: required file `./README' not found Is it possible to tell…
Arnold Daniels
  • 16,516
  • 4
  • 53
  • 82
26
votes
6 answers

Possibly undefined macro: AC_PROG_LIBTOOL

I want to build protobuf, so I just cloned the package and cd in the directory. When I type ./autogen.sh, some error happened. I receive callback: configure.ac:104: error: possibly undefined macro: AC_PROG_LIBTOOL If this token and others are…
eeach
  • 261
  • 1
  • 3
  • 3
26
votes
3 answers

How can I use Google Test with my project that builds via autotools?

It seems like there are a few answers that kind-of, sort-of make sense, but that I don't know how to carry out. And I haven't found a comprehensive answer. The First Problem Google Test should not be an installed library, it should be built with the…
Joel
  • 2,065
  • 2
  • 19
  • 30
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
25
votes
3 answers

Build Apple Silicon binary on Intel machine

How can I compile a C project on macOS 11 (Intel) to work on Silicon? My current build script is as simple as: ./configure make sudo make install I've tried using the --host and --target flags with aarch64-apple-darwin and arm-apple-darwin without…
Till
  • 1,107
  • 12
  • 28
23
votes
4 answers

Can't run Makefile.am, what should I do?

I got a C project to compile and run in Linux. It is a very big project with many subdirectories. Inside the parent directory there are files Makefile.am and Makefile.in. I tried running make -f Makefile.am, and got the following error: make:…
sara
  • 3,824
  • 9
  • 43
  • 71
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
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
22
votes
2 answers

Why is "autoreconf" not used often?

I am newbie of Autotools. From my understanding, one would use the following basic steps to build software using Autotools: autoreconf --install ./configure make However, I noticed that most open source software packages (on Linux) does not need…
user1783732
  • 1,599
  • 5
  • 22
  • 44
19
votes
4 answers

Can CMake generate a configure file?

I need the configure file to transpile from C++ to JS, I'm trying to use emscripten in a project. Emscripten comes with a tool called emconfigure, that replaces the autoconf configure, But the project I'm building uses cmake as build system and…
canesin
  • 1,967
  • 2
  • 18
  • 30
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
18
votes
7 answers

How to create a 32-bit shared-library on a 64-bit platform with autotools

I'm using autotools to build my system, which consists primarily of a library. On 64-bit Red Hat platforms, I need to be able to produce a library capable of working on 32-bit Red Hat platforms. When I add -m32 to the compile lines everything works…
John Gordon
  • 2,576
  • 3
  • 24
  • 29
17
votes
2 answers

Building .so module with autotools/libtool without .la and .a variants being installed

How to build and install a .so module with autotools/libtool without .la and .a libraries being also installed into --prefix path? Currently i am using following Makefile.am: lib_LTLIBRARIES = libCurlDownloader.la libCurlDownloader_la_SOURCES =…
Alexander Tumin
  • 635
  • 6
  • 17
17
votes
1 answer

How to check header files and library functions in CMake like it is done in Autotools?

I'm currently converting a small C project from autotools to CMake. In the old configure.in I checked every header and library function for existence using the following lines: # Checks for header files AC_HEADER_STDC AC_CHECK_HEADERS([stdlib.h…
Benedikt Waldvogel
  • 12,406
  • 8
  • 49
  • 61