backport fix from upstream http://bugs.gentoo.org/151935#c6 --- configure +++ configure @@ -23872,7 +23872,7 @@ mysql_libs=`$MYSQL_CONFIG --libs|sed -e "s/'//g"` LIBRDF_LIBS="$LIBRDF_LIBS $mysql_libs" # Stop the MySQL config program adding -O options to CFLAGS - mysql_cflags=`$MYSQL_CONFIG --cflags | sed -e "s/'//g" -e "s/-O[1-9]*//" ` + mysql_cflags=`$MYSQL_CONFIG --cflags | sed -e "s/'//g" -e "s/-O[A-Za-z0-9]*//" ` LIBRDF_CPPFLAGS="$LIBRDF_CPPFLAGS $mysql_cflags" fi if test $sqlite_storage = yes; then @@ -24259,12 +24259,12 @@ fi if test "$USE_MAINTAINER_MODE" = yes -a $release_version = no; then - CFLAGS=`echo $CFLAGS | sed s/-O[1-9]*//` - CXXFLAGS=`echo $CXXFLAGS | sed s/-O[1-9]*//` - STANDARD_CFLAGS=`echo $STANDARD_CFLAGS | sed s/-O[1-9]*//` - LIBRDF_CPPFLAGS=`echo $LIBRDF_CPPFLAGS | sed s/-O[1-9]*//` - LIBRDF_EXTERNAL_CPPFLAGS=`echo $LIBRDF_EXTERNAL_CPPFLAGS | sed s/-O[1-9]*//` - LIBRDF_INTERNAL_CPPFLAGS=`echo $LIBRDF_INTERNAL_CPPFLAGS | sed s/-O[1-9]*//` + CFLAGS=`echo $CFLAGS | sed s/-O[A-Za-z0-9]*//` + CXXFLAGS=`echo $CXXFLAGS | sed s/-O[A-Za-z0-9]*//` + STANDARD_CFLAGS=`echo $STANDARD_CFLAGS | sed s/-O[A-Za-z0-9]*//` + LIBRDF_CPPFLAGS=`echo $LIBRDF_CPPFLAGS | sed s/-O[A-Za-z0-9]*//` + LIBRDF_EXTERNAL_CPPFLAGS=`echo $LIBRDF_EXTERNAL_CPPFLAGS | sed s/-O[A-Za-z0-9]*//` + LIBRDF_INTERNAL_CPPFLAGS=`echo $LIBRDF_INTERNAL_CPPFLAGS | sed s/-O[A-Za-z0-9]*//` fi