autogen.sh 1.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960
  1. #!/bin/sh
  2. #
  3. # Create configure and makefile stuff...
  4. #
  5. # Git hooks should come before autoreconf.
  6. if [ -d .git ]; then
  7. if [ ! -d .git/hooks ]; then
  8. mkdir .git/hooks || exit $?
  9. fi
  10. if [ ! -e .git/hooks/pre-commit ]; then
  11. ln -s ../../pre-commit.sh .git/hooks/pre-commit || exit $?
  12. fi
  13. if [ ! -e .git/hooks/pre-push ]; then
  14. ln -s ../../pre-push.sh .git/hooks/pre-push || exit $?
  15. fi
  16. fi
  17. # if and as needed, create empty dummy versions of various files, mostly
  18. # associated with fips/self-test and asynccrypt:
  19. for dir in \
  20. ./wolfssl/wolfcrypt/port/intel \
  21. ./wolfssl/wolfcrypt/port/cavium
  22. do
  23. if [ ! -e "$dir" ]; then
  24. mkdir "$dir" || exit $?
  25. fi
  26. done
  27. for file in \
  28. ./wolfssl/options.h \
  29. ./wolfcrypt/src/fips.c \
  30. ./wolfcrypt/src/fips_test.c \
  31. ./wolfcrypt/src/wolfcrypt_first.c \
  32. ./wolfcrypt/src/wolfcrypt_last.c \
  33. ./wolfssl/wolfcrypt/fips.h \
  34. ./wolfcrypt/src/selftest.c \
  35. ./wolfcrypt/src/async.c \
  36. ./wolfssl/wolfcrypt/async.h \
  37. ./wolfcrypt/src/port/intel/quickassist.c \
  38. ./wolfcrypt/src/port/intel/quickassist_mem.c \
  39. ./wolfcrypt/src/port/cavium/cavium_nitrox.c \
  40. ./wolfssl/wolfcrypt/port/intel/quickassist.h \
  41. ./wolfssl/wolfcrypt/port/intel/quickassist_mem.h \
  42. ./wolfssl/wolfcrypt/port/cavium/cavium_nitrox.h
  43. do
  44. if [ ! -e "$file" ]; then
  45. > "$file" || exit $?
  46. fi
  47. done
  48. # If this is a source checkout then call autoreconf with error as well
  49. if [ -e .git ]; then
  50. export WARNINGS="all,error"
  51. else
  52. export WARNINGS="all"
  53. fi
  54. autoreconf --install --force