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

GNU Autotools: rebuild without version info

I need to build a lib that is configured with autotools. The usual configure && make && make install steps produce versioned shared lib, something like libfoo.so.x.x Is it possible to modify configure.ac or Makefile.am (and of course follow up with…
pic11
  • 14,267
  • 21
  • 83
  • 119
10
votes
1 answer

Enforce strict C99 in Autoconf project

I have a program written in C and it uses Autoconf. It uses AC_PROG_CC_C99 in configure.ac which when used with gcc translates to the -std=gnu99 compiler option. The program is written somewhat strictly according to the C99 specification and does…
John X
  • 101
  • 3
9
votes
2 answers

Suppress "C source seen but `CC` undefined" in automake?

I have a Makefile.am for compiling Ocaml source code with ocamlbuild. However, even though I have AM_INIT_AUTOMAKE([foreign no-dependencies]) in my configure.ac, automake thinks that a C compiler must be present to install exectuables. That is, if…
Andrej Bauer
  • 2,458
  • 17
  • 26
9
votes
2 answers

Autoconf/Automake: How to avoid passing the "check" option to AC_CONFIG_SUBDIRS

I'm using Autoconf to build my c++ project. It uses third party code which is also built with the help of Autoconf/Automake. So in my configure.ac I've got the following line: AC_CONFIG_SUBDIRS([subdirectoryname]) Everything works fine, but I also…
aRestless
  • 1,825
  • 2
  • 18
  • 27
9
votes
1 answer

Hello World Library using autotools

Creating bin program is really easy using autotools I need to just define two files. `Makefile.am' bin_PROGRAMS = hello hello_SOURCES =…
Vivek Goel
  • 22,942
  • 29
  • 114
  • 186
9
votes
3 answers

How to avoid redefining VERSION, PACKAGE, etc

I haven't seen any questions relating to GNU autoconf/automake builds, but I'm hoping at least some of you out there are familiar with it. Here goes: I have a project (I'll call it myproject) that includes another project (vendor). The vendor…
Jason Day
  • 8,809
  • 1
  • 41
  • 46
9
votes
3 answers

autotools: force make not to rebuild configure/Makefile

I have a project with autotools: automake, autoconf. I want to prohibit make from remaking files configure, Makefile.in, etc; just to do compile job. Some of files are edited by hand, and I know that I should not to do this. (Or the project was…
osgx
  • 90,338
  • 53
  • 357
  • 513
9
votes
9 answers

Are there noteworthy uses of m4 besides autoconf?

Does someone know of any uses of m4 besides autoconf (preferably in a c or c++ environment) that is more than just an academic excerise, because it helped solve a problem that would otherwise (for example with a 'standard' preprocessor) have been…
René Nyffenegger
  • 39,402
  • 33
  • 158
  • 293
9
votes
2 answers

AS_IF and AC_MSG_ERROR: error: possibly undefined macro

I encounter such errors when trying to build libnice-0.1.10. For solution, I am following possibly undefined macro: AC_MSG_ERROR, but still not getting there. some program version uname: 3.5.0-23-generic m4: 1.4.16 automake: 1.14.1 autoconf:…
user180574
  • 5,681
  • 13
  • 53
  • 94
9
votes
1 answer

C++: ::ntohs() fails on higher optimization levels

I have a .cpp file: htonstest.cpp. I use g++ to compile it: $ g++ -o test htonstest.cpp It works, and the program ./test works too. But, when I use automake to compile it, has a compile error: htonstest.cpp: In function ‘int main()’: …
yetuweiba
  • 241
  • 1
  • 4
  • 13
9
votes
1 answer

Autoconf and configure.exe on Windows

I'm trying to build a Linux-developed library on Windows. This library requires glib and one of the gdk libraries. While I can find 32-bit Windows binaries for most of the dependent libraries, I'd much rather compile everything myself. I have very…
zmbq
  • 38,013
  • 14
  • 101
  • 171
9
votes
2 answers

Precompiled headers with Autotools

Is it possible to use gcc precompiled headers in projects using automake / libtool? Adding new make rules to build precompiled headers is not difficult. The issue is that you also have to add compilation flags introduced by libtool and AFAIK it…
Dj Gaspa
  • 253
  • 1
  • 2
  • 9
9
votes
4 answers

How do I get autotools to compile with the Intel compiler?

I want my code to compile with the Intel compiler(s) or with gcc/g++ depending on a configure argument. Is this possible? What do I need to put in my configure.ac and Makefile.am files to make this happen?
Daisy Sophia Hollman
  • 6,046
  • 6
  • 24
  • 35
9
votes
3 answers

How to cross-compile C++-library with dependencies?

I need to cross-compile some C/C++ library. The library depends on several C/C++ libraries. Some of those of libraries in turn depend on other libraries. All libraries come with configure script. I know how to compile and install libraries on host…
pic11
  • 14,267
  • 21
  • 83
  • 119
9
votes
4 answers

autoconf not generating makefile?

I am currently trying to create an installation package, using autoconf to generate the configure file. I have successfully managed to auto generate these, however, when I run ./configure, no makefile is generated from Makefile.in. My question is :…
godzilla
  • 3,005
  • 7
  • 44
  • 60