Skip to content
Snippets Groups Projects
Commit 635f3044 authored by Thomas Jahns's avatar Thomas Jahns :cartwheel:
Browse files

Simplify python extension configure logic.

parent cd1ef24f
No related branches found
No related tags found
No related merge requests found
......@@ -30216,20 +30216,13 @@ fi
 
CPPFLAGS=$save_CPPFLAGS
done
if test "x$enable_python" != "xno"; then :
if test "x$SWIG" = "x"; then :
if test "x$enable_python" != xno -a "x$SWIG" = x; then :
{ $as_echo "$as_me:${as_lineno-$LINENO}: Python bindings: Swig is disabled, pregenerated files will be used. Use '--enable-swig' for swig usage" >&5
$as_echo "$as_me: Python bindings: Swig is disabled, pregenerated files will be used. Use '--enable-swig' for swig usage" >&6;}
else
PYTHON=
fi
else
if test `$SWIG -help 2>&1 | $GREP -c '\-python *- Generate'` = 0; then :
elif test `$SWIG -help 2>&1 | $GREP -c '\-python *- Generate'` = 0; then :
{ $as_echo "$as_me:${as_lineno-$LINENO}: No (swig does not support -python option)" >&5
$as_echo "$as_me: No (swig does not support -python option)" >&6;}
enable_python=no
fi
enable_python=no
fi
else
enable_python=no
......@@ -314,14 +314,11 @@ AC_ARG_ENABLE(python,
break])
CPPFLAGS=$save_CPPFLAGS
done
AS_IF([test "x$enable_python" != "xno"],
[AS_IF([test "x$SWIG" = "x"],
[AC_MSG_NOTICE([Python bindings: Swig is disabled, pregenerated files will be used. Use '--enable-swig' for swig usage])],
[PYTHON=])],
[AS_IF([test `$SWIG -help 2>&1 | $GREP -c '\-python *- Generate'` = 0],
[AC_MSG_NOTICE([No (swig does not support -python option)])
enable_python=no
])])],
AS_IF([test "x$enable_python" != xno -a "x$SWIG" = x],
[AC_MSG_NOTICE([Python bindings: Swig is disabled, pregenerated files will be used. Use '--enable-swig' for swig usage])],
[test `$SWIG -help 2>&1 | $GREP -c '\-python *- Generate'` = 0],
[AC_MSG_NOTICE([No (swig does not support -python option)])
enable_python=no])],
[enable_python=no])
AM_CONDITIONAL(ENABLE_PYTHON, [test "x$enable_python" != "xno"])
AS_IF([test "x$enable_python" != "xno"],[AC_SUBST([ENABLE_PYTHON],[true])],[AC_SUBST([ENABLE_PYTHON],[false])])
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment