summaryrefslogtreecommitdiff
path: root/acinclude.m4
diff options
context:
space:
mode:
authorDaniel Stenberg <daniel@haxx.se>2006-05-10 08:03:54 +0000
committerDaniel Stenberg <daniel@haxx.se>2006-05-10 08:03:54 +0000
commite75c876ac50b7e38e7ca0897e79a9f5f02d319cd (patch)
tree99fcedc2a841dc72db2ed0536b7b0636fd353559 /acinclude.m4
parentc8878fb5848e1f2e2355ca4bd04defd7094f756d (diff)
downloadc-ares-e75c876ac50b7e38e7ca0897e79a9f5f02d319cd.tar.gz
c-ares-e75c876ac50b7e38e7ca0897e79a9f5f02d319cd.tar.bz2
c-ares-e75c876ac50b7e38e7ca0897e79a9f5f02d319cd.zip
Bram Matthys brought my attention to a libtool peculiarity where detecting
things such as C++ compiler actually is a bad thing and since we don't need that detection I added a work-around, much inspired by a previous patch by Paolo Bonzini. This also shortens the configure script quite a lot.
Diffstat (limited to 'acinclude.m4')
-rw-r--r--acinclude.m436
1 files changed, 36 insertions, 0 deletions
diff --git a/acinclude.m4 b/acinclude.m4
index 64804dc..9a5c7e7 100644
--- a/acinclude.m4
+++ b/acinclude.m4
@@ -826,3 +826,39 @@ else
fi
])
+# Prevent libtool for checking how to run C++ compiler and check for other
+# tools we don't want to use. We do this by m4-defining the _LT_AC_TAGCONFIG
+# variable to the code to run, as by default it uses a much more complicated
+# approach. The code below that is actually added seems to be used for cases
+# where configure has trouble figuring out what C compiler to use but where
+# the installed libtool has an idea.
+#
+# This function is a re-implemented version of the Paolo Bonzini fix posted to
+# the c-ares mailing list by Bram Matthys on May 6 2006. My version removes
+# redundant code but also adds the LTCFLAGS check that wasn't in that patch.
+#
+# Some code in this function was extracted from the generated configure script.
+#
+# CARES_CLEAR_LIBTOOL_TAGS
+AC_DEFUN([CARES_CLEAR_LIBTOOL_TAGS],
+ [m4_define([_LT_AC_TAGCONFIG], [
+ if test -f "$ltmain"; then
+ if test ! -f "${ofile}"; then
+ AC_MSG_WARN([output file `$ofile' does not exist])
+ fi
+
+ if test -z "$LTCC"; then
+ eval "`$SHELL ${ofile} --config | grep '^LTCC='`"
+ if test -z "$LTCC"; then
+ AC_MSG_WARN([output file `$ofile' does not look like a libtool
+script])
+ else
+ AC_MSG_WARN([using `LTCC=$LTCC', extracted from `$ofile'])
+ fi
+ fi
+ if test -z "$LTCFLAGS"; then
+ eval "`$SHELL ${ofile} --config | grep '^LTCFLAGS='`"
+ fi
+ fi
+ ])]
+)