]> diplodocus.org Git - nmh/commitdiff
Added hack to configure.ac to work around bug in flex 2.5.36 and
authorDavid Levine <levinedl@acm.org>
Wed, 23 Oct 2013 00:46:51 +0000 (19:46 -0500)
committerDavid Levine <levinedl@acm.org>
Wed, 23 Oct 2013 00:46:51 +0000 (19:46 -0500)
2.5.37 that prevents the builds from being completely green.
According to http://sourceforge.net/p/flex/bugs/140/, this should
be fixed in the next release of flex.  The hack is confined to
just configure.ac so it'll be easy to remove.

configure.ac
docs/contrib/build_nmh

index fac9b91bd590fc61cbc40834c7aad47ebd619e59..f1142f92b57185c4c3ea420c5e1b7774172d0c0f 100644 (file)
@@ -235,7 +235,7 @@ AC_PATH_PROG([sendmailpath], [sendmail], [/usr/sbin/sendmail], [$pathtmp])
 dnl Cygwin FAT filesystems do not support hard links.  So default to
 dnl cp instead, even if running on an NTFS or other filesystem.
 AS_CASE(["$host_os"],
-  [cygwin*],[LN=cp],
+  [cygwin*], [LN=cp],
   [LN=ln])
 AC_SUBST([LN])
 
@@ -556,6 +556,18 @@ dnl Now put the libraries back to what it was before we
 dnl starting checking the termcap library.
 LIBS="$nmh_save_LIBS"
 
+dnl ----------------
+dnl CHECK FLEX FIXUP
+dnl ----------------
+dnl Use LFLAGS make variable setting to work around bug in flex
+dnl 2.5.36 and .37 that causes signed/unsigned mismatch,
+dnl http://sourceforge.net/p/flex/bugs/140/
+AS_IF([test "$LEX" = flex],
+      [AS_CASE([`$LEX -V`],
+               [flex\ 2.5.3@<:@67@:>@], [[LFLAGS=\
+'; printf "%s\n" '\''1,$$s/\(  \)int i;/\1yy_size_t i;/'\'' w q | ed -s $@']])
+       AC_SUBST([LFLAGS])])
+
 dnl --------------
 dnl CHECK TYPEDEFS
 dnl --------------
index ef399f86be7e9ddc25480a333671fa6ddb81b72a..adc6e1cb185c97cf1caf7822777094845bd408f6 100755 (executable)
@@ -307,15 +307,14 @@ if [ $status -eq 0 ]; then
   fi
 fi
 
-grep 'Error' "$logfile"
-#### Ignore the warning when sbr/dtimep.c is built with flex 2.5.36
-#### or 2.5.37.
-grep 'warn' "$logfile" | \
-  grep -v 'sbr/dtimep.c:.*comparison between signed and unsigned'
-if [ $status -ne 0 ]; then
+grep Error "$logfile"
+grep warn "$logfile"
+
+if [ $status -eq 0 ]; then
+  [ $verbose -ge 1 ]  &&  echo build completed successfully
+else
   echo build failed!
   echo build log is in "$logfile"
 fi
-[ $status -eq 0  -a  $verbose -ge 1 ]  &&  echo build completed successfully
 
 exit $status