comparison configure.ac @ 1615:cc481995c96d

Fix typo in condition operator; ensure c++11 used for config checks with gcc
author Chris Cannam
date Mon, 27 Feb 2017 13:37:43 +0000
parents e5ead8c8f5ed
children e86e23110e42
comparison
equal deleted inserted replaced
1614:e5ead8c8f5ed 1615:cc481995c96d
51 CXXFLAGS_DEBUG="$AUTOCONF_CXXFLAGS" 51 CXXFLAGS_DEBUG="$AUTOCONF_CXXFLAGS"
52 CXXFLAGS_RELEASE="$AUTOCONF_CXXFLAGS" 52 CXXFLAGS_RELEASE="$AUTOCONF_CXXFLAGS"
53 CXXFLAGS_MINIMAL="$AUTOCONF_CXXFLAGS" 53 CXXFLAGS_MINIMAL="$AUTOCONF_CXXFLAGS"
54 54
55 if test "x$GCC" = "xyes"; then 55 if test "x$GCC" = "xyes"; then
56 CXXFLAGS_ANY="-Wall -Wextra -Woverloaded-virtual -Wformat-nonliteral -Wformat-security -Winit-self -Wswitch-enum -Wconversion -pipe" 56 CXXFLAGS_ANY="-std=c++11 -fpic -Wall -Wextra -Woverloaded-virtual -Wformat-nonliteral -Wformat-security -Winit-self -Wswitch-enum -Wconversion -pipe"
57 CXXFLAGS_DEBUG="$CXXFLAGS_ANY -g -Werror" 57 CXXFLAGS_DEBUG="$CXXFLAGS_ANY -g -Werror"
58 CXXFLAGS_RELEASE="$CXXFLAGS_ANY -g0 -O3 -ffast-math" 58 CXXFLAGS_RELEASE="$CXXFLAGS_ANY -g0 -O3 -ffast-math"
59 CXXFLAGS_MINIMAL="$CXXFLAGS_ANY -g0 -O0" 59 CXXFLAGS_MINIMAL="$CXXFLAGS_ANY -g0 -O0"
60 fi 60 fi
61 61
89 89
90 # Cap'n Proto 0.5.3 is the latest release at the time of writing, but 90 # Cap'n Proto 0.5.3 is the latest release at the time of writing, but
91 # it lacks the expectedSizeInWordsFromPrefix function which exists in 91 # it lacks the expectedSizeInWordsFromPrefix function which exists in
92 # the git repo. Our check is for that specific symbol, which would 92 # the git repo. Our check is for that specific symbol, which would
93 # indicate a git clone, or for release 0.5.4 or later via pkg-config. 93 # indicate a git clone, or for release 0.5.4 or later via pkg-config.
94 PKG_CHECK_MODULES([capnp],[capnp => 0.5.4],[HAVES="$HAVES HAVE_CAPNP";CXXFLAGS="$CXXFLAGS $capnp_CFLAGS";LIBS="$LIBS $capnp_LIBS"],[AC_MSG_NOTICE([Failed to find required module capnp using pkg-config, trying again by old-fashioned means])]) 94 PKG_CHECK_MODULES([capnp],[capnp >= 0.5.4],[HAVES="$HAVES HAVE_CAPNP";CXXFLAGS="$CXXFLAGS $capnp_CFLAGS";LIBS="$LIBS $capnp_LIBS"],[AC_MSG_NOTICE([Failed to find required module capnp using pkg-config, trying again by old-fashioned means])])
95 if test -z "$capnp_LIBS" ; then 95 if test -z "$capnp_LIBS" ; then
96 AC_COMPILE_IFELSE([ 96 AC_COMPILE_IFELSE([
97 AC_LANG_SOURCE([[ 97 AC_LANG_SOURCE([[
98 #include <capnp/serialize.h> 98 #include <capnp/serialize.h>
99 int main() { 99 int main() {