summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRaja R Harinath <harinath@src.gnome.org>1999-01-20 03:33:28 +0000
committerRaja R Harinath <harinath@src.gnome.org>1999-01-20 03:33:28 +0000
commit55a868c3dea6ee3c73055dcbee1d60bfd07aff62 (patch)
treef59252ae0847a9df4e2e390ad73e8795656f6d60
parentc3b2445b04490755ae0e49b89984064afec66fa8 (diff)
downloadgnome-common-55a868c3dea6ee3c73055dcbee1d60bfd07aff62.tar.gz
Rewrite to be saner. Don't limit yourself to a fixed set of names for the
* gnome-cxx-check.m4 (GNOME_CHECK_CXX): Rewrite to be saner. Don't limit yourself to a fixed set of names for the compiler. svn path=/trunk/; revision=588
-rw-r--r--macros/ChangeLog5
-rw-r--r--macros/gnome-cxx-check.m421
2 files changed, 13 insertions, 13 deletions
diff --git a/macros/ChangeLog b/macros/ChangeLog
index b791f0d..ba84ced 100644
--- a/macros/ChangeLog
+++ b/macros/ChangeLog
@@ -1,3 +1,8 @@
+1999-01-19 Raja R Harinath <harinath@cs.umn.edu>
+
+ * gnome-cxx-check.m4 (GNOME_CHECK_CXX): Rewrite to be saner.
+ Don't limit yourself to a fixed set of names for the compiler.
+
1999-01-05 Miguel de Icaza <miguel@nuclecu.unam.mx>
* need-declaration.m4, gnome-support.m4: Fixed the scandir detection.
diff --git a/macros/gnome-cxx-check.m4 b/macros/gnome-cxx-check.m4
index 8d76eb9..786138c 100644
--- a/macros/gnome-cxx-check.m4
+++ b/macros/gnome-cxx-check.m4
@@ -1,15 +1,10 @@
-AC_DEFUN([GNOME_CHECK_CXX],
+dnl GNOME_CHECK_CXX(not_found_string)
+AC_DEFUN(GNOME_CHECK_CXX,
[
- AC_CHECK_PROG(cxx_found, c++, yes, no)
- AC_CHECK_PROG(cxx_found, g++, yes, no)
- AC_CHECK_PROG(cxx_found, CC, yes, no)
- AC_CHECK_PROG(cxx_found, cxx, yes, no)
- AC_CHECK_PROG(cxx_found, cc++, yes, no)
-
- if test "x$cxx_found" = "xyes"; then
- AC_PROG_CXX
- else
- AC_MSG_WARN(No C++ compiler - gnometris will not be built!)
- fi
- AM_CONDITIONAL(CXX_PRESENT, test "x$cxx_found" = xyes)
+ # see if a C++ compiler exists and works
+ AC_REQUIRE([AC_PROG_CXX])dnl
+ if test "x$ac_cv_prog_cxx_works" = xno; then
+ AC_MSG_WARN(ifelse([$1], , "No C++ compiler", [$1]))
+ fi
+ AM_CONDITIONAL(CXX_PRESENT, test "x$ac_cv_prog_cxx_works" != xno)
])