Don't bail out, if no C++ compiler is found. Define G_HAVE_ISO_VARARGS
authorSebastian Wilhelmi <wilhelmi@ira.uka.de>
Tue, 29 May 2001 13:47:05 +0000 (13:47 +0000)
committerSebastian Wilhelmi <wilhelmi@src.gnome.org>
Tue, 29 May 2001 13:47:05 +0000 (13:47 +0000)
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.

ChangeLog
ChangeLog.pre-2-0
ChangeLog.pre-2-10
ChangeLog.pre-2-12
ChangeLog.pre-2-2
ChangeLog.pre-2-4
ChangeLog.pre-2-6
ChangeLog.pre-2-8
configure.in
glib/gmessages.h
gmessages.h

index 7176010..d6cbed9 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
+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
index 7176010..d6cbed9 100644 (file)
@@ -1,3 +1,10 @@
+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
index 7176010..d6cbed9 100644 (file)
@@ -1,3 +1,10 @@
+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
index 7176010..d6cbed9 100644 (file)
@@ -1,3 +1,10 @@
+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
index 7176010..d6cbed9 100644 (file)
@@ -1,3 +1,10 @@
+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
index 7176010..d6cbed9 100644 (file)
@@ -1,3 +1,10 @@
+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
index 7176010..d6cbed9 100644 (file)
@@ -1,3 +1,10 @@
+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
index 7176010..d6cbed9 100644 (file)
@@ -1,3 +1,10 @@
+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
index 2de7bec..741fa37 100644 (file)
@@ -136,7 +136,14 @@ fi
 
 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
@@ -387,7 +394,7 @@ call_a(2,3);
 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
@@ -1674,7 +1681,9 @@ _______EOF
        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
index 26ee03c..817957d 100644 (file)
@@ -97,7 +97,7 @@ GLogLevelFlags  g_log_set_always_fatal  (GLogLevelFlags  fatal_mask);
 #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__)
index 26ee03c..817957d 100644 (file)
@@ -97,7 +97,7 @@ GLogLevelFlags  g_log_set_always_fatal  (GLogLevelFlags  fatal_mask);
 #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__)