summaryrefslogtreecommitdiffhomepage
path: root/auto/modules/python
diff options
context:
space:
mode:
Diffstat (limited to 'auto/modules/python')
-rw-r--r--auto/modules/python22
1 files changed, 16 insertions, 6 deletions
diff --git a/auto/modules/python b/auto/modules/python
index d34abca9..b07ed19f 100644
--- a/auto/modules/python
+++ b/auto/modules/python
@@ -9,7 +9,7 @@ shift
for nxt_option; do
case "$nxt_option" in
- -*=*) value=`$echo "$nxt_option" | sed -e 's/[-_a-zA-Z0-9]*=//'` ;;
+ -*=*) value=`echo "$nxt_option" | sed -e 's/[-_a-zA-Z0-9]*=//'` ;;
*) value="" ;;
esac
@@ -21,17 +21,17 @@ for nxt_option; do
--help)
cat << END
- --config=NAME set python-config name
- --module=NAME set python module name
+ --config=FILE set python-config filename
+ --module=NAME set unit python module name
END
exit 0
;;
*)
- $echo
- $echo $0: error: invalid Python option \"$nxt_option\"
- $echo
+ echo
+ echo $0: error: invalid Python option \"$nxt_option\"
+ echo
exit 1
;;
esac
@@ -39,6 +39,16 @@ END
done
+if [ ! -f $NXT_AUTOCONF_DATA ]; then
+ echo
+ echo Please run common $0 before configuring module \"$nxt_module\".
+ echo
+ exit 1
+fi
+
+. $NXT_AUTOCONF_DATA
+
+
NXT_PYTHON_CONFIG=${NXT_PYTHON_CONFIG=python-config}
NXT_PYTHON=${NXT_PYTHON_CONFIG%-config*}
NXT_PYTHON_MODULE=${NXT_PYTHON_MODULE=${NXT_PYTHON##*/}}