dnl SPDX-License-Identifier: CC0-1.0 dnl dnl Copyright (C) 2023, 2025 Wojtek Kosior <koszko@koszko.org> dnl dnl This file proviced an autoconf macro that generates a test-env script dnl suitable for use in Guile projects. dnl # AX_ADD_GUILE_TEST_ENV([FILENAME = test-env], # [PRE_INST_ENV_PATH = pre-inst-env], # [TEST_SCM_ROOT_PATH = tests/guile], # [TEST_GO_ROOT_PATH = tests/guile]) # ------------------------------------------------------------------------------ AC_DEFUN([AX_ADD_GUILE_TEST_ENV], [ printf '%s' ' set -eu BUILD_DIR="$(cd "$(dirname "[$]0")" && pwd -P)" export LAWRENCE_TEST_SCM_ROOT='m4_default([$3], [tests/guile])' export LAWRENCE_TEST_GO_ROOT='m4_default([$4], [tests/guile])' $BUILD_DIR/'m4_default([$2], [pre-inst-env])' "[$]@" ' > m4_default([$1], [test-env]) chmod 755 m4_default([$1], [test-env]) ])dnl AX_ADD_GUILE_TEST_ENV