diff --git a/config/dist_symlinks.sh b/config/dist_symlinks.sh
new file mode 100644
index 00000000..b240763d
--- /dev/null
+++ b/config/dist_symlinks.sh
@@ -0,0 +1,72 @@
+#!/usr/bin/env bash
+# This file is part of crest.
+# SPDX-Identifier: LGPL-3.0-or-later
+#
+# crest is free software: you can redistribute it and/or modify it under
+# the terms of the GNU Lesser General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# crest is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU Lesser General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public License
+# along with crest. If not, see .
+
+if [ -z "$MESON_DIST_ROOT" ]; then
+ echo "Error: This script must be run via meson dist."
+ exit 1
+fi
+
+echo "Setting up symlinks for nested subprojects in distribution tarball..."
+
+cd "$MESON_DIST_ROOT/subprojects" || exit 1
+
+if [ -d "test-drive" ] && [ -d "toml-f" ]; then
+ echo " -> Symlinking test-drive into toml-f/subprojects"
+ mkdir -p toml-f/subprojects
+ cd toml-f/subprojects
+ ln -sfn ../../test-drive test-drive
+ cd ../../
+fi
+
+if [ -d "mstore" ] && [ -d "dftd4" ]; then
+ echo " -> Symlinking mstore into dftd4/subprojects"
+ mkdir -p dftd4/subprojects
+ cd dftd4/subprojects
+ ln -sfn ../../mstore mstore
+ cd ../../
+fi
+if [ -d "multicharge" ] && [ -d "dftd4" ]; then
+ echo " -> Symlinking multicharge into dftd4/subprojects"
+ mkdir -p dftd4/subprojects
+ cd dftd4/subprojects
+ ln -sfn ../../multicharge multicharge
+ cd ../../
+fi
+
+if [ -d "dftd4" ] && [ -d "tblite" ]; then
+ echo " -> Symlinking dftd4 into tblite/subprojects"
+ mkdir -p tblite/subprojects
+ cd tblite/subprojects
+ ln -sfn ../../dftd4 dftd4
+ cd ../../
+fi
+if [ -d "mctc-lib" ] && [ -d "tblite" ]; then
+ echo " -> Symlinking mctc-lib into tblite/subprojects"
+ mkdir -p tblite/subprojects
+ cd tblite/subprojects
+ ln -sfn ../../mctc-lib mctc-lib
+ cd ../../
+fi
+if [ -d "s-dftd3" ] && [ -d "tblite" ]; then
+ echo " -> Symlinking s-dftd3 into tblite/subprojects"
+ mkdir -p tblite/subprojects
+ cd tblite/subprojects
+ ln -sfn ../../s-dftd3 s-dftd3
+ cd ../../
+fi
+
+echo "Symlink setup complete."
diff --git a/config/meson.build b/config/meson.build
index 99616924..b753b9c3 100644
--- a/config/meson.build
+++ b/config/meson.build
@@ -99,8 +99,8 @@ endif
## ======================================== ##
## Linear Algebra Libraries
## ======================================== ##
-la_backend = get_option('la_backend')
-message('Linear algebra backend: '+get_option('la_backend'))
+la_backend = get_option('lapack')
+message('Linear algebra backend: '+get_option('lapack'))
if la_backend == 'mkl' or la_backend == 'mkl-static'
add_project_arguments('-DWITH_MKL', language: 'fortran')
if la_backend == 'mkl-static'
diff --git a/meson.build b/meson.build
index 22a016de..89fefd33 100644
--- a/meson.build
+++ b/meson.build
@@ -79,7 +79,7 @@ crest_exe = executable(
link_language: 'fortran',
)
-
+meson.add_dist_script('config/dist_symlinks.sh')
# add the testsuite separate meson.build
#subdir('testsuite') #has to be filled with tests, not availabel yet
diff --git a/meson_options.txt b/meson_options.txt
index 950190e2..964ce16c 100644
--- a/meson_options.txt
+++ b/meson_options.txt
@@ -15,7 +15,7 @@
# along with crest. If not, see .
option(
- 'la_backend',
+ 'lapack',
type: 'combo',
value: 'mkl-static',
yield: true,