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
146
votes
21 answers

possibly undefined macro: AC_MSG_ERROR

I have the following in configure.ac: AC_CHECK_PROGS(MAKE,$MAKE make gmake,error) if test "x$MAKE" = "xerror" ;then AC_MSG_ERROR([cannot find a make command]) fi This has been in our project for a long time, but in some set ups, I get this…
dbeer
  • 6,963
  • 3
  • 31
  • 47
134
votes
2 answers

What's the difference of "./configure" option "--build", "--host" and "--target"?

The script ./configure accepts 3 options --build, --host and --target. I'm confusing their roles. What's the difference and semantics of them?
eonil
  • 83,476
  • 81
  • 317
  • 516
125
votes
6 answers

CFLAGS vs CPPFLAGS

I understand that CFLAGS (or CXXFLAGS for C++) are for the compiler, whereas CPPFLAGS is used by the preprocessor. But I still don't understand the difference. I need to specify an include path for a header file that is included with #include --…
EBM
  • 1,683
  • 5
  • 15
  • 13
110
votes
6 answers

$PHP_AUTOCONF errors on mac os x 10.7.3 when trying to install pecl extensions

I am trying to setup my machine with pecl_http and memcache and in both cases, I get similar errors. This is on MAC OS X 10.7.3 (lion) and I also have XCODE installed on it. I also installed Zend Server community edition before running these…
krishna
  • 3,547
  • 5
  • 27
  • 29
109
votes
6 answers

How to add include and lib paths to configure/make cycle?

I need a place to install libraries in a linux box I have no su access to. I'm using ~/local[/bin,/lib,/include], but I don't know how can I tell ./configure to look for libraries there (particularly, I'm trying to compile emacs, which needs libgif,…
Lacrymology
  • 2,269
  • 2
  • 20
  • 28
104
votes
6 answers

cannot find autoconf. please check your autoconf installation Xampp in CentOS

Getting another error when configuring memcahed with php in XAMPP in CentOS # /opt/lampp/bin/phpize Configuring for: PHP Api Version: 20131106 Zend Module Api No: 20131226 Zend Extension Api No: 220131226 Cannot find autoconf.…
Lakshmikandan
  • 4,301
  • 3
  • 28
  • 37
82
votes
4 answers

GNU autotools: Debug/Release targets?

I've been looking for this for a while: I'm currently converting a medium-size program to autotools, coming from an Eclipse-based method (with makefiles) I'm always used to having a "debug" build, with all debug symbols and no optimizations, and a…
cpf
  • 1,461
  • 2
  • 15
  • 26
62
votes
9 answers

Alternatives to Autoconf and Autotools?

I'm a very frequent user of the GNU Autotools (mostly Autoconf, occasionally Libtool). I'm working on a project where portability is going to be a sticking point.. Yet, the rest of the team is just not comfortable working with m4. I got this in my…
Tim Post
  • 33,371
  • 15
  • 110
  • 174
56
votes
2 answers

Confused about configure script and Makefile.in

I'm currently learning how to use the autoconf/automake toolchain. I seem to have a general understanding of the workflow here - basically you have a configure.ac script which generates an executable configure file. The generated configure script…
Siler
  • 8,976
  • 11
  • 64
  • 124
49
votes
3 answers

Autoconf: dnl vs. #

The Autoconfig manual states that comment lines can start with either dnl or #. Is there any difference between them, any reason to use one rather than the other in any circumstance? Or is it purely a matter of taste?
DevSolar
  • 67,862
  • 21
  • 134
  • 209
46
votes
1 answer

Append compile flags to CFLAGS and CXXFLAGS while configuration/make

The project that I am trying to build has default flags CFLAGS = -Wall -g -O2 CXXFLAGS = -g -O2 I need to append a flag -w to both these variables (to remove: 'consider all warnings as errors') I have a method to work it out, give make…
Vigneshwaren
  • 1,273
  • 2
  • 15
  • 24
44
votes
4 answers

installed libtool but libtoolize not found

i'm trying to build libxml2 from source on my mac. so i have autoconf, libtool, and automake installed using macports autoconf and automake seem to be working fine as expected. i try running autogen.sh first. libtoolize --version unfortunately…
tzl
  • 1,540
  • 2
  • 20
  • 31
33
votes
1 answer

Any difference between configure.ac and configure.in, and Makefile.am and Makefile.in?

I have seen both in different things I have configured. What I the difference? Is it notable to use only one? Or does it not matter which one to use?
Mohit Deshpande
  • 53,877
  • 76
  • 193
  • 251
33
votes
2 answers

PKG_CHECK_MODULES considered harmful?

Various developers discourage the usage of the PKG_CHECK_MODULES (for example, in this answer) but there is no clear, comprehensive explanation of their reasons as far as I've looked for. So, I ask: Why would PKG_CHECK_MODULES be harmful? What are…
brandizzi
  • 26,083
  • 8
  • 103
  • 158
31
votes
7 answers

Default compiler flags with Autotools

I want to know how to set default compiler/linker/etc. flags if I use Autoconf/Automake combo. For example, the default compiler flag is "-O2 -g" if I don't set anything. I can just override it with something else, for example if I want to…
petersohn
  • 11,292
  • 13
  • 61
  • 98
1
2 3
75 76