|
|
fi | fi |
| |
#### test if Python headers are installed #### | #### test if Python headers are installed #### |
|
PYTHON_VERSION=`python -V 2>&1 | awk {'print $2'} | awk -F. {'print $1"."$2'}` |
cat > $t <<EOT | cat > $t <<EOT |
#include "python/Python.h" |
#include "python${PYTHON_VERSION}/Python.h" |
#include "python/compile.h" |
#include "python${PYTHON_VERSION}/compile.h" |
#include "python/eval.h" |
#include "python${PYTHON_VERSION}/eval.h" |
#include "python/node.h" |
#include "python${PYTHON_VERSION}/node.h" |
| |
int main() { | int main() { |
Py_Initialize(); | Py_Initialize(); |
|
|
PyCodeObject *program = PyNode_Compile(programNode, ""); | PyCodeObject *program = PyNode_Compile(programNode, ""); |
} | } |
EOT | EOT |
PYTHON_VERSION=`python -V 2>&1 | awk {'print $2'} | awk -F. {'print $1"."$2'}` |
|
test_link "whether Python is installed" "yes" "no" "-lpython$PYTHON_VERSION -lpthread -lutil -ldl" | test_link "whether Python is installed" "yes" "no" "-lpython$PYTHON_VERSION -lpthread -lutil -ldl" |
| |
cat >>confdefs.h <<_ACEOF | cat >>confdefs.h <<_ACEOF |