| 1 | #! /bin/shscip-shell filesystem . . `/bin/sh`. |
| 2 | # Usage: configure [options] [dirname [cc]] |
| 3 | # Examples: |
| 4 | # configure obj |
| 5 | # CC=gcc configure make.gcc |
| 6 | # CC=cc configure make.cc |
| 7 | # configure make.gcc gcc (deprecated) |
| 8 | # configure make.cc cc (deprecated) |
| 9 | |
| 10 | # we source config.cache, therefore this file must be executed by the |
| 11 | # same shell as executes sub-configures. |
| 12 | # this is a real problem on such systems as Solaris if CONFIG_SHELL is |
| 13 | # bash whose config.cache cannot be loaded by /bin/sh |
| 14 | if testscip-shell system . . test. -z "${CONFIG_SHELL}" && testscip-shell system . . test. "`unamescip-shell system . . uname. -s`" = SunOS; then |
| 15 | # On Solaris, /bin/sh is broken. We need bash. |
| 16 | if testscip-shell system . . test. -f /bin/bashscip-shell filesystem . . `/bin/bash`.; then |
| 17 | CONFIG_SHELL=/bin/bashscip-shell filesystem . . `/bin/bash`. |
| 18 | else |
| 19 | CONFIG_SHELL=`whichscip-shell system . . which. bash` |
| 20 | fi |
| 21 | export CONFIG_SHELL |
| 22 | fi |
| 23 | if testscip-shell system . . test. -n "${CONFIG_SHELL}"; then |
| 24 | # ensure that CONFIG_SHELL is compatible with /bin/sh: |
| 25 | # if CONFIG_SHELL is bash, but /bin/sh is not, restart with bash |
| 26 | if testscip-shell system . . test. -n "`${CONFIG_SHELL} --version 2>/dev/nullscip-shell filesystem . . `/dev/null`. | grepscip-shell system . . grep. bash 2>/dev/nullscip-shell filesystem . . `/dev/null`.`" |
| 27 | then # CONFIG_SHELL is bash |
| 28 | testscip-shell system . . test. -n "${BASH_VERSION}" || exec ${CONFIG_SHELL} "$0" "$@" |
| 29 | fi |
| 30 | else |
| 31 | CONFIG_SHELL=/bin/shscip-shell filesystem . . `/bin/sh`. |
| 32 | fi |
| 33 | |
| 34 | # Download location of the newest libsigsegv release. |
| 35 | libsigsegv_url='https://ftp.gnu.org/gnu/libsigsegv/libsigsegv-2.15.tar.gz' |
| 36 | |
| 37 | failscip-shell shell clisp 1:2.49.20250504.gitf662209-2 fail(). () { echoscip-shell system . . echo. "$*" >&2; exit 1; } |
| 38 | |
| 39 | info_helpscip-shell shell clisp 1:2.49.20250504.gitf662209-2 info_help(). () { |
| 40 | catscip-shell system . . cat. << \EOP |
| 41 | Usage: configure [options] [dirname] |
| 42 | dirname: Name of directory in which to build CLISP. This allows you to build |
| 43 | CLISP with different compilers on the same machine or for different |
| 44 | architectures in the same filesystem, sharing the same source. |
| 45 | Default is "src". |
| 46 | options: The following options are recognized: |
| 47 | --help print this message and exit |
| 48 | --version print the CLISP version and exit |
| 49 | --config unix/INSTALL step 3: configuration only |
| 50 | --cbc unix/INSTALL steps 3-8: Configure, Build, Check |
| 51 | --cbcx Configure, Build, Check, Extra checks |
| 52 | The following options set installation parameters: |
| 53 | --srcdir=SRCDIR sets the source directory to SRCDIR |
| 54 | The following options are passed to subordinate `configure' scripts: |
| 55 | --quiet, --silent do not print `checking...' messages |
| 56 | Installation directories: |
| 57 | --prefix=PREFIX base directory for files to be installed |
| 58 | --exec-prefix=PREFIX base directory for architecture-dependent |
| 59 | files to be installed |
| 60 | --fsstnd=STYLE specify file system standard for installation |
| 61 | Fine tuning of the installation directories: |
| 62 | --bindir=DIR user executables |
| 63 | --libdir=DIR object code libraries |
| 64 | --includedir=DIR C header files |
| 65 | --datarootdir=DIR read-only arch.-independent data root |
| 66 | --datadir=DIR read-only architecture-independent data |
| 67 | --localedir=DIR locale-dependent data |
| 68 | --mandir=DIR man documentation |
| 69 | --infodir=DIR info documentation |
| 70 | --docdir=DIR documentation root |
| 71 | --htmldir=DIR html documentation |
| 72 | --dvidir=DIR TeX DVI documentation |
| 73 | --pdfdir=DIR PDF documentation |
| 74 | --psdir=DIR PostScript documentation |
| 75 | --elispdir=DIR Emacs Lisp files |
| 76 | --vimdir=DIR VIM files |
| 77 | --aclocaldir=DIR autoconf files |
| 78 | Enable and disable specific packages |
| 79 | --with-PACKAGE use PACKAGE |
| 80 | --without-PACKAGE do not use PACKAGE |
| 81 | PACKAGEs available (the default is the opposite of the following): |
| 82 | --without-ffcall do not support Foreign Function Interface |
| 83 | the default is to support it when available |
| 84 | --without-dynamic-modules no Dynamic Modules support |
| 85 | --without-unicode no Unicode support: character=8bit |
| 86 | --without-readline do not link with GNU readline |
| 87 | --with-threads=FLAVOR support multiple threads in one CLISP image |
| 88 | via OS threads [highly experimental - use at your own risk] |
| 89 | FLAVOR: POSIX_THREADS SOLARIS_THREADS WIN32_THREADS |
| 90 | --with-jitc=FLAVOR use a given Just-In-Time Compiler. |
| 91 | The only flavor at this time is lightning |
| 92 | (GNU lightning must be installed in the standard place). |
| 93 | --with-module=MODULE build with add-on MODULE |
| 94 | --help-modules list the modules included in the distribution |
| 95 | and information on building them |
| 96 | --hyperspec=URL the path to the Common Lisp HyperSpec (the default is |
| 97 | http://www.ai.mit.edu/projects/iiip/doc/CommonLISP/HyperSpec/ |
| 98 | or the value of the environment variable CLHSROOT, if set) |
| 99 | --enable-portability favour portability over optimization: disable |
| 100 | optimizations that could lead to build failures |
| 101 | --with-gmalloc use the GNU malloc instead of of the libc one |
| 102 | (needed on OpenBSD) |
| 103 | --with-debug if you will need to debug the C sources |
| 104 | --edit-config edit config.lisp with ${EDITOR:-vi} before make |
| 105 | (useful with --cbc) |
| 106 | System types: |
| 107 | --build=BUILD configure for building on BUILD [guessed] |
| 108 | --host=HOST cross-compile to build programs to run on HOST [BUILD] |
| 109 | |
| 110 | You can specify the location of dependencies using |
| 111 | EOP |
| 112 | |
| 113 | `dirnamescip-shell system . . dirname. $0`/src/configure --help | grepscip-shell system . . grep. 'with.*prefix' |
| 114 | |
| 115 | catscip-shell system . . cat. << \EOP |
| 116 | See also the --help-modules option. |
| 117 | |
| 118 | Example: |
| 119 | configure --cbc built-with-gcc |
| 120 | su bin |
| 121 | cd built-with-gcc |
| 122 | make install |
| 123 | exit |
| 124 | Specifying the C compiler: |
| 125 | If you wish to specify the C compiler that will get used to build |
| 126 | CLISP, set the environment variables CC, CFLAGS, LIBS. |
| 127 | Put compiler flags that have to be passed to the preprocessor |
| 128 | into the CC variable, not the CFLAGS variable. |
| 129 | For example, if you want to use gcc in ANSI C mode, |
| 130 | execute the following before calling `configure': |
| 131 | setenv CC "gcc -ansi" if using csh |
| 132 | export CC="gcc -ansi" if using bash or ksh |
| 133 | CC="gcc -ansi"; export CC if using sh |
| 134 | If you have headers in a nonstandard directory <include dir> |
| 135 | set CPPFLAGS to "-I<include dir>" |
| 136 | If you have libraries in a nonstandard directory <lib dir> |
| 137 | set LDFLAGS to "-L<lib dir>" |
| 138 | Using GNU libiconv (only needed if you do not have GNU LIBC 2.2 or better): |
| 139 | If you want to use GNU libiconv which is not installed system-wide, |
| 140 | you may supply a --with-libiconv-prefix argument |
| 141 | (type './src/configure --help' for details). |
| 142 | The same goes for non-standard locations of libintl and libsigsegv. |
| 143 | EOP |
| 144 | } |
| 145 | |
| 146 | # Abort in case something fails. |
| 147 | set -e |
| 148 | |
| 149 | # Nuisances. |
| 150 | (unset CDPATH) >/dev/nullscip-shell filesystem . . `/dev/null`. 2>&1 && unset CDPATH |
| 151 | |
| 152 | srcdir='' |
| 153 | # http://www.gnu.org/software/autoconf/manual/html_node/Option-Checking.html |
| 154 | subdir_configure_args='--disable-option-checking' |
| 155 | have_explicit_libsigsegv_args=false |
| 156 | have_explicit_libffcall_args=false |
| 157 | makemake_args='' |
| 158 | do_config='' |
| 159 | do_cbc='' |
| 160 | argcount=0 |
| 161 | edit_config='' |
| 162 | |
| 163 | prev='' |
| 164 | passnext='' |
| 165 | do_ffi='default' |
| 166 | target='' |
| 167 | ignore_absence_of_libsigsegv='' |
| 168 | |
| 169 | prefix="/usr/localscip-shell filesystem . . `/usr/local`." |
| 170 | exec_prefix=${prefix} |
| 171 | |
| 172 | getargscip-shell shell clisp 1:2.49.20250504.gitf662209-2 getarg().(){ echoscip-shell system . . echo. "$1" | sedscip-shell system . . sed. 's,^[-_a-zA-Z0-9]*=,,'; } |
| 173 | |
| 174 | all_modules='' |
| 175 | note_modulescip-shell shell clisp 1:2.49.20250504.gitf662209-2 note_module().(){ |
| 176 | all_modules=${all_modules}" $1" |
| 177 | makemake_args=${makemake_args}" --with-module=$1" |
| 178 | } |
| 179 | |
| 180 | explicit_prefix='' |
| 181 | note_prefixscip-shell shell clisp 1:2.49.20250504.gitf662209-2 note_prefix().(){ |
| 182 | explicit_prefix="$1" |
| 183 | } |
| 184 | |
| 185 | for arg # in "$@" |
| 186 | do |
| 187 | # If the previous option needs an argument, assign it. |
| 188 | if testscip-shell system . . test. -n "$prev"; then |
| 189 | # If the previous option needs an argument for subdir configures or |
| 190 | # makemake, pass it, otherwise set the variable |
| 191 | case "$passnext" in |
| 192 | configure) |
| 193 | subdir_configure_args="$subdir_configure_args $arg" |
| 194 | ;; |
| 195 | makemake) |
| 196 | makemake_args="$makemake_args$arg" |
| 197 | ;; |
| 198 | both) |
| 199 | makemake_args="$makemake_args$arg" |
| 200 | subdir_configure_args="$subdir_configure_args $arg" |
| 201 | if testscip-shell system . . test. "$prev" = prefix; then |
| 202 | note_prefixscip-shell shell clisp 1:2.49.20250504.gitf662209-2 note_prefix(). "$arg" |
| 203 | fi |
| 204 | ;; |
| 205 | with-module) |
| 206 | note_modulescip-shell shell clisp 1:2.49.20250504.gitf662209-2 note_module(). $arg |
| 207 | ;; |
| 208 | *) eval "$prev=\$arg" ;; |
| 209 | esac |
| 210 | passnext='' |
| 211 | prev='' |
| 212 | else |
| 213 | |
| 214 | case "$arg" in |
| 215 | |
| 216 | --cbc) |
| 217 | do_config=1 |
| 218 | do_cbc=1 ;; |
| 219 | |
| 220 | --cbcx) |
| 221 | do_config=1 |
| 222 | do_cbc=2 ;; |
| 223 | |
| 224 | --config | --confi | --conf | --con | --co) |
| 225 | do_config=1 ;; |
| 226 | |
| 227 | --edit-config | --edit-confi | --edit-conf | --edit-con | --edit-co | \ |
| 228 | --edit-c | --edit- | --edit | --edi | --ed) |
| 229 | edit_config=1 ;; |
| 230 | |
| 231 | --help | --hel | --he) |
| 232 | info_helpscip-shell shell clisp 1:2.49.20250504.gitf662209-2 info_help(). |
| 233 | exit 0 ;; |
| 234 | |
| 235 | --version | --versio | --versi | --vers | --ver | --ve | --v) |
| 236 | ./src/configure --version |
| 237 | exit 0 ;; |
| 238 | |
| 239 | --help-modules | --help-module | --help-modul | --help-modu | --help-mod | --help-mo | --help-m) |
| 240 | set +e |
| 241 | MODDIR=modules |
| 242 | echoscip-shell system . . echo. "module sets found in the directory '${MODDIR}':" |
| 243 | MODLIST=`findscip-shell system . . find. ${MODDIR} -name link.sh -o -name link.sh.in | sedscip-shell system . . sed. -e 's,^${MODDIR}/,,' -e 's,/[^/]*$,,' | sortscip-shell system . . sort.` |
| 244 | for m in ${MODLIST}; do echoscip-shell system . . echo. " "${m}; done |
| 245 | echoscip-shell system . . echo. "to specify the location of external software:" |
| 246 | for m in src ${MODLIST}; do |
| 247 | CFG=./${m}/configure |
| 248 | if [scip-shell system . . `[`. -x ${CFG} ]; then |
| 249 | tmp=${CFG}.with |
| 250 | ${CFG} --help | grepscip-shell system . . grep. ' --with-[a-zA-Z0-8]*-prefix' > ${tmp} |
| 251 | if testscip-shell system . . test. -s ${tmp}; then |
| 252 | echoscip-shell system . . echo. "* ${m} (try also '${CFG} --help')" |
| 253 | catscip-shell system . . cat. ${tmp} |
| 254 | fi |
| 255 | rmscip-shell system . . rm. -f ${tmp} |
| 256 | fi |
| 257 | done |
| 258 | exit 0 ;; |
| 259 | |
| 260 | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*) |
| 261 | srcdir=`getargscip-shell shell clisp 1:2.49.20250504.gitf662209-2 getarg(). "$arg"` ;; |
| 262 | |
| 263 | --srcdir | --srcdi | --srcd | --src | --sr) |
| 264 | prev=srcdir |
| 265 | passnext=configure ;; |
| 266 | |
| 267 | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=*) |
| 268 | subdir_configure_args="$subdir_configure_args $arg" |
| 269 | prefix=`getargscip-shell shell clisp 1:2.49.20250504.gitf662209-2 getarg(). "$arg"` |
| 270 | note_prefixscip-shell shell clisp 1:2.49.20250504.gitf662209-2 note_prefix(). "${prefix}" |
| 271 | makemake_args="$makemake_args --prefix=${prefix}" ;; |
| 272 | |
| 273 | --prefix | --prefi | --pref | --pre | --pr) |
| 274 | subdir_configure_args="$subdir_configure_args $arg" |
| 275 | makemake_args="$makemake_args --prefix=" |
| 276 | prev=prefix |
| 277 | passnext=both ;; |
| 278 | |
| 279 | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* | -exec=* | --exe=* | --ex=*) |
| 280 | subdir_configure_args="$subdir_configure_args $arg" |
| 281 | exec_prefix=`getargscip-shell shell clisp 1:2.49.20250504.gitf662209-2 getarg(). "$arg"` |
| 282 | makemake_args="$makemake_args --exec-prefix="${exec_prefix} ;; |
| 283 | |
| 284 | --exec_prefix | --exec-prefix | --exec-prefi | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- | -exec | --exe | --ex) |
| 285 | subdir_configure_args="$subdir_configure_args $arg" |
| 286 | makemake_args="$makemake_args --exec-prefix=" |
| 287 | prev=exec_prefix |
| 288 | passnext=both ;; |
| 289 | |
| 290 | --fsstnd=* | --fsstn=* | --fsst=* | --fss=* | --fs=* | --f=*) |
| 291 | makemake_args="$makemake_args --fsstnd="`getargscip-shell shell clisp 1:2.49.20250504.gitf662209-2 getarg(). "$arg"` ;; |
| 292 | |
| 293 | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*) |
| 294 | subdir_configure_args="$subdir_configure_args $arg" |
| 295 | makemake_args="$makemake_args --bindir="`getargscip-shell shell clisp 1:2.49.20250504.gitf662209-2 getarg(). "$arg"` ;; |
| 296 | |
| 297 | --bindir | --bindi | --bind | --bin | --bi) |
| 298 | subdir_configure_args="$subdir_configure_args $arg" |
| 299 | makemake_args="$makemake_args --bindir=" |
| 300 | prev=bindir |
| 301 | passnext=both ;; |
| 302 | |
| 303 | --libdir=* | --libdi=* | --libd=* | --lib=*) |
| 304 | subdir_configure_args="$subdir_configure_args $arg" |
| 305 | makemake_args="$makemake_args --libdir="`getargscip-shell shell clisp 1:2.49.20250504.gitf662209-2 getarg(). "$arg"` ;; |
| 306 | |
| 307 | --libdir | --libdi | --libd | --lib) |
| 308 | subdir_configure_args="$subdir_configure_args $arg" |
| 309 | makemake_args="$makemake_args --libdir=" |
| 310 | prev=libdir |
| 311 | passnext=both ;; |
| 312 | |
| 313 | --includedir=* | --includedi=* | --included=* | --include=* | --includ=* | --inclu=* | --incl=* | --inc=*) |
| 314 | subdir_configure_args="$subdir_configure_args $arg" |
| 315 | makemake_args="$makemake_args --includedir="`getargscip-shell shell clisp 1:2.49.20250504.gitf662209-2 getarg(). "$arg"` ;; |
| 316 | |
| 317 | --includedir | --includedi | --included | --include | --includ | --inclu | --incl | --inc) |
| 318 | subdir_configure_args="$subdir_configure_args $arg" |
| 319 | makemake_args="$makemake_args --includedir=" |
| 320 | prev=includedir |
| 321 | passnext=both ;; |
| 322 | |
| 323 | --datarootdir=* | --datarootdi=* | --datarootd=* | --dataroot=* | --dataroo=* | --dataro=* | --datar=*) |
| 324 | subdir_configure_args="$subdir_configure_args $arg" |
| 325 | makemake_args="$makemake_args --datarootdir="`getargscip-shell shell clisp 1:2.49.20250504.gitf662209-2 getarg(). "$arg"` ;; |
| 326 | |
| 327 | --datarootdir | --datarootdi | --datarootd | --dataroot | --dataroo | --dataro | --datar) |
| 328 | subdir_configure_args="$subdir_configure_args $arg" |
| 329 | makemake_args="$makemake_args --datarootdir=" |
| 330 | prev=datarootdir |
| 331 | passnext=both ;; |
| 332 | |
| 333 | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* | --da=*) |
| 334 | subdir_configure_args="$subdir_configure_args $arg" |
| 335 | makemake_args="$makemake_args --datadir="`getargscip-shell shell clisp 1:2.49.20250504.gitf662209-2 getarg(). "$arg"` ;; |
| 336 | |
| 337 | --datadir | --datadi | --datad | --data | --dat | --da) |
| 338 | subdir_configure_args="$subdir_configure_args $arg" |
| 339 | makemake_args="$makemake_args --datadir=" |
| 340 | prev=datadir |
| 341 | passnext=both ;; |
| 342 | |
| 343 | --localedir=* | --localedi=* | --localed=* | --locale=* | --local=* | --loca=* | --loc=* | --lo=*) |
| 344 | subdir_configure_args="$subdir_configure_args $arg" |
| 345 | makemake_args="$makemake_args --localedir="`getargscip-shell shell clisp 1:2.49.20250504.gitf662209-2 getarg(). "$arg"` ;; |
| 346 | |
| 347 | --localedir | --localedi | --localed | --locale | --local | --loca | --loc | --lo) |
| 348 | subdir_configure_args="$subdir_configure_args $arg" |
| 349 | makemake_args="$makemake_args --localedir=" |
| 350 | prev=localedir |
| 351 | passnext=both ;; |
| 352 | |
| 353 | --docdir=* | --docdi=* | --docd=* | --doc=* | --do=*) |
| 354 | subdir_configure_args="$subdir_configure_args $arg" |
| 355 | makemake_args="$makemake_args --docdir="`getargscip-shell shell clisp 1:2.49.20250504.gitf662209-2 getarg(). "$arg"` ;; |
| 356 | |
| 357 | --docdir | --docdi | --docd | --doc | --do) |
| 358 | subdir_configure_args="$subdir_configure_args $arg" |
| 359 | makemake_args="$makemake_args --docdir=" |
| 360 | prev=docdir |
| 361 | passnext=both ;; |
| 362 | |
| 363 | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*) |
| 364 | subdir_configure_args="$subdir_configure_args $arg" |
| 365 | makemake_args="$makemake_args --mandir="`getargscip-shell shell clisp 1:2.49.20250504.gitf662209-2 getarg(). "$arg"` ;; |
| 366 | |
| 367 | --mandir | --mandi | --mand | --man | --ma | --m) |
| 368 | subdir_configure_args="$subdir_configure_args $arg" |
| 369 | makemake_args="$makemake_args --mandir=" |
| 370 | prev=mandir |
| 371 | passnext=both ;; |
| 372 | |
| 373 | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*) |
| 374 | subdir_configure_args="$subdir_configure_args $arg" |
| 375 | makemake_args="$makemake_args --infodir="`getargscip-shell shell clisp 1:2.49.20250504.gitf662209-2 getarg(). "$arg"` ;; |
| 376 | |
| 377 | --infodir | --infodi | --infod | --info | --inf) |
| 378 | subdir_configure_args="$subdir_configure_args $arg" |
| 379 | makemake_args="$makemake_args --infodir=" |
| 380 | prev=infodir |
| 381 | passnext=both ;; |
| 382 | |
| 383 | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* | --ht=*) |
| 384 | subdir_configure_args="$subdir_configure_args $arg" |
| 385 | makemake_args="$makemake_args --htmldir="`getargscip-shell shell clisp 1:2.49.20250504.gitf662209-2 getarg(). "$arg"` ;; |
| 386 | |
| 387 | --htmldir | --htmldi | --htmld | --html | --htm | --ht) |
| 388 | subdir_configure_args="$subdir_configure_args $arg" |
| 389 | makemake_args="$makemake_args --htmldir=" |
| 390 | prev=htmldir |
| 391 | passnext=both ;; |
| 392 | |
| 393 | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*) |
| 394 | subdir_configure_args="$subdir_configure_args $arg" |
| 395 | makemake_args="$makemake_args --dvidir="`getargscip-shell shell clisp 1:2.49.20250504.gitf662209-2 getarg(). "$arg"` ;; |
| 396 | |
| 397 | --dvidir | --dvidi | --dvid | --dvi | --dv) |
| 398 | subdir_configure_args="$subdir_configure_args $arg" |
| 399 | makemake_args="$makemake_args --dvidir=" |
| 400 | prev=dvidir |
| 401 | passnext=both ;; |
| 402 | |
| 403 | --psdir=* | --psdi=* | --psd=* | --ps=*) |
| 404 | subdir_configure_args="$subdir_configure_args $arg" |
| 405 | makemake_args="$makemake_args --psdir="`getargscip-shell shell clisp 1:2.49.20250504.gitf662209-2 getarg(). "$arg"` ;; |
| 406 | |
| 407 | --psdir | --psdi | --psd | --ps) |
| 408 | subdir_configure_args="$subdir_configure_args $arg" |
| 409 | makemake_args="$makemake_args --psdir=" |
| 410 | prev=psdir |
| 411 | passnext=both ;; |
| 412 | |
| 413 | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*) |
| 414 | subdir_configure_args="$subdir_configure_args $arg" |
| 415 | makemake_args="$makemake_args --pdfdir="`getargscip-shell shell clisp 1:2.49.20250504.gitf662209-2 getarg(). "$arg"` ;; |
| 416 | |
| 417 | --pdfdir | --pdfdi | --pdfd | --pdf | --pd) |
| 418 | subdir_configure_args="$subdir_configure_args $arg" |
| 419 | makemake_args="$makemake_args --pdfdir=" |
| 420 | prev=pdfdir |
| 421 | passnext=both ;; |
| 422 | |
| 423 | --elispdir=* | --elispdi=* | --elispd=* | --elisp=* | --elis=* | --eli=* | --el=*) |
| 424 | makemake_args="$makemake_args --elispdir="`getargscip-shell shell clisp 1:2.49.20250504.gitf662209-2 getarg(). "$arg"` ;; |
| 425 | |
| 426 | --elispdir | --elispdi | --elispd | --elisp | --elis | --eli | --el) |
| 427 | makemake_args="$makemake_args --elispdir=" |
| 428 | prev=elispdir |
| 429 | passnext=makemake ;; |
| 430 | |
| 431 | --vimdir=* | --vimdi=* | --vimd=* | --vim=* | --vi=*) |
| 432 | subdir_configure_args="$subdir_configure_args $arg" |
| 433 | makemake_args="$makemake_args --vimdir="`getargscip-shell shell clisp 1:2.49.20250504.gitf662209-2 getarg(). "$arg"` ;; |
| 434 | |
| 435 | --vimdir | --vimdi | --vimd | --vim | --vi) |
| 436 | subdir_configure_args="$subdir_configure_args $arg" |
| 437 | makemake_args="$makemake_args --vimdir=" |
| 438 | prev=vimdir |
| 439 | passnext=both ;; |
| 440 | |
| 441 | --aclocaldir=* | --aclocaldi=* | --aclocald=* | --aclocal=*) |
| 442 | subdir_configure_args="$subdir_configure_args $arg" |
| 443 | makemake_args="$makemake_args --aclocaldir="`getargscip-shell shell clisp 1:2.49.20250504.gitf662209-2 getarg(). "$arg"` ;; |
| 444 | |
| 445 | --aclocaldir | --aclocaldi | --aclocald | --aclocal) |
| 446 | subdir_configure_args="$subdir_configure_args $arg" |
| 447 | makemake_args="$makemake_args --aclocaldir=" |
| 448 | prev=aclocaldir |
| 449 | passnext=both ;; |
| 450 | |
| 451 | --hyperspec=* | --hyperspe=* | --hypersp=* | --hypers=* | --hs=* | --hy=*) |
| 452 | makemake_args="$makemake_args --hyperspec="`getargscip-shell shell clisp 1:2.49.20250504.gitf662209-2 getarg(). "$arg"` ;; |
| 453 | |
| 454 | --quiet | --quie | --qui | --qu | --q | \ |
| 455 | --silent | --silen | --sile | --sil | --si) |
| 456 | subdir_configure_args="$subdir_configure_args $arg" ;; |
| 457 | |
| 458 | --host=* | --hos=* | --ho=*) |
| 459 | subdir_configure_args="$subdir_configure_args $arg" ;; |
| 460 | |
| 461 | --host | --hos | --ho) |
| 462 | subdir_configure_args="$subdir_configure_args $arg" |
| 463 | prev=host |
| 464 | passnext=configure ;; |
| 465 | |
| 466 | --build=* | --buil=* | --bui=* | --bu=*) |
| 467 | subdir_configure_args="$subdir_configure_args $arg" ;; |
| 468 | |
| 469 | --build | --buil | --bui | --bu) |
| 470 | subdir_configure_args="$subdir_configure_args $arg" |
| 471 | prev=build |
| 472 | passnext=configure ;; |
| 473 | |
| 474 | --with-debug) |
| 475 | makemake_args="--verbose=yes --with-debug $makemake_args" ;; |
| 476 | |
| 477 | --without-ffcall | --with-ffcall=no | --with-no-ffcall) |
| 478 | subdir_configure_args="$subdir_configure_args $arg" |
| 479 | do_ffi="no" ;; |
| 480 | |
| 481 | --with-ffcall | --with-ffcall=yes) |
| 482 | subdir_configure_args="$subdir_configure_args $arg" |
| 483 | do_ffi="yes" ;; |
| 484 | |
| 485 | --without-dynamic-modules | --with-dynamic-modules=no) |
| 486 | makemake_args="--with-dynamic-modules=no ${makemake_args}" ;; |
| 487 | |
| 488 | --with-mingw | --with-no-cygwin | --without-cygwin | --with-cygwin=no) |
| 489 | echoscip-shell system . . echo. "$0: $arg is deprecated; use --build= or CC=... instead" |
| 490 | CC="${CC:-gcc} -mno-cygwin"; export CC; |
| 491 | makemake_args="$makemake_args --win32gcc" ;; |
| 492 | |
| 493 | --with-module=*) note_modulescip-shell shell clisp 1:2.49.20250504.gitf662209-2 note_module(). `getargscip-shell shell clisp 1:2.49.20250504.gitf662209-2 getarg(). $arg` ;; |
| 494 | |
| 495 | --with-module) |
| 496 | prev=with-module |
| 497 | passnext=with-module ;; |
| 498 | |
| 499 | --with-* | --without-*) |
| 500 | subdir_configure_args="$subdir_configure_args $arg" |
| 501 | makemake_args="$makemake_args $arg" |
| 502 | case "$arg" in |
| 503 | --with-libsigsegv-prefix* | --without-libsigsegv-prefix*) have_explicit_libsigsegv_args=true ;; |
| 504 | --with-libffcall-prefix* | --without-libffcall-prefix*) have_explicit_libffcall_args=true ;; |
| 505 | esac |
| 506 | ;; |
| 507 | |
| 508 | --enable-* | --disable-*) |
| 509 | subdir_configure_args="$subdir_configure_args $arg" |
| 510 | makemake_args="$makemake_args $arg" ;; |
| 511 | |
| 512 | --ignore-absence-of-libsigsegv) |
| 513 | ignore_absence_of_libsigsegv=yes ;; |
| 514 | |
| 515 | -*) |
| 516 | failscip-shell shell clisp 1:2.49.20250504.gitf662209-2 fail(). "$0: invalid argument $arg |
| 517 | $0: Try \`$0 --help'" ;; |
| 518 | |
| 519 | *=*) # set a variable |
| 520 | var=`echoscip-shell system . . echo. $arg | sedscip-shell system . . sed. 's/\([^=]*\)=.*/\1/'` |
| 521 | val=`echoscip-shell system . . echo. $arg | sedscip-shell system . . sed. 's/[^=]*=\(.*\)/\1/'` |
| 522 | eval "$var='$val'" |
| 523 | export $var ;; |
| 524 | |
| 525 | *) # Everything else counts as a positional argument |
| 526 | argcount=`exprscip-shell system . . expr. $argcount + 1` |
| 527 | eval "POSARG$argcount=\$arg" ;; |
| 528 | |
| 529 | esac |
| 530 | |
| 531 | fi |
| 532 | done |
| 533 | testscip-shell system . . test. -n "$prev" && failscip-shell shell clisp 1:2.49.20250504.gitf662209-2 fail(). "$0: missing argument to --$prev |
| 534 | $0: Try \`$0 --help'" |
| 535 | |
| 536 | DIRNAME=$POSARG1 |
| 537 | COMPILER=$POSARG2 # deprecated |
| 538 | |
| 539 | if testscip-shell system . . test. -z "$do_config" -a -z "$do_cbc"; then |
| 540 | # Default is --config |
| 541 | do_config=1 |
| 542 | fi |
| 543 | |
| 544 | # Add an implicit --with-libsegsegv-prefix option, based on --prefix, |
| 545 | # if no such option was explicitly given. |
| 546 | $have_explicit_libsigsegv_args || { |
| 547 | if testscip-shell system . . test. -n "$explicit_prefix"; then |
| 548 | subdir_configure_args="$subdir_configure_args --with-libsigsegv-prefix=${explicit_prefix}" |
| 549 | fi |
| 550 | } |
| 551 | |
| 552 | # Add an implicit --with-libffcall-prefix option, based on --prefix, |
| 553 | # if no such option was explicitly given. |
| 554 | $have_explicit_libffcall_args || { |
| 555 | if testscip-shell system . . test. -n "$explicit_prefix"; then |
| 556 | subdir_configure_args="$subdir_configure_args --with-libffcall-prefix=${explicit_prefix}" |
| 557 | fi |
| 558 | } |
| 559 | |
| 560 | # checking how to copy files |
| 561 | echoscip-shell system . . echo. "blabla" > conftest.x |
| 562 | err=`/bin/shscip-shell filesystem . . `/bin/sh`. -c "cp -p conftest.x conftest.y 2>&1 ; exit 0"` |
| 563 | if testscip-shell system . . test. -z "$err"; then |
| 564 | CP='cp -p' |
| 565 | else |
| 566 | CP='cp' |
| 567 | fi |
| 568 | rmscip-shell system . . rm. -f conftest* |
| 569 | |
| 570 | # get the absolute pathname from a possibly relative one |
| 571 | abs_pwdscip-shell shell clisp 1:2.49.20250504.gitf662209-2 abs_pwd(). () { cd "$1" > /dev/nullscip-shell filesystem . . `/dev/null`.; pwdscip-shell system . . pwd.; } |
| 572 | |
| 573 | # link FILE1 FILE2 is like `ln', but chooses the cheapest alternative: |
| 574 | # hard link if FILE1 and FILE2 on the same disk, else symbolic link if the |
| 575 | # system supports that, else file copy. |
| 576 | linkscip-shell shell clisp 1:2.49.20250504.gitf662209-2 link(). () { |
| 577 | rmscip-shell system . . rm. -f "$2"; |
| 578 | # Note: With some versions of "ln" this does not work if FILE2 is a symlink. |
| 579 | if lnscip-shell system . . ln. "$1" "$2" 2>/dev/nullscip-shell filesystem . . `/dev/null`.; then |
| 580 | : |
| 581 | else |
| 582 | srcfile_dirname=`echoscip-shell system . . echo. "$1" | sedscip-shell system . . sed. -e 's,/[^/]*$,,'` |
| 583 | testscip-shell system . . test. -n "$srcfile_dirname" || srcfile_dirname='/scip-shell filesystem . . `/`.' |
| 584 | srcfile_basename=`echoscip-shell system . . echo. "$1" | sedscip-shell system . . sed. -e 's,^.*/,,'` |
| 585 | srcfile_absdirname=`abs_pwdscip-shell shell clisp 1:2.49.20250504.gitf662209-2 abs_pwd(). "$srcfile_dirname"` |
| 586 | if lnscip-shell system . . ln. -s "$srcfile_absdirname/$srcfile_basename" "$2" 2>/dev/nullscip-shell filesystem . . `/dev/null`.; then |
| 587 | : |
| 588 | else |
| 589 | $CP "$1" "$2" |
| 590 | fi |
| 591 | fi |
| 592 | } |
| 593 | |
| 594 | # run n command... |
| 595 | # execute command, redirect to cbcstep${n}.log, and with SUCCEEDED or FAILED |
| 596 | runscip-shell shell clisp 1:2.49.20250504.gitf662209-2 run(). () { |
| 597 | log=$1; shift |
| 598 | { $* && { echoscip-shell system . . echo. "===> $* SUCCEEDED"; exit 0; } || echoscip-shell system . . echo. "===> $* FAILED"; } 2>&1 | teescip-shell system . . tee. cbcstep${log}.log |
| 599 | } |
| 600 | |
| 601 | # Note that we would need to call `/bin/pwd` if we wanted to compare two |
| 602 | # directories for equality. But here we only need to get _some_ absolute |
| 603 | # pathnames, hence `pwd` is enough. |
| 604 | |
| 605 | if testscip-shell system . . test. -f /bin/pwdscip-shell filesystem . . `/bin/pwd`. ; then |
| 606 | ABSPATHPWD=/bin/pwdscip-shell filesystem . . `/bin/pwd`. |
| 607 | else |
| 608 | ABSPATHPWD=pwd |
| 609 | fi |
| 610 | |
| 611 | abs_path_pwdscip-shell shell clisp 1:2.49.20250504.gitf662209-2 abs_path_pwd(). () { cd "$1" > /dev/nullscip-shell filesystem . . `/dev/null`.; ${ABSPATHPWD}; } |
| 612 | |
| 613 | INPLACE='' |
| 614 | if testscip-shell system . . test. -n "$srcdir" ; then |
| 615 | testscip-shell system . . test. -d "$srcdir" || failscip-shell shell clisp 1:2.49.20250504.gitf662209-2 fail(). "$0: srcdir: ($srcdir) nonexistent" |
| 616 | ABS_SRCDIR=`abs_pwdscip-shell shell clisp 1:2.49.20250504.gitf662209-2 abs_pwd(). "$srcdir"`; |
| 617 | if [scip-shell system . . `[`. "$DIRNAME" = "" ] ; then |
| 618 | DIRNAME='.' |
| 619 | fi |
| 620 | mkdirscip-shell system . . mkdir. -p "${DIRNAME}"; |
| 621 | REL_SRCDIR="$ABS_SRCDIR" |
| 622 | else |
| 623 | if testscip-shell system . . test. -f ./ANNOUNCE -a -f ./SUMMARY; then |
| 624 | srcdir='.' |
| 625 | ABS_SRCDIR=`abs_pwdscip-shell shell clisp 1:2.49.20250504.gitf662209-2 abs_pwd(). "$srcdir"` |
| 626 | if [scip-shell system . . `[`. "$DIRNAME" = "" ] ; then |
| 627 | DIRNAME=src |
| 628 | fi |
| 629 | else |
| 630 | testscip-shell system . . test. -f ../ANNOUNCE -a -f ../SUMMARY || \ |
| 631 | fail "$0: source directory not found, use --srcdir option" |
| 632 | srcdir='..' |
| 633 | ABS_SRCDIR=`abs_pwdscip-shell shell clisp 1:2.49.20250504.gitf662209-2 abs_pwd(). "$srcdir"` |
| 634 | if [scip-shell system . . `[`. "$DIRNAME" = "" ] ; then |
| 635 | DIRNAME='.' |
| 636 | fi |
| 637 | fi |
| 638 | mkdirscip-shell system . . mkdir. -p "${DIRNAME}"; |
| 639 | if testscip-shell system . . test. `abs_path_pwdscip-shell shell clisp 1:2.49.20250504.gitf662209-2 abs_path_pwd(). "$DIRNAME"/..` = `abs_path_pwdscip-shell shell clisp 1:2.49.20250504.gitf662209-2 abs_path_pwd(). "$srcdir"` ; then |
| 640 | REL_SRCDIR='..' |
| 641 | else |
| 642 | REL_SRCDIR="$ABS_SRCDIR" |
| 643 | fi |
| 644 | fi |
| 645 | ABS_DIRNAME="`abs_pwdscip-shell shell clisp 1:2.49.20250504.gitf662209-2 abs_pwd(). "$DIRNAME"`"; |
| 646 | if testscip-shell system . . test. "`abs_path_pwdscip-shell shell clisp 1:2.49.20250504.gitf662209-2 abs_path_pwd(). "$DIRNAME"`" = "`abs_path_pwdscip-shell shell clisp 1:2.49.20250504.gitf662209-2 abs_path_pwd(). "$srcdir"/src`" ; then |
| 647 | INPLACE=yes |
| 648 | fi |
| 649 | case "$REL_SRCDIR" in |
| 650 | /*) RREL_SRCDIR="$REL_SRCDIR";; |
| 651 | *) RREL_SRCDIR="../$REL_SRCDIR";; |
| 652 | esac |
| 653 | |
| 654 | # srcdir top level source directory |
| 655 | # (i.e. this script is $srcdir/configure) |
| 656 | # ABS_SRCDIR absolute srcdir |
| 657 | # REL_SRCDIR srcdir, relative to $DIRNAME |
| 658 | # RREL_SRCDIR srcdir, relative to $DIRNAME/anysubdir |
| 659 | # DIRNAME directory in which to build |
| 660 | # ABS_DIRNAME absolute DIRNAME |
| 661 | # INPLACE set if DIRNAME is the source directory, hence no links needed |
| 662 | |
| 663 | if testscip-shell system . . test. -n "$do_config"; then |
| 664 | |
| 665 | cd "$ABS_SRCDIR" |
| 666 | |
| 667 | if [scip-shell system . . `[`. "$COMPILER" != "" ] ; then |
| 668 | CC="$COMPILER" |
| 669 | export CC |
| 670 | fi |
| 671 | if testscip-shell system . . test. -n "$CC"; then |
| 672 | # cygwin comes with a true cross-compiler, i.e. one does |
| 673 | # ./configure CC=i686-w64-mingw32-gcc ... |
| 674 | # instead of ./configure --with-mingw |
| 675 | case "$CC" in |
| 676 | *gcc*) |
| 677 | CC_machine=`($CC -dumpmachine) 2>/dev/nullscip-shell filesystem . . `/dev/null`.` || : |
| 678 | case "$CC_machine" in |
| 679 | *mingw32* ) |
| 680 | echoscip-shell system . . echo. "cross-compiling for mingw" |
| 681 | subdir_configure_args="${subdir_configure_args} --build=$CC_machine" ;; |
| 682 | esac |
| 683 | ;; |
| 684 | esac |
| 685 | fi |
| 686 | cd "${ABS_DIRNAME}" |
| 687 | echoscip-shell system . . echo. "executing $REL_SRCDIR/src/configure $*" |
| 688 | if testscip-shell system . . test. -n "$do_cbc"; then |
| 689 | runscip-shell shell clisp 1:2.49.20250504.gitf662209-2 run(). 1 ${CONFIG_SHELL} $REL_SRCDIR/src/configure $subdir_configure_args --cache-file=config.cache |
| 690 | else |
| 691 | ${CONFIG_SHELL} $REL_SRCDIR/src/configure $subdir_configure_args --cache-file=config.cache |
| 692 | fi |
| 693 | testscip-shell system . . test. -f "${ABS_DIRNAME}/intparam.h" || failscip-shell shell clisp 1:2.49.20250504.gitf662209-2 fail(). "error: configure could not generate intparam.h. Take a look at ${ABS_DIRNAME}/config.log." |
| 694 | testscip-shell system . . test. -f "${ABS_DIRNAME}/floatparam.h" || failscip-shell shell clisp 1:2.49.20250504.gitf662209-2 fail(). "error: configure could not generate floatparam.h. Take a look at ${ABS_DIRNAME}/config.log." |
| 695 | fi |
| 696 | |
| 697 | . "${ABS_DIRNAME}/config.cache" |
| 698 | |
| 699 | case ${ac_cv_host} in # mingw/msys |
| 700 | *mingw32*) |
| 701 | makemake_args="${makemake_args} --with-dynamic-modules=no --win32gcc" ;; |
| 702 | esac |
| 703 | |
| 704 | testscip-shell system . . test. -n "${cl_cv_have_ffcall}" || cl_cv_have_ffcall=notchecked |
| 705 | catscip-shell system . . cat. <<EOF |
| 706 | Configure findings: |
| 707 | FFI: ${cl_cv_have_ffcall} (user requested: ${do_ffi}) |
| 708 | readline: ${ac_cv_have_readline} (user requested: ${ac_cv_use_readline}) |
| 709 | libsigsegv: ${gl_cv_lib_sigsegv} |
| 710 | EOF |
| 711 | |
| 712 | # The user can set MAKE. In particular, the user may prefer GNU make. |
| 713 | if testscip-shell system . . test. -z "${MAKE}"; then |
| 714 | MAKE=make |
| 715 | fi |
| 716 | |
| 717 | # are any FFI modules requested? |
| 718 | ffi_modules='' |
| 719 | for module in ${all_modules}; do |
| 720 | mdir=${ABS_SRCDIR}/modules/${module} |
| 721 | testscip-shell system . . test. -d ${mdir} || failscip-shell shell clisp 1:2.49.20250504.gitf662209-2 fail(). "$0: ${mdir} is not an existing directory" |
| 722 | if testscip-shell system . . test. -r ${mdir}/configure.in; then |
| 723 | grepscip-shell system . . grep. 'CL_MODULE_COMMON_CHECKS.*ffi' ${mdir}/configure.in > /dev/nullscip-shell filesystem . . `/dev/null`. 2>&1 && \ |
| 724 | ffi_modules=${ffi_modules}" ${module}" |
| 725 | elif grepscip-shell system . . grep. '.*\.c.*\.fas.*:\|.*\.fas.*\.c.*:' ${mdir}/Makefile > /dev/nullscip-shell filesystem . . `/dev/null`. 2>&1 ; then |
| 726 | ffi_modules=${ffi_modules}" ${module}" |
| 727 | elif grepscip-shell system . . grep. ':use.*"FFI"' ${mdir}/*.lisp > /dev/nullscip-shell filesystem . . `/dev/null`. 2>&1; then |
| 728 | ffi_modules=${ffi_modules}" ${module}" |
| 729 | fi |
| 730 | done |
| 731 | if testscip-shell system . . test. -n "${ffi_modules}"; then |
| 732 | testscip-shell system . . test. ${do_ffi} = no && \ |
| 733 | fail "$0: --without-ffcall is incompatible with requested module(s):${ffi_modules}" |
| 734 | testscip-shell system . . test. "${cl_cv_have_ffcall}" = yes || \ |
| 735 | fail "$0: modules${ffi_modules} require FFI" |
| 736 | fi |
| 737 | if [scip-shell system . . `[`. ${do_ffi} != no -a "${cl_cv_have_ffcall}" = yes ]; then |
| 738 | makemake_args="--with-dynamic-ffi ${makemake_args}" |
| 739 | fi |
| 740 | |
| 741 | if [scip-shell system . . `[`. "${gl_cv_lib_sigsegv}" != "yes" ]; then |
| 742 | if [scip-shell system . . `[`. "${ignore_absence_of_libsigsegv}" = "yes" ]; then |
| 743 | echoscip-shell system . . echo. "As you requested, we will proceed without libsigsegv..." |
| 744 | else |
| 745 | if [scip-shell system . . `[`. "$ac_cv_build" = "$ac_cv_host" ]; then host_arg=""; |
| 746 | else host_arg=" --host=$ac_cv_host --build=$ac_cv_build"; |
| 747 | fi |
| 748 | catscip-shell system . . cat. <<EOF 1>&2 |
| 749 | $0: libsigsegv was not detected, thus some features, such as |
| 750 | generational garbage collection and |
| 751 | stack overflow detection in interpreted Lisp code |
| 752 | cannot be provided. |
| 753 | Please install libsigsegv like this: |
| 754 | EOF |
| 755 | if [scip-shell system . . `[`. "${CC+set}" = "set" ]; then |
| 756 | echoscip-shell system . . echo. " CC='$CC'; export CC" 1>&2 |
| 757 | fi |
| 758 | libsigsegv_targz=`echoscip-shell system . . echo. "$libsigsegv_url" | sedscip-shell system . . sed. -e 's|^.*/||'` |
| 759 | libsigsegv_dirname=`echoscip-shell system . . echo. "$libsigsegv_targz" | sedscip-shell system . . sed. -e 's|\.tar\.gz$||'` |
| 760 | catscip-shell system . . cat. <<EOF 1>&2 |
| 761 | mkdir prerequisites; cd prerequisites; prefix=\`pwd\`/${ac_cv_host} |
| 762 | wget ${libsigsegv_url} |
| 763 | tar xfz ${libsigsegv_targz} |
| 764 | cd ${libsigsegv_dirname} |
| 765 | ./configure${host_arg} --prefix=\${prefix} && ${MAKE} && ${MAKE} check && ${MAKE} install |
| 766 | cd ../.. |
| 767 | rm -f ${DIRNAME}/config.cache |
| 768 | ./configure --with-libsigsegv-prefix=\${prefix} $* |
| 769 | If you insist on building without libsigsegv, please pass |
| 770 | --ignore-absence-of-libsigsegv |
| 771 | to this script: |
| 772 | ./configure --ignore-absence-of-libsigsegv $* |
| 773 | If you have installed libsigsegv, but clisp does not detect it, |
| 774 | you might have installed it incorrectly, see section 2 in in unix/INSTALL. |
| 775 | EOF |
| 776 | exit 1; |
| 777 | fi |
| 778 | fi |
| 779 | |
| 780 | # CLISP needs a lot of stack space for bootstrapping, |
| 781 | # and insufficient stack space manifests itself via arbitrary GC errors. |
| 782 | # It was believed that 8192 is enough until power5 came along: |
| 783 | # https://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=166347 |
| 784 | # But this affects only the powerpc CPU, because it has lots of reserved space |
| 785 | # in its stack frame layout (see section 2.2.2 of |
| 786 | # "Power Architecture 64-Bit ELF V2 ABI Specification" |
| 787 | # https://members.openpowerfoundation.org/document/dl/576 ). |
| 788 | case ${ac_cv_host} in |
| 789 | *-*-rs6000 | *-*-rs6000-* | *-*-powerpc* | *-*-ppc*) |
| 790 | STACK_LIMIT=16384 ;; |
| 791 | *) |
| 792 | STACK_LIMIT=8192 ;; |
| 793 | esac |
| 794 | stacksizelimit=`ulimit -s 2>/dev/nullscip-shell filesystem . . `/dev/null`. || :` # cygwin /bin/sh ulimit is broken |
| 795 | # need 3 separate test calls because of "integer expression expected" errors |
| 796 | # when $stacksizelimit is "" or "unlimited" (no short-circuiting!) |
| 797 | set +e; |
| 798 | testscip-shell system . . test. -z "$stacksizelimit" || { testscip-shell system . . test. "$stacksizelimit" != unlimited && testscip-shell system . . test. "$stacksizelimit" -lt ${STACK_LIMIT}; } |
| 799 | STACK_TOO_SMALL=$? # 0=true => need to reset; 1=false => big enough |
| 800 | set -e |
| 801 | |
| 802 | cd "$ABS_DIRNAME" |
| 803 | echoscip-shell system . . echo. "./makemake $makemake_args > Makefile" |
| 804 | ./makemake $makemake_args > Makefile |
| 805 | ${MAKE} config.lisp |
| 806 | |
| 807 | if testscip-shell system . . test. -z "$do_cbc"; then |
| 808 | echoscip-shell system . . echo. |
| 809 | echoscip-shell system . . echo. "To continue building CLISP, the following commands are recommended" |
| 810 | echoscip-shell system . . echo. " (cf. unix/INSTALL step 4 ff):" |
| 811 | if testscip-shell system . . test. "$DIRNAME" != "."; then |
| 812 | echoscip-shell system . . echo. " cd $DIRNAME" |
| 813 | fi |
| 814 | echoscip-shell system . . echo. " ${EDITOR:-vi} config.lisp" |
| 815 | if [scip-shell system . . `[`. "${STACK_TOO_SMALL}" = 0 ]; then |
| 816 | catscip-shell system . . cat. <<EOF |
| 817 | # The default stack size on your platform is insufficient |
| 818 | # and must be increased to at least ${STACK_LIMIT}. You must do either |
| 819 | # 'ulimit -s ${STACK_LIMIT}' (for Bourne shell derivatives, e.g., bash and zsh) |
| 820 | # or 'limit stacksize ${STACK_LIMIT}' (for C shell derivarives, e.g., tcsh) |
| 821 | EOF |
| 822 | fi |
| 823 | catscip-shell system . . cat. <<EOF |
| 824 | ${MAKE} |
| 825 | # CLISP self-test: |
| 826 | ${MAKE} check |
| 827 | # Test non-portable features and modules |
| 828 | ${MAKE} extracheck mod-check |
| 829 | EOF |
| 830 | else |
| 831 | if [scip-shell system . . `[`. -n "${edit_config}" ]; then |
| 832 | ${MAKE} config.lisp |
| 833 | ${EDITOR:-vi} config.lisp |
| 834 | fi |
| 835 | if [scip-shell system . . `[`. "${STACK_TOO_SMALL}" = 0 ]; then |
| 836 | set +e; ulimit -s ${STACK_LIMIT} 2>/dev/nullscip-shell filesystem . . `/dev/null`.; set -e; |
| 837 | fi |
| 838 | runscip-shell shell clisp 1:2.49.20250504.gitf662209-2 run(). 2 ${MAKE} |
| 839 | runscip-shell shell clisp 1:2.49.20250504.gitf662209-2 run(). 3 ${MAKE} check |
| 840 | if testscip-shell system . . test. "$do_cbc" = 2; then |
| 841 | runscip-shell shell clisp 1:2.49.20250504.gitf662209-2 run(). 4 ${MAKE} extracheck |
| 842 | runscip-shell shell clisp 1:2.49.20250504.gitf662209-2 run(). 5 ${MAKE} base-mod-check |
| 843 | # Disabled because the rawsock tests hang on Solaris. |
| 844 | # run 6 ${MAKE} full-mod-check |
| 845 | fi |
| 846 | # report results: |
| 847 | for log in 1 2 3 4 5 # 6 |
| 848 | do |
| 849 | stepresult=`sedscip-shell system . . sed. -n -e '$p' cbcstep${log}.log` |
| 850 | echoscip-shell system . . echo. "Step ${log} ${stepresult}" |
| 851 | done |
| 852 | # Fail if one of the commands "make" or "make check" failed. |
| 853 | # "make extracheck" and "make mod-check" are allowed to fail. |
| 854 | sedscip-shell system . . sed. -n -e '$p' cbcstep2.log | grepscip-shell system . . grep. ' SUCCEEDED$' >/dev/nullscip-shell filesystem . . `/dev/null`. || exit 1 |
| 855 | sedscip-shell system . . sed. -n -e '$p' cbcstep3.log | grepscip-shell system . . grep. ' SUCCEEDED$' >/dev/nullscip-shell filesystem . . `/dev/null`. || exit 1 |
| 856 | if testscip-shell system . . test. "$do_cbc" != 2; then |
| 857 | catscip-shell system . . cat. <<EOF |
| 858 | # Now you can test non-portable features and modules: |
| 859 | ${MAKE} extracheck mod-check |
| 860 | EOF |
| 861 | fi |
| 862 | fi |