From 2bdcf87a554423198ae8f980e3f41d04313b619b Mon Sep 17 00:00:00 2001 From: q-posev Date: Tue, 12 Oct 2021 15:55:58 +0200 Subject: [PATCH] Fix #62 : raise autoconf error when not in developer mode but trying to configure the GitHub repo clone. This is required because TREXIO source files can either be generated in developer mode (using emacs org-mode files) or obtained from the source code distribution. --- configure.ac | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/configure.ac b/configure.ac index e7308a8..fb9f626 100644 --- a/configure.ac +++ b/configure.ac @@ -157,6 +157,23 @@ if test "x${TREXIO_DEVEL}" != "x"; then HAS_CPPCHECK=1 fi +else + + # Throw an error message if the user attempts to configure the GitHub repo clone not in the developer mode. + # Developer mode is required to generate the TREXIO source files from the org-mode templates. + TEST_IFEXISTS=".gitmodules" + AC_CHECK_FILE([$TEST_IFEXISTS], + [AC_MSG_ERROR([ + ---------------------------------------------------------------- + Installation with the current configuration is not possible. + Activate developer mode: TREXIO_DEVEL=1 ./configure + | OR | + Download the tarball with the source code distribution. + ---------------------------------------------------------------- + ])], + [] + ) + fi ## Libm