From b24e87250241c97c23f7c71c0ab9de74e793b8cc Mon Sep 17 00:00:00 2001 From: Yang Tse Date: Mon, 9 Aug 2010 09:33:53 +0200 Subject: [PATCH] build: don't build libhostname unless shared libcurl is built --- configure.ac | 7 +++++++ tests/libtest/Makefile.am | 4 ++++ 2 files changed, 11 insertions(+) diff --git a/configure.ac b/configure.ac index a43b2863a..d876bde32 100644 --- a/configure.ac +++ b/configure.ac @@ -2461,6 +2461,13 @@ AM_CONDITIONAL(USE_MANUAL, test x"$USE_MANUAL" = x1) CURL_CHECK_LIB_ARES AM_CONDITIONAL(USE_EMBEDDED_ARES, test x$embedded_ares = xyes) +if test "x$enable_shared" = "xyes"; then + build_libhostname=yes +else + build_libhostname=no +fi +AM_CONDITIONAL(BUILD_LIBHOSTNAME, test x$tests_use_libhostname = xyes) + CURL_CHECK_OPTION_THREADED_RESOLVER if test "x$want_thres" = xyes && test "x$want_ares" = xyes; then diff --git a/tests/libtest/Makefile.am b/tests/libtest/Makefile.am index 0603c03e1..2ba7b0a32 100644 --- a/tests/libtest/Makefile.am +++ b/tests/libtest/Makefile.am @@ -64,7 +64,11 @@ include Makefile.inc # Preloading of libhostname allows host name overriding, # this is used to make some tests machine independent. +if BUILD_LIBHOSTNAME noinst_LTLIBRARIES = libhostname.la +else +noinst_LTLIBRARIES = +endif if NO_UNDEFINED # The -no-undefined flag is crucial to build fine on some platforms