aboutsummaryrefslogtreecommitdiffstats
path: root/configure
diff options
context:
space:
mode:
authorTristan Gingold <tgingold@free.fr>2019-06-24 18:58:30 +0200
committerTristan Gingold <tgingold@free.fr>2019-06-24 21:14:11 +0200
commit7844307638c4666c0fc4a330b7d536722fc13460 (patch)
treec0e231cb82f89867e7e34db749a7e4c57f05f2e5 /configure
parentd9be7da0cf3d38e2476862fc6bb75a8d27de3276 (diff)
downloadghdl-7844307638c4666c0fc4a330b7d536722fc13460.tar.gz
ghdl-7844307638c4666c0fc4a330b7d536722fc13460.tar.bz2
ghdl-7844307638c4666c0fc4a330b7d536722fc13460.zip
python: add version.py, check it in configure.
Diffstat (limited to 'configure')
-rwxr-xr-xconfigure18
1 files changed, 12 insertions, 6 deletions
diff --git a/configure b/configure
index 82ec1c949..3d74557da 100755
--- a/configure
+++ b/configure
@@ -178,6 +178,18 @@ if ! $CC -v 2> /dev/null; then
exit 1
fi
+# Check the version of libghdl is correct.
+if [ "$enable_libghdl" = true ]; then
+ libghdl_version="$srcdir/python/libghdl/version.py"
+ if ! echo "__version__ = '${ghdl_version}'" | cmp "$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"
+ exit 1
+ fi
+fi
+
+
# Default for enable_openieee
if [ "$enable_openieee" = "unknown" ]; then
if test -d $srcdir/libraries/ieee ; then
@@ -294,12 +306,6 @@ if [ ! -d pic ]; then
fi
fi
-if [ "$enable_libghdl" = true ]; then
- cat > config.py <<-EOF
-__version__ = '${ghdl_version}'
-EOF
-fi
-
# Generate config.status
rm -f config.status
{