auto.def 2.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374
  1. #!/do/not/tclsh
  2. # ^^^ help out editors which guess this file's content type.
  3. #
  4. # This is the main autosetup-compatible configure script for the
  5. # SQLite project.
  6. #
  7. # This script should be kept compatible with JimTCL, a copy of which
  8. # is included in this source tree as ./autosetup/jimsh0.c. The number
  9. # of incompatibilities between canonical TCL and JimTCL is very low
  10. # and alternative formulations of incompatible constructs have, so
  11. # far, been easy to find.
  12. #
  13. # JimTCL: https://jim.tcl.tk
  14. #
  15. use sqlite-config
  16. sqlite-config-bootstrap canonical
  17. sqlite-setup-default-cflags
  18. proj-if-opt-truthy dev {
  19. # --enable-dev needs to come early so that the downstream tests
  20. # which check for the following flags use their updated state.
  21. proj-opt-set all 1
  22. proj-opt-set debug 1
  23. proj-opt-set amalgamation 0
  24. define CFLAGS [get-env CFLAGS {-O0 -g}]
  25. # -------------^^^^^^^ intentionally using [get-env] instead of
  26. # [proj-get-env] here because [sqlite-setup-default-cflags] uses
  27. # [proj-get-env] and we want this to supercede that.
  28. }
  29. sqlite-check-common-bins ;# must come before [sqlite-handle-wasi-sdk]
  30. sqlite-handle-wasi-sdk ;# must run relatively early, as it changes the environment
  31. sqlite-check-common-system-deps
  32. #
  33. # Enable large file support (if special flags are necessary)
  34. #
  35. define HAVE_LFS 0
  36. if {[opt-bool largefile]} {
  37. cc-check-lfs
  38. }
  39. proj-define-for-opt shared ENABLE_SHARED "Build shared library?"
  40. if {![proj-define-for-opt static ENABLE_STATIC \
  41. "Build static library?"]} {
  42. proj-warn "Static lib build may be implicitly re-activated by other components, e.g. some test apps."
  43. }
  44. proj-define-for-opt amalgamation USE_AMALGAMATION "Use amalgamation for builds?"
  45. proj-define-for-opt gcov USE_GCOV "Use gcov?"
  46. proj-define-for-opt test-status TSTRNNR_OPTS \
  47. "test-runner flags:" {--status} {}
  48. proj-define-for-opt linemacros AMALGAMATION_LINE_MACROS \
  49. "Use #line macros in the amalgamation:"
  50. define LINK_TOOLS_DYNAMICALLY [proj-opt-was-provided dynlink-tools]
  51. proj-check-rpath
  52. sqlite-handle-soname
  53. sqlite-handle-debug
  54. sqlite-handle-tcl
  55. sqlite-handle-threadsafe
  56. sqlite-handle-tempstore
  57. sqlite-handle-line-editing
  58. sqlite-handle-load-extension
  59. sqlite-handle-math
  60. sqlite-handle-icu
  61. sqlite-handle-emsdk
  62. sqlite-config-finalize