-
-
Notifications
You must be signed in to change notification settings - Fork 482
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Trac #30383: Add "configure --disable-notebook"; show descriptions of…
… optional packages in "configure --help" We refactor the code in `sage_spkg_enable.m4` and `sage_spkg_collect.m4` so that it becomes possible to add `configure --disable-SPKG` options to disable standard packages. This also simplifies `build/make/Makefile.in` slightly because it no longer has to make a distinction between standard and optional packages. We demonstrate this by adding one such option, `configure --disable- notebook`, which disables building the Jupyter `notebook` package ... and all of its exclusive dependencies. This is useful for people who want to use the system Jupyter notebook -- the Jupyter kernel is still built and can be installed there. The new option appears before the `--enable...` options for optional packages. We also make the configure help a bit more informative (by including the 1-line descriptions of the optional packages) and prettier. {{{ $ ./configure --help ... Optional Features: --disable-option-checking ignore unrecognized --enable/--with options --disable-FEATURE do not include FEATURE (same as --enable- FEATURE=no) --enable-FEATURE[=ARG] include FEATURE [ARG=yes] ... --enable-experimental-packages allow installing experimental packages (default: no = ask for user confirmation for each package) --enable-download-from-upstream-url allow downloading packages from their upstream URL if they cannot be found on the Sage mirrors --disable-notebook disable build of the Jupyter notebook and related packages --enable-4ti2={no|if_installed (default)|yes} enable build and use of the optional package 4ti2: Algebraic, geometric and combinatorial problems on linear spaces * package info: ./sage -info 4ti2 --disable-4ti2 disable build and uninstall if previously installed by Sage in PREFIX; same as --enable-4ti2=no --enable-atlas={no|if_installed (default)|yes} enable build and use of the optional package atlas: Automatically Tuned Linear Algebra Software (BLAS implementation) * package info: ./sage -info atlas --disable-atlas disable build and uninstall if previously installed by Sage in PREFIX; same as --enable-atlas=no --enable-awali={no|if_installed (default)|yes} enable build and use of the experimental package awali: Computation of/with finite state machines * package info: ./sage -info awali --disable-awali disable build and uninstall if previously installed by Sage in PREFIX; same as --enable-awali=no }}} This is also preparation for #30556 (packages that will not work without openssl), and for testing modularized installs (#30778, #29864). URL: https://trac.sagemath.org/30383 Reported by: mkoeppe Ticket author(s): Matthias Koeppe Reviewer(s): John Palmieri, Dima Pasechnik
- Loading branch information
Showing
5 changed files
with
85 additions
and
70 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,31 +1,25 @@ | ||
AC_DEFUN([SAGE_SPKG_ENABLE], [ | ||
m4_pushdef([SPKG_NAME], [$1]) | ||
m4_pushdef([SPKG_TYPE], [$2]) | ||
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) | ||
AC_DEFUN([SAGE_SPKG_ENABLE], [dnl | ||
m4_pushdef([SPKG_NAME], [$1])dnl | ||
m4_pushdef([SPKG_TYPE], [$2])dnl | ||
m4_if(SPKG_TYPE, [standard], [dnl | ||
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([SAGE_ENABLE_]SPKG_NAME, [$enableval]) | ||
) | ||
], [dnl | ||
dnl optional/experimental packages | ||
AC_ARG_ENABLE(SPKG_NAME, | ||
AS_HELP_STRING([--enable-]SPKG_NAME={no|if_installed (default)|yes}, | ||
[enable build and use of the SPKG_TYPE package $3], [26], [100]) | ||
AS_HELP_STRING([], [* package info: ./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 | ||
AS_IF([test -r "$f"], | ||
[AS_VAR_SET([is_installed], [yes])]) | ||
done | ||
AS_IF([test "$want_spkg" = if_installed], | ||
[AS_VAR_SET([want_spkg], $is_installed)]) | ||
spkg_line=" \\$(printf '\n ')SPKG_NAME" | ||
AS_CASE([$is_installed-$want_spkg], | ||
[*-yes], [AS_VAR_APPEND(SAGE_OPTIONAL_INSTALLED_PACKAGES, "$spkg_line")], | ||
[yes-no], [AS_VAR_APPEND(SAGE_OPTIONAL_CLEANED_PACKAGES, "$spkg_line")]) | ||
AS_VAR_SET([SAGE_ENABLE_]SPKG_NAME, [$want_spkg]) | ||
AC_SUBST([SAGE_ENABLE_]SPKG_NAME) | ||
m4_popdef([SPKG_TYPE]) | ||
m4_popdef([SPKG_NAME]) | ||
[disable build and uninstall if previously installed by Sage in PREFIX; same as --enable-]SPKG_NAME[=no], [26], [100]), | ||
AS_VAR_SET([SAGE_ENABLE_]SPKG_NAME, [$enableval]) | ||
) | ||
])dnl | ||
m4_popdef([SPKG_TYPE])dnl | ||
m4_popdef([SPKG_NAME])dnl | ||
]) |