about summary refs log tree commit diff
diff options
context:
space:
mode:
-rw-r--r--configure.ac7
-rw-r--r--externals/Makefile.am4
2 files changed, 9 insertions, 2 deletions
diff --git a/configure.ac b/configure.ac
index 4346dde5bbad..2c4567c8da74 100644
--- a/configure.ac
+++ b/configure.ac
@@ -77,6 +77,13 @@ AC_DISABLE_STATIC
 AC_ENABLE_SHARED
 AC_PROG_LIBTOOL
 
+if test "$enable_shared" = yes; then
+   SUB_CONFIGURE_FLAGS="--enable-shared --disable-static"
+else
+   SUB_CONFIGURE_FLAGS="--enable-static --disable-shared"
+fi
+AC_SUBST(SUB_CONFIGURE_FLAGS)
+
 
 # Use 64-bit file system calls so that we can support files > 2 GiB.
 AC_SYS_LARGEFILE
diff --git a/externals/Makefile.am b/externals/Makefile.am
index b32256917ba2..3fc13314f846 100644
--- a/externals/Makefile.am
+++ b/externals/Makefile.am
@@ -19,7 +19,7 @@ build-aterm:
 else
 build-aterm: $(ATERM)
 	(cd $(ATERM) && \
-	CC="$(CC)" ./configure --prefix=$(pkglibdir)/dummy --libdir=${pkglibdir} && \
+	CC="$(CC)" ./configure --prefix=$(pkglibdir)/dummy --libdir=${pkglibdir} $(SUB_CONFIGURE_FLAGS) && \
 	$(MAKE) && \
 	$(MAKE) check)
 	touch build-aterm
@@ -79,7 +79,7 @@ build-sqlite:
 else
 build-sqlite: $(SQLITE)
 	(cd $(SQLITE) && \
-	CC="$(CC)" ./configure --disable-static --prefix=$(pkglibdir)/dummy --libdir=${pkglibdir} && \
+	CC="$(CC)" ./configure --disable-static --prefix=$(pkglibdir)/dummy --libdir=${pkglibdir} $(SUB_CONFIGURE_FLAGS) && \
 	$(MAKE) )
 	touch build-sqlite