Code

ltdl: only compile included libltdl when needed
authorRuben Kerkhof <ruben@rubenkerkhof.com>
Sun, 9 Aug 2015 17:46:08 +0000 (19:46 +0200)
committerMarc Fournier <marc.fournier@camptocamp.com>
Thu, 13 Aug 2015 21:42:13 +0000 (23:42 +0200)
If configure finds an external libltdl, it's going to
use it, so there's no use in compiling the shipped libltdl.

Makefile.am
configure.ac

index 35f24cb1a8b5258e1f7d926bf25d0643cf5ba56a..b79ea1cabfbdc562cfcd46983771b1351d6a5d23 100644 (file)
@@ -1,6 +1,12 @@
 ACLOCAL_AMFLAGS = -I libltdl/m4
 
-SUBDIRS = libltdl src bindings .
+SUBDIRS =
+
+if BUILD_INCLUDED_LTDL
+SUBDIRS += libltdl
+endif
+
+SUBDIRS += src bindings .
 
 AM_CPPFLAGS = $(LTDLINCL)
 
index ded1800b681d9112e75157b3371a05e9d42c851b..ce23363a8480dba617f137f01086a54f7897f497 100644 (file)
@@ -24,6 +24,8 @@ m4_ifdef([LT_PACKAGE_VERSION],
        ]
 )
 
+AM_CONDITIONAL([BUILD_INCLUDED_LTDL], [test "x$LTDLDEPS" != "x"])
+
 AM_INIT_AUTOMAKE([tar-pax dist-bzip2 foreign])
 m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])])
 AC_LANG(C)