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

Commit

Permalink
Add options 'configure --disable-SPKG' for standard packages
Browse files Browse the repository at this point in the history
  • Loading branch information
mkoeppe committed Sep 15, 2020
1 parent 5ec24db commit c73460c
Show file tree
Hide file tree
Showing 2 changed files with 27 additions and 3 deletions.
14 changes: 13 additions & 1 deletion bootstrap
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,19 @@ install_config_rpath() {
bootstrap () {
rm -f m4/sage_spkg_configures.m4
spkg_configures=""
for filename in $(find build/pkgs -type f -name type); do
# --disable-SPKG options for standard packages
for filename in $(find build/pkgs -type f -name type | sort); do
pkgtype="$(cat $filename)"
pkgname="$(echo $filename | cut -d/ -f3)"
case "$pkgtype" in
standard)
spkg_configures="$spkg_configures
SAGE_SPKG_ENABLE([$pkgname], [$pkgtype])"
;;
esac
done
# --enable-SPKG options
for filename in $(find build/pkgs -type f -name type | sort); do
pkgtype="$(cat $filename)"
pkgname="$(echo $filename | cut -d/ -f3)"
case "$pkgtype" in
Expand Down
16 changes: 14 additions & 2 deletions m4/sage_spkg_enable.m4
Original file line number Diff line number Diff line change
@@ -1,15 +1,27 @@
AC_DEFUN([SAGE_SPKG_ENABLE], [
m4_pushdef([SPKG_NAME], [$1])
m4_pushdef([SPKG_TYPE], [$2])
AC_ARG_ENABLE(SPKG_NAME,
m4_if(SPKG_TYPE, [standard], [
dnl standard packages; help message is deliberately very brief,
dnl as this is for advanced users only
AC_ARG_ENABLE(SPKG_NAME,
AS_HELP_STRING([--disable-]SPKG_NAME,
[disable $2 package ]SPKG_NAME),
AS_VAR_SET(want_spkg, [$enableval]),
AS_VAR_SET(want_spkg, [yes])
)
], [
dnl optional/experimental packages
AC_ARG_ENABLE(SPKG_NAME,
AS_HELP_STRING([--enable-]SPKG_NAME={no|if_installed|yes},
[enable build and use of the $2 package ]SPKG_NAME[ (default: "if_installed")])
AS_HELP_STRING([], [package information: ./sage -info ]SPKG_NAME)
AS_HELP_STRING([--disable-]SPKG_NAME,
[disable build and uninstall if previously installed by Sage in PREFIX; same as --enable-]SPKG_NAME[=no]),
AS_VAR_SET(want_spkg, [$enableval]),
AS_VAR_SET(want_spkg, [if_installed])
)
)
])
AS_VAR_SET([is_installed], [no])
for f in "$SAGE_SPKG_INST/SPKG_NAME"-*; do
Expand Down

0 comments on commit c73460c

Please sign in to comment.