aboutsummaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorYang Tse <yangsita@gmail.com>2010-08-06 18:40:13 +0200
committerYang Tse <yangsita@gmail.com>2010-08-06 18:40:13 +0200
commit59bad26bb27ba82c78f5e40ea19209fe2bb9cb3e (patch)
treeb5ef83c0e9fd448706538ad53e2f65c1c2af88fc /tests
parentf91d5786740ea1f84deede06466d34d23cb0677f (diff)
build: ensure that libhostname doesn't get installed
Diffstat (limited to 'tests')
-rw-r--r--tests/libtest/Makefile.am30
1 files changed, 19 insertions, 11 deletions
diff --git a/tests/libtest/Makefile.am b/tests/libtest/Makefile.am
index 2a0e3eaa4..e6a580054 100644
--- a/tests/libtest/Makefile.am
+++ b/tests/libtest/Makefile.am
@@ -53,19 +53,27 @@ endif
EXTRA_DIST = test75.pl test307.pl test610.pl test613.pl test1013.pl \
test1022.pl Makefile.inc
-if STATICLIB
-# this means no shared option is enabled so we can disable the LD_PRELOAD
-# attempt
-libhostname_la_CFLAGS = -DDISABLE_PRELOAD
-endif
-
-# we force our own host name, in order to make some tests machine independent
-lib_LTLIBRARIES = libhostname.la
-libhostname_la_SOURCES = sethostname.c
-
# Dependencies (may need to be overriden)
LDADD = $(top_builddir)/lib/libcurl.la
DEPENDENCIES = $(top_builddir)/lib/libcurl.la
-# Makefile.inc provides the source defines (TESTUTIL, SUPPORTFILES, noinst_PROGRAMS, lib*_SOURCES, and lib*_CFLAGS)
+# Makefile.inc provides the source defines (TESTUTIL, SUPPORTFILES,
+# noinst_PROGRAMS, lib*_SOURCES, and lib*_CFLAGS)
include Makefile.inc
+
+# Preloading of libhostname allows host name overriding,
+# this is used to make some tests machine independent.
+
+noinst_LTLIBRARIES = libhostname.la
+
+if NO_UNDEFINED
+# The -no-undefined flag is crucial to build fine on some platforms
+UNDEF = -no-undefined
+endif
+
+libhostname_la_SOURCES = sethostname.c
+
+libhostname_la_LIBADD =
+libhostname_la_DEPENDENCIES =
+libhostname_la_LDFLAGS = -module -avoid-version $(UNDEF) -rpath /nowhere
+