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

Cross-compiling for ARM with Autoconf

I am having trouble cross-compiling a library for my arm board using autconf. I am using this line: ./configure --target=arm-linux --host=arm-linux --prefix=/bla/bla/bla/linux_arm_tool CFLAGS='-m32' make make install When I do file to check it I…
Constantin
  • 16,812
  • 9
  • 34
  • 52
19
votes
2 answers

Cause compilation error in C89 if two types are not the same

Using only the features of C89, given typedef [unspecified token sequence] T1; typedef [another unspecified token sequence] T2; exhibit a language construct which will compile without error if and only if T1 and T2 are the same type (not just…
zwol
  • 135,547
  • 38
  • 252
  • 361
18
votes
2 answers

Best practices for CFLAGS handling in configure scripts?

I'm not a fan of autoconf, but in the interest of principle of least surprise, I'm trying to make my (non-autoconf) configure scripts behave as closely as possible to what users expect from an autoconf-based build system. The GNU coding standards…
R.. GitHub STOP HELPING ICE
  • 208,859
  • 35
  • 376
  • 711
17
votes
2 answers

Read a version number from a file in configure.ac

I define my project version number in a plain text file instead of configure.ac for some reasons. I would like to create a statement that would read the version number and store it during compilation time. Right now my configure.ac looks like…
lzap
  • 16,417
  • 12
  • 71
  • 108
17
votes
3 answers

autoconf/automake: conditional compilation based on presence of library?

I need to conditionally compile some code based on the presence of a library. Seems like this should be easy with autoconf/automake but I can't figure it out. For example, if there is a PNG library present, I want to include code to use it. My…
Ian Macky
  • 197
  • 1
  • 1
  • 6
17
votes
1 answer

Where does autoconf's AC_CHECK_HEADERS verify the header files?

I am having trouble with compiling one of the open source libraries (libopekele OpenID lib). The problem is I don't have sudo access on the system where I need to compile this. Ran the configure. It complained of missing htmltidy lib. Installed the…
rajeshnair
  • 1,587
  • 16
  • 32
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
2 answers

"AM_PROG_LIBTOOL" not found in library

I got an error while trying to compile a library in centOS 7, and i tried reinstall libtool but it does not help. Below is the error + autoreconf --install configure.ac:32: warning: macro 'AM_PROG_LIBTOOL' not found in library configure.ac:32:…
Moses Liao GZ
  • 1,556
  • 5
  • 20
  • 45
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
7 answers

Shell variable with spaces , quoting for single command line option

Autoconf scripts have trouble with a filename or pathname with spaces. For example, ./configure CPPFLAGS="-I\"/path with space\"" results in (config.log): configure:3012: gcc -I"/path with space" conftest.c >&5 gcc: with: No such file or…
Patrick
  • 161
  • 1
  • 1
  • 3
15
votes
6 answers

Autoconf check for program and fail if not found

I'm creating a project and using GNU Autoconf tools to do the configuring and making. I've set up all my library checking and header file checking but can't seem to figure out how to check if an executable exists on the system and fail if it doesn't…
Adam Magaluk
  • 1,716
  • 20
  • 29
15
votes
4 answers

How to disable Automake docs?

I'm trying to update Automake on a really old CentOS machine. The build is failing with: $ make -j 4 ... MAKEINFO doc/automake.info /home/scripts/automake-1.15.1/lib/missing: line 81: makeinfo: command not found WARNING: 'makeinfo' is missing on…
jww
  • 97,681
  • 90
  • 411
  • 885
15
votes
2 answers

Cygwin and "failed to run aclocal: No such file or directory"

I'm trying to test our Autotools stuff on Cygwin. When I open a prompt: $ autoreconf --install --force Can't exec "aclocal": No such file or directory at /usr/share/autoconf/Autom4te/FileUtils.pm line 326. autoreconf-2.69: failed to run aclocal: No…
jww
  • 97,681
  • 90
  • 411
  • 885
1 2
3
75 76