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
17
votes
2 answers

Placing header files in a subdirectory of /usr/include with automake?

If I write a library, and have header files for development included, and have a src/Makefile.am like this: AM_CFLAGS = -std=c99 -Wall -Werror -Os lib_LTLIBRARIES = libmylibrary.la libmylibrary_la_SOURCES = a.c b.c include_HEADERS = a.h…
Delan Azabani
  • 79,602
  • 28
  • 170
  • 210
17
votes
2 answers

Autotools - tar This does not look like a tar archive

After running make distcheck I get the message that I have successfully built the package and is ready for distribution. If I untar the tar.gz with tar -zxvf hello-0.2.tar.gz it successfully extracts all of its contents. However, when I try to…
denim69
  • 179
  • 1
  • 1
  • 3
17
votes
1 answer

How to give options for "configure" using yocto recipes?

I want write a recipe in yocto to build my custom component. In that i would like to enable some flags according to machine. eg: if machine is x86 my configure command should be like : ./configure --enable-x86 if it is x64 ./configure…
A R
  • 2,697
  • 3
  • 21
  • 38
17
votes
2 answers

How to set a define through "./configure" with Autoconf

I have one project that can generate two diferent applications based on one define. libfoo_la_CXXFLAGS = -DMYDEFINE I have to modify the Makefile.am to set this define, so it is not automatic. Can I set this define somehow through the configure…
Luiz Antonio
  • 223
  • 1
  • 2
  • 6
16
votes
3 answers

Install data directory tree with massive number of files using automake

I have a data directory which I would like automake to generate install and uninstall targets for. Essentially, I just want to copy this directory verbatim to the DATA directory, Normally, I might list all the files individually, like…
Jeremy Salwen
  • 8,061
  • 5
  • 50
  • 73
16
votes
2 answers

configure.in or configure.ac?

It seems that some autoconf projects use a configure.in file to generate a configure script, and some use configure.ac. What is the difference/advantage between using one or the other?
freedrull
  • 2,194
  • 4
  • 21
  • 33
16
votes
2 answers

How to learn the Joy of Autotools?

So a couple years back I took some time to grok make, and it's paid off enormously. Writing little makefiles for building my projects and automating tasks is fun and productive. The downside is, of course, that my makefiles are overspecific,…
rampion
  • 87,131
  • 49
  • 199
  • 315
15
votes
1 answer

autotools syntax error with ax_check_compile_flag

I am using autotools for building my C++ application. In my configure.ac I have the following line: AX_CHECK_COMPILE_FLAG([-Wall], [CPPFLAGS="$CPPFLAGS -Wall"]) which causes the following error when executing ./configure (after running autoreconf…
user32323
  • 299
  • 1
  • 3
  • 11
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
4 answers

automake error: no proper invocation of AM_INIT_AUTOMAKE was found

I am new in autotools, and following this tutorial. but I could not solve this errors, $ automake configure.ac: error: no proper invocation of AM_INIT_AUTOMAKE was found. .. Makefile.am: error: required file './depcomp' not found …
arslan
  • 2,034
  • 7
  • 34
  • 61
15
votes
3 answers

How to create a Debian package as part of autotools build?

All of the Debian packaging examples I can find assume the user is re-packaging from an upstream build, so it unpacks a source tarball, configures, rebuilds, and re-packages. I'm trying to build a package for my own library, which is built using…
CAB
  • 1,015
  • 1
  • 14
  • 24
14
votes
2 answers

How to list features that can be enabled and disabled in ./configure script?

Lots of open source software is distributed in source code with autotools build system. In order to build such software i issue ./configure && make. But for some software i need to build only subset of it - for example, in SRP i'm interested only in…
grigoryvp
  • 40,413
  • 64
  • 174
  • 277
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
2 answers

How can an autotools user specify a combination of static & dynamic linking?

I'm building a program with autoconf, automake, and libtool. My work requires that I statically link (most) libraries. This hasn't been a problem in the past because I could statically link everything with -all-static. Now it's a problem because I…
tprk77
  • 1,151
  • 1
  • 9
  • 22
14
votes
1 answer

How to handle subprojects with autotools?

I have some C++ project build by autotools. The project uses some libraries, also written by me. Source of libraries are imported to the project as submodules of git. Each library has its own autotools files. Say, I have: src/
galadog
  • 960
  • 2
  • 10
  • 20