Skip to content

Commit edbe69d

Browse files
author
Release Manager
committed
gh-40155: Add check for Arch Linux in configure to recommend meson build <!-- ^ Please provide a concise and informative title. --> <!-- ^ Don't put issue numbers in the title, do this in the PR description below. --> <!-- ^ For example, instead of "Fixes #12345" use "Introduce new method to calculate 1 + 2". --> <!-- v Describe your changes below in detail. --> <!-- v Why is this change required? What problem does it solve? --> <!-- v If this PR resolves an open issue, please link to it here. For example, "Fixes #12345". --> Add a check if the configure is run on Arch Linux. If yes, then recommend to use Meson instead since there is little need for configure + make on Arch and the Meson build works nicely there. This check can be disabled by passing `--disable-meson-check`. ### 📝 Checklist <!-- Put an `x` in all the boxes that apply. --> - [ ] The title is concise and informative. - [ ] The description explains in detail what this PR is about. - [ ] I have linked a relevant issue or discussion. - [ ] I have created tests covering the changes. - [ ] I have updated the documentation and checked the documentation preview. ### ⌛ Dependencies <!-- List all open PRs that this PR logically depends on. For example, --> <!-- - #12345: short description why this is a dependency --> <!-- - #34567: ... --> URL: #40155 Reported by: Tobias Diez Reviewer(s):
2 parents b8606ed + 42f173c commit edbe69d

File tree

2 files changed

+18
-0
lines changed

2 files changed

+18
-0
lines changed

.github/workflows/ci-linux-incremental.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@ on:
2020
paths:
2121
- '.github/workflows/ci-linux-incremental.yml'
2222
- 'build/pkgs/**'
23+
- 'configure.ac'
2324
- '!build/pkgs/sage_conf/**'
2425
- '!build/pkgs/sage_docbuild/**'
2526
- '!build/pkgs/sage_setup/**'

configure.ac

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -101,6 +101,23 @@ AC_SUBST([SAGE_DOCS], ['${SAGE_LOCAL}'])dnl Quoted so that it is resolved at bui
101101

102102
#---------------------------------------------------------
103103

104+
# Check for systems where Meson build is recommended
105+
AC_ARG_ENABLE([meson-check],
106+
[AS_HELP_STRING([--disable-meson-check],
107+
[do not fail the build if running on systems where Meson is preferred])],
108+
[enable_meson_check=$enableval],
109+
[enable_meson_check=yes])
110+
111+
if test "$enable_meson_check" != no; then
112+
AC_MSG_CHECKING([for Arch Linux])
113+
if grep -qi 'arch' /etc/os-release 2>/dev/null || test -f /etc/arch-release; then
114+
AC_MSG_RESULT([yes])
115+
AC_MSG_ERROR([Building on Arch Linux using make is not recommended. Please use Meson as described at https://doc.sagemath.org/html/en/installation/meson.html. Use --disable-meson-check to override.])
116+
else
117+
AC_MSG_RESULT([no])
118+
fi
119+
fi
120+
104121
AC_ARG_ENABLE([build-as-root],
105122
[AS_HELP_STRING([--enable-build-as-root],
106123
[allow building Sage as root (for use in containers)])],

0 commit comments

Comments
 (0)