Subject: Remove dependency on C++ compiler

Remove dependency on C++ compiler

From: Bram Matthys (Syzop) <syzop_at_vulnscan.org>
Date: 2006-05-06

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Hi,

This patch gets rid of a dependency on the C++ compiler.
Without it, some users of us were experiencing this error:

checking how to run the C++ preprocessor... /lib/cpp
configure: error: C++ preprocessor "/lib/cpp" fails sanity check

This dependency is caused by some libtool fun. We had the same problem in
UnrealIRCd a year or so ago with another library (TRE), this reuses the same fix.

Well, it works for us... you decide what to do with it ;p

        Bram (Syzop).

- --
Bram Matthys
Software developer/IT consultant syzop@vulnscan.org
PGP key: www.vulnscan.org/pubkey.asc
PGP fp: 8DD4 437E 9BA8 09AA 0A8D 1811 E1C3 D65F E6ED 2AA2
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.2.2 (MingW32)

iD8DBQFEXLc74cPWX+btKqIRAowKAKCwbwwWpYX7ncdglb6wDBgjmtaSHgCg2Pra
SX0J36Opsvp7TY1IQZ2qvUg=
=zkOI
-----END PGP SIGNATURE-----

Index: acinclude.m4
===================================================================
RCS file: /cvsroot/curl/curl/ares/acinclude.m4,v
retrieving revision 1.29
diff -u -r1.29 acinclude.m4
--- acinclude.m4 9 Jan 2006 08:31:48 -0000 1.29
+++ acinclude.m4 6 May 2006 14:18:29 -0000
@@ -826,3 +826,58 @@
 fi
 ])
 
+# backported from libtool 1.6 by Paolo Bonzini
+# When AC_LIBTOOL_TAGS is used, I redefine _LT_AC_TAGCONFIG
+# to be more similar to the libtool 1.6 implementation, which
+# uses an m4 loop and m4 case instead of a shell loop. This
+# way the CXX/GCJ/F77/RC tests are not always expanded.
+
+# AC_LIBTOOL_TAGS
+# ---------------
+# tags to enable
+AC_DEFUN([AC_LIBTOOL_TAGS],
+[m4_define([_LT_TAGS],[$1])
+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
+
+ AC_FOREACH([_LT_TAG], _LT_TAGS,
+ [m4_case(_LT_TAG,
+ [CXX], [
+ if test -n "$CXX" && test "X$CXX" != "Xno"; then
+ AC_LIBTOOL_LANG_CXX_CONFIG
+ available_tags="$available_tags _LT_TAG"
+ fi],
+ [F77], [
+ if test -n "$F77" && test "X$F77" != "Xno"; then
+ AC_LIBTOOL_LANG_F77_CONFIG
+ available_tags="$available_tags _LT_TAG"
+ fi],
+ [GCJ], [
+ if test -n "$GCJ" && test "X$GCJ" != "Xno"; then
+ AC_LIBTOOL_LANG_GCJ_CONFIG
+ available_tags="$available_tags _LT_TAG"
+ fi],
+ [RC], [
+ if test -n "$RC" && test "X$RC" != "Xno"; then
+ AC_LIBTOOL_LANG_RC_CONFIG
+ available_tags="$available_tags _LT_TAG"
+ fi],
+ [m4_errprintn(m4_location[: error: invalid tag name: ]"_LT_TAG")
+ m4_exit(1)])
+ ])
+ fi
+
+])dnl _LT_AC_TAG_CONFIG
+])
Index: configure.ac
===================================================================
RCS file: /cvsroot/curl/curl/ares/configure.ac,v
retrieving revision 1.43
diff -u -r1.43 configure.ac
--- configure.ac 3 May 2006 22:39:49 -0000 1.43
+++ configure.ac 6 May 2006 14:18:30 -0000
@@ -66,6 +66,7 @@
 )
 
 dnl libtool setup
+AC_LIBTOOL_TAGS([])
 AC_PROG_LIBTOOL
 
 dnl Checks for header files.
Received on Sat May 6 16:48:38 2006