diff options
Diffstat (limited to 'configure')
-rwxr-xr-x | configure | 6 |
1 files changed, 3 insertions, 3 deletions
@@ -164,7 +164,7 @@ if ! grep $pat $srcdir/configure > /dev/null 2>&1; then exit 1 fi -if ! `cmp --help > /dev/null 2>&1`; then +if ! `cmp /dev/null /dev/null > /dev/null 2>&1`; then echo "Sorry, you need 'cmp' to configure GHDL."; exit 1 fi @@ -191,8 +191,8 @@ fi # Check the version of libghdl is correct. if [ "$enable_libghdl" = true ]; then libghdl_version="$srcdir/python/libghdl/version.py" - # Compare a fixed number of bytes (-n), to avoid false positives due to LF/CRLF mismatch. - if ! echo "__version__ = '${ghdl_version}'" | cmp -n "${#ghdl_version}" "$libghdl_version" ; then + # Extract content between sinlge quotes in version.py, to avoid false positives due to LF/CRLF mismatch. + if [ "$ghdl_version" != "`sed "s/.*'\(.*\)'.*/\1/g" $libghdl_version`" ]; then echo "Sorry, the version of $libghdl_version is not correct" echo "update the version to: $ghdl_version" echo "or use --disable-libghdl" |