config.scm.in 1.8 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162
  1. ;;; Disarchive
  2. ;;; Copyright © 2020, 2022 Timothy Sample <samplet@ngyro.com>
  3. ;;;
  4. ;;; This file is part of Disarchive.
  5. ;;;
  6. ;;; Disarchive is free software: you can redistribute it and/or modify
  7. ;;; it under the terms of the GNU General Public License as published by
  8. ;;; the Free Software Foundation, either version 3 of the License, or
  9. ;;; (at your option) any later version.
  10. ;;;
  11. ;;; Disarchive is distributed in the hope that it will be useful,
  12. ;;; but WITHOUT ANY WARRANTY; without even the implied warranty of
  13. ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  14. ;;; GNU General Public License for more details.
  15. ;;;
  16. ;;; You should have received a copy of the GNU General Public License
  17. ;;; along with Disarchive. If not, see <http://www.gnu.org/licenses/>.
  18. (define-module (disarchive config)
  19. #:export (%package-name
  20. %version
  21. version-message
  22. %tar
  23. %gzip
  24. %xz
  25. %bzip2
  26. %zgz
  27. %disarchive-directory-cache))
  28. ;;; Commentary:
  29. ;;;
  30. ;;; This module provides system-specific values.
  31. ;;;
  32. ;;; Code:
  33. (define %package-name "@PACKAGE_NAME@")
  34. (define %version "@VERSION@")
  35. (define version-message (format #f "~a ~a~%" %package-name %version))
  36. (define DISARCHIVE_O_NOFOLLOW @O_NOFOLLOW@)
  37. ;; Older versions of Guile do not have O_NOFOLLOW, but newer ones do.
  38. ;; Hence, we check for O_NOFOLLOW and use the Guile version if we can.
  39. (unless (and=> (module-variable (resolve-interface '(guile)) 'O_NOFOLLOW)
  40. variable-bound?)
  41. (export (DISARCHIVE_O_NOFOLLOW . O_NOFOLLOW)))
  42. (define %tar "@TAR@")
  43. (define %gzip "@GZIP@")
  44. (define %xz "@XZ@")
  45. (define %bzip2 "@BZIP2@")
  46. (define (%zgz)
  47. (or (getenv "DISARCHIVE_ZGZ")
  48. "@libexecdir@/disarchive-zgz"))
  49. (define %disarchive-directory-cache (make-parameter #f))