From 2a8e9257dece8803f559ab54f050b356bda86e66 Mon Sep 17 00:00:00 2001 From: Ruben Kerkhof Date: Sun, 9 Aug 2015 19:46:08 +0200 Subject: [PATCH] ltdl: only compile included libltdl when needed If configure finds an external libltdl, it's going to use it, so there's no use in compiling the shipped libltdl. --- Makefile.am | 8 +++++++- configure.ac | 2 ++ 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/Makefile.am b/Makefile.am index 35f24cb1..b79ea1ca 100644 --- a/Makefile.am +++ b/Makefile.am @@ -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) diff --git a/configure.ac b/configure.ac index ded1800b..ce23363a 100644 --- a/configure.ac +++ b/configure.ac @@ -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) -- 2.11.0