Skip to content
This repository has been archived by the owner on Jan 30, 2023. It is now read-only.

Commit

Permalink
m4/sage_spkg_{collect,configure}.m4: Defer error message from --with-…
Browse files Browse the repository at this point in the history
…system-SPKG=force to the end
  • Loading branch information
Matthias Koeppe committed Sep 15, 2021
1 parent c349c87 commit b566863
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 1 deletion.
9 changes: 9 additions & 0 deletions m4/sage_spkg_collect.m4
Original file line number Diff line number Diff line change
Expand Up @@ -240,6 +240,9 @@ for DIR in $SAGE_ROOT/build/pkgs/*; do
[yes], [ message="no suitable system package; $message"
AS_VAR_APPEND([$SAGE_NEED_SYSTEM_PACKAGES_VAR], [" $SPKG_NAME"])
],
[force], [ message="no suitable system package; this is an error"
AS_VAR_APPEND([$SAGE_NEED_SYSTEM_PACKAGES_VAR], [" $SPKG_NAME"])
],
[installed], [ message="already installed as an SPKG$uninstall_message" ],
[ message="$reason; $message" ])
])
Expand Down Expand Up @@ -397,7 +400,9 @@ $COMMAND
$COMMAND
])
AS_VAR_SET([need_reconfig_msg], [yes])
])
dnl Reconfigure message
AS_VAR_IF([need_reconfig_msg], [yes], [
AC_MSG_NOTICE([
Expand All @@ -410,4 +415,8 @@ $COMMAND
])
])
])
dnl Deferred errors from --with-system-SPKG=force
AS_VAR_SET_IF([SAGE_SPKG_ERRORS], [AC_MSG_ERROR([
$SAGE_SPKG_ERRORS
])])
])
5 changes: 4 additions & 1 deletion m4/sage_spkg_configure.m4
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,10 @@ AS_VAR_IF(SPKG_INSTALL, [no], [
AC_MSG_NOTICE(m4_normalize([will use system package and not install SPKG ]SPKG_NAME))
], [
AS_VAR_IF(SPKG_USE_SYSTEM, [force], [
AC_MSG_ERROR(m4_normalize([given --with-system-]SPKG_NAME[=force but no system package could be used]))
AS_VAR_APPEND([SAGE_SPKG_ERRORS], ["
Given --with-system-]SPKG_NAME[=force, but no system package could be used.
That's an error. Please install the indicated package to continue.
(To override this error, use ./configure --without-system-]SPKG_NAME[)"])
], [
AC_MSG_NOTICE(m4_normalize([no suitable system package found for SPKG ]SPKG_NAME))
])
Expand Down

0 comments on commit b566863

Please sign in to comment.