forked from kanzure/nanoengineer
-
Notifications
You must be signed in to change notification settings - Fork 0
/
ac_freezepython.m4
35 lines (31 loc) · 1.23 KB
/
ac_freezepython.m4
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
#
# CHECK_FREEZEPYTHON(DESIRED-VERSION)
#
AC_DEFUN([CHECK_FREEZEPYTHON], [
desired_version=$1
if test -n "$FREEZEPYTHON"; then
# Check version
found_version=`$FREEZEPYTHON --version`
found_version=`echo $found_version | \
sed 's/FreezePython \([[0-9]]*.[[0-9]]*.[[0-9]]*\).*/\1/'`
CHECK_VERSION($found_version, $desired_version)
version_check=$CHECK_VERSION_RESULT
if test $version_check -lt 0; then
echo "*** FreezePython version $desired_version or later is required, but version $found_version "
echo "*** was found instead. Either update your FreezePython, or don't use the"
echo "*** --with-freezepython-prefix option."
exit -1
elif test $version_check -gt 0; then
echo "### FreezePython version $found_version was found. That version may work, but the"
echo "### officially supported version is $desired_version."
if test "$STRICT_LIBRARY_CHECK" = "yes"; then
echo "*** Strict library check failed. Either install the officially supported"
echo "*** version, or don't use the --enable-strict-library-check option."
exit -1
fi
fi
else
echo "### We're not building an executable distribution nor freezing the app."
echo "### The --with-freezepython-prefix option was not specified."
fi
])