automake

How to avoid redefining VERSION, PACKAGE, etc.

I haven't seen any questions relating to GNU autoconf/automake builds, but I'm hoping at least some of you out there are familiar with it. Here goes: I have a project (I'll call it myproject) that includes another project (vendor). The vendor project is a standalone project maintained by someone else. Including a project like this is...

JNI and Java: ant calling make or make calling ant?

I'm just about to make my first trip into the world of JNI (Java Native Interface) to provide file system change notifications from platform specific C/C++ code to Java. That is unless someone suggest some brilliant library for doing this that I've missed. Being new to JNI I've managed to find much documentation on the interface side of...

Where to put helper-scripts with GNU autoconf/automake?

I'm working on a project that will be distributed with GNU autoconf/automake, and I have a set of bash scripts which call awk scripts. I would like the bash scripts to end up in the $PATH, but not the awk scripts. How should I insert these into the project? Should they be put in with other binaries? Also, is there a way to determine ...

How does one add a custom build step to an automake-based project in KDevelop?

I recently started work on a personal coding project using C++ and KDevelop. Although I started out by just hacking around, I figure it'll be better in the long run if I set up a proper unit test suite before going too much further. I've created a seperate test-runner executable as a sub project, and the tests I've added to it appear t...

Setting per-file flags with automake

Is there a way set flags on a per-file basis with automake? In particular, if I have a c++ project and want to compile with -WAll all the files except one for which I want to disable a particular warning, what could I do? I tried something like: CXXFLAGS = -WAll ... bin_PROGRAMS = test test_SOURCES = main.cpp utility.cpp utility_o_CXXF...

Automake : what are the valid values for *_la_LDFLAGS in Makefile.am?

I am wondering what are the possible value for *_la_LDFLAGS in Makefile.am ? If I ask this question, it is because I would like the following : Actual shared library : libA.so (or with the version number I don't care) Symbolic links : libA-X.Y.Z.so, libA-X.so, libA.so soname : libA-X.so However here is what I ...

Autotools : how to set global compilation flag

I have a project with several sources directories : src/A /B /C In each, the Makefile.am contains AM_CXXFLAGS = -fPIC -Wall -Wextra How can avoid repeating this in each source folder ? I tried to modifiy src/Makefile.am and the configure.in, but without success. I thought I could use AC_PROG_CXX to set the compilation fla...

Trying to compile slapd on cygwin, what does this automake error mean?

I'm trying to compile a very old verion of slapd (the LDAP server) on cygwin. Previously this ran on a Linux box, but for reasons beyond my control it must be made to work on a Windows server. It has been suggested that we might use cygwin to compile up the source-code. Unfortunately the build fails during "configure" with the error mes...

How to reconfigure a large program for GNU Autotools

I have a fairly large program written in C. It spans several files, and has a bit of retooling in order to attempt to compensate for platform issues. Specifically, I have header files for different OSes, architectures, and compilers that define macros that it uses to handle things. As an example, the -v flag prints version info, includin...

Portable equivalent of GNU make %-style pattern rules

I'm following the directions on the Using Check with the Autotools page in an attempt to build in support for unit test in a (currently) small C project. Although I am using Cgreen instead of Check. I'm having trouble with step 9, which is causing automake to emit a warning about the use of `%'-style pattern rules being a GNU make exten...

How do I check for an unmangled C++ symbol when building a PHP extension?

I have a PHP module written in C++, which relies on a C++ library (Boost Date_Time) being installed. Currently, in my config.m4 file I'm checking for the library as follows: LIBNAME=boost_date_time LIBSYMBOL=_ZN5boost9gregorian9bad_monthD0Ev PHP_CHECK_LIBRARY($LIBNAME,$LIBSYMBOL,, [ AC_MSG_ERROR([lib $LIBNAME not found. T...

Automake and files with the same name

I've a C++ autoconf managed project that I'm adapting to compile on FreeBSD hosts. The original system was Linux so I made one AM_CONDITIONAL to distinguish the host I'm building and separate the code into system specific files. configure.ac AC_CANONICAL_HOST AM_CONDITIONAL([IS_FREEBSD],false) case $host in *free*) ...

Refactoring build system to use Autotools

Over the past couple of days I have been reading into using autotools to build my project instead of the Makefiles I have pieced together over the past couple of months. Unfortunately I have not found an example that gave me enough insight towards how my project structure is currently. I have three libraries that are included in the app...

How do you compile without linking in Automake?

I am new to Automake and I am attempting to compile without linking. My goal is to generate a simple Makefile as shown below using Automake. CFLAG = -Wall build: Thread.o Thread.o: Thread.cc Thread.h g++ $(CFLAG) -c Thread.cc clean: rm -f *.o My attempt so far has brought me to the following Makefile.ac. noinst_PROGRAMS =...

Autoconf compilation of dependency before application

I have been tooling around with autotools for the past couple of days, and finally have made significant progress. One problem I am having is that I have two libraries that need to be compiled before the main application code. I'm not quite sure how to do this. My directory structure is below and a snippet from my configure.ac as well. ...

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 this. How would I go about doing this? Here is my configure.ac and src/Makefile.am - I ha...

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