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

CMake generate config.h like from Autoconf

When using the Autotools it's common to generate a config.h file by specifying the AC_CONFIG_HEADERS macro in configure.ac like this: AC_CONFIG_HEADERS([config.h]) What is the respective equivalent for this when using CMake?
lanoxx
  • 12,249
  • 13
  • 87
  • 142
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
8 answers

Macro definitions for headers, where to put them?

When defining macros that headers rely on, such as _FILE_OFFSET_BITS, FUSE_USE_VERSION, _GNU_SOURCE among others, where is the best place to put them? Some possibilities I've considered include At the top of the any source files that rely on…
Matt Joiner
  • 112,946
  • 110
  • 377
  • 526
13
votes
3 answers

How can I define #define in my Make files

In my c/c++ files, there are multiple #define. As an example: #ifdef LIBVNCSERVER_HAVE_LIBZ /* some code */ #ifdef LIBVNCSERVER_HAVE_LIBJPEG /* some more code */ Can you please tell me how can I modify my Makefile.in so that I have those…
n179911
  • 19,547
  • 46
  • 120
  • 162
13
votes
1 answer

libtool links with 32-bit version of libstdc++.so on a 64-bit target platform when multiple version of gcc are installed

First, I'd like to let you know that it is my first post on StackOverflow, so I hope that I won't make a fool of myself by asking a very stupid question. I've been googling about this problem for a few days now, and I couldn't find any answer so…
Nicolas
  • 301
  • 3
  • 7
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

Correcting the GCC command line ordering using Automake

I have an autotools project that compiles just fine on the Mac, but under Linux (Ubuntu 12.04.1 LTS) the command lines passed to gcc have the libraries out of order relative to the object files. For example, autotools generates the following command…
Pridkett
  • 4,883
  • 4
  • 30
  • 47
12
votes
2 answers

Force linking a static library into a shared one with Libtool

I have a library (libfoo) that is compiled using libtool into two objects: libfoo.a and libfoo.so. I have to create, using libtool also, another library (libbar) that will be a single shared library (libbar.so) containing all libfoo's code. In order…
vperron
  • 530
  • 5
  • 7
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
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
1 answer

How to use autotools nobase and nodist prefixs together on include_HEADERS

I have some header files in a sub directory, that must be copied to a same-named sub directory in my include directory. I can use the nobase prefix to make that happen (I'm working with heimdal code, fyi): nobase_include_HEADERS = hcrypto/aes.h \ …
David Mulder
  • 7,595
  • 11
  • 45
  • 61
11
votes
2 answers

make: disable parallel building in subdirectory for single target only

I have a rather huge autotools-powered project that lives in a directory tree consisting of a lot of directories with subdirectories. It's got a target check (in each subdirectory as well as the main directory) that executes a whole lot of automated…
arne
  • 4,514
  • 1
  • 28
  • 47
11
votes
4 answers

Why has nobody created an open source build system for the brain dead?

I want to build a shared library. GNU/Linux is the development and target platform. C is the implementation language. I can't decide how I want to setup the build system and keep flitting around three options each of which have lots of reasons to…
James Morris
  • 4,867
  • 3
  • 32
  • 51
11
votes
2 answers

autoreconf cleanup

I use autoreconf --install to generate configure scripts, etc for my project. Is there a "cleanup" option, or some other easy method to clean up the files generated by autoreconf? With the Makefiles generated by configure, I can do a make distclean,…
Chris
  • 2,786
  • 1
  • 28
  • 31