pkg-config libdivecomputer / subsurface makefile / confusion

Grischa Toedt toedt at embl.de
Tue Jul 10 13:19:07 PDT 2012


no compile problems with the current tree - thanks!

steps to get it compiled on Mac OS X:

- don't use the "release-0.1" branch of libdivecomputer - switch to "master" if you do so
- apply the following patch to libdivecomputer>configure.ac, to prepare it for automake 1.12:

diff --git a/configure.ac b/configure.ac
index aa676e9..78af57b 100644
--- a/configure.ac
+++ b/configure.ac
@@ -20,6 +20,9 @@
 # Initialize automake.
 AM_INIT_AUTOMAKE([-Wall -Werror foreign])
 
+# Fix for automake >= 1.12
+m4_ifdef([AM_PROG_AR], [AM_PROG_AR])
+
 # Initialize libtool.
 LT_PREREQ([2.2.0])
 LT_INIT([win32-dll])


Grischa


On Jul 10, 2012, at 9:34 PM, Linus Torvalds wrote:

> On Tue, Jul 10, 2012 at 12:00 PM, Jef Driesen <jefdriesen at telenet.be> wrote:
>> 
>> The problem is that the libdivecomputer pkg-config file used to contain:
>> 
>> -I${includedir}/libdivecomputer
>> 
>> and applications can then include the header files like this:
>> 
>> #include <header.h>
>> 
>> But I changed the pkg-config file some time ago to contain only:
>> 
>> -I${includedir}
>> 
>> and applications now have to include the header files like this:
>> 
>> #include <libdivecomputer/header.h>
>> 
>> I did this because I believe the second style is better. It does avoid
>> trouble if an application uses two independent libraries that both have a
>> header file installed with the same header.h name.
> 
> Ok. Using <libdivecomputer/*.h> sounds like a good thing, so I'll just
> fix up subsurface to the new model. It only compiles against recent
> versions of libdivecomputer anyway, so I don't think there's any worry
> about having to try to be backwards compatible.
> 
> Pushed out. It works on Linux. Grischa - can you check whether the
> current -git tree now compiles cleanly on OS X too?
> 
>               Linus



More information about the subsurface mailing list