]> granicus.if.org Git - curl/commitdiff
build: don't build libhostname unless shared libcurl is built
authorYang Tse <yangsita@gmail.com>
Mon, 9 Aug 2010 07:33:53 +0000 (09:33 +0200)
committerYang Tse <yangsita@gmail.com>
Mon, 9 Aug 2010 07:33:53 +0000 (09:33 +0200)
configure.ac
tests/libtest/Makefile.am

index a43b2863af59d9bd0cd3aaad951a3082a3539715..d876bde32eb5d637b9543a1943dcab6c285fe4ca 100644 (file)
@@ -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
index 0603c03e12aa0dc9acf7733e10ae44af999cb313..2ba7b0a32f2fe1b4bcffbc67c28adbd4531a0652 100644 (file)
@@ -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