autoconf

How often do I run autoconf?

Hey, In my company I'm currently working on creating a Debian deb package out of a 3rd party library. The library is built using Autotools. I have never worked with Autotools before and I'm having some hard time. Library sources contain configure.in and Makefile.am files and m4/ directory. I am able to build the library using this seque...

Generating a static library and an executable with a single installation (autoconf)

I know how to build a project or how to create a library using autoconf. What I want to achive is to generate a static library and use this library to build a project in a single configure/make/make install run. I want some source files to be put into library and the rest to be compiled using this library. How do I modify makefile.am ...

In very simple gtk2 c app, problem setting up gnu build tools

UPDATE: First problem solved, second one described at the bottom of this post. UPDATE2: Second problem solved as well. I'm trying to learn about setting up GNU build tools (autoconf/automake) for a very simple GTK+2 C application. I've followed this tutorial and this one that deals with sub directories, but I'm running into a problem ...

How do I setup automake and autoconf to conditionally build programs (tests or otherwise)

I currently have 10 tests in my autotoolset project. Any time I make a change to one of my src/ files and recompile, each test is rebuilt and linked. This is starting to have a considerable impact on my development time. What is the best way to conditionally build binary programs, tests or otherwise, with GNU autotoolset? For instance, ...

Where should I look to solve a symbol lookup/undefined symbol with an automake/autoconf project?

In one project, I have two noinst_PROGRAM's defined. One of them works just fine, but the other is giving me the following message: /home/altern8/workspaces/4355/libgdata/test/.libs/lt-gdatacalendar: symbol lookup error: /home/altern8/workspaces/4355/libgdata/test/.libs/lt-gdatacalendar: undefined symbol: _ZN5gdata7service7Se...

Best way to add generated files to distribution?

I have a quite complex (C++) project using autoconf / automake, which includes some "generated" files (foo.yy -> foo.cc). Actual builds are done using a "control script" (Gentoo .ebuild for those familiar with the concept), on various platforms. Now, one of the target platforms does not properly support the foo.yy -> foo.cc step, and ha...

Why would autoconf/automake project link against installed library instead of local development library?

I'm creating a library libgdata that has some tests and non-installed programs. I am running into the problem that once I've installed the library once, the programs seem to be linking to the installed version and not the local version in ../src/libgdata.la any longer. What could cause this? Am I doing something horribly wrong? Here is...

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? ...

Need an autoconf macro that detects if -m64 is a valid compiler option

I have code that I want to compile on all unix systems, but if -m64 i available and it works, I want the configure script to use it. How do I get autoconf to check to see if -m64 works and, if so, use it? ...

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 library aclocal:configure.ac:33: warning: macro `AM_PATH_CPPUNIT' not found in library conf...

libtool deleted by 'make distclean'

I've copied libtool into my program's source tree to distribute it with the program. But when I run 'make distclean' libtool is deleted with the rest of the rest of the generated files. How do I stop that from happening? I tried putting EXTRA_DIST = libtool in Makefile.am but that doesn't work. Here is basically what my configure.ac ...

[autoconf] how get fully expanded variables out of configure?

hi all 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: user@host:~$ autoconf user@host:~$ ./configure which prints a bunch of variables like build= cache_file=/dev/null IFS=' ' LANG=C LANGUAGE=C d...

Autoconf problem: “error: C compiler cannot create executables”

I'm trying to build a program I've written in C using GNU autotools, but I evidently have it set up wrong because when configure runs, it spits out: configure: error: C compiler cannot create executables If I look in config.log, I see: configure:2846: checking for C compiler default output file name configure:2868: gcc conftest.c ...

Tint2 Compilation

I'm on a network where I don't have root access, so everything I install is under a prefix ~/bin (actually referenced by its full path). So I have openbox working fine, which is what I'm using to send this from. Imlib2 I do ./configure --prefix=~/bin; make; make install. Then I run from the tint2 source directory IMLIB2_CFLAGS=-i~/bin/i...

How to get a configure script to look for a library

I'm trying to write a configure.ac file such that the resulting configure script searches for a library directory containing a given static library e.g. libsomething.a. How can I do this? At the moment I have it check just one location with: AC_CHECK_FILE([/usr/local/lib/libsomething.a],[AC_SUBST(libsomething,"-L/usr/local/lib -lsomethi...

How should I run a prebuilt Makefile from a Makefile.am?

How should I run a prebuilt Makefile from a Makefile.am? I am new to automake/autoconf build system. The package I am implementing autotools for has a couple libraries and test executables for each. Some of the libraries are auto-generated ASN1C code that come with prebuilt makefiles. I am not sure of the best way to say inside of the M...

What is the best way to auto detect library dependencies in a C/C++ project?

What is the best way to auto detect library dependencies in a C/C++ project? I have a project where I have all the dependencies on the machine. It builds and runs. Now I want to put together a autotools build system. I am looking for a good way to auto detect all the dependencies needed such as header files used and libraries needed for...

What is the canonical way to make autoconf link in Solaris network libraries?

On Solaris, when you compile a program that uses sockets, you need to link it with -lnsl -lsocket. Many such programs were originally written for Linux (where no extra libraries are needed), and therefore do not check for these libraries in their configure scripts, even though that is a rather simple addition. Something like this (unte...

How should AC_CACHE_CHECK be reset?

How should AC_CACHE_CHECK be reset? In autoconf I am checking for headers. I've added some logic to try a little harder to find header files in std folders that might not be in the default include path. The way I do this is first attempt to find a header file with the built-in AC_CHECK_HEADER. If header is not found, I modify the CPPFLA...

In autotools, what is dnl'ed?

I see alot in autoconf code about stuff being dnl'ed and not dnl'ed. What is dnl'ed? ...