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.

65 lines
1.5 KiB

2 months ago
  1. 18,22d17
  2. < if [ ! -d configuration ]
  3. < then
  4. < echo "$0: ERROR: please run in the CoCoALib root directory"
  5. < exit 1
  6. < fi
  7. 30,34c25,30
  8. < TMP_DIR=TMPDIR-gmp-try-default-$HOSTNAME-$UID-$$
  9. < /bin/rm -rf $TMP_DIR && mkdir $TMP_DIR 2>/dev/null
  10. < if [ $? -ne 0 ]
  11. < then
  12. < echo "ERROR: Unable to create working directory ($TMP_DIR)"
  13. ---
  14. > TODAY=`date "+%Y-%m-%d"`
  15. > TIME=`date "+%H:%M:%S"`
  16. > TMP_DIR=/tmp/CoCoALib-config-$USER-$TODAY/gmp-try-default-$TIME-$$
  17. > /bin/rm -rf $TMP_DIR && mkdir -p $TMP_DIR
  18. > if [ $? -ne 0 ]; then
  19. > echo "ERROR: $0 failed to create temporary directory \"$TMP_DIR\""
  20. 39,45d34
  21. < # define fn for cleaning up temp dir
  22. < cleanup()
  23. < {
  24. < cd ..
  25. < /bin/rm -rf "$TMP_DIR"
  26. < }
  27. <
  28. 74a64
  29. > DYN_LINK=ok
  30. 83a74,79
  31. > ./TestGMP > /dev/null 2>&1
  32. > if [ $? -ne 0 ]
  33. > then
  34. > DYN_LINK="arch=$ARCHFLAG"
  35. > continue;
  36. > fi
  37. 89c85,93
  38. < # GMPXX test failed, so we have only GMP
  39. ---
  40. > # GMPXX compilation failed, so we have only GMP
  41. > echo GMP
  42. > fi
  43. >
  44. > # GMPXX compilation passed, so check it runs.
  45. > ./TestGMPXX > /dev/null 2>&1
  46. > if [ $? -ne 0 ]
  47. > then
  48. > # Test prog did not run: accept just GMP (or should it give error???)
  49. 92c96
  50. < # GMPXX passed, so we have both GMP and GMPXX
  51. ---
  52. > # We have both GMP and GMPXX
  53. 95c99,101
  54. < cleanup
  55. ---
  56. > # Clean-up TMP_DIR
  57. > cd # leave TMP_DIR
  58. > /bin/rm -rf $TMP_DIR
  59. 97a104,109
  60. >
  61. > if [ DYN_LINK -ne "ok" ]
  62. > then
  63. > echo "Problem with GMP dynamic library ($DYN_LINK); perhaps run ldconfig?"
  64. > exit 2
  65. > fi