+2001-05-29 Sebastian Wilhelmi <wilhelmi@ira.uka.de>
+
+ * configure.in: Don't bail out, if no C++ compiler is
+ found. Define G_HAVE_ISO_VARARGS only if appropriate.
+
+ * gmessages.h: Thus we can revert the previous patch.
+
2001-05-29 James Henstridge <james@daa.com.au>
* gmessages.h: "#ifdef G_HAVE_ISO_VARARGS" will always succeed
+2001-05-29 Sebastian Wilhelmi <wilhelmi@ira.uka.de>
+
+ * configure.in: Don't bail out, if no C++ compiler is
+ found. Define G_HAVE_ISO_VARARGS only if appropriate.
+
+ * gmessages.h: Thus we can revert the previous patch.
+
2001-05-29 James Henstridge <james@daa.com.au>
* gmessages.h: "#ifdef G_HAVE_ISO_VARARGS" will always succeed
+2001-05-29 Sebastian Wilhelmi <wilhelmi@ira.uka.de>
+
+ * configure.in: Don't bail out, if no C++ compiler is
+ found. Define G_HAVE_ISO_VARARGS only if appropriate.
+
+ * gmessages.h: Thus we can revert the previous patch.
+
2001-05-29 James Henstridge <james@daa.com.au>
* gmessages.h: "#ifdef G_HAVE_ISO_VARARGS" will always succeed
+2001-05-29 Sebastian Wilhelmi <wilhelmi@ira.uka.de>
+
+ * configure.in: Don't bail out, if no C++ compiler is
+ found. Define G_HAVE_ISO_VARARGS only if appropriate.
+
+ * gmessages.h: Thus we can revert the previous patch.
+
2001-05-29 James Henstridge <james@daa.com.au>
* gmessages.h: "#ifdef G_HAVE_ISO_VARARGS" will always succeed
+2001-05-29 Sebastian Wilhelmi <wilhelmi@ira.uka.de>
+
+ * configure.in: Don't bail out, if no C++ compiler is
+ found. Define G_HAVE_ISO_VARARGS only if appropriate.
+
+ * gmessages.h: Thus we can revert the previous patch.
+
2001-05-29 James Henstridge <james@daa.com.au>
* gmessages.h: "#ifdef G_HAVE_ISO_VARARGS" will always succeed
+2001-05-29 Sebastian Wilhelmi <wilhelmi@ira.uka.de>
+
+ * configure.in: Don't bail out, if no C++ compiler is
+ found. Define G_HAVE_ISO_VARARGS only if appropriate.
+
+ * gmessages.h: Thus we can revert the previous patch.
+
2001-05-29 James Henstridge <james@daa.com.au>
* gmessages.h: "#ifdef G_HAVE_ISO_VARARGS" will always succeed
+2001-05-29 Sebastian Wilhelmi <wilhelmi@ira.uka.de>
+
+ * configure.in: Don't bail out, if no C++ compiler is
+ found. Define G_HAVE_ISO_VARARGS only if appropriate.
+
+ * gmessages.h: Thus we can revert the previous patch.
+
2001-05-29 James Henstridge <james@daa.com.au>
* gmessages.h: "#ifdef G_HAVE_ISO_VARARGS" will always succeed
+2001-05-29 Sebastian Wilhelmi <wilhelmi@ira.uka.de>
+
+ * configure.in: Don't bail out, if no C++ compiler is
+ found. Define G_HAVE_ISO_VARARGS only if appropriate.
+
+ * gmessages.h: Thus we can revert the previous patch.
+
2001-05-29 James Henstridge <james@daa.com.au>
* gmessages.h: "#ifdef G_HAVE_ISO_VARARGS" will always succeed
dnl Checks for programs.
AC_PROG_CC
-AC_PROG_CXX
+
+dnl Check for a working C++ compiler, but do not bail out, if none is found.
+AC_CHECK_PROGS(CXX, $CCC c++ g++ gcc CC cxx cc++ cl, gcc)
+AC_LANG_SAVE
+AC_LANG_CPLUSPLUS
+AC_TRY_COMPILE(,[class a { int b; } c;], ,CXX=)
+AM_CONDITIONAL(HAVE_CXX, test "$CXX" != "")
+AC_LANG_RESTORE
AM_PROG_CC_STDC
AC_PROG_INSTALL
AC_MSG_RESULT($g_have_iso_c_varargs)
AC_MSG_CHECKING(for ISO C99 varargs macros in C++)
-if test $CXX = gcc ; then
+if test "$CXX" = ""; then
dnl No C++ compiler
g_have_iso_cxx_varargs=no
else
fi
cat >>$outfile <<_______EOF
-#define G_HAVE_ISO_VARARGS (defined(__cplusplus) ? defined(G_HAVE_ISO_CXX_VARARGS) : defined(G_HAVE_ISO_C_VARARGS))
+#if (defined(__cplusplus) ? defined(G_HAVE_ISO_CXX_VARARGS) : defined(G_HAVE_ISO_C_VARARGS))
+# define G_HAVE_ISO_VARARGS 1
+#endif
_______EOF
if test x$g_have_gnuc_varargs = xyes ; then
#ifndef G_LOG_DOMAIN
#define G_LOG_DOMAIN ((gchar*) 0)
#endif /* G_LOG_DOMAIN */
-#if G_HAVE_ISO_VARARGS
+#ifdef G_HAVE_ISO_VARARGS
#define g_error(...) g_log (G_LOG_DOMAIN, \
G_LOG_LEVEL_ERROR, \
__VA_ARGS__)
#ifndef G_LOG_DOMAIN
#define G_LOG_DOMAIN ((gchar*) 0)
#endif /* G_LOG_DOMAIN */
-#if G_HAVE_ISO_VARARGS
+#ifdef G_HAVE_ISO_VARARGS
#define g_error(...) g_log (G_LOG_DOMAIN, \
G_LOG_LEVEL_ERROR, \
__VA_ARGS__)