autoconf

Autoconf Produces configure with Broken Functions (ac_fn_set_status, ac_fn_exit)

I'm trying to set up autoconf for my project. I have everything working "properly" except that the ac_set_<...> functions are not being found in ./configure. They work fine in configure.status if I run it directly. Specifically, I am having trouble with as_fn_set_status and as_fn_exit. If I manually edit the config file and move the ...

Autotools - tar This does not look like a tar archive

After running make distcheck I get the message that I have successfully built the package and is ready for distribution. If I untar the tar.gz with tar -zxvf hello-0.2.tar.gz it successfully extracts all of its contents. However, when I try to extract them in different machines I get: tar: This does not look like a tar archive tar: Skip...

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

Framework for building and managing third-party libraries

I am working on a cross-platform project which uses a large number of third party libraries (currently 22 and counting, and I expect this number to increase significantly). My project is CMake-based, and keeps the ThirdParty/ directory organized like so: ThirdParty/$libname/include/ ThirdParty/$libname/lib/$platform/$buildtype/ My CMak...

.h generated from .h.in?

There are struct definitions in the .h file that my library creates after I build it.. but I cannot find these in the corresponding .h.in. Can somebody tell me how all this works and where it gets the extra info from? To be specific: I am building pth, the userspace threading library. It has pth_p.h.in, which doesn't contain the struct...

pass option containing comma to configure script (Linux)

Hi, I have a configure script where I need to pass an option that contains a comma. Now if it weren't for the comma I could put some "s around to make configure recognize the string as a whole: ./configure --with-arpack="-Wl,-rpath,/my/path -L/my/path -larpack" But the commas are interpreted as option delimiters, so the script only ...

How to full expand variables in autoconf?

In this example: configure.ac: ... AC_CONFIG_FILES([script1]) AC_OUTPUT script1.in: #!/bin/bash ... config=@datadir@/blah This @datadir@ is expanded to ${prefix}/share, is there any way to expand it to /usr/local/share? ...

Shell scripts specified in _SCRIPTS primary isn't shown in dist tarball

I'm using Automake to maintain the package, there are some shell scripts which don't need to compile, so I install them using _SCRIPT primary: Makefile.am: bin_SCRIPTS = script1.sh But the tarball generated with make dist doesn't contain this script1.sh file. Is there something I missed in the Makefile.am? ...

Adding a custom installation directory option to Autoconf-generated configure scripts

configure scripts always include something like the following in the help message: ... By default, `make install' will install all the files in `/usr/local/bin', `/usr/local/lib' etc. You can specify an installation prefix other than `/usr/local' using `--prefix', for instance `--prefix=$HOME'. For better control, use the options bel...

Injecting mercurial changeset as version information in a C executable

I would like the executables for a project I am working on to have the latest mercurial changeset recorded so that when a user complains about buggy behavior, I can track which version they are using. Some of my executables are Python and others are compiled C. Is there a way to automate this, or can you point me to projects that exhibit...

how to create binary and .so using libtool

I have a set of cpp files that I want to compile directly into a binary and also to compile into a shared library. I have bin_PROGRAMS=mybin lib_LTLIBRARIES=libmylib.la COMMON_SOURCES=f1.cpp f2.cpp f3.cpp mybin_SOURCES=main.cpp $(COMMON_SOURCES) libmylib_la_SOURCES=$(COMMON_SOURCES) When I run this the cpp files are compiled twice...

.emacs, automake and cmake.

A long time ago,when I wrote my .emacs setup[1], I used a shell script to compile and join the whole thing. The thing is now very old and "crusty", so I am now rewriting it to replace things such as: (defmacro make-new-comment( mode face strcom color1 color2) (list 'progn `(make-face ',face) `(if (not (assoc ,s...

Autoconf for Visual C++

I want to build XZ Utils with MSVC++, but xz utils uses a Gnu Autoconf Script. Is there a way to import a whole autoconfed project into MSVC++, then build it? If not, is there a way to run the Gnu Autoconf script for MSVC++, then after that, just take all the source files, as well as config.h, then build it? ...

Exploding recursive make with libltdl

In my Makefile.am, I have SUBDIRS = libltdl . This is because I want to be able to use the version of libltdl included with my package (i.e. ./configure --with-included-ltdl). However, I occasionally run into the problem where make invokes itself recursively forever. Unfortunately I'm not sure exactly what conditions cause this to occ...

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

Autoconf not defining a variable properly

I am using GNU autotools for my project. The configure.ac script has the following snippet. AC_ARG_WITH(chkhere, AC_HELP_STRING([--without-chkhere], [do not compile]), [ac_cv_chkhere=$withval], [ac_cv_chkhere=yes]) # Check if chkhere is available if test "x$ac_cv_chkhere" = "xyes" then AC_DEFINE(HAVE_CHECKED) echo "chkhere: enabled...

LT_VERSION for libtool and autoconf not being recognized.

My configure.in file has LT_VERSION="1.1". I am using the latest version of autoconf and libtool. While using autoconf or autoreconf, I am getting the following error message: configure.ac:41: error: possibly undefined macro: LT_VERSION If this token and others are legitimate, please use m4_pattern_allow. See the Autoconf documentat...

automake: modify implicity make rule to include extra flags

How can I add extra flag variables (like CPPFLAGS) that will apply to all makefiles? Currently, we're using CPPFLAGS, but that is supposed to be reserved as a user variable and I would like to reserve it. I'd prefer not to use AM_CPPFLAGS because I would like to reserve that for specific Makefile.amS. What I want is something like GLO...

how to compile MPI and non-MPI version of the same program with automake?

I have a C++ code that can be compiled with MPI support depending on a certain preprocessor flag; missing the appropriate flag, the sources compile to a non-parallel version. I would like to setup the Makefile.am so that it compiles both the MPI-parallel and the sequential version, if an option to ./configure is given. Here's the catch...

update autoconf to at least 2.6

I have autoconf 2.59 on CentOS 5.5 and need to upgrade to autoconf 2.6. What is the best approach for this? I tried yum update autoconf but theres no luck ...