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 35f24cb..b79ea1c 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 ded1800..ce23363 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)