Permalink
Browse files

Check GCC version and use <unordered_map> to get rid of

<ext/hash_map> warnings. It needs yast2-devtools-2.17.2 but fails
gracefully.

svn path=/trunk/core/; revision=49216
  • Loading branch information...
1 parent 320bf05 commit 0233a881fff97b8cc26c9a4254d1b3b0a61460ef @mvidner mvidner committed Jul 17, 2008
Showing with 34 additions and 1 deletion.
  1. +1 −1 VERSION
  2. +23 −0 configure.in.in
  3. +8 −0 package/yast2-core.changes
  4. +2 −0 yast2-core.pc.in
View
@@ -1 +1 @@
-2.17.1
+2.17.2
View
@@ -52,6 +52,28 @@ AGENT_LIBADD='dnl
$(top_builddir)/liby2/src/liby2.la dnl
${Y2UTIL_LIBS}'
+## <ext/hash_map> produces ugly warnings in gcc 4.3, but its replacement,
+## <unordered_map>, is in C++0x which is not stablilized yet.
+## More importantly, this thing is in a public header so we need to propagate
+## the findings to yast2-core users
+AC_PROG_CXX
+AC_MSG_CHECKING([for version of C++ standard])
+GCCVER=`$CXX -v 2>&1 | tail -n1`
+case "$GCCVER" in
+ "gcc version 4.3*")
+dnl we need a HAVE_* flag for a public header, yuck
+dnl AC_DEFINE([HAVE_CXX0X], 1, [Define to 1 if the c++ compiler knows <unordered_map> and the like])
+dnl Y2CORE_CFLAGS="-std=c++0x"
+ Y2CORE_CFLAGS="-std=c++0x -DHAVE_CXX0X"
+ AC_MSG_RESULT([c++0x])
+ ;;
+ *)
+ Y2CORE_CFLAGS=""
+ AC_MSG_RESULT([older than c++0x])
+ ;;
+esac
+AC_SUBST(Y2CORE_CFLAGS) dnl included in {C,CXX}FLAGS in YAST2-CHECKS-PROGRAM
+
AX_CHECK_DOCBOOK
CREATE_PKGCONFIG=true
## some common checks
@@ -60,6 +82,7 @@ CREATE_PKGCONFIG=true
@YAST2-CHECKS-TESTSUITE@
## check for blocxx
+dnl FIXME assumes PCRE
AC_CHECK_HEADER(blocxx/BLOCXX_config.h, [yast_found_blocxx=yes])
if [[ "$yast_found_blocxx" != "yes" ]]; then
AC_MSG_ERROR(Headers for blocxx are missing. Please install the package blocxx-devel.)
@@ -1,3 +1,11 @@
+-------------------------------------------------------------------
+Thu Jul 17 14:20:14 CEST 2008 - mvidner@suse.cz
+
+- Check GCC version and use <unordered_map> to get rid of
+ <ext/hash_map> warnings. It needs yast2-devtools-2.17.2 but fails
+ gracefully.
+- 2.17.2
+
-------------------------------------------------------------------
Fri Jun 20 15:29:36 CEST 2008 - aschnell@suse.de
View
@@ -18,6 +18,8 @@ mandir=@mandir@
yast2dir=@yast2dir@
ybindir=@ybindir@
+Cflags: @Y2CORE_CFLAGS@
+
Name: @RPMNAME@
Version: @VERSION@
Description: YaST2 package "@RPMNAME@"

0 comments on commit 0233a88

Please sign in to comment.