autotools

autotools: Enable compiler warnings

Hi, for an autotools-based C project, I'd like to get some more warnings from the compiler (e.g. at least -Wall in CFLAGS). What is the prefered way to enable compiler flags without breaking anything? Is there a m4 macro that tests if a given compiler flag is understood by the compiler? With such a macro I could do TEST_AND_USE(-Wall -...

Should autogen.sh be included in a tarball?

I have seen most tarballs does not include an autogen.sh file, but I have seen it in some tarballs. What is the rationale for including or not including autogen.sh in a tarball? ...

Compiling on Windows and Mac with Autotool

I have a problem trying to use autotools for a simple contrived project, the task is simple, use Objective-C on Mac OSX, and C++ on Windows (mingw) - with some C glue in the middle. The project is structured like so (minus all the automatically generated files): ./aclocal.m4 ./configure ./configure.ac ./Makefile.am ...

How to write configure.ac and Makefile.am for freeglut?

I want to use freeglut for my project. In my configure.ac it looks like this, it worked like this for SDL so I just replaced some potions and hoped it works for freeglut as well but it does not. So what am I doing wrong? # Check for freeglut PKG_CHECK_MODULES([FREEGLUT], [freeglut >= 3.0]) AC_SUBST(FREEGLUT_CFLAGS) AC_SUBST(FREEGLUT_LI...

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

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

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

undefined reference when linking against libresolv

Hi, I have a project that is a library that links against libresolv, It works fine on recent distros: Ubuntu 10.x Fedora 13, Mandriva 2010.1 but on Centos 5.x I get the following errors glibc installed is: glibc-2.5-18.el5_1.1 g++ -DHAVE_CONFIG_H -I. -I./include -I/usr/include/postgresql -O3 -ansi -Wall -Wno-deprecated -D_FORTIF...

Error with aclocal

I have an error while trying to run aclocal although i have the Autoconf v 2.67 installed configure.ac:6: error: Autoconf version 2.62 or higher is required /usr/share/aclocal-1.11/init.m4:26: AM_INIT_AUTOMAKE is expanded from... configure.ac:6: the top level autom4te: /usr/bin/m4 failed with exit status: 63 aclocal: autom4te...

Wrong value of variable LIBS generated by a macro

Hi, I've autoconfiscated a project that link against libresolv and libtpthread, and optionally against ssl, mysqlclient and pq. I am working on Fedora 13 (i686). I've found a macro AX_EXT_HAVE_LIB (http://www.gnu.org/software/autoconf-archive/ax_ext_have_lib.html) that "is identical to AC_SEARCH_LIBS with the exception that will add -L...