aboutsummaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
Diffstat (limited to 'tests')
-rw-r--r--tests/libtest/Makefile.am33
-rw-r--r--tests/libtest/sethostname.h14
-rw-r--r--tests/unit/Makefile.am9
3 files changed, 28 insertions, 28 deletions
diff --git a/tests/libtest/Makefile.am b/tests/libtest/Makefile.am
index 256fcec1d..80707b165 100644
--- a/tests/libtest/Makefile.am
+++ b/tests/libtest/Makefile.am
@@ -5,7 +5,7 @@
# | (__| |_| | _ <| |___
# \___|\___/|_| \_\_____|
#
-# Copyright (C) 1998 - 2012, Daniel Stenberg, <daniel@haxx.se>, et al.
+# Copyright (C) 1998 - 2013, Daniel Stenberg, <daniel@haxx.se>, et al.
#
# This software is licensed as described in the file COPYING, which
# you should have received as part of this distribution. The terms
@@ -70,11 +70,6 @@ endif
LDADD = $(SUPPORTFILES_LIBS)
DEPENDENCIES = $(top_builddir)/lib/libcurl.la
-# Mostly for Windows build targets, when using static libcurl
-if USE_CPPFLAG_CURL_STATICLIB
-AM_CPPFLAGS += -DCURL_STATICLIB
-endif
-
# Makefile.inc provides the source defines (TESTUTIL, SUPPORTFILES,
# noinst_PROGRAMS, lib*_SOURCES, and lib*_CFLAGS)
include Makefile.inc
@@ -88,25 +83,35 @@ else
noinst_LTLIBRARIES =
endif
+if USE_CPPFLAG_CURL_STATICLIB
+AM_CPPFLAGS += -DCURL_STATICLIB
+endif
+
AM_LDFLAGS =
+AM_CFLAGS =
+libhostname_la_CPPFLAGS_EXTRA =
libhostname_la_LDFLAGS_EXTRA = -module -avoid-version -rpath /nowhere
+libhostname_la_CFLAGS_EXTRA =
if CURL_LT_SHLIB_USE_NO_UNDEFINED
libhostname_la_LDFLAGS_EXTRA += -no-undefined
endif
+if CURL_LT_SHLIB_USE_MIMPURE_TEXT
+libhostname_la_LDFLAGS_EXTRA += -mimpure-text
+endif
+
+if DOING_CURL_SYMBOL_HIDING
+libhostname_la_CPPFLAGS_EXTRA += -DCURL_HIDDEN_SYMBOLS
+libhostname_la_CFLAGS_EXTRA += $(CFLAG_CURL_SYMBOL_HIDING)
+endif
+
+libhostname_la_CPPFLAGS = $(AM_CPPFLAGS) $(libhostname_la_CPPFLAGS_EXTRA)
libhostname_la_LDFLAGS = $(AM_LDFLAGS) $(libhostname_la_LDFLAGS_EXTRA)
+libhostname_la_CFLAGS = $(AM_CFLAGS) $(libhostname_la_CFLAGS_EXTRA)
libhostname_la_SOURCES = sethostname.c sethostname.h
libhostname_la_LIBADD =
libhostname_la_DEPENDENCIES =
-
-if DOING_CURL_SYMBOL_HIDING
-libhostname_la_CPPFLAGS = $(AM_CPPFLAGS) -DCURL_HIDDEN_SYMBOLS
-libhostname_la_CFLAGS = $(AM_CFLAGS) $(CFLAG_CURL_SYMBOL_HIDING)
-else
-libhostname_la_CPPFLAGS = $(AM_CPPFLAGS)
-libhostname_la_CFLAGS = $(AM_CFLAGS)
-endif
diff --git a/tests/libtest/sethostname.h b/tests/libtest/sethostname.h
index e2633dd7f..192f037ab 100644
--- a/tests/libtest/sethostname.h
+++ b/tests/libtest/sethostname.h
@@ -5,7 +5,7 @@
* | (__| |_| | _ <| |___
* \___|\___/|_| \_\_____|
*
- * Copyright (C) 1998 - 2011, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * Copyright (C) 1998 - 2013, Daniel Stenberg, <daniel@haxx.se>, et al.
*
* This software is licensed as described in the file COPYING, which
* you should have received as part of this distribution. The terms
@@ -20,18 +20,18 @@
*
***************************************************************************/
-#if (defined(WIN32) || defined(__SYMBIAN32__)) && !defined(CURL_STATICLIB)
+#ifdef CURL_STATICLIB
+# define LIBHOSTNAME_EXTERN
+#elif defined(WIN32) || defined(__SYMBIAN32__)
# if defined(BUILDING_LIBCURL)
# define LIBHOSTNAME_EXTERN __declspec(dllexport)
# else
# define LIBHOSTNAME_EXTERN __declspec(dllimport)
# endif
+#elif defined(BUILDING_LIBCURL) && defined(CURL_HIDDEN_SYMBOLS)
+# define LIBHOSTNAME_EXTERN CURL_EXTERN_SYMBOL
#else
-# ifdef CURL_HIDDEN_SYMBOLS
-# define LIBHOSTNAME_EXTERN CURL_EXTERN_SYMBOL
-# else
-# define LIBHOSTNAME_EXTERN
-# endif
+# define LIBHOSTNAME_EXTERN
#endif
#ifdef USE_WINSOCK
diff --git a/tests/unit/Makefile.am b/tests/unit/Makefile.am
index 12d5fe314..666fc00ea 100644
--- a/tests/unit/Makefile.am
+++ b/tests/unit/Makefile.am
@@ -5,7 +5,7 @@
# | (__| |_| | _ <| |___
# \___|\___/|_| \_\_____|
#
-# Copyright (C) 1998 - 2012, Daniel Stenberg, <daniel@haxx.se>, et al.
+# Copyright (C) 1998 - 2013, Daniel Stenberg, <daniel@haxx.se>, et al.
#
# This software is licensed as described in the file COPYING, which
# you should have received as part of this distribution. The terms
@@ -59,12 +59,7 @@ LIBS = $(BLANK_AT_MAKETIME)
LDADD = $(top_builddir)/lib/libcurlu.la @LDFLAGS@ @LIBCURL_LIBS@
DEPENDENCIES = $(top_builddir)/lib/libcurlu.la
-AM_CPPFLAGS += -DUNITTESTS
-
-# Mostly for Windows build targets, when using static libcurl
-if USE_CPPFLAG_CURL_STATICLIB
-AM_CPPFLAGS += -DCURL_STATICLIB
-endif
+AM_CPPFLAGS += -DCURL_STATICLIB -DUNITTESTS
# Makefile.inc provides neat definitions
include Makefile.inc