auto.def 1.8 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253
  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 and all of its dependencies must be kept compatible with
  8. # JimTCL, a copy of which is included in this source tree as
  9. # ./autosetup/jimsh0.c. The number of incompatibilities between
  10. # canonical TCL and JimTCL is very low and alternative formulations of
  11. # incompatible constructs have, so far, been easy to find.
  12. #
  13. # JimTCL: https://jim.tcl.tk
  14. #
  15. use sqlite-config
  16. sqlite-configure canonical {
  17. proj-if-opt-truthy dev {
  18. # --enable-dev needs to come early so that the downstream tests
  19. # which check for the following flags use their updated state.
  20. proj-opt-set all 1
  21. proj-opt-set debug 1
  22. proj-opt-set amalgamation 0
  23. define CFLAGS [get-env CFLAGS {-O0 -g}]
  24. # -------------^^^^^^^ intentionally using [get-env] instead of
  25. # [proj-get-env] here because [sqlite-setup-default-cflags] uses
  26. # [proj-get-env] and we want this to supercede that.
  27. sqlite-munge-cflags
  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. proj-define-for-opt amalgamation USE_AMALGAMATION "Use amalgamation for builds?"
  33. proj-define-for-opt gcov USE_GCOV "Use gcov?"
  34. proj-define-for-opt test-status TSTRNNR_OPTS \
  35. "test-runner flags:" {--status} {}
  36. proj-define-for-opt linemacros AMALGAMATION_LINE_MACROS \
  37. "Use #line macros in the amalgamation:"
  38. define AMALGAMATION_EXTRA_SRC \
  39. [join [opt-val amalgamation-extra-src ""] " "]
  40. define LINK_TOOLS_DYNAMICALLY [proj-opt-was-provided dynlink-tools]
  41. sqlite-handle-tcl
  42. sqlite-handle-emsdk
  43. }