Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

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...
commit 0233a881fff97b8cc26c9a4254d1b3b0a61460ef 1 parent 320bf05
Martin Vidner authored July 17, 2008
2  VERSION
... ...
@@ -1 +1 @@
1  
-2.17.1
  1
+2.17.2
23  configure.in.in
@@ -52,6 +52,28 @@ AGENT_LIBADD='dnl
52 52
  $(top_builddir)/liby2/src/liby2.la dnl
53 53
  ${Y2UTIL_LIBS}'
54 54
 
  55
+## <ext/hash_map> produces ugly warnings in gcc 4.3, but its replacement,
  56
+## <unordered_map>, is in C++0x which is not stablilized yet.
  57
+## More importantly, this thing is in a public header so we need to propagate
  58
+## the findings to yast2-core users
  59
+AC_PROG_CXX
  60
+AC_MSG_CHECKING([for version of C++ standard])
  61
+GCCVER=`$CXX -v 2>&1 | tail -n1`
  62
+case "$GCCVER" in
  63
+    "gcc version 4.3*")
  64
+dnl we need a HAVE_* flag for a public header, yuck
  65
+dnl	AC_DEFINE([HAVE_CXX0X], 1, [Define to 1 if the c++ compiler knows <unordered_map> and the like])
  66
+dnl	Y2CORE_CFLAGS="-std=c++0x"
  67
+	Y2CORE_CFLAGS="-std=c++0x -DHAVE_CXX0X"
  68
+	AC_MSG_RESULT([c++0x])
  69
+	;;
  70
+    *)
  71
+	Y2CORE_CFLAGS=""
  72
+	AC_MSG_RESULT([older than c++0x])
  73
+	;;
  74
+esac
  75
+AC_SUBST(Y2CORE_CFLAGS) dnl included in {C,CXX}FLAGS in YAST2-CHECKS-PROGRAM 
  76
+
55 77
 AX_CHECK_DOCBOOK
56 78
 CREATE_PKGCONFIG=true
57 79
 ## some common checks
@@ -60,6 +82,7 @@ CREATE_PKGCONFIG=true
60 82
 @YAST2-CHECKS-TESTSUITE@
61 83
 
62 84
 ## check for blocxx
  85
+dnl FIXME assumes PCRE
63 86
 AC_CHECK_HEADER(blocxx/BLOCXX_config.h, [yast_found_blocxx=yes])
64 87
 if [[ "$yast_found_blocxx" != "yes" ]]; then
65 88
  AC_MSG_ERROR(Headers for blocxx are missing. Please install the package blocxx-devel.)
8  package/yast2-core.changes
... ...
@@ -1,4 +1,12 @@
1 1
 -------------------------------------------------------------------
  2
+Thu Jul 17 14:20:14 CEST 2008 - mvidner@suse.cz
  3
+
  4
+- Check GCC version and use <unordered_map> to get rid of
  5
+  <ext/hash_map> warnings. It needs yast2-devtools-2.17.2 but fails
  6
+  gracefully.
  7
+- 2.17.2
  8
+
  9
+-------------------------------------------------------------------
2 10
 Fri Jun 20 15:29:36 CEST 2008 - aschnell@suse.de
3 11
 
4 12
 - Added list::reduce builtin.
2  yast2-core.pc.in
@@ -18,6 +18,8 @@ mandir=@mandir@
18 18
 yast2dir=@yast2dir@
19 19
 ybindir=@ybindir@
20 20
 
  21
+Cflags: @Y2CORE_CFLAGS@
  22
+
21 23
 Name: @RPMNAME@
22 24
 Version: @VERSION@
23 25
 Description: YaST2 package "@RPMNAME@"

0 notes on commit 0233a88

Please sign in to comment.
Something went wrong with that request. Please try again.