autotools

autoconf, how to include file from AC_CONFIG_SRCDIR file

hello I would like to be able to merge two files into one during configure run. I already do textural replacement using AC_CONFIG_SRCDIR[file.hpp] macro on some files. is there some directive to include files from file.hpp.in, some sort of @include (another.hpp) @ or something like that? Thanks ...

Using autotools for a LAMP application

I have a LAMP (Linux/Apache/MySQL/Php) application that I should release soon. Even if I've never used it, I'm thinking about using autotools for it, to make the configuration and installation process easier (for the customer and for me, in the future). Have you ever done (or thought) such a thing? Are there any drawbacks? Does it make...

Check result of AX_PYTHON_MODULE in configure.ac

In using the m4_ax_python_module.m4 macro in configure.ac (AX_PYTHON_MODULE), one can know at configure time if a given module is installed. It takes two arguments, the module name, and second argument which if not empty, will lead to an exit, useful when the module is a must-have. In the case where you don't want a fatal exit, how do ...

How do I get rid of LD_LIBRARY_PATH at run-time?

I am building a C++ application that uses Intel's IPP library. This library is installed by default in /opt and requires you to set LD_LIBRARY_PATH both for compiling and for running your software (if you choose the shared library linking, which I did). I already modified my configure.ac/Makefile.am so that I do not need to set that vari...

Conflicting PACKAGE_NAME and other macros when using autotools.

When using autotools (with a config.h file) for both a library, and a software built on that library, the compiler complains about a redefinition of some macros (PACKAGE_NAME, PACKAGE_TARNAME and so on). How can I prevent this? The config.h file is needed in the library to propagate it's setting to the software that use it. Right now ...

Where is documentation about EXTRA_SCRIPTS variable in autotools?

What is EXTRA_SCRIPTS variable for in Makefile.am? Where is it documented? ...

How do you define the options you see in ./configure --help?

I'm currently trying to set up a package to be installed with autotools. In most, if not all, major software packages, configure --help lists a large number of options like ./configure --ENABLE-FLOAT, etc. I was wondering where I can define these options. Thanks, Sam ...

Preview man-page without installing package.

Hi I've checked out some typical open source project which is using auto-tools. I want to hack a bit on this package, but I would also like to change something in the man-page of the package. The man-page source is found project-name/doc/project-name.1. I just made a small change, and now I want to preview that change, without having t...

Automake: How to add a building step?

Hello, Currently, I have a build chain, completly manage by automake, like: .vala > .c > .o > .exe I would like add a new step for preprocess a XML file .ui into a vala source: .ui > .vala > .c > .o > .exe I did this, in makefile.am gtkbuilder2vala_SOURCES = \ abstract-window.ui \ main.vala \ $(NULL) And: XSLTPROC ...

Can AC_CHECK_LIB be used for unconventionally named libraries?

AC_CHECK_LIB accepts as an argument the base name of the shared library that you want to check for. So for a library named "libxyz.so" you would specify the base name of the library "xyz" as an argument to AC_CHECK_LIB. If I have a library named xyz.so (Note: Not libxyz.so), how do I check for the availability/usability of this library w...

How to override environment variables when running configure?

In any major package for Linux, running ./configure --help will output at the end: Some influential environment variables: CC C compiler command CFLAGS C compiler flags LDFLAGS linker flags, e.g. -L<lib dir> if you have libraries in a nonstandard directory <lib dir> CPPFLAGS ...

Autoconf -- including a static library (newbie)

I am trying to migrate my application from manual build to autoconf, which is working very nicely so far. But I have one static library that I can't figure out how to integrate. That library will NOT be located in the usual library locations - the location of the binary (.a file) and header (.h file) will be given as a configure argume...

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 -- because #include is a preprocessor directive, is the preprocessor (CPPFLAGS) the only thing...

Autoconf macros for Apache and conf.d install process?

I have a package that is using the autotools to build and install. Part of the package is a website that can be run on the local machine. So in the package there is a .conf file that is meant to be either copied or linked to the /etc/apache2/conf.d directory. What's the standard way that packages would do this? If possible, I'd like f...

How to print message(s) at the end of configure/make?

Hi, I'm trying to setup a software package with GNU autotools and would like for a message "Build successful!" to be outputted after a user has run make (after configure). How would I implement such a feature? Thanks ...

Autotools automatic invocation of lcov after 'make check'

I have successfully set up an autotools project where the tests compiles with instrumentation so I can get a test coverage report. I can get the report by running lcov in the source dir after a successful 'make check'. I now face the problem that I want to automate this step. I would like to add this to 'make check' or to make it a sep...

How can I compile an autotools project with statically linked dependancies?

There's an open source library I want to use. As I want to spread my software as binary package, I do not want the library to have dependancies on other libraries, so I need to link the dependancies statically. Now as the library is open source and there are no binaries provided, I compile it myself. The library uses autotools, and I di...

How to extract part of project based on GNU Build System?

When I move some subdirectory away from project managed by "./configure" and all that things, it tries to get to some "../../configure.ac" and other things and is not easily buildable. How to extract part of such project and make it independent? ...

How can I escape paths with spaces inside AC_CONFIG_SRCDIR

I need to include some paths in AC_CONFIG_SRCDIR which contain spaces. How should I escape them? For example, if I have "some file.in", how should I declare it in: AC_CONFIG_SRCDIR[some file] ...

Autotools: how to cleanup files created by "./configure" in lighttpd project?

Hi all, I'm starting to try out lighttpd for an embedded linux project. I got the curret source package and and started writing a master makefile ecapsulating all configer, compile, install (for testing) etc stuff. And vice-versa I want to cleanup every step. This cleanup should be 100%, i.e. there should be no generated files anymore a...