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

How to package data files with GNU's autoconf and automake

I am a rather new C++ programmer. I have made a very simple game using SDL libraries. My game, naturally, uses some images, sounds and fonts. I have wanted to make a distribution of the package, where user's can configure && make . It's not like…
yasar
  • 13,158
  • 28
  • 95
  • 160
8
votes
2 answers

How do I modify the install name of a .dylib at build time

I am building the google-gflags commandline flags library for C++ on Mac OS X (10.7.1). The build process is as such: $ ./configure --prefix=output $ make $ make install I'd like to change the install name of the generated shared library at build…
v8891
  • 133
  • 1
  • 5
8
votes
2 answers

Run configure in gyp file

Suppose I have a node module which is essentially a wrapper around some standard C library using autotools. So the library by itself would be installed using ./configure and make and perhaps make install. The wrapper code is just a few files, and…
MvG
  • 57,380
  • 22
  • 148
  • 276
8
votes
2 answers

Recommended way to use Autoconf Archive macros and other 3rd party macros

I found several useful macros in the Autoconf Archive, and also a useful m4 file which helps test Boost library support. The Autoconf Archive is hosted by GNU and the Boost m4 helper is hosted as a GitHub repo. I'd like to use them in a C++ project…
8
votes
2 answers

How do you set the order of libraries in automake?

How do you set the order of libraries in automake? In my am file I have something like: myprog_DEPENDENCIES = adhoc-target myprog_SOURCES = myprog.c myprog_LDADD = libmine.la myprog_LDFLAGS = -static -L/home/user/lib -ladhoc Now, when I compile I…
Crazy Chenz
  • 12,650
  • 12
  • 50
  • 62
8
votes
2 answers

Make autoconf "check" target without running it

Is there a way to compile the "check" target of an autoconf project without running it? I have Eclipse Juno with the "C/C++ Unit Test" plugin. I would like to be able to make the check target, then run it in the context of the plugin so that I can…
Ed K
  • 189
  • 2
  • 9
8
votes
5 answers

autoconf using sh, I need SHELL=BASH, how do I force autoconf to use bash?

I'm running autoconf and configure sets SHELL to '/bin/sh'. This creates huge problems. How to force SHELL to be '/bin/bash' for autoconf? I'm trying to get this running on osx, it's working on linux. Linux is using SHELL=/bin/bash. osx defaults to…
Flinkman
  • 17,732
  • 8
  • 32
  • 53
8
votes
1 answer

How to get fully expanded variables out of configure?

I created a configure.ac file like this: AC_INIT() set the purpose of this is to print every available environment variable the configure script creates using set, so I do this: user@host:~$ autoconf user@host:~$ ./configure which prints a bunch…
John Doe
  • 2,746
  • 2
  • 35
  • 50
8
votes
5 answers

How to point autoconf/automake to non-standard packages

I'm trying to build ZooKeeper on a RedHat Linux box. (Exactly what ZooKeeper is is probably not important :-) When I follow the package instructions, I get: $ autoreconf -if aclocal:configure.ac:33: warning: macro `AM_PATH_CPPUNIT' not found in…
Leonard
  • 13,269
  • 9
  • 45
  • 72
8
votes
1 answer

Passing environment variables to autoconf's `./configure`

What are the differences between FOO=bar ./configure and ./configure FOO=bar, where ./configure is a script generate by autoconf from a configure.am? I know that the former sets the environment variable FOO to bar before running the script…
Jason Gross
  • 5,928
  • 1
  • 26
  • 53
8
votes
2 answers

Autotools library and object file output control

My goal is to have all object files built in a .objs directory instead of the root of the Makefile, and to have the binaries (and libraries) copied into the project's bin/ directory. But I have been unable to find any resources to explain how to do…
John Bellone
  • 1,351
  • 1
  • 16
  • 29
7
votes
2 answers

Tell a configure script to use a relative path for --datarootdir

I have used GNU autoconf to generate a configure script for a program of mine, which I am now trying to cross-compile for Windows. Under Linux, to change the location of the data files I supply --datarootdir=/blah which works fine. Under Windows…
Malvineous
  • 25,144
  • 16
  • 116
  • 151
7
votes
2 answers

How do I combine AC_SUBST and AC_DEFINE?

I've a configure.ac file containing lines like: AC_DEFINE(CONF_XDISP, ":8", "X screen number") These constants are used in the C source for setting compile defaults. I also have a configuration file conf/bumblebee.conf in which these defaults need…
Lekensteyn
  • 64,486
  • 22
  • 159
  • 192
7
votes
2 answers

Install binaries into /bin, /sbin, /usr/bin and /usr/sbin, interactions with --prefix and DESTDIR

Most packages using Autotools are user-level utilities or at least high-enough level to be completely under /usr, or low enough to be entirely below /usr. I'm writing a package that would need to install some files into /bin, some into /sbin,…
Paweł Hajdan
  • 18,074
  • 9
  • 49
  • 65
7
votes
3 answers

autoconf error on ubuntu 11.04

i've been googling and installing libraries for a while, but I couldn't quite handle this problem with autoconf. i have downloaded a program that i want to compile, made a few changes, and need to run autogen.sh and ./configure and make install…
fizboz
  • 127
  • 2
  • 7