Skip to content

Commit

Permalink
Check GCC version and use <unordered_map> to get rid of
Browse files Browse the repository at this point in the history
<ext/hash_map> warnings. It needs yast2-devtools-2.17.2 but fails
gracefully.

svn path=/trunk/core/; revision=49216
  • Loading branch information
mvidner committed Jul 17, 2008
1 parent 320bf05 commit 0233a88
Show file tree
Hide file tree
Showing 4 changed files with 34 additions and 1 deletion.
2 changes: 1 addition & 1 deletion VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
2.17.1
2.17.2
23 changes: 23 additions & 0 deletions configure.in.in
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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.)
Expand Down
8 changes: 8 additions & 0 deletions package/yast2-core.changes
Original file line number Diff line number Diff line change
@@ -1,3 +1,11 @@
-------------------------------------------------------------------
Thu Jul 17 14:20:14 CEST 2008 - [email protected]

- 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 - [email protected]

Expand Down
2 changes: 2 additions & 0 deletions yast2-core.pc.in
Original file line number Diff line number Diff line change
Expand Up @@ -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.