#!/bin/bash # # mklove builtin checks and options # Sets: # prefix, etc.. mkl_option "Standard" prefix "--prefix=PATH" \ "Install arch-independent files in PATH" "/usr/local" mkl_option "Standard" exec_prefix "--exec-prefix=PATH" \ "Install arch-dependent files in PATH" "\$prefix" mkl_option "Standard" bindir "--bindir=PATH" "User executables" "\$exec_prefix/bin" mkl_option "Standard" sbindir "--sbindir=PATH" "System admin executables" \ "\$exec_prefix/sbin" mkl_option "Standard" libexecdir "--libexecdir=PATH" "Program executables" \ "\$exec_prefix/libexec" mkl_option "Standard" datadir "--datadir=PATH" "Read-only arch-independent data" \ "\$prefix/share" mkl_option "Standard" sysconfdir "--sysconfdir=PATH" "Configuration data" \ "\$prefix/etc" mkl_option "Standard" sharedstatedir "--sharedstatedir=PATH" \ "Modifiable arch-independent data" "\$prefix/com" mkl_option "Standard" localstatedir "--localstatedir=PATH" \ "Modifiable local state data" "\$prefix/var" mkl_option "Standard" libdir "--libdir=PATH" "Libraries" "\$exec_prefix/lib" mkl_option "Standard" includedir "--includedir=PATH" "C/C++ header files" \ "\$prefix/include" mkl_option "Standard" infodir "--infodir=PATH" "Info documentation" "\$prefix/info" mkl_option "Standard" mandir "--mandir=PATH" "Manual pages" "\$prefix/man" mkl_option "Configure tool" "" "--list-modules" "List loaded mklove modules" mkl_option "Configure tool" "" "--list-checks" "List checks" mkl_option "Configure tool" env:MKL_FAILFATAL "--fail-fatal" "All failures are fatal" mkl_option "Configure tool" env:MKL_NOCACHE "--no-cache" "Dont use or generate config.cache" mkl_option "Configure tool" env:MKL_DEBUG "--debug" "Enable configure debugging" mkl_option "Configure tool" env:MKL_CLEAN "--clean" "Remove generated configure files" mkl_option "Configure tool" "" "--reconfigure" "Rerun configure with same arguments as last run" mkl_option "Configure tool" env:MKL_NO_DOWNLOAD "--no-download" "Disable downloads of required mklove modules" mkl_option "Configure tool" env:MKL_UPDATE_MODS "--update-modules" "Update modules from global repository" mkl_option "Configure tool" env:MKL_REPO_URL "--repo-url=URL_OR_PATH" "Override mklove modules repo URL" "$MKL_REPO_URL" mkl_option "Configure tool" "" "--help" "Show configure usage" mkl_toggle_option "Compatibility" "mk:MKL_MAINT_MODE" "--enable-maintainer-mode" "Maintainer mode (no-op)" mkl_option "Configure tool" "mk:PROGRAM_PREFIX" "--program-prefix=PFX" "Program prefix" mkl_option "Compatibility" "mk:DISABL_DEP_TRACK" "--disable-dependency-tracking" "Disable dependency tracking (no-op)" mkl_option "Compatibility" "mk:DISABL_SILENT_RULES" "--disable-silent-rules" "Verbose build output (no-op)" function checks { if [[ ! -z $libdir ]]; then mkl_mkvar_append "libdir" LDFLAGS "-L${libdir}" fi if [[ ! -z $includedir ]]; then mkl_mkvar_append "includedir" CPPFLAGS "-I${includedir}" fi }