Changeset 2036
- Timestamp:
- Oct 20, 2012, 4:08:52 PM (10 years ago)
- Location:
- trunk
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/build/check-source.sh
r1995 r2036 29 29 info() { if [ "$quiet" != true ]; then echo "I: $1"; fi } 30 30 31 # Ensure the system tools do not attempt to perform multibyte conversions 32 export LANG=C 33 31 34 # Find out where the top directory is and go there 32 35 top_srcdir="$(cd "$(dirname $0)"; cd ..; pwd)" … … 34 37 35 38 # Check for working tools 36 #if [ "$(echo foo | grep -c foo)" != 1 ]; then 37 # error "grep -c does not appear to work, cancelling" 38 # exit 0 39 #fi 39 if [ "$(echo foo | grep -c foo)" != 1 ]; then 40 error "grep -c does not appear to work, cancelling" 41 exit 0 42 fi 43 44 SED=sed 45 if gsed --version >/dev/null 2>&1; then 46 SED=gsed 47 fi 48 if [ "$(echo 'x\x' | $SED 's/.*[^x\t]//')" != x ]; then 49 error "sed does not appear to work, cancelling" 50 exit 0 51 fi 52 40 53 if d2u -h >/dev/null 2>&1; then 41 54 d2u=d2u … … 74 87 75 88 OIFS="$IFS" 76 IFS=$'\n' 89 IFS=' 90 ' 77 91 if [ "$repo" = git ]; then 78 92 FILES="`git ls-files`" … … 119 133 120 134 # Check for trailing spaces 121 nspaces="$( LANG=C sed's/.*[^ \t]//' "$file" | tr -cd '\t ' | wc -c)"135 nspaces="$($SED 's/.*[^ \t]//' "$file" | tr -cd '\t ' | wc -c)" 122 136 total_spaces="$(($total_spaces + $nspaces))" 123 137 if [ "$nspaces" -gt 0 ]; then 124 138 clean=false 125 139 if [ "$fix" = true ]; then 126 LANG=C sed-i 's/[[:space:]][[:space:]]*$//g' "$file"140 $SED -i 's/[[:space:]][[:space:]]*$//g' "$file" 127 141 info "$file has $nspaces trailing spaces" 128 142 else … … 137 151 clean=false 138 152 if [ "$fix" = true ]; then 139 LANG=C sed-i 's/\t/ /g' "$file"153 $SED -i 's/\t/ /g' "$file" 140 154 info "$file has $ntabs tabs" 141 155 else -
trunk/configure.ac
r1995 r2036 49 49 AC_EGREP_CPP(yes, foo) 50 50 PKG_PROG_PKG_CONFIG() 51 52 53 dnl Check for a working implementation of sed 54 AC_PROG_SED 55 AC_MSG_CHECKING(for a sed that understands \t) 56 if test "$(echo 'x\x' | "${SED}" 's/.*@<:@^x\t@:>@//')" != x; then 57 AC_MSG_RESULT(no) 58 AC_MSG_ERROR([[consider installing GNU sed]]) 59 else 60 AC_MSG_RESULT(yes) 61 fi 62 51 63 52 64 AM_CONDITIONAL(USE_GLEW, test "${ac_cv_my_have_glew}" != "no") … … 226 238 ac_cv_my_have_flexlexer_h="no" 227 239 AC_LANG_PUSH(C++) 228 AC_CHECK_HEADERS(FlexLexer.h, [ac_cv_my_have_flexlexer_h="yes"]) 240 AC_CHECK_HEADERS(FlexLexer.h, 241 dnl Ensure that FlexLexer::yleng is of type int, and not size_t like 242 dnl on recent Apple systems. It would break all our existing code. 243 [AC_MSG_CHECKING(for FlexLexer.h validity) 244 AC_COMPILE_IFELSE( 245 [AC_LANG_PROGRAM([#include <FlexLexer.h> 246 class Foo : public FlexLexer 247 { 248 Foo() { int &test = yyleng; } 249 }], 250 [])], 251 [AC_MSG_RESULT(yes) 252 ac_cv_my_have_flexlexer_h="yes"], 253 [AC_MSG_RESULT(no)])]) 229 254 AC_LANG_POP(C++) 230 255 if test "x${ac_cv_my_have_flexlexer_h}" = "xno"; then
Note: See TracChangeset
for help on using the changeset viewer.