summaryrefslogtreecommitdiff
path: root/Makefile.am
diff options
context:
space:
mode:
authorYang Tse <yangsita@gmail.com>2013-02-19 14:11:26 +0100
committerYang Tse <yangsita@gmail.com>2013-03-08 13:22:33 +0100
commit715b499c79deffd360004165c28dca9c9c34a812 (patch)
tree21ca523b69b34225664a71cf7205a6f33115cc3d /Makefile.am
parentf454e82dc74de1c54b54a227a01a0bcc3edb8014 (diff)
downloadc-ares-715b499c79deffd360004165c28dca9c9c34a812.tar.gz
c-ares-715b499c79deffd360004165c28dca9c9c34a812.tar.bz2
c-ares-715b499c79deffd360004165c28dca9c9c34a812.zip
configure: use XC_LIBTOOL for portability across libtool versions
Diffstat (limited to 'Makefile.am')
-rw-r--r--Makefile.am19
1 files changed, 14 insertions, 5 deletions
diff --git a/Makefile.am b/Makefile.am
index 3b98a29..edb0adb 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -64,7 +64,7 @@ DISTCLEANFILES = ares_build.h
pkgconfigdir = $(libdir)/pkgconfig
pkgconfig_DATA = libcares.pc
-VER=-version-info 2:0:0
+CARES_VERSION_INFO = -version-info 2:0:0
# This flag accepts an argument of the form current[:revision[:age]]. So,
# passing -version-info 3:12:1 sets current to 3, revision to 12, and age to
# 1.
@@ -93,12 +93,21 @@ VER=-version-info 2:0:0
# set age to 0. (c:r:a=0)
#
-if NO_UNDEFINED
-# The -no-undefined flag is crucial for this to build fine on some platforms
-UNDEF = -no-undefined
+libcares_la_LDFLAGS_EXTRA =
+
+if CARES_LT_SHLIB_USE_VERSION_INFO
+libcares_la_LDFLAGS_EXTRA += $(CARES_VERSION_INFO)
+endif
+
+if CARES_LT_SHLIB_USE_NO_UNDEFINED
+libcares_la_LDFLAGS_EXTRA += -no-undefined
+endif
+
+if CARES_LT_SHLIB_USE_MIMPURE_TEXT
+libcares_la_LDFLAGS_EXTRA += -mimpure-text
endif
-libcares_la_LDFLAGS = $(UNDEF) $(VER)
+libcares_la_LDFLAGS = $(AM_LDFLAGS) $(libcares_la_LDFLAGS_EXTRA)
# Add -Werror if defined
CFLAGS += @CARES_CFLAG_EXTRAS@