Fast IFS using RPN notation
python
c
x86-64
nasm
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

check_deps.sh 876B

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455
  1. #!/bin/sh
  2. if [ "$#" -ne 5 ]
  3. then
  4. echo "Usage : $0 CC LD NASM PYTHON PYTHON-CONFIG" >&2
  5. exit 1
  6. fi
  7. CC=$1
  8. LD=$2
  9. NASM=$3
  10. PYTHON=$4
  11. PYTHON_CONFIG=$5
  12. error=""
  13. for i in `seq $#`
  14. do
  15. deps=$1
  16. shift 1
  17. echo -n "Searching $deps :\t"
  18. which $deps
  19. if [ "r$?" != "r0" ]
  20. then
  21. echo " NOT FOUND"
  22. error="$error\n$deps not found"
  23. fi
  24. done
  25. if which $CC $PYTHON_CONFIG > /dev/null
  26. then
  27. echo -n "Checking C compiler : "
  28. echo '#define PY_SSIZE_T_CLEAN
  29. #include <Python.h>
  30. #include "structmember.h"
  31. int main() { Py_Initialize(); return 0; }' | $CC `$PYTHON_CONFIG --cflags` -xc -c -o /dev/null -
  32. if [ "r$?" != "r0" ]
  33. then
  34. err="Unable to compile a Python program : missing python headers ?"
  35. error="$error\n$err"
  36. echo $err
  37. else
  38. echo "$CC compile with $PYTHON_CONFIG OK"
  39. fi
  40. fi
  41. if [ -n "$error" ]
  42. then
  43. echo -n "\n======== ERRORS ========"
  44. echo "$error"
  45. exit 1
  46. fi
  47. exit 0